Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite split-Gibbs weights, normalization, closure, and boundary gates

Definition
FiniteSplitGibbsMethodsII

by lisamegawatts · Sep 18, 2026 · Mathlib c5ea003 (Lean v4.30.0)

finite-probabilitygibbs-weightsnormalizationpositive-semidefinitereflection-positivitysplit-weights

For a finite type Ω\OmegaΩ and a real weight www, define Z(w)=∑ω∈Ωw(ω)Z(w)=\sum_{\omega\in\Omega}w(\omega)Z(w)=∑ω∈Ω​w(ω) and w^(ω)=w(ω)/Z(w)\widehat w(\omega)=w(\omega)/Z(w)w(ω)=w(ω)/Z(w); a probability weight is pointwise nonnegative and has total mass one. For finite XXX and finite feature type AAA, the bundle applies these notions to W(x,y)=∑a∈Acaϕa(x)ϕa(y)W(x,y)=\sum_{a\in A}c_a\phi_a(x)\phi_a(y)W(x,y)=∑a∈A​ca​ϕa​(x)ϕa​(y) on X×XX\times XX×X, and defines its partition function, normalized split weight, and reflected observable kernel. It also defines absorption of a common half-factor, products of split data, coefficient scaling, and inverse-partition scaling. The controls include the two-point symmetric weight, its configuration and normalized weights, delta observables, and zero split data. Eight proposition gates specify the theorem boundary. The substantive gate proofs are separate theorem items.

Definition code
import Definitions.Def_FiniteReflectionPositivityMethodsI
import Mathlib.Algebra.BigOperators.Field

noncomputable section

open scoped BigOperators

namespace FiniteSplitGibbsMethodsII

open FiniteReflectionPositivityMethodsI

/-! ## Generic finite normalization -/

def partitionFunction {Omega : Type*} [Fintype Omega]
    (weight : Omega -> Real) : Real :=
  ∑ omega, weight omega

def normalizedWeight {Omega : Type*} [Fintype Omega]
    (weight : Omega -> Real) (omega : Omega) : Real :=
  weight omega / partitionFunction weight

def IsProbabilityWeight {Omega : Type*} [Fintype Omega]
    (weight : Omega -> Real) : Prop :=
  (forall omega, 0 <= weight omega) ∧ ∑ omega, weight omega = 1

/-! ## Split finite Gibbs weights -/

def splitWeightFunction {X A : Type*} [Fintype A]
    (data : SplitWeightData X A) : FullConfiguration X -> Real :=
  fun omega => data.weight omega.1 omega.2

def splitPartitionFunction {X A : Type*} [Fintype X] [Fintype A]
    (data : SplitWeightData X A) : Real :=
  partitionFunction (splitWeightFunction data)

def normalizedSplitWeight {X A : Type*} [Fintype X] [Fintype A]
    (data : SplitWeightData X A) (left right : X) : Real :=
  data.weight left right / splitPartitionFunction data

def normalizedReflectedKernel
    {X A I : Type*} [Fintype X] [Fintype A]
    (data : SplitWeightData X A) (observable : I -> X -> Real) :
    Matrix I I Real :=
  reflectedKernel (normalizedSplitWeight data) observable

/-! ## Closure operations on split data -/

def absorbHalfFactors {X A : Type*}
    (half : X -> Real) (data : SplitWeightData X A) :
    SplitWeightData X A where
  coefficient := data.coefficient
  feature := fun a x => half x * data.feature a x

def productSplitWeightData {X A B : Type*}
    (first : SplitWeightData X A) (second : SplitWeightData X B) :
    SplitWeightData X (A × B) where
  coefficient := fun ab =>
    first.coefficient ab.1 * second.coefficient ab.2
  feature := fun ab x => first.feature ab.1 x * second.feature ab.2 x

def scaledSplitWeightData {X A : Type*}
    (scale : Real) (data : SplitWeightData X A) : SplitWeightData X A where
  coefficient := fun a => scale * data.coefficient a
  feature := data.feature

def normalizedSplitData {X A : Type*} [Fintype X] [Fintype A]
    (data : SplitWeightData X A) : SplitWeightData X A :=
  scaledSplitWeightData (splitPartitionFunction data)⁻¹ data

/-! ## Frozen controls -/

def pointwiseNonnegativeSymmetricWeight : Fin 2 -> Fin 2 -> Real :=
  fun i j => if i = j then 1 else 2

