File size: 2,845 Bytes
f205175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import Mathlib
import OAI.Probability.CriticalPercolation.Model

namespace OAI

section
section
open Set MeasureTheory ProbabilityTheory
open Set
open scoped BigOperators
open scoped Classical

namespace CriticalPercolation.BondGraph
open scoped Classical

variable {V E : Type*} (G : BondGraph V E)

noncomputable def eraseBond (f : E) (o : V) : BondGraph V E :=
  ⟨Function.update G.ends f s(o,o)⟩

lemma eraseBond_ends_ne (f : E) (o : V) {e : E} (he : e ≠ f) :
    (G.eraseBond f o).ends e = G.ends e := by simp [eraseBond,he]

lemma eraseBond_openGraph (f : E) (o : V) (ω : Set E) :
    (G.eraseBond f o).openGraph ω = G.openGraph {e | e ≠ f ∧ e ∈ ω} := by
  ext u v
  unfold openGraph
  rw [SimpleGraph.fromEdgeSet_adj,SimpleGraph.fromEdgeSet_adj]
  constructor
  · rintro ⟨⟨e,he,hev⟩,huv⟩
    have hef : e ≠ f := by
      intro hh
      subst e
      simp only [eraseBond,Function.update_self] at hev
      have hd := (Sym2.eq_iff.mp hev)
      rcases hd with ⟨h1,h2⟩ | ⟨h1,h2⟩
      · exact huv (h1.symm.trans h2)
      · exact huv (h2.symm.trans h1)
    exact ⟨⟨e,⟨hef,he⟩,(G.eraseBond_ends_ne f o hef).symm.trans hev⟩,huv⟩
  · rintro ⟨⟨e,⟨hef,he⟩,hev⟩,huv⟩
    exact ⟨⟨e,he,(G.eraseBond_ends_ne f o hef).trans hev⟩,huv⟩

lemma eraseBond_subgraph (f : E) (o : V) (ω : Set E) :
    (G.eraseBond f o).openGraph ω ≤ G.openGraph ω := by
  rw [G.eraseBond_openGraph]
  exact SimpleGraph.fromEdgeSet_mono (Set.image_mono (fun _ member => member.2))

lemma knownGraph_le_eraseBond (read : Finset E) (f : E) (o : V) (ω : Set E)
    (hf : f ∉ read) :
    G.openGraph {e | e ∈ read ∧ e ∈ ω} ≤ (G.eraseBond f o).openGraph ω := by
  rw [G.eraseBond_openGraph]
  apply SimpleGraph.fromEdgeSet_mono ∘ Set.image_mono
  intro e he
  exact ⟨fun hef => hf (hef ▸ he.1),he.2⟩

lemma openGraph_eq_eraseBond_sup (f : E) (o v z : V) (ω : Set E)
    (hf : f ∈ ω) (he : G.ends f = s(v,z)) :
    G.openGraph ω = (G.eraseBond f o).openGraph ω ⊔ SimpleGraph.edge v z := by
  rw [G.eraseBond_openGraph]
  have hh : ω = insert f {e | e ≠ f ∧ e ∈ ω} := by
    ext e
    by_cases h : e = f
    · subst e; simp [hf]
    · simp [h]
  conv_lhs => rw [hh]
  rw [openGraph,Set.image_insert_eq,he,← Set.singleton_union,SimpleGraph.fromEdgeSet_union]
  exact sup_comm _ _

lemma eraseBond_openGraph_force_false (f : E) (o : V) (ω : Set E) :
    (G.eraseBond f o).openGraph ω = G.openGraph (Function.update ω f False) := by
  rw [G.eraseBond_openGraph]
  congr 1
  ext e
  change (e ≠ f ∧ e ∈ ω) ↔ Function.update ω f False e
  by_cases h : e = f
  · subst e
    erw [Function.update_self]
    simp
  · erw [Function.update_of_ne h]
    change (e ≠ f ∧ e ∈ ω) ↔ e ∈ ω
    simp [h]

end CriticalPercolation.BondGraph

end
end

end OAI