Skip to content

Commit 8d289c6

Browse files
committed
Retain dual in ominus
1 parent 203a8cb commit 8d289c6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/spaces/gradedspace.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,10 @@ function ⊕(V₁::GradedSpace{I}, V₂::GradedSpace{I}) where {I<:Sector}
150150
end
151151

152152
function (V::GradedSpace{I}, W::GradedSpace{I}) where {I<:Sector}
153-
V W && isdual(V) == isdual(W) ||
153+
dual = isdual(V)
154+
V W && dual == isdual(W) ||
154155
throw(SpaceMismatch("$(W) is not a subspace of $(V)"))
155-
return typeof(V)(c => dim(V, c) - dim(W, c) for c in sectors(V))
156+
return typeof(V)(c => dim(V, c) - dim(W, c) for c in sectors(V); dual)
156157
end
157158

158159
function flip(V::GradedSpace{I}) where {I<:Sector}

0 commit comments

Comments
 (0)