Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Implementation notes

natto computes the operators of Wen, 2026, but not always by the paper’s formulas taken literally. This page collects the rewritings it uses instead. Each leaves the computed quantity unchanged and only makes it cheaper. Equations of the paper are written (W15) for Eq. 15 of Wen, 2026.

Notation

nn is the rank of the Cartesian tensor and ℓ\ell the weight of an ICT. The reduction is built from the rank-lowering tensors F(p)F^{(p)} (W2)–(W5) and the natural projector E(ℓ)\mathsf E^{(\ell)} (W7), which give the mappings, their Gram matrix and their duals,

G(p)=E(ℓ)F(p),gpq=12ℓ+1⟨G(p),G(q)⟩,G~(p)=∑q(g−1)pq G(q),G^{(p)} = \mathsf E^{(\ell)} F^{(p)}, \qquad g_{pq} = \frac{1}{2\ell+1} \langle G^{(p)}, G^{(q)} \rangle, \qquad \widetilde G^{(p)} = \sum_q (g^{-1})_{pq}\, G^{(q)} ,

(W13), (W15) and (W16), where ⟨⋅,⋅⟩\langle \cdot, \cdot \rangle contracts every index. The composed operator S(p)=G(p)⋅G~(p)S^{(p)} = G^{(p)} \cdot \widetilde G^{(p)} contracts the ICT indices of a mapping and its dual.

The natural projector as a sum over matchings

Each term of (W7) is one perfect matching mm of the projector’s 2ℓ2\ell indices, and its coefficient depends only on the number t(m)t(m) of pairs within each index group:

E(ℓ)=∑mct(m)Nt(m) Dm,ct=−(ℓ−2t+2)(ℓ−2t+1)2t (2ℓ−2t+1) ct−1,c0=1,\mathsf E^{(\ell)} = \sum_{m} \frac{c_{t(m)}}{N_{t(m)}}\, D_m, \qquad c_t = -\frac{(\ell-2t+2)(\ell-2t+1)}{2t\,(2\ell-2t+1)}\, c_{t-1}, \quad c_0 = 1,

with DmD_m the product of the matching’s deltas and NtN_t the number of matchings with that tt. The recursion is (W S27). The projector has (2ℓ−1)!!(2\ell-1)!! terms, so a product of two projectors has [(2ℓ−1)!!]2[(2\ell-1)!!]^2 term pairs, about 108 at ℓ=6\ell = 6. The rewritings below avoid forming such products.

One projector suffices

The projector is symmetric and idempotent, so one of the two projectors in an inner product of mappings can be left out:

⟨G(p),G(q)⟩=⟨F(p),G(q)⟩,gpq=12ℓ+1⟨F(p),G(q)⟩.\langle G^{(p)}, G^{(q)} \rangle = \langle F^{(p)}, G^{(q)} \rangle, \qquad g_{pq} = \frac{1}{2\ell+1} \langle F^{(p)}, G^{(q)} \rangle .

The same holds for the composed operator, whose tensor indices stay free:

SAB(p)=∑q(g−1)pq FσA(p) GσB(q).S^{(p)}_{\boldsymbol A \boldsymbol B} = \sum_q (g^{-1})_{pq}\, F^{(p)}_{\boldsymbol\sigma \boldsymbol A}\, G^{(q)}_{\boldsymbol\sigma \boldsymbol B} .

Both cost (2ℓ−1)!!(2\ell-1)!! products instead of [(2ℓ−1)!!]2[(2\ell-1)!!]^2.

Mappings as vectors

Every mapping of a weight, whether a candidate, a dual or a symmetry-adapted mapping, is the projector applied to a rational combination of the same rank-lowering tensors F0,…,FN−1F_0, \dots, F_{N-1}, so it is stored as a coefficient vector c∈QN\boldsymbol c \in \mathbb Q^N. All inner products then come from one table, computed once per weight and rank:

Lij=⟨Fi,E Fj⟩,[⟨⋅,⋅⟩]=C1 L C2T,L_{ij} = \langle F_i, \mathsf E\, F_j \rangle, \qquad \bigl[\langle \cdot, \cdot \rangle\bigr] = C_1\, L\, C_2^{\mathsf T},

where the rows of C1C_1 and C2C_2 are the coefficient vectors of two lists of mappings. The Gram matrix of any mappings, the adapted Gram matrix gQ=MgMTg^Q = M g M^{\mathsf T}, and the orthonormal mappings G^=g−1/2G\widehat G = g^{-1/2} G (W21) are all matrix algebra on these vectors.

