diff --git a/src/Grassmann.jl b/src/Grassmann.jl index 08f29da..947f199 100644 --- a/src/Grassmann.jl +++ b/src/Grassmann.jl @@ -415,11 +415,9 @@ export ∇, Δ, ∂, d, ↑, ↓ generate_products(:(Leibniz.Operator),:svec) -@pure function (W::Signature{N})(d::Leibniz.Derivation{T,O}) where {N,T,O} - O < 1 && (return SChain{Int,W,1}(ones(Int,grade(W)))) - C = mixedmode(W)<0 - V = diffvars(W)≠0 ? W : tangent(W,O,C ? Int(ndims(W)/2) : ndims(W)) - G,D = grade(V),diffvars(V)==1 +@pure function (V::Signature{N})(d::Leibniz.Derivation{T,O}) where {N,T,O} + (O<1||diffvars(V)==0) && (return SChain{Int,V,1}(ones(Int,ndims(V)))) + G,D,C = grade(V),diffvars(V)==1,mixedmode(V)<0 G2 = (C ? Int(G/2) : G)-1 ∇ = sum([getbasis(V,1<<(D ? G : k+G))*getbasis(V,1<