def pointwiseNonnegativeConfigurationWeight :
    FullConfiguration (Fin 2) -> Real :=
  fun omega => pointwiseNonnegativeSymmetricWeight omega.1 omega.2

def normalizedPointwiseNonnegativeWeight : Fin 2 -> Fin 2 -> Real :=
  fun i j =>
    normalizedWeight pointwiseNonnegativeConfigurationWeight (i, j)

def deltaObservable (i x : Fin 2) : Real :=
  if x = i then 1 else 0

def zeroSplitWeightData (X : Type*) : SplitWeightData X (Fin 1) where
  coefficient := fun _ => 0
  feature := fun _ _ => 1

/-! ## Eight-node theorem gates -/

def PartitionNormalizationGate : Prop :=
  forall (Omega : Type) [Fintype Omega] (weight : Omega -> Real),
    (forall omega, 0 <= weight omega) ->
    (exists omega, 0 < weight omega) ->
      0 < partitionFunction weight ∧
        IsProbabilityWeight (normalizedWeight weight)

def HalfFactorClosureGate : Prop :=
  forall (X A : Type) [Fintype A]
      (half : X -> Real) (data : SplitWeightData X A),
    (forall left right,
      (absorbHalfFactors half data).weight left right =
        half left * half right * data.weight left right) ∧
    ((forall a, 0 <= data.coefficient a) ->
      forall a, 0 <= (absorbHalfFactors half data).coefficient a) ∧
    ((forall x, 0 <= half x) ->
      (forall left right, 0 <= data.weight left right) ->
        forall left right,
          0 <= (absorbHalfFactors half data).weight left right)

def ProductClosureGate : Prop :=
  forall (X A B : Type) [Fintype A] [Fintype B]
      (first : SplitWeightData X A) (second : SplitWeightData X B),
    (forall left right,
      (productSplitWeightData first second).weight left right =
        first.weight left right * second.weight left right) ∧
    ((forall a, 0 <= first.coefficient a) ->
      (forall b, 0 <= second.coefficient b) ->
        forall ab,
          0 <= (productSplitWeightData first second).coefficient ab) ∧
    ((forall left right, 0 <= first.weight left right) ->
      (forall left right, 0 <= second.weight left right) ->
        forall left right,
          0 <= (productSplitWeightData first second).weight left right)

def NormalizedReflectionPositivityGate : Prop :=
  forall (X A I : Type) [Fintype X] [Fintype A] [Fintype I]
      (data : SplitWeightData X A),
    (forall a, 0 <= data.coefficient a) ->
    0 < splitPartitionFunction data ->
    forall observable : I -> X -> Real,
      PositiveSemidefinite (normalizedReflectedKernel data observable)

def NormalizedSplitGibbsGate : Prop :=
  forall (X A I : Type) [Fintype X] [Fintype A] [Fintype I]
      (data : SplitWeightData X A),
    (forall a, 0 <= data.coefficient a) ->
    (forall left right, 0 <= data.weight left right) ->
    (exists left right, 0 < data.weight left right) ->
    forall observable : I -> X -> Real,
      IsProbabilityWeight
          (fun omega : FullConfiguration X =>
            normalizedSplitWeight data omega.1 omega.2) ∧
        PositiveSemidefinite (normalizedReflectedKernel data observable) ∧
        forall i j,
          normalizedReflectedKernel data observable i j ^ 2 <=
            normalizedReflectedKernel data observable i i *
              normalizedReflectedKernel data observable j j

def PointwisePositiveNoGoGate : Prop :=
  (forall i j, 0 <= pointwiseNonnegativeSymmetricWeight i j) ∧
    (forall i j,
      pointwiseNonnegativeSymmetricWeight i j =
        pointwiseNonnegativeSymmetricWeight j i) ∧
    0 < partitionFunction pointwiseNonnegativeConfigurationWeight ∧
    IsProbabilityWeight
      (normalizedWeight pointwiseNonnegativeConfigurationWeight) ∧
    ¬ PositiveSemidefinite pointwiseNonnegativeSymmetricWeight ∧
    ¬ PositiveSemidefinite
      (reflectedKernel pointwiseNonnegativeSymmetricWeight deltaObservable) ∧
    ¬ PositiveSemidefinite
      (reflectedKernel normalizedPointwiseNonnegativeWeight deltaObservable)

