Theorem: SimpleGraph.dart_fst_fiber
File: Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean

tactic: ext d
state_before: V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
⊢ filter (fun d => d.toProd.1 = v) univ = image (G.dartOfNeighborSet v) univ
state_after: case a
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : G.Dart
⊢ d ∈ filter (fun d => d.toProd.1 = v) univ ↔ d ∈ image (G.dartOfNeighborSet v) univ

tactic: simp only [mem_image, true_and_iff, mem_filter, SetCoe.exists, mem_univ, exists_prop_of_true]
state_before: case a
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : G.Dart
⊢ d ∈ filter (fun d => d.toProd.1 = v) univ ↔ d ∈ image (G.dartOfNeighborSet v) univ
state_after: case a
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : G.Dart
⊢ d.toProd.1 = v ↔ ∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d

tactic: constructor
state_before: case a
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : G.Dart
⊢ d.toProd.1 = v ↔ ∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d
state_after: case a.mp
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : G.Dart
⊢ d.toProd.1 = v → ∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d

case a.mpr
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : G.Dart
⊢ (∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d) → d.toProd.1 = v

tactic: rintro rfl
state_before: case a.mp
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : G.Dart
⊢ d.toProd.1 = v → ∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d
state_after: case a.mp
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
d : G.Dart
⊢ ∃ x, ∃ (h : x ∈ G.neighborSet d.toProd.1), G.dartOfNeighborSet d.toProd.1 ⟨x, h⟩ = d

tactic: exact ⟨_, d.adj, by ext <;> rfl⟩
state_before: case a.mp
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
d : G.Dart
⊢ ∃ x, ∃ (h : x ∈ G.neighborSet d.toProd.1), G.dartOfNeighborSet d.toProd.1 ⟨x, h⟩ = d
state_after: no goals

tactic: ext <;> rfl
state_before: V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
d : G.Dart
⊢ G.dartOfNeighborSet d.toProd.1 ⟨d.toProd.2, ⋯⟩ = d
state_after: no goals

tactic: rintro ⟨e, he, rfl⟩
state_before: case a.mpr
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : G.Dart
⊢ (∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d) → d.toProd.1 = v
state_after: case a.mpr.intro.intro
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v e : V
he : e ∈ G.neighborSet v
⊢ (G.dartOfNeighborSet v ⟨e, he⟩).toProd.1 = v

tactic: rfl
state_before: case a.mpr.intro.intro
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v e : V
he : e ∈ G.neighborSet v
⊢ (G.dartOfNeighborSet v ⟨e, he⟩).toProd.1 = v
state_after: no goals