Method error when trying the null-basis conformal split example
karlwessel opened this issue · comments
I am testing Grassmann.jl with conformal projective geometry, but the geometric product seems to be broken for those spaces.
Easiest way to reproduce is with your example for the null-basis conformal split in README.md. That gives me:
julia> using Grassmann; @basis S"∞∅++"
[ Info: Recompiling stale cache file /home/karl/.julia/compiled/v1.1/Grassmann/i5fGo.ji for Grassmann [4df31cd9-4c27-5bea-88d0-e6a7146666d8]
(⟨∞∅++⟩, v, v∞, v∅, v₁, v₂, v∞∅, v∞₁, v∞₂, v∅₁, v∅₂, v₁₂, v∞∅₁, v∞∅₂, v∞₁₂, v∅₁₂, v∞∅₁₂)
julia> v∞^2, v∅^2, v1^2, v2^2
ERROR: MethodError: no method matching conformal(::Signature{4,3,0x0000000000000002,0}, ::UInt64, ::UInt64)
Closest candidates are:
conformal(::Any, ::Any, ::W<:(Signature{n,m,s,Diff} where Diff)) where {n, m, s, W<:(Signature{n,m,s,Diff} where Diff)} at .julia/packages/Grassmann/wWv7E/src/parity.jl:164
conformal(::Any, ::Any, ::W<:(DiagonalForm{n,m,s,Diff} where Diff)) where {n, m, s, W<:(DiagonalForm{n,m,s,Diff} where Diff)} at .julia/packages/Grassmann/wWv7E/src/parity.jl:164
Stacktrace:
[1] *(::Basis{⟨∞∅++⟩,1,0x0000000000000004}, ::Basis{⟨∞∅++⟩,1,0x0000000000000004}) at .julia/packages/Grassmann/wWv7E/src/algebra.jl:148
[2] ^(::Basis{⟨∞∅++⟩,1,0x0000000000000004}, ::Int64) at .julia/packages/Grassmann/wWv7E/src/algebra.jl:919
[3] macro expansion at ./none:0 [inlined]
[4] literal_pow(::typeof(^), ::Basis{⟨∞∅++⟩,1,0x0000000000000004}, ::Val{2}) at ./none:0
[5] top-level scope at none:0
It worked in 0.1.4, but doesn't in 0.1.5
Ooops, that's because I changed the order of the input arguments when I created the cache.
Since you helped find so many bugs already, I decided to tag release v0.1.6 on this commit.
That fixed one problem, but there still seems to be another since the whole example doesn't run yet:
using Grassmann; @basis S"∞∅++"
(⟨∞∅++⟩, v, v∞, v∅, v₁, v₂, v∞∅, v∞₁, v∞₂, v∅₁, v∅₂, v₁₂, v∞∅₁, v∞∅₂, v∞₁₂, v∅₁₂, v∞∅₁₂)
julia> v∞^2, v∅^2, v1^2, v2^2
(0v, 0v, v, v)
julia> v∞ ⋅ v∅
-1v
julia> v∞∅^2
v
julia> v∞∅ * v∞, v∞∅ * v∅
(-1v∞, v∅)
julia> v∞ * v∅, v∅ * v∞
ERROR: UndefVarError: hio not defined
Stacktrace:
[1] *(::Basis{⟨∞∅++⟩,1,0x0000000000000001}, ::Basis{⟨∞∅++⟩,1,0x0000000000000002}) at .julia/packages/Grassmann/uivDq/src/algebra.jl:151
[2] top-level scope at none:0
And similar, but in another line:
julia> a=v∞ + v∅ + v1
1v∞ + 1v∅ + 1v₁ + 0v₂
julia> a*a
ERROR: UndefVarError: hio not defined
Stacktrace:
[1] geomaddmulti! at .julia/packages/Grassmann/uivDq/src/algebra.jl:61 [inlined]
[2] *(::MBlade{Int64,⟨∞∅++⟩,1,4}, ::MBlade{Int64,⟨∞∅++⟩,1,4}) at .julia/packages/Grassmann/uivDq/src/algebra.jl:672
[3] top-level scope at none:0
That problem is now also resolved.