Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Unnumbered (1.9): diagram cardinalities

Open
QAlgorithms.Papers.Independent.Intake100.P88.diagram_cardinalities

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

prove2quantum

For a positive half-integer ℓ\ellℓ, let AℓA_\ellAℓ​ be the partition diagrams, PℓP_\ellPℓ​ their planar subset, and T2ℓT_{2\ell}T2ℓ​ the planar pairings on two rows of 2ℓ2\ell2ℓ vertices. For an integer k≥1k\ge1k≥1, let BkB_kBk​ be all pairings and SkS_kSk​ the permutation diagrams. Then

∣Aℓ∣=B(2ℓ),∣Pℓ∣=∣T2ℓ∣=12ℓ+1(4ℓ2ℓ),|A_\ell|=B(2\ell),\qquad |P_\ell|=|T_{2\ell}|=\frac{1}{2\ell+1}\binom{4\ell}{2\ell},∣Aℓ​∣=B(2ℓ),∣Pℓ​∣=∣T2ℓ​∣=2ℓ+11​(2ℓ4ℓ​), ∣Bk∣=∏j=0k−1(2j+1),∣Sk∣=k!.|B_k|=\prod_{j=0}^{k-1}(2j+1),\qquad |S_k|=k!.∣Bk​∣=j=0∏k−1​(2j+1),∣Sk​∣=k!.

Here B(m)B(m)B(m) is the Bell number. At half levels the last top and bottom vertices are required to belong to the same block. The odd product is precisely the paper's convention for (2k)!!(2k)!!(2k)!!. These formulas give the diagram-space dimensions.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P88
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intake100.P88

attribute [local instance] Classical.propDecidable

open scoped BigOperators Matrix

open QAlgorithms.Papers.Independent.Information100.P65 (hookLength)

open QAlgorithms.Papers.Independent.Renew46.P30 (TensorIndex)

universe u v w x y

/-- All four cardinality formulas, PDF p.5, (1.7) and (1.9).
The paper's `(2k)!!` is the odd product, explicitly used here. -/
theorem diagram_cardinalities :
    (∀ m : ℕ, 0 < m →
      Nat.card (LevelDiagram m) = Nat.bell m ∧
      Nat.card {d : LevelDiagram m // IsPlanar d.val} = Nat.choose (2 * m) m / (m + 1) ∧
      Nat.card {d : PartitionDiagram m // IsPlanar d ∧ IsPairing d} = Nat.choose (2 * m) m / (m + 1)) ∧
    (∀ k : ℕ, 0 < k →
      Nat.card {d : PartitionDiagram k // IsPairing d} = (∏ j ∈ Finset.range k, (2 * j + 1)) ∧
      Nat.card {d : PartitionDiagram k // IsPermutation d} = Nat.factorial k) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P88

end
Source
Partition Algebras, arXiv:math/0401314v2, PDF p. 5, Unnumbered (1.9): diagram cardinalities
Read-back

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

For every natural number m>0m>0m>0, let Lm\mathcal L_mLm​ be the set of equivalence relations on two Boolean rows of q=⌊(m+1)/2⌋q=\lfloor(m+1)/2\rfloorq=⌊(m+1)/2⌋ vertices each, with the two vertices of index q−1q-1q−1 required to be related when mmm is odd. Then ∣Lm∣=Bm|\mathcal L_m|=B_m∣Lm​∣=Bm​, where BmB_mBm​ is the mmmth Bell number, and the number of planar elements of Lm\mathcal L_mLm​ is (2mm)/(m+1)\binom{2m}{m}/(m+1)(m2m​)/(m+1). Also, the number of planar equivalence relations on two rows of mmm vertices each whose classes all have exactly two vertices is (2mm)/(m+1)\binom{2m}{m}/(m+1)(m2m​)/(m+1). Here, on two rows of rrr vertices, the boundary indices are iii for (false,i)(\mathrm{false},i)(false,i) and 2r−1−i2r-1-i2r−1−i for (true,i)(\mathrm{true},i)(true,i), and “planar” means that for any four vertices in strictly increasing boundary order, relations between the first and third and between the second and fourth force the first and second to be related. Furthermore, for every natural number k>0k>0k>0, the number of equivalence relations on two rows of kkk vertices whose classes all have exactly two vertices is ∏j=0k−1(2j+1)\prod_{j=0}^{k-1}(2j+1)∏j=0k−1​(2j+1), and the number of those relations for which related vertices in the same row must be equal is k!k!k!. The displayed divisions are natural-number division, and neither universally quantified clause asserts a cardinality formula at zero.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 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