Theorem: SimpleGraph.ComponentCompl.infinite_iff_in_all_ranges
File: Mathlib/Combinatorics/SimpleGraph/Ends/Defs.lean

tactic: constructor
state_before: V : Type u
G : SimpleGraph V
K✝ L L' M : Set V
K : Finset V
C : ComponentCompl G ↑K
⊢ Set.Infinite (supp C) ↔ ∀ (L : Finset V) (h : K ⊆ L), ∃ D, hom h D = C

tactic: rintro Cinf L h
state_before: case mp
V : Type u
G : SimpleGraph V
K✝ L L' M : Set V
K : Finset V
C : ComponentCompl G ↑K
⊢ Set.Infinite (supp C) → ∀ (L : Finset V) (h : K ⊆ L), ∃ D, hom h D = C

tactic: obtain ⟨v, ⟨vK, rfl⟩, vL⟩ := Set.Infinite.nonempty (Set.Infinite.diff Cinf L.finite_toSet)
state_before: case mp
V : Type u
G : SimpleGraph V
K✝ L✝ L' M : Set V
K : Finset V
C : ComponentCompl G ↑K
Cinf : Set.Infinite (supp C)
L : Finset V
h : K ⊆ L
⊢ ∃ D, hom h D = C

tactic: exact ⟨componentComplMk _ vL, rfl⟩
state_before: case mp.intro.intro.intro
V : Type u
G : SimpleGraph V
K✝ L✝ L' M : Set V
K L : Finset V
h : K ⊆ L
v : V
vL : ¬v ∈ ↑L
vK : ¬v ∈ ↑K
Cinf : Set.Infinite (supp (componentComplMk G vK))
⊢ ∃ D, hom h D = componentComplMk G vK

tactic: rintro h Cfin
state_before: case mpr
V : Type u
G : SimpleGraph V
K✝ L L' M : Set V
K : Finset V
C : ComponentCompl G ↑K
⊢ (∀ (L : Finset V) (h : K ⊆ L), ∃ D, hom h D = C) → Set.Infinite (supp C)

tactic: obtain ⟨D, e⟩ := h (K ∪ Cfin.toFinset) (Finset.subset_union_left K Cfin.toFinset)
state_before: case mpr
V : Type u
G : SimpleGraph V
K✝ L L' M : Set V
K : Finset V
C : ComponentCompl G ↑K
h : ∀ (L : Finset V) (h : K ⊆ L), ∃ D, hom h D = C
Cfin : Set.Finite (supp C)
⊢ False

tactic: obtain ⟨v, vD⟩ := D.nonempty
state_before: case mpr.intro
V : Type u
G : SimpleGraph V
K✝ L L' M : Set V
K : Finset V
C : ComponentCompl G ↑K
h : ∀ (L : Finset V) (h : K ⊆ L), ∃ D, hom h D = C
Cfin : Set.Finite (supp C)
D : ComponentCompl G ↑(K ∪ Set.Finite.toFinset Cfin)
e : hom (_ : K ⊆ K ∪ Set.Finite.toFinset Cfin) D = C
⊢ False

tactic: let Ddis := D.disjoint_right
state_before: case mpr.intro.intro
V : Type u
G : SimpleGraph V
K✝ L L' M : Set V
K : Finset V
C : ComponentCompl G ↑K
h : ∀ (L : Finset V) (h : K ⊆ L), ∃ D, hom h D = C
Cfin : Set.Finite (supp C)
D : ComponentCompl G ↑(K ∪ Set.Finite.toFinset Cfin)
e : hom (_ : K ⊆ K ∪ Set.Finite.toFinset Cfin) D = C
v : V
vD : v ∈ ↑D
⊢ False

tactic: simp_rw [Finset.coe_union, Set.Finite.coe_toFinset, Set.disjoint_union_left,
  Set.disjoint_iff] at Ddis
state_before: case mpr.intro.intro
V : Type u
G : SimpleGraph V
K✝ L L' M : Set V
K : Finset V
C : ComponentCompl G ↑K
h : ∀ (L : Finset V) (h : K ⊆ L), ∃ D, hom h D = C
Cfin : Set.Finite (supp C)
D : ComponentCompl G ↑(K ∪ Set.Finite.toFinset Cfin)
e : hom (_ : K ⊆ K ∪ Set.Finite.toFinset Cfin) D = C
v : V
vD : v ∈ ↑D
Ddis : Disjoint ↑(K ∪ Set.Finite.toFinset Cfin) ↑D := ComponentCompl.disjoint_right D
⊢ False

tactic: exact Ddis.right ⟨(ComponentCompl.hom_eq_iff_le _ _ _).mp e vD, vD⟩
state_before: case mpr.intro.intro
V : Type u
G : SimpleGraph V
K✝ L L' M : Set V
K : Finset V
C : ComponentCompl G ↑K
h : ∀ (L : Finset V) (h : K ⊆ L), ∃ D, hom h D = C
Cfin : Set.Finite (supp C)
D : ComponentCompl G ↑(K ∪ Set.Finite.toFinset Cfin)
e : hom (_ : K ⊆ K ∪ Set.Finite.toFinset Cfin) D = C
v : V
vD : v ∈ ↑D
Ddis : ↑K ∩ ↑D ⊆ ∅ ∧ supp C ∩ ↑D ⊆ ∅
⊢ False