introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
7.95 kB
import Mathlib
import OAI.Probability.CriticalPercolation.GraphGeometry.VertexBall
import OAI.Probability.CriticalPercolation.ProductMeasure.Distribution
namespace OAI
section
section
open Set MeasureTheory ProbabilityTheory
open Set
open scoped BigOperators
namespace CriticalPercolation.BondGraph
open ClusterDeletion FiniteProduct
open scoped Classical
variable {V E : Type*} (G : BondGraph V E)
abbrev ClusterObject (V E : Type*) := Set V Γ— Set E
def clusterObject (Ο‰ : Set E) (S : Set V) : ClusterObject V E :=
(roots (G.openGraph Ο‰) S, Ο‰ ∩ G.incidentEdges (roots (G.openGraph Ο‰) S))
def eraseVertices (Ο‰ : Set E) (U : Set V) : Set E := Ο‰ \ G.incidentEdges U
lemma incidentEdges_mono {S T : Set V} (h : S βŠ† T) : G.incidentEdges S βŠ† G.incidentEdges T := by
rintro e ⟨v, hv, he⟩
exact ⟨v, h hv, he⟩
lemma clusterObject_mono {Ο‰ Ο‰' : Set E} (h : Ο‰ βŠ† Ο‰') (S : Set V) :
G.clusterObject Ο‰ S ≀ G.clusterObject Ο‰' S := by
have hr := roots_mono (SimpleGraph.fromEdgeSet_mono (Set.image_mono (f := G.ends) h)) S
exact ⟨hr, fun _ he => ⟨h he.1, G.incidentEdges_mono hr he.2⟩⟩
lemma eraseVertices_mono {Ο‰ Ο‰' : Set E} (h : Ο‰ βŠ† Ο‰') (U : Set V) :
G.eraseVertices Ο‰ U βŠ† G.eraseVertices Ο‰' U :=
fun _ he => ⟨h he.1, he.2⟩
lemma eraseVertices_antitone {U U' : Set V} (h : U βŠ† U') (Ο‰ : Set E) :
G.eraseVertices Ο‰ U' βŠ† G.eraseVertices Ο‰ U :=
fun _ he => ⟨he.1, fun hh => he.2 (G.incidentEdges_mono h hh)⟩
lemma openGraph_eraseVertices (Ο‰ : Set E) (U : Set V) :
G.openGraph (G.eraseVertices Ο‰ U) = delete (G.openGraph Ο‰) U := by
ext v w
simp only [openGraph, SimpleGraph.fromEdgeSet_adj, Set.mem_image,
eraseVertices, Set.mem_sdiff, delete]
constructor
· rintro ⟨⟨e, ⟨he, hU⟩, heq⟩, hne⟩
refine ⟨⟨⟨e, he, heq⟩, hne⟩, ?_, ?_⟩
Β· intro hv
exact hU ⟨v, hv, by simp [heq]⟩
Β· intro hw
exact hU ⟨w, hw, by simp [heq]⟩
· rintro ⟨⟨⟨e, he, heq⟩, hne⟩, hv, hw⟩
refine ⟨⟨e, ⟨he, ?_⟩, heq⟩, hne⟩
rintro ⟨t, ht, hte⟩
rw [heq] at hte
rcases (by simpa using hte : t = v ∨ t = w) with rfl | rfl
Β· exact hv ht
Β· exact hw ht
lemma eraseVertices_dependsOn (U : Set V) :
DependsOn (fun Ο‰ : Set E => G.eraseVertices Ο‰ U) (G.incidentEdges U)ᢜ := by
intro ω ω' hω
ext e
change (Ο‰ e ∧ e βˆ‰ G.incidentEdges U) ↔ (Ο‰' e ∧ e βˆ‰ G.incidentEdges U)
by_cases he : e ∈ G.incidentEdges U
Β· simp [he]
· rw [(hω e he).to_iff]
lemma clusterObject_eq_of_incident {S : Set V} {C : ClusterObject V E} {Ο‰ Ο‰' : Set E}
(hC : G.clusterObject Ο‰ S = C)
(hΟ‰ : βˆ€ e ∈ G.incidentEdges C.1, e ∈ Ο‰ ↔ e ∈ Ο‰') :
G.clusterObject Ο‰' S = C := by
have hr : roots (G.openGraph Ο‰) S = C.1 := congrArg Prod.fst hC
have hr' := G.roots_eq_of_incident hr hω
apply Prod.ext hr'
change Ο‰' ∩ G.incidentEdges (roots (G.openGraph Ο‰') S) = C.2
have he : Ο‰ ∩ G.incidentEdges (roots (G.openGraph Ο‰) S) = C.2 := congrArg Prod.snd hC
rw [hr] at he
rw [hr', ← he]
ext e
constructor
Β· intro hh
exact ⟨(hΟ‰ e hh.2).mpr hh.1, hh.2⟩
Β· intro hh
exact ⟨(hΟ‰ e hh.2).mp hh.1, hh.2⟩
lemma dependsOn_exact_clusterObject (S : Set V) (C : ClusterObject V E) :
DependsOn (fun Ο‰ : Set E => G.clusterObject Ο‰ S = C) (G.incidentEdges C.1) := by
intro ω ω' hω
apply propext
constructor
· exact fun h => G.clusterObject_eq_of_incident h (fun e he => (hω e he).to_iff)
· exact fun h => G.clusterObject_eq_of_incident h (fun e he => (hω e he).symm.to_iff)
lemma roots_disjoint_symm (Ο‰ : Set E) (A B : Set V) :
Disjoint (roots (G.openGraph Ο‰) A) B ↔ Disjoint (roots (G.openGraph Ο‰) B) A := by
simp only [Set.disjoint_left]
constructor
· rintro h a ⟨b, hb, hba⟩ ha
exact h ⟨a, ha, hba.symm⟩ hb
· rintro h b ⟨a, ha, hab⟩ hb
exact h ⟨b, hb, hab.symm⟩ ha
lemma roots_disjoint_roots (Ο‰ : Set E) {A B : Set V}
(h : Disjoint (roots (G.openGraph Ο‰) A) B) :
Disjoint (roots (G.openGraph Ο‰) A) (roots (G.openGraph Ο‰) B) := by
rw [Set.disjoint_left] at h ⊒
rintro v ⟨a, ha, hav⟩ ⟨b, hb, hbv⟩
exact h ⟨a, ha, hav.trans hbv.symm⟩ hb
lemma roots_erase_roots (Ο‰ : Set E) {A B : Set V}
(h : Disjoint (roots (G.openGraph Ο‰) A) B) :
roots (G.openGraph (G.eraseVertices Ο‰ (roots (G.openGraph Ο‰) A))) B =
roots (G.openGraph Ο‰) B := by
rw [G.openGraph_eraseVertices]
ext v
constructor
Β· exact fun hv => roots_mono (delete_le _ _) _ hv
· rintro ⟨b, hb, hbv⟩
refine ⟨b, hb, ?_⟩
change v ∈ component (delete (G.openGraph Ο‰) (roots (G.openGraph Ο‰) A)) b
rw [delete_roots_component _ _ _ (fun hh => Set.disjoint_left.mp h hh hb)]
exact hbv
lemma openBond_roots {Ο‰ : Set E} {S : Set V} {e : E} (he : e ∈ Ο‰)
{v w : V} (hv : v ∈ G.ends e) (hw : w ∈ G.ends e)
(hr : v ∈ roots (G.openGraph Ο‰) S) : w ∈ roots (G.openGraph Ο‰) S := by
by_cases hvw : v = w
Β· simpa [← hvw] using hr
Β· have heq : G.ends e = s(v,w) := Sym2.eq_of_ne_mem hvw hv hw (by simp) (by simp)
exact roots_closed hr ((SimpleGraph.fromEdgeSet_adj _).mpr
⟨⟨e, he, heq⟩, hvw⟩)
lemma clusterObject_erase_other (Ο‰ : Set E) {A B : Set V}
(h : Disjoint (G.clusterObject Ο‰ A).1 B) :
G.clusterObject (G.eraseVertices Ο‰ (G.clusterObject Ο‰ A).1) B = G.clusterObject Ο‰ B := by
have hr := G.roots_erase_roots Ο‰ h
apply Prod.ext hr
change G.eraseVertices Ο‰ (roots (G.openGraph Ο‰) A) ∩
G.incidentEdges (roots (G.openGraph (G.eraseVertices Ο‰ (roots (G.openGraph Ο‰) A))) B) =
Ο‰ ∩ G.incidentEdges (roots (G.openGraph Ο‰) B)
rw [hr]
ext e
constructor
· exact fun hh => ⟨hh.1.1, hh.2⟩
· rintro ⟨he, hi⟩
refine ⟨⟨he, ?_⟩, hi⟩
rintro ⟨a, ha, hae⟩
obtain ⟨b, hb, hbe⟩ := hi
exact Set.disjoint_left.mp (G.roots_disjoint_roots Ο‰ h) ha
(G.openBond_roots he hbe hae hb)
lemma clusterObject_exposure [Fintype V] [Fintype E]
(w : E β†’ Prop β†’ ℝ) (hw : βˆ€ e, βˆ‘ b, w e b = 1)
(S : Set V) (F : ClusterObject V E β†’ Set E β†’ ℝ) :
expect w (fun Ο‰ => F (G.clusterObject Ο‰ S)
(G.eraseVertices Ο‰ (G.clusterObject Ο‰ S).1)) =
expect w (fun Ο‰ => expect w (fun Ο‰' => F (G.clusterObject Ο‰ S)
(G.eraseVertices Ο‰' (G.clusterObject Ο‰ S).1))) := by
classical
exact expect_exposure w hw (fun Ο‰ => G.clusterObject Ο‰ S)
(fun C => G.incidentEdges C.1) (G.dependsOn_exact_clusterObject S)
(fun C Ο‰ => F C (G.eraseVertices Ο‰ C.1))
(fun C _ _ hω => congrArg (F C) (G.eraseVertices_dependsOn C.1 hω))
lemma clusterObject_avoidance_exposure [Fintype V] [Fintype E]
(w : E β†’ Prop β†’ ℝ) (hw : βˆ€ e, βˆ‘ b, w e b = 1)
(A B : Set V) (F : ClusterObject V E β†’ ClusterObject V E β†’ ℝ) :
expect w (fun Ο‰ => if Disjoint (G.clusterObject Ο‰ A).1 B then
F (G.clusterObject Ο‰ A) (G.clusterObject Ο‰ B) else 0) =
expect w (fun Ο‰ => if Disjoint (G.clusterObject Ο‰ A).1 B then
expect w (fun Ο‰' => F (G.clusterObject Ο‰ A)
(G.clusterObject (G.eraseVertices Ο‰' (G.clusterObject Ο‰ A).1) B)) else 0) := by
classical
have he := G.clusterObject_exposure w hw A
(fun C Ο‰ => if Disjoint C.1 B then F C (G.clusterObject Ο‰ B) else 0)
have hl : (fun Ο‰ : E β†’ Prop => if Disjoint (G.clusterObject Ο‰ A).1 B then
F (G.clusterObject Ο‰ A)
(G.clusterObject (G.eraseVertices Ο‰ (G.clusterObject Ο‰ A).1) B) else 0) =
(fun Ο‰ => if Disjoint (G.clusterObject Ο‰ A).1 B then
F (G.clusterObject Ο‰ A) (G.clusterObject Ο‰ B) else 0) := by
funext Ο‰
split_ifs with h
Β· rw [G.clusterObject_erase_other Ο‰ h]
Β· rfl
rw [hl] at he
refine he.trans ?_
congr 1
funext Ο‰
split_ifs <;> simp [expect_zero]
end CriticalPercolation.BondGraph
end
end
end OAI