AFTD Auto-Formalizing Theoretical Domains

ising_two_layer_edge_energy

def

The edge energy is the sum, over the unordered edges of the graph, of the products of the endpoint spins.

Statement

noncomputable def ising_two_layer_edge_energy {n : ℕ} (G : SimpleGraph (Fin n))
    (σ : Fin n → Bool) : ℝ
Source
Auxiliary definition for OP-812, critical two-layer random regular Ising crossover.
Verified
01 Nov 2026
Axioms
none listed
Built on 1
  • ising_ring_spinMaps a Boolean spin to the real value +1 for true and -1 for false.
Used by 3
  • ising_single_layer_gibbs_weightThe critical single-layer Gibbs weight of a spin configuration σ on a graph G on Fin n: exp(β_c · E_G(σ)) where E_G is the edge energy and…
  • ising_two_layer_weightThe two-layer Gibbs weight is the exponential of the critical intralayer energy plus c times n to the power negative one half times the…
  • ising_two_layer_weight_zero_couplingAt zero coupling the two-layer Gibbs weight is the product of the separate critical-temperature weights of the two layers.

Lean source view module on GitHub

open scoped BigOperators
open MeasureTheory

noncomputable def ising_two_layer_edge_energy {n : ℕ} (G : SimpleGraph (Fin n))
    (σ : Fin n → Bool) : ℝ := by
  classical
  exact ∑ e ∈ G.edgeFinset,
    Sym2.lift ⟨fun u v => ising_ring_spin (σ u) * ising_ring_spin (σ v),
      fun u v => mul_comm _ _⟩ e
See it in the graphDiscuss this resultChallenge it