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

Proof steps:
state_before: V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
state_after: V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
this : DecidableEq V
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
tactic: haveI := Classical.decEq V
state_before: V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
this : DecidableEq V
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
state_after: case intro
V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
this : DecidableEq V
k : ℕ
hg : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card = 2 * k + 1
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
tactic: rcases G.odd_card_odd_degree_vertices_ne v h with ⟨k, hg⟩
state_before: case intro
V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
this : DecidableEq V
k : ℕ
hg : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card = 2 * k + 1
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
state_after: case intro
V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
this : DecidableEq V
k : ℕ
hg : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card = 2 * k + 1
hg' : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card > 0
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
tactic: have hg' : (filter (fun w : V => w ≠ v ∧ Odd (G.degree w)) univ).card > 0 := by
    rw [hg]
    apply Nat.succ_pos
state_before: case intro
V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
this : DecidableEq V
k : ℕ
hg : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card = 2 * k + 1
hg' : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card > 0
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
state_after: case intro.intro
V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
this : DecidableEq V
k : ℕ
hg : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card = 2 * k + 1
hg' : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card > 0
w : V
hw : w ∈ filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
tactic: rcases card_pos.mp hg' with ⟨w, hw⟩
state_before: case intro.intro
V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
this : DecidableEq V
k : ℕ
hg : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card = 2 * k + 1
hg' : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card > 0
w : V
hw : w ∈ filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
state_after: case intro.intro
V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
this : DecidableEq V
k : ℕ
hg : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card = 2 * k + 1
hg' : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card > 0
w : V
hw : ¬w = v ∧ Odd (G.degree w)
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
tactic: simp only [true_and_iff, mem_filter, mem_univ, Ne] at hw
state_before: case intro.intro
V : Type u
G : SimpleGraph V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
h : Odd (G.degree v)
this : DecidableEq V
k : ℕ
hg : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card = 2 * k + 1
hg' : (filter (fun w => w ≠ v ∧ Odd (G.degree w)) univ).card > 0
w : V
hw : ¬w = v ∧ Odd (G.degree w)
⊢ ∃ w, w ≠ v ∧ Odd (G.degree w)
state_after: no goals
tactic: exact ⟨w, hw⟩