chakravala / chakravala/DirectSum.jl
Generic constructor fails for Signature "-+"
- Dominant language
- Julia
- Stars
- 50
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
The geometric product works like expected for the commonly used algebra with signature "-+++":
```
julia> using Grassmann
julia> basis"-+++"
(⟨-+++⟩, v, v₁, v₂, v₃, v₄, v₁₂, v₁₃, v₁₄, v₂₃, v₂₄, v₃₄, v₁₂₃, v₁₂₄, v₁₃₄, v₂₃₄, v₁₂₃₄)
julia> v1*v1
-1v
```
However, it does not work for algebras with more uncommon signatures like "-+" or "-++":
```
julia> basis"-+"
(⟨-,+⟩, v, v₁, v₂, v₁₂)
julia> v1*v1
ERROR: MethodError: no method matching abs(::Symbol)
Closest candidates are:
abs(::Bool) at bool.jl:91
abs(::Float16) at float.jl:520
abs(::Float32) at float.jl:521
...
Stacktrace:
[1] parityinner(::UInt64, ::UInt64, ::DiagonalForm{2,0,1,0}) at .julia/packages/Grassmann/H9Zog/src/parity.jl:96
[2] *(::Basis{⟨-,+⟩,1,0x0000000000000001}, ::Basis{⟨-,+⟩,1,0x0000000000000001}) at .julia/packages/Grassmann/H9Zog/src/algebra.jl:150
[3] top-level scope at none:0
julia> basis"-++"
(⟨-,++⟩, v, v₁, v₂, v₁₂)
julia> v1*v1
ERROR: MethodError: no method matching abs(::Symbol)
Closest candidates are:
abs(::Bool) at bool.jl:91
abs(::Float16) at float.jl:520
abs(::Float32) at float.jl:521
...
Stacktrace:
[1] parityinner(::UInt64, ::UInt64, ::DiagonalForm{2,0,2,0}) at .julia/packages/Grassmann/H9Zog/src/parity.jl:96
[2] *(::Basis{⟨-,++⟩,1,0x0000000000000001}, ::Basis{⟨-,++⟩,1,0x0000000000000001}) at .julia/packages/Grassmann/H9Zog/src/algebra.jl:150
[3] top-level scope at none:0
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.