Grassmann.jl Library

AbstractTensors.Bivector β€” Type
Bivector{V,T} <: TensorGraded{V,2,T}

Graded bivector elements of a Manifold instance V with scalar field T.

AbstractTensors.GradedVector β€” Type
GradedVector{V,T} <: TensorGraded{V,1,T}

Graded vector elements of a Manifold instance V with scalar field T.

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

Basis parameter locally homeomorphic to V::Submanifold{M} T-module product topology.

AbstractTensors.Scalar β€” Type
Scalar{V,T} <: TensorGraded{V,0,T}

Graded scalar elements of a Manifold instance V with scalar field T.

AbstractTensors.TensorGraded β€” Type
TensorGraded{V,G,T} <: Manifold{V,T} <: TensorAlgebra

Grade G elements of a Manifold instance V with scalar field T.

AbstractTensors.TensorMixed β€” Type
TensorMixed{V,T} <: TensorAlgebra{V,T}

Elements of Manifold instance V having non-homogenous grade with scalar field T.

AbstractTensors.TensorTerm β€” Type
TensorTerm{V,G,T} <: TensorGraded{V,G,T}

Single coefficient for grade G of a Manifold instance V with scalar field T.

AbstractTensors.Trivector β€” Type
Trivector{V,T} <: TensorGraded{V,3,T}

Graded trivector elements of a Manifold instance V with scalar field T.

AbstractTensors.antisandwich β€” Method
antisandwich(x::TensorAlgebra,R::TensorAlgebra)

Defined as complementleft(complementright(R)>>>complementright(x)).

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

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

AbstractTensors.coabs β€” Function
coabs(t::TensorAlgebra)

Complemented abs defined as complementleft(abs(complementright(t))).

AbstractTensors.coabs2 β€” Function
coabs2(t::TensorAlgebra)

Complemented abs2 defined as complementleft(abs2(complementright(t))).

AbstractTensors.cocbrt β€” Function
cocbrt(t::TensorAlgebra)

Complemented cbrt defined as complementleft(cbrt(complementright(t))).

AbstractTensors.cocos β€” Function
cocos(t::TensorAlgebra)

Complemented cos defined as complementleft(cos(complementright(t))).

AbstractTensors.cocosh β€” Function
cocosh(t::TensorAlgebra)

Complemented cosh defined as complementleft(cosh(complementright(t))).

AbstractTensors.coexp β€” Function
coexp(t::TensorAlgebra)

Complemented exp defined as complementleft(exp(complementright(t))).

AbstractTensors.coinv β€” Function
coinv(t::TensorAlgebra)

Complemented inv defined as complementleft(inv(complementright(t))).

AbstractTensors.colog β€” Function
colog(t::TensorAlgebra)

Complemented log defined as complementleft(log(complementright(t))).

AbstractTensors.cosandwich β€” Method
cosandwich(x::TensorAlgebra,R::TensorAlgebra)

Defined as complementleft(sandwich(complementright(x),complementright(R))).

AbstractTensors.cosin β€” Function
cosin(t::TensorAlgebra)

Complemented sin defined as complementleft(sin(complementright(t))).

AbstractTensors.cosinh β€” Function
cosinh(t::TensorAlgebra)

Complemented sinh defined as complementleft(sinh(complementright(t))).

AbstractTensors.cosqrt β€” Function
cosqrt(t::TensorAlgebra)

Complemented sqrt defined as complementleft(sqrt(complementright(t))).

AbstractTensors.cotan β€” Function
cotan(t::TensorAlgebra)

Complemented tan defined as complementleft(tan(complementright(t))).

AbstractTensors.cotanh β€” Function
cotanh(t::TensorAlgebra)

Complemented tanh defined as complementleft(tanh(complementright(t))).

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

Pseudo-normalization defined as unitize(t) = t/value(coabs(t)).

AbstractTensors.gdims β€” Method
gdims(t::TensorGraded{V,G})

Dimensionality of the grade G of V for that TensorAlgebra.

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

Geometric norm defined as geomabs(t) = abs(t) + coabs(t).

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

Dimensionality of the pseudoscalar V of that TensorAlgebra.

AbstractTensors.pseudoabs β€” Function
pseudoabs(t::TensorAlgebra)

Complemented abs defined as complementleft(abs(complementright(t))).

AbstractTensors.pseudoabs2 β€” Function
pseudoabs2(t::TensorAlgebra)

Complemented abs2 defined as complementleft(abs2(complementright(t))).

AbstractTensors.pseudocbrt β€” Function
pseudocbrt(t::TensorAlgebra)

Complemented cbrt defined as complementleft(cbrt(complementright(t))).

