@@ -230,7 +230,7 @@ function merge(f₁::FusionTree{I,N₁}, f₂::FusionTree{I,N₂},
230230 return insertat (f, N₁ + 1 , f₂)
231231end
232232function merge (f₁:: FusionTree{I,0} , f₂:: FusionTree{I,0} , c:: I , μ) where {I}
233- c == one (I ) ||
233+ isone (c ) ||
234234 throw (SectorMismatch (" cannot fuse sectors $(f₁. coupled) and $(f₂. coupled) to $c " ))
235235 return fusiontreedict (I)(f₁ => Fsymbol (c, c, c, c, c, c)[1 , 1 , 1 , 1 ])
236236end
@@ -349,7 +349,7 @@ function foldright(f₁::FusionTree{I,N₁}, f₂::FusionTree{I,N₂}) where {I<
349349 for μ in 1 : Nsymbol (c1, c2, c)
350350 fc = FusionTree ((c1, c2), c, (! isduala, false ), (), (μ,))
351351 for (fl′, coeff1) in insertat (fc, 2 , f₁)
352- N₁ > 1 && fl′. innerlines[1 ] != one (I ) && continue
352+ N₁ > 1 && ! isone ( fl′. innerlines[1 ]) && continue
353353 coupled = fl′. coupled
354354 uncoupled = Base. tail (Base. tail (fl′. uncoupled))
355355 isdual = Base. tail (Base. tail (fl′. isdual))
@@ -694,7 +694,7 @@ corresponding coefficients.
694694function elementary_trace (f:: FusionTree{I,N} , i) where {I<: Sector ,N}
695695 (N > 1 && 1 <= i <= N) ||
696696 throw (ArgumentError (" Cannot trace outputs i=$i and i+1 out of only $N outputs" ))
697- i < N || f. coupled == one (I ) ||
697+ i < N || isone ( f. coupled) ||
698698 throw (ArgumentError (" Cannot trace outputs i=$N and 1 of fusion tree that couples to non-trivial sector" ))
699699
700700 T = sectorscalartype (I)
@@ -808,15 +808,15 @@ function artin_braid(f::FusionTree{I,N}, i; inv::Bool=false) where {I<:Sector,N}
808808 inner = f. innerlines
809809 inner_extended = (uncoupled[1 ], inner... , coupled′)
810810 vertices = f. vertices
811- u = one (I)
812811 oneT = one (sectorscalartype (I))
813812
814- if u in (uncoupled[i], uncoupled[i + 1 ])
813+ if isone (uncoupled[i]) || isone ( uncoupled[i + 1 ])
815814 # braiding with trivial sector: simple and always possible
816815 inner′ = inner
817816 vertices′ = vertices
818817 if i > 1 # we also need to alter innerlines and vertices
819- inner′ = TupleTools. setindex (inner, inner_extended[a == u ? (i + 1 ) : (i - 1 )],
818+ inner′ = TupleTools. setindex (inner,
819+ inner_extended[isone (a) ? (i + 1 ) : (i - 1 )],
820820 i - 1 )
821821 vertices′ = TupleTools. setindex (vertices′, vertices[i], i - 1 )
822822 vertices′ = TupleTools. setindex (vertices′, vertices[i - 1 ], i)
0 commit comments