Theorem: SimpleGraph.chromaticNumber_le_iff_colorable
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

Proof steps:
state_before: V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
⊢ G.chromaticNumber ≤ ↑n ↔ G.Colorable n
state_after: V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : G.chromaticNumber ≤ ↑n
⊢ G.Colorable n
tactic: refine ⟨fun h ↦ ?_, Colorable.chromaticNumber_le⟩
state_before: V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : G.chromaticNumber ≤ ↑n
⊢ G.Colorable n
state_after: V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : G.chromaticNumber ≤ ↑n
this : G.chromaticNumber ≠ ⊤
⊢ G.Colorable n
tactic: have : G.chromaticNumber ≠ ⊤ := (trans h (WithTop.coe_lt_top n)).ne
state_before: V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : G.chromaticNumber ≤ ↑n
this : G.chromaticNumber ≠ ⊤
⊢ G.Colorable n
state_after: V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : G.chromaticNumber ≤ ↑n
this : ∃ n, G.Colorable n
⊢ G.Colorable n
tactic: rw [chromaticNumber_ne_top_iff_exists] at this
state_before: V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : G.chromaticNumber ≤ ↑n
this : ∃ n, G.Colorable n
⊢ G.Colorable n
state_after: case intro
V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : G.chromaticNumber ≤ ↑n
m : ℕ
hm : G.Colorable m
⊢ G.Colorable n
tactic: obtain ⟨m, hm⟩ := this
state_before: case intro
V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : G.chromaticNumber ≤ ↑n
m : ℕ
hm : G.Colorable m
⊢ G.Colorable n
state_after: case intro
V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : sInf {n' | G.Colorable n'} ≤ n
m : ℕ
hm : G.Colorable m
⊢ G.Colorable n
tactic: rw [hm.chromaticNumber_eq_sInf, Nat.cast_le] at h
state_before: case intro
V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : sInf {n' | G.Colorable n'} ≤ n
m : ℕ
hm : G.Colorable m
⊢ G.Colorable n
state_after: case intro
V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : sInf {n' | G.Colorable n'} ≤ n
m : ℕ
hm : G.Colorable m
this : sInf {n' | G.Colorable n'} ∈ {n' | G.Colorable n'}
⊢ G.Colorable n
tactic: have := Nat.sInf_mem (⟨m, hm⟩ : {n' | G.Colorable n'}.Nonempty)
state_before: case intro
V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : sInf {n' | G.Colorable n'} ≤ n
m : ℕ
hm : G.Colorable m
this : sInf {n' | G.Colorable n'} ∈ {n' | G.Colorable n'}
⊢ G.Colorable n
state_after: case intro
V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : sInf {n' | G.Colorable n'} ≤ n
m : ℕ
hm : G.Colorable m
this : G.Colorable (sInf {n' | G.Colorable n'})
⊢ G.Colorable n
tactic: rw [Set.mem_setOf_eq] at this
state_before: case intro
V : Type u
G : SimpleGraph V
n✝ : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
n : ℕ
h : sInf {n' | G.Colorable n'} ≤ n
m : ℕ
hm : G.Colorable m
this : G.Colorable (sInf {n' | G.Colorable n'})
⊢ G.Colorable n
state_after: no goals
tactic: exact this.mono h