Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The specified contraction construction spans third-order linear layers

Open
QAlgorithms.Papers.Independent.Intakenext100.P94.third_order_contraction_construction

by Gohan · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let n≥6n\ge6n≥6 and consider real linear maps on full order-three tensors, equivariant for simultaneous inverse permutation of all indices. Form contractions by identifying any subset of the three input indices into blocks, retaining any subset of those blocks as free indices, and summing each remaining block once. Blocks are canonically named by their least input slot. There are respectively 1,6,10,51,6,10,51,6,10,5 contractions of ranks 3,2,1,03,2,1,03,2,1,0.

For generic output entries, inject the retained indices into the three output slots in every possible way. Add the analogous terms on each of the three equal-pair output supports, using two output slots, and on the all-equal support, using one slot. These are additions to the generic formula, so they also operate on intersections of the supports. If Kp(t,u)K_p(t,u)Kp​(t,u) is the resulting explicitly defined equality-constraint kernel, the weighted map is

(ΦwF)(t)=∑pwp∑uKp(t,u)F(u).(\Phi_w F)(t)=\sum_p w_p\sum_u K_p(t,u)F(u).(Φw​F)(t)=p∑​wp​u∑​Kp​(t,u)F(u).

There are 777777 generic, 373737 terms for each of the three pair supports, and 151515 all-diagonal terms. Every equivariant linear map has a unique such weight vector:

L is equivariant⟺∃!w∈R203, ∀F, L(F)=Φw(F),77+3⋅37+15=203.L\text{ is equivariant}\quad\Longleftrightarrow\quad\exists!w\in\mathbb R^{203},\ \forall F,\ L(F)=\Phi_w(F),\qquad77+3\cdot37+15=203.L is equivariant⟺∃!w∈R203, ∀F, L(F)=Φw​(F),77+3⋅37+15=203.

This states the paper’s contraction construction itself as a complete linear parametrization.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P94
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intakenext100.P94

open scoped BigOperators

attribute [local instance] Classical.propDecidable

/-- Appendix C §10.2, source PDF pp.15–16: the specified contraction algorithm
spans the equivariant linear layers and has 203 independent weights for n≥6.
Corrects “three” all-diagonal scalar contractions to one (p.16, item 4c) and
uses the stated two-index sum in item 3a. No closed formula is invented. -/
theorem third_order_contraction_construction (n : ℕ) (hn : 6 ≤ n) :
    (∀ r : Fin 4,
      Fintype.card {p : Recipe // p.val.2.card = r.val} = (![5,10,6,1] : Fin 4 → ℕ) r) ∧
    Fintype.card (PlacedRecipe 3) = 77 ∧
    Fintype.card (PlacedRecipe 2) = 37 ∧
    Fintype.card (PlacedRecipe 1) = 15 ∧
    Fintype.card ThirdIndex = 203 ∧
    (∀ L : Tensor n 3 →ₗ[ℝ] Tensor n 3,
      L ∈ equivariantLinearMaps (permutationTensorAction (n := n) (k := 3)) permutationTensorAction ↔
        ∃! w : ThirdIndex → ℝ, ∀ F, L F = thirdFormula w F) := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P94

end
Source
The general theory of permutation equivarant neural networks and higher order graph variational encoders, arXiv:2004.03990v1, PDF p. 16, §10.2 (Appendix C): contraction construction spans the third order layer
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

For every natural number nnn satisfying 6≤n6\le n6≤n, write [r]={0,…,r−1}[r]=\{0,\ldots,r-1\}[r]={0,…,r−1} and let Tn\mathcal T_nTn​ be the real vector space of all functions [n]3→R[n]^3\to\mathbb R[n]3→R. A recipe is a pair (q,R)(q,R)(q,R), where q:[3]→[3]q:[3]\to[3]q:[3]→[3] satisfies q(a)≤aq(a)\le aq(a)≤a and q(q(a))=q(a)q(q(a))=q(a)q(q(a))=q(a) for every aaa, and R⊆[3]R\subseteq[3]R⊆[3] consists of fixed points of qqq; a placed recipe with rrr positions additionally specifies an injection e:R↪[r]e:R\hookrightarrow[r]e:R↪[r]. The theorem asserts jointly that, for each r∈[4]r\in[4]r∈[4], the number of recipes with ∣R∣=r|R|=r∣R∣=r is respectively 5,10,6,15,10,6,15,10,6,1 for r=0,1,2,3r=0,1,2,3r=0,1,2,3; the numbers of placed recipes with three, two, and one positions are respectively 77,37,1577,37,1577,37,15; and the disjoint union III of the placed recipes with three positions, the pairs of an element of [3][3][3] and a placed recipe with two positions, and the placed recipes with one position has cardinality 203203203. It further asserts that every real linear map L:Tn→TnL:\mathcal T_n\to\mathcal T_nL:Tn​→Tn​ satisfies the following equivalence: LLL commutes with every permutation action AsF(t)=F(s−1∘t)A_sF(t)=F(s^{-1}\circ t)As​F(t)=F(s−1∘t), meaning L(AsF)=As(LF)L(A_sF)=A_s(LF)L(As​F)=As​(LF) for every permutation sss of [n][n][n] and every tensor FFF, if and only if there exists exactly one weight function w:I→Rw:I\to\mathbb Rw:I→R such that, for every FFF and t:[3]→[n]t:[3]\to[n]t:[3]→[n],

(LF)(t)=∑P∈Iw(P)∑u:[3]→[n]KP(t,u)F(u).(LF)(t)=\sum_{P\in I}w(P)\sum_{u:[3]\to[n]}K_P(t,u)F(u).(LF)(t)=P∈I∑​w(P)u:[3]→[n]∑​KP​(t,u)F(u).

Here, for a placed recipe P=(q,R,e)P=(q,R,e)P=(q,R,e), CP(v,u)C_P(v,u)CP​(v,u) is 111 precisely when q(a)=q(b)⇒u(a)=u(b)q(a)=q(b)\Rightarrow u(a)=u(b)q(a)=q(b)⇒u(a)=u(b) for all a,b∈[3]a,b\in[3]a,b∈[3] and u(a)=v(e(a))u(a)=v(e(a))u(a)=v(e(a)) for every a∈Ra\in Ra∈R, and is 000 otherwise, with no inequality required between coordinates belonging to different values of qqq. For an index in the three-position component, KP(t,u)=CP(t,u)K_P(t,u)=C_P(t,u)KP​(t,u)=CP​(t,u); for an index (a,P)(a,P)(a,P) in the two-position component, K(a,P)(t,u)K_{(a,P)}(t,u)K(a,P)​(t,u) equals CP((t(a+1),t(a)),u)C_P((t(a+1),t(a)),u)CP​((t(a+1),t(a)),u) when t(a+1)=t(a+2)t(a+1)=t(a+2)t(a+1)=t(a+2), and equals 000 otherwise; for an index in the one-position component, KP(t,u)K_P(t,u)KP​(t,u) equals CP((t(0)),u)C_P((t(0)),u)CP​((t(0)),u) when all coordinates of ttt are equal, and equals 000 otherwise. The additions a+1,a+2a+1,a+2a+1,a+2 are modulo 333.

Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me