Grassmann.jl Library

AbstractTensors.Manifold β€” Type
Manifold{V} <: TensorAlgebra{V}

Basis parametrization locally homeomorphic to ℝ^n product topology.

AbstractTensors.TV β€” Type
TV[ elements ]
TV{T}[ elements ]

Create Values literals using array construction syntax. The element type is inferred by promoting elements to a common type or set to T when T is provided explicitly.

Examples:

  • TV[1.0, 2.0] creates a length-2 Values of Float64 elements.
  • TV{Float32}[1, 2] creates a length-2 Values of Float32 elements.

A couple of helpful type aliases are also provided:

  • TV_F64[1, 2] creates a lenght-2 Values of Float64 elements
  • TV_F32[1, 2] creates a lenght-2 Values of Float32 elements
AbstractTensors.TensorGraded β€” Type
TensorGraded{V,G} <: Manifold{V} <: TensorAlgebra

Graded elements of a TensorAlgebra in a Manifold topology.

AbstractTensors._InitialValue β€” Type
_InitialValue

A singleton type for representing "universal" initial value (identity element).

The idea is that, given op for mapfoldl, virtually, we define an "extended" version of it by

opβ€²(::_InitialValue, x) = x
opβ€²(acc, x) = op(acc, x)

This is just a conceptually useful model to have in mind and we don't actually define opβ€² here (yet?). But see Base.BottomRF for how it might work in action.

(It is related to that you can always turn a semigroup without an identity into a monoid by "adjoining" an element that acts as the identity.)

AbstractTensors.bivector β€” Function
bivector(::TensorAlgebra)

Return the bivector (rank 2) part of any TensorAlgebra element.

AbstractTensors.mdims β€” Method
mdims(t::TensorAlgebra{V})

Dimensionality of the pseudoscalar V of that TensorAlgebra.

AbstractTensors.scalar β€” Function
scalar(::TensorAlgebra)

Return the scalar (rank 0) part of any TensorAlgebra element.

AbstractTensors.trivector β€” Function
trivector(::TensorAlgebra)

Return the trivector (rank 3) part of any TensorAlgebra element.

AbstractTensors.values β€” Method
values(::TensorAlgebra)

Returns the internal Values representation of a TensorAlgebra element.

AbstractTensors.valuetype β€” Method
valuetype(t::TensorAlgebra)

Returns type of a TensorAlgebra element value's internal representation.

AbstractTensors.vector β€” Function
vector(::TensorAlgebra)

Return the vector (rank 1) part of any TensorAlgebra element.

AbstractTensors.volume β€” Method
pseudoscalar(::TensorAlgebra)

Return the pseudoscalar (full rank) part of any TensorAlgebra element.

LinearAlgebra.rank β€” Method
rank(::Manifold{n})

Dimensionality n of the Manifold subspace representation.

DirectSum.Basis β€” Type
DirectSum.Basis{V} <: SubAlgebra{V} <: TensorAlgebra{V}

Grassmann basis container with cache of SubManifold elements and their Symbol names.

DirectSum.ExtendedBasis β€” Type
DirectSum.ExtendedBasis{V} <: SubAlgebra{V} <: TensorAlgebra{V}

Grassmann basis container without a dedicated SubManifold cache (only lazy caching).

DirectSum.Simplex β€” Type
Simplex{V,G,B,𝕂} <: TensorTerm{V,G} <: TensorGraded{V,G}

Simplex type with pseudoscalar V::Manifold, grade/rank G::Int, B::SubManifold{V,G}, field 𝕂::Type.

DirectSum.SparseBasis β€” Type
DirectSum.SparseBasis{V} <: SubAlgebra{V} <: TensorAlgebra{V}

Grassmann basis with sparse cache of SubManifold{G,V} elements and their Symbol names.

DirectSum.SubManifold β€” Type
SubManifold{V,G,B} <: TensorGraded{V,G} <: Manifold{G}

Basis type with pseudoscalar V::Manifold, grade/rank G::Int, bits B::UInt64.