def ZeroWeightNoGoGate : Prop :=
  (forall (X : Type) (a : Fin 1),
    0 <= (zeroSplitWeightData X).coefficient a) ∧
  (forall (X : Type) (left right : X),
    0 <= (zeroSplitWeightData X).weight left right) ∧
  (forall (X : Type) [Fintype X],
    splitPartitionFunction (zeroSplitWeightData X) = 0) ∧
  (forall (X I : Type) [Fintype X] [Fintype I]
      (observable : I -> X -> Real),
    PositiveSemidefinite
      (reflectedKernel (zeroSplitWeightData X).weight observable)) ∧
  forall (X : Type) [Fintype X],
    ¬ IsProbabilityWeight
      (fun omega : FullConfiguration X =>
        normalizedSplitWeight (zeroSplitWeightData X) omega.1 omega.2)

def ClaimBoundary : Prop :=
  PartitionNormalizationGate ∧
    HalfFactorClosureGate ∧
    ProductClosureGate ∧
    NormalizedReflectionPositivityGate ∧
    NormalizedSplitGibbsGate ∧
    PointwisePositiveNoGoGate ∧
    ZeroWeightNoGoGate

end FiniteSplitGibbsMethodsII
Source
Authored finite sequel to Prove2Me mission db962332-7a71-4d34-a01c-e85cdee243ce, definition bac19f55-f257-416b-bde1-568e139f34e9. The inherited split-weight, reflected-kernel, PSD, and chessboard interface comes from LeanProofs commit dbf503b2909cc17787d40a21eb75a0c9354cc6ef, ReflectionPositivityInfraredBound.lean, lines 40--56 and 83--137: https://github.com/MonumentalSystems/LeanProofs/blob/dbf503b2909cc17787d40a21eb75a0c9354cc6ef/LeanProofs/StatMech/ReflectionPositivityInfraredBound.lean . Reflection-positive factorization background: Frohlich--Israel--Lieb--Simon (1978), DOI 10.1007/BF01940327. The normalization and counterfixture definitions are new finite controls, not claimed as verbatim statements from that paper.
Read-back

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

