Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions of TypeDensity.Reciprocity.Patterns

Definition
TypeDensity_Reciprocity_Patterns

by asving · Oct 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

type-density

Pattern sums, crossing factorization and unitarity

Coefficient-level identities connecting the recursion laws of single-boundary states S(a;n) and crossing states T(a,b;c,h) to the series calculus of the reciprocity proof: pattern sums and their independence of the ambient dimension, reciprocal and Adams substitution in laws, closed forms of the weight rational functions, the Euler transform as a pattern sum, the crossing factorization of the contact series U_{a,b}, and its unitarity U U† ≡ 1 by induction.

Main results

  • coeff_eulerSer: [xⁿ] eulerSer ε a = patternSum ε a n n.
  • coeff_recipCoef_lawCoef, lawCoef_globalLaw_false, lawCoef_globalLaw_true: coefficients of the laws in Coef.
  • crossingQ_eq_qmul_qplus_qdiag_qminus: U_{a,b} = U_{a+b,b}⁺ J(P_{a+b}) U_{a,a+b}⁻.
  • qcongr_crossingQ_mul_qdagger: unitarity of U_{a,b} through degree 2M + 1.
  • coeff_qact_crossingQ_gaussPhi_eulerSer, lawCoef_single_self_term: the two sides of the single-boundary operator equation.

Implementation notes

The recursion is unfolded with exitLaw and state_law_unfold from TypeDensity.Formula.StateCombinatorics, so that the reciprocity proof only depends on the combinatorics of the formula.

Provenance: Thm_SurfaceBlowupV2_recip_{pattern_extend, pattern_pad, stateLaw_globalLaw_wf, monic_projective_coef, subst_inv_var, lawCoef_recip_subst, subst_pow_var, lawCoef_descend, otherChildren_coef, crossing_term_coef, crossing_exit_regroup, globalLaw_coef, single_term_coef, weights_rational, closing_scalar, countSum_eq, crossing_exchange, crossingQ_basic, euler_product_trunc, euler_coeff_product, euler_coeff_pattern, crossing_factorization_coeff, crossing_factorization, contact_induction, eulerSer_coeff_one, cluster_base, single_operator_coeff, single_self_term_value}.

Definition code
-- Generated by the TypeDensity exporter from TypeDensity/Reciprocity/Patterns.lean (namespace TypeDensity); do not edit.
import Definitions.Def_TypeDensity_Basic
import Definitions.Def_TypeDensity_Formula_LawAlgebra
import Definitions.Def_TypeDensity_Formula_StateCombinatorics
import Definitions.Def_TypeDensity_Reciprocity_Defs
import Definitions.Def_TypeDensity_Reciprocity_Quantum
import Mathlib.FieldTheory.RatFunc.Basic
import Mathlib.MeasureTheory.Measure.Haar.Unique
import Mathlib.NumberTheory.ArithmeticFunction.Moebius
import Mathlib.NumberTheory.Padics.PadicIntegers
import Mathlib.RingTheory.IntegralClosure.IntegralRestrict
import Mathlib.RingTheory.MvPowerSeries.Basic
import Mathlib.RingTheory.RamificationInertia.Basic
import Mathlib.Topology.Algebra.Nonarchimedean.AdicTopology
import Mathlib.FieldTheory.Finite.GaloisField
import Mathlib.RingTheory.AdicCompletion.Algebra
import Mathlib.RingTheory.RegularLocalRing.Defs
import Mathlib.FieldTheory.RatFunc.AsPolynomial
import Mathlib.RingTheory.PowerSeries.Expand
import Mathlib.RingTheory.PowerSeries.Log
set_option autoImplicit false

namespace TypeDensity

@[to_additive]
theorem prod_castLE_extend {M : Type*} [CommMonoid M] (N N' : ℕ) (hNN' : N ≤ N')
    (f : Fin N' → M) (g : Fin N → M) (h1 : ∀ i : Fin N, f (Fin.castLE hNN' i) = g i)
    (h2 : ∀ i : Fin N', N ≤ i.val → f i = 1) : ∏ i, f i = ∏ i, g i := by
  rw [← Finset.prod_subset (Finset.subset_univ (Finset.univ.map (Fin.castLEEmb hNN')))]
  · rw [Finset.prod_map]
    exact Finset.prod_congr rfl (fun i _ ↦ h1 i)
  · intro i _ hi
    apply h2
    by_contra hc
    exact hi (Finset.mem_map.2 ⟨⟨i.val, by omega⟩, Finset.mem_univ _, Fin.ext rfl⟩)

section Extend

variable {N N' : ℕ} (hNN' : N ≤ N') {m : Pattern N} {m' : Pattern N'}
  (h : ∀ i j : Fin N', (m' (i, j)).val =
    if hij : i.val < N ∧ j.val < N then (m (⟨i.val, hij.1⟩, ⟨j.val, hij.2⟩)).val else 0)

include h

@[to_additive]
theorem prod_row_castLE {M : Type*} [CommMonoid M] (g : ℕ → ℕ → M)
    (hg : ∀ j, g j 0 = 1) (i : Fin N) :
    ∏ j : Fin N', g j (m' (Fin.castLE hNN' i, j)).val = ∏ j : Fin N, g j (m (i, j)).val :=
  prod_castLE_extend N N' hNN' _ _ (fun j ↦ by simp [h]) fun j hj ↦ by simp [h, not_lt.2 hj, hg]

@[to_additive]
theorem prod_row_eq_one {M : Type*} [CommMonoid M] (g : ℕ → ℕ → M)
    (hg : ∀ j, g j 0 = 1) (i : Fin N') (hi : N ≤ i.val) :
    ∏ j : Fin N', g j (m' (i, j)).val = 1 :=
  Finset.prod_eq_one fun j _ ↦ by simp [h, not_lt.2 hi, hg]

include hNN' in
@[to_additive]
theorem prod_pattern_extend {M : Type*} [CommMonoid M] (g : ℕ → ℕ → ℕ → M)
    (hg : ∀ i j, g i j 0 = 1) :
    ∏ ij : Fin N' × Fin N', g ij.1 ij.2 (m' ij).val =
      ∏ ij : Fin N × Fin N, g ij.1 ij.2 (m ij).val := by
  rw [Fintype.prod_prod_type, Fintype.prod_prod_type]
  exact prod_castLE_extend N N' hNN' _ _ (fun i ↦ prod_row_castLE hNN' h (g i) (hg i) i)
    fun i hi ↦ prod_row_eq_one h (g i) (hg i) i hi

end Extend

end TypeDensity

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