DirectSum.TensorBundle β€” Type
TensorBundle{n,β„™,g,Ξ½,ΞΌ} <: Manifold{n}

Let n be the rank of a Manifold{n}. The type TensorBundle{n,β„™,g,Ξ½,ΞΌ} uses byte-encoded data available at pre-compilation, where β„™ specifies the basis for up and down projection, g is a bilinear form that specifies the metric of the space, and ΞΌ is an integer specifying the order of the tangent bundle (i.e. multiplicity limit of Leibniz-Taylor monomials). Lastly, Ξ½ is the number of tangent variables.

DirectSum.alloc β€” Function
basis(V::Manifold,:V,"v","w","βˆ‚","Ο΅")

Generates Basis declaration having Manifold specified by V. The first argument provides pseudoscalar specifications, the second argument is the variable name for the Manifold, and the third and fourth argument are variable prefixes of the SubManifold vector names (and covector basis names).

DirectSum.getbasis β€” Method
getbasis(V::Manifold,v)

Fetch a specific SubManifold{G,V} element from an optimal SubAlgebra{V} selection.

DirectSum.@basis β€” Macro
@basis

Generates SubManifold elements having Manifold specified by V. As a result of this macro, all of the SubManifold{V,G} elements generated by that TensorBundle become available in the local workspace with the specified naming. The first argument provides pseudoscalar specifications, the second argument is the variable name for the Manifold, and the third and fourth argument are variable prefixes of the SubManifold vector names (and covector basis names). Default for @basis M is @basis M V v w βˆ‚ Ο΅.

DirectSum.@dualbasis β€” Macro
@dualbasis

Generates SubManifold elements having Manifold specified by V'. As a result of this macro, all of the SubManifold{V',G} elements generated by that TensorBundle become available in the local workspace with the specified naming. The first argument provides pseudoscalar specifications, the second argument is the variable name for the dual Manifold, and the third and fourth argument are variable prefixes of the SubManifold covector names (and tensor field basis names). Default for @dualbasis M is @dualbasis M VV w Ο΅.

DirectSum.@mixedbasis β€” Macro
@mixedbasis

Generates SubManifold elements having Manifold specified by VβŠ•V'. As a result of this macro, all of the SubManifold{VβŠ•V',G} elements generated by that TensorBundle become available in the local workspace with the specified naming. The first argument provides pseudoscalar specifications, the second argument is the variable name for the Manifold, and the third and fourth argument are variable prefixes of the SubManifold vector names (and covector basis names). Default for @mixedbasis M is @mixedbasis M V v w βˆ‚ Ο΅.

Grassmann.Chain β€” Method
Chain{V,G,𝕂} <: TensorGraded{V,G}

Chain type with pseudoscalar V::Manifold, grade/rank G::Int, scalar field 𝕂::Type.

source
Grassmann.ChainBundle β€” Type
ChainBundle{V,G,P} <: Manifold{V} <: TensorAlgebra{V}

Subsets of a bundle cross-section over a Manifold topology.

source
Grassmann.MultiVector β€” Method
MultiVector{V,𝕂} <: TensorMixed{V} <: TensorAlgebra{V}

Chain type with pseudoscalar V::Manifold and scalar field 𝕂::Type.

source
AbstractLattices.:∧ β€” Method
∧(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Exterior product as defined by the anti-symmetric quotient Ξ›β‰‘βŠ—/~

source
AbstractLattices.:∨ β€” Method
∨(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Regressive product as defined by the DeMorgan's law: ∨(Ο‰...) = ⋆⁻¹(∧(⋆.(Ο‰)...))

source
AbstractTensors.:βˆ— β€” Function
βˆ—(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Reversed geometric product: Ο‰βˆ—Ξ· = (~Ο‰)*Ξ·

source
AbstractTensors.:⊘ β€” Function
⊘(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

General sandwich product: Ο‰βŠ˜Ξ· = involute(Ξ·)\Ο‰βŠ–Ξ·

For normalized even grade Ξ· it is Ο‰βŠ˜Ξ· = (~Ξ·)βŠ–Ο‰βŠ–Ξ·

source
AbstractTensors.:βŠ™ β€” Method
βŠ™(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Symmetrization projection: βŠ™(Ο‰...) = βˆ‘(∏(Οƒ.(Ο‰)...))/factorial(length(Ο‰))

source
AbstractTensors.:⊠ β€” Method
⊠(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Anti-symmetrization projection: ⊠(Ο‰...) = βˆ‘(∏(πσ.(Ο‰)...))/factorial(length(Ο‰))

source
AbstractTensors.contraction β€” Method
contraction(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Interior (right) contraction product: Ο‰β‹…Ξ· = Ο‰βˆ¨β‹†Ξ·

source
Base.:& β€” Function
∨(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Regressive product as defined by the DeMorgan's law: ∨(Ο‰...) = ⋆⁻¹(∧(⋆.(Ο‰)...))

source
Base.:* β€” Method
*(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Geometric algebraic product: Ο‰βŠ–Ξ· = (-1)α΅–det(Ο‰βˆ©Ξ·)βŠ—(Ξ›(Ο‰βŠ–Ξ·)βˆͺL(Ο‰βŠ•Ξ·))

source
Base.:<< β€” Function
βŠ™(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Symmetrization projection: βŠ™(Ο‰...) = βˆ‘(∏(Οƒ.(Ο‰)...))/factorial(length(Ο‰))

source
Base.:>> β€” Function
⊠(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Anti-symmetrization projection: ⊠(Ο‰...) = βˆ‘(∏(πσ.(Ο‰)...))/factorial(length(Ο‰))

source
Base.:>>> β€” Function
>>>(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Sandwich product: Ο‰>>>Ξ· = Ο‰βŠ–Ξ·βŠ–(~Ο‰)

source
LinearAlgebra.cross β€” Function
cross(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Cross product: ω×η = ⋆(Ο‰βˆ§Ξ·)

source
LinearAlgebra.dot β€” Function
dot(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

Interior (right) contraction product: Ο‰β‹…Ξ· = Ο‰βˆ¨β‹†Ξ·

source
AbstractTensors.clifford β€” Function
clifford(Ο‰::TensorAlgebra)

Clifford conjugate of an element: clifford(Ο‰) = involute(conj(Ο‰))

AbstractTensors.involute β€” Function
involute(Ο‰::TensorAlgebra)

Involute of an element: ~Ο‰ = (-1)^grade(Ο‰)*Ο‰

Base.:~ β€” Method
reverse(Ο‰::TensorAlgebra)

Reverse of an element: ~Ο‰ = (-1)^(grade(Ο‰)(grade(Ο‰)-1)/2)Ο‰

Base.conj β€” Function
~(Ο‰::TensorAlgebra)

Reverse of an element: ~Ο‰ = (-1)^(grade(Ο‰)(grade(Ο‰)-1)/2)Ο‰

Base.imag β€” Method
imag(Ο‰::TensorAlgebra)

The imag part (Ο‰-(~Ο‰))/2 is defined by abs2(imag(Ο‰)) == -(imag(Ο‰)^2).

Base.real β€” Method

real(Ο‰::TensorAlgebra)

The real part (Ο‰+(~Ο‰))/2 is defined by abs2(real(Ο‰)) == real(Ο‰)^2.

Leibniz.complementright β€” Function
complementright(::TensorAlgebra)

Non-metric variant of Grassmann-Poincare-Hodge complement.

Leibniz.complementrighthodge β€” Function
complementrighthodge(Ο‰::TensorAlgebra)

Grassmann-Poincare-Hodge complement: ⋆ω = Ο‰βˆ—I

Leibniz.getbasis β€” Method
getbasis(V::Manifold,v)

Fetch a specific SubManifold{G,V} element from an optimal SubAlgebra{V} selection.

Leibniz.Ο‡ β€” Method
Ο‡(::TensorAlgebra)

Compute the Euler characteristic Ο‡ = βˆ‘β‚š(-1)α΅–bβ‚š.