Kramers–Wannier duality
DefinitionImage of an edge set under a vertex bijection#✓fully proved
The image of an edge set under a vertex equivalence V ≃ W.
DefinitionNumber of edges of an edge set incident to a vertex#✓fully proved
The number of edges of F incident to v.
Used by 35
DefinitionEven subgraph condition on an edge set#✓fully proved
Every vertex has even degree in the edge set F.
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
def incCount (F : Finset (Sym2 V)) (v : V) : ℕ :=
(F.filter (fun e => v ∈ e)).card
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:101
Uses 1 · Used by 31
TheoremHigh-temperature expansion#✓fully proved
At zero field, Z(β) = 2^{|V|} (cosh β)^{|E|} ∑_{F even}
(tanh β)^{|F|}.
S. Friedli and Y. Velenik, Statistical Mechanics of Lattice Systems, Cambridge University Press (2017), Section 3.7.
theorem isingZ_high_temp_expansion (β : ℝ) :
isingZ G β 0
= (2 : ℝ) ^ Fintype.card V * (Real.cosh β) ^ G.edgeFinset.card
* ∑ F ∈ G.edgeFinset.powerset.filter IsEvenSubgraph,
(Real.tanh β) ^ F.card
noncomputable def isingZ (β h : ℝ) : ℝ := ∑ s : ConfigSpace V, isingWeight G β h s
PhyslibExt/CondensedMatter/IsingModel/Gibbs.lean:126
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
Uses 9 · Used by 3
DefinitionDual high-temperature expansion proportional to the partition function#✓fully proved
tanh β* = exp (-2β) and the high-temperature expansion of Gd at β* equals c times
Z_{Gp}(β).
def DualContourMatching (β βstar c : ℝ) : Prop :=
Real.tanh βstar = Real.exp (-2 * β) ∧
(2 : ℝ) ^ Fintype.card V * (Real.cosh βstar) ^ Gd.edgeFinset.card
* ∑ F ∈ Gd.edgeFinset.powerset.filter IsEvenSubgraph,
(Real.tanh βstar) ^ F.card
= c * isingZ Gp β 0
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
noncomputable def isingZ (β h : ℝ) : ℝ := ∑ s : ConfigSpace V, isingWeight G β h s
PhyslibExt/CondensedMatter/IsingModel/Gibbs.lean:126
Uses 3 · Used by 2
DefinitionEdges cut by a spin configuration#✓fully proved
The edges {x, y} of G whose endpoints have different spins in s.
noncomputable def cutEdges (s : ConfigSpace V) : Finset (Sym2 V) :=
G.edgeFinset.filter (fun e => bond s e = -1)
abbrev ConfigSpace (E : Type*) : Type _ := E → Bool
MathlibExt/Probability/Configuration/ConfigSpace.lean:40
def bond (s : ConfigSpace V) (e : Sym2 V) : ℝ :=
Sym2.lift ⟨fun x y => spin s x * spin s y, fun _ _ => mul_comm _ _⟩ e
PhyslibExt/CondensedMatter/IsingModel/Gibbs.lean:85
Uses 2 · Used by 10
DefinitionProportionality of the cut sum and the dual even-subgraph sum#✓fully proved
The cut sum ∑_s t^{|∂s|} of Gp equals mult times the even-subgraph sum ∑_F t^{|F|} of
Gd.
def CutEvenSubgraphMatching (t mult : ℝ) : Prop :=
(∑ s : ConfigSpace V, t ^ (cutEdges Gp s).card)
= mult * ∑ F ∈ Gd.edgeFinset.powerset.filter IsEvenSubgraph, t ^ F.card
abbrev ConfigSpace (E : Type*) : Type _ := E → Bool
MathlibExt/Probability/Configuration/ConfigSpace.lean:40
noncomputable def cutEdges (s : ConfigSpace V) : Finset (Sym2 V) :=
G.edgeFinset.filter (fun e => bond s e = -1)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierCutMatching.lean:61
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
DefinitionCut space of a graph#✓fully proved
The cut space: the edge sets ∂s cut by configurations s.
noncomputable def cutSpace : Finset (Finset (Sym2 V)) :=
Finset.univ.image (fun s : ConfigSpace V => cutEdges Gp s)
abbrev ConfigSpace (E : Type*) : Type _ := E → Bool
MathlibExt/Probability/Configuration/ConfigSpace.lean:40
noncomputable def cutEdges (s : ConfigSpace V) : Finset (Sym2 V) :=
G.edgeFinset.filter (fun e => bond s e = -1)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierCutMatching.lean:61
Uses 2 · Used by 10
DefinitionEven subgraphs of a graph#✓fully proved
The even subgraphs of G.
noncomputable def evenSubgraphs : Finset (Finset (Sym2 V)) :=
Gd.edgeFinset.powerset.filter IsEvenSubgraph
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
Uses 2 · Used by 34
DefinitionSpin disagreement test across an edge#✓fully proved
Whether the spins of s differ at the endpoints of e.
def edgeDiff (s : ConfigSpace V) (e : Sym2 V) : Bool :=
Sym2.lift ⟨fun x y => s x != s y, fun _ _ => by simp [bne_comm]⟩ e
abbrev ConfigSpace (E : Type*) : Type _ := E → Bool
MathlibExt/Probability/Configuration/ConfigSpace.lean:40
Uses 1 · Used by 3
DefinitionEdges cut by a configuration via the edge disagreement test#✓fully proved
The edges cut by s, defined through edgeDiff.
def cutEdgesB (s : ConfigSpace V) : Finset (Sym2 V) :=
G.edgeFinset.filter (fun e => edgeDiff s e)
abbrev ConfigSpace (E : Type*) : Type _ := E → Bool
MathlibExt/Probability/Configuration/ConfigSpace.lean:40
def edgeDiff (s : ConfigSpace V) (e : Sym2 V) : Bool :=
Sym2.lift ⟨fun x y => s x != s y, fun _ _ => by simp [bne_comm]⟩ e
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:211
DefinitionCut space defined through Boolean cut edges#✓fully proved
The cut space, defined through cutEdgesB.
def cutSpaceB : Finset (Finset (Sym2 V)) :=
Finset.univ.image (fun s : ConfigSpace V => cutEdgesB G s)
abbrev ConfigSpace (E : Type*) : Type _ := E → Bool
MathlibExt/Probability/Configuration/ConfigSpace.lean:40
def cutEdgesB (s : ConfigSpace V) : Finset (Sym2 V) :=
G.edgeFinset.filter (fun e => edgeDiff s e)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:215
Uses 2 · Used by 2
DefinitionEven subgraphs defined by a Boolean test#✓fully proved
The even subgraphs, defined with a Boolean test.
def evenSubgraphsB : Finset (Finset (Sym2 V)) :=
G.edgeFinset.powerset.filter IsEvenSubgraph
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
Uses 2 · Used by 2
AbbreviationComplete graph on four vertices#✓fully proved
The complete graph K₄ on Fin 4.
abbrev K4 : SimpleGraph (Fin 4) := ⊤
Used by 2
TheoremKramers–Wannier duality#✓fully proved
Kramers–Wannier duality on the self-dual graph K₄: if tanh β* = e^{-2β} then Z(β*) =
(2⁴ (cosh β*)^{|E|} / (e^{β|E|} · 2)) Z(β) at zero field.
H. A. Kramers and G. H. Wannier, Statistics of the two-dimensional ferromagnet. Part I, Phys. Rev. 60 (1941).
theorem isingZ_self_dual_K4 (β βstar : ℝ)
(htemp : Real.tanh βstar = Real.exp (-2 * β)) :
isingZ (K4) βstar 0
= ((2 : ℝ) ^ Fintype.card (Fin 4) * (Real.cosh βstar) ^ (K4).edgeFinset.card
/ (Real.exp (β * (K4).edgeFinset.card) * 2)) * isingZ (K4) β 0
noncomputable def isingZ (β h : ℝ) : ℝ := ∑ s : ConfigSpace V, isingWeight G β h s
PhyslibExt/CondensedMatter/IsingModel/Gibbs.lean:126
abbrev K4 : SimpleGraph (Fin 4) := ⊤
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:252
Uses 20
DefinitionNumber of disagreeing steps along a walk#✓fully proved
The number of steps of a walk whose endpoints have different spins in s.
def walkDis : {x y : V} → Gp.Walk x y → ℕ
| _, _, .nil => 0
| _, _, .cons (u := u) (v := v) _ p => (if s u ≠ s v then 1 else 0) + walkDis p
Uses 1
StructureEdge crossing between a graph and its dual#✓fully proved
An edge bijection ψ from Gp to Gd carrying edges to edges, cuts to even subgraphs, and
even subgraphs back to cuts.
structure EdgeCrossing where
ψ : Sym2 V ≃ Sym2 V
edge_mem : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset
cut_to_even : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ)
even_to_cut : ∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
ψ : Sym2 V ≃ Sym2 V
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:107
noncomputable def cutSpace : Finset (Finset (Sym2 V)) :=
Finset.univ.image (fun s : ConfigSpace V => cutEdges Gp s)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:61
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
noncomputable def evenSubgraphs : Finset (Finset (Sym2 V)) :=
Gd.edgeFinset.powerset.filter IsEvenSubgraph
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:65
Uses 3 · Used by 7
TheoremKramers–Wannier duality#✓fully proved
For a preconnected graph Gp with an edge crossing to Gd and
tanh β* = e^{-2β}, Z_{Gd}(β*) = (2^{|V|} (cosh β*)^{|E_d|} / (e^{β|E_p|} · 2)) Z_{Gp}(β)
at zero field.
H. A. Kramers and G. H. Wannier, Statistics of the two-dimensional ferromagnet. Part I, Phys. Rev. 60 (1941).
theorem isingZ_self_dual_of_edgeCrossing [Nonempty V] (hG : Gp.Preconnected)
(Φ : EdgeCrossing Gp Gd) (β βstar : ℝ)
(htemp : Real.tanh βstar = Real.exp (-2 * β)) :
isingZ Gd βstar 0
= ((2 : ℝ) ^ Fintype.card V * (Real.cosh βstar) ^ Gd.edgeFinset.card
/ (Real.exp (β * Gp.edgeFinset.card) * 2)) * isingZ Gp β 0
structure EdgeCrossing where
ψ : Sym2 V ≃ Sym2 V
edge_mem : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset
cut_to_even : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ)
even_to_cut : ∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:105
noncomputable def isingZ (β h : ℝ) : ℝ := ∑ s : ConfigSpace V, isingWeight G β h s
PhyslibExt/CondensedMatter/IsingModel/Gibbs.lean:126
Uses 16 · Used by 1
DefinitionVertices of K₄ outside a given pair#✓fully proved
The two vertices of Fin 4 other than a and b.
def k4Missing (a b : Fin 4) : List (Fin 4) :=
([0, 1, 2, 3] : List (Fin 4)).filter (fun k => k ≠ a ∧ k ≠ b)
Used by 1
DefinitionComplementary edge of a pair in K₄#✓fully proved
The edge of K₄ complementary to {a, b}.
def k4CompPair (a b : Fin 4) : Sym2 (Fin 4) :=
match k4Missing a b with
| [c, d] => s(c, d)
| _ => s(a, b)
def k4Missing (a b : Fin 4) : List (Fin 4) :=
([0, 1, 2, 3] : List (Fin 4)).filter (fun k => k ≠ a ∧ k ≠ b)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:223
Uses 1 · Used by 1
DefinitionComplementary-edge map of K₄ on unordered pairs#✓fully proved
The complementary edge of K₄, as a function on Sym2 (Fin 4).
def k4Comp (e : Sym2 (Fin 4)) : Sym2 (Fin 4) :=
Sym2.lift ⟨k4CompPair, by decide⟩ e
def k4CompPair (a b : Fin 4) : Sym2 (Fin 4) :=
match k4Missing a b with
| [c, d] => s(c, d)
| _ => s(a, b)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:227
Uses 1 · Used by 2
DefinitionEdge complementation of K₄ as an involutive equivalence#✓fully proved
Complementation of edges of K₄ as an involutive equivalence.
def k4CompEquiv : Sym2 (Fin 4) ≃ Sym2 (Fin 4) :=
Function.Involutive.toPerm k4Comp k4Comp_involutive
def k4Comp (e : Sym2 (Fin 4)) : Sym2 (Fin 4) :=
Sym2.lift ⟨k4CompPair, by decide⟩ e
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:233
lemma k4Comp_involutive (e : Sym2 (Fin 4)) : k4Comp (k4Comp e) = e
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:236
Uses 1 · Used by 1
DefinitionSelf-dual edge crossing of K₄ by complementary edges#✓fully proved
The edge crossing of the self-dual graph K₄ given by complementary edges.
StatMech.Ising.k4EdgeCrossing · 18 lines
noncomputable def k4EdgeCrossing : EdgeCrossing (K4) (K4) where
ψ := k4CompEquiv
edge_mem := by
intro e he
rw [mem_K4_edgeFinset_iff] at he ⊢
rw [k4CompEquiv_apply]
exact k4Comp_not_diag e he
cut_to_even := by
intro δ hδ
rw [cutSpace_eq_cutSpaceB] at hδ
have := k4Comp_cut_to_even δ hδ
exact this
even_to_cut := by
intro F hF
rw [show evenSubgraphs (K4) = evenSubgraphsB (K4) from rfl] at hF
rw [cutSpace_eq_cutSpaceB]
have := k4Comp_even_to_cut F hF
exact this
structure EdgeCrossing where
ψ : Sym2 V ≃ Sym2 V
edge_mem : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset
cut_to_even : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ)
even_to_cut : ∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:105
abbrev K4 : SimpleGraph (Fin 4) := ⊤
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:252
def k4CompEquiv : Sym2 (Fin 4) ≃ Sym2 (Fin 4) :=
Function.Involutive.toPerm k4Comp k4Comp_involutive
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:240
Uses 16
DefinitionCrossing parity of a walk with respect to an edge set#✓fully proved
The parity of the number of steps of a walk that use an edge of δ.
def walkParity : {x y : V} → Gp.Walk x y → Bool
| _, _, .nil => false
| _, _, .cons (u := u) (v := v) _ p => (decide (s(u, v) ∈ δ)).xor (walkParity p)
Used by 6
DefinitionEvenness of an edge set on every closed walk#✓fully proved
Every closed walk of Gp uses edges of δ an even number of times.
def EvenOnCycles : Prop := ∀ (x : V) (p : Gp.Walk x x), walkParity Gp δ p = false
def walkParity : {x y : V} → Gp.Walk x y → Bool
| _, _, .nil => false
| _, _, .cons (u := u) (v := v) _ p => (decide (s(u, v) ∈ δ)).xor (walkParity p)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:63
Uses 1 · Used by 7
DefinitionSpin configuration from crossing parities along walks#✓fully proved
The configuration assigning to v the crossing parity of δ along a walk from v₀ to v.
noncomputable def parityConfig (hG : Gp.Preconnected) (v₀ : V) : ConfigSpace V :=
fun v => walkParity Gp δ (hG v₀ v).some
abbrev ConfigSpace (E : Type*) : Type _ := E → Bool
MathlibExt/Probability/Configuration/ConfigSpace.lean:40
def walkParity : {x y : V} → Gp.Walk x y → Bool
| _, _, .nil => false
| _, _, .cons (u := u) (v := v) _ p => (decide (s(u, v) ∈ δ)).xor (walkParity p)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:63
Uses 2 · Used by 4
DefinitionCycle-parity compatibility of a dual edge set#✓fully proved
Every closed walk of Gp crosses the pullback of F an even number of times.
def CycleParityCompatible (Gp : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) (F : Finset (Sym2 V)) : Prop :=
EvenOnCycles Gp (F.image ψ.symm)
def EvenOnCycles : Prop := ∀ (x : V) (p : Gp.Walk x x), walkParity Gp δ p = false
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:104
Uses 1 · Used by 4
DefinitionEdge crossing from cycle-parity compatibility of even subgraphs#✓fully proved
An edge crossing built from cycle-parity compatibility of all even subgraphs of Gd.
noncomputable def edgeCrossing_of_cycleParity [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hedge : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hfwd : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ))
(hcyc : ∀ F ∈ evenSubgraphs Gd, CycleParityCompatible Gp ψ F) :
EdgeCrossing Gp Gd where
ψ := ψ
edge_mem := hedge
cut_to_even := hfwd
even_to_cut := even_to_cut_of_cycleParity hG ψ hsymm hcyc
noncomputable def cutSpace : Finset (Finset (Sym2 V)) :=
Finset.univ.image (fun s : ConfigSpace V => cutEdges Gp s)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:61
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
noncomputable def evenSubgraphs : Finset (Finset (Sym2 V)) :=
Gd.edgeFinset.powerset.filter IsEvenSubgraph
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:65
def CycleParityCompatible (Gp : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) (F : Finset (Sym2 V)) : Prop :=
EvenOnCycles Gp (F.image ψ.symm)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:186
structure EdgeCrossing where
ψ : Sym2 V ≃ Sym2 V
edge_mem : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset
cut_to_even : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ)
even_to_cut : ∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:105
lemma even_to_cut_of_cycleParity [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hcyc : ∀ F ∈ evenSubgraphs Gd, CycleParityCompatible Gp ψ F) :
∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:221
Uses 13
DefinitionCycle-parity compatibility of a family of dual cycle sets#✓fully proved
Every edge set in cycleSets is cycle-parity compatible.
def SingleDualCycleParity (Gp : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) (cycleSets : Finset (Sym2 V) → Prop) : Prop :=
∀ C : Finset (Sym2 V), cycleSets C → EvenOnCycles Gp (C.image ψ.symm)
def EvenOnCycles : Prop := ∀ (x : V) (p : Gp.Walk x x), walkParity Gp δ p = false
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:104
DefinitionCycle-parity compatibility of closed dual walks#✓fully proved
Every closed walk of Gd has edge set whose pullback is cycle-parity compatible.
def ClosedDualWalkParity (Gp Gd : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) : Prop :=
∀ {w : V} (W : Gd.Walk w w), EvenOnCycles Gp ((W.edges.toFinset).image ψ.symm)
def EvenOnCycles : Prop := ∀ (x : V) (p : Gp.Walk x x), walkParity Gp δ p = false
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:104
DefinitionClosed-walk decomposition property of even subgraphs#✓fully proved
Every even subgraph of Gd is a symmetric difference of edge sets of closed walks.
def EvenSubgraphWalkDecomp (Gd : SimpleGraph V) [DecidableRel Gd.Adj] : Prop :=
∀ F ∈ evenSubgraphs Gd, ∃ (ι : Type) (_ : DecidableEq ι) (s : Finset ι)
(w : ι → V) (W : (i : ι) → Gd.Walk (w i) (w i)),
F = s.biUnion (fun i => (W i).edges.toFinset) ∧
(s : Set ι).PairwiseDisjoint (fun i => (W i).edges.toFinset)
noncomputable def evenSubgraphs : Finset (Finset (Sym2 V)) :=
Gd.edgeFinset.powerset.filter IsEvenSubgraph
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:65
Uses 1 · Used by 4
DefinitionEdge crossing from closed-walk parities and walk decompositions#✓fully proved
An edge crossing built from closed-walk parities and the decomposition of even subgraphs into closed walks.
noncomputable def edgeCrossing_of_closedWalkParity [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hedge : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hfwd : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ))
(hdecomp : EvenSubgraphWalkDecomp Gd)
(hlink : ClosedDualWalkParity Gp Gd ψ) :
EdgeCrossing Gp Gd where
ψ := ψ
edge_mem := hedge
cut_to_even := hfwd
even_to_cut := even_to_cut_of_closedWalkParity hG ψ hsymm hdecomp hlink
noncomputable def cutSpace : Finset (Finset (Sym2 V)) :=
Finset.univ.image (fun s : ConfigSpace V => cutEdges Gp s)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:61
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
def EvenSubgraphWalkDecomp (Gd : SimpleGraph V) [DecidableRel Gd.Adj] : Prop :=
∀ F ∈ evenSubgraphs Gd, ∃ (ι : Type) (_ : DecidableEq ι) (s : Finset ι)
(w : ι → V) (W : (i : ι) → Gd.Walk (w i) (w i)),
F = s.biUnion (fun i => (W i).edges.toFinset) ∧
(s : Set ι).PairwiseDisjoint (fun i => (W i).edges.toFinset)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:368
def ClosedDualWalkParity (Gp Gd : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) : Prop :=
∀ {w : V} (W : Gd.Walk w w), EvenOnCycles Gp ((W.edges.toFinset).image ψ.symm)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:363
structure EdgeCrossing where
ψ : Sym2 V ≃ Sym2 V
edge_mem : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset
cut_to_even : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ)
even_to_cut : ∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:105
lemma even_to_cut_of_closedWalkParity [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hdecomp : EvenSubgraphWalkDecomp Gd)
(hlink : ClosedDualWalkParity Gp Gd ψ) :
∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:374
Uses 16
DefinitionSide-colouring property of closed dual walks#✓fully proved
Every closed walk of Gd has a two-colouring of the vertices of Gp whose boundary is the
pullback of its edges.
def DualWalkHasSideColouring (Gp Gd : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) : Prop :=
∀ {w : V} (W : Gd.Walk w w), ∃ c : V → Bool,
∀ {u v : V}, Gp.Adj u v →
(s(u, v) ∈ (W.edges.toFinset).image ψ.symm ↔ c u ≠ c v)
DefinitionEdge crossing from side colourings of dual walks#✓fully proved
An edge crossing built from side colourings of dual walks.
noncomputable def edgeCrossing_of_sideColouring [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hedge : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hfwd : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ))
(hdecomp : EvenSubgraphWalkDecomp Gd)
(hside : DualWalkHasSideColouring Gp Gd ψ) :
EdgeCrossing Gp Gd where
ψ := ψ
edge_mem := hedge
cut_to_even := hfwd
even_to_cut := even_to_cut_of_sideColouring hG ψ hsymm hdecomp hside
noncomputable def cutSpace : Finset (Finset (Sym2 V)) :=
Finset.univ.image (fun s : ConfigSpace V => cutEdges Gp s)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:61
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
def EvenSubgraphWalkDecomp (Gd : SimpleGraph V) [DecidableRel Gd.Adj] : Prop :=
∀ F ∈ evenSubgraphs Gd, ∃ (ι : Type) (_ : DecidableEq ι) (s : Finset ι)
(w : ι → V) (W : (i : ι) → Gd.Walk (w i) (w i)),
F = s.biUnion (fun i => (W i).edges.toFinset) ∧
(s : Set ι).PairwiseDisjoint (fun i => (W i).edges.toFinset)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:368
def DualWalkHasSideColouring (Gp Gd : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) : Prop :=
∀ {w : V} (W : Gd.Walk w w), ∃ c : V → Bool,
∀ {u v : V}, Gp.Adj u v →
(s(u, v) ∈ (W.edges.toFinset).image ψ.symm ↔ c u ≠ c v)
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:148
structure EdgeCrossing where
ψ : Sym2 V ≃ Sym2 V
edge_mem : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset
cut_to_even : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ)
even_to_cut : ∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:105
lemma even_to_cut_of_sideColouring [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hdecomp : EvenSubgraphWalkDecomp Gd)
(hside : DualWalkHasSideColouring Gp Gd ψ) :
∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:163
Uses 17
DefinitionSimple graph spanned by an edge set#✓fully proved
The simple graph with edge set F.
def subgraphF (F : Finset (Sym2 V)) : SimpleGraph V := SimpleGraph.fromEdgeSet (↑F : Set (Sym2 V))
DefinitionComponent of a vertex in the graph spanned by an edge set#✓fully proved
The component of f in the graph spanned by F.
def compF (F : Finset (Sym2 V)) (f : V) : SimpleGraph V where
Adj a b := (subgraphF F).Adj a b ∧ (subgraphF F).Reachable f a ∧ (subgraphF F).Reachable f b
symm := ⟨fun a b ⟨h, ha, hb⟩ => ⟨h.symm, hb, ha⟩⟩
loopless := by refine ⟨fun a ⟨h, _, _⟩ => (subgraphF F).irrefl h⟩
def subgraphF (F : Finset (Sym2 V)) : SimpleGraph V := SimpleGraph.fromEdgeSet (↑F : Set (Sym2 V))
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:209
Uses 1 · Used by 2
DefinitionVertex set of a component of the graph spanned by an edge set#✓fully proved
The vertices of the component of f in the graph spanned by F.
noncomputable def compSuppF (F : Finset (Sym2 V)) (f : V) : Finset V :=
Finset.univ.filter (fun g => (subgraphF F).Reachable f g)
def subgraphF (F : Finset (Sym2 V)) : SimpleGraph V := SimpleGraph.fromEdgeSet (↑F : Set (Sym2 V))
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:209
Uses 1 · Used by 2
DefinitionClosed Eulerian walk of a component of an even edge set#✓fully proved
A closed Eulerian walk of the component of f in an even edge set F.
noncomputable def compEulerWalk (F : Finset (Sym2 V)) (hF : ∀ e ∈ F, ¬ e.IsDiag)
(hev : IsEvenSubgraph F) (f : V) : (compF F f).Walk f f :=
(compF_eulerCircuit F hF hev f).choose
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
def compF (F : Finset (Sym2 V)) (f : V) : SimpleGraph V where
Adj a b := (subgraphF F).Adj a b ∧ (subgraphF F).Reachable f a ∧ (subgraphF F).Reachable f b
symm := ⟨fun a b ⟨h, ha, hb⟩ => ⟨h.symm, hb, ha⟩⟩
loopless := by refine ⟨fun a ⟨h, _, _⟩ => (subgraphF F).irrefl h⟩
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:256
lemma compF_eulerCircuit (F : Finset (Sym2 V)) (hF : ∀ e ∈ F, ¬ e.IsDiag)
(hev : IsEvenSubgraph F) (f : V) :
∃ c : (compF F f).Walk f f, ∀ e ∈ (compF F f).edgeSet, e ∈ c.edges
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:381
Uses 6 · Used by 1
LemmaEven subgraphs of a finite graph decompose into closed walks#✓fully proved
Every even subgraph decomposes into closed walks.
lemma evenSubgraphWalkDecomp_general (Gd : SimpleGraph V) [DecidableRel Gd.Adj] :
EvenSubgraphWalkDecomp Gd
def EvenSubgraphWalkDecomp (Gd : SimpleGraph V) [DecidableRel Gd.Adj] : Prop :=
∀ F ∈ evenSubgraphs Gd, ∃ (ι : Type) (_ : DecidableEq ι) (s : Finset ι)
(w : ι → V) (W : (i : ι) → Gd.Walk (w i) (w i)),
F = s.biUnion (fun i => (W i).edges.toFinset) ∧
(s : Set ι).PairwiseDisjoint (fun i => (W i).edges.toFinset)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:368
Uses 9 · Used by 1
DefinitionEdge boundary of a region in a graph#✓fully proved
The edges of Gp whose endpoints lie on different sides of the region S.
noncomputable def regionBoundary (Gp : SimpleGraph V) [DecidableRel Gp.Adj] (S : V → Bool) :
Finset (Sym2 V) :=
cutEdges Gp S
noncomputable def cutEdges (s : ConfigSpace V) : Finset (Sym2 V) :=
G.edgeFinset.filter (fun e => bond s e = -1)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierCutMatching.lean:61
Uses 1
DefinitionRegion-bounding property of closed dual walks#✓fully proved
Every closed walk of Gd pulls back to the boundary of a region of Gp.
def DualWalkBoundsRegion (Gp Gd : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) : Prop :=
∀ {w : V} (W : Gd.Walk w w), ∃ S : V → Bool,
∀ {u v : V}, Gp.Adj u v →
(s(u, v) ∈ (W.edges.toFinset).image ψ.symm ↔ S u ≠ S v)
DefinitionEdge crossing from region-bounding dual walks and a walk decomposition#✓fully proved
An edge crossing built from dual walks bounding regions.
noncomputable def edgeCrossing_of_boundsRegion [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hedge : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hfwd : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ))
(hdecomp : EvenSubgraphWalkDecomp Gd)
(hreg : DualWalkBoundsRegion Gp Gd ψ) :
EdgeCrossing Gp Gd where
ψ := ψ
edge_mem := hedge
cut_to_even := hfwd
even_to_cut := even_to_cut_of_boundsRegion hG ψ hsymm hdecomp hreg
noncomputable def cutSpace : Finset (Finset (Sym2 V)) :=
Finset.univ.image (fun s : ConfigSpace V => cutEdges Gp s)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:61
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
def EvenSubgraphWalkDecomp (Gd : SimpleGraph V) [DecidableRel Gd.Adj] : Prop :=
∀ F ∈ evenSubgraphs Gd, ∃ (ι : Type) (_ : DecidableEq ι) (s : Finset ι)
(w : ι → V) (W : (i : ι) → Gd.Walk (w i) (w i)),
F = s.biUnion (fun i => (W i).edges.toFinset) ∧
(s : Set ι).PairwiseDisjoint (fun i => (W i).edges.toFinset)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierEvenToCut.lean:368
def DualWalkBoundsRegion (Gp Gd : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) : Prop :=
∀ {w : V} (W : Gd.Walk w w), ∃ S : V → Bool,
∀ {u v : V}, Gp.Adj u v →
(s(u, v) ∈ (W.edges.toFinset).image ψ.symm ↔ S u ≠ S v)
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:593
structure EdgeCrossing where
ψ : Sym2 V ≃ Sym2 V
edge_mem : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset
cut_to_even : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ)
even_to_cut : ∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:105
lemma even_to_cut_of_boundsRegion [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hdecomp : EvenSubgraphWalkDecomp Gd)
(hreg : DualWalkBoundsRegion Gp Gd ψ) :
∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:618
Uses 18 · Used by 1
DefinitionBoolean indicator of a set of sites of ℤ²#✓fully proved
The indicator of a set of sites of ℤ², as a Boolean function.
noncomputable def latticeSide (S : Set (Site 2)) : Site 2 → Bool :=
fun x => @decide (x ∈ S) (Classical.propDecidable _)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1
DefinitionEdge crossing from region-bounding dual walks, no decomposition needed#✓fully proved
An edge crossing built from dual walks bounding regions (variant using
even_to_cut_of_boundsRegion').
noncomputable def edgeCrossing_of_boundsRegion' [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hedge : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hfwd : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ))
(hreg : DualWalkBoundsRegion Gp Gd ψ) :
EdgeCrossing Gp Gd :=
edgeCrossing_of_boundsRegion hG ψ hedge hsymm hfwd (evenSubgraphWalkDecomp_general Gd) hreg
noncomputable def cutSpace : Finset (Finset (Sym2 V)) :=
Finset.univ.image (fun s : ConfigSpace V => cutEdges Gp s)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:61
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
def DualWalkBoundsRegion (Gp Gd : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) : Prop :=
∀ {w : V} (W : Gd.Walk w w), ∃ S : V → Bool,
∀ {u v : V}, Gp.Adj u v →
(s(u, v) ∈ (W.edges.toFinset).image ψ.symm ↔ S u ≠ S v)
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:593
structure EdgeCrossing where
ψ : Sym2 V ≃ Sym2 V
edge_mem : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset
cut_to_even : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ)
even_to_cut : ∀ F ∈ evenSubgraphs Gd, (F.image ψ.symm) ∈ cutSpace Gp
PhyslibExt/CondensedMatter/IsingModel/KramersWannierGeneral.lean:105
noncomputable def edgeCrossing_of_boundsRegion [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hedge : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hfwd : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ))
(hdecomp : EvenSubgraphWalkDecomp Gd)
(hreg : DualWalkBoundsRegion Gp Gd ψ) :
EdgeCrossing Gp Gd where
ψ := ψ
edge_mem := hedge
cut_to_even := hfwd
even_to_cut := even_to_cut_of_boundsRegion hG ψ hsymm hdecomp hreg
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:628
lemma evenSubgraphWalkDecomp_general (Gd : SimpleGraph V) [DecidableRel Gd.Adj] :
EvenSubgraphWalkDecomp Gd
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:545
Uses 6 · Used by 1
TheoremKramers–Wannier duality#✓fully proved
Kramers–Wannier duality for a preconnected graph Gp and a graph Gd whose closed walks
pull back to region boundaries, for tanh β* = e^{-2β}.
H. A. Kramers and G. H. Wannier, Statistics of the two-dimensional ferromagnet. Part I, Phys. Rev. 60 (1941).
theorem isingZ_self_dual_of_boundsRegion [Nonempty V] (hG : Gp.Preconnected)
(ψ : Sym2 V ≃ Sym2 V)
(hedge : ∀ e ∈ Gp.edgeFinset, ψ e ∈ Gd.edgeFinset)
(hsymm : ∀ e ∈ Gd.edgeFinset, ψ.symm e ∈ Gp.edgeFinset)
(hfwd : ∀ δ ∈ cutSpace Gp, IsEvenSubgraph (δ.image ψ))
(hreg : DualWalkBoundsRegion Gp Gd ψ)
(β βstar : ℝ) (htemp : Real.tanh βstar = Real.exp (-2 * β)) :
isingZ Gd βstar 0
= ((2 : ℝ) ^ Fintype.card V * (Real.cosh βstar) ^ Gd.edgeFinset.card
/ (Real.exp (β * Gp.edgeFinset.card) * 2)) * isingZ Gp β 0
noncomputable def cutSpace : Finset (Finset (Sym2 V)) :=
Finset.univ.image (fun s : ConfigSpace V => cutEdges Gp s)
PhyslibExt/CondensedMatter/IsingModel/KramersWannierDuality.lean:61
def IsEvenSubgraph (F : Finset (Sym2 V)) : Prop := ∀ v : V, Even (incCount F v)
PhyslibExt/CondensedMatter/IsingModel/KWSelfDuality.lean:114
def DualWalkBoundsRegion (Gp Gd : SimpleGraph V) [DecidableRel Gp.Adj]
(ψ : Sym2 V ≃ Sym2 V) : Prop :=
∀ {w : V} (W : Gd.Walk w w), ∃ S : V → Bool,
∀ {u v : V}, Gp.Adj u v →
(s(u, v) ∈ (W.edges.toFinset).image ψ.symm ↔ S u ≠ S v)
PhyslibExt/CondensedMatter/IsingModel/KWClosedWalkParity.lean:593
noncomputable def isingZ (β h : ℝ) : ℝ := ∑ s : ConfigSpace V, isingWeight G β h s
PhyslibExt/CondensedMatter/IsingModel/Gibbs.lean:126
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.