fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
protected isMin (a : α) : IsMin a := (Subsingleton.isBot _).isMin
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
isMin
null
protected isMax (a : α) : IsMax a := (Subsingleton.isTop _).isMax
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
isMax
null
protected IsMin.eq_of_le (ha : IsMin a) (h : b ≤ a) : b = a := h.antisymm <| ha h
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsMin.eq_of_le
null
protected IsMin.eq_of_ge (ha : IsMin a) (h : b ≤ a) : a = b := h.antisymm' <| ha h
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsMin.eq_of_ge
null
protected IsMax.eq_of_le (ha : IsMax a) (h : a ≤ b) : a = b := h.antisymm <| ha h
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsMax.eq_of_le
null
protected IsMax.eq_of_ge (ha : IsMax a) (h : a ≤ b) : b = a := h.antisymm' <| ha h
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsMax.eq_of_ge
null
protected IsBot.lt_of_ne (ha : IsBot a) (h : a ≠ b) : a < b := (ha b).lt_of_ne h
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsBot.lt_of_ne
null
protected IsTop.lt_of_ne (ha : IsTop a) (h : b ≠ a) : b < a := (ha b).lt_of_ne h
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsTop.lt_of_ne
null
protected IsBot.not_isMax [Nontrivial α] (ha : IsBot a) : ¬ IsMax a := by intro ha' obtain ⟨b, hb⟩ := exists_ne a exact hb <| ha'.eq_of_ge (ha.lt_of_ne hb.symm).le
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsBot.not_isMax
null
protected IsTop.not_isMin [Nontrivial α] (ha : IsTop a) : ¬ IsMin a := ha.toDual.not_isMax
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsTop.not_isMin
null
protected IsBot.not_isTop [Nontrivial α] (ha : IsBot a) : ¬ IsTop a := mt IsTop.isMax ha.not_isMax
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsBot.not_isTop
null
protected IsTop.not_isBot [Nontrivial α] (ha : IsTop a) : ¬ IsBot a := ha.toDual.not_isTop
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsTop.not_isBot
null
IsBot.prodMk (ha : IsBot a) (hb : IsBot b) : IsBot (a, b) := fun _ => ⟨ha _, hb _⟩
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsBot.prodMk
null
IsTop.prodMk (ha : IsTop a) (hb : IsTop b) : IsTop (a, b) := fun _ => ⟨ha _, hb _⟩
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsTop.prodMk
null
IsMin.prodMk (ha : IsMin a) (hb : IsMin b) : IsMin (a, b) := fun _ hc => ⟨ha hc.1, hb hc.2⟩
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsMin.prodMk
null
IsMax.prodMk (ha : IsMax a) (hb : IsMax b) : IsMax (a, b) := fun _ hc => ⟨ha hc.1, hb hc.2⟩
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsMax.prodMk
null
IsBot.fst (hx : IsBot x) : IsBot x.1 := fun c => (hx (c, x.2)).1
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsBot.fst
null
IsBot.snd (hx : IsBot x) : IsBot x.2 := fun c => (hx (x.1, c)).2
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsBot.snd
null
IsTop.fst (hx : IsTop x) : IsTop x.1 := fun c => (hx (c, x.2)).1
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsTop.fst
null
IsTop.snd (hx : IsTop x) : IsTop x.2 := fun c => (hx (x.1, c)).2
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsTop.snd
null
IsMin.fst (hx : IsMin x) : IsMin x.1 := fun c hc => (hx <| show (c, x.2) ≤ x from (and_iff_left le_rfl).2 hc).1
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsMin.fst
null
IsMin.snd (hx : IsMin x) : IsMin x.2 := fun c hc => (hx <| show (x.1, c) ≤ x from (and_iff_right le_rfl).2 hc).2
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsMin.snd
null
IsMax.fst (hx : IsMax x) : IsMax x.1 := fun c hc => (hx <| show x ≤ (c, x.2) from (and_iff_left le_rfl).2 hc).1
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsMax.fst
null
IsMax.snd (hx : IsMax x) : IsMax x.2 := fun c hc => (hx <| show x ≤ (x.1, c) from (and_iff_right le_rfl).2 hc).2
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
IsMax.snd
null
Prod.isBot_iff : IsBot x ↔ IsBot x.1 ∧ IsBot x.2 := ⟨fun hx => ⟨hx.fst, hx.snd⟩, fun h => h.1.prodMk h.2⟩
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
Prod.isBot_iff
null
Prod.isTop_iff : IsTop x ↔ IsTop x.1 ∧ IsTop x.2 := ⟨fun hx => ⟨hx.fst, hx.snd⟩, fun h => h.1.prodMk h.2⟩
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
Prod.isTop_iff
null
Prod.isMin_iff : IsMin x ↔ IsMin x.1 ∧ IsMin x.2 := ⟨fun hx => ⟨hx.fst, hx.snd⟩, fun h => h.1.prodMk h.2⟩
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
Prod.isMin_iff
null
Prod.isMax_iff : IsMax x ↔ IsMax x.1 ∧ IsMax x.2 := ⟨fun hx => ⟨hx.fst, hx.snd⟩, fun h => h.1.prodMk h.2⟩
theorem
Order
[ "Mathlib.Order.Synonym" ]
Mathlib/Order/Max.lean
Prod.isMax_iff
null
@[simp] minimalFor_eq_iff : MinimalFor (· = j) f i ↔ i = j := by simp +contextual [MinimalFor] @[simp] lemma maximalFor_eq_iff : MaximalFor (· = j) f i ↔ i = j := by simp +contextual [MaximalFor]
lemma
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimalFor_eq_iff
null
@[simp] minimalFor_id : MinimalFor P id x ↔ Minimal P x := .rfl @[simp] lemma maximalFor_id : MaximalFor P id x ↔ Maximal P x := .rfl @[simp] theorem minimal_toDual : Minimal (fun x ↦ P (ofDual x)) (toDual x) ↔ Maximal P x := Iff.rfl alias ⟨Minimal.of_dual, Minimal.dual⟩ := minimal_toDual @[simp] theorem maximal_toDu...
lemma
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimalFor_id
null
maximal_true_subtype {x : Subtype P} : Maximal (fun _ ↦ True) x ↔ Maximal P x := by obtain ⟨x, hx⟩ := x simp [Maximal, hx]
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_true_subtype
null
minimal_true_subtype {x : Subtype P} : Minimal (fun _ ↦ True) x ↔ Minimal P x := by obtain ⟨x, hx⟩ := x simp [Minimal, hx] @[simp] theorem minimal_minimal : Minimal (Minimal P) x ↔ Minimal P x := ⟨fun h ↦ h.prop, fun h ↦ ⟨h, fun _ hy hyx ↦ h.le_of_le hy.prop hyx⟩⟩ @[simp] theorem maximal_maximal : Maximal (Maxima...
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_true_subtype
null
minimal_iff_isMin (hP : ∀ ⦃x y⦄, P y → x ≤ y → P x) : Minimal P x ↔ P x ∧ IsMin x := ⟨fun h ↦ ⟨h.prop, fun _ h' ↦ h.le_of_le (hP h.prop h') h'⟩, fun h ↦ ⟨h.1, fun _ _ h' ↦ h.2 h'⟩⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_iff_isMin
If `P` is down-closed, then minimal elements satisfying `P` are exactly the globally minimal elements satisfying `P`.
maximal_iff_isMax (hP : ∀ ⦃x y⦄, P y → y ≤ x → P x) : Maximal P x ↔ P x ∧ IsMax x := ⟨fun h ↦ ⟨h.prop, fun _ h' ↦ h.le_of_ge (hP h.prop h') h'⟩, fun h ↦ ⟨h.1, fun _ _ h' ↦ h.2 h'⟩⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_iff_isMax
If `P` is up-closed, then maximal elements satisfying `P` are exactly the globally maximal elements satisfying `P`.
Minimal.mono (h : Minimal P x) (hle : Q ≤ P) (hQ : Q x) : Minimal Q x := ⟨hQ, fun y hQy ↦ h.le_of_le (hle y hQy)⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.mono
null
Maximal.mono (h : Maximal P x) (hle : Q ≤ P) (hQ : Q x) : Maximal Q x := ⟨hQ, fun y hQy ↦ h.le_of_ge (hle y hQy)⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.mono
null
Minimal.and_right (h : Minimal P x) (hQ : Q x) : Minimal (fun x ↦ P x ∧ Q x) x := h.mono (fun _ ↦ And.left) ⟨h.prop, hQ⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.and_right
null
Minimal.and_left (h : Minimal P x) (hQ : Q x) : Minimal (fun x ↦ (Q x ∧ P x)) x := h.mono (fun _ ↦ And.right) ⟨hQ, h.prop⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.and_left
null
Maximal.and_right (h : Maximal P x) (hQ : Q x) : Maximal (fun x ↦ (P x ∧ Q x)) x := h.mono (fun _ ↦ And.left) ⟨h.prop, hQ⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.and_right
null
Maximal.and_left (h : Maximal P x) (hQ : Q x) : Maximal (fun x ↦ (Q x ∧ P x)) x := h.mono (fun _ ↦ And.right) ⟨hQ, h.prop⟩ @[simp] theorem minimal_eq_iff : Minimal (· = y) x ↔ x = y := by simp +contextual [Minimal] @[simp] theorem maximal_eq_iff : Maximal (· = y) x ↔ x = y := by simp +contextual [Maximal]
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.and_left
null
not_minimal_iff (hx : P x) : ¬ Minimal P x ↔ ∃ y, P y ∧ y ≤ x ∧ ¬ (x ≤ y) := by simp [Minimal, hx]
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
not_minimal_iff
null
not_maximal_iff (hx : P x) : ¬ Maximal P x ↔ ∃ y, P y ∧ x ≤ y ∧ ¬ (y ≤ x) := not_minimal_iff (α := αᵒᵈ) hx
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
not_maximal_iff
null
Minimal.or (h : Minimal (fun x ↦ P x ∨ Q x) x) : Minimal P x ∨ Minimal Q x := by obtain ⟨h | h, hmin⟩ := h · exact .inl ⟨h, fun y hy hyx ↦ hmin (Or.inl hy) hyx⟩ exact .inr ⟨h, fun y hy hyx ↦ hmin (Or.inr hy) hyx⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.or
null
Maximal.or (h : Maximal (fun x ↦ P x ∨ Q x) x) : Maximal P x ∨ Maximal Q x := Minimal.or (α := αᵒᵈ) h
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.or
null
minimal_and_iff_right_of_imp (hPQ : ∀ ⦃x⦄, P x → Q x) : Minimal (fun x ↦ P x ∧ Q x) x ↔ (Minimal P x) ∧ Q x := by simp_rw [and_iff_left_of_imp (fun x ↦ hPQ x), iff_self_and] exact fun h ↦ hPQ h.prop
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_and_iff_right_of_imp
null
minimal_and_iff_left_of_imp (hPQ : ∀ ⦃x⦄, P x → Q x) : Minimal (fun x ↦ Q x ∧ P x) x ↔ Q x ∧ (Minimal P x) := by simp_rw [iff_comm, and_comm, minimal_and_iff_right_of_imp hPQ, and_comm]
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_and_iff_left_of_imp
null
maximal_and_iff_right_of_imp (hPQ : ∀ ⦃x⦄, P x → Q x) : Maximal (fun x ↦ P x ∧ Q x) x ↔ (Maximal P x) ∧ Q x := minimal_and_iff_right_of_imp (α := αᵒᵈ) hPQ
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_and_iff_right_of_imp
null
maximal_and_iff_left_of_imp (hPQ : ∀ ⦃x⦄, P x → Q x) : Maximal (fun x ↦ Q x ∧ P x) x ↔ Q x ∧ (Maximal P x) := minimal_and_iff_left_of_imp (α := αᵒᵈ) hPQ
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_and_iff_left_of_imp
null
minimal_iff_forall_lt : Minimal P x ↔ P x ∧ ∀ ⦃y⦄, y < x → ¬ P y := by simp [Minimal, lt_iff_le_not_ge, imp.swap]
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_iff_forall_lt
null
maximal_iff_forall_gt : Maximal P x ↔ P x ∧ ∀ ⦃y⦄, x < y → ¬ P y := minimal_iff_forall_lt (α := αᵒᵈ)
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_iff_forall_gt
null
Minimal.not_prop_of_lt (h : Minimal P x) (hlt : y < x) : ¬ P y := (minimal_iff_forall_lt.1 h).2 hlt
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.not_prop_of_lt
null
Maximal.not_prop_of_gt (h : Maximal P x) (hlt : x < y) : ¬ P y := (maximal_iff_forall_gt.1 h).2 hlt
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.not_prop_of_gt
null
Minimal.not_lt (h : Minimal P x) (hy : P y) : ¬(y < x) := fun hlt ↦ h.not_prop_of_lt hlt hy
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.not_lt
null
Maximal.not_gt (h : Maximal P x) (hy : P y) : ¬(x < y) := fun hlt ↦ h.not_prop_of_gt hlt hy @[simp] theorem minimal_le_iff : Minimal (· ≤ y) x ↔ x ≤ y ∧ IsMin x := minimal_iff_isMin (fun _ _ h h' ↦ h'.trans h) @[simp] theorem maximal_ge_iff : Maximal (y ≤ ·) x ↔ y ≤ x ∧ IsMax x := minimal_le_iff (α := αᵒᵈ) @[simp...
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.not_gt
null
not_minimal_iff_exists_lt (hx : P x) : ¬ Minimal P x ↔ ∃ y, y < x ∧ P y := by simp_rw [not_minimal_iff hx, lt_iff_le_not_ge, and_comm] alias ⟨exists_lt_of_not_minimal, _⟩ := not_minimal_iff_exists_lt
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
not_minimal_iff_exists_lt
null
not_maximal_iff_exists_gt (hx : P x) : ¬ Maximal P x ↔ ∃ y, x < y ∧ P y := not_minimal_iff_exists_lt (α := αᵒᵈ) hx alias ⟨exists_gt_of_not_maximal, _⟩ := not_maximal_iff_exists_gt
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
not_maximal_iff_exists_gt
null
exists_minimalFor_of_wellFoundedLT (P : ι → Prop) (f : ι → α) (hP : ∃ i, P i) : ∃ i, MinimalFor P f i := by simpa [not_lt_iff_le_imp_ge, InvImage] using (instIsWellFoundedInvImage (· < ·) f).wf.has_min _ hP
lemma
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
exists_minimalFor_of_wellFoundedLT
null
exists_minimal_of_wellFoundedLT (P : α → Prop) (hP : ∃ a, P a) : ∃ a, Minimal P a := exists_minimalFor_of_wellFoundedLT P id hP
lemma
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
exists_minimal_of_wellFoundedLT
null
exists_minimal_le_of_wellFoundedLT (P : α → Prop) (a : α) (ha : P a) : ∃ b ≤ a, Minimal P b := by obtain ⟨b, ⟨hba, hb⟩, hbmin⟩ := exists_minimal_of_wellFoundedLT (fun b ↦ b ≤ a ∧ P b) ⟨a, le_rfl, ha⟩ exact ⟨b, hba, hb, fun c hc hcb ↦ hbmin ⟨hcb.trans hba, hc⟩ hcb⟩
lemma
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
exists_minimal_le_of_wellFoundedLT
null
exists_maximalFor_of_wellFoundedGT (P : ι → Prop) (f : ι → α) (hP : ∃ i, P i) : ∃ i, MaximalFor P f i := exists_minimalFor_of_wellFoundedLT (α := αᵒᵈ) P f hP
lemma
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
exists_maximalFor_of_wellFoundedGT
null
exists_maximal_of_wellFoundedGT (P : α → Prop) (hP : ∃ a, P a) : ∃ a, Maximal P a := exists_minimal_of_wellFoundedLT (α := αᵒᵈ) P hP
lemma
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
exists_maximal_of_wellFoundedGT
null
exists_maximal_ge_of_wellFoundedGT (P : α → Prop) (a : α) (ha : P a) : ∃ b, a ≤ b ∧ Maximal P b := exists_minimal_le_of_wellFoundedLT (α := αᵒᵈ) P a ha
lemma
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
exists_maximal_ge_of_wellFoundedGT
null
Minimal.eq_of_ge (hx : Minimal P x) (hy : P y) (hge : y ≤ x) : x = y := (hx.2 hy hge).antisymm hge
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.eq_of_ge
null
Minimal.eq_of_le (hx : Minimal P x) (hy : P y) (hle : y ≤ x) : y = x := (hx.eq_of_ge hy hle).symm
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.eq_of_le
null
Maximal.eq_of_le (hx : Maximal P x) (hy : P y) (hle : x ≤ y) : x = y := hle.antisymm <| hx.2 hy hle
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.eq_of_le
null
Maximal.eq_of_ge (hx : Maximal P x) (hy : P y) (hge : x ≤ y) : y = x := (hx.eq_of_le hy hge).symm
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.eq_of_ge
null
minimal_iff : Minimal P x ↔ P x ∧ ∀ ⦃y⦄, P y → y ≤ x → x = y := ⟨fun h ↦ ⟨h.1, fun _ ↦ h.eq_of_ge⟩, fun h ↦ ⟨h.1, fun _ hy hle ↦ (h.2 hy hle).le⟩⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_iff
null
maximal_iff : Maximal P x ↔ P x ∧ ∀ ⦃y⦄, P y → x ≤ y → x = y := minimal_iff (α := αᵒᵈ)
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_iff
null
minimal_mem_iff {s : Set α} : Minimal (· ∈ s) x ↔ x ∈ s ∧ ∀ ⦃y⦄, y ∈ s → y ≤ x → x = y := minimal_iff
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_mem_iff
null
maximal_mem_iff {s : Set α} : Maximal (· ∈ s) x ↔ x ∈ s ∧ ∀ ⦃y⦄, y ∈ s → x ≤ y → x = y := maximal_iff
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_mem_iff
null
minimal_iff_eq (hy : P y) (hP : ∀ ⦃x⦄, P x → y ≤ x) : Minimal P x ↔ x = y := ⟨fun h ↦ h.eq_of_ge hy (hP h.prop), by rintro rfl; exact ⟨hy, fun z hz _ ↦ hP hz⟩⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_iff_eq
If `P y` holds, and everything satisfying `P` is above `y`, then `y` is the unique minimal element satisfying `P`.
maximal_iff_eq (hy : P y) (hP : ∀ ⦃x⦄, P x → x ≤ y) : Maximal P x ↔ x = y := minimal_iff_eq (α := αᵒᵈ) hy hP @[simp] theorem minimal_ge_iff : Minimal (y ≤ ·) x ↔ x = y := minimal_iff_eq rfl.le fun _ ↦ id @[simp] theorem maximal_le_iff : Maximal (· ≤ y) x ↔ x = y := maximal_iff_eq rfl.le fun _ ↦ id
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_iff_eq
If `P y` holds, and everything satisfying `P` is below `y`, then `y` is the unique maximal element satisfying `P`.
minimal_iff_minimal_of_imp_of_forall (hPQ : ∀ ⦃x⦄, Q x → P x) (h : ∀ ⦃x⦄, P x → ∃ y, y ≤ x ∧ Q y) : Minimal P x ↔ Minimal Q x := by refine ⟨fun h' ↦ ⟨?_, fun y hy hyx ↦ h'.le_of_le (hPQ hy) hyx⟩, fun h' ↦ ⟨hPQ h'.prop, fun y hy hyx ↦ ?_⟩⟩ · obtain ⟨y, hyx, hy⟩ := h h'.prop rwa [((h'.le_of_le (hPQ hy)) h...
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_iff_minimal_of_imp_of_forall
null
maximal_iff_maximal_of_imp_of_forall (hPQ : ∀ ⦃x⦄, Q x → P x) (h : ∀ ⦃x⦄, P x → ∃ y, x ≤ y ∧ Q y) : Maximal P x ↔ Maximal Q x := minimal_iff_minimal_of_imp_of_forall (α := αᵒᵈ) hPQ h
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_iff_maximal_of_imp_of_forall
null
Minimal.eq_of_superset (h : Minimal P s) (ht : P t) (hts : t ⊆ s) : s = t := h.eq_of_ge ht hts
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.eq_of_superset
null
Maximal.eq_of_subset (h : Maximal P s) (ht : P t) (hst : s ⊆ t) : s = t := h.eq_of_le ht hst
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.eq_of_subset
null
Minimal.eq_of_subset (h : Minimal P s) (ht : P t) (hts : t ⊆ s) : t = s := h.eq_of_le ht hts
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.eq_of_subset
null
Maximal.eq_of_superset (h : Maximal P s) (ht : P t) (hst : s ⊆ t) : t = s := h.eq_of_ge ht hst
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.eq_of_superset
null
minimal_subset_iff : Minimal P s ↔ P s ∧ ∀ ⦃t⦄, P t → t ⊆ s → s = t := _root_.minimal_iff
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_subset_iff
null
maximal_subset_iff : Maximal P s ↔ P s ∧ ∀ ⦃t⦄, P t → s ⊆ t → s = t := _root_.maximal_iff
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_subset_iff
null
minimal_subset_iff' : Minimal P s ↔ P s ∧ ∀ ⦃t⦄, P t → t ⊆ s → s ⊆ t := Iff.rfl
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
minimal_subset_iff'
null
maximal_subset_iff' : Maximal P s ↔ P s ∧ ∀ ⦃t⦄, P t → s ⊆ t → t ⊆ s := Iff.rfl
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
maximal_subset_iff'
null
not_minimal_subset_iff (hs : P s) : ¬ Minimal P s ↔ ∃ t, t ⊂ s ∧ P t := not_minimal_iff_exists_lt hs
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
not_minimal_subset_iff
null
not_maximal_subset_iff (hs : P s) : ¬ Maximal P s ↔ ∃ t, s ⊂ t ∧ P t := not_maximal_iff_exists_gt hs
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
not_maximal_subset_iff
null
Set.minimal_iff_forall_ssubset : Minimal P s ↔ P s ∧ ∀ ⦃t⦄, t ⊂ s → ¬ P t := minimal_iff_forall_lt
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Set.minimal_iff_forall_ssubset
null
Minimal.not_prop_of_ssubset (h : Minimal P s) (ht : t ⊂ s) : ¬ P t := (minimal_iff_forall_lt.1 h).2 ht
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.not_prop_of_ssubset
null
Minimal.not_ssubset (h : Minimal P s) (ht : P t) : ¬ t ⊂ s := h.not_lt ht
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.not_ssubset
null
Maximal.mem_of_prop_insert (h : Maximal P s) (hx : P (insert x s)) : x ∈ s := h.eq_of_subset hx (subset_insert _ _) ▸ mem_insert ..
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.mem_of_prop_insert
null
Minimal.notMem_of_prop_diff_singleton (h : Minimal P s) (hx : P (s \ {x})) : x ∉ s := fun hxs ↦ ((h.eq_of_superset hx diff_subset).subset hxs).2 rfl @[deprecated (since := "2025-05-23")] alias Minimal.not_mem_of_prop_diff_singleton := Minimal.notMem_of_prop_diff_singleton
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Minimal.notMem_of_prop_diff_singleton
null
Set.minimal_iff_forall_diff_singleton (hP : ∀ ⦃s t⦄, P t → t ⊆ s → P s) : Minimal P s ↔ P s ∧ ∀ x ∈ s, ¬ P (s \ {x}) := ⟨fun h ↦ ⟨h.1, fun _ hx hP ↦ h.notMem_of_prop_diff_singleton hP hx⟩, fun h ↦ ⟨h.1, fun _ ht hts x hxs ↦ by_contra fun hxt ↦ h.2 x hxs (hP ht <| subset_diff_singleton hts hxt)⟩⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Set.minimal_iff_forall_diff_singleton
null
Set.exists_diff_singleton_of_not_minimal (hP : ∀ ⦃s t⦄, P t → t ⊆ s → P s) (hs : P s) (h : ¬ Minimal P s) : ∃ x ∈ s, P (s \ {x}) := by simpa [Set.minimal_iff_forall_diff_singleton hP, hs] using h
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Set.exists_diff_singleton_of_not_minimal
null
Set.maximal_iff_forall_ssuperset : Maximal P s ↔ P s ∧ ∀ ⦃t⦄, s ⊂ t → ¬ P t := maximal_iff_forall_gt
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Set.maximal_iff_forall_ssuperset
null
Maximal.not_prop_of_ssuperset (h : Maximal P s) (ht : s ⊂ t) : ¬ P t := (maximal_iff_forall_gt.1 h).2 ht
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.not_prop_of_ssuperset
null
Maximal.not_ssuperset (h : Maximal P s) (ht : P t) : ¬ s ⊂ t := h.not_gt ht
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Maximal.not_ssuperset
null
Set.maximal_iff_forall_insert (hP : ∀ ⦃s t⦄, P t → s ⊆ t → P s) : Maximal P s ↔ P s ∧ ∀ x ∉ s, ¬ P (insert x s) := by simp only [not_imp_not] exact ⟨fun h ↦ ⟨h.1, fun x ↦ h.mem_of_prop_insert⟩, fun h ↦ ⟨h.1, fun t ht hst x hxt ↦ h.2 x (hP ht <| insert_subset hxt hst)⟩⟩
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Set.maximal_iff_forall_insert
null
Set.exists_insert_of_not_maximal (hP : ∀ ⦃s t⦄, P t → s ⊆ t → P s) (hs : P s) (h : ¬ Maximal P s) : ∃ x ∉ s, P (insert x s) := by simpa [Set.maximal_iff_forall_insert hP, hs] using h /- TODO : generalize `minimal_iff_forall_diff_singleton` and `maximal_iff_forall_insert` to `IsStronglyCoatomic`/`IsStronglyAtomic`...
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Set.exists_insert_of_not_maximal
null
setOf_minimal_subset (s : Set α) : {x | Minimal (· ∈ s) x} ⊆ s := sep_subset ..
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
setOf_minimal_subset
null
setOf_maximal_subset (s : Set α) : {x | Maximal (· ∈ s) x} ⊆ s := sep_subset ..
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
setOf_maximal_subset
null
Set.Subsingleton.maximal_mem_iff (h : s.Subsingleton) : Maximal (· ∈ s) x ↔ x ∈ s := by obtain (rfl | ⟨x, rfl⟩) := h.eq_empty_or_singleton <;> simp
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Set.Subsingleton.maximal_mem_iff
null
Set.Subsingleton.minimal_mem_iff (h : s.Subsingleton) : Minimal (· ∈ s) x ↔ x ∈ s := by obtain (rfl | ⟨x, rfl⟩) := h.eq_empty_or_singleton <;> simp
theorem
Order
[ "Mathlib.Order.Hom.Basic", "Mathlib.Order.Interval.Set.Defs", "Mathlib.Order.WellFounded" ]
Mathlib/Order/Minimal.lean
Set.Subsingleton.minimal_mem_iff
null