l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem neighborSet_fst_subgraphOfAdj {v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet v = {w} := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : Adj G v w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) v = {w}

Next tactic:
ext u
@[simp]
theorem neighborSet_fst_subgraphOfAdj {v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet v = {w} := by
  ext u
  

Proof state:
case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : Adj G v w
u : V
⊢ u ∈ Subgraph.neighborSet (subgraphOfAdj G hvw) v ↔ u ∈ {w}

Next tactic:
suffices w = u ↔ u = w by simpa [hvw.ne.symm] using this
@[simp]
theorem neighborSet_fst_subgraphOfAdj {v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet v = {w} := by
  ext u
  suffices w = u ↔ u = w by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : Adj G v w
u : V
this : w = u ↔ u = w
⊢ u ∈ Subgraph.neighborSet (subgraphOfAdj G hvw) v ↔ u ∈ {w}

Next tactic:
simpa [hvw.ne.symm] using this
@[simp]
theorem neighborSet_fst_subgraphOfAdj {v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet v = {w} := by
  ext u
  suffices w = u ↔ u = w by simpa [hvw.ne.symm] using this
  

Proof state:
case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : Adj G v w
u : V
⊢ w = u ↔ u = w

Next tactic:
rw [eq_comm]
@[simp]
theorem neighborSet_snd_subgraphOfAdj {v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet w = {v} := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : Adj G v w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) w = {v}

Next tactic:
rw [subgraphOfAdj_symm hvw.symm]
@[simp]
theorem neighborSet_snd_subgraphOfAdj {v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet w = {v} := by
  rw [subgraphOfAdj_symm hvw.symm]
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : Adj G v w
⊢ Subgraph.neighborSet (subgraphOfAdj G (_ : Adj G w v)) w = {v}

Next tactic:
exact neighborSet_fst_subgraphOfAdj hvw.symm
@[simp]
theorem neighborSet_subgraphOfAdj_of_ne_of_ne {u v w : V} (hvw : G.Adj v w) (hv : u ≠ v)
    (hw : u ≠ w) : (G.subgraphOfAdj hvw).neighborSet u = ∅ := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v w : V
hvw : Adj G v w
hv : u ≠ v
hw : u ≠ w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) u = ∅

Next tactic:
ext
@[simp]
theorem neighborSet_subgraphOfAdj_of_ne_of_ne {u v w : V} (hvw : G.Adj v w) (hv : u ≠ v)
    (hw : u ≠ w) : (G.subgraphOfAdj hvw).neighborSet u = ∅ := by
  ext
  

Proof state:
case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v w : V
hvw : Adj G v w
hv : u ≠ v
hw : u ≠ w
x✝ : V
⊢ x✝ ∈ Subgraph.neighborSet (subgraphOfAdj G hvw) u ↔ x✝ ∈ ∅

Next tactic:
simp [hv.symm, hw.symm]
theorem neighborSet_subgraphOfAdj [DecidableEq V] {u v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅ :=
  by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
inst✝ : DecidableEq V
u v w : V
hvw : Adj G v w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅

Next tactic:
split_ifs
theorem neighborSet_subgraphOfAdj [DecidableEq V] {u v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅ :=
  by split_ifs <;> 

Proof state:
case pos
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
inst✝ : DecidableEq V
u v w : V
hvw : Adj G v w
h✝¹ : u = v
h✝ : u = w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) u = {w} ∪ {v}

Next tactic:
subst_vars
theorem neighborSet_subgraphOfAdj [DecidableEq V] {u v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅ :=
  by split_ifs <;> 

Proof state:
case neg
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
inst✝ : DecidableEq V
u v w : V
hvw : Adj G v w
h✝¹ : u = v
h✝ : ¬u = w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) u = {w} ∪ ∅

Next tactic:
subst_vars
theorem neighborSet_subgraphOfAdj [DecidableEq V] {u v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅ :=
  by split_ifs <;> 

Proof state:
case pos
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
inst✝ : DecidableEq V
u v w : V
hvw : Adj G v w
h✝¹ : ¬u = v
h✝ : u = w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) u = ∅ ∪ {v}

Next tactic:
subst_vars
theorem neighborSet_subgraphOfAdj [DecidableEq V] {u v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅ :=
  by split_ifs <;> 

Proof state:
case neg
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
inst✝ : DecidableEq V
u v w : V
hvw : Adj G v w
h✝¹ : ¬u = v
h✝ : ¬u = w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) u = ∅ ∪ ∅

Next tactic:
subst_vars
theorem neighborSet_subgraphOfAdj [DecidableEq V] {u v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅ :=
  by split_ifs <;> subst_vars <;> 

Proof state:
case pos
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
inst✝ : DecidableEq V
w : V
hvw : Adj G w w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) w = {w} ∪ {w}

Next tactic:
simp [*]
theorem neighborSet_subgraphOfAdj [DecidableEq V] {u v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅ :=
  by split_ifs <;> subst_vars <;> 

Proof state:
case neg
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
inst✝ : DecidableEq V
v w : V
hvw : Adj G v w
h✝ : ¬v = w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) v = {w} ∪ ∅

Next tactic:
simp [*]
theorem neighborSet_subgraphOfAdj [DecidableEq V] {u v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅ :=
  by split_ifs <;> subst_vars <;> 

Proof state:
case pos
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
inst✝ : DecidableEq V
v w : V
hvw : Adj G v w
h✝ : ¬w = v
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) w = ∅ ∪ {v}

Next tactic:
simp [*]
theorem neighborSet_subgraphOfAdj [DecidableEq V] {u v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅ :=
  by split_ifs <;> subst_vars <;> 

Proof state:
case neg
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
inst✝ : DecidableEq V
u v w : V
hvw : Adj G v w
h✝¹ : ¬u = v
h✝ : ¬u = w
⊢ Subgraph.neighborSet (subgraphOfAdj G hvw) u = ∅ ∪ ∅

Next tactic:
simp [*]
theorem singletonSubgraph_fst_le_subgraphOfAdj {u v : V} {h : G.Adj u v} :
    G.singletonSubgraph u ≤ G.subgraphOfAdj h := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v : V
h : Adj G u v
⊢ SimpleGraph.singletonSubgraph G u ≤ subgraphOfAdj G h

Next tactic:
constructor
theorem singletonSubgraph_fst_le_subgraphOfAdj {u v : V} {h : G.Adj u v} :
    G.singletonSubgraph u ≤ G.subgraphOfAdj h := by
  constructor <;> 

Proof state:
case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v : V
h : Adj G u v
⊢ (SimpleGraph.singletonSubgraph G u).verts ⊆ (subgraphOfAdj G h).verts

Next tactic:
simp [-Set.bot_eq_empty]
theorem singletonSubgraph_fst_le_subgraphOfAdj {u v : V} {h : G.Adj u v} :
    G.singletonSubgraph u ≤ G.subgraphOfAdj h := by
  constructor <;> 

Proof state:
case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v : V
h : Adj G u v
⊢ ∀ ⦃v_1 w : V⦄, Subgraph.Adj (SimpleGraph.singletonSubgraph G u) v_1 w → Subgraph.Adj (subgraphOfAdj G h) v_1 w

Next tactic:
simp [-Set.bot_eq_empty]
theorem singletonSubgraph_fst_le_subgraphOfAdj {u v : V} {h : G.Adj u v} :
    G.singletonSubgraph u ≤ G.subgraphOfAdj h := by
  constructor <;> simp [-Set.bot_eq_empty]
  

Proof state:
case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v : V
h : Adj G u v
⊢ ∀ ⦃v_1 w : V⦄, ⊥ → u = v_1 ∧ v = w ∨ u = w ∧ v = v_1

Next tactic:
exact fun _ _ ↦ False.elim
theorem singletonSubgraph_snd_le_subgraphOfAdj {u v : V} {h : G.Adj u v} :
    G.singletonSubgraph v ≤ G.subgraphOfAdj h := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v : V
h : Adj G u v
⊢ SimpleGraph.singletonSubgraph G v ≤ subgraphOfAdj G h

Next tactic:
constructor
theorem singletonSubgraph_snd_le_subgraphOfAdj {u v : V} {h : G.Adj u v} :
    G.singletonSubgraph v ≤ G.subgraphOfAdj h := by
  constructor <;> 

Proof state:
case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v : V
h : Adj G u v
⊢ (SimpleGraph.singletonSubgraph G v).verts ⊆ (subgraphOfAdj G h).verts

Next tactic:
simp [-Set.bot_eq_empty]
theorem singletonSubgraph_snd_le_subgraphOfAdj {u v : V} {h : G.Adj u v} :
    G.singletonSubgraph v ≤ G.subgraphOfAdj h := by
  constructor <;> 

Proof state:
case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v : V
h : Adj G u v
⊢ ∀ ⦃v_1 w : V⦄, Subgraph.Adj (SimpleGraph.singletonSubgraph G v) v_1 w → Subgraph.Adj (subgraphOfAdj G h) v_1 w

Next tactic:
simp [-Set.bot_eq_empty]
theorem singletonSubgraph_snd_le_subgraphOfAdj {u v : V} {h : G.Adj u v} :
    G.singletonSubgraph v ≤ G.subgraphOfAdj h := by
  constructor <;> simp [-Set.bot_eq_empty]
  

Proof state:
case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v : V
h : Adj G u v
⊢ ∀ ⦃v_1 w : V⦄, ⊥ → u = v_1 ∧ v = w ∨ u = w ∧ v = v_1

Next tactic:
exact fun _ _ ↦ False.elim
lemma coeSubgraph_adj {G' : G.Subgraph} (G'' : G'.coe.Subgraph) (v w : V) :
    (G'.coeSubgraph G'').Adj v w ↔
      ∃ (hv : v ∈ G'.verts) (hw : w ∈ G'.verts), G''.Adj ⟨v, hv⟩ ⟨w, hw⟩ := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
G'' : Subgraph (Subgraph.coe G')
v w : V
⊢ Adj (Subgraph.coeSubgraph G'') v w ↔
    ∃ (hv : v ∈ G'.verts) (hw : w ∈ G'.verts), Adj G'' { val := v, property := hv } { val := w, property := hw }

Next tactic:
simp [Relation.Map]
theorem restrict_coeSubgraph {G' : G.Subgraph} (G'' : G'.coe.Subgraph) :
    Subgraph.restrict (Subgraph.coeSubgraph G'') = G'' := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
G'' : Subgraph (Subgraph.coe G')
⊢ Subgraph.restrict (Subgraph.coeSubgraph G'') = G''

Next tactic:
ext
theorem restrict_coeSubgraph {G' : G.Subgraph} (G'' : G'.coe.Subgraph) :
    Subgraph.restrict (Subgraph.coeSubgraph G'') = G'' := by
  ext
  · 

Proof state:
case verts.h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
G'' : Subgraph (Subgraph.coe G')
x✝ : ↑G'.verts
⊢ x✝ ∈ (Subgraph.restrict (Subgraph.coeSubgraph G'')).verts ↔ x✝ ∈ G''.verts

Next tactic:
simp
theorem restrict_coeSubgraph {G' : G.Subgraph} (G'' : G'.coe.Subgraph) :
    Subgraph.restrict (Subgraph.coeSubgraph G'') = G'' := by
  ext
  · simp
  · 

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
G'' : Subgraph (Subgraph.coe G')
x✝¹ x✝ : ↑G'.verts
⊢ Adj (Subgraph.restrict (Subgraph.coeSubgraph G'')) x✝¹ x✝ ↔ Adj G'' x✝¹ x✝

Next tactic:
rw [restrict_adj, coeSubgraph_adj]
theorem restrict_coeSubgraph {G' : G.Subgraph} (G'' : G'.coe.Subgraph) :
    Subgraph.restrict (Subgraph.coeSubgraph G'') = G'' := by
  ext
  · simp
  · rw [restrict_adj, coeSubgraph_adj]
    

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
G'' : Subgraph (Subgraph.coe G')
x✝¹ x✝ : ↑G'.verts
⊢ (Adj G' ↑x✝¹ ↑x✝ ∧
      ∃ (hv : ↑x✝¹ ∈ G'.verts) (hw : ↑x✝ ∈ G'.verts),
        Adj G'' { val := ↑x✝¹, property := hv } { val := ↑x✝, property := hw }) ↔
    Adj G'' x✝¹ x✝

Next tactic:
simpa using G''.adj_sub
lemma coeSubgraph_le {H : G.Subgraph} (H' : H.coe.Subgraph) :
    Subgraph.coeSubgraph H' ≤ H := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
H : Subgraph G
H' : Subgraph (Subgraph.coe H)
⊢ Subgraph.coeSubgraph H' ≤ H

Next tactic:
constructor
lemma coeSubgraph_le {H : G.Subgraph} (H' : H.coe.Subgraph) :
    Subgraph.coeSubgraph H' ≤ H := by
  constructor
  · 

Proof state:
case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
H : Subgraph G
H' : Subgraph (Subgraph.coe H)
⊢ (Subgraph.coeSubgraph H').verts ⊆ H.verts

Next tactic:
simp
lemma coeSubgraph_le {H : G.Subgraph} (H' : H.coe.Subgraph) :
    Subgraph.coeSubgraph H' ≤ H := by
  constructor
  · simp
  · 

Proof state:
case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
H : Subgraph G
H' : Subgraph (Subgraph.coe H)
⊢ ∀ ⦃v w : V⦄, Adj (Subgraph.coeSubgraph H') v w → Adj H v w

Next tactic:
rintro v w ⟨_, _, h, rfl, rfl⟩
lemma coeSubgraph_le {H : G.Subgraph} (H' : H.coe.Subgraph) :
    Subgraph.coeSubgraph H' ≤ H := by
  constructor
  · simp
  · rintro v w ⟨_, _, h, rfl, rfl⟩
    

Proof state:
case right.intro.intro.intro.intro
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
H : Subgraph G
H' : Subgraph (Subgraph.coe H)
w✝¹ w✝ : ↑H.verts
h : Adj H' w✝¹ w✝
⊢ Adj H ((Subgraph.hom H) w✝¹) ((Subgraph.hom H) w✝)

Next tactic:
exact H'.adj_sub h
lemma coeSubgraph_restrict_eq {H : G.Subgraph} (H' : G.Subgraph) :
    Subgraph.coeSubgraph (H.restrict H') = H ⊓ H' := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
H H' : Subgraph G
⊢ Subgraph.coeSubgraph (Subgraph.restrict H') = H ⊓ H'

Next tactic:
ext
lemma coeSubgraph_restrict_eq {H : G.Subgraph} (H' : G.Subgraph) :
    Subgraph.coeSubgraph (H.restrict H') = H ⊓ H' := by
  ext
  · 

Proof state:
case verts.h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
H H' : Subgraph G
x✝ : V
⊢ x✝ ∈ (Subgraph.coeSubgraph (Subgraph.restrict H')).verts ↔ x✝ ∈ (H ⊓ H').verts

Next tactic:
simp [and_comm]
lemma coeSubgraph_restrict_eq {H : G.Subgraph} (H' : G.Subgraph) :
    Subgraph.coeSubgraph (H.restrict H') = H ⊓ H' := by
  ext
  · simp [and_comm]
  · 

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
H H' : Subgraph G
x✝¹ x✝ : V
⊢ Adj (Subgraph.coeSubgraph (Subgraph.restrict H')) x✝¹ x✝ ↔ Adj (H ⊓ H') x✝¹ x✝

Next tactic:
simp_rw [coeSubgraph_adj, restrict_adj]
lemma coeSubgraph_restrict_eq {H : G.Subgraph} (H' : G.Subgraph) :
    Subgraph.coeSubgraph (H.restrict H') = H ⊓ H' := by
  ext
  · simp [and_comm]
  · simp_rw [coeSubgraph_adj, restrict_adj]
    

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
H H' : Subgraph G
x✝¹ x✝ : V
⊢ (∃ (_ : x✝¹ ∈ H.verts) (_ : x✝ ∈ H.verts), Adj H x✝¹ x✝ ∧ Adj H' x✝¹ x✝) ↔ Adj (H ⊓ H') x✝¹ x✝

Next tactic:
simp only [exists_and_left, exists_prop, ge_iff_le, inf_adj, and_congr_right_iff]
lemma coeSubgraph_restrict_eq {H : G.Subgraph} (H' : G.Subgraph) :
    Subgraph.coeSubgraph (H.restrict H') = H ⊓ H' := by
  ext
  · simp [and_comm]
  · simp_rw [coeSubgraph_adj, restrict_adj]
    simp only [exists_and_left, exists_prop, ge_iff_le, inf_adj, and_congr_right_iff]
    

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
H H' : Subgraph G
x✝¹ x✝ : V
⊢ Adj H x✝¹ x✝ → (x✝ ∈ H.verts ∧ x✝¹ ∈ H.verts ∧ Adj H' x✝¹ x✝ ↔ Adj H' x✝¹ x✝)

Next tactic:
intro h
lemma coeSubgraph_restrict_eq {H : G.Subgraph} (H' : G.Subgraph) :
    Subgraph.coeSubgraph (H.restrict H') = H ⊓ H' := by
  ext
  · simp [and_comm]
  · simp_rw [coeSubgraph_adj, restrict_adj]
    simp only [exists_and_left, exists_prop, ge_iff_le, inf_adj, and_congr_right_iff]
    intro h
    

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
H H' : Subgraph G
x✝¹ x✝ : V
h : Adj H x✝¹ x✝
⊢ x✝ ∈ H.verts ∧ x✝¹ ∈ H.verts ∧ Adj H' x✝¹ x✝ ↔ Adj H' x✝¹ x✝

Next tactic:
simp [H.edge_vert h, H.edge_vert h.symm]
/-- Given a subgraph `G'` and a set of vertex pairs, remove all of the corresponding edges
from its edge set, if present.

See also: `SimpleGraph.deleteEdges`. -/
def deleteEdges (G' : G.Subgraph) (s : Set (Sym2 V)) : G.Subgraph where
  verts := G'.verts
  Adj := G'.Adj \ Sym2.ToRel s
  adj_sub h' := G'.adj_sub h'.1
  edge_vert h' := G'.edge_vert h'.1
  symm a b := by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s : Set (Sym2 V)
a b : V
⊢ (G'.Adj \ Sym2.ToRel s) a b → (G'.Adj \ Sym2.ToRel s) b a

Next tactic:
simp [G'.adj_comm, Sym2.eq_swap]
@[simp]
theorem deleteEdges_deleteEdges (s s' : Set (Sym2 V)) :
    (G'.deleteEdges s).deleteEdges s' = G'.deleteEdges (s ∪ s') := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s✝ s s' : Set (Sym2 V)
⊢ deleteEdges (deleteEdges G' s) s' = deleteEdges G' (s ∪ s')

Next tactic:
ext
@[simp]
theorem deleteEdges_deleteEdges (s s' : Set (Sym2 V)) :
    (G'.deleteEdges s).deleteEdges s' = G'.deleteEdges (s ∪ s') := by
  ext <;> 

Proof state:
case verts.h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s✝ s s' : Set (Sym2 V)
x✝ : V
⊢ x✝ ∈ (deleteEdges (deleteEdges G' s) s').verts ↔ x✝ ∈ (deleteEdges G' (s ∪ s')).verts

Next tactic:
simp [and_assoc, not_or]
@[simp]
theorem deleteEdges_deleteEdges (s s' : Set (Sym2 V)) :
    (G'.deleteEdges s).deleteEdges s' = G'.deleteEdges (s ∪ s') := by
  ext <;> 

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s✝ s s' : Set (Sym2 V)
x✝¹ x✝ : V
⊢ Adj (deleteEdges (deleteEdges G' s) s') x✝¹ x✝ ↔ Adj (deleteEdges G' (s ∪ s')) x✝¹ x✝

Next tactic:
simp [and_assoc, not_or]
@[simp]
theorem deleteEdges_empty_eq : G'.deleteEdges ∅ = G' := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s : Set (Sym2 V)
⊢ deleteEdges G' ∅ = G'

Next tactic:
ext
@[simp]
theorem deleteEdges_empty_eq : G'.deleteEdges ∅ = G' := by
  ext <;> 

Proof state:
case verts.h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s : Set (Sym2 V)
x✝ : V
⊢ x✝ ∈ (deleteEdges G' ∅).verts ↔ x✝ ∈ G'.verts

Next tactic:
simp
@[simp]
theorem deleteEdges_empty_eq : G'.deleteEdges ∅ = G' := by
  ext <;> 

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s : Set (Sym2 V)
x✝¹ x✝ : V
⊢ Adj (deleteEdges G' ∅) x✝¹ x✝ ↔ Adj G' x✝¹ x✝

Next tactic:
simp
@[simp]
theorem deleteEdges_spanningCoe_eq :
    G'.spanningCoe.deleteEdges s = (G'.deleteEdges s).spanningCoe := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s : Set (Sym2 V)
⊢ SimpleGraph.deleteEdges (Subgraph.spanningCoe G') s = Subgraph.spanningCoe (deleteEdges G' s)

Next tactic:
ext
@[simp]
theorem deleteEdges_spanningCoe_eq :
    G'.spanningCoe.deleteEdges s = (G'.deleteEdges s).spanningCoe := by
  ext
  

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s : Set (Sym2 V)
x✝¹ x✝ : V
⊢ SimpleGraph.Adj (SimpleGraph.deleteEdges (Subgraph.spanningCoe G') s) x✝¹ x✝ ↔
    SimpleGraph.Adj (Subgraph.spanningCoe (deleteEdges G' s)) x✝¹ x✝

Next tactic:
simp
theorem deleteEdges_coe_eq (s : Set (Sym2 G'.verts)) :
    G'.coe.deleteEdges s = (G'.deleteEdges (Sym2.map (↑) '' s)).coe := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
⊢ SimpleGraph.deleteEdges (Subgraph.coe G') s = Subgraph.coe (deleteEdges G' (Sym2.map Subtype.val '' s))

Next tactic:
ext ⟨v, hv⟩ ⟨w, hw⟩
theorem deleteEdges_coe_eq (s : Set (Sym2 G'.verts)) :
    G'.coe.deleteEdges s = (G'.deleteEdges (Sym2.map (↑) '' s)).coe := by
  ext ⟨v, hv⟩ ⟨w, hw⟩
  

Proof state:
case Adj.h.mk.h.mk.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
⊢ SimpleGraph.Adj (SimpleGraph.deleteEdges (Subgraph.coe G') s) { val := v, property := hv }
      { val := w, property := hw } ↔
    SimpleGraph.Adj (Subgraph.coe (deleteEdges G' (Sym2.map Subtype.val '' s))) { val := v, property := hv }
      { val := w, property := hw }

Next tactic:
simp only [SimpleGraph.deleteEdges_adj, coe_adj, deleteEdges_adj, Set.mem_image, not_exists,
    not_and, and_congr_right_iff]
theorem deleteEdges_coe_eq (s : Set (Sym2 G'.verts)) :
    G'.coe.deleteEdges s = (G'.deleteEdges (Sym2.map (↑) '' s)).coe := by
  ext ⟨v, hv⟩ ⟨w, hw⟩
  simp only [SimpleGraph.deleteEdges_adj, coe_adj, deleteEdges_adj, Set.mem_image, not_exists,
    not_and, and_congr_right_iff]
  

Proof state:
case Adj.h.mk.h.mk.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
⊢ Adj G' v w →
    (⟦({ val := v, property := hv }, { val := w, property := hw })⟧ ∉ s ↔ ∀ x ∈ s, ¬Sym2.map Subtype.val x = ⟦(v, w)⟧)

Next tactic:
intro
theorem deleteEdges_coe_eq (s : Set (Sym2 G'.verts)) :
    G'.coe.deleteEdges s = (G'.deleteEdges (Sym2.map (↑) '' s)).coe := by
  ext ⟨v, hv⟩ ⟨w, hw⟩
  simp only [SimpleGraph.deleteEdges_adj, coe_adj, deleteEdges_adj, Set.mem_image, not_exists,
    not_and, and_congr_right_iff]
  intro
  

Proof state:
case Adj.h.mk.h.mk.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : Adj G' v w
⊢ ⟦({ val := v, property := hv }, { val := w, property := hw })⟧ ∉ s ↔ ∀ x ∈ s, ¬Sym2.map Subtype.val x = ⟦(v, w)⟧

Next tactic:
constructor
theorem deleteEdges_coe_eq (s : Set (Sym2 G'.verts)) :
    G'.coe.deleteEdges s = (G'.deleteEdges (Sym2.map (↑) '' s)).coe := by
  ext ⟨v, hv⟩ ⟨w, hw⟩
  simp only [SimpleGraph.deleteEdges_adj, coe_adj, deleteEdges_adj, Set.mem_image, not_exists,
    not_and, and_congr_right_iff]
  intro
  constructor
  · 

Proof state:
case Adj.h.mk.h.mk.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : Adj G' v w
⊢ ⟦({ val := v, property := hv }, { val := w, property := hw })⟧ ∉ s → ∀ x ∈ s, ¬Sym2.map Subtype.val x = ⟦(v, w)⟧

Next tactic:
intro hs
theorem deleteEdges_coe_eq (s : Set (Sym2 G'.verts)) :
    G'.coe.deleteEdges s = (G'.deleteEdges (Sym2.map (↑) '' s)).coe := by
  ext ⟨v, hv⟩ ⟨w, hw⟩
  simp only [SimpleGraph.deleteEdges_adj, coe_adj, deleteEdges_adj, Set.mem_image, not_exists,
    not_and, and_congr_right_iff]
  intro
  constructor
  · intro hs
    

Proof state:
case Adj.h.mk.h.mk.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : Adj G' v w
hs : ⟦({ val := v, property := hv }, { val := w, property := hw })⟧ ∉ s
⊢ ∀ x ∈ s, ¬Sym2.map Subtype.val x = ⟦(v, w)⟧

Next tactic:
refine' Sym2.ind _
theorem deleteEdges_coe_eq (s : Set (Sym2 G'.verts)) :
    G'.coe.deleteEdges s = (G'.deleteEdges (Sym2.map (↑) '' s)).coe := by
  ext ⟨v, hv⟩ ⟨w, hw⟩
  simp only [SimpleGraph.deleteEdges_adj, coe_adj, deleteEdges_adj, Set.mem_image, not_exists,
    not_and, and_congr_right_iff]
  intro
  constructor
  · intro hs
    refine' Sym2.ind _
    

Proof state:
case Adj.h.mk.h.mk.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : Adj G' v w
hs : ⟦({ val := v, property := hv }, { val := w, property := hw })⟧ ∉ s
⊢ ∀ (x y : ↑G'.verts), ⟦(x, y)⟧ ∈ s → ¬Sym2.map Subtype.val ⟦(x, y)⟧ = ⟦(v, w)⟧

Next tactic:
rintro ⟨v', hv'⟩ ⟨w', hw'⟩