Skip to content

Commit

Permalink
fixed #51 fixed #68 fixed #69
Browse files Browse the repository at this point in the history
  • Loading branch information
chakravala committed May 27, 2020
1 parent 2300b87 commit 4b45a9f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
julia = "1"
Leibniz = "0.0.5"
DirectSum = "0.5.8"
AbstractTensors = "0.4.3"
AbstractTensors = "0.4.8"
ComputedFieldTypes = "0.1"
StaticArrays = "0"
Requires = "1"
Expand Down
2 changes: 1 addition & 1 deletion paper/paper.tex
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ \section{Geometric algebraic product structure}
Let $v_\pm^2 = \pm1$ be a basis with $v_\infty = v_++v_-$ and $v_\emptyset = (v_--v_+)/2$
An embedding space $\mb R^{p+1,q+1}$ carrying the action from the group $O(p+1,q+1)$ then has
$v_\infty^2 =0$, $v_\emptyset^2 =0$,
$v_\infty \cdot v_\emptyset = 1$, and $v_{\infty\emptyset}^2 = 1$ with
$v_\infty \cdot v_\emptyset = -1$, and $v_{\infty\emptyset}^2 = 1$ with
Minkowski plane $v_{\infty\emptyset}$ having the Hestenes-Dirac-Clifford product properties
\begin{align*}
v_{\infty\emptyset}\ominus v_\infty &= -v_\infty, & v_{\infty\emptyset}\ominus v_\emptyset &= v_\emptyset, \\
Expand Down
8 changes: 6 additions & 2 deletions src/algebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ Exterior product as defined by the anti-symmetric quotient Λ≡⊗/~

export , ,

@inline (t) = t

@pure function (a::SubManifold{V},b::SubManifold{V}) where V
ba,bb = bits(a),bits(b)
A,B,Q,Z = symmetricmask(V,ba,bb)
Expand All @@ -378,7 +380,7 @@ end
#∧(a::SubManifold{V},b::MultiGrade{V}) where V = MultiGrade{V}(b.v,a*basis(b))
#∧(a::MultiGrade{V},b::MultiGrade{V}) where V = MultiGrade{V}(a.v*b.v,basis(a)*basis(b))

(a::TensorAlgebra{V},b::TensorAlgebra{V}) where V = ab
(a::A,b::B) where {A<:TensorAlgebra,B<:TensorAlgebra} = ab

## regressive product: (L = grade(a) + grade(b); (-1)^(L*(L-ndims(V)))*⋆(⋆(a)∧⋆(b)))

Expand Down Expand Up @@ -804,14 +806,16 @@ for (op,eop) ∈ ((:+,:(+=)),(:-,:(-=)))
end
end

const FieldsBig = (Fields...,BigFloat,BigInt,Complex{BigFloat},Complex{BigInt},Rational{BigInt})

function generate_sums(Field=Field,VEC=:mvec,MUL=:*,ADD=:+,SUB=:-,CONJ=:conj,PAR=false)
if Field == Grassmann.Field
generate_mutators(:(MArray{Tuple{M},T,1,M}),Number,Expr,SUB,MUL)
elseif Field (SymField,:(SymPy.Sym))
generate_mutators(:(SizedArray{Tuple{M},T,1,1}),Field,set_val,SUB,MUL)
end
PAR && (DirectSum.extend_field(eval(Field)); global parsym = (parsym...,eval(Field)))
TF = Field Fields ? :Any : :T
TF = Field FieldsBig ? :Any : :T
EF = Field Any ? Field : ExprField
Field Fields && @eval begin
Base.:*(a::F,b::SubManifold{V}) where {F<:$EF,V} = Simplex{V}(a,b)
Expand Down
2 changes: 1 addition & 1 deletion src/products.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ end
insert_t(x) = Expr(:block,:(t=promote_type(valuetype(a),valuetype(b))),x)

function generate_products(Field=Field,VEC=:mvec,MUL=:*,ADD=:+,SUB=:-,CONJ=:conj,PAR=false)
TF = Field Fields ? :Any : :T
TF = Field FieldsBig ? :Any : :T
EF = Field Any ? Field : ExprField
generate_sums(Field,VEC,MUL,ADD,SUB,CONJ,PAR)
@eval begin
Expand Down

0 comments on commit 4b45a9f

Please sign in to comment.