Built with
doc-gen4 , running Lean4.
Bubbles (
) indicate interactive fragments: hover for details, tap to reveal contents.
Use
Ctrl+↑ Ctrl+↓ to navigate,
Ctrl+🖱️ to focus.
On Mac, use
Cmd instead of
Ctrl .
/-
Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Yury Kudryashov, Yaël Dillies
! This file was ported from Lean 3 source module order.max
! leanprover-community/mathlib commit 6623e6af705e97002a9054c1c05a980180276fc1
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Order.Synonym
/-!
# Minimal/maximal and bottom/top elements
This file defines predicates for elements to be minimal/maximal or bottom/top and typeclasses
saying that there are no such elements.
## Predicates
* `IsBot`: An element is *bottom* if all elements are greater than it.
* `IsTop`: An element is *top* if all elements are less than it.
* `IsMin`: An element is *minimal* if no element is strictly less than it.
* `IsMax`: An element is *maximal* if no element is strictly greater than it.
See also `isBot_iff_isMin` and `isTop_iff_isMax` for the equivalences in a (co)directed order.
## Typeclasses
* `NoBotOrder`: An order without bottom elements.
* `NoTopOrder`: An order without top elements.
* `NoMinOrder`: An order without minimal elements.
* `NoMaxOrder`: An order without maximal elements.
-/
open OrderDual
universe u v
variable { α β : Type _ : Type (?u.19004+1) Type _}
/-- Order without bottom elements. -/
class NoBotOrder ( α : Type _ ) [ LE α ] : Prop where
/-- For each term `a`, there is some `b` which is either incomparable or strictly smaller. -/
exists_not_ge ( a : α ) : ∃ b , ¬ a ≤ b
#align no_bot_order NoBotOrder
/-- Order without top elements. -/
class NoTopOrder ( α : Type _ ) [ LE α ] : Prop where
/-- For each term `a`, there is some `b` which is either incomparable or strictly larger. -/
exists_not_le ( a : α ) : ∃ b , ¬ b ≤ a
#align no_top_order NoTopOrder
/-- Order without minimal elements. Sometimes called coinitial or dense. -/
class NoMinOrder ( α : Type _ ) [ LT α ] : Prop where
/-- For each term `a`, there is some strictly smaller `b`. -/
exists_lt ( a : α ) : ∃ b , b < a
#align no_min_order NoMinOrder
/-- Order without maximal elements. Sometimes called cofinal. -/
class NoMaxOrder ( α : Type _ ) [ LT α ] : Prop where
/-- For each term `a`, there is some strictly greater `b`. -/
exists_gt ( a : α ) : ∃ b , a < b
#align no_max_order NoMaxOrder
export NoBotOrder (exists_not_ge)
export NoTopOrder (exists_not_le)
export NoMinOrder (exists_lt)
export NoMaxOrder (exists_gt)
instance nonempty_lt [ LT α ] [ NoMinOrder : (α : Type ?u.165) → [inst : LT α ] → Prop NoMinOrder α ] ( a : α ) : Nonempty { x // x < a } :=
nonempty_subtype . 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 ( exists_lt a )
instance nonempty_gt [ LT α ] [ NoMaxOrder : (α : Type ?u.258) → [inst : LT α ] → Prop NoMaxOrder α ] ( a : α ) : Nonempty { x // a < x } :=
nonempty_subtype . 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 ( exists_gt a )
instance OrderDual.noBotOrder [ LE α ] [ NoTopOrder : (α : Type ?u.354) → [inst : LE α ] → Prop NoTopOrder α ] : NoBotOrder : (α : Type ?u.362) → [inst : LE α ] → Prop NoBotOrder α ᵒᵈ :=
⟨ fun a => @ exists_not_le : ∀ {α : Type ?u.398} [inst : LE α ] [self : NoTopOrder α ] (a : α ), ∃ b , ¬ b ≤ a exists_not_le α _ _ a ⟩
#align order_dual.no_bot_order OrderDual.noBotOrder
instance OrderDual.noTopOrder [ LE α ] [ NoBotOrder : (α : Type ?u.455) → [inst : LE α ] → Prop NoBotOrder α ] : NoTopOrder : (α : Type ?u.463) → [inst : LE α ] → Prop NoTopOrder α ᵒᵈ :=
⟨ fun a => @ exists_not_ge : ∀ {α : Type ?u.499} [inst : LE α ] [self : NoBotOrder α ] (a : α ), ∃ b , ¬ a ≤ b exists_not_ge α _ _ a ⟩
#align order_dual.no_top_order OrderDual.noTopOrder
instance OrderDual.noMinOrder [ LT α ] [ NoMaxOrder : (α : Type ?u.556) → [inst : LT α ] → Prop NoMaxOrder α ] : NoMinOrder : (α : Type ?u.564) → [inst : LT α ] → Prop NoMinOrder α ᵒᵈ :=
⟨ fun a => @ exists_gt α _ _ a ⟩
#align order_dual.no_min_order OrderDual.noMinOrder
instance OrderDual.noMaxOrder [ LT α ] [ NoMinOrder : (α : Type ?u.652) → [inst : LT α ] → Prop NoMinOrder α ] : NoMaxOrder : (α : Type ?u.660) → [inst : LT α ] → Prop NoMaxOrder α ᵒᵈ :=
⟨ fun a => @ exists_lt α _ _ a ⟩
#align order_dual.no_max_order OrderDual.noMaxOrder
-- See note [lower instance priority]
instance ( priority := 100) [ Preorder α ] [ NoMinOrder : (α : Type ?u.748) → [inst : LT α ] → Prop NoMinOrder α ] : NoBotOrder : (α : Type ?u.762) → [inst : LE α ] → Prop NoBotOrder α :=
⟨ fun a => ( exists_lt a ). imp : ∀ {α : Sort ?u.809} {p q : α → Prop }, (∀ (a : α ), p a → q a ) → (∃ a , p a ) → ∃ a , q a imp fun _ => not_le_of_lt ⟩
-- See note [lower instance priority]
instance ( priority := 100) [ Preorder α ] [ NoMaxOrder : (α : Type ?u.920) → [inst : LT α ] → Prop NoMaxOrder α ] : NoTopOrder : (α : Type ?u.934) → [inst : LE α ] → Prop NoTopOrder α :=
⟨ fun a => ( exists_gt a ). imp : ∀ {α : Sort ?u.981} {p q : α → Prop }, (∀ (a : α ), p a → q a ) → (∃ a , p a ) → ∃ a , q a imp fun _ => not_le_of_lt ⟩
instance noMaxOrder_of_left [ Preorder α ] [ Preorder β ] [ NoMaxOrder : (α : Type ?u.1095) → [inst : LT α ] → Prop NoMaxOrder α ] : NoMaxOrder : (α : Type ?u.1109) → [inst : LT α ] → Prop NoMaxOrder ( α × β ) :=
⟨ fun ⟨ a , b ⟩ => by
obtain ⟨ c , h ⟩ := exists_gt a
exact ⟨( c , b ), Prod.mk_lt_mk_iff_left : ∀ {α : Type ?u.1343} {β : Type ?u.1342} [inst : Preorder α ] [inst_1 : Preorder β ] {a₁ a₂ : α } {b : β },
(a₁ , b ) < (a₂ , b ) ↔ a₁ < a₂ Prod.mk_lt_mk_iff_left. 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 h ⟩ ⟩
#align no_max_order_of_left noMaxOrder_of_left
instance noMaxOrder_of_right [ Preorder α ] [ Preorder β ] [ NoMaxOrder : (α : Type ?u.1454) → [inst : LT α ] → Prop NoMaxOrder β ] : NoMaxOrder : (α : Type ?u.1468) → [inst : LT α ] → Prop NoMaxOrder ( α × β ) :=
⟨ fun ⟨ a , b ⟩ => by
obtain ⟨ c , h ⟩ := exists_gt b
exact ⟨( a , c ), Prod.mk_lt_mk_iff_right : ∀ {α : Type ?u.1679} {β : Type ?u.1678} [inst : Preorder α ] [inst_1 : Preorder β ] {a : α } {b₁ b₂ : β },
(a , b₁ ) < (a , b₂ ) ↔ b₁ < b₂ Prod.mk_lt_mk_iff_right. 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 h ⟩ ⟩
#align no_max_order_of_right noMaxOrder_of_right
instance noMinOrder_of_left [ Preorder α ] [ Preorder β ] [ NoMinOrder : (α : Type ?u.1790) → [inst : LT α ] → Prop NoMinOrder α ] : NoMinOrder : (α : Type ?u.1804) → [inst : LT α ] → Prop NoMinOrder ( α × β ) :=
⟨ fun ⟨ a , b ⟩ => by
obtain ⟨ c , h ⟩ := exists_lt a
exact ⟨( c , b ), Prod.mk_lt_mk_iff_left : ∀ {α : Type ?u.2015} {β : Type ?u.2014} [inst : Preorder α ] [inst_1 : Preorder β ] {a₁ a₂ : α } {b : β },
(a₁ , b ) < (a₂ , b ) ↔ a₁ < a₂ Prod.mk_lt_mk_iff_left. 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 h ⟩ ⟩
#align no_min_order_of_left noMinOrder_of_left
instance noMinOrder_of_right [ Preorder α ] [ Preorder β ] [ NoMinOrder : (α : Type ?u.2126) → [inst : LT α ] → Prop NoMinOrder β ] : NoMinOrder : (α : Type ?u.2140) → [inst : LT α ] → Prop NoMinOrder ( α × β ) :=
⟨ fun ⟨ a , b ⟩ => by
obtain ⟨ c , h ⟩ := exists_lt b
exact ⟨( a , c ), Prod.mk_lt_mk_iff_right : ∀ {α : Type ?u.2351} {β : Type ?u.2350} [inst : Preorder α ] [inst_1 : Preorder β ] {a : α } {b₁ b₂ : β },
(a , b₁ ) < (a , b₂ ) ↔ b₁ < b₂ Prod.mk_lt_mk_iff_right. 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 h ⟩ ⟩
#align no_min_order_of_right noMinOrder_of_right
instance { ι : Type u } { π : ι → Type _ } [ Nonempty ι ] [∀ i , Preorder ( π i )] [∀ i , NoMaxOrder : (α : Type ?u.2478) → [inst : LT α ] → Prop NoMaxOrder ( π i )] :
NoMaxOrder : (α : Type ?u.2496) → [inst : LT α ] → Prop NoMaxOrder (∀ i , π i ) :=
⟨ fun a => by
classical
obtain ⟨ b , hb ⟩ := exists_gt ( a <| Classical.arbitrary : (α : Sort ?u.2623) → [h : Nonempty α ] → α Classical.arbitrary _ )
exact ⟨ _ , lt_update_self_iff . 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 hb ⟩ ⟩
instance { ι : Type u } { π : ι → Type _ } [ Nonempty ι ] [∀ i , Preorder ( π i )] [∀ i , NoMinOrder : (α : Type ?u.2993) → [inst : LT α ] → Prop NoMinOrder ( π i )] :
NoMinOrder : (α : Type ?u.3011) → [inst : LT α ] → Prop NoMinOrder (∀ i , π i ) :=
⟨ fun a => by
classical
obtain ⟨ b , hb ⟩ := exists_lt ( a <| Classical.arbitrary : (α : Sort ?u.3138) → [h : Nonempty α ] → α Classical.arbitrary _ )
exact ⟨ _ , update_lt_self_iff . 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 hb ⟩ ⟩
-- Porting note: mathlib3 proof uses `convert`
theorem NoBotOrder.to_noMinOrder ( α : Type _ ) [ LinearOrder : Type ?u.3491 → Type ?u.3491 LinearOrder α ] [ NoBotOrder : (α : Type ?u.3494) → [inst : LE α ] → Prop NoBotOrder α ] : NoMinOrder : (α : Type ?u.3517) → [inst : LT α ] → Prop NoMinOrder α :=
{ exists_lt := fun a => by simpa [ not_le ] using exists_not_ge : ∀ {α : Type ?u.4012} [inst : LE α ] [self : NoBotOrder α ] (a : α ), ∃ b , ¬ a ≤ b exists_not_ge a }
#align no_bot_order.to_no_min_order NoBotOrder.to_noMinOrder
-- Porting note: mathlib3 proof uses `convert`
theorem NoTopOrder.to_noMaxOrder ( α : Type _ ) [ LinearOrder : Type ?u.5037 → Type ?u.5037 LinearOrder α ] [ NoTopOrder : (α : Type ?u.5040) → [inst : LE α ] → Prop NoTopOrder α ] : NoMaxOrder : (α : Type ?u.5063) → [inst : LT α ] → Prop NoMaxOrder α :=
{ exists_gt := fun a => by simpa [ not_le ] using exists_not_le : ∀ {α : Type ?u.5246} [inst : LE α ] [self : NoTopOrder α ] (a : α ), ∃ b , ¬ b ≤ a exists_not_le a }
#align no_top_order.to_no_max_order NoTopOrder.to_noMaxOrder
theorem noBotOrder_iff_noMinOrder ( α : Type _ ) [ LinearOrder : Type ?u.5562 → Type ?u.5562 LinearOrder α ] : NoBotOrder : (α : Type ?u.5565) → [inst : LE α ] → Prop NoBotOrder α ↔ NoMinOrder : (α : Type ?u.5586) → [inst : LT α ] → Prop NoMinOrder α :=
⟨ fun h =>
haveI := h
NoBotOrder.to_noMinOrder α ,
fun h =>
haveI := h
inferInstance : ∀ {α : Sort ?u.5636} [i : α ], α inferInstance⟩
#align no_bot_order_iff_no_min_order noBotOrder_iff_noMinOrder
theorem noTopOrder_iff_noMaxOrder ( α : Type _ ) [ LinearOrder : Type ?u.5675 → Type ?u.5675 LinearOrder α ] : NoTopOrder : (α : Type ?u.5678) → [inst : LE α ] → Prop NoTopOrder α ↔ NoMaxOrder : (α : Type ?u.5699) → [inst : LT α ] → Prop NoMaxOrder α :=
⟨ fun h =>
haveI := h
NoTopOrder.to_noMaxOrder α ,
fun h =>
haveI := h
inferInstance : ∀ {α : Sort ?u.5749} [i : α ], α inferInstance⟩
#align no_top_order_iff_no_max_order noTopOrder_iff_noMaxOrder
theorem NoMinOrder.not_acc : ∀ [inst : LT α ] [inst_1 : NoMinOrder α ] (a : α ), ¬ Acc (fun x x_1 => x < x_1 ) a NoMinOrder.not_acc [ LT α ] [ NoMinOrder : (α : Type ?u.5788) → [inst : LT α ] → Prop NoMinOrder α ] ( a : α ) : ¬ Acc (· < ·) a := fun h =>
Acc.recOn : ∀ {α : Sort ?u.5850} {r : α → α → Prop } {motive : (a : α ) → Acc r a → Sort ?u.5851 } {a : α } (t : Acc r a ),
(∀ (x : α ) (h : ∀ (y : α ), r y x → Acc r y ),
(∀ (y : α ) (a : r y x ), motive y (_ : Acc r y ) ) → motive x (_ : Acc r x ) ) →
motive a t Acc.recOn h fun x _ => ( exists_lt x ). recOn
#align no_min_order.not_acc NoMinOrder.not_acc : ∀ {α : Type u_1} [inst : LT α ] [inst_1 : NoMinOrder α ] (a : α ), ¬ Acc (fun x x_1 => x < x_1 ) a NoMinOrder.not_acc
theorem NoMaxOrder.not_acc : ∀ {α : Type u_1} [inst : LT α ] [inst_1 : NoMaxOrder α ] (a : α ), ¬ Acc (fun x x_1 => x > x_1 ) a NoMaxOrder.not_acc [ LT α ] [ NoMaxOrder : (α : Type ?u.5989) → [inst : LT α ] → Prop NoMaxOrder α ] ( a : α ) : ¬ Acc (· > ·) a := fun h =>
Acc.recOn : ∀ {α : Sort ?u.6051} {r : α → α → Prop } {motive : (a : α ) → Acc r a → Sort ?u.6052 } {a : α } (t : Acc r a ),
(∀ (x : α ) (h : ∀ (y : α ), r y x → Acc r y ),
(∀ (y : α ) (a : r y x ), motive y (_ : Acc r y ) ) → motive x (_ : Acc r x ) ) →
motive a t Acc.recOn h fun x _ => ( exists_gt x ). recOn
#align no_max_order.not_acc NoMaxOrder.not_acc : ∀ {α : Type u_1} [inst : LT α ] [inst_1 : NoMaxOrder α ] (a : α ), ¬ Acc (fun x x_1 => x > x_1 ) a NoMaxOrder.not_acc
section LE
variable [ LE α ] { a b : α }
/-- `a : α` is a bottom element of `α` if it is less than or equal to any other element of `α`.
This predicate is roughly an unbundled version of `OrderBot`, except that a preorder may have
several bottom elements. When `α` is linear, this is useful to make a case disjunction on
`NoMinOrder α` within a proof. -/
def IsBot ( a : α ) : Prop :=
∀ b , a ≤ b
#align is_bot IsBot
/-- `a : α` is a top element of `α` if it is greater than or equal to any other element of `α`.
This predicate is roughly an unbundled version of `OrderBot`, except that a preorder may have
several top elements. When `α` is linear, this is useful to make a case disjunction on
`NoMaxOrder α` within a proof. -/
def IsTop ( a : α ) : Prop :=
∀ b , b ≤ a
#align is_top IsTop
/-- `a` is a minimal element of `α` if no element is strictly less than it. We spell it without `<`
to avoid having to convert between `≤` and `<`. Instead, `isMin_iff_forall_not_lt` does the
conversion. -/
def IsMin ( a : α ) : Prop :=
∀ ⦃ b ⦄, b ≤ a → a ≤ b
#align is_min IsMin
/-- `a` is a maximal element of `α` if no element is strictly greater than it. We spell it without
`<` to avoid having to convert between `≤` and `<`. Instead, `isMax_iff_forall_not_lt` does the
conversion. -/
def IsMax ( a : α ) : Prop :=
∀ ⦃ b ⦄, a ≤ b → b ≤ a
#align is_max IsMax
@[ simp ]
theorem not_isBot [ NoBotOrder : (α : Type ?u.6383) → [inst : LE α ] → Prop NoBotOrder α ] ( a : α ) : ¬ IsBot : {α : Type ?u.6393} → [inst : LE α ] → α → Prop IsBot a := fun h =>
let ⟨_, hb ⟩ := exists_not_ge : ∀ {α : Type ?u.6406} [inst : LE α ] [self : NoBotOrder α ] (a : α ), ∃ b , ¬ a ≤ b exists_not_ge a
hb <| h _
#align not_is_bot not_isBot
@[ simp ]
theorem not_isTop [ NoTopOrder : (α : Type ?u.6562) → [inst : LE α ] → Prop NoTopOrder α ] ( a : α ) : ¬ IsTop : {α : Type ?u.6572} → [inst : LE α ] → α → Prop IsTop a := fun h =>
let ⟨_, hb ⟩ := exists_not_le : ∀ {α : Type ?u.6585} [inst : LE α ] [self : NoTopOrder α ] (a : α ), ∃ b , ¬ b ≤ a exists_not_le a
hb <| h _
#align not_is_top not_isTop
protected theorem IsBot.isMin ( h : IsBot : {α : Type ?u.6741} → [inst : LE α ] → α → Prop IsBot a ) : IsMin : {α : Type ?u.6761} → [inst : LE α ] → α → Prop IsMin a := fun b _ => h b
#align is_bot.is_min IsBot.isMin
protected theorem IsTop.isMax ( h : IsTop : {α : Type ?u.6806} → [inst : LE α ] → α → Prop IsTop a ) : IsMax : {α : Type ?u.6826} → [inst : LE α ] → α → Prop IsMax a := fun b _ => h b
#align is_top.is_max IsTop.isMax
@[ simp ]
theorem isBot_toDual_iff : IsBot : {α : Type ?u.6871} → [inst : LE α ] → α → Prop IsBot ( toDual : {α : Type ?u.6874} → α ≃ α ᵒᵈ toDual a ) ↔ IsTop : {α : Type ?u.6949} → [inst : LE α ] → α → Prop IsTop a :=
Iff.rfl : ∀ {a : Prop }, a ↔ a Iff.rfl
#align is_bot_to_dual_iff isBot_toDual_iff : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsBot (↑toDual a ) ↔ IsTop a isBot_toDual_iff
@[ simp ]
theorem isTop_toDual_iff : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsTop (↑toDual a ) ↔ IsBot a isTop_toDual_iff : IsTop : {α : Type ?u.7009} → [inst : LE α ] → α → Prop IsTop ( toDual : {α : Type ?u.7012} → α ≃ α ᵒᵈ toDual a ) ↔ IsBot : {α : Type ?u.7087} → [inst : LE α ] → α → Prop IsBot a :=
Iff.rfl : ∀ {a : Prop }, a ↔ a Iff.rfl
#align is_top_to_dual_iff isTop_toDual_iff : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsTop (↑toDual a ) ↔ IsBot a isTop_toDual_iff
@[ simp ]
theorem isMin_toDual_iff : IsMin : {α : Type ?u.7147} → [inst : LE α ] → α → Prop IsMin ( toDual : {α : Type ?u.7150} → α ≃ α ᵒᵈ toDual a ) ↔ IsMax : {α : Type ?u.7225} → [inst : LE α ] → α → Prop IsMax a :=
Iff.rfl : ∀ {a : Prop }, a ↔ a Iff.rfl
#align is_min_to_dual_iff isMin_toDual_iff : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsMin (↑toDual a ) ↔ IsMax a isMin_toDual_iff
@[ simp ]
theorem isMax_toDual_iff : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsMax (↑toDual a ) ↔ IsMin a isMax_toDual_iff : IsMax : {α : Type ?u.7287} → [inst : LE α ] → α → Prop IsMax ( toDual : {α : Type ?u.7290} → α ≃ α ᵒᵈ toDual a ) ↔ IsMin : {α : Type ?u.7365} → [inst : LE α ] → α → Prop IsMin a :=
Iff.rfl : ∀ {a : Prop }, a ↔ a Iff.rfl
#align is_max_to_dual_iff isMax_toDual_iff : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsMax (↑toDual a ) ↔ IsMin a isMax_toDual_iff
@[ simp ]
theorem isBot_ofDual_iff { a : α ᵒᵈ} : IsBot : {α : Type ?u.7430} → [inst : LE α ] → α → Prop IsBot ( ofDual : {α : Type ?u.7433} → α ᵒᵈ ≃ α ofDual a ) ↔ IsTop : {α : Type ?u.7503} → [inst : LE α ] → α → Prop IsTop a :=
Iff.rfl : ∀ {a : Prop }, a ↔ a Iff.rfl
#align is_bot_of_dual_iff isBot_ofDual_iff
@[ simp ]
theorem isTop_ofDual_iff { a : α ᵒᵈ} : IsTop : {α : Type ?u.7573} → [inst : LE α ] → α → Prop IsTop ( ofDual : {α : Type ?u.7576} → α ᵒᵈ ≃ α ofDual a ) ↔ IsBot : {α : Type ?u.7646} → [inst : LE α ] → α → Prop IsBot a :=
Iff.rfl : ∀ {a : Prop }, a ↔ a Iff.rfl
#align is_top_of_dual_iff isTop_ofDual_iff
@[ simp ]
theorem isMin_ofDual_iff { a : α ᵒᵈ} : IsMin : {α : Type ?u.7716} → [inst : LE α ] → α → Prop IsMin ( ofDual : {α : Type ?u.7719} → α ᵒᵈ ≃ α ofDual a ) ↔ IsMax : {α : Type ?u.7789} → [inst : LE α ] → α → Prop IsMax a :=
Iff.rfl : ∀ {a : Prop }, a ↔ a Iff.rfl
#align is_min_of_dual_iff isMin_ofDual_iff
@[ simp ]
theorem isMax_ofDual_iff { a : α ᵒᵈ} : IsMax : {α : Type ?u.7861} → [inst : LE α ] → α → Prop IsMax ( ofDual : {α : Type ?u.7864} → α ᵒᵈ ≃ α ofDual a ) ↔ IsMin : {α : Type ?u.7934} → [inst : LE α ] → α → Prop IsMin a :=
Iff.rfl : ∀ {a : Prop }, a ↔ a Iff.rfl
#align is_max_of_dual_iff isMax_ofDual_iff
alias isBot_toDual_iff : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsBot (↑toDual a ) ↔ IsTop a isBot_toDual_iff ↔ _ IsTop.toDual : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsTop a → IsBot (↑toDual a ) IsTop.toDual
#align is_top.to_dual IsTop.toDual : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsTop a → IsBot (↑toDual a ) IsTop.toDual
alias isTop_toDual_iff : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsTop (↑toDual a ) ↔ IsBot a isTop_toDual_iff ↔ _ IsBot.toDual : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsBot a → IsTop (↑toDual a ) IsBot.toDual
#align is_bot.to_dual IsBot.toDual : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsBot a → IsTop (↑toDual a ) IsBot.toDual
alias isMin_toDual_iff : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsMin (↑toDual a ) ↔ IsMax a isMin_toDual_iff ↔ _ IsMax.toDual : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsMax a → IsMin (↑toDual a ) IsMax.toDual
#align is_max.to_dual IsMax.toDual : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsMax a → IsMin (↑toDual a ) IsMax.toDual
alias isMax_toDual_iff : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsMax (↑toDual a ) ↔ IsMin a isMax_toDual_iff ↔ _ IsMin.toDual : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsMin a → IsMax (↑toDual a ) IsMin.toDual
#align is_min.to_dual IsMin.toDual : ∀ {α : Type u_1} [inst : LE α ] {a : α }, IsMin a → IsMax (↑toDual a ) IsMin.toDual
alias isBot_ofDual_iff ↔ _ IsTop.ofDual
#align is_top.of_dual IsTop.ofDual
alias isTop_ofDual_iff ↔ _ IsBot.ofDual
#align is_bot.of_dual IsBot.ofDual
alias isMin_ofDual_iff ↔ _ IsMax.ofDual
#align is_max.of_dual IsMax.ofDual
alias isMax_ofDual_iff ↔ _ IsMin.ofDual
#align is_min.of_dual IsMin.ofDual
end LE
section Preorder
variable [ Preorder α ] { a b : α }
theorem IsBot.mono ( ha : IsBot : {α : Type ?u.8064} → [inst : LE α ] → α → Prop IsBot a ) ( h : b ≤ a ) : IsBot : {α : Type ?u.8096} → [inst : LE α ] → α → Prop IsBot b := fun _ => h . trans : ∀ {α : Type ?u.8119} [inst : Preorder α ] {a b c : α }, a ≤ b → b ≤ c → a ≤ c trans <| ha _
#align is_bot.mono IsBot.mono
theorem IsTop.mono ( ha : IsTop : {α : Type ?u.8163} → [inst : LE α ] → α → Prop IsTop a ) ( h : a ≤ b ) : IsTop : {α : Type ?u.8195} → [inst : LE α ] → α → Prop IsTop b := fun _ => ( ha _ ). trans : ∀ {α : Type ?u.8219} [inst : Preorder α ] {a b c : α }, a ≤ b → b ≤ c → a ≤ c trans h
#align is_top.mono IsTop.mono
theorem IsMin.mono ( ha : IsMin : {α : Type ?u.8262} → [inst : LE α ] → α → Prop IsMin a ) ( h : b ≤ a ) : IsMin : {α : Type ?u.8294} → [inst : LE α ] → α → Prop IsMin b := fun _ hc => h . trans : ∀ {α : Type ?u.8320} [inst : Preorder α ] {a b c : α }, a ≤ b → b ≤ c → a ≤ c trans <| ha <| hc . trans : ∀ {α : Type ?u.8342} [inst : Preorder α ] {a b c : α }, a ≤ b → b ≤ c → a ≤ c trans h
#align is_min.mono IsMin.mono
theorem IsMax.mono ( ha : IsMax : {α : Type ?u.8379} → [inst : LE α ] → α → Prop IsMax a ) ( h : a ≤ b ) : IsMax : {α : Type ?u.8411} → [inst : LE α ] → α → Prop IsMax b := fun _ hc => ( ha <| h . trans : ∀ {α : Type ?u.8438} [inst : Preorder α ] {a b c : α }, a ≤ b → b ≤ c → a ≤ c trans hc ). trans : ∀ {α : Type ?u.8459} [inst : Preorder α ] {a b c : α }, a ≤ b → b ≤ c → a ≤ c trans h
#align is_max.mono IsMax.mono
theorem IsMin.not_lt ( h : IsMin : {α : Type ?u.8496} → [inst : LE α ] → α → Prop IsMin a ) : ¬ b < a := fun hb => hb . not_le <| h hb . le
#align is_min.not_lt IsMin.not_lt
theorem IsMax.not_lt ( h : IsMax : {α : Type ?u.8594} → [inst : LE α ] → α → Prop IsMax a ) : ¬ a < b := fun hb => hb . not_le <| h hb . le
#align is_max.not_lt IsMax.not_lt
@[ simp ]
theorem not_isMin_of_lt ( h : b < a ) : ¬ IsMin : {α : Type ?u.8707} → [inst : LE α ] → α → Prop IsMin a := fun ha => ha . not_lt h
#align not_is_min_of_lt not_isMin_of_lt
@[ simp ]
theorem not_isMax_of_lt ( h : a < b ) : ¬ IsMax : {α : Type ?u.8801} → [inst : LE α ] → α → Prop IsMax a := fun ha => ha . not_lt h
#align not_is_max_of_lt not_isMax_of_lt
alias not_isMin_of_lt ← LT.lt.not_isMin
alias not_isMax_of_lt ← LT.lt.not_isMax
theorem isMin_iff_forall_not_lt : IsMin a ↔ ∀ (b : α ), ¬ b < a isMin_iff_forall_not_lt : IsMin : {α : Type ?u.8880} → [inst : LE α ] → α → Prop IsMin a ↔ ∀ b , ¬ b < a :=
⟨ fun h _ => h . not_lt , fun h _ hba => of_not_not : ∀ {a : Prop }, ¬ ¬ a → a of_not_not fun hab => h _ <| hba . lt_of_not_le : ∀ {α : Type ?u.8967} [inst : Preorder α ] {a b : α }, a ≤ b → ¬ b ≤ a → a < b lt_of_not_le hab ⟩
#align is_min_iff_forall_not_lt isMin_iff_forall_not_lt
theorem isMax_iff_forall_not_lt : IsMax : {α : Type ?u.9015} → [inst : LE α ] → α → Prop IsMax a ↔ ∀ b , ¬ a < b :=
⟨ fun h _ => h . not_lt , fun h _ hba => of_not_not : ∀ {a : Prop }, ¬ ¬ a → a of_not_not fun hab => h _ <| hba . lt_of_not_le : ∀ {α : Type ?u.9102} [inst : Preorder α ] {a b : α }, a ≤ b → ¬ b ≤ a → a < b lt_of_not_le hab ⟩
#align is_max_iff_forall_not_lt isMax_iff_forall_not_lt
@[ simp ]
theorem not_isMin_iff : ¬ IsMin : {α : Type ?u.9150} → [inst : LE α ] → α → Prop IsMin a ↔ ∃ b , b < a := by
simp [ lt_iff_le_not_le , IsMin : {α : Type ?u.9204} → [inst : LE α ] → α → Prop IsMin, not_forall : ∀ {α : Sort ?u.9206} {p : α → Prop }, (¬ ∀ (x : α ), p x ) ↔ ∃ x , ¬ p x not_forall, exists_prop : ∀ {b a : Prop }, (∃ _h , b ) ↔ a ∧ b exists_prop]
#align not_is_min_iff not_isMin_iff
@[ simp ]
theorem not_isMax_iff : ¬ IsMax : {α : Type ?u.12559} → [inst : LE α ] → α → Prop IsMax a ↔ ∃ b , a < b := by
simp [ lt_iff_le_not_le , IsMax : {α : Type ?u.12613} → [inst : LE α ] → α → Prop IsMax, not_forall : ∀ {α : Sort ?u.12615} {p : α → Prop }, (¬ ∀ (x : α ), p x ) ↔ ∃ x , ¬ p x not_forall, exists_prop : ∀ {b a : Prop }, (∃ _h , b ) ↔ a ∧ b exists_prop]
#align not_is_max_iff not_isMax_iff
@[ simp ]
theorem not_isMin [ NoMinOrder : (α : Type ?u.15961) → [inst : LT α ] → Prop NoMinOrder α ] ( a : α ) : ¬ IsMin : {α : Type ?u.15977} → [inst : LE α ] → α → Prop IsMin a :=
not_isMin_iff . 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 <| exists_lt a
#align not_is_min not_isMin
@[ simp ]
theorem not_isMax [ NoMaxOrder : (α : Type ?u.16073) → [inst : LT α ] → Prop NoMaxOrder α ] ( a : α ) : ¬ IsMax : {α : Type ?u.16089} → [inst : LE α ] → α → Prop IsMax a :=
not_isMax_iff . 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 <| exists_gt a
#align not_is_max not_isMax
namespace Subsingleton
variable [ Subsingleton α ]
protected theorem isBot ( a : α ) : IsBot : {α : Type ?u.16206} → [inst : LE α ] → α → Prop IsBot a := fun _ => ( Subsingleton.elim _ _ ). le : ∀ {α : Type ?u.16264} [inst : Preorder α ] {a b : α }, a = b → a ≤ b le
#align subsingleton.is_bot Subsingleton.isBot
protected theorem isTop ( a : α ) : IsTop : {α : Type ?u.16330} → [inst : LE α ] → α → Prop IsTop a := fun _ => ( Subsingleton.elim _ _ ). le : ∀ {α : Type ?u.16388} [inst : Preorder α ] {a b : α }, a = b → a ≤ b le
#align subsingleton.is_top Subsingleton.isTop
protected theorem isMin ( a : α ) : IsMin : {α : Type ?u.16454} → [inst : LE α ] → α → Prop IsMin a :=
( Subsingleton.isBot _ ). isMin
#align subsingleton.is_min Subsingleton.isMin
protected theorem isMax ( a : α ) : IsMax : {α : Type ?u.16589} → [inst : LE α ] → α → Prop IsMax a :=
( Subsingleton.isTop _ ). isMax
#align subsingleton.is_max Subsingleton.isMax
end Subsingleton
end Preorder
section PartialOrder
variable [ PartialOrder : Type ?u.16712 → Type ?u.16712 PartialOrder α ] { a b : α }
protected theorem IsMin.eq_of_le ( ha : IsMin : {α : Type ?u.16732} → [inst : LE α ] → α → Prop IsMin a ) ( h : b ≤ a ) : b = a :=
h . antisymm <| ha h
#align is_min.eq_of_le IsMin.eq_of_le
protected theorem IsMin.eq_of_ge : IsMin a → b ≤ a → a = b IsMin.eq_of_ge ( ha : IsMin : {α : Type ?u.16817} → [inst : LE α ] → α → Prop IsMin a ) ( h : b ≤ a ) : a = b :=
h . antisymm' <| ha h
#align is_min.eq_of_ge IsMin.eq_of_ge
protected theorem IsMax.eq_of_le : IsMax a → a ≤ b → a = b IsMax.eq_of_le ( ha : IsMax : {α : Type ?u.16902} → [inst : LE α ] → α → Prop IsMax a ) ( h : a ≤ b ) : a = b :=
h . antisymm <| ha h
#align is_max.eq_of_le IsMax.eq_of_le
protected theorem IsMax.eq_of_ge ( ha : IsMax : {α : Type ?u.16987} → [inst : LE α ] → α → Prop IsMax a ) ( h : a ≤ b ) : b = a :=
h . antisymm' <| ha h
#align is_max.eq_of_ge IsMax.eq_of_ge
end PartialOrder
section Prod
variable [ Preorder α ] [ Preorder β ] { a a₁ a₂ : α } { b b₁ b₂ : β } { x y : α × β }
theorem IsBot.prod_mk ( ha : IsBot : {α : Type ?u.17123} → [inst : LE α ] → α → Prop IsBot a ) ( hb : IsBot : {α : Type ?u.17150} → [inst : LE α ] → α → Prop IsBot b ) : IsBot : {α : Type ?u.17177} → [inst : LE α ] → α → Prop IsBot ( a , b ) := fun _ => ⟨ ha _ , hb _ ⟩
#align is_bot.prod_mk IsBot.prod_mk
theorem IsTop.prod_mk ( ha : IsTop : {α : Type ?u.17292} → [inst : LE α ] → α → Prop IsTop a ) ( hb : IsTop : {α : Type ?u.17319} → [inst : LE α ] → α → Prop IsTop b ) : IsTop : {α : Type ?u.17346} → [inst : LE α ] → α → Prop IsTop ( a , b ) := fun _ => ⟨ ha _ , hb _ ⟩
#align is_top.prod_mk IsTop.prod_mk
theorem IsMin.prod_mk ( ha : IsMin : {α : Type ?u.17461} → [inst : LE α ] → α → Prop IsMin a ) ( hb : IsMin : {α : Type ?u.17488} → [inst : LE α ] → α → Prop IsMin b ) : IsMin : {α : Type ?u.17515} → [inst : LE α ] → α → Prop IsMin ( a , b ) := fun _ hc => ⟨ ha hc . 1 : ∀ {a b : Prop }, a ∧ b → a 1, hb hc . 2 : ∀ {a b : Prop }, a ∧ b → b 2⟩
#align is_min.prod_mk IsMin.prod_mk
theorem IsMax.prod_mk ( ha : IsMax : {α : Type ?u.17640} → [inst : LE α ] → α → Prop IsMax a ) ( hb : IsMax : {α : Type ?u.17667} → [inst : LE α ] → α → Prop IsMax b ) : IsMax : {α : Type ?u.17694} → [inst : LE α ] → α → Prop IsMax ( a , b ) := fun _ hc => ⟨ ha hc . 1 : ∀ {a b : Prop }, a ∧ b → a 1, hb hc . 2 : ∀ {a b : Prop }, a ∧ b → b 2⟩
#align is_max.prod_mk IsMax.prod_mk
theorem IsBot.fst ( hx : IsBot : {α : Type ?u.17819} → [inst : LE α ] → α → Prop IsBot x ) : IsBot : {α : Type ?u.17868} → [inst : LE α ] → α → Prop IsBot x . 1 : {α : Type ?u.17884} → {β : Type ?u.17883} → α × β → α 1 := fun c => ( hx ( c , x . 2 : {α : Type ?u.17905} → {β : Type ?u.17904} → α × β → β 2)). 1 : ∀ {a b : Prop }, a ∧ b → a 1
#align is_bot.fst IsBot.fst
theorem IsBot.snd ( hx : IsBot : {α : Type ?u.17956} → [inst : LE α ] → α → Prop IsBot x ) : IsBot : {α : Type ?u.18005} → [inst : LE α ] → α → Prop IsBot x . 2 : {α : Type ?u.18021} → {β : Type ?u.18020} → α × β → β 2 := fun c => ( hx ( x . 1 : {α : Type ?u.18042} → {β : Type ?u.18041} → α × β → α 1, c )). 2 : ∀ {a b : Prop }, a ∧ b → b 2
#align is_bot.snd IsBot.snd
theorem IsTop.fst ( hx : IsTop : {α : Type ?u.18093} → [inst : LE α ] → α → Prop IsTop x ) : IsTop : {α : Type ?u.18142} → [inst : LE α ] → α → Prop IsTop x . 1 : {α : Type ?u.18158} → {β : Type ?u.18157} → α × β → α 1 := fun c => ( hx ( c , x . 2 : {α : Type ?u.18179} → {β : Type ?u.18178} → α × β → β 2)). 1 : ∀ {a b : Prop }, a ∧ b → a 1
#align is_top.fst IsTop.fst
theorem IsTop.snd ( hx : IsTop : {α : Type ?u.18230} → [inst : LE α ] → α → Prop IsTop x ) : IsTop : {α : Type ?u.18279} → [inst : LE α ] → α → Prop IsTop x . 2 : {α : Type ?u.18295} → {β : Type ?u.18294} → α × β → β 2 := fun c => ( hx ( x . 1 : {α : Type ?u.18316} → {β : Type ?u.18315} → α × β → α 1, c )). 2 : ∀ {a b : Prop }, a ∧ b → b 2
#align is_top.snd IsTop.snd
theorem IsMin.fst ( hx : IsMin : {α : Type ?u.18367} → [inst : LE α ] → α → Prop IsMin x ) : IsMin : {α : Type ?u.18416} → [inst : LE α ] → α → Prop IsMin x . 1 : {α : Type ?u.18432} → {β : Type ?u.18431} → α × β → α 1 :=
fun c hc => ( hx <| show ( c , x . 2 : {α : Type ?u.18457} → {β : Type ?u.18456} → α × β → β 2) ≤ x from ( and_iff_left : ∀ {b a : Prop }, b → (a ∧ b ↔ a ) and_iff_left le_rfl ). 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 hc ). 1 : ∀ {a b : Prop }, a ∧ b → a 1
#align is_min.fst IsMin.fst
theorem IsMin.snd ( hx : IsMin : {α : Type ?u.18589} → [inst : LE α ] → α → Prop IsMin x ) : IsMin : {α : Type ?u.18638} → [inst : LE α ] → α → Prop IsMin x . 2 : {α : Type ?u.18654} → {β : Type ?u.18653} → α × β → β 2 :=
fun c hc => ( hx <| show ( x . 1 : {α : Type ?u.18679} → {β : Type ?u.18678} → α × β → α 1, c ) ≤ x from ( and_iff_right : ∀ {a b : Prop }, a → (a ∧ b ↔ b ) and_iff_right le_rfl ). 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 hc ). 2 : ∀ {a b : Prop }, a ∧ b → b 2
#align is_min.snd IsMin.snd
theorem IsMax.fst ( hx : IsMax : {α : Type ?u.18811} → [inst : LE α ] → α → Prop IsMax x ) : IsMax : {α : Type ?u.18860} → [inst : LE α ] → α → Prop IsMax x . 1 : {α : Type ?u.18876} → {β : Type ?u.18875} → α × β → α 1 :=
fun c hc => ( hx <| show x ≤ ( c , x . 2 : {α : Type ?u.18901} → {β : Type ?u.18900} → α × β → β 2) from ( and_iff_left : ∀ {b a : Prop }, b → (a ∧ b ↔ a ) and_iff_left le_rfl ). 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 hc ). 1 : ∀ {a b : Prop }, a ∧ b → a 1
#align is_max.fst IsMax.fst
theorem IsMax.snd ( hx : IsMax : {α : Type ?u.19033} → [inst : LE α ] → α → Prop IsMax x ) : IsMax : {α : Type ?u.19082} → [inst : LE α ] → α → Prop IsMax x . 2 : {α : Type ?u.19098} → {β : Type ?u.19097} → α × β → β 2 :=
fun c hc => ( hx <| show x ≤ ( x . 1 : {α : Type ?u.19123} → {β : Type ?u.19122} → α × β → α 1, c ) from ( and_iff_right : ∀ {a b : Prop }, a → (a ∧ b ↔ b ) and_iff_right le_rfl ). 2 : ∀ {a b : Prop }, (a ↔ b ) → b → a 2 hc ). 2 : ∀ {a b : Prop }, a ∧ b → b 2
#align is_max.snd IsMax.snd
theorem Prod.isBot_iff : IsBot : {α : Type ?u.19255} → [inst : LE α ] → α → Prop IsBot x ↔ IsBot : {α : Type ?u.19290} → [inst : LE α ] → α → Prop IsBot x . 1 : {α : Type ?u.19294} → {β : Type ?u.19293} → α × β → α 1 ∧ IsBot : {α : Type ?u.19302} → [inst : LE α ] → α → Prop IsBot x . 2 : {α : Type ?u.19306} → {β : Type ?u.19305} → α × β → β 2 :=
⟨ fun hx => ⟨ hx . fst , hx . snd ⟩, fun h => h . 1 : ∀ {a b : Prop }, a ∧ b → a 1. prod_mk h . 2 : ∀ {a b : Prop }, a ∧ b → b 2⟩
#align prod.is_bot_iff Prod.isBot_iff
theorem Prod.isTop_iff : IsTop : {α : Type ?u.19475} → [inst : LE α ] → α → Prop IsTop x ↔ IsTop : {α : Type ?u.19510} → [inst : LE α ] → α → Prop IsTop x . 1 : {α : Type ?u.19514} → {β : Type ?u.19513} → α × β → α 1 ∧ IsTop : {α : Type ?u.19522} → [inst : LE α ] → α → Prop IsTop x . 2 : {α : Type ?u.19526} → {β : Type ?u.19525} → α × β → β 2 :=
⟨ fun hx => ⟨ hx . fst , hx . snd ⟩, fun h => h . 1 : ∀ {a b : Prop }, a ∧ b → a 1. prod_mk h . 2 : ∀ {a b : Prop }, a ∧ b → b 2⟩
#align prod.is_top_iff Prod.isTop_iff
theorem Prod.isMin_iff : IsMin : {α : Type ?u.19695} → [inst : LE α ] → α → Prop IsMin x ↔ IsMin : {α : Type ?u.19730} → [inst : LE α ] → α → Prop IsMin x . 1 : {α : Type ?u.19734} → {β : Type ?u.19733} → α × β → α 1 ∧ IsMin : {α : Type ?u.19742} → [inst : LE α ] → α → Prop IsMin x . 2 : {α : Type ?u.19746} → {β : Type ?u.19745} → α × β → β 2 :=
⟨ fun hx => ⟨ hx . fst , hx . snd ⟩, fun h => h . 1 : ∀ {a b : Prop }, a ∧ b → a 1. prod_mk h . 2 : ∀ {a b : Prop }, a ∧ b → b 2⟩
#align prod.is_min_iff Prod.isMin_iff
theorem Prod.isMax_iff : IsMax : {α : Type ?u.19914} → [inst : LE α ] → α → Prop IsMax x ↔ IsMax : {α : Type ?u.19949} → [inst : LE α ] → α → Prop IsMax x . 1 : {α : Type ?u.19953} → {β : Type ?u.19952} → α × β → α 1 ∧ IsMax : {α : Type ?u.19961} → [inst : LE α ] → α → Prop IsMax x . 2 : {α : Type ?u.19965} → {β : Type ?u.19964} → α × β → β 2 :=
⟨ fun hx => ⟨ hx . fst , hx . snd ⟩, fun h => h . 1 : ∀ {a b : Prop }, a ∧ b → a 1. prod_mk h . 2 : ∀ {a b : Prop }, a ∧ b → b 2⟩
#align prod.is_max_iff Prod.isMax_iff
end Prod