Permuted mappings

Permuting the tensor indices of a rank-lowering tensor gives another rank-lowering tensor, up to the sign of reordering its Levi-Civita symbol:

P Fi=si Fπ(i),si=±1.P\, F_i = s_i\, F_{\pi(i)}, \qquad s_i = \pm 1 .

So a permuted mapping is another coefficient vector, and the mixing matrix of a symmetry generator (W30),

M=g−1O,Opq=12ℓ+1⟨G(p),P G(q)⟩,M = g^{-1} O, \qquad O_{pq} = \frac{1}{2\ell+1} \langle G^{(p)}, P\, G^{(q)} \rangle ,

is read from the table (5) with no contraction.

Contracting products of deltas and Levi-Civita symbols

Every operator is a sum of products of Kronecker deltas and Levi-Civita symbols, so contracting operators reduces to contracting such products term by term, with no arrays. Following the repeated indices, a chain of deltas collapses to one delta, a closed chain is a factor of 3, and a Levi-Civita symbol with a repeated index vanishes:

δai1 δi1i2⋯δikb=δab,δi1i2⋯δiki1=3,εiic=0.\delta_{a i_1}\, \delta_{i_1 i_2} \cdots \delta_{i_k b} = \delta_{ab}, \qquad \delta_{i_1 i_2} \cdots \delta_{i_k i_1} = 3, \qquad \varepsilon_{i i c} = 0 .

Two Levi-Civita symbols joined by a repeated index are expanded into deltas by their determinant identity, and the chains are followed again:

εabc εdef=∑π∈S3sgn⁡(π) δaπ(d) δbπ(e) δcπ(f).\varepsilon_{abc}\, \varepsilon_{def} = \sum_{\pi \in S_3} \operatorname{sgn}(\pi)\, \delta_{a\pi(d)}\, \delta_{b\pi(e)}\, \delta_{c\pi(f)} .

Two symbols with no index in common are kept as they are, since expanding them would turn one product into six.

Full contraction is cycle counting

Every entry of the table is a full contraction, a number rather than an operator. A product of deltas in which every index occurs twice is a union of cycles, each a factor of 3, and with one Levi-Civita symbol on each side the paths between the two symbols give the sign:

∏kδukvk=3cyc⁡,εi1i2i3 εj1j2j3∏kδukvk=6 sgn⁡(π) 3cyc⁡,\prod_k \delta_{u_k v_k} = 3^{\operatorname{cyc}}, \qquad \varepsilon_{i_1 i_2 i_3}\, \varepsilon_{j_1 j_2 j_3} \prod_k \delta_{u_k v_k} = 6\, \operatorname{sgn}(\pi)\, 3^{\operatorname{cyc}} ,

where π\pi is the bijection the delta paths make between the slots of the two symbols, and the product is zero if a path joins two slots of the same symbol. The table is filled by counting cycles, without forming any terms.

Selecting independent mappings

The number of independent mappings of weight ℓ\ell in a rank-nn tensor, Table II of Wen, 2026, follows from j⊗1=(j−1)⊕j⊕(j+1)j \otimes 1 = (j-1) \oplus j \oplus (j+1):

N(n,ℓ)=N(n−1,ℓ+1)+[ℓ≥1] (N(n−1,ℓ−1)+N(n−1,ℓ)),N(0,ℓ)=δℓ0.N(n, \ell) = N(n-1, \ell+1) + [\ell \ge 1]\, \bigl(N(n-1, \ell-1) + N(n-1, \ell)\bigr), \qquad N(0, \ell) = \delta_{\ell 0} .

The candidates are scanned in order, and the scan stops once N(n,ℓ)N(n, \ell) are kept. A candidate with Gram entries bb against the kept mappings and dd with itself is kept exactly when

d−bTg−1b≠0,d - b^{\mathsf T} g^{-1} b \neq 0 ,

with g−1g^{-1} extended by the bordered inverse as candidates are kept. The decision is exact, where the paper’s Algorithm 1 decides by a pivoted QR against a tolerance.

References
  1. Wen, M. (2026). Reusable Operators for Irreducible Cartesian Tensor Decomposition and Coupling. arXiv Preprint arXiv:2609.05971. 10.48550/arXiv.2609.05971