Theorem: CompleteLattice.IsSupClosedCompact.wellFounded
File: Mathlib/Order/CompactlyGenerated.lean

tactic: refine' RelEmbedding.wellFounded_iff_no_descending_seq.mpr ⟨fun a => _⟩
state_before: ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
⊢ WellFounded fun x x_1 => x > x_1

tactic: suffices sSup (Set.range a) ∈ Set.range a by
  obtain ⟨n, hn⟩ := Set.mem_range.mp this
  have h' : sSup (Set.range a) < a (n + 1) := by
    change _ > _
    simp [← hn, a.map_rel_iff]
  apply lt_irrefl (a (n + 1))
  apply lt_of_le_of_lt _ h'
  apply le_sSup
  apply Set.mem_range_self
state_before: ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
⊢ False

tactic: apply h (Set.range a)
state_before: ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
⊢ sSup (Set.range ↑a) ∈ Set.range ↑a

tactic: obtain ⟨n, hn⟩ := Set.mem_range.mp this
state_before: ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
this : sSup (Set.range ↑a) ∈ Set.range ↑a
⊢ False

tactic: have h' : sSup (Set.range a) < a (n + 1) := by
  change _ > _
  simp [← hn, a.map_rel_iff]
state_before: case intro
ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
this : sSup (Set.range ↑a) ∈ Set.range ↑a
n : ℕ
hn : ↑a n = sSup (Set.range ↑a)
⊢ False

tactic: apply lt_irrefl (a (n + 1))
state_before: case intro
ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
this : sSup (Set.range ↑a) ∈ Set.range ↑a
n : ℕ
hn : ↑a n = sSup (Set.range ↑a)
h' : sSup (Set.range ↑a) < ↑a (n + 1)
⊢ False

tactic: apply lt_of_le_of_lt _ h'
state_before: case intro
ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
this : sSup (Set.range ↑a) ∈ Set.range ↑a
n : ℕ
hn : ↑a n = sSup (Set.range ↑a)
h' : sSup (Set.range ↑a) < ↑a (n + 1)
⊢ ↑a (n + 1) < ↑a (n + 1)

tactic: apply le_sSup
state_before: ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
this : sSup (Set.range ↑a) ∈ Set.range ↑a
n : ℕ
hn : ↑a n = sSup (Set.range ↑a)
h' : sSup (Set.range ↑a) < ↑a (n + 1)
⊢ ↑a (n + 1) ≤ sSup (Set.range ↑a)

tactic: apply Set.mem_range_self
state_before: case a
ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
this : sSup (Set.range ↑a) ∈ Set.range ↑a
n : ℕ
hn : ↑a n = sSup (Set.range ↑a)
h' : sSup (Set.range ↑a) < ↑a (n + 1)
⊢ ↑a (n + 1) ∈ Set.range ↑a

tactic: change _ > _
state_before: ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
this : sSup (Set.range ↑a) ∈ Set.range ↑a
n : ℕ
hn : ↑a n = sSup (Set.range ↑a)
⊢ sSup (Set.range ↑a) < ↑a (n + 1)

tactic: simp [← hn, a.map_rel_iff]
state_before: ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
this : sSup (Set.range ↑a) ∈ Set.range ↑a
n : ℕ
hn : ↑a n = sSup (Set.range ↑a)
⊢ ↑a (n + 1) > sSup (Set.range ↑a)

tactic: use a 37
state_before: case x
ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
⊢ Set.Nonempty (Set.range ↑a)

tactic: apply Set.mem_range_self
state_before: case x
ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
⊢ ↑a 37 ∈ Set.range ↑a

tactic: rintro x ⟨m, hm⟩ y ⟨n, hn⟩
state_before: case a
ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
⊢ ∀ (a_1 : α), a_1 ∈ Set.range ↑a → ∀ (b : α), b ∈ Set.range ↑a → a_1 ⊔ b ∈ Set.range ↑a

tactic: use m ⊔ n
state_before: case a.intro.intro
ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
x : α
m : ℕ
hm : ↑a m = x
y : α
n : ℕ
hn : ↑a n = y
⊢ x ⊔ y ∈ Set.range ↑a

tactic: rw [← hm, ← hn]
state_before: case a.intro.intro
ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
x : α
m : ℕ
hm : ↑a m = x
y : α
n : ℕ
hn : ↑a n = y
⊢ ↑a (m ⊔ n) = x ⊔ y

tactic: apply RelHomClass.map_sup a
state_before: case a.intro.intro
ι : Sort ?u.27269
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupClosedCompact α
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
x : α
m : ℕ
hm : ↑a m = x
y : α
n : ℕ
hn : ↑a n = y
⊢ ↑a (m ⊔ n) = ↑a m ⊔ ↑a n