Theorem: CompleteLattice.isSupFiniteCompact_iff_all_elements_compact
File: Mathlib/Order/CompactlyGenerated.lean

tactic: refine' ⟨fun h k s hs => _, fun h s => _⟩
state_before: ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
⊢ IsSupFiniteCompact α ↔ ∀ (k : α), IsCompactElement k

tactic: obtain ⟨t, ⟨hts, htsup⟩⟩ := h s
state_before: case refine'_1
ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupFiniteCompact α
k : α
s : Set α
hs : k ≤ sSup s
⊢ ∃ t, ↑t ⊆ s ∧ k ≤ Finset.sup t id

tactic: use t, hts
state_before: case refine'_1.intro.intro
ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupFiniteCompact α
k : α
s : Set α
hs : k ≤ sSup s
t : Finset α
hts : ↑t ⊆ s
htsup : sSup s = Finset.sup t id
⊢ ∃ t, ↑t ⊆ s ∧ k ≤ Finset.sup t id

tactic: rwa [← htsup]
state_before: case refine'_1.intro.intro
ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupFiniteCompact α
k : α
s : Set α
hs : k ≤ sSup s
t : Finset α
hts : ↑t ⊆ s
htsup : sSup s = Finset.sup t id
⊢ k ≤ Finset.sup t id

tactic: obtain ⟨t, ⟨hts, htsup⟩⟩ := h (sSup s) s (by rfl)
state_before: case refine'_2
ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : ∀ (k : α), IsCompactElement k
s : Set α
⊢ ∃ t, ↑t ⊆ s ∧ sSup s = Finset.sup t id

tactic: have : sSup s = t.sup id := by
  suffices t.sup id ≤ sSup s by apply le_antisymm <;> assumption
  simp only [id.def, Finset.sup_le_iff]
  intro x hx
  exact le_sSup _ _ (hts hx)
state_before: case refine'_2.intro.intro
ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : ∀ (k : α), IsCompactElement k
s : Set α
t : Finset α
hts : ↑t ⊆ s
htsup : sSup s ≤ Finset.sup t id
⊢ ∃ t, ↑t ⊆ s ∧ sSup s = Finset.sup t id

tactic: exact ⟨t, hts, this⟩
state_before: case refine'_2.intro.intro
ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : ∀ (k : α), IsCompactElement k
s : Set α
t : Finset α
hts : ↑t ⊆ s
htsup : sSup s ≤ Finset.sup t id
this : sSup s = Finset.sup t id
⊢ ∃ t, ↑t ⊆ s ∧ sSup s = Finset.sup t id

tactic: rfl
state_before: ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : ∀ (k : α), IsCompactElement k
s : Set α
⊢ sSup s ≤ sSup s

tactic: suffices t.sup id ≤ sSup s by apply le_antisymm <;> assumption
state_before: ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : ∀ (k : α), IsCompactElement k
s : Set α
t : Finset α
hts : ↑t ⊆ s
htsup : sSup s ≤ Finset.sup t id
⊢ sSup s = Finset.sup t id

tactic: simp only [id.def, Finset.sup_le_iff]
state_before: ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : ∀ (k : α), IsCompactElement k
s : Set α
t : Finset α
hts : ↑t ⊆ s
htsup : sSup s ≤ Finset.sup t id
⊢ Finset.sup t id ≤ sSup s

tactic: intro x hx
state_before: ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : ∀ (k : α), IsCompactElement k
s : Set α
t : Finset α
hts : ↑t ⊆ s
htsup : sSup s ≤ Finset.sup t id
⊢ ∀ (b : α), b ∈ t → b ≤ sSup s

tactic: exact le_sSup _ _ (hts hx)
state_before: ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : ∀ (k : α), IsCompactElement k
s : Set α
t : Finset α
hts : ↑t ⊆ s
htsup : sSup s ≤ Finset.sup t id
x : α
hx : x ∈ t
⊢ x ≤ sSup s

tactic: apply le_antisymm <;> assumption
state_before: ι : Sort ?u.75433
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : ∀ (k : α), IsCompactElement k
s : Set α
t : Finset α
hts : ↑t ⊆ s
htsup : sSup s ≤ Finset.sup t id
this : Finset.sup t id ≤ sSup s
⊢ sSup s = Finset.sup t id