Differential Geometric Algebra with Leibniz and Grassmann Michael Reed (Crucial Flow Research)
Total Page:16
File Type:pdf, Size:1020Kb
Proceedings of JuliaCon Differential geometric algebra with Leibniz and Grassmann Michael Reed (Crucial Flow Research) The nature of the geometric algebra code generation enables one to easily extend the abstract product operations to any specific number field type (including differential operators with Leibniz.jl or symbolic coefficients with Reduce.jl), by making use of Julia’s type system. Mixed tensor products with their coefficients are constructed from these operations to work with bivector elements of Lie groups [7][10]. 1. Direct sum parametric type polymorphism The DirectSum.jl package is a work in progress providing the necessary tools to work with an arbitrary Manifold specified github.com/chakravala/Grassmann.jl by an encoding. Due to the parametric type system for the generating VectorBundle, the Julia compiler can fully pre- allocate and often cache values efficiently ahead of run-time. Although intended for use with the Grassmann.jl package, ABSTRACT DirectSum can be used independently. The Grassmann.jl package provides tools for computations based on multi-linear algebra and spin groups using the Definition 1 Vector bundle of submanifolds. Let 푀 = 푇 휇푉 ∈ TensorBundle<:Manifold 푛 extended geometric algebra known as Leibniz-Grassmann- Vect핂 be a of rank , Clifford-Hestenes algebra. Combinatorial products include 휇 푇 푉 = (푛, ℙ, 푔, 휈, 휇), ℙ ⊆ ⟨푣∞, 푣∅⟩ , 푔 ∶ 푉 × 푉 → 핂 exterior, regressive, inner, and geometric; along with the Hodge star, adjoint, reversal, and boundary operators. The The type TensorBundle{n,ℙ,g,휈, 휇} uses byte-encoded data kernelized operations are built up from composite sparse available at pre-compilation, where ℙ specifies the basis for tensor products and Hodge duality, with high dimensional up and down projection, 푔 is a bilinear form that specifies the support for up to 62 indices using staged caching and pre- metric of the space, and 휇 is an integer specifying the order of compilation. Code generation enables concise yet highly ex- the tangent bundle (i.e. multiplicity limit of Leibniz-Taylor tensible definitions. DirectSum.jl multivector parametric monomials). Lastly, 휈 is the number of tangent variables. type polymorphism is based on tangent vector spaces and ′ op conformal projective geometry. Additionally, the universal The dual space functor (⋅) ∶ Vect핂 → Vect핂 is an involution which toggles a dual vector space with inverted signature interoperability between different sub-algebras is enabled by ′ AbstractTensors.jl, on which the type system is built. ! with property 푉 = Hom(푉 , 핂) and having Basis generators ′ —DirectSum.jl: Abstract tangent bundle vector space ⟨푣1, … , 푣푛−휈, 휕1, … , 휕휈⟩ = 푀 ↔ 푀 = ⟨푤1, … , 푤푛−휈, 휖1, … , 휖휈⟩ types (unions, intersections, sums, etc.) where 푣푖, 푤푖 are a basis for the vectors and covectors, while — : Tensor algebra abstract type inter- AbstractTensors.jl 휕푗, 휖푗 are a basis for differential operators and tensor fields. operability with vector bundle parameter The direct sum operator ⊕ can be used to join spaces (alter- —Grassmann.jl: ⟨Leibniz+Grassmann-Clifford-Hestenes⟩ natively +). The direct sum of a VectorBundle and its dual differential geometric algebra of multivector forms V⊕V' represents the full mother space V*. In addition to the —Leibniz.jl: Derivation operator algebras for tensor fields direct-sum operation, several other operations exist, such ∪, ∩, ⊆, ⊇ —Reduce.jl: Symbolic parser generator for Julia expres- as for set operations. Due to the design of the sions using REDUCE algebra term rewriter VectorBundle dispatch, these operations enable code opti- mizations at compile-time provided by the bit parameters. Mathematical foundations and some of the nuances in the ⋃ 푇 휇푖 푉 = (|ℙ| + {푛 − |ℙ |} , ⋃ ℙ , ∪푔 , {휇 } ) definitions specific to the Grassmann.jl implementation are 푖 max 푖 푖 푖 푖 푖 max 푖 푖 concisely described, along with the accompanying support packages that provide an extensible platform for computing ⨁ 푇 휇푖 푉 = (|ℙ| + ∑(푛 − |ℙ |), ⋃ ℙ , ⊕ 푔 , max {휇 } ) with geometric algebra at high dimensions. The design is 푖 푖 푖 푖 푖 푖 푖 푖 based on the TensorAlgebra abstract type interoperability These are roughly the formulas used for those operations. from AbstractTensors.jl with a VectorBundle type parameter from DirectSum.jl. Abstract vector space type operations Remark 1. Although some type operations like ⋃ and ⨁ happen at compile-time, resulting in a differential conformal are similar and sometimes result in equal values, the union geometric algebra of hyper-dual multivector forms. and sum are entirely different operations in general. 1 Proceedings of JuliaCon 1(1), 2019 Calling manifolds with sets of indices constructs the sub- Remark 2. Observe that the anti-symmetric property space representations. Given M(s::Int...) one can encode implies that 휔 ⊗ 휔 = 0, while the symmetric property neither SubManifold{|푠|, 푀, 푠} with induced orthogonal space 푍: implies nor denies such a property. Grassmann remarked [6] in 1862 that the symmetric algebra of functions is by far 푇 푒푉 ⊂ 푇 휇푊 ⟺ ∃푍 ∈ (푇 푒(푉 ⊕푍) = 푇 푒≤휇푊 , 푉 ⟂ 푍), Vect핂 more complicated than his anti-symmetric exterior algebra. such that computing unions of submanifolds is done by in- The first part of the book focused on anti-symmetric exterior specting the parameter 푠 ∈ 푉 ⊆ 푊 and 푠 ∉ 푍. Operations algebra, while the more complex symmetric function algebra on Manifold types is automatically handled at compile time. of Leibniz was subject of the second multivariable part of the The metric signature of the SubManifold{V,1} elements of a book. Elements 휔푘 in the space Λ푉 of anti-symmetric algebra vector space V can be specified with the V"..." constructor are often studied as unit quantum state vectors in a unitary ∑ 휔 ≠ ⨂ 휔 by using + and - to specify whether the element of the cor- probability space, where 푘 푘 푘 푘 is entanglement. responding index squares to +1 or -1. For example, S"+++" constructs a positive definite 3-dimensional TensorBundle. It Definition 4. The Grassmann anti-symmetric exterior 푖 ⋯푖 DiagonalForm 푣 ∈ Λ 푉 푤 1 푔 ∈ Λ푔푉 is also possible to specify an arbitrary having basis is denoted by 푖1…푖푔 푔 with its dual , 휇 휇 numerical values for the basis with degenracy D"1,1,1,0", while the Leibniz symmetric basis will be 휕 1 … 휕 푔 ∈ 퐿 푉 푖1 푖푔 푔 although the ± format has a more compact representation. 휇 휇 with 휖 1 … 휖 푔 ∈ 퐿푔푉 dual elements. Let Λ푉 = ⨁ Λ푔푉. Further development will result in more metric types. 푖1 푖푔 Declaring an additional plane at infinity is done by spec- ifying it in the string constructor with ∞ at the first index A higher-order tensor element is an oriented-multi-set 푋 ⊗휇 (i.e. Riemann sphere S"∞+++"). The hyperbolic geometry can such that 푤 = ⨂ 푤 푘 with 푋 = ((푖 , 휇 ), … , (푖 , 휇 )) 푋 푘 푖푘 1 1 푔 푔 be declared by ∅ subsequently (i.e. Minkowski spacetime and |푋| = ∑ 휇푘 is grade, order. Anti-symmetric indices S"∅+++"). Additionally, the null-basis based on the projec- 푘 Λ푋 ⊆ Λ푉 have two orientations and higher multiplicities are tive split for confromal geometric algebra would be specified degenerate, hence the only relevant multiplicity is 휇 ≡ 1. with ∞∅ initially (i.e. 5D CGA S"∞∅+++"). These two declared 푘 The Leibniz-Taylor algebra [9] is a quotient polynomial ring basis elements are interpreted in the type system. 휇+1 퐿푉 ≅ 푅[푥 , … , 푥 ]/{∏ 푥 }, so that 휖휇+1 = 0. The tangent(V,휇,휈) map can be used to specify 휇 and 휈. 1 푛 푘=1 푝푘 푘 푘 1 The Grassmann basis elements 푣푘 ∈ Λ1푉 and 푤 ∈ Λ 푉 are 2. Tensor basis equivalence classes linearly independent vector and covector elements of 푉, while the Leibniz Operator elements 휕푘 ∈ 퐿1푉 are partial tangent AbstractTensors 1 The package is intended for universal inter- derivations and 휖푘(푥) ∈ 퐿 푉 are dependent functions of the operability of the abstract TensorAlgebra type system. All tangent manifold. Higher grade elements of Λ푉 correspond TensorAlgebra{V} subtypes have type parameter V, used to to SubManifold spaces, while higher order function elements store a TensorBundle value obtained from DirectSum.jl. By of 퐿푉 become homogenous polynomials and Taylor series. itself, this package does not impose any specifications or Grassmann’s exterior algebra doesn’t invoke the properties structure on the TensorAlgebra{V} subtypes and elements, of multi-sets, as it is related to the algebra of oriented sets; aside from requiring 푉 to be a Manifold. Hence all tensor while the Leibniz symmetric algebra is that of unoriented types share a common underlying Manifold structure. The multi-sets. Combined, the mixed-symmetry algebra yield a macro @basis V declares a local basis in Julia. multi-linear propositional lattice. The formal sum of equal grade elements is an oriented Chain and with mixed grade it Definition 2. Let 푉 ∈ Vect한 be a TensorBundle with dual ′ is a MultiVector simplicial complex. Thus, various standard space 푉 and the basis elements 푤푘 ∶ 푉 → 핂, then for all 푥 ∈ 푉 , 푐 ∈ 핂 the properties (푤 + 푤 )(푥) = 푤 (푥) + 푤 (푥) and operations on the oriented multi-sets are possible including 푖 푗 푖 푗 ∪, ∩, ⊕ 푋 ⊖ 푌 = (푋 ∪ 푌 )\(푋 ∩ 푌 ) (푐푤 )(푥) = 푐푤 (푥) hold. An element of a mixed-symmetry and the index operation , 푘 푘 which is symmetric difference operation ⊻. TensorAlgebra{V} is a multilinear mapping that is formally TensorAlgebra{V} constructed by taking the tensor products of linear and mul- In order to work with a , it is necessary for some computations to be cached. This is usually done tilinear maps, (⨂ 휔푘)(푣1, … , 푣∑ 푝 ) = ∏ 휔푘(푣1, … , 푣푝 ). 푘 푘 푘 푘 푘 automatically when accessed. Staging of precompilation and Definition 3 Mixed-symmetry basis. Combining the caching is designed so that a user can smoothly transition linear basis generating elements with each other using the between very high dimensional and low dimensional algebras multilinear tensor product yields a graded (decomposable) in a single session, with varying levels of extra caching and Grassmann SubManifold ⟨푤푝 ⊗ ⋯ ⊗ 푤푝 ⟩푘, where rank 푘 is determined optimizations.