For a finite type Ω\OmegaΩ and a real-valued function www on it, write Z(w)=sumomegainOmegaw(omega)Z(w)=\\sum_{\\omega\\in\\Omega}w(\\omega)Z(w)=sumomegainOmega​w(omega) and widehatw(omega)=w(omega)/Z(w)\\widehat w(\\omega)=w(\\omega)/Z(w)widehatw(omega)=w(omega)/Z(w), where division is the total real-number division operation (so division by zero has its formal value). Call www a probability weight exactly when every w(omega)ge0w(\\omega)\\ge 0w(omega)ge0 and \\sum_\\omega w(\\omega)=1. A split datum ddd on a type XXX, with feature index type AAA, has coefficients cac_aca​, features fa(x)f_a(x)fa​(x), and its associated split weight is denoted Wd(x,y)W_d(x,y)Wd​(x,y); a full configuration is a pair (x,y)(x,y)(x,y). Its split partition function is Zd=sum(x,y)inXtimesXWd(x,y)Z_d=\\sum_{(x,y)\\in X\\times X}W_d(x,y)Zd​=sum(x,y)inXtimesX​Wd​(x,y) when XXX and AAA are finite, its normalized split weight is Wd(x,y)/ZdW_d(x,y)/Z_dWd​(x,y)/Zd​, and, for observables Fi:XtomathbbRF_i:X\\to\\mathbb RFi​:XtomathbbR, its normalized reflected kernel is the reflected-kernel matrix formed from that normalized weight and those observables. Positive semidefiniteness means nonnegativity of every real quadratic form of the matrix. The proposition ClaimBoundary is the conjunction of all seven of the following assertions. (1) For every type Omega\\OmegaOmega equipped with a finite-type structure and every w:OmegatomathbbRw:\\Omega\\to\\mathbb Rw:OmegatomathbbR, if all values of www are nonnegative and at least one value is strictly positive, then Z(w)>0Z(w)>0Z(w)>0 and widehatw\\widehat wwidehatw is a probability weight. Thus the universally quantified types include the empty type, although on it the strict-positivity hypothesis cannot be met. (2) For every type XXX, every finite type AAA, every h:XtomathbbRh:X\\to\\mathbb Rh:XtomathbbR, and every split datum ddd indexed by AAA, let dhd^hdh retain the coefficients of ddd and replace each feature fa(x)f_a(x)fa​(x) by h(x)fa(x)h(x)f_a(x)h(x)fa​(x). Then, simultaneously, Wdh(x,y)=h(x)h(y)Wd(x,y)W_{d^h}(x,y)=h(x)h(y)W_d(x,y)Wdh​(x,y)=h(x)h(y)Wd​(x,y) for every x,yx,yx,y; if every coefficient of ddd is nonnegative, every coefficient of dhd^hdh is nonnegative; and if every h(x)h(x)h(x) and every Wd(x,y)W_d(x,y)Wd​(x,y) are nonnegative, every Wdh(x,y)W_{d^h}(x,y)Wdh​(x,y) is nonnegative. No finiteness assumption is made on XXX. (3) For every type XXX, finite types AAA and BBB, and split data ddd and eee indexed respectively by AAA and BBB, form dotimesed\\otimes edotimese indexed by AtimesBA\\times BAtimesB with coefficient cadcbec^d_a c^e_bcad​cbe​ and feature fad(x)fbe(x)f^d_a(x)f^e_b(x)fad​(x)fbe​(x). Then, simultaneously, Wdotimese(x,y)=Wd(x,y)We(x,y)W_{d\\otimes e}(x,y)=W_d(x,y)W_e(x,y)Wdotimese​(x,y)=Wd​(x,y)We​(x,y) for every x,yx,yx,y; nonnegativity of all coefficients of each input implies nonnegativity of all product coefficients; and pointwise nonnegativity of both input weights implies pointwise nonnegativity of the product weight. Again, XXX need not be finite. (4) For every finite types XXX, AAA, and III, every split datum ddd indexed by AAA, and every family of observables Fi:XtomathbbRF_i:X\\to\\mathbb RFi​:XtomathbbR, if every coefficient of ddd is nonnegative and Zd>0Z_d>0Zd​>0, then the reflected-kernel matrix formed from Wd/ZdW_d/Z_dWd​/Zd​ and FFF is positive semidefinite. (5) For every finite types XXX, AAA, and III, every split datum ddd indexed by AAA, and every family of observables Fi:XtomathbbRF_i:X\\to\\mathbb RFi​:XtomathbbR, if all coefficients of ddd are nonnegative, all values Wd(x,y)W_d(x,y)Wd​(x,y) are nonnegative, and there exist x,yx,yx,y with Wd(x,y)>0W_d(x,y)>0Wd​(x,y)>0, then the function (x,y)mapstoWd(x,y)/Zd(x,y)\\mapsto W_d(x,y)/Z_d(x,y)mapstoWd​(x,y)/Zd​ is a probability weight on XtimesXX\\times XXtimesX, the corresponding reflected-kernel matrix KKK is positive semidefinite, and, for every i,jinIi,j\\in Ii,jinI, Kij2leKiiKjjK_{ij}^{2}\\le K_{ii}K_{jj}Kij2​leKii​Kjj​. The quantified finite types may in principle be empty, but the existence hypothesis rules out an empty XXX; no analogous inhabitance premise is imposed on AAA or III. (6) On operatornameFin(2)\\operatorname{Fin}(2)operatornameFin(2), define q(i,j)=1q(i,j)=1q(i,j)=1 when i=ji=ji=j and q(i,j)=2q(i,j)=2q(i,j)=2 otherwise; regard the same rule as a weight on ordered pairs, normalize it by its sum over all four pairs, and let deltai(x)\\delta_i(x)deltai​(x) be 111 when x=ix=ix=i and 000 otherwise. Then all q(i,j)q(i,j)q(i,j) are nonnegative, qqq is symmetric, its partition function is strictly positive, its normalized ordered-pair weight is a probability weight, the 2times22\\times22times2 matrix qqq is not positive semidefinite, the reflected kernel made from qqq and the delta observables is not positive semidefinite, and the reflected kernel made from the normalized weight and the delta observables is not positive semidefinite. (7) For every type XXX, define a split datum zXz_XzX​ with the single index in operatornameFin(1)\\operatorname{Fin}(1)operatornameFin(1), coefficient zero, and constant feature 111. Then, simultaneously, its sole coefficient is nonnegative for every XXX; WzX(x,y)W_{z_X}(x,y)WzX​​(x,y) is nonnegative for every XXX and every x,yx,yx,y; for every finite XXX, its split partition function is zero; for every finite XXX and finite III and every observable family, the reflected kernel formed from its unnormalized zero weight is positive semidefinite; and, for every finite XXX, the normalized split weight (x,y)mapstoWzX(x,y)/0(x,y)\\mapsto W_{z_X}(x,y)/0(x,y)mapstoWzX​​(x,y)/0 is not a probability weight. This last universal assertion includes empty XXX; total real division makes every normalized value zero, and in all cases the required total mass is not 111.

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