AbstractTensors.pseudocos β€” Function
pseudocos(t::TensorAlgebra)

Complemented cos defined as complementleft(cos(complementright(t))).

AbstractTensors.pseudocosh β€” Function
pseudocosh(t::TensorAlgebra)

Complemented cosh defined as complementleft(cosh(complementright(t))).

AbstractTensors.pseudoexp β€” Function
pseudoexp(t::TensorAlgebra)

Complemented exp defined as complementleft(exp(complementright(t))).

AbstractTensors.pseudoinv β€” Function
pseudoinv(t::TensorAlgebra)

Complemented inv defined as complementleft(inv(complementright(t))).

AbstractTensors.pseudolog β€” Function
pseudolog(t::TensorAlgebra)

Complemented log defined as complementleft(log(complementright(t))).

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

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

AbstractTensors.pseudosin β€” Function
pseudosin(t::TensorAlgebra)

Complemented sin defined as complementleft(sin(complementright(t))).

AbstractTensors.pseudosinh β€” Function
pseudosinh(t::TensorAlgebra)

Complemented sinh defined as complementleft(sinh(complementright(t))).

AbstractTensors.pseudosqrt β€” Function
pseudosqrt(t::TensorAlgebra)

Complemented sqrt defined as complementleft(sqrt(complementright(t))).

AbstractTensors.pseudotan β€” Function
pseudotan(t::TensorAlgebra)

Complemented tan defined as complementleft(tan(complementright(t))).

AbstractTensors.pseudotanh β€” Function
pseudotanh(t::TensorAlgebra)

Complemented tanh defined as complementleft(tanh(complementright(t))).

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

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

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

Dimensionality of the superalgebra of V for that TensorAlgebra.

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

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

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

Geometric normalization defined as unitnorm(t) = t/norm(geomabs(t)).

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

Returns the internal Values representation of a TensorAlgebra element.

AbstractTensors.valuetype β€” Method
valuetype(t::TensorAlgebra{V,T}) where {V,T} = T

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.

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

Dimensionality n of the Manifold subspace representation.

AbstractTensors.@co β€” Macro
@co fun(args...)

Use the macro @co to make a pseudoscalar complement variant of any functions:

julia> @co myfun(x)
comyfun (generic function with 1 method)

Now comyfun(x) = complementleft(myfun(complementright(x))) is defined.

julia> @co myproduct(a,b)
comyproduct (generic function with 1 method)

Now comyproduct(a,b) = complementleft(myproduct(!a,!b)) is defined.

AbstractTensors.@pseudo β€” Macro
@pseudo fun(args...)

Use the macro @pseudo to make a pseudoscalar complement variant of any functions:

julia> @pseudo myfun(x)
pseudomyfun (generic function with 1 method)

Now pseudomyfun(x) = complementleft(myfun(complementright(x))) is defined.

julia> @pseudo myproduct(a,b)
pseudomyproduct (generic function with 1 method)

Now pseudomyproduct(a,b) = complementleft(myproduct(!a,!b)) is defined.

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.Infinity β€” Type
Infinity{V} <: TensorGraded{V,0} <: TensorAlgebra{V}

Infinite quantity Infinity of the Grassmann algebra over V.

DirectSum.One β€” Type
One{V} <: TensorGraded{V,0} <: TensorAlgebra{V}

Unit quantity One of the Grassmann algebra over V.

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

Single type with pseudoscalar V::Manifold, grade/rank G::Int, B::Submanifold{V,G}, field T::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}

A manifold representing the space of tensors with a given metric and basis for projection.

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.Zero β€” Type
Zero{V} <: TensorGraded{V,0} <: TensorAlgebra{V}

Null quantity Zero of the Grassmann algebra over V.

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

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

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.

