@@ -168,23 +168,19 @@ function fuse(V₁::GradedSpace{I}, V₂::GradedSpace{I}) where {I<:Sector}
168168end
169169
170170function infimum (V₁:: GradedSpace{I} , V₂:: GradedSpace{I} ) where {I<: Sector }
171- if V₁. dual == V₂. dual
172- typeof (V₁)(c => min (dim (V₁, c), dim (V₂, c))
173- for c in
174- union (sectors (V₁), sectors (V₂)), dual in V₁. dual)
175- else
171+ Visdual = isdual (V₁)
172+ Visdual == isdual (V₂) ||
176173 throw (SpaceMismatch (" Infimum of space and dual space does not exist" ))
177- end
174+ return typeof (V₁)((Visdual ? dual (c) : c) => min (dim (V₁, c), dim (V₂, c))
175+ for c in intersect (sectors (V₁), sectors (V₂)); dual= Visdual)
178176end
179177
180178function supremum (V₁:: GradedSpace{I} , V₂:: GradedSpace{I} ) where {I<: Sector }
181- if V₁. dual == V₂. dual
182- typeof (V₁)(c => max (dim (V₁, c), dim (V₂, c))
183- for c in
184- union (sectors (V₁), sectors (V₂)), dual in V₁. dual)
185- else
179+ Visdual = isdual (V₁)
180+ Visdual == isdual (V₂) ||
186181 throw (SpaceMismatch (" Supremum of space and dual space does not exist" ))
187- end
182+ return typeof (V₁)((Visdual ? dual (c) : c) => max (dim (V₁, c), dim (V₂, c))
183+ for c in union (sectors (V₁), sectors (V₂)); dual= Visdual)
188184end
189185
190186function Base. show (io:: IO , V:: GradedSpace{I} ) where {I<: Sector }
0 commit comments