Skip to content

Commit 3d8829e

Browse files
Hagbb-mehta
authored andcommitted
feat(Order/WellFoundedSet): minimal element of a nonempty set exists if < is well founded on the set (leanprover-community#39777)
There exists a inimal element in a nonempty set if `<` is well founded on the set.
1 parent d5990cf commit 3d8829e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Mathlib/Order/WellFoundedSet.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,12 @@ lemma WellFoundedOn.mapsTo {α β : Type*} {r : α → α → Prop} (f : β →
559559
t.WellFoundedOn (r on f) := by
560560
exact InvImage.wf (fun x : t ↦ ⟨f x, h x.prop⟩) hw
561561

562+
@[to_dual]
563+
theorem WellFoundedOn.exists_minimal {α : Type*} [Preorder α] {s : Set α}
564+
(h : s.WellFoundedOn (· < ·)) (nonempty : s.Nonempty) : ∃ a, Minimal (· ∈ s) a :=
565+
have ⟨m, hm⟩ := WellFoundedLT.exists_minimal ⟨h⟩ univ <| nonempty.elim (⟨⟨·, ·⟩, trivial⟩)
566+
⟨m, m.property, fun y hy ↦ hm.right (y := ⟨y, hy⟩) trivial⟩
567+
562568
end WellFoundedOn
563569

564570
section LinearOrder

0 commit comments

Comments
 (0)