DirectSum.alloc β€” Function
alloc(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.nameindex β€” Method
nameindex(V::Int) -> Int

Returns a default name index for an integer input.

DirectSum.nameindex β€” Method
nameindex(a::NTuple{4, String}) -> Int

Get a unique index for a set of name options, based on a cached result.

DirectSum.nameindex β€” Method
nameindex(V::T) -> Int

Returns the name index for V when V is a TensorBundle or Manifold.

DirectSum.namelist β€” Method
namelist(V) -> String

Get the cached name list for the options specified in V.

DirectSum.pseudoclifford β€” Function
pseudoclifford(Ο‰::TensorAlgebra)

Pseudo-clifford conjugate element: pseudoclifford(Ο‰) = pseudoinvolute(pseudoreverse(Ο‰))

DirectSum.pseudoinvolute β€” Function
pseudoinvolute(Ο‰::TensorAlgebra)

Anti-involute of an element: ~Ο‰ = (-1)^pseudograde(Ο‰)*Ο‰

DirectSum.pseudoreverse β€” Function
pseudoreverse(Ο‰::TensorAlgebra)

Anti-reverse of an element: ~Ο‰ = (-1)^(pseudograde(Ο‰)(pseudograde(Ο‰)-1)/2)Ο‰

DirectSum.tensorhash β€” Function
tensorhash(d, o; c=0, C=0) -> Int

Compute a unique integer representation for a set of options.

Arguments:

  • d: Number of tangent variables (corresponds to Ξ½).
  • o: Order of Leibniz-Taylor monomials multiplicity limit (corresponds to ΞΌ).
  • c: Coefficient used to specify the metric (corresponds to g). Defaults to 0.
  • C: Additional coefficient. Defaults to 0.

Returns

A unique integer representation that can be used as a cache key.

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.AbstractSpinor β€” Type
AbstractSpinor{V,T} <: TensorMixed{V,T} <: TensorAlgebra{V,T}

Elements of TensorAlgebra having non-homogenous grade being a spinor in the abstract.

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

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

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

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

Grassmann.CoSpinor β€” Method
CoSpinor{V,T} <: AbstractSpinor{V,T} <: TensorAlgebra{V,T}

PsuedoSpinor (odd grade) type with pseudoscalar V::Manifold and scalar T::Type.

Grassmann.Couple β€” Type
Couple{V,B,T} <: AbstractSpinor{V,T} <: TensorAlgebra{V,T}

Pair of values with V::Manifold, basis B::Submanifold, scalar field of T::Type.

Grassmann.Multivector β€” Method
Multivector{V,T} <: TensorMixed{V,T} <: TensorAlgebra{V,T}

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

Grassmann.Phasor β€” Type
Phasor{V,B,T} <: AbstractSpinor{V,T} <: TensorAlgebra{V,T}

Magnitude/phase angle with V::Manifold, basis B::Submanifold, scalar field T::Type.

Grassmann.PseudoCouple β€” Type
PseudoCouple{V,B,T} <: AbstractSpinor{V,T} <: TensorAlgebra{V,T}

Pair of values with V::Manifold, basis B::Submanifold, pseudoscalar of T::Type.

Grassmann.Spinor β€” Method
Spinor{V,T} <: AbstractSpinor{V,T} <: TensorAlgebra{V,T}

Spinor (even grade) type with pseudoscalar V::Manifold and scalar field T::Type.

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

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

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

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

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

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

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

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

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

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

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

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

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

AbstractTensors.:βŸ‘ β€” Method
*(Ο‰::TensorAlgebra,Ξ·::TensorAlgebra)

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

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

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

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

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

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

Traditional sandwich product: Ο‰>>>Ξ· = Ο‰βŠ–Ξ·βŠ–clifford(Ο‰)

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

Grassmann.betti β€” Method
betti(::TensorAlgebra)

Compute the Betti numbers.

Grassmann.cayley β€” Function
cayley(V,op=*)

Compute the cayley table with op(a,b) for each Submanifold basis of V.

Grassmann.compact β€” Function
compactio(::Bool)

Toggles compact numbers for extended Grassmann elements (enabled by default)

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

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

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

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

Leibniz.bit2int β€” Method
bit2int(b::BitVector) -> UInt

Takes a BitVector and converts it to a corresponding unsigned integer representation.

Leibniz.digitsfast β€” Method
digitsfast(b,N::Int) -> Values{N+1,Int}

Calculates the digits of a binary number b up to length N.

Leibniz.gdimsall β€” Method
gdimsall(N) -> Values{N+1,Int}

Returns Values{N+1,Int} representing binomial coefficients from 0 to N.

Leibniz.gdimseven β€” Method
gdimseven(N) -> Values

Returns Values representing binomial coefficients for even values from 0 to N.

Leibniz.gdimsodd β€” Method
gdimsodd(N) -> Values

Returns Values representing binomial coefficients for odd values from 1 to N.

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

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

Leibniz.indexbits β€” Method
indexbits(N,indices) -> BitVector

Converts a list of indices into a BitVector of length N, used to create an array where only the specified indices are set to true.

Leibniz.indices β€” Method
indices(b::UInt) -> Vector
indices(b::UInt,N::UInt) -> Vector

Computes the indices at which a binary number b has bits equal to 1. The N argument (optional) specifies the length of the binary representation.

Leibniz.intlog β€” Method
intlog(M::Integer) -> Int

This function computes the integer 2-logarithm of an integer.

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

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