1414
1515export basis, grade, order, options, metric, polymode, dyadmode, diffmode, diffvars
1616export valuetype, value, hasinf, hasorigin, isorigin, norm, indices, tangent, isbasis, ≅
17+ export antigrade, antireverse, antiinvolute, anticlifford
1718
1819(M:: Signature )(b:: Int... ) = Submanifold {M} (b)
1920(M:: DiagonalForm )(b:: Int... ) = Submanifold {M} (b)
9697grade (t,G:: Int ) = grade (t,val (G))
9798grade (t:: TensorGraded{V,G} ,g:: Val{G} ) where {V,G} = t
9899grade (t:: TensorGraded{V,L} ,g:: Val{G} ) where {V,G,L} = Zero (V)
100+ antigrade (t,G:: Int ) = antigrade (t,val (G))
101+ antigrade (t:: TensorAlgebra{V} ,:: Val{G} ) where {V,G} = grade (t,val (grade (V)- G))
99102
100103@pure hasinf (:: T ) where T<: TensorBundle{N,M} where N where M = _hasinf (M)
101104@pure hasinf (:: Submanifold{M,N,S} where N) where {M,S} = hasinf (M) && isodd (S)
@@ -154,6 +157,7 @@ export involute, clifford
154157
155158@pure grade_basis (v,:: Submanifold{V,G,B} where G) where {V,B} = grade_basis (V,B)
156159@pure grade (v,:: Submanifold{V,G,B} where G) where {V,B} = grade (V,B)
160+ @pure antigrade (v,:: Submanifold{V,G,B} where G) where {V,B} = antigrade (V,B)
157161
158162@doc """
159163 ~(ω::TensorAlgebra)
@@ -180,16 +184,39 @@ Involute of an element: ~ω = (-1)^grade(ω)*ω
180184@doc """
181185 clifford(ω::TensorAlgebra)
182186
183- Clifford conjugate of an element: clifford(ω) = involute(conj (ω))
187+ Clifford conjugate of an element: clifford(ω) = involute(reverse (ω))
184188""" clifford
185189
190+ """
191+ antireverse(ω::TensorAlgebra)
192+
193+ Anti-reverse of an element: ~ω = (-1)^(antigrade(ω)*(antigrade(ω)-1)/2)*ω
194+ """ antireverse
195+
196+ @doc """
197+ antiinvolute(ω::TensorAlgebra)
198+
199+ Anti-involute of an element: ~ω = (-1)^antigrade(ω)*ω
200+ """ antiinvolute
201+
202+ @doc """
203+ anticlifford(ω::TensorAlgebra)
204+
205+ Anti-clifford conjugate of an element: anticlifford(ω) = antiinvolute(antireverse(ω))
206+ """ anticlifford
207+
186208for r ∈ (:reverse ,:involute ,:(Base. conj),:clifford )
187209 p = Symbol (:parity ,r== :(Base. conj) ? :conj : r)
210+ ar = Symbol (:anti ,r)
188211 @eval begin
189212 @pure function $r (b:: Submanifold{V,G,B} ) where {V,G,B}
190213 $ p (grade (V,B)) ? Single {V} (- value (b),b) : b
191214 end
192215 $ r (b:: Single ) = value (b) ≠ 0 ? Single (value (b),$ r (basis (b))) : Zero (Manifold (b))
216+ @pure function $ar (b:: Submanifold{V,G,B} ) where {V,G,B}
217+ $ p (antigrade (V,B)) ? Single {V} (- value (b),b) : b
218+ end
219+ $ ar (b:: Single ) = value (b) ≠ 0 ? Single (value (b),$ ar (basis (b))) : Zero (Manifold (b))
193220 end
194221end
195222
0 commit comments