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

tactic: ext
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ Subgraph.map f (G.subgraphOfAdj hvw) = G'.subgraphOfAdj ⋯
state_after: case verts.h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝ : W
⊢ x✝ ∈ (Subgraph.map f (G.subgraphOfAdj hvw)).verts ↔ x✝ ∈ (G'.subgraphOfAdj ⋯).verts

case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝¹ x✝ : W
⊢ (Subgraph.map f (G.subgraphOfAdj hvw)).Adj x✝¹ x✝ ↔ (G'.subgraphOfAdj ⋯).Adj x✝¹ x✝

tactic: simp only [Subgraph.map_verts, subgraphOfAdj_verts, Set.mem_image, Set.mem_insert_iff,
  Set.mem_singleton_iff]
state_before: case verts.h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝ : W
⊢ x✝ ∈ (Subgraph.map f (G.subgraphOfAdj hvw)).verts ↔ x✝ ∈ (G'.subgraphOfAdj ⋯).verts
state_after: case verts.h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝ : W
⊢ (∃ x, (x = v ∨ x = w) ∧ f x = x✝) ↔ x✝ = f v ∨ x✝ = f w

tactic: constructor
state_before: case verts.h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝ : W
⊢ (∃ x, (x = v ∨ x = w) ∧ f x = x✝) ↔ x✝ = f v ∨ x✝ = f w
state_after: case verts.h.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝ : W
⊢ (∃ x, (x = v ∨ x = w) ∧ f x = x✝) → x✝ = f v ∨ x✝ = f w

case verts.h.mpr
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝ : W
⊢ x✝ = f v ∨ x✝ = f w → ∃ x, (x = v ∨ x = w) ∧ f x = x✝

tactic: rintro ⟨u, rfl | rfl, rfl⟩ <;> simp
state_before: case verts.h.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝ : W
⊢ (∃ x, (x = v ∨ x = w) ∧ f x = x✝) → x✝ = f v ∨ x✝ = f w
state_after: no goals

tactic: rintro (rfl | rfl)
state_before: case verts.h.mpr
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝ : W
⊢ x✝ = f v ∨ x✝ = f w → ∃ x, (x = v ∨ x = w) ∧ f x = x✝
state_after: case verts.h.mpr.inl
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ ∃ x, (x = v ∨ x = w) ∧ f x = f v

case verts.h.mpr.inr
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ ∃ x, (x = v ∨ x = w) ∧ f x = f w

tactic: use v
state_before: case verts.h.mpr.inl
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ ∃ x, (x = v ∨ x = w) ∧ f x = f v
state_after: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ (v = v ∨ v = w) ∧ f v = f v

tactic: simp
state_before: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ (v = v ∨ v = w) ∧ f v = f v
state_after: no goals

tactic: use w
state_before: case verts.h.mpr.inr
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ ∃ x, (x = v ∨ x = w) ∧ f x = f w
state_after: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ (w = v ∨ w = w) ∧ f w = f w

tactic: simp
state_before: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ (w = v ∨ w = w) ∧ f w = f w
state_after: no goals

tactic: simp only [Relation.Map, Subgraph.map_adj, subgraphOfAdj_adj, Sym2.eq, Sym2.rel_iff]
state_before: case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝¹ x✝ : W
⊢ (Subgraph.map f (G.subgraphOfAdj hvw)).Adj x✝¹ x✝ ↔ (G'.subgraphOfAdj ⋯).Adj x✝¹ x✝
state_after: case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝¹ x✝ : W
⊢ (∃ a b, (v = a ∧ w = b ∨ v = b ∧ w = a) ∧ f a = x✝¹ ∧ f b = x✝) ↔ f v = x✝¹ ∧ f w = x✝ ∨ f v = x✝ ∧ f w = x✝¹

tactic: constructor
state_before: case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝¹ x✝ : W
⊢ (∃ a b, (v = a ∧ w = b ∨ v = b ∧ w = a) ∧ f a = x✝¹ ∧ f b = x✝) ↔ f v = x✝¹ ∧ f w = x✝ ∨ f v = x✝ ∧ f w = x✝¹
state_after: case Adj.h.h.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝¹ x✝ : W
⊢ (∃ a b, (v = a ∧ w = b ∨ v = b ∧ w = a) ∧ f a = x✝¹ ∧ f b = x✝) → f v = x✝¹ ∧ f w = x✝ ∨ f v = x✝ ∧ f w = x✝¹

case Adj.h.h.a.mpr
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝¹ x✝ : W
⊢ f v = x✝¹ ∧ f w = x✝ ∨ f v = x✝ ∧ f w = x✝¹ → ∃ a b, (v = a ∧ w = b ∨ v = b ∧ w = a) ∧ f a = x✝¹ ∧ f b = x✝

tactic: rintro ⟨a, b, ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩, rfl, rfl⟩ <;> simp
state_before: case Adj.h.h.a.mp
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝¹ x✝ : W
⊢ (∃ a b, (v = a ∧ w = b ∨ v = b ∧ w = a) ∧ f a = x✝¹ ∧ f b = x✝) → f v = x✝¹ ∧ f w = x✝ ∨ f v = x✝ ∧ f w = x✝¹
state_after: no goals

tactic: rintro (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)
state_before: case Adj.h.h.a.mpr
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
x✝¹ x✝ : W
⊢ f v = x✝¹ ∧ f w = x✝ ∨ f v = x✝ ∧ f w = x✝¹ → ∃ a b, (v = a ∧ w = b ∨ v = b ∧ w = a) ∧ f a = x✝¹ ∧ f b = x✝
state_after: case Adj.h.h.a.mpr.inl.intro
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ ∃ a b, (v = a ∧ w = b ∨ v = b ∧ w = a) ∧ f a = f v ∧ f b = f w

case Adj.h.h.a.mpr.inr.intro
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ ∃ a b, (v = a ∧ w = b ∨ v = b ∧ w = a) ∧ f a = f w ∧ f b = f v

tactic: use v, w
state_before: case Adj.h.h.a.mpr.inl.intro
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ ∃ a b, (v = a ∧ w = b ∨ v = b ∧ w = a) ∧ f a = f v ∧ f b = f w
state_after: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ (v = v ∧ w = w ∨ v = w ∧ w = v) ∧ f v = f v ∧ f w = f w

tactic: simp
state_before: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ (v = v ∧ w = w ∨ v = w ∧ w = v) ∧ f v = f v ∧ f w = f w
state_after: no goals

tactic: use w, v
state_before: case Adj.h.h.a.mpr.inr.intro
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ ∃ a b, (v = a ∧ w = b ∨ v = b ∧ w = a) ∧ f a = f w ∧ f b = f v
state_after: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ (v = w ∧ w = v ∨ v = v ∧ w = w) ∧ f w = f w ∧ f v = f v

tactic: simp
state_before: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
v w : V
hvw : G.Adj v w
⊢ (v = w ∧ w = v ∨ v = v ∧ w = w) ∧ f w = f w ∧ f v = f v
state_after: no goals