@@ -134,8 +134,9 @@ Always returns `false` for spaces where `V == conj(V)`, i.e. vector spaces over
134134
135135Return the corresponding vector space of type `S` that represents the trivial
136136one-dimensional space, i.e. the space that is isomorphic to the corresponding field.
137- For vector spaces of type `GradedSpace{I}` where `Sector` `I` has a semi-simple unit
138- structure, this returns a multi-dimensional space corresponding to all unit sectors in `I`.
137+ For vector spaces where `I = sectortype(S)` has a semi-simple unit structure
138+ (`UnitStyle(I) == GenericUnit()`), this returns a multi-dimensional space corresponding to all unit sectors:
139+ `dim(unitspace(V), s) == 1` for all `s in allunits(I)`.
139140
140141!!! note
141142 `unitspace(V)`is different from `one(V)`. The latter returns the empty product space
@@ -169,7 +170,7 @@ function leftunitspace(V::ElementarySpace)
169170 if UnitStyle (I) isa SimpleUnit
170171 return unitspace (typeof (V))
171172 else
172- ! isempty (sectors (V)) || throw (ArgumentError (" Cannot determine type of empty space" ))
173+ ! isempty (sectors (V)) || throw (ArgumentError (" Cannot determine the left unit of an empty space" ))
173174 _allequal (leftunit, sectors (V)) ||
174175 throw (ArgumentError (" sectors of $V do not have the same left unit" ))
175176
@@ -191,7 +192,7 @@ function rightunitspace(V::ElementarySpace)
191192 if UnitStyle (I) isa SimpleUnit
192193 return unitspace (typeof (V))
193194 else
194- ! isempty (sectors (V)) || throw (ArgumentError (" Cannot determine type of empty space" ))
195+ ! isempty (sectors (V)) || throw (ArgumentError (" Cannot determine the right unit of an empty space" ))
195196 _allequal (rightunit, sectors (V)) ||
196197 throw (ArgumentError (" sectors of $V do not have the same right unit" ))
197198
0 commit comments