Theorem: SimpleGraph.Subgraph.deleteEdges_coe_eq
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: ext ⟨v, hv⟩ ⟨w, hw⟩
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
⊢ G'.coe.deleteEdges s = (G'.deleteEdges (Sym2.map Subtype.val '' s)).coe
state_after: case Adj.h.mk.h.mk.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
⊢ (G'.coe.deleteEdges s).Adj ⟨v, hv⟩ ⟨w, hw⟩ ↔ (G'.deleteEdges (Sym2.map Subtype.val '' s)).coe.Adj ⟨v, hv⟩ ⟨w, hw⟩

tactic: simp only [SimpleGraph.deleteEdges_adj, coe_adj, deleteEdges_adj, Set.mem_image, not_exists,
  not_and, and_congr_right_iff]
state_before: case Adj.h.mk.h.mk.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
⊢ (G'.coe.deleteEdges s).Adj ⟨v, hv⟩ ⟨w, hw⟩ ↔ (G'.deleteEdges (Sym2.map Subtype.val '' s)).coe.Adj ⟨v, hv⟩ ⟨w, hw⟩
state_after: case Adj.h.mk.h.mk.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
⊢ G'.Adj v w → (s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s ↔ ∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w))

tactic: intro
state_before: case Adj.h.mk.h.mk.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
⊢ G'.Adj v w → (s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s ↔ ∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w))
state_after: case Adj.h.mk.h.mk.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
⊢ s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s ↔ ∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w)

tactic: constructor
state_before: case Adj.h.mk.h.mk.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
⊢ s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s ↔ ∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w)
state_after: case Adj.h.mk.h.mk.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
⊢ s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s → ∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w)

case Adj.h.mk.h.mk.a.mpr
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
⊢ (∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w)) → s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s

tactic: intro hs
state_before: case Adj.h.mk.h.mk.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
⊢ s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s → ∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w)
state_after: case Adj.h.mk.h.mk.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
⊢ ∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w)

tactic: refine Sym2.ind ?_
state_before: case Adj.h.mk.h.mk.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
⊢ ∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w)
state_after: case Adj.h.mk.h.mk.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
⊢ ∀ (x y : ↑G'.verts), s(x, y) ∈ s → ¬Sym2.map Subtype.val s(x, y) = s(v, w)

tactic: rintro ⟨v', hv'⟩ ⟨w', hw'⟩
state_before: case Adj.h.mk.h.mk.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
⊢ ∀ (x y : ↑G'.verts), s(x, y) ∈ s → ¬Sym2.map Subtype.val s(x, y) = s(v, w)
state_after: case Adj.h.mk.h.mk.a.mp.mk.mk
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
v' : V
hv' : v' ∈ G'.verts
w' : V
hw' : w' ∈ G'.verts
⊢ s(⟨v', hv'⟩, ⟨w', hw'⟩) ∈ s → ¬Sym2.map Subtype.val s(⟨v', hv'⟩, ⟨w', hw'⟩) = s(v, w)

tactic: simp only [Sym2.map_pair_eq, Sym2.eq]
state_before: case Adj.h.mk.h.mk.a.mp.mk.mk
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
v' : V
hv' : v' ∈ G'.verts
w' : V
hw' : w' ∈ G'.verts
⊢ s(⟨v', hv'⟩, ⟨w', hw'⟩) ∈ s → ¬Sym2.map Subtype.val s(⟨v', hv'⟩, ⟨w', hw'⟩) = s(v, w)
state_after: case Adj.h.mk.h.mk.a.mp.mk.mk
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
v' : V
hv' : v' ∈ G'.verts
w' : V
hw' : w' ∈ G'.verts
⊢ s(⟨v', hv'⟩, ⟨w', hw'⟩) ∈ s → ¬Sym2.Rel V (v', w') (v, w)

tactic: contrapose!
state_before: case Adj.h.mk.h.mk.a.mp.mk.mk
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
v' : V
hv' : v' ∈ G'.verts
w' : V
hw' : w' ∈ G'.verts
⊢ s(⟨v', hv'⟩, ⟨w', hw'⟩) ∈ s → ¬Sym2.Rel V (v', w') (v, w)
state_after: case Adj.h.mk.h.mk.a.mp.mk.mk
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
v' : V
hv' : v' ∈ G'.verts
w' : V
hw' : w' ∈ G'.verts
⊢ Sym2.Rel V (v', w') (v, w) → s(⟨v', hv'⟩, ⟨w', hw'⟩) ∉ s

tactic: rintro (_ | _) <;> simpa only [Sym2.eq_swap]
state_before: case Adj.h.mk.h.mk.a.mp.mk.mk
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
v' : V
hv' : v' ∈ G'.verts
w' : V
hw' : w' ∈ G'.verts
⊢ Sym2.Rel V (v', w') (v, w) → s(⟨v', hv'⟩, ⟨w', hw'⟩) ∉ s
state_after: no goals

tactic: intro h' hs
state_before: case Adj.h.mk.h.mk.a.mpr
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
⊢ (∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w)) → s(⟨v, hv⟩, ⟨w, hw⟩) ∉ s
state_after: case Adj.h.mk.h.mk.a.mpr
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
h' : ∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w)
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∈ s
⊢ False

tactic: exact h' _ hs rfl
state_before: case Adj.h.mk.h.mk.a.mpr
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ : Set (Sym2 V)
s : Set (Sym2 ↑G'.verts)
v : V
hv : v ∈ G'.verts
w : V
hw : w ∈ G'.verts
a✝ : G'.Adj v w
h' : ∀ x ∈ s, ¬Sym2.map Subtype.val x = s(v, w)
hs : s(⟨v, hv⟩, ⟨w, hw⟩) ∈ s
⊢ False
state_after: no goals