# Grassmann.jl Library

AbstractTensors.ManifoldType
Manifold{V} <: TensorAlgebra{V}

Basis parametrization locally homeomorphic to ℝ^n product topology.

AbstractTensors.TVType
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

Graded elements of a TensorAlgebra in a Manifold topology.

AbstractTensors._InitialValueType
_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.bivectorFunction
bivector(::TensorAlgebra)

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

AbstractTensors.mdimsMethod
mdims(t::TensorAlgebra{V})

Dimensionality of the pseudoscalar V of that TensorAlgebra.

AbstractTensors.scalarFunction
scalar(::TensorAlgebra)

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

AbstractTensors.trivectorFunction
trivector(::TensorAlgebra)

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

AbstractTensors.valuesMethod
values(::TensorAlgebra)

Returns the internal Values representation of a TensorAlgebra element.

AbstractTensors.valuetypeMethod
valuetype(t::TensorAlgebra)

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

AbstractTensors.vectorFunction
vector(::TensorAlgebra)

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

AbstractTensors.volumeMethod
pseudoscalar(::TensorAlgebra)

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

LinearAlgebra.rankMethod
rank(::Manifold{n})

Dimensionality n of the Manifold subspace representation.

DirectSum.BasisType
DirectSum.Basis{V} <: SubAlgebra{V} <: TensorAlgebra{V}

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

DirectSum.ExtendedBasisType
DirectSum.ExtendedBasis{V} <: SubAlgebra{V} <: TensorAlgebra{V}

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

DirectSum.SimplexType

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

DirectSum.SparseBasisType
DirectSum.SparseBasis{V} <: SubAlgebra{V} <: TensorAlgebra{V}

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

DirectSum.SubManifoldType

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

DirectSum.TensorBundleType
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.allocFunction
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.getbasisMethod
getbasis(V::Manifold,v)

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

DirectSum.@basisMacro
@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.@dualbasisMacro
@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.@mixedbasisMacro
@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.ChainMethod

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

source
Grassmann.ChainBundleType
ChainBundle{V,G,P} <: Manifold{V} <: TensorAlgebra{V}

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

source
Grassmann.MultiVectorMethod
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)

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
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.dotFunction
dot(ω::TensorAlgebra,η::TensorAlgebra)

Interior (right) contraction product: ω⋅η = ω∨⋆η

source
AbstractTensors.cliffordFunction
clifford(ω::TensorAlgebra)

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

Base.:~Method
reverse(ω::TensorAlgebra)

Base.conjFunction
~(ω::TensorAlgebra)

Base.imagMethod
imag(ω::TensorAlgebra)

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

Base.realMethod

real(ω::TensorAlgebra)

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

Leibniz.complementrightFunction
complementright(::TensorAlgebra)

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

Leibniz.getbasisMethod
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ₚ.