The areas / V04. Order and lattices
Mathlib.Order.MinMax
60 declarations. Mathlib docs · Source
instance instLawfulOrderSup_mathlib E0 #
∀ {α : Type u} [inst : LinearOrder α], Std.LawfulOrderSup α
instance instLawfulOrderInf_mathlib E0 #
∀ {α : Type u} [inst : LinearOrder α], Std.LawfulOrderInf α
theorem max_le_max E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c d : α}, a ≤ c → b ≤ d → max a b ≤ max c d
theorem min_le_min E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c d : α}, c ≤ a → d ≤ b → min c d ≤ min a b
theorem max_le_max_left E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b : α} (c : α), a ≤ b → max c a ≤ max c b
theorem min_le_min_left E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b : α} (c : α), b ≤ a → min c b ≤ min c a
theorem min_le_min_right E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b : α} (c : α), b ≤ a → min b c ≤ min a c
theorem max_le_max_right E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b : α} (c : α), a ≤ b → max a c ≤ max b c
theorem min_le_of_left_le E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, b ≤ a → min b c ≤ a
theorem le_max_of_le_left E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, a ≤ b → a ≤ max b c
theorem le_max_of_le_right E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, a ≤ c → a ≤ max b c
theorem min_le_of_right_le E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, c ≤ a → min b c ≤ a
theorem lt_max_of_lt_left E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, a < b → a < max b c
theorem min_lt_of_left_lt E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, b < a → min b c < a
theorem min_lt_of_right_lt E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, c < a → min b c < a
theorem lt_max_of_lt_right E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, a < c → a < max b c
theorem max_min_distrib_left E1 #
∀ {α : Type u} [inst : LinearOrder α] (a b c : α), max a (min b c) = min (max a b) (max a c)
theorem min_max_distrib_left E1 #
∀ {α : Type u} [inst : LinearOrder α] (a b c : α), min a (max b c) = max (min a b) (min a c)
theorem min_max_distrib_right E1 #
∀ {α : Type u} [inst : LinearOrder α] (a b c : α), min (max a b) c = max (min a c) (min b c)
theorem max_min_distrib_right E1 #
∀ {α : Type u} [inst : LinearOrder α] (a b c : α), max (min a b) c = min (max a c) (max b c)
theorem min_le_max E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b : α}, min a b ≤ max a b
theorem max_eq_left_iff E0 #
∀ {α : Type u} [inst : LinearOrder α] {a b : α}, max a b = a ↔ b ≤ a
theorem min_eq_left_iff E0 #
∀ {α : Type u} [inst : LinearOrder α] {a b : α}, min a b = a ↔ a ≤ b
theorem min_eq_right_iff E0 #
∀ {α : Type u} [inst : LinearOrder α] {a b : α}, min a b = b ↔ b ≤ a
theorem max_eq_right_iff E0 #
∀ {α : Type u} [inst : LinearOrder α] {a b : α}, max a b = b ↔ a ≤ b
theorem min_cases E1 #
∀ {α : Type u} [inst : LinearOrder α] (a b : α), min a b = a ∧ a ≤ b ∨ min a b = b ∧ b < a
For elements a and b of a linear order, either min a b = a and a ≤ b,
or min a b = b and b < a.
Use cases on this lemma to automate linarith in inequalities
theorem max_cases E1 #
∀ {α : Type u} [inst : LinearOrder α] (a b : α), max a b = a ∧ b ≤ a ∨ max a b = b ∧ a < b
For elements a and b of a linear order, either max a b = a and b ≤ a,
or max a b = b and a < b.
Use cases on this lemma to automate linarith in inequalities
theorem min_eq_iff E0 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, min a b = c ↔ a = c ∧ a ≤ b ∨ b = c ∧ b ≤ a
theorem max_eq_iff E0 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, max a b = c ↔ a = c ∧ b ≤ a ∨ b = c ∧ a ≤ b
theorem min_lt_min_left_iff E0 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, min a c < min b c ↔ a < b ∧ a < c
theorem max_lt_max_left_iff E0 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, max b c < max a c ↔ b < a ∧ c < a
theorem min_lt_min_right_iff E0 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, min a b < min a c ↔ b < c ∧ b < a
theorem max_lt_max_right_iff E0 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, max a c < max a b ↔ c < b ∧ a < b
instance max_idem E0 #
∀ {α : Type u} [inst : LinearOrder α], Std.IdempotentOp max
An instance asserting that max a a = a
instance min_idem E0 #
∀ {α : Type u} [inst : LinearOrder α], Std.IdempotentOp min
An instance asserting that min a a = a
theorem min_lt_max E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b : α}, min a b < max a b ↔ a ≠ b
theorem max_lt_max E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c d : α}, a < c → b < d → max a b < max c d
theorem min_lt_min E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c d : α}, c < a → d < b → min c d < min a b
theorem min_right_comm E1 #
∀ {α : Type u} [inst : LinearOrder α] (a b c : α), min (min a b) c = min (min a c) b
theorem max_right_comm E1 #
∀ {α : Type u} [inst : LinearOrder α] (a b c : α), max (max a b) c = max (max a c) b
theorem MonotoneOn.map_min E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β} {s : Set α} {a b : α},
MonotoneOn f s → a ∈ s → b ∈ s → f (min a b) = min (f a) (f b)
theorem MonotoneOn.map_max E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β} {s : Set α} {a b : α},
MonotoneOn f s → a ∈ s → b ∈ s → f (max a b) = max (f a) (f b)
theorem AntitoneOn.map_min E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β} {s : Set α} {a b : α},
AntitoneOn f s → a ∈ s → b ∈ s → f (min a b) = max (f a) (f b)
theorem AntitoneOn.map_max E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β} {s : Set α} {a b : α},
AntitoneOn f s → a ∈ s → b ∈ s → f (max a b) = min (f a) (f b)
theorem Monotone.map_max E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β} {a b : α},
Monotone f → f (max a b) = max (f a) (f b)
theorem Monotone.map_min E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β} {a b : α},
Monotone f → f (min a b) = min (f a) (f b)
theorem Antitone.map_max E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β} {a b : α},
Antitone f → f (max a b) = min (f a) (f b)
theorem Antitone.map_min E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β} {a b : α},
Antitone f → f (min a b) = max (f a) (f b)
theorem max_choice E1 #
∀ {α : Type u} [inst : LinearOrder α] (a b : α), max a b = a ∨ max a b = b
theorem min_choice E1 #
∀ {α : Type u} [inst : LinearOrder α] (a b : α), min a b = a ∨ min a b = b
theorem le_of_max_le_left E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, max a b ≤ c → a ≤ c
theorem le_of_le_min_left E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, c ≤ min a b → c ≤ a
theorem le_of_max_le_right E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, max a b ≤ c → b ≤ c
theorem le_of_le_min_right E1 #
∀ {α : Type u} [inst : LinearOrder α] {a b c : α}, c ≤ min a b → c ≤ b
instance instCommutativeMax E0 #
∀ {α : Type u} [inst : LinearOrder α], Std.Commutative max
instance instCommutativeMin E0 #
∀ {α : Type u} [inst : LinearOrder α], Std.Commutative min
instance instAssociativeMax E0 #
∀ {α : Type u} [inst : LinearOrder α], Std.Associative max
instance instAssociativeMin E0 #
∀ {α : Type u} [inst : LinearOrder α], Std.Associative min
theorem max_left_commutative E1 #
∀ {α : Type u} [inst : LinearOrder α], LeftCommutative max
theorem min_left_commutative E1 #
∀ {α : Type u} [inst : LinearOrder α], LeftCommutative min