order.basic
⟷
Mathlib.Order.Basic
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
function.update
is monotone (#18841)
and pi.single
too
@@ -593,6 +593,12 @@ lemma update_le_update_iff :
function.update x i a ≤ function.update y i b ↔ a ≤ b ∧ ∀ j ≠ i, x j ≤ y j :=
by simp [update_le_iff] {contextual := tt}
+@[simp] lemma update_le_update_iff' : update x i a ≤ update x i b ↔ a ≤ b :=
+by simp [update_le_update_iff]
+
+@[simp] lemma update_lt_update_iff : update x i a < update x i b ↔ a < b :=
+lt_iff_lt_of_le_iff_le' update_le_update_iff' update_le_update_iff'
+
@[simp] lemma le_update_self_iff : x ≤ update x i a ↔ x i ≤ a := by simp [le_update_iff]
@[simp] lemma update_le_self_iff : update x i a ≤ x ↔ a ≤ x i := by simp [update_le_iff]
@[simp] lemma lt_update_self_iff : x < update x i a ↔ x i < a := by simp [lt_iff_le_not_le]
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
well_founded_iff_has_min'
and well_founded_iff_has_max'
(#15071)
The predicate x ≤ y → y = x
is no more convenient than ¬ x < y
. For this reason, we ditch well_founded.well_founded_iff_has_min'
and well_founded.well_founded_iff_has_max'
in favor of well_founded.well_founded_iff_has_min
(or in some cases, just well_founded.has_min
. We also remove the misplaced lemma well_founded.eq_iff_not_lt_of_le
, and we golf the theorems that used the removed theorems.
The lemma well_founded.well_founded_iff_has_min
has a misleading name when applied on well_founded (>)
, and mildly screws over dot notation and rewriting by virtue of using >
, but a future refactor will fix this.
@@ -227,6 +227,9 @@ le_iff_lt_or_eq.trans or.comm
lemma lt_iff_le_and_ne [partial_order α] {a b : α} : a < b ↔ a ≤ b ∧ a ≠ b :=
⟨λ h, ⟨le_of_lt h, ne_of_lt h⟩, λ ⟨h1, h2⟩, h1.lt_of_ne h2⟩
+lemma eq_iff_not_lt_of_le {α} [partial_order α] {x y : α} : x ≤ y → y = x ↔ ¬ x < y :=
+by rw [lt_iff_le_and_ne, not_and, not_not, eq_comm]
+
-- See Note [decidable namespace]
protected lemma decidable.eq_iff_le_not_lt [partial_order α] [@decidable_rel α (≤)]
{a b : α} : a = b ↔ a ≤ b ∧ ¬ a < b :=
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
a₁ * b₁ ≤ a₂ * b₂ → a₁ ≤ a₂ ∨ b₁ ≤ b₂
(#18667)
Complete the API.
@@ -239,10 +239,13 @@ by haveI := classical.dec; exact decidable.eq_iff_le_not_lt
lemma eq_or_lt_of_le [partial_order α] {a b : α} (h : a ≤ b) : a = b ∨ a < b := h.lt_or_eq.symm
lemma eq_or_gt_of_le [partial_order α] {a b : α} (h : a ≤ b) : b = a ∨ a < b :=
h.lt_or_eq.symm.imp eq.symm id
+lemma gt_or_eq_of_le [partial_order α] {a b : α} (hab : a ≤ b) : a < b ∨ b = a :=
+(eq_or_gt_of_le hab).symm
alias decidable.eq_or_lt_of_le ← has_le.le.eq_or_lt_dec
alias eq_or_lt_of_le ← has_le.le.eq_or_lt
alias eq_or_gt_of_le ← has_le.le.eq_or_gt
+alias gt_or_eq_of_le ← has_le.le.gt_or_eq
attribute [nolint decidable_classical] has_le.le.eq_or_lt_dec
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
eq_or_eq_or_eq_of_forall_not_lt_lt
, finite.of_forall_not_lt_lt
, set.finite_of_forall_not_lt_lt
(replacing set.finite_of_forall_between_eq_endpoints
), and set.finite_of_forall_not_lt_lt'
.data.finset.basic
instead of data.finset.sort
in data.set.finite
.@@ -876,6 +876,16 @@ or_iff_not_imp_left.2 $ λ h,
⟨λ a ha₁, le_of_not_gt $ λ ha₂, h ⟨a, ha₁, ha₂⟩,
λ a ha₂, le_of_not_gt $ λ ha₁, h ⟨a, ha₁, ha₂⟩⟩
+/-- If a linear order has no elements `x < y < z`, then it has at most two elements. -/
+lemma eq_or_eq_or_eq_of_forall_not_lt_lt {α : Type*} [linear_order α]
+ (h : ∀ ⦃x y z : α⦄, x < y → y < z → false) (x y z : α) : x = y ∨ y = z ∨ x = z :=
+begin
+ by_contra hne, push_neg at hne,
+ cases hne.1.lt_or_lt with h₁ h₁; cases hne.2.1.lt_or_lt with h₂ h₂;
+ cases hne.2.2.lt_or_lt with h₃ h₃,
+ exacts [h h₁ h₂, h h₂ h₃, h h₃ h₂, h h₃ h₁, h h₁ h₃, h h₂ h₃, h h₁ h₃, h h₂ h₁]
+end
+
namespace punit
variables (a b : punit.{u+1})
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
Simpler conditions to check commutativity/associativity of a function valued in a partial order.
@@ -378,6 +378,23 @@ lemma le_implies_le_of_le_of_le {a b c d : α} [preorder α] (hca : c ≤ a) (hb
a ≤ b → c ≤ d :=
λ hab, (hca.trans hab).trans hbd
+section partial_order
+variables [partial_order α]
+
+/-- To prove commutativity of a binary operation `○`, we only to check `a ○ b ≤ b ○ a` for all `a`,
+`b`. -/
+lemma commutative_of_le {f : β → β → α} (comm : ∀ a b, f a b ≤ f b a) : ∀ a b, f a b = f b a :=
+λ a b, (comm _ _).antisymm $ comm _ _
+
+/-- To prove associativity of a commutative binary operation `○`, we only to check
+`(a ○ b) ○ c ≤ a ○ (b ○ c)` for all `a`, `b`, `c`. -/
+lemma associative_of_commutative_of_le {f : α → α → α} (comm : commutative f)
+ (assoc : ∀ a b c, f (f a b) c ≤ f a (f b c)) :
+ associative f :=
+λ a b c, le_antisymm (assoc _ _ _) $ by { rw [comm, comm b, comm _ c, comm a], exact assoc _ _ _ }
+
+end partial_order
+
@[ext]
lemma preorder.to_has_le_injective {α : Type*} :
function.injective (@preorder.to_has_le α) :=
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1435,7 +1435,7 @@ theorem mk_le_mk [LE α] [LE β] {x₁ x₂ : α} {y₁ y₂ : β} : (x₁, y₁
#print Prod.swap_le_swap /-
@[simp]
theorem swap_le_swap [LE α] [LE β] {x y : α × β} : x.symm ≤ y.symm ↔ x ≤ y :=
- and_comm' _ _
+ and_comm _ _
#align prod.swap_le_swap Prod.swap_le_swap
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1098,21 +1098,21 @@ section Function
variable [DecidableEq ι] [∀ i, Preorder (π i)] {x y : ∀ i, π i} {i : ι} {a b : π i}
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (j «expr ≠ » i) -/
#print le_update_iff /-
theorem le_update_iff : x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => x j ≤ z
#align le_update_iff le_update_iff
-/
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (j «expr ≠ » i) -/
#print update_le_iff /-
theorem update_le_iff : Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => z ≤ y j
#align update_le_iff update_le_iff
-/
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (j «expr ≠ » i) -/
#print update_le_update_iff /-
theorem update_le_update_iff :
Function.update x i a ≤ Function.update y i b ↔ a ≤ b ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -799,7 +799,7 @@ theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.to
injection h with h_le
have : A_lt = B_lt := by
funext a b
- dsimp [(· ≤ ·)] at A_lt_iff_le_not_le B_lt_iff_le_not_le h_le
+ dsimp [(· ≤ ·)] at A_lt_iff_le_not_le B_lt_iff_le_not_le h_le
simp [A_lt_iff_le_not_le, B_lt_iff_le_not_le, h_le]
congr
#align preorder.to_has_le_injective Preorder.toLE_injective
@@ -1607,7 +1607,7 @@ theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
theorem eq_or_eq_or_eq_of_forall_not_lt_lt {α : Type _} [LinearOrder α]
(h : ∀ ⦃x y z : α⦄, x < y → y < z → False) (x y z : α) : x = y ∨ y = z ∨ x = z :=
by
- by_contra hne; push_neg at hne
+ by_contra hne; push_neg at hne
cases' hne.1.lt_or_lt with h₁ h₁ <;> cases' hne.2.1.lt_or_lt with h₂ h₂ <;>
cases' hne.2.2.lt_or_lt with h₃ h₃
exacts [h h₁ h₂, h h₂ h₃, h h₃ h₂, h h₃ h₁, h h₁ h₃, h h₂ h₃, h h₁ h₃, h h₂ h₁]
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -965,7 +965,7 @@ class HasCompl (α : Type _) where
export HasCompl (compl)
-/- ./././Mathport/Syntax/Translate/Command.lean:487:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
+/- ./././Mathport/Syntax/Translate/Command.lean:483:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
postfix:999 "ᶜ" => compl
#print Prop.hasCompl /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1552,7 +1552,14 @@ instance [Preorder α] [Preorder β] [DenselyOrdered α] [DenselyOrdered β] : D
instance {α : ι → Type _} [∀ i, Preorder (α i)] [∀ i, DenselyOrdered (α i)] :
DenselyOrdered (∀ i, α i) :=
- ⟨fun a b => by classical⟩
+ ⟨fun a b => by
+ classical
+ simp_rw [Pi.lt_def]
+ rintro ⟨hab, i, hi⟩
+ obtain ⟨c, ha, hb⟩ := exists_between hi
+ exact
+ ⟨a.update i c, ⟨le_update_iff.2 ⟨ha.le, fun _ _ => le_rfl⟩, i, by rwa [update_same]⟩,
+ update_le_iff.2 ⟨hb.le, fun _ _ => hab _⟩, i, by rwa [update_same]⟩⟩
#print le_of_forall_le_of_dense /-
theorem le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1552,14 +1552,7 @@ instance [Preorder α] [Preorder β] [DenselyOrdered α] [DenselyOrdered β] : D
instance {α : ι → Type _} [∀ i, Preorder (α i)] [∀ i, DenselyOrdered (α i)] :
DenselyOrdered (∀ i, α i) :=
- ⟨fun a b => by
- classical
- simp_rw [Pi.lt_def]
- rintro ⟨hab, i, hi⟩
- obtain ⟨c, ha, hb⟩ := exists_between hi
- exact
- ⟨a.update i c, ⟨le_update_iff.2 ⟨ha.le, fun _ _ => le_rfl⟩, i, by rwa [update_same]⟩,
- update_le_iff.2 ⟨hb.le, fun _ _ => hab _⟩, i, by rwa [update_same]⟩⟩
+ ⟨fun a b => by classical⟩
#print le_of_forall_le_of_dense /-
theorem le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -965,7 +965,7 @@ class HasCompl (α : Type _) where
export HasCompl (compl)
-/- ./././Mathport/Syntax/Translate/Command.lean:477:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
+/- ./././Mathport/Syntax/Translate/Command.lean:487:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
postfix:999 "ᶜ" => compl
#print Prop.hasCompl /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1596,7 +1596,7 @@ theorem eq_of_le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a
#print dense_or_discrete /-
theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
(∃ a, a₁ < a ∧ a < a₂) ∨ (∀ a, a₁ < a → a₂ ≤ a) ∧ ∀ a < a₂, a ≤ a₁ :=
- or_iff_not_imp_left.2 fun h =>
+ Classical.or_iff_not_imp_left.2 fun h =>
⟨fun a ha₁ => le_of_not_gt fun ha₂ => h ⟨a, ha₁, ha₂⟩, fun a ha₂ =>
le_of_not_gt fun ha₁ => h ⟨a, ha₁, ha₂⟩⟩
#align dense_or_discrete dense_or_discrete
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
-/
-import Mathbin.Data.Prod.Basic
-import Mathbin.Data.Subtype
+import Data.Prod.Basic
+import Data.Subtype
#align_import order.basic from "leanprover-community/mathlib"@"90df25ded755a2cf9651ea850d1abe429b1e4eb1"
@@ -965,7 +965,7 @@ class HasCompl (α : Type _) where
export HasCompl (compl)
-/- ./././Mathport/Syntax/Translate/Command.lean:476:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
+/- ./././Mathport/Syntax/Translate/Command.lean:477:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
postfix:999 "ᶜ" => compl
#print Prop.hasCompl /-
@@ -1098,21 +1098,21 @@ section Function
variable [DecidableEq ι] [∀ i, Preorder (π i)] {x y : ∀ i, π i} {i : ι} {a b : π i}
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (j «expr ≠ » i) -/
#print le_update_iff /-
theorem le_update_iff : x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => x j ≤ z
#align le_update_iff le_update_iff
-/
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (j «expr ≠ » i) -/
#print update_le_iff /-
theorem update_le_iff : Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => z ≤ y j
#align update_le_iff update_le_iff
-/
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (j «expr ≠ » i) -/
#print update_le_update_iff /-
theorem update_le_update_iff :
Function.update x i a ≤ Function.update y i b ↔ a ≤ b ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -130,62 +130,64 @@ attribute [simp] le_refl
attribute [ext] LE
-alias le_trans ← LE.le.trans
+alias LE.le.trans := le_trans
#align has_le.le.trans LE.le.trans
-alias le_trans' ← LE.le.trans'
+alias LE.le.trans' := le_trans'
#align has_le.le.trans' LE.le.trans'
-alias lt_of_le_of_lt ← LE.le.trans_lt
+alias LE.le.trans_lt := lt_of_le_of_lt
#align has_le.le.trans_lt LE.le.trans_lt
-alias lt_of_le_of_lt' ← LE.le.trans_lt'
+alias LE.le.trans_lt' := lt_of_le_of_lt'
#align has_le.le.trans_lt' LE.le.trans_lt'
-alias le_antisymm ← LE.le.antisymm
+alias LE.le.antisymm := le_antisymm
#align has_le.le.antisymm LE.le.antisymm
-alias ge_antisymm ← LE.le.antisymm'
+alias LE.le.antisymm' := ge_antisymm
#align has_le.le.antisymm' LE.le.antisymm'
-alias lt_of_le_of_ne ← LE.le.lt_of_ne
+alias LE.le.lt_of_ne := lt_of_le_of_ne
#align has_le.le.lt_of_ne LE.le.lt_of_ne
-alias lt_of_le_of_ne' ← LE.le.lt_of_ne'
+alias LE.le.lt_of_ne' := lt_of_le_of_ne'
#align has_le.le.lt_of_ne' LE.le.lt_of_ne'
-alias lt_of_le_not_le ← LE.le.lt_of_not_le
+alias LE.le.lt_of_not_le := lt_of_le_not_le
#align has_le.le.lt_of_not_le LE.le.lt_of_not_le
-alias lt_or_eq_of_le ← LE.le.lt_or_eq
+alias LE.le.lt_or_eq := lt_or_eq_of_le
#align has_le.le.lt_or_eq LE.le.lt_or_eq
-alias Decidable.lt_or_eq_of_le ← LE.le.lt_or_eq_dec
+alias LE.le.lt_or_eq_dec := Decidable.lt_or_eq_of_le
#align has_le.le.lt_or_eq_dec LE.le.lt_or_eq_dec
-alias le_of_lt ← LT.lt.le
+alias LT.lt.le := le_of_lt
#align has_lt.lt.le LT.lt.le
-alias lt_trans ← LT.lt.trans
+alias LT.lt.trans := lt_trans
#align has_lt.lt.trans LT.lt.trans
-alias lt_trans' ← LT.lt.trans'
+alias LT.lt.trans' := lt_trans'
#align has_lt.lt.trans' LT.lt.trans'
-alias lt_of_lt_of_le ← LT.lt.trans_le
+alias LT.lt.trans_le := lt_of_lt_of_le
#align has_lt.lt.trans_le LT.lt.trans_le
-alias lt_of_lt_of_le' ← LT.lt.trans_le'
+alias LT.lt.trans_le' := lt_of_lt_of_le'
#align has_lt.lt.trans_le' LT.lt.trans_le'
-alias ne_of_lt ← LT.lt.ne
+alias LT.lt.ne := ne_of_lt
#align has_lt.lt.ne LT.lt.ne
-alias lt_asymm ← LT.lt.asymm LT.lt.not_lt
+alias LT.lt.asymm := lt_asymm
#align has_lt.lt.asymm LT.lt.asymm
+
+alias LT.lt.not_lt := lt_asymm
#align has_lt.lt.not_lt LT.lt.not_lt
-alias le_of_eq ← Eq.le
+alias Eq.le := le_of_eq
#align eq.le Eq.le
attribute [nolint decidable_classical] LE.le.lt_or_eq_dec
@@ -256,28 +258,28 @@ theorem lt_of_eq_of_lt' : b = c → a < b → a < c :=
#align lt_of_eq_of_lt' lt_of_eq_of_lt'
-/
-alias le_of_le_of_eq ← LE.le.trans_eq
+alias LE.le.trans_eq := le_of_le_of_eq
#align has_le.le.trans_eq LE.le.trans_eq
-alias le_of_le_of_eq' ← LE.le.trans_eq'
+alias LE.le.trans_eq' := le_of_le_of_eq'
#align has_le.le.trans_eq' LE.le.trans_eq'
-alias lt_of_lt_of_eq ← LT.lt.trans_eq
+alias LT.lt.trans_eq := lt_of_lt_of_eq
#align has_lt.lt.trans_eq LT.lt.trans_eq
-alias lt_of_lt_of_eq' ← LT.lt.trans_eq'
+alias LT.lt.trans_eq' := lt_of_lt_of_eq'
#align has_lt.lt.trans_eq' LT.lt.trans_eq'
-alias le_of_eq_of_le ← Eq.trans_le
+alias Eq.trans_le := le_of_eq_of_le
#align eq.trans_le Eq.trans_le
-alias le_of_eq_of_le' ← Eq.trans_ge
+alias Eq.trans_ge := le_of_eq_of_le'
#align eq.trans_ge Eq.trans_ge
-alias lt_of_eq_of_lt ← Eq.trans_lt
+alias Eq.trans_lt := lt_of_eq_of_lt
#align eq.trans_lt Eq.trans_lt
-alias lt_of_eq_of_lt' ← Eq.trans_gt
+alias Eq.trans_gt := lt_of_eq_of_lt'
#align eq.trans_gt Eq.trans_gt
end
@@ -455,7 +457,7 @@ theorem not_le_of_lt [Preorder α] {a b : α} (h : a < b) : ¬b ≤ a :=
#align not_le_of_lt not_le_of_lt
-/
-alias not_le_of_lt ← LT.lt.not_le
+alias LT.lt.not_le := not_le_of_lt
#align has_lt.lt.not_le LT.lt.not_le
#print not_lt_of_le /-
@@ -463,7 +465,7 @@ theorem not_lt_of_le [Preorder α] {a b : α} (h : a ≤ b) : ¬b < a := fun hba
#align not_lt_of_le not_lt_of_le
-/
-alias not_lt_of_le ← LE.le.not_lt
+alias LE.le.not_lt := not_lt_of_le
#align has_le.le.not_lt LE.le.not_lt
#print ne_of_not_le /-
@@ -531,16 +533,16 @@ theorem gt_or_eq_of_le [PartialOrder α] {a b : α} (hab : a ≤ b) : a < b ∨
#align gt_or_eq_of_le gt_or_eq_of_le
-/
-alias Decidable.eq_or_lt_of_le ← LE.le.eq_or_lt_dec
+alias LE.le.eq_or_lt_dec := Decidable.eq_or_lt_of_le
#align has_le.le.eq_or_lt_dec LE.le.eq_or_lt_dec
-alias eq_or_lt_of_le ← LE.le.eq_or_lt
+alias LE.le.eq_or_lt := eq_or_lt_of_le
#align has_le.le.eq_or_lt LE.le.eq_or_lt
-alias eq_or_gt_of_le ← LE.le.eq_or_gt
+alias LE.le.eq_or_gt := eq_or_gt_of_le
#align has_le.le.eq_or_gt LE.le.eq_or_gt
-alias gt_or_eq_of_le ← LE.le.gt_or_eq
+alias LE.le.gt_or_eq := gt_or_eq_of_le
#align has_le.le.gt_or_eq LE.le.gt_or_eq
attribute [nolint decidable_classical] LE.le.eq_or_lt_dec
@@ -557,10 +559,10 @@ theorem eq_of_ge_of_not_gt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba :
#align eq_of_ge_of_not_gt eq_of_ge_of_not_gt
-/
-alias eq_of_le_of_not_lt ← LE.le.eq_of_not_lt
+alias LE.le.eq_of_not_lt := eq_of_le_of_not_lt
#align has_le.le.eq_of_not_lt LE.le.eq_of_not_lt
-alias eq_of_ge_of_not_gt ← LE.le.eq_of_not_gt
+alias LE.le.eq_of_not_gt := eq_of_ge_of_not_gt
#align has_le.le.eq_of_not_gt LE.le.eq_of_not_gt
#print Ne.le_iff_lt /-
@@ -1078,16 +1080,16 @@ theorem strongLT_of_le_of_strongLT (hab : a ≤ b) (hbc : b ≺ c) : a ≺ c :=
#align strong_lt_of_le_of_strong_lt strongLT_of_le_of_strongLT
-/
-alias le_of_strongLT ← StrongLT.le
+alias StrongLT.le := le_of_strongLT
#align strong_lt.le StrongLT.le
-alias lt_of_strongLT ← StrongLT.lt
+alias StrongLT.lt := lt_of_strongLT
#align strong_lt.lt StrongLT.lt
-alias strongLT_of_strongLT_of_le ← StrongLT.trans_le
+alias StrongLT.trans_le := strongLT_of_strongLT_of_le
#align strong_lt.trans_le StrongLT.trans_le
-alias strongLT_of_le_of_strongLT ← LE.le.trans_strongLT
+alias LE.le.trans_strongLT := strongLT_of_le_of_strongLT
#align has_le.le.trans_strong_lt LE.le.trans_strongLT
end Pi
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -934,16 +934,18 @@ theorem Preorder.dual_dual (α : Type _) [H : Preorder α] : OrderDual.preorder
#align order_dual.preorder.dual_dual OrderDual.Preorder.dual_dual
-/
-#print OrderDual.partialOrder.dual_dual /-
-theorem partialOrder.dual_dual (α : Type _) [H : PartialOrder α] : OrderDual.partialOrder αᵒᵈ = H :=
+#print OrderDual.instPartialOrder.dual_dual /-
+theorem instPartialOrder.dual_dual (α : Type _) [H : PartialOrder α] :
+ OrderDual.partialOrder αᵒᵈ = H :=
PartialOrder.ext fun _ _ => Iff.rfl
-#align order_dual.partial_order.dual_dual OrderDual.partialOrder.dual_dual
+#align order_dual.partial_order.dual_dual OrderDual.instPartialOrder.dual_dual
-/
-#print OrderDual.linearOrder.dual_dual /-
-theorem linearOrder.dual_dual (α : Type _) [H : LinearOrder α] : OrderDual.linearOrder αᵒᵈ = H :=
+#print OrderDual.instLinearOrder.dual_dual /-
+theorem instLinearOrder.dual_dual (α : Type _) [H : LinearOrder α] :
+ OrderDual.instLinearOrder αᵒᵈ = H :=
LinearOrder.ext fun _ _ => Iff.rfl
-#align order_dual.linear_order.dual_dual OrderDual.linearOrder.dual_dual
+#align order_dual.linear_order.dual_dual OrderDual.instLinearOrder.dual_dual
-/
end OrderDual
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
-
-! This file was ported from Lean 3 source module order.basic
-! leanprover-community/mathlib commit 90df25ded755a2cf9651ea850d1abe429b1e4eb1
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Prod.Basic
import Mathbin.Data.Subtype
+#align_import order.basic from "leanprover-community/mathlib"@"90df25ded755a2cf9651ea850d1abe429b1e4eb1"
+
/-!
# Basic definitions about `≤` and `<`
@@ -1097,21 +1094,21 @@ section Function
variable [DecidableEq ι] [∀ i, Preorder (π i)] {x y : ∀ i, π i} {i : ι} {a b : π i}
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
#print le_update_iff /-
theorem le_update_iff : x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => x j ≤ z
#align le_update_iff le_update_iff
-/
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
#print update_le_iff /-
theorem update_le_iff : Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => z ≤ y j
#align update_le_iff update_le_iff
-/
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
#print update_le_update_iff /-
theorem update_le_update_iff :
Function.update x i a ≤ Function.update y i b ↔ a ≤ b ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
@@ -836,7 +836,7 @@ theorem Preorder.ext {α} {A B : Preorder α}
(haveI := A
x ≤ y) ↔
x ≤ y) :
- A = B := by ext (x y); exact H x y
+ A = B := by ext x y; exact H x y
#align preorder.ext Preorder.ext
-/
@@ -847,7 +847,7 @@ theorem PartialOrder.ext {α} {A B : PartialOrder α}
(haveI := A
x ≤ y) ↔
x ≤ y) :
- A = B := by ext (x y); exact H x y
+ A = B := by ext x y; exact H x y
#align partial_order.ext PartialOrder.ext
-/
@@ -858,7 +858,7 @@ theorem LinearOrder.ext {α} {A B : LinearOrder α}
(haveI := A
x ≤ y) ↔
x ≤ y) :
- A = B := by ext (x y); exact H x y
+ A = B := by ext x y; exact H x y
#align linear_order.ext LinearOrder.ext
-/
@@ -1314,8 +1314,8 @@ def LinearOrder.lift {α β} [LinearOrder β] [Sup α] [Inf α] (f : α → β)
DecidableEq := fun x y => decidable_of_iff (f x = f y) inj.eq_iff
min := (· ⊓ ·)
max := (· ⊔ ·)
- min_def := by ext (x y); apply inj; rw [hinf, min_def, minDefault, apply_ite f]; rfl
- max_def := by ext (x y); apply inj; rw [hsup, max_def, maxDefault, apply_ite f]; rfl }
+ min_def := by ext x y; apply inj; rw [hinf, min_def, minDefault, apply_ite f]; rfl
+ max_def := by ext x y; apply inj; rw [hsup, max_def, maxDefault, apply_ite f]; rfl }
#align linear_order.lift LinearOrder.lift
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -594,6 +594,7 @@ theorem ne_iff_lt_iff_le [PartialOrder α] {a b : α} : (a ≠ b ↔ a < b) ↔
#align ne_iff_lt_iff_le ne_iff_lt_iff_le
-/
+#print min_def' /-
-- Variant of `min_def` with the branches reversed.
theorem min_def' [LinearOrder α] (a b : α) : min a b = if b ≤ a then b else a :=
by
@@ -603,7 +604,9 @@ theorem min_def' [LinearOrder α] (a b : α) : min a b = if b ≤ a then b else
· rw [if_pos Eq.le, if_pos Eq.ge, Eq]
· rw [if_neg (not_le.mpr GT.gt), if_pos gt.le]
#align min_def' min_def'
+-/
+#print max_def' /-
-- Variant of `min_def` with the branches reversed.
-- This is sometimes useful as it used to be the default.
theorem max_def' [LinearOrder α] (a b : α) : max a b = if b ≤ a then a else b :=
@@ -614,6 +617,7 @@ theorem max_def' [LinearOrder α] (a b : α) : max a b = if b ≤ a then a else
· rw [if_pos Eq.le, if_pos Eq.ge, Eq]
· rw [if_neg (not_le.mpr GT.gt), if_pos gt.le]
#align max_def' max_def'
+-/
#print lt_of_not_le /-
theorem lt_of_not_le [LinearOrder α] {a b : α} (h : ¬b ≤ a) : a < b :=
@@ -655,30 +659,40 @@ theorem exists_ge_of_linear [LinearOrder α] (a b : α) : ∃ c, a ≤ c ∧ b
#align exists_ge_of_linear exists_ge_of_linear
-/
+#print lt_imp_lt_of_le_imp_le /-
theorem lt_imp_lt_of_le_imp_le {β} [LinearOrder α] [Preorder β] {a b : α} {c d : β}
(H : a ≤ b → c ≤ d) (h : d < c) : b < a :=
lt_of_not_le fun h' => (H h').not_lt h
#align lt_imp_lt_of_le_imp_le lt_imp_lt_of_le_imp_le
+-/
+#print le_imp_le_iff_lt_imp_lt /-
theorem le_imp_le_iff_lt_imp_lt {β} [LinearOrder α] [LinearOrder β] {a b : α} {c d : β} :
a ≤ b → c ≤ d ↔ d < c → b < a :=
⟨lt_imp_lt_of_le_imp_le, le_imp_le_of_lt_imp_lt⟩
#align le_imp_le_iff_lt_imp_lt le_imp_le_iff_lt_imp_lt
+-/
+#print lt_iff_lt_of_le_iff_le' /-
theorem lt_iff_lt_of_le_iff_le' {β} [Preorder α] [Preorder β] {a b : α} {c d : β}
(H : a ≤ b ↔ c ≤ d) (H' : b ≤ a ↔ d ≤ c) : b < a ↔ d < c :=
lt_iff_le_not_le.trans <| (and_congr H' (not_congr H)).trans lt_iff_le_not_le.symm
#align lt_iff_lt_of_le_iff_le' lt_iff_lt_of_le_iff_le'
+-/
+#print lt_iff_lt_of_le_iff_le /-
theorem lt_iff_lt_of_le_iff_le {β} [LinearOrder α] [LinearOrder β] {a b : α} {c d : β}
(H : a ≤ b ↔ c ≤ d) : b < a ↔ d < c :=
not_le.symm.trans <| (not_congr H).trans <| not_le
#align lt_iff_lt_of_le_iff_le lt_iff_lt_of_le_iff_le
+-/
+#print le_iff_le_iff_lt_iff_lt /-
theorem le_iff_le_iff_lt_iff_lt {β} [LinearOrder α] [LinearOrder β] {a b : α} {c d : β} :
(a ≤ b ↔ c ≤ d) ↔ (b < a ↔ d < c) :=
⟨lt_iff_lt_of_le_iff_le, fun H => not_lt.symm.trans <| (not_congr H).trans <| not_lt⟩
#align le_iff_le_iff_lt_iff_lt le_iff_le_iff_lt_iff_lt
+-/
#print eq_of_forall_le_iff /-
theorem eq_of_forall_le_iff [PartialOrder α] {a b : α} (H : ∀ c, c ≤ a ↔ c ≤ b) : a = b :=
@@ -858,7 +872,6 @@ def Order.Preimage {α β} (f : α → β) (s : β → β → Prop) (x y : α) :
#align order.preimage Order.Preimage
-/
--- mathport name: «expr ⁻¹'o »
infixl:80 " ⁻¹'o " => Order.Preimage
#print Order.Preimage.decidable /-
@@ -879,7 +892,6 @@ def OrderDual (α : Type _) : Type _ :=
#align order_dual OrderDual
-/
--- mathport name: «expr ᵒᵈ»
notation:max α "ᵒᵈ" => OrderDual α
namespace OrderDual
@@ -952,8 +964,7 @@ class HasCompl (α : Type _) where
export HasCompl (compl)
-/- ./././Mathport/Syntax/Translate/Command.lean:477:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
--- mathport name: «expr ᶜ»
+/- ./././Mathport/Syntax/Translate/Command.lean:476:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
postfix:999 "ᶜ" => compl
#print Prop.hasCompl /-
@@ -1041,25 +1052,32 @@ def StrongLT [∀ i, LT (π i)] (a b : ∀ i, π i) : Prop :=
#align strong_lt StrongLT
-/
--- mathport name: «expr ≺ »
local infixl:50 " ≺ " => StrongLT
variable [∀ i, Preorder (π i)] {a b c : ∀ i, π i}
+#print le_of_strongLT /-
theorem le_of_strongLT (h : a ≺ b) : a ≤ b := fun i => (h _).le
#align le_of_strong_lt le_of_strongLT
+-/
+#print lt_of_strongLT /-
theorem lt_of_strongLT [Nonempty ι] (h : a ≺ b) : a < b := by inhabit ι;
exact Pi.lt_def.2 ⟨le_of_strongLT h, default, h _⟩
#align lt_of_strong_lt lt_of_strongLT
+-/
+#print strongLT_of_strongLT_of_le /-
theorem strongLT_of_strongLT_of_le (hab : a ≺ b) (hbc : b ≤ c) : a ≺ c := fun i =>
(hab _).trans_le <| hbc _
#align strong_lt_of_strong_lt_of_le strongLT_of_strongLT_of_le
+-/
+#print strongLT_of_le_of_strongLT /-
theorem strongLT_of_le_of_strongLT (hab : a ≤ b) (hbc : b ≺ c) : a ≺ c := fun i =>
(hab _).trans_lt <| hbc _
#align strong_lt_of_le_of_strong_lt strongLT_of_le_of_strongLT
+-/
alias le_of_strongLT ← StrongLT.le
#align strong_lt.le StrongLT.le
@@ -1080,46 +1098,64 @@ section Function
variable [DecidableEq ι] [∀ i, Preorder (π i)] {x y : ∀ i, π i} {i : ι} {a b : π i}
/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (j «expr ≠ » i) -/
+#print le_update_iff /-
theorem le_update_iff : x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => x j ≤ z
#align le_update_iff le_update_iff
+-/
/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (j «expr ≠ » i) -/
+#print update_le_iff /-
theorem update_le_iff : Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => z ≤ y j
#align update_le_iff update_le_iff
+-/
/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (j «expr ≠ » i) -/
+#print update_le_update_iff /-
theorem update_le_update_iff :
Function.update x i a ≤ Function.update y i b ↔ a ≤ b ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j := by
simp (config := { contextual := true }) [update_le_iff]
#align update_le_update_iff update_le_update_iff
+-/
+#print update_le_update_iff' /-
@[simp]
theorem update_le_update_iff' : update x i a ≤ update x i b ↔ a ≤ b := by
simp [update_le_update_iff]
#align update_le_update_iff' update_le_update_iff'
+-/
+#print update_lt_update_iff /-
@[simp]
theorem update_lt_update_iff : update x i a < update x i b ↔ a < b :=
lt_iff_lt_of_le_iff_le' update_le_update_iff' update_le_update_iff'
#align update_lt_update_iff update_lt_update_iff
+-/
+#print le_update_self_iff /-
@[simp]
theorem le_update_self_iff : x ≤ update x i a ↔ x i ≤ a := by simp [le_update_iff]
#align le_update_self_iff le_update_self_iff
+-/
+#print update_le_self_iff /-
@[simp]
theorem update_le_self_iff : update x i a ≤ x ↔ a ≤ x i := by simp [update_le_iff]
#align update_le_self_iff update_le_self_iff
+-/
+#print lt_update_self_iff /-
@[simp]
theorem lt_update_self_iff : x < update x i a ↔ x i < a := by simp [lt_iff_le_not_le]
#align lt_update_self_iff lt_update_self_iff
+-/
+#print update_lt_self_iff /-
@[simp]
theorem update_lt_self_iff : update x i a < x ↔ a < x i := by simp [lt_iff_le_not_le]
#align update_lt_self_iff update_lt_self_iff
+-/
end Function
@@ -1169,34 +1205,46 @@ section MinMaxRec
variable [LinearOrder α] {p : α → Prop} {x y : α}
+#print min_rec /-
theorem min_rec (hx : x ≤ y → p x) (hy : y ≤ x → p y) : p (min x y) :=
(le_total x y).rec (fun h => (min_eq_left h).symm.subst (hx h)) fun h =>
(min_eq_right h).symm.subst (hy h)
#align min_rec min_rec
+-/
+#print max_rec /-
theorem max_rec (hx : y ≤ x → p x) (hy : x ≤ y → p y) : p (max x y) :=
@min_rec αᵒᵈ _ _ _ _ hx hy
#align max_rec max_rec
+-/
+#print min_rec' /-
theorem min_rec' (p : α → Prop) (hx : p x) (hy : p y) : p (min x y) :=
min_rec (fun _ => hx) fun _ => hy
#align min_rec' min_rec'
+-/
+#print max_rec' /-
theorem max_rec' (p : α → Prop) (hx : p x) (hy : p y) : p (max x y) :=
max_rec (fun _ => hx) fun _ => hy
#align max_rec' max_rec'
+-/
+#print min_def_lt /-
theorem min_def_lt (x y : α) : min x y = if x < y then x else y :=
by
rw [min_comm, min_def, ← ite_not]
simp only [not_le]
#align min_def_lt min_def_lt
+-/
+#print max_def_lt /-
theorem max_def_lt (x y : α) : max x y = if x < y then y else x :=
by
rw [max_comm, max_def, ← ite_not]
simp only [not_le]
#align max_def_lt max_def_lt
+-/
end MinMaxRec
@@ -1219,10 +1267,8 @@ class Inf (α : Type u) where
#align has_inf Inf
-/
--- mathport name: «expr ⊔ »
infixl:68 " ⊔ " => Sup.sup
--- mathport name: «expr ⊓ »
infixl:69 " ⊓ " => Inf.inf
/-! ### Lifts of order instances -/
@@ -1251,6 +1297,7 @@ def PartialOrder.lift {α β} [PartialOrder β] (f : α → β) (inj : Injective
#align partial_order.lift PartialOrder.lift
-/
+#print LinearOrder.lift /-
/-- Transfer a `linear_order` on `β` to a `linear_order` on `α` using an injective
function `f : α → β`. This version takes `[has_sup α]` and `[has_inf α]` as arguments, then uses
them for `max` and `min` fields. See `linear_order.lift'` for a version that autogenerates `min` and
@@ -1270,6 +1317,7 @@ def LinearOrder.lift {α β} [LinearOrder β] [Sup α] [Inf α] (f : α → β)
min_def := by ext (x y); apply inj; rw [hinf, min_def, minDefault, apply_ite f]; rfl
max_def := by ext (x y); apply inj; rw [hsup, max_def, maxDefault, apply_ite f]; rfl }
#align linear_order.lift LinearOrder.lift
+-/
#print LinearOrder.lift' /-
/-- Transfer a `linear_order` on `β` to a `linear_order` on `α` using an injective
@@ -1400,10 +1448,12 @@ instance (α : Type u) (β : Type v) [Preorder α] [Preorder β] : Preorder (α
le_trans := fun ⟨a, b⟩ ⟨c, d⟩ ⟨e, f⟩ ⟨hac, hbd⟩ ⟨hce, hdf⟩ =>
⟨le_trans hac hce, le_trans hbd hdf⟩ }
+#print Prod.swap_lt_swap /-
@[simp]
theorem swap_lt_swap : x.symm < y.symm ↔ x < y :=
and_congr swap_le_swap (not_congr swap_le_swap)
#align prod.swap_lt_swap Prod.swap_lt_swap
+-/
#print Prod.mk_le_mk_iff_left /-
theorem mk_le_mk_iff_left : (a₁, b) ≤ (a₂, b) ↔ a₁ ≤ a₂ :=
@@ -1417,14 +1467,19 @@ theorem mk_le_mk_iff_right : (a, b₁) ≤ (a, b₂) ↔ b₁ ≤ b₂ :=
#align prod.mk_le_mk_iff_right Prod.mk_le_mk_iff_right
-/
+#print Prod.mk_lt_mk_iff_left /-
theorem mk_lt_mk_iff_left : (a₁, b) < (a₂, b) ↔ a₁ < a₂ :=
lt_iff_lt_of_le_iff_le' mk_le_mk_iff_left mk_le_mk_iff_left
#align prod.mk_lt_mk_iff_left Prod.mk_lt_mk_iff_left
+-/
+#print Prod.mk_lt_mk_iff_right /-
theorem mk_lt_mk_iff_right : (a, b₁) < (a, b₂) ↔ b₁ < b₂ :=
lt_iff_lt_of_le_iff_le' mk_le_mk_iff_right mk_le_mk_iff_right
#align prod.mk_lt_mk_iff_right Prod.mk_lt_mk_iff_right
+-/
+#print Prod.lt_iff /-
theorem lt_iff : x < y ↔ x.1 < y.1 ∧ x.2 ≤ y.2 ∨ x.1 ≤ y.1 ∧ x.2 < y.2 :=
by
refine' ⟨fun h => _, _⟩
@@ -1435,11 +1490,14 @@ theorem lt_iff : x < y ↔ x.1 < y.1 ∧ x.2 ≤ y.2 ∨ x.1 ≤ y.1 ∧ x.2 < y
· exact ⟨⟨h₁.le, h₂⟩, fun h => h₁.not_le h.1⟩
· exact ⟨⟨h₁, h₂.le⟩, fun h => h₂.not_le h.2⟩
#align prod.lt_iff Prod.lt_iff
+-/
+#print Prod.mk_lt_mk /-
@[simp]
theorem mk_lt_mk : (a₁, b₁) < (a₂, b₂) ↔ a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂ :=
lt_iff
#align prod.mk_lt_mk Prod.mk_lt_mk
+-/
end Preorder
@@ -1574,13 +1632,17 @@ instance : LinearOrder PUnit := by
| simp only [eq_iff_true_of_subsingleton, not_true, and_false_iff]
| exact Or.inl trivial
+#print PUnit.max_eq /-
theorem max_eq : max a b = unit :=
rfl
#align punit.max_eq PUnit.max_eq
+-/
+#print PUnit.min_eq /-
theorem min_eq : min a b = unit :=
rfl
#align punit.min_eq PUnit.min_eq
+-/
#print PUnit.le /-
@[simp]
mathlib commit https://github.com/leanprover-community/mathlib/commit/31c24aa72e7b3e5ed97a8412470e904f82b81004
@@ -1079,17 +1079,17 @@ section Function
variable [DecidableEq ι] [∀ i, Preorder (π i)] {x y : ∀ i, π i} {i : ι} {a b : π i}
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (j «expr ≠ » i) -/
theorem le_update_iff : x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => x j ≤ z
#align le_update_iff le_update_iff
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (j «expr ≠ » i) -/
theorem update_le_iff : Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => z ≤ y j
#align update_le_iff update_le_iff
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (j «expr ≠ » i) -/
theorem update_le_update_iff :
Function.update x i a ≤ Function.update y i b ↔ a ≤ b ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j := by
simp (config := { contextual := true }) [update_le_iff]
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -952,7 +952,7 @@ class HasCompl (α : Type _) where
export HasCompl (compl)
-/- ./././Mathport/Syntax/Translate/Command.lean:476:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
+/- ./././Mathport/Syntax/Translate/Command.lean:477:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
-- mathport name: «expr ᶜ»
postfix:999 "ᶜ" => compl
@@ -1478,7 +1478,7 @@ instance OrderDual.denselyOrdered (α : Type u) [LT α] [DenselyOrdered α] : De
#print denselyOrdered_orderDual /-
@[simp]
theorem denselyOrdered_orderDual [LT α] : DenselyOrdered αᵒᵈ ↔ DenselyOrdered α :=
- ⟨by convert@OrderDual.denselyOrdered αᵒᵈ _; cases ‹LT α›; rfl, @OrderDual.denselyOrdered α _⟩
+ ⟨by convert @OrderDual.denselyOrdered αᵒᵈ _; cases ‹LT α›; rfl, @OrderDual.denselyOrdered α _⟩
#align densely_ordered_order_dual denselyOrdered_orderDual
-/
@@ -1495,12 +1495,12 @@ instance {α : ι → Type _} [∀ i, Preorder (α i)] [∀ i, DenselyOrdered (
DenselyOrdered (∀ i, α i) :=
⟨fun a b => by
classical
- simp_rw [Pi.lt_def]
- rintro ⟨hab, i, hi⟩
- obtain ⟨c, ha, hb⟩ := exists_between hi
- exact
- ⟨a.update i c, ⟨le_update_iff.2 ⟨ha.le, fun _ _ => le_rfl⟩, i, by rwa [update_same]⟩,
- update_le_iff.2 ⟨hb.le, fun _ _ => hab _⟩, i, by rwa [update_same]⟩⟩
+ simp_rw [Pi.lt_def]
+ rintro ⟨hab, i, hi⟩
+ obtain ⟨c, ha, hb⟩ := exists_between hi
+ exact
+ ⟨a.update i c, ⟨le_update_iff.2 ⟨ha.le, fun _ _ => le_rfl⟩, i, by rwa [update_same]⟩,
+ update_le_iff.2 ⟨hb.le, fun _ _ => hab _⟩, i, by rwa [update_same]⟩⟩
#print le_of_forall_le_of_dense /-
theorem le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
@@ -1548,7 +1548,7 @@ theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
theorem eq_or_eq_or_eq_of_forall_not_lt_lt {α : Type _} [LinearOrder α]
(h : ∀ ⦃x y z : α⦄, x < y → y < z → False) (x y z : α) : x = y ∨ y = z ∨ x = z :=
by
- by_contra hne; push_neg at hne
+ by_contra hne; push_neg at hne
cases' hne.1.lt_or_lt with h₁ h₁ <;> cases' hne.2.1.lt_or_lt with h₂ h₂ <;>
cases' hne.2.2.lt_or_lt with h₃ h₃
exacts [h h₁ h₂, h h₂ h₃, h h₃ h₂, h h₃ h₁, h h₁ h₃, h h₂ h₃, h h₁ h₃, h h₂ h₁]
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -786,7 +786,7 @@ theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.to
injection h with h_le
have : A_lt = B_lt := by
funext a b
- dsimp [(· ≤ ·)] at A_lt_iff_le_not_le B_lt_iff_le_not_le h_le
+ dsimp [(· ≤ ·)] at A_lt_iff_le_not_le B_lt_iff_le_not_le h_le
simp [A_lt_iff_le_not_le, B_lt_iff_le_not_le, h_le]
congr
#align preorder.to_has_le_injective Preorder.toLE_injective
@@ -1548,10 +1548,10 @@ theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
theorem eq_or_eq_or_eq_of_forall_not_lt_lt {α : Type _} [LinearOrder α]
(h : ∀ ⦃x y z : α⦄, x < y → y < z → False) (x y z : α) : x = y ∨ y = z ∨ x = z :=
by
- by_contra hne; push_neg at hne
+ by_contra hne; push_neg at hne
cases' hne.1.lt_or_lt with h₁ h₁ <;> cases' hne.2.1.lt_or_lt with h₂ h₂ <;>
cases' hne.2.2.lt_or_lt with h₃ h₃
- exacts[h h₁ h₂, h h₂ h₃, h h₃ h₂, h h₃ h₁, h h₁ h₃, h h₂ h₃, h h₁ h₃, h h₂ h₁]
+ exacts [h h₁ h₂, h h₂ h₃, h h₃ h₂, h h₃ h₁, h h₁ h₃, h h₂ h₃, h h₁ h₃, h h₂ h₁]
#align eq_or_eq_or_eq_of_forall_not_lt_lt eq_or_eq_or_eq_of_forall_not_lt_lt
-/
@@ -1570,7 +1570,9 @@ instance : LinearOrder PUnit := by
decidableLt := fun _ _ => decidableFalse } <;>
intros <;>
first
- |trivial|simp only [eq_iff_true_of_subsingleton, not_true, and_false_iff]|exact Or.inl trivial
+ | trivial
+ | simp only [eq_iff_true_of_subsingleton, not_true, and_false_iff]
+ | exact Or.inl trivial
theorem max_eq : max a b = unit :=
rfl
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -74,21 +74,29 @@ section Preorder
variable [Preorder α] {a b c : α}
+#print le_trans' /-
theorem le_trans' : b ≤ c → a ≤ b → a ≤ c :=
flip le_trans
#align le_trans' le_trans'
+-/
+#print lt_trans' /-
theorem lt_trans' : b < c → a < b → a < c :=
flip lt_trans
#align lt_trans' lt_trans'
+-/
+#print lt_of_le_of_lt' /-
theorem lt_of_le_of_lt' : b ≤ c → a < b → a < c :=
flip lt_of_lt_of_le
#align lt_of_le_of_lt' lt_of_le_of_lt'
+-/
+#print lt_of_lt_of_le' /-
theorem lt_of_lt_of_le' : b < c → a ≤ b → a < c :=
flip lt_of_le_of_lt
#align lt_of_lt_of_le' lt_of_lt_of_le'
+-/
end Preorder
@@ -96,20 +104,28 @@ section PartialOrder
variable [PartialOrder α] {a b : α}
+#print ge_antisymm /-
theorem ge_antisymm : a ≤ b → b ≤ a → b = a :=
flip le_antisymm
#align ge_antisymm ge_antisymm
+-/
+#print lt_of_le_of_ne' /-
theorem lt_of_le_of_ne' : a ≤ b → b ≠ a → a < b := fun h₁ h₂ => lt_of_le_of_ne h₁ h₂.symm
#align lt_of_le_of_ne' lt_of_le_of_ne'
+-/
+#print Ne.lt_of_le /-
theorem Ne.lt_of_le : a ≠ b → a ≤ b → a < b :=
flip lt_of_le_of_ne
#align ne.lt_of_le Ne.lt_of_le
+-/
+#print Ne.lt_of_le' /-
theorem Ne.lt_of_le' : b ≠ a → a ≤ b → a < b :=
flip lt_of_le_of_ne'
#align ne.lt_of_le' Ne.lt_of_le'
+-/
end PartialOrder
@@ -181,47 +197,67 @@ section
variable [Preorder α] {a b c : α}
+#print le_rfl /-
/-- A version of `le_refl` where the argument is implicit -/
theorem le_rfl : a ≤ a :=
le_refl a
#align le_rfl le_rfl
+-/
+#print lt_self_iff_false /-
@[simp]
theorem lt_self_iff_false (x : α) : x < x ↔ False :=
⟨lt_irrefl x, False.elim⟩
#align lt_self_iff_false lt_self_iff_false
+-/
+#print le_of_le_of_eq /-
theorem le_of_le_of_eq (hab : a ≤ b) (hbc : b = c) : a ≤ c :=
hab.trans hbc.le
#align le_of_le_of_eq le_of_le_of_eq
+-/
+#print le_of_eq_of_le /-
theorem le_of_eq_of_le (hab : a = b) (hbc : b ≤ c) : a ≤ c :=
hab.le.trans hbc
#align le_of_eq_of_le le_of_eq_of_le
+-/
+#print lt_of_lt_of_eq /-
theorem lt_of_lt_of_eq (hab : a < b) (hbc : b = c) : a < c :=
hab.trans_le hbc.le
#align lt_of_lt_of_eq lt_of_lt_of_eq
+-/
+#print lt_of_eq_of_lt /-
theorem lt_of_eq_of_lt (hab : a = b) (hbc : b < c) : a < c :=
hab.le.trans_lt hbc
#align lt_of_eq_of_lt lt_of_eq_of_lt
+-/
+#print le_of_le_of_eq' /-
theorem le_of_le_of_eq' : b ≤ c → a = b → a ≤ c :=
flip le_of_eq_of_le
#align le_of_le_of_eq' le_of_le_of_eq'
+-/
+#print le_of_eq_of_le' /-
theorem le_of_eq_of_le' : b = c → a ≤ b → a ≤ c :=
flip le_of_le_of_eq
#align le_of_eq_of_le' le_of_eq_of_le'
+-/
+#print lt_of_lt_of_eq' /-
theorem lt_of_lt_of_eq' : b < c → a = b → a < c :=
flip lt_of_eq_of_lt
#align lt_of_lt_of_eq' lt_of_lt_of_eq'
+-/
+#print lt_of_eq_of_lt' /-
theorem lt_of_eq_of_lt' : b = c → a < b → a < c :=
flip lt_of_lt_of_eq
#align lt_of_eq_of_lt' lt_of_eq_of_lt'
+-/
alias le_of_le_of_eq ← LE.le.trans_eq
#align has_le.le.trans_eq LE.le.trans_eq
@@ -253,18 +289,24 @@ namespace Eq
variable [Preorder α] {x y z : α}
+#print Eq.ge /-
/-- If `x = y` then `y ≤ x`. Note: this lemma uses `y ≤ x` instead of `x ≥ y`, because `le` is used
almost exclusively in mathlib. -/
protected theorem ge (h : x = y) : y ≤ x :=
h.symm.le
#align eq.ge Eq.ge
+-/
+#print Eq.not_lt /-
theorem not_lt (h : x = y) : ¬x < y := fun h' => h'.Ne h
#align eq.not_lt Eq.not_lt
+-/
+#print Eq.not_gt /-
theorem not_gt (h : x = y) : ¬y < x :=
h.symm.not_lt
#align eq.not_gt Eq.not_gt
+-/
end Eq
@@ -282,43 +324,61 @@ section PartialOrder
variable [PartialOrder α] {a b : α}
+#print LE.le.lt_iff_ne /-
theorem lt_iff_ne (h : a ≤ b) : a < b ↔ a ≠ b :=
⟨fun h => h.Ne, h.lt_of_ne⟩
#align has_le.le.lt_iff_ne LE.le.lt_iff_ne
+-/
+#print LE.le.gt_iff_ne /-
theorem gt_iff_ne (h : a ≤ b) : a < b ↔ b ≠ a :=
⟨fun h => h.Ne.symm, h.lt_of_ne'⟩
#align has_le.le.gt_iff_ne LE.le.gt_iff_ne
+-/
+#print LE.le.not_lt_iff_eq /-
theorem not_lt_iff_eq (h : a ≤ b) : ¬a < b ↔ a = b :=
h.lt_iff_ne.not_left
#align has_le.le.not_lt_iff_eq LE.le.not_lt_iff_eq
+-/
+#print LE.le.not_gt_iff_eq /-
theorem not_gt_iff_eq (h : a ≤ b) : ¬a < b ↔ b = a :=
h.gt_iff_ne.not_left
#align has_le.le.not_gt_iff_eq LE.le.not_gt_iff_eq
+-/
+#print LE.le.le_iff_eq /-
theorem le_iff_eq (h : a ≤ b) : b ≤ a ↔ b = a :=
⟨fun h' => h'.antisymm h, Eq.le⟩
#align has_le.le.le_iff_eq LE.le.le_iff_eq
+-/
+#print LE.le.ge_iff_eq /-
theorem ge_iff_eq (h : a ≤ b) : b ≤ a ↔ a = b :=
⟨h.antisymm, Eq.ge⟩
#align has_le.le.ge_iff_eq LE.le.ge_iff_eq
+-/
end PartialOrder
+#print LE.le.lt_or_le /-
theorem lt_or_le [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a < c ∨ c ≤ b :=
(lt_or_ge a c).imp id fun hc => le_trans hc h
#align has_le.le.lt_or_le LE.le.lt_or_le
+-/
+#print LE.le.le_or_lt /-
theorem le_or_lt [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a ≤ c ∨ c < b :=
(le_or_gt a c).imp id fun hc => lt_of_lt_of_le hc h
#align has_le.le.le_or_lt LE.le.le_or_lt
+-/
+#print LE.le.le_or_le /-
theorem le_or_le [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a ≤ c ∨ c ≤ b :=
(h.le_or_lt c).elim Or.inl fun h => Or.inr <| le_of_lt h
#align has_le.le.le_or_le LE.le.le_or_le
+-/
end LE.le
@@ -332,17 +392,23 @@ protected theorem gt [LT α] {x y : α} (h : x < y) : y > x :=
#align has_lt.lt.gt LT.lt.gt
-/
+#print LT.lt.false /-
protected theorem false [Preorder α] {x : α} : x < x → False :=
lt_irrefl x
#align has_lt.lt.false LT.lt.false
+-/
+#print LT.lt.ne' /-
theorem ne' [Preorder α] {x y : α} (h : x < y) : y ≠ x :=
h.Ne.symm
#align has_lt.lt.ne' LT.lt.ne'
+-/
+#print LT.lt.lt_or_lt /-
theorem lt_or_lt [LinearOrder α] {x y : α} (h : x < y) (z : α) : x < z ∨ z < y :=
(lt_or_ge z y).elim Or.inr fun hz => Or.inl <| h.trans_le hz
#align has_lt.lt.lt_or_lt LT.lt.lt_or_lt
+-/
end LT.lt
@@ -362,11 +428,13 @@ protected theorem GT.gt.lt [LT α] {x y : α} (h : x > y) : y < x :=
#align gt.lt GT.gt.lt
-/
+#print ge_of_eq /-
-- see Note [nolint_ge]
@[nolint ge_or_gt]
theorem ge_of_eq [Preorder α] {a b : α} (h : a = b) : a ≥ b :=
h.ge
#align ge_of_eq ge_of_eq
+-/
#print ge_iff_le /-
-- see Note [nolint_ge]
@@ -384,63 +452,87 @@ theorem gt_iff_lt [LT α] {a b : α} : a > b ↔ b < a :=
#align gt_iff_lt gt_iff_lt
-/
+#print not_le_of_lt /-
theorem not_le_of_lt [Preorder α] {a b : α} (h : a < b) : ¬b ≤ a :=
(le_not_le_of_lt h).right
#align not_le_of_lt not_le_of_lt
+-/
alias not_le_of_lt ← LT.lt.not_le
#align has_lt.lt.not_le LT.lt.not_le
+#print not_lt_of_le /-
theorem not_lt_of_le [Preorder α] {a b : α} (h : a ≤ b) : ¬b < a := fun hba => hba.not_le h
#align not_lt_of_le not_lt_of_le
+-/
alias not_lt_of_le ← LE.le.not_lt
#align has_le.le.not_lt LE.le.not_lt
+#print ne_of_not_le /-
theorem ne_of_not_le [Preorder α] {a b : α} (h : ¬a ≤ b) : a ≠ b := fun hab => h (le_of_eq hab)
#align ne_of_not_le ne_of_not_le
+-/
+#print Decidable.le_iff_eq_or_lt /-
-- See Note [decidable namespace]
protected theorem Decidable.le_iff_eq_or_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
a ≤ b ↔ a = b ∨ a < b :=
Decidable.le_iff_lt_or_eq.trans or_comm
#align decidable.le_iff_eq_or_lt Decidable.le_iff_eq_or_lt
+-/
+#print le_iff_eq_or_lt /-
theorem le_iff_eq_or_lt [PartialOrder α] {a b : α} : a ≤ b ↔ a = b ∨ a < b :=
le_iff_lt_or_eq.trans or_comm
#align le_iff_eq_or_lt le_iff_eq_or_lt
+-/
+#print lt_iff_le_and_ne /-
theorem lt_iff_le_and_ne [PartialOrder α] {a b : α} : a < b ↔ a ≤ b ∧ a ≠ b :=
⟨fun h => ⟨le_of_lt h, ne_of_lt h⟩, fun ⟨h1, h2⟩ => h1.lt_of_ne h2⟩
#align lt_iff_le_and_ne lt_iff_le_and_ne
+-/
+#print eq_iff_not_lt_of_le /-
theorem eq_iff_not_lt_of_le {α} [PartialOrder α] {x y : α} : x ≤ y → y = x ↔ ¬x < y := by
rw [lt_iff_le_and_ne, not_and, Classical.not_not, eq_comm]
#align eq_iff_not_lt_of_le eq_iff_not_lt_of_le
+-/
+#print Decidable.eq_iff_le_not_lt /-
-- See Note [decidable namespace]
protected theorem Decidable.eq_iff_le_not_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
a = b ↔ a ≤ b ∧ ¬a < b :=
⟨fun h => ⟨h.le, h ▸ lt_irrefl _⟩, fun ⟨h₁, h₂⟩ =>
h₁.antisymm <| Decidable.by_contradiction fun h₃ => h₂ (h₁.lt_of_not_le h₃)⟩
#align decidable.eq_iff_le_not_lt Decidable.eq_iff_le_not_lt
+-/
+#print eq_iff_le_not_lt /-
theorem eq_iff_le_not_lt [PartialOrder α] {a b : α} : a = b ↔ a ≤ b ∧ ¬a < b :=
haveI := Classical.dec
Decidable.eq_iff_le_not_lt
#align eq_iff_le_not_lt eq_iff_le_not_lt
+-/
+#print eq_or_lt_of_le /-
theorem eq_or_lt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : a = b ∨ a < b :=
h.lt_or_eq.symm
#align eq_or_lt_of_le eq_or_lt_of_le
+-/
+#print eq_or_gt_of_le /-
theorem eq_or_gt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : b = a ∨ a < b :=
h.lt_or_eq.symm.imp Eq.symm id
#align eq_or_gt_of_le eq_or_gt_of_le
+-/
+#print gt_or_eq_of_le /-
theorem gt_or_eq_of_le [PartialOrder α] {a b : α} (hab : a ≤ b) : a < b ∨ b = a :=
(eq_or_gt_of_le hab).symm
#align gt_or_eq_of_le gt_or_eq_of_le
+-/
alias Decidable.eq_or_lt_of_le ← LE.le.eq_or_lt_dec
#align has_le.le.eq_or_lt_dec LE.le.eq_or_lt_dec
@@ -456,13 +548,17 @@ alias gt_or_eq_of_le ← LE.le.gt_or_eq
attribute [nolint decidable_classical] LE.le.eq_or_lt_dec
+#print eq_of_le_of_not_lt /-
theorem eq_of_le_of_not_lt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba : ¬a < b) : a = b :=
hab.eq_or_lt.resolve_right hba
#align eq_of_le_of_not_lt eq_of_le_of_not_lt
+-/
+#print eq_of_ge_of_not_gt /-
theorem eq_of_ge_of_not_gt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba : ¬a < b) : b = a :=
(hab.eq_or_lt.resolve_right hba).symm
#align eq_of_ge_of_not_gt eq_of_ge_of_not_gt
+-/
alias eq_of_le_of_not_lt ← LE.le.eq_of_not_lt
#align has_le.le.eq_of_not_lt LE.le.eq_of_not_lt
@@ -470,25 +566,33 @@ alias eq_of_le_of_not_lt ← LE.le.eq_of_not_lt
alias eq_of_ge_of_not_gt ← LE.le.eq_of_not_gt
#align has_le.le.eq_of_not_gt LE.le.eq_of_not_gt
+#print Ne.le_iff_lt /-
theorem Ne.le_iff_lt [PartialOrder α] {a b : α} (h : a ≠ b) : a ≤ b ↔ a < b :=
⟨fun h' => lt_of_le_of_ne h' h, fun h => h.le⟩
#align ne.le_iff_lt Ne.le_iff_lt
+-/
+#print Ne.not_le_or_not_le /-
theorem Ne.not_le_or_not_le [PartialOrder α] {a b : α} (h : a ≠ b) : ¬a ≤ b ∨ ¬b ≤ a :=
not_and_or.1 <| le_antisymm_iff.Not.1 h
#align ne.not_le_or_not_le Ne.not_le_or_not_le
+-/
+#print Decidable.ne_iff_lt_iff_le /-
-- See Note [decidable namespace]
protected theorem Decidable.ne_iff_lt_iff_le [PartialOrder α] [DecidableEq α] {a b : α} :
(a ≠ b ↔ a < b) ↔ a ≤ b :=
⟨fun h => Decidable.byCases le_of_eq (le_of_lt ∘ h.mp), fun h => ⟨lt_of_le_of_ne h, ne_of_lt⟩⟩
#align decidable.ne_iff_lt_iff_le Decidable.ne_iff_lt_iff_le
+-/
+#print ne_iff_lt_iff_le /-
@[simp]
theorem ne_iff_lt_iff_le [PartialOrder α] {a b : α} : (a ≠ b ↔ a < b) ↔ a ≤ b :=
haveI := Classical.dec
Decidable.ne_iff_lt_iff_le
#align ne_iff_lt_iff_le ne_iff_lt_iff_le
+-/
-- Variant of `min_def` with the branches reversed.
theorem min_def' [LinearOrder α] (a b : α) : min a b = if b ≤ a then b else a :=
@@ -511,33 +615,45 @@ theorem max_def' [LinearOrder α] (a b : α) : max a b = if b ≤ a then a else
· rw [if_neg (not_le.mpr GT.gt), if_pos gt.le]
#align max_def' max_def'
+#print lt_of_not_le /-
theorem lt_of_not_le [LinearOrder α] {a b : α} (h : ¬b ≤ a) : a < b :=
((le_total _ _).resolve_right h).lt_of_not_le h
#align lt_of_not_le lt_of_not_le
+-/
+#print lt_iff_not_le /-
theorem lt_iff_not_le [LinearOrder α] {x y : α} : x < y ↔ ¬y ≤ x :=
⟨not_le_of_lt, lt_of_not_le⟩
#align lt_iff_not_le lt_iff_not_le
+-/
+#print Ne.lt_or_lt /-
theorem Ne.lt_or_lt [LinearOrder α] {x y : α} (h : x ≠ y) : x < y ∨ y < x :=
lt_or_gt_of_ne h
#align ne.lt_or_lt Ne.lt_or_lt
+-/
+#print lt_or_lt_iff_ne /-
/-- A version of `ne_iff_lt_or_gt` with LHS and RHS reversed. -/
@[simp]
theorem lt_or_lt_iff_ne [LinearOrder α] {x y : α} : x < y ∨ y < x ↔ x ≠ y :=
ne_iff_lt_or_gt.symm
#align lt_or_lt_iff_ne lt_or_lt_iff_ne
+-/
+#print not_lt_iff_eq_or_lt /-
theorem not_lt_iff_eq_or_lt [LinearOrder α] {a b : α} : ¬a < b ↔ a = b ∨ b < a :=
not_lt.trans <| Decidable.le_iff_eq_or_lt.trans <| or_congr eq_comm Iff.rfl
#align not_lt_iff_eq_or_lt not_lt_iff_eq_or_lt
+-/
+#print exists_ge_of_linear /-
theorem exists_ge_of_linear [LinearOrder α] (a b : α) : ∃ c, a ≤ c ∧ b ≤ c :=
match le_total a b with
| Or.inl h => ⟨_, h, le_rfl⟩
| Or.inr h => ⟨_, le_rfl, h⟩
#align exists_ge_of_linear exists_ge_of_linear
+-/
theorem lt_imp_lt_of_le_imp_le {β} [LinearOrder α] [Preorder β] {a b : α} {c d : β}
(H : a ≤ b → c ≤ d) (h : d < c) : b < a :=
@@ -564,79 +680,108 @@ theorem le_iff_le_iff_lt_iff_lt {β} [LinearOrder α] [LinearOrder β] {a b : α
⟨lt_iff_lt_of_le_iff_le, fun H => not_lt.symm.trans <| (not_congr H).trans <| not_lt⟩
#align le_iff_le_iff_lt_iff_lt le_iff_le_iff_lt_iff_lt
+#print eq_of_forall_le_iff /-
theorem eq_of_forall_le_iff [PartialOrder α] {a b : α} (H : ∀ c, c ≤ a ↔ c ≤ b) : a = b :=
((H _).1 le_rfl).antisymm ((H _).2 le_rfl)
#align eq_of_forall_le_iff eq_of_forall_le_iff
+-/
+#print le_of_forall_le /-
theorem le_of_forall_le [Preorder α] {a b : α} (H : ∀ c, c ≤ a → c ≤ b) : a ≤ b :=
H _ le_rfl
#align le_of_forall_le le_of_forall_le
+-/
+#print le_of_forall_le' /-
theorem le_of_forall_le' [Preorder α] {a b : α} (H : ∀ c, a ≤ c → b ≤ c) : b ≤ a :=
H _ le_rfl
#align le_of_forall_le' le_of_forall_le'
+-/
+#print le_of_forall_lt /-
theorem le_of_forall_lt [LinearOrder α] {a b : α} (H : ∀ c, c < a → c < b) : a ≤ b :=
le_of_not_lt fun h => lt_irrefl _ (H _ h)
#align le_of_forall_lt le_of_forall_lt
+-/
+#print forall_lt_iff_le /-
theorem forall_lt_iff_le [LinearOrder α] {a b : α} : (∀ ⦃c⦄, c < a → c < b) ↔ a ≤ b :=
⟨le_of_forall_lt, fun h c hca => lt_of_lt_of_le hca h⟩
#align forall_lt_iff_le forall_lt_iff_le
+-/
+#print le_of_forall_lt' /-
theorem le_of_forall_lt' [LinearOrder α] {a b : α} (H : ∀ c, a < c → b < c) : b ≤ a :=
le_of_not_lt fun h => lt_irrefl _ (H _ h)
#align le_of_forall_lt' le_of_forall_lt'
+-/
+#print forall_lt_iff_le' /-
theorem forall_lt_iff_le' [LinearOrder α] {a b : α} : (∀ ⦃c⦄, a < c → b < c) ↔ b ≤ a :=
⟨le_of_forall_lt', fun h c hac => lt_of_le_of_lt h hac⟩
#align forall_lt_iff_le' forall_lt_iff_le'
+-/
+#print eq_of_forall_ge_iff /-
theorem eq_of_forall_ge_iff [PartialOrder α] {a b : α} (H : ∀ c, a ≤ c ↔ b ≤ c) : a = b :=
((H _).2 le_rfl).antisymm ((H _).1 le_rfl)
#align eq_of_forall_ge_iff eq_of_forall_ge_iff
+-/
+#print eq_of_forall_lt_iff /-
theorem eq_of_forall_lt_iff [LinearOrder α] {a b : α} (h : ∀ c, c < a ↔ c < b) : a = b :=
(le_of_forall_lt fun _ => (h _).1).antisymm <| le_of_forall_lt fun _ => (h _).2
#align eq_of_forall_lt_iff eq_of_forall_lt_iff
+-/
+#print eq_of_forall_gt_iff /-
theorem eq_of_forall_gt_iff [LinearOrder α] {a b : α} (h : ∀ c, a < c ↔ b < c) : a = b :=
(le_of_forall_lt' fun _ => (h _).2).antisymm <| le_of_forall_lt' fun _ => (h _).1
#align eq_of_forall_gt_iff eq_of_forall_gt_iff
+-/
+#print rel_imp_eq_of_rel_imp_le /-
/-- A symmetric relation implies two values are equal, when it implies they're less-equal. -/
theorem rel_imp_eq_of_rel_imp_le [PartialOrder β] (r : α → α → Prop) [IsSymm α r] {f : α → β}
(h : ∀ a b, r a b → f a ≤ f b) {a b : α} : r a b → f a = f b := fun hab =>
le_antisymm (h a b hab) (h b a <| symm hab)
#align rel_imp_eq_of_rel_imp_le rel_imp_eq_of_rel_imp_le
+-/
+#print le_implies_le_of_le_of_le /-
/-- monotonicity of `≤` with respect to `→` -/
theorem le_implies_le_of_le_of_le {a b c d : α} [Preorder α] (hca : c ≤ a) (hbd : b ≤ d) :
a ≤ b → c ≤ d := fun hab => (hca.trans hab).trans hbd
#align le_implies_le_of_le_of_le le_implies_le_of_le_of_le
+-/
section PartialOrder
variable [PartialOrder α]
+#print commutative_of_le /-
/-- To prove commutativity of a binary operation `○`, we only to check `a ○ b ≤ b ○ a` for all `a`,
`b`. -/
theorem commutative_of_le {f : β → β → α} (comm : ∀ a b, f a b ≤ f b a) : ∀ a b, f a b = f b a :=
fun a b => (comm _ _).antisymm <| comm _ _
#align commutative_of_le commutative_of_le
+-/
+#print associative_of_commutative_of_le /-
/-- To prove associativity of a commutative binary operation `○`, we only to check
`(a ○ b) ○ c ≤ a ○ (b ○ c)` for all `a`, `b`, `c`. -/
theorem associative_of_commutative_of_le {f : α → α → α} (comm : Commutative f)
(assoc : ∀ a b c, f (f a b) c ≤ f a (f b c)) : Associative f := fun a b c =>
le_antisymm (assoc _ _ _) <| by rw [comm, comm b, comm _ c, comm a]; exact assoc _ _ _
#align associative_of_commutative_of_le associative_of_commutative_of_le
+-/
end PartialOrder
+#print Preorder.toLE_injective /-
@[ext]
-theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.toHasLe α) :=
- fun A B h => by
+theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.toLE α) := fun A B h =>
+ by
cases A; cases B
injection h with h_le
have : A_lt = B_lt := by
@@ -645,6 +790,7 @@ theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.to
simp [A_lt_iff_le_not_le, B_lt_iff_le_not_le, h_le]
congr
#align preorder.to_has_le_injective Preorder.toLE_injective
+-/
#print PartialOrder.toPreorder_injective /-
@[ext]
@@ -669,6 +815,7 @@ theorem LinearOrder.toPartialOrder_injective {α : Type _} :
#align linear_order.to_partial_order_injective LinearOrder.toPartialOrder_injective
-/
+#print Preorder.ext /-
theorem Preorder.ext {α} {A B : Preorder α}
(H :
∀ x y : α,
@@ -677,7 +824,9 @@ theorem Preorder.ext {α} {A B : Preorder α}
x ≤ y) :
A = B := by ext (x y); exact H x y
#align preorder.ext Preorder.ext
+-/
+#print PartialOrder.ext /-
theorem PartialOrder.ext {α} {A B : PartialOrder α}
(H :
∀ x y : α,
@@ -686,7 +835,9 @@ theorem PartialOrder.ext {α} {A B : PartialOrder α}
x ≤ y) :
A = B := by ext (x y); exact H x y
#align partial_order.ext PartialOrder.ext
+-/
+#print LinearOrder.ext /-
theorem LinearOrder.ext {α} {A B : LinearOrder α}
(H :
∀ x y : α,
@@ -695,6 +846,7 @@ theorem LinearOrder.ext {α} {A B : LinearOrder α}
x ≤ y) :
A = B := by ext (x y); exact H x y
#align linear_order.ext LinearOrder.ext
+-/
#print Order.Preimage /-
/-- Given a relation `R` on `β` and a function `f : α → β`, the preimage relation on `α` is defined
@@ -867,10 +1019,12 @@ instance Pi.preorder {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)]
#align pi.preorder Pi.preorder
-/
+#print Pi.lt_def /-
theorem Pi.lt_def {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] {x y : ∀ i, α i} :
x < y ↔ x ≤ y ∧ ∃ i, x i < y i := by
simp (config := { contextual := true }) [lt_iff_le_not_le, Pi.le_def]
#align pi.lt_def Pi.lt_def
+-/
#print Pi.partialOrder /-
instance Pi.partialOrder [∀ i, PartialOrder (π i)] : PartialOrder (∀ i, π i) :=
@@ -994,13 +1148,17 @@ namespace Function
variable [Preorder α] [Nonempty β] {a b : α}
+#print Function.const_le_const /-
@[simp]
theorem const_le_const : const β a ≤ const β b ↔ a ≤ b := by simp [Pi.le_def]
#align function.const_le_const Function.const_le_const
+-/
+#print Function.const_lt_const /-
@[simp]
theorem const_lt_const : const β a < const β b ↔ a < b := by simpa [Pi.lt_def] using le_of_lt
#align function.const_lt_const Function.const_lt_const
+-/
end Function
@@ -1177,13 +1335,17 @@ instance partialOrder [PartialOrder α] (p : α → Prop) : PartialOrder (Subtyp
#align subtype.partial_order Subtype.partialOrder
-/
+#print Subtype.decidableLE /-
instance decidableLE [Preorder α] [h : @DecidableRel α (· ≤ ·)] {p : α → Prop} :
@DecidableRel (Subtype p) (· ≤ ·) := fun a b => h a b
#align subtype.decidable_le Subtype.decidableLE
+-/
+#print Subtype.decidableLT /-
instance decidableLT [Preorder α] [h : @DecidableRel α (· < ·)] {p : α → Prop} :
@DecidableRel (Subtype p) (· < ·) := fun a b => h a b
#align subtype.decidable_lt Subtype.decidableLT
+-/
/-- A subtype of a linear order is a linear order. We explicitly give the proofs of decidable
equality and decidable order in order to ensure the decidability instances are all definitionally
@@ -1243,13 +1405,17 @@ theorem swap_lt_swap : x.symm < y.symm ↔ x < y :=
and_congr swap_le_swap (not_congr swap_le_swap)
#align prod.swap_lt_swap Prod.swap_lt_swap
+#print Prod.mk_le_mk_iff_left /-
theorem mk_le_mk_iff_left : (a₁, b) ≤ (a₂, b) ↔ a₁ ≤ a₂ :=
and_iff_left le_rfl
#align prod.mk_le_mk_iff_left Prod.mk_le_mk_iff_left
+-/
+#print Prod.mk_le_mk_iff_right /-
theorem mk_le_mk_iff_right : (a, b₁) ≤ (a, b₂) ↔ b₁ ≤ b₂ :=
and_iff_right le_rfl
#align prod.mk_le_mk_iff_right Prod.mk_le_mk_iff_right
+-/
theorem mk_lt_mk_iff_left : (a₁, b) < (a₂, b) ↔ a₁ < a₂ :=
lt_iff_lt_of_le_iff_le' mk_le_mk_iff_left mk_le_mk_iff_left
@@ -1336,37 +1502,48 @@ instance {α : ι → Type _} [∀ i, Preorder (α i)] [∀ i, DenselyOrdered (
⟨a.update i c, ⟨le_update_iff.2 ⟨ha.le, fun _ _ => le_rfl⟩, i, by rwa [update_same]⟩,
update_le_iff.2 ⟨hb.le, fun _ _ => hab _⟩, i, by rwa [update_same]⟩⟩
+#print le_of_forall_le_of_dense /-
theorem le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
(h : ∀ a, a₂ < a → a₁ ≤ a) : a₁ ≤ a₂ :=
le_of_not_gt fun ha =>
let ⟨a, ha₁, ha₂⟩ := exists_between ha
lt_irrefl a <| lt_of_lt_of_le ‹a < a₁› (h _ ‹a₂ < a›)
#align le_of_forall_le_of_dense le_of_forall_le_of_dense
+-/
+#print eq_of_le_of_forall_le_of_dense /-
theorem eq_of_le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α} (h₁ : a₂ ≤ a₁)
(h₂ : ∀ a, a₂ < a → a₁ ≤ a) : a₁ = a₂ :=
le_antisymm (le_of_forall_le_of_dense h₂) h₁
#align eq_of_le_of_forall_le_of_dense eq_of_le_of_forall_le_of_dense
+-/
+#print le_of_forall_ge_of_dense /-
theorem le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
(h : ∀ a₃ < a₁, a₃ ≤ a₂) : a₁ ≤ a₂ :=
le_of_not_gt fun ha =>
let ⟨a, ha₁, ha₂⟩ := exists_between ha
lt_irrefl a <| lt_of_le_of_lt (h _ ‹a < a₁›) ‹a₂ < a›
#align le_of_forall_ge_of_dense le_of_forall_ge_of_dense
+-/
+#print eq_of_le_of_forall_ge_of_dense /-
theorem eq_of_le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α} (h₁ : a₂ ≤ a₁)
(h₂ : ∀ a₃ < a₁, a₃ ≤ a₂) : a₁ = a₂ :=
(le_of_forall_ge_of_dense h₂).antisymm h₁
#align eq_of_le_of_forall_ge_of_dense eq_of_le_of_forall_ge_of_dense
+-/
+#print dense_or_discrete /-
theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
(∃ a, a₁ < a ∧ a < a₂) ∨ (∀ a, a₁ < a → a₂ ≤ a) ∧ ∀ a < a₂, a ≤ a₁ :=
or_iff_not_imp_left.2 fun h =>
⟨fun a ha₁ => le_of_not_gt fun ha₂ => h ⟨a, ha₁, ha₂⟩, fun a ha₂ =>
le_of_not_gt fun ha₁ => h ⟨a, ha₁, ha₂⟩⟩
#align dense_or_discrete dense_or_discrete
+-/
+#print eq_or_eq_or_eq_of_forall_not_lt_lt /-
/-- If a linear order has no elements `x < y < z`, then it has at most two elements. -/
theorem eq_or_eq_or_eq_of_forall_not_lt_lt {α : Type _} [LinearOrder α]
(h : ∀ ⦃x y z : α⦄, x < y → y < z → False) (x y z : α) : x = y ∨ y = z ∨ x = z :=
@@ -1376,6 +1553,7 @@ theorem eq_or_eq_or_eq_of_forall_not_lt_lt {α : Type _} [LinearOrder α]
cases' hne.2.2.lt_or_lt with h₃ h₃
exacts[h h₁ h₂, h h₂ h₃, h h₃ h₂, h h₃ h₁, h h₁ h₃, h h₂ h₃, h h₁ h₃, h h₂ h₁]
#align eq_or_eq_or_eq_of_forall_not_lt_lt eq_or_eq_or_eq_of_forall_not_lt_lt
+-/
namespace PUnit
@@ -1402,15 +1580,19 @@ theorem min_eq : min a b = unit :=
rfl
#align punit.min_eq PUnit.min_eq
+#print PUnit.le /-
@[simp]
protected theorem le : a ≤ b :=
trivial
#align punit.le PUnit.le
+-/
+#print PUnit.not_lt /-
@[simp]
theorem not_lt : ¬a < b :=
not_false
#align punit.not_lt PUnit.not_lt
+-/
instance : DenselyOrdered PUnit :=
⟨fun _ _ => False.elim⟩
@@ -1468,10 +1650,12 @@ def AsLinearOrder (α : Type u) :=
instance {α} [Inhabited α] : Inhabited (AsLinearOrder α) :=
⟨(default : α)⟩
+#print AsLinearOrder.linearOrder /-
noncomputable instance AsLinearOrder.linearOrder {α} [PartialOrder α] [IsTotal α (· ≤ ·)] :
LinearOrder (AsLinearOrder α) :=
{ (_ : PartialOrder α) with
le_total := @total_of α (· ≤ ·) _
decidableLe := Classical.decRel _ }
#align as_linear_order.linear_order AsLinearOrder.linearOrder
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -74,42 +74,18 @@ section Preorder
variable [Preorder α] {a b c : α}
-/- warning: le_trans' -> le_trans' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align le_trans' le_trans'ₓ'. -/
theorem le_trans' : b ≤ c → a ≤ b → a ≤ c :=
flip le_trans
#align le_trans' le_trans'
-/- warning: lt_trans' -> lt_trans' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align lt_trans' lt_trans'ₓ'. -/
theorem lt_trans' : b < c → a < b → a < c :=
flip lt_trans
#align lt_trans' lt_trans'
-/- warning: lt_of_le_of_lt' -> lt_of_le_of_lt' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align lt_of_le_of_lt' lt_of_le_of_lt'ₓ'. -/
theorem lt_of_le_of_lt' : b ≤ c → a < b → a < c :=
flip lt_of_lt_of_le
#align lt_of_le_of_lt' lt_of_le_of_lt'
-/- warning: lt_of_lt_of_le' -> lt_of_lt_of_le' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align lt_of_lt_of_le' lt_of_lt_of_le'ₓ'. -/
theorem lt_of_lt_of_le' : b < c → a ≤ b → a < c :=
flip lt_of_le_of_lt
#align lt_of_lt_of_le' lt_of_lt_of_le'
@@ -120,41 +96,17 @@ section PartialOrder
variable [PartialOrder α] {a b : α}
-/- warning: ge_antisymm -> ge_antisymm is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α b a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α b a)
-Case conversion may be inaccurate. Consider using '#align ge_antisymm ge_antisymmₓ'. -/
theorem ge_antisymm : a ≤ b → b ≤ a → b = a :=
flip le_antisymm
#align ge_antisymm ge_antisymm
-/- warning: lt_of_le_of_ne' -> lt_of_le_of_ne' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α b a) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α b a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-Case conversion may be inaccurate. Consider using '#align lt_of_le_of_ne' lt_of_le_of_ne'ₓ'. -/
theorem lt_of_le_of_ne' : a ≤ b → b ≠ a → a < b := fun h₁ h₂ => lt_of_le_of_ne h₁ h₂.symm
#align lt_of_le_of_ne' lt_of_le_of_ne'
-/- warning: ne.lt_of_le -> Ne.lt_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-Case conversion may be inaccurate. Consider using '#align ne.lt_of_le Ne.lt_of_leₓ'. -/
theorem Ne.lt_of_le : a ≠ b → a ≤ b → a < b :=
flip lt_of_le_of_ne
#align ne.lt_of_le Ne.lt_of_le
-/- warning: ne.lt_of_le' -> Ne.lt_of_le' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α b a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α b a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-Case conversion may be inaccurate. Consider using '#align ne.lt_of_le' Ne.lt_of_le'ₓ'. -/
theorem Ne.lt_of_le' : b ≠ a → a ≤ b → a < b :=
flip lt_of_le_of_ne'
#align ne.lt_of_le' Ne.lt_of_le'
@@ -165,181 +117,61 @@ attribute [simp] le_refl
attribute [ext] LE
-/- warning: has_le.le.trans -> LE.le.trans is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_le.le.trans LE.le.transₓ'. -/
alias le_trans ← LE.le.trans
#align has_le.le.trans LE.le.trans
-/- warning: has_le.le.trans' -> LE.le.trans' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_le.le.trans' LE.le.trans'ₓ'. -/
alias le_trans' ← LE.le.trans'
#align has_le.le.trans' LE.le.trans'
-/- warning: has_le.le.trans_lt -> LE.le.trans_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_le.le.trans_lt LE.le.trans_ltₓ'. -/
alias lt_of_le_of_lt ← LE.le.trans_lt
#align has_le.le.trans_lt LE.le.trans_lt
-/- warning: has_le.le.trans_lt' -> LE.le.trans_lt' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_le.le.trans_lt' LE.le.trans_lt'ₓ'. -/
alias lt_of_le_of_lt' ← LE.le.trans_lt'
#align has_le.le.trans_lt' LE.le.trans_lt'
-/- warning: has_le.le.antisymm -> LE.le.antisymm is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α a b)
-Case conversion may be inaccurate. Consider using '#align has_le.le.antisymm LE.le.antisymmₓ'. -/
alias le_antisymm ← LE.le.antisymm
#align has_le.le.antisymm LE.le.antisymm
-/- warning: has_le.le.antisymm' -> LE.le.antisymm' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α b a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α b a)
-Case conversion may be inaccurate. Consider using '#align has_le.le.antisymm' LE.le.antisymm'ₓ'. -/
alias ge_antisymm ← LE.le.antisymm'
#align has_le.le.antisymm' LE.le.antisymm'
-/- warning: has_le.le.lt_of_ne -> LE.le.lt_of_ne is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-Case conversion may be inaccurate. Consider using '#align has_le.le.lt_of_ne LE.le.lt_of_neₓ'. -/
alias lt_of_le_of_ne ← LE.le.lt_of_ne
#align has_le.le.lt_of_ne LE.le.lt_of_ne
-/- warning: has_le.le.lt_of_ne' -> LE.le.lt_of_ne' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α b a) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α b a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-Case conversion may be inaccurate. Consider using '#align has_le.le.lt_of_ne' LE.le.lt_of_ne'ₓ'. -/
alias lt_of_le_of_ne' ← LE.le.lt_of_ne'
#align has_le.le.lt_of_ne' LE.le.lt_of_ne'
-/- warning: has_le.le.lt_of_not_le -> LE.le.lt_of_not_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b a)) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b a)) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align has_le.le.lt_of_not_le LE.le.lt_of_not_leₓ'. -/
alias lt_of_le_not_le ← LE.le.lt_of_not_le
#align has_le.le.lt_of_not_le LE.le.lt_of_not_le
-/- warning: has_le.le.lt_or_eq -> LE.le.lt_or_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α a b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.lt_or_eq LE.le.lt_or_eqₓ'. -/
alias lt_or_eq_of_le ← LE.le.lt_or_eq
#align has_le.le.lt_or_eq LE.le.lt_or_eq
-/- warning: has_le.le.lt_or_eq_dec -> LE.le.lt_or_eq_dec is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Init.Algebra.Order._hyg.2046 : α) (x._@.Mathlib.Init.Algebra.Order._hyg.2048 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Init.Algebra.Order._hyg.2046 x._@.Mathlib.Init.Algebra.Order._hyg.2048)] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α a b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.lt_or_eq_dec LE.le.lt_or_eq_decₓ'. -/
alias Decidable.lt_or_eq_of_le ← LE.le.lt_or_eq_dec
#align has_le.le.lt_or_eq_dec LE.le.lt_or_eq_dec
-/- warning: has_lt.lt.le -> LT.lt.le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.le LT.lt.leₓ'. -/
alias le_of_lt ← LT.lt.le
#align has_lt.lt.le LT.lt.le
-/- warning: has_lt.lt.trans -> LT.lt.trans is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans LT.lt.transₓ'. -/
alias lt_trans ← LT.lt.trans
#align has_lt.lt.trans LT.lt.trans
-/- warning: has_lt.lt.trans' -> LT.lt.trans' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans' LT.lt.trans'ₓ'. -/
alias lt_trans' ← LT.lt.trans'
#align has_lt.lt.trans' LT.lt.trans'
-/- warning: has_lt.lt.trans_le -> LT.lt.trans_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans_le LT.lt.trans_leₓ'. -/
alias lt_of_lt_of_le ← LT.lt.trans_le
#align has_lt.lt.trans_le LT.lt.trans_le
-/- warning: has_lt.lt.trans_le' -> LT.lt.trans_le' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans_le' LT.lt.trans_le'ₓ'. -/
alias lt_of_lt_of_le' ← LT.lt.trans_le'
#align has_lt.lt.trans_le' LT.lt.trans_le'
-/- warning: has_lt.lt.ne -> LT.lt.ne is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Ne.{succ u1} α a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Ne.{succ u1} α a b)
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.ne LT.lt.neₓ'. -/
alias ne_of_lt ← LT.lt.ne
#align has_lt.lt.ne LT.lt.ne
-/- warning: has_lt.lt.asymm -> LT.lt.asymm is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a))
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.asymm LT.lt.asymmₓ'. -/
-/- warning: has_lt.lt.not_lt -> LT.lt.not_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a))
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.not_lt LT.lt.not_ltₓ'. -/
alias lt_asymm ← LT.lt.asymm LT.lt.not_lt
#align has_lt.lt.asymm LT.lt.asymm
#align has_lt.lt.not_lt LT.lt.not_lt
-/- warning: eq.le -> Eq.le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align eq.le Eq.leₓ'. -/
alias le_of_eq ← Eq.le
#align eq.le Eq.le
@@ -349,177 +181,69 @@ section
variable [Preorder α] {a b c : α}
-/- warning: le_rfl -> le_rfl is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α}, LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a a
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α}, LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a a
-Case conversion may be inaccurate. Consider using '#align le_rfl le_rflₓ'. -/
/-- A version of `le_refl` where the argument is implicit -/
theorem le_rfl : a ≤ a :=
le_refl a
#align le_rfl le_rfl
-/- warning: lt_self_iff_false -> lt_self_iff_false is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (x : α), Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) x x) False
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (x : α), Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x x) False
-Case conversion may be inaccurate. Consider using '#align lt_self_iff_false lt_self_iff_falseₓ'. -/
@[simp]
theorem lt_self_iff_false (x : α) : x < x ↔ False :=
⟨lt_irrefl x, False.elim⟩
#align lt_self_iff_false lt_self_iff_false
-/- warning: le_of_le_of_eq -> le_of_le_of_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align le_of_le_of_eq le_of_le_of_eqₓ'. -/
theorem le_of_le_of_eq (hab : a ≤ b) (hbc : b = c) : a ≤ c :=
hab.trans hbc.le
#align le_of_le_of_eq le_of_le_of_eq
-/- warning: le_of_eq_of_le -> le_of_eq_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align le_of_eq_of_le le_of_eq_of_leₓ'. -/
theorem le_of_eq_of_le (hab : a = b) (hbc : b ≤ c) : a ≤ c :=
hab.le.trans hbc
#align le_of_eq_of_le le_of_eq_of_le
-/- warning: lt_of_lt_of_eq -> lt_of_lt_of_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align lt_of_lt_of_eq lt_of_lt_of_eqₓ'. -/
theorem lt_of_lt_of_eq (hab : a < b) (hbc : b = c) : a < c :=
hab.trans_le hbc.le
#align lt_of_lt_of_eq lt_of_lt_of_eq
-/- warning: lt_of_eq_of_lt -> lt_of_eq_of_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align lt_of_eq_of_lt lt_of_eq_of_ltₓ'. -/
theorem lt_of_eq_of_lt (hab : a = b) (hbc : b < c) : a < c :=
hab.le.trans_lt hbc
#align lt_of_eq_of_lt lt_of_eq_of_lt
-/- warning: le_of_le_of_eq' -> le_of_le_of_eq' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align le_of_le_of_eq' le_of_le_of_eq'ₓ'. -/
theorem le_of_le_of_eq' : b ≤ c → a = b → a ≤ c :=
flip le_of_eq_of_le
#align le_of_le_of_eq' le_of_le_of_eq'
-/- warning: le_of_eq_of_le' -> le_of_eq_of_le' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align le_of_eq_of_le' le_of_eq_of_le'ₓ'. -/
theorem le_of_eq_of_le' : b = c → a ≤ b → a ≤ c :=
flip le_of_le_of_eq
#align le_of_eq_of_le' le_of_eq_of_le'
-/- warning: lt_of_lt_of_eq' -> lt_of_lt_of_eq' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align lt_of_lt_of_eq' lt_of_lt_of_eq'ₓ'. -/
theorem lt_of_lt_of_eq' : b < c → a = b → a < c :=
flip lt_of_eq_of_lt
#align lt_of_lt_of_eq' lt_of_lt_of_eq'
-/- warning: lt_of_eq_of_lt' -> lt_of_eq_of_lt' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align lt_of_eq_of_lt' lt_of_eq_of_lt'ₓ'. -/
theorem lt_of_eq_of_lt' : b = c → a < b → a < c :=
flip lt_of_lt_of_eq
#align lt_of_eq_of_lt' lt_of_eq_of_lt'
-/- warning: has_le.le.trans_eq -> LE.le.trans_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_le.le.trans_eq LE.le.trans_eqₓ'. -/
alias le_of_le_of_eq ← LE.le.trans_eq
#align has_le.le.trans_eq LE.le.trans_eq
-/- warning: has_le.le.trans_eq' -> LE.le.trans_eq' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_le.le.trans_eq' LE.le.trans_eq'ₓ'. -/
alias le_of_le_of_eq' ← LE.le.trans_eq'
#align has_le.le.trans_eq' LE.le.trans_eq'
-/- warning: has_lt.lt.trans_eq -> LT.lt.trans_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans_eq LT.lt.trans_eqₓ'. -/
alias lt_of_lt_of_eq ← LT.lt.trans_eq
#align has_lt.lt.trans_eq LT.lt.trans_eq
-/- warning: has_lt.lt.trans_eq' -> LT.lt.trans_eq' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans_eq' LT.lt.trans_eq'ₓ'. -/
alias lt_of_lt_of_eq' ← LT.lt.trans_eq'
#align has_lt.lt.trans_eq' LT.lt.trans_eq'
-/- warning: eq.trans_le -> Eq.trans_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align eq.trans_le Eq.trans_leₓ'. -/
alias le_of_eq_of_le ← Eq.trans_le
#align eq.trans_le Eq.trans_le
-/- warning: eq.trans_ge -> Eq.trans_ge is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align eq.trans_ge Eq.trans_geₓ'. -/
alias le_of_eq_of_le' ← Eq.trans_ge
#align eq.trans_ge Eq.trans_ge
-/- warning: eq.trans_lt -> Eq.trans_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align eq.trans_lt Eq.trans_ltₓ'. -/
alias lt_of_eq_of_lt ← Eq.trans_lt
#align eq.trans_lt Eq.trans_lt
-/- warning: eq.trans_gt -> Eq.trans_gt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
-Case conversion may be inaccurate. Consider using '#align eq.trans_gt Eq.trans_gtₓ'. -/
alias lt_of_eq_of_lt' ← Eq.trans_gt
#align eq.trans_gt Eq.trans_gt
@@ -529,33 +253,15 @@ namespace Eq
variable [Preorder α] {x y z : α}
-/- warning: eq.ge -> Eq.ge is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) y x)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) y x)
-Case conversion may be inaccurate. Consider using '#align eq.ge Eq.geₓ'. -/
/-- If `x = y` then `y ≤ x`. Note: this lemma uses `y ≤ x` instead of `x ≥ y`, because `le` is used
almost exclusively in mathlib. -/
protected theorem ge (h : x = y) : y ≤ x :=
h.symm.le
#align eq.ge Eq.ge
-/- warning: eq.not_lt -> Eq.not_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) x y))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x y))
-Case conversion may be inaccurate. Consider using '#align eq.not_lt Eq.not_ltₓ'. -/
theorem not_lt (h : x = y) : ¬x < y := fun h' => h'.Ne h
#align eq.not_lt Eq.not_lt
-/- warning: eq.not_gt -> Eq.not_gt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) y x))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) y x))
-Case conversion may be inaccurate. Consider using '#align eq.not_gt Eq.not_gtₓ'. -/
theorem not_gt (h : x = y) : ¬y < x :=
h.symm.not_lt
#align eq.not_gt Eq.not_gt
@@ -576,94 +282,40 @@ section PartialOrder
variable [PartialOrder α] {a b : α}
-/- warning: has_le.le.lt_iff_ne -> LE.le.lt_iff_ne is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α a b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.lt_iff_ne LE.le.lt_iff_neₓ'. -/
theorem lt_iff_ne (h : a ≤ b) : a < b ↔ a ≠ b :=
⟨fun h => h.Ne, h.lt_of_ne⟩
#align has_le.le.lt_iff_ne LE.le.lt_iff_ne
-/- warning: has_le.le.gt_iff_ne -> LE.le.gt_iff_ne is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α b a))
-Case conversion may be inaccurate. Consider using '#align has_le.le.gt_iff_ne LE.le.gt_iff_neₓ'. -/
theorem gt_iff_ne (h : a ≤ b) : a < b ↔ b ≠ a :=
⟨fun h => h.Ne.symm, h.lt_of_ne'⟩
#align has_le.le.gt_iff_ne LE.le.gt_iff_ne
-/- warning: has_le.le.not_lt_iff_eq -> LE.le.not_lt_iff_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Eq.{succ u1} α a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Eq.{succ u1} α a b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.not_lt_iff_eq LE.le.not_lt_iff_eqₓ'. -/
theorem not_lt_iff_eq (h : a ≤ b) : ¬a < b ↔ a = b :=
h.lt_iff_ne.not_left
#align has_le.le.not_lt_iff_eq LE.le.not_lt_iff_eq
-/- warning: has_le.le.not_gt_iff_eq -> LE.le.not_gt_iff_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Eq.{succ u1} α b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Eq.{succ u1} α b a))
-Case conversion may be inaccurate. Consider using '#align has_le.le.not_gt_iff_eq LE.le.not_gt_iff_eqₓ'. -/
theorem not_gt_iff_eq (h : a ≤ b) : ¬a < b ↔ b = a :=
h.gt_iff_ne.not_left
#align has_le.le.not_gt_iff_eq LE.le.not_gt_iff_eq
-/- warning: has_le.le.le_iff_eq -> LE.le.le_iff_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) (Eq.{succ u1} α b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) (Eq.{succ u1} α b a))
-Case conversion may be inaccurate. Consider using '#align has_le.le.le_iff_eq LE.le.le_iff_eqₓ'. -/
theorem le_iff_eq (h : a ≤ b) : b ≤ a ↔ b = a :=
⟨fun h' => h'.antisymm h, Eq.le⟩
#align has_le.le.le_iff_eq LE.le.le_iff_eq
-/- warning: has_le.le.ge_iff_eq -> LE.le.ge_iff_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) (Eq.{succ u1} α a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) (Eq.{succ u1} α a b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.ge_iff_eq LE.le.ge_iff_eqₓ'. -/
theorem ge_iff_eq (h : a ≤ b) : b ≤ a ↔ a = b :=
⟨h.antisymm, Eq.ge⟩
#align has_le.le.ge_iff_eq LE.le.ge_iff_eq
end PartialOrder
-/- warning: has_le.le.lt_or_le -> LE.le.lt_or_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.lt_or_le LE.le.lt_or_leₓ'. -/
theorem lt_or_le [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a < c ∨ c ≤ b :=
(lt_or_ge a c).imp id fun hc => le_trans hc h
#align has_le.le.lt_or_le LE.le.lt_or_le
-/- warning: has_le.le.le_or_lt -> LE.le.le_or_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.le_or_lt LE.le.le_or_ltₓ'. -/
theorem le_or_lt [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a ≤ c ∨ c < b :=
(le_or_gt a c).imp id fun hc => lt_of_lt_of_le hc h
#align has_le.le.le_or_lt LE.le.le_or_lt
-/- warning: has_le.le.le_or_le -> LE.le.le_or_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.le_or_le LE.le.le_or_leₓ'. -/
theorem le_or_le [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a ≤ c ∨ c ≤ b :=
(h.le_or_lt c).elim Or.inl fun h => Or.inr <| le_of_lt h
#align has_le.le.le_or_le LE.le.le_or_le
@@ -680,32 +332,14 @@ protected theorem gt [LT α] {x y : α} (h : x < y) : y > x :=
#align has_lt.lt.gt LT.lt.gt
-/
-/- warning: has_lt.lt.false -> LT.lt.false is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) x x) -> False
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x x) -> False
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.false LT.lt.falseₓ'. -/
protected theorem false [Preorder α] {x : α} : x < x → False :=
lt_irrefl x
#align has_lt.lt.false LT.lt.false
-/- warning: has_lt.lt.ne' -> LT.lt.ne' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) x y) -> (Ne.{succ u1} α y x)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x y) -> (Ne.{succ u1} α y x)
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.ne' LT.lt.ne'ₓ'. -/
theorem ne' [Preorder α] {x y : α} (h : x < y) : y ≠ x :=
h.Ne.symm
#align has_lt.lt.ne' LT.lt.ne'
-/- warning: has_lt.lt.lt_or_lt -> LT.lt.lt_or_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (forall (z : α), Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x z) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) z y))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (forall (z : α), Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x z) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) z y))
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.lt_or_lt LT.lt.lt_or_ltₓ'. -/
theorem lt_or_lt [LinearOrder α] {x y : α} (h : x < y) (z : α) : x < z ∨ z < y :=
(lt_or_ge z y).elim Or.inr fun hz => Or.inl <| h.trans_le hz
#align has_lt.lt.lt_or_lt LT.lt.lt_or_lt
@@ -728,12 +362,6 @@ protected theorem GT.gt.lt [LT α] {x y : α} (h : x > y) : y < x :=
#align gt.lt GT.gt.lt
-/
-/- warning: ge_of_eq -> ge_of_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Eq.{succ u1} α a b) -> (GE.ge.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Eq.{succ u1} α a b) -> (GE.ge.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align ge_of_eq ge_of_eqₓ'. -/
-- see Note [nolint_ge]
@[nolint ge_or_gt]
theorem ge_of_eq [Preorder α] {a b : α} (h : a = b) : a ≥ b :=
@@ -756,100 +384,40 @@ theorem gt_iff_lt [LT α] {a b : α} : a > b ↔ b < a :=
#align gt_iff_lt gt_iff_lt
-/
-/- warning: not_le_of_lt -> not_le_of_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b a))
-Case conversion may be inaccurate. Consider using '#align not_le_of_lt not_le_of_ltₓ'. -/
theorem not_le_of_lt [Preorder α] {a b : α} (h : a < b) : ¬b ≤ a :=
(le_not_le_of_lt h).right
#align not_le_of_lt not_le_of_lt
-/- warning: has_lt.lt.not_le -> LT.lt.not_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b a))
-Case conversion may be inaccurate. Consider using '#align has_lt.lt.not_le LT.lt.not_leₓ'. -/
alias not_le_of_lt ← LT.lt.not_le
#align has_lt.lt.not_le LT.lt.not_le
-/- warning: not_lt_of_le -> not_lt_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a))
-Case conversion may be inaccurate. Consider using '#align not_lt_of_le not_lt_of_leₓ'. -/
theorem not_lt_of_le [Preorder α] {a b : α} (h : a ≤ b) : ¬b < a := fun hba => hba.not_le h
#align not_lt_of_le not_lt_of_le
-/- warning: has_le.le.not_lt -> LE.le.not_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a))
-Case conversion may be inaccurate. Consider using '#align has_le.le.not_lt LE.le.not_ltₓ'. -/
alias not_lt_of_le ← LE.le.not_lt
#align has_le.le.not_lt LE.le.not_lt
-/- warning: ne_of_not_le -> ne_of_not_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)) -> (Ne.{succ u1} α a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Not (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)) -> (Ne.{succ u1} α a b)
-Case conversion may be inaccurate. Consider using '#align ne_of_not_le ne_of_not_leₓ'. -/
theorem ne_of_not_le [Preorder α] {a b : α} (h : ¬a ≤ b) : a ≠ b := fun hab => h (le_of_eq hab)
#align ne_of_not_le ne_of_not_le
-/- warning: decidable.le_iff_eq_or_lt -> Decidable.le_iff_eq_or_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))] {a : α} {b : α}, Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.1865 : α) (x._@.Mathlib.Order.Basic._hyg.1867 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Order.Basic._hyg.1865 x._@.Mathlib.Order.Basic._hyg.1867)] {a : α} {b : α}, Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-Case conversion may be inaccurate. Consider using '#align decidable.le_iff_eq_or_lt Decidable.le_iff_eq_or_ltₓ'. -/
-- See Note [decidable namespace]
protected theorem Decidable.le_iff_eq_or_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
a ≤ b ↔ a = b ∨ a < b :=
Decidable.le_iff_lt_or_eq.trans or_comm
#align decidable.le_iff_eq_or_lt Decidable.le_iff_eq_or_lt
-/- warning: le_iff_eq_or_lt -> le_iff_eq_or_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-Case conversion may be inaccurate. Consider using '#align le_iff_eq_or_lt le_iff_eq_or_ltₓ'. -/
theorem le_iff_eq_or_lt [PartialOrder α] {a b : α} : a ≤ b ↔ a = b ∨ a < b :=
le_iff_lt_or_eq.trans or_comm
#align le_iff_eq_or_lt le_iff_eq_or_lt
-/- warning: lt_iff_le_and_ne -> lt_iff_le_and_ne is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (And (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α a b))
-Case conversion may be inaccurate. Consider using '#align lt_iff_le_and_ne lt_iff_le_and_neₓ'. -/
theorem lt_iff_le_and_ne [PartialOrder α] {a b : α} : a < b ↔ a ≤ b ∧ a ≠ b :=
⟨fun h => ⟨le_of_lt h, ne_of_lt h⟩, fun ⟨h1, h2⟩ => h1.lt_of_ne h2⟩
#align lt_iff_le_and_ne lt_iff_le_and_ne
-/- warning: eq_iff_not_lt_of_le -> eq_iff_not_lt_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {x : α} {y : α}, Iff ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x y) -> (Eq.{succ u1} α y x)) (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x y))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {x : α} {y : α}, Iff ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x y) -> (Eq.{succ u1} α y x)) (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x y))
-Case conversion may be inaccurate. Consider using '#align eq_iff_not_lt_of_le eq_iff_not_lt_of_leₓ'. -/
theorem eq_iff_not_lt_of_le {α} [PartialOrder α] {x y : α} : x ≤ y → y = x ↔ ¬x < y := by
rw [lt_iff_le_and_ne, not_and, Classical.not_not, eq_comm]
#align eq_iff_not_lt_of_le eq_iff_not_lt_of_le
-/- warning: decidable.eq_iff_le_not_lt -> Decidable.eq_iff_le_not_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.2117 : α) (x._@.Mathlib.Order.Basic._hyg.2119 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Order.Basic._hyg.2117 x._@.Mathlib.Order.Basic._hyg.2119)] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
-Case conversion may be inaccurate. Consider using '#align decidable.eq_iff_le_not_lt Decidable.eq_iff_le_not_ltₓ'. -/
-- See Note [decidable namespace]
protected theorem Decidable.eq_iff_le_not_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
a = b ↔ a ≤ b ∧ ¬a < b :=
@@ -857,173 +425,71 @@ protected theorem Decidable.eq_iff_le_not_lt [PartialOrder α] [@DecidableRel α
h₁.antisymm <| Decidable.by_contradiction fun h₃ => h₂ (h₁.lt_of_not_le h₃)⟩
#align decidable.eq_iff_le_not_lt Decidable.eq_iff_le_not_lt
-/- warning: eq_iff_le_not_lt -> eq_iff_le_not_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
-Case conversion may be inaccurate. Consider using '#align eq_iff_le_not_lt eq_iff_le_not_ltₓ'. -/
theorem eq_iff_le_not_lt [PartialOrder α] {a b : α} : a = b ↔ a ≤ b ∧ ¬a < b :=
haveI := Classical.dec
Decidable.eq_iff_le_not_lt
#align eq_iff_le_not_lt eq_iff_le_not_lt
-/- warning: eq_or_lt_of_le -> eq_or_lt_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-Case conversion may be inaccurate. Consider using '#align eq_or_lt_of_le eq_or_lt_of_leₓ'. -/
theorem eq_or_lt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : a = b ∨ a < b :=
h.lt_or_eq.symm
#align eq_or_lt_of_le eq_or_lt_of_le
-/- warning: eq_or_gt_of_le -> eq_or_gt_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α b a) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α b a) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-Case conversion may be inaccurate. Consider using '#align eq_or_gt_of_le eq_or_gt_of_leₓ'. -/
theorem eq_or_gt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : b = a ∨ a < b :=
h.lt_or_eq.symm.imp Eq.symm id
#align eq_or_gt_of_le eq_or_gt_of_le
-/- warning: gt_or_eq_of_le -> gt_or_eq_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α b a))
-Case conversion may be inaccurate. Consider using '#align gt_or_eq_of_le gt_or_eq_of_leₓ'. -/
theorem gt_or_eq_of_le [PartialOrder α] {a b : α} (hab : a ≤ b) : a < b ∨ b = a :=
(eq_or_gt_of_le hab).symm
#align gt_or_eq_of_le gt_or_eq_of_le
-/- warning: has_le.le.eq_or_lt_dec -> LE.le.eq_or_lt_dec is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Init.Algebra.Order._hyg.2123 : α) (x._@.Mathlib.Init.Algebra.Order._hyg.2125 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Init.Algebra.Order._hyg.2123 x._@.Mathlib.Init.Algebra.Order._hyg.2125)] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.eq_or_lt_dec LE.le.eq_or_lt_decₓ'. -/
alias Decidable.eq_or_lt_of_le ← LE.le.eq_or_lt_dec
#align has_le.le.eq_or_lt_dec LE.le.eq_or_lt_dec
-/- warning: has_le.le.eq_or_lt -> LE.le.eq_or_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.eq_or_lt LE.le.eq_or_ltₓ'. -/
alias eq_or_lt_of_le ← LE.le.eq_or_lt
#align has_le.le.eq_or_lt LE.le.eq_or_lt
-/- warning: has_le.le.eq_or_gt -> LE.le.eq_or_gt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α b a) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α b a) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-Case conversion may be inaccurate. Consider using '#align has_le.le.eq_or_gt LE.le.eq_or_gtₓ'. -/
alias eq_or_gt_of_le ← LE.le.eq_or_gt
#align has_le.le.eq_or_gt LE.le.eq_or_gt
-/- warning: has_le.le.gt_or_eq -> LE.le.gt_or_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α b a))
-Case conversion may be inaccurate. Consider using '#align has_le.le.gt_or_eq LE.le.gt_or_eqₓ'. -/
alias gt_or_eq_of_le ← LE.le.gt_or_eq
#align has_le.le.gt_or_eq LE.le.gt_or_eq
attribute [nolint decidable_classical] LE.le.eq_or_lt_dec
-/- warning: eq_of_le_of_not_lt -> eq_of_le_of_not_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α a b)
-Case conversion may be inaccurate. Consider using '#align eq_of_le_of_not_lt eq_of_le_of_not_ltₓ'. -/
theorem eq_of_le_of_not_lt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba : ¬a < b) : a = b :=
hab.eq_or_lt.resolve_right hba
#align eq_of_le_of_not_lt eq_of_le_of_not_lt
-/- warning: eq_of_ge_of_not_gt -> eq_of_ge_of_not_gt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α b a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α b a)
-Case conversion may be inaccurate. Consider using '#align eq_of_ge_of_not_gt eq_of_ge_of_not_gtₓ'. -/
theorem eq_of_ge_of_not_gt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba : ¬a < b) : b = a :=
(hab.eq_or_lt.resolve_right hba).symm
#align eq_of_ge_of_not_gt eq_of_ge_of_not_gt
-/- warning: has_le.le.eq_of_not_lt -> LE.le.eq_of_not_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α a b)
-Case conversion may be inaccurate. Consider using '#align has_le.le.eq_of_not_lt LE.le.eq_of_not_ltₓ'. -/
alias eq_of_le_of_not_lt ← LE.le.eq_of_not_lt
#align has_le.le.eq_of_not_lt LE.le.eq_of_not_lt
-/- warning: has_le.le.eq_of_not_gt -> LE.le.eq_of_not_gt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α b a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α b a)
-Case conversion may be inaccurate. Consider using '#align has_le.le.eq_of_not_gt LE.le.eq_of_not_gtₓ'. -/
alias eq_of_ge_of_not_gt ← LE.le.eq_of_not_gt
#align has_le.le.eq_of_not_gt LE.le.eq_of_not_gt
-/- warning: ne.le_iff_lt -> Ne.le_iff_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
-Case conversion may be inaccurate. Consider using '#align ne.le_iff_lt Ne.le_iff_ltₓ'. -/
theorem Ne.le_iff_lt [PartialOrder α] {a b : α} (h : a ≠ b) : a ≤ b ↔ a < b :=
⟨fun h' => lt_of_le_of_ne h' h, fun h => h.le⟩
#align ne.le_iff_lt Ne.le_iff_lt
-/- warning: ne.not_le_or_not_le -> Ne.not_le_or_not_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (Or (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (Or (Not (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Not (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a)))
-Case conversion may be inaccurate. Consider using '#align ne.not_le_or_not_le Ne.not_le_or_not_leₓ'. -/
theorem Ne.not_le_or_not_le [PartialOrder α] {a b : α} (h : a ≠ b) : ¬a ≤ b ∨ ¬b ≤ a :=
not_and_or.1 <| le_antisymm_iff.Not.1 h
#align ne.not_le_or_not_le Ne.not_le_or_not_le
-/- warning: decidable.ne_iff_lt_iff_le -> Decidable.ne_iff_lt_iff_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableEq.{succ u1} α] {a : α} {b : α}, Iff (Iff (Ne.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableEq.{succ u1} α] {a : α} {b : α}, Iff (Iff (Ne.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-Case conversion may be inaccurate. Consider using '#align decidable.ne_iff_lt_iff_le Decidable.ne_iff_lt_iff_leₓ'. -/
-- See Note [decidable namespace]
protected theorem Decidable.ne_iff_lt_iff_le [PartialOrder α] [DecidableEq α] {a b : α} :
(a ≠ b ↔ a < b) ↔ a ≤ b :=
⟨fun h => Decidable.byCases le_of_eq (le_of_lt ∘ h.mp), fun h => ⟨lt_of_le_of_ne h, ne_of_lt⟩⟩
#align decidable.ne_iff_lt_iff_le Decidable.ne_iff_lt_iff_le
-/- warning: ne_iff_lt_iff_le -> ne_iff_lt_iff_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (Iff (Ne.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (Iff (Ne.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
-Case conversion may be inaccurate. Consider using '#align ne_iff_lt_iff_le ne_iff_lt_iff_leₓ'. -/
@[simp]
theorem ne_iff_lt_iff_le [PartialOrder α] {a b : α} : (a ≠ b ↔ a < b) ↔ a ≤ b :=
haveI := Classical.dec
Decidable.ne_iff_lt_iff_le
#align ne_iff_lt_iff_le ne_iff_lt_iff_le
-/- warning: min_def' -> min_def' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Eq.{succ u1} α (LinearOrder.min.{u1} α _inst_1 a b) (ite.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LE.le.decidable.{u1} α _inst_1 b a) b a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Eq.{succ u1} α (Min.min.{u1} α (LinearOrder.toMin.{u1} α _inst_1) a b) (ite.{succ u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (instDecidableLeToLEToPreorderToPartialOrder.{u1} α _inst_1 b a) b a)
-Case conversion may be inaccurate. Consider using '#align min_def' min_def'ₓ'. -/
-- Variant of `min_def` with the branches reversed.
theorem min_def' [LinearOrder α] (a b : α) : min a b = if b ≤ a then b else a :=
by
@@ -1034,12 +500,6 @@ theorem min_def' [LinearOrder α] (a b : α) : min a b = if b ≤ a then b else
· rw [if_neg (not_le.mpr GT.gt), if_pos gt.le]
#align min_def' min_def'
-/- warning: max_def' -> max_def' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Eq.{succ u1} α (LinearOrder.max.{u1} α _inst_1 a b) (ite.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LE.le.decidable.{u1} α _inst_1 b a) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Eq.{succ u1} α (Max.max.{u1} α (LinearOrder.toMax.{u1} α _inst_1) a b) (ite.{succ u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (instDecidableLeToLEToPreorderToPartialOrder.{u1} α _inst_1 b a) a b)
-Case conversion may be inaccurate. Consider using '#align max_def' max_def'ₓ'. -/
-- Variant of `min_def` with the branches reversed.
-- This is sometimes useful as it used to be the default.
theorem max_def' [LinearOrder α] (a b : α) : max a b = if b ≤ a then a else b :=
@@ -1051,243 +511,105 @@ theorem max_def' [LinearOrder α] (a b : α) : max a b = if b ≤ a then a else
· rw [if_neg (not_le.mpr GT.gt), if_pos gt.le]
#align max_def' max_def'
-/- warning: lt_of_not_le -> lt_of_not_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (Not (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
-Case conversion may be inaccurate. Consider using '#align lt_of_not_le lt_of_not_leₓ'. -/
theorem lt_of_not_le [LinearOrder α] {a b : α} (h : ¬b ≤ a) : a < b :=
((le_total _ _).resolve_right h).lt_of_not_le h
#align lt_of_not_le lt_of_not_le
-/- warning: lt_iff_not_le -> lt_iff_not_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (Not (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x))
-Case conversion may be inaccurate. Consider using '#align lt_iff_not_le lt_iff_not_leₓ'. -/
theorem lt_iff_not_le [LinearOrder α] {x y : α} : x < y ↔ ¬y ≤ x :=
⟨not_le_of_lt, lt_of_not_le⟩
#align lt_iff_not_le lt_iff_not_le
-/- warning: ne.lt_or_lt -> Ne.lt_or_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, (Ne.{succ u1} α x y) -> (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, (Ne.{succ u1} α x y) -> (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x))
-Case conversion may be inaccurate. Consider using '#align ne.lt_or_lt Ne.lt_or_ltₓ'. -/
theorem Ne.lt_or_lt [LinearOrder α] {x y : α} (h : x ≠ y) : x < y ∨ y < x :=
lt_or_gt_of_ne h
#align ne.lt_or_lt Ne.lt_or_lt
-/- warning: lt_or_lt_iff_ne -> lt_or_lt_iff_ne is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, Iff (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x)) (Ne.{succ u1} α x y)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, Iff (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x)) (Ne.{succ u1} α x y)
-Case conversion may be inaccurate. Consider using '#align lt_or_lt_iff_ne lt_or_lt_iff_neₓ'. -/
/-- A version of `ne_iff_lt_or_gt` with LHS and RHS reversed. -/
@[simp]
theorem lt_or_lt_iff_ne [LinearOrder α] {x y : α} : x < y ∨ y < x ↔ x ≠ y :=
ne_iff_lt_or_gt.symm
#align lt_or_lt_iff_ne lt_or_lt_iff_ne
-/- warning: not_lt_iff_eq_or_lt -> not_lt_iff_eq_or_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a))
-Case conversion may be inaccurate. Consider using '#align not_lt_iff_eq_or_lt not_lt_iff_eq_or_ltₓ'. -/
theorem not_lt_iff_eq_or_lt [LinearOrder α] {a b : α} : ¬a < b ↔ a = b ∨ b < a :=
not_lt.trans <| Decidable.le_iff_eq_or_lt.trans <| or_congr eq_comm Iff.rfl
#align not_lt_iff_eq_or_lt not_lt_iff_eq_or_lt
-/- warning: exists_ge_of_linear -> exists_ge_of_linear is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Exists.{succ u1} α (fun (c : α) => And (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Exists.{succ u1} α (fun (c : α) => And (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c))
-Case conversion may be inaccurate. Consider using '#align exists_ge_of_linear exists_ge_of_linearₓ'. -/
theorem exists_ge_of_linear [LinearOrder α] (a b : α) : ∃ c, a ≤ c ∧ b ≤ c :=
match le_total a b with
| Or.inl h => ⟨_, h, le_rfl⟩
| Or.inr h => ⟨_, le_rfl, h⟩
#align exists_ge_of_linear exists_ge_of_linear
-/- warning: lt_imp_lt_of_le_imp_le -> lt_imp_lt_of_le_imp_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b : α} {c : β} {d : β}, ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) c d)) -> (LT.lt.{u2} β (Preorder.toHasLt.{u2} β _inst_2) d c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrder.{u2} α] [_inst_2 : Preorder.{u1} β] {a : α} {b : α} {c : β} {d : β}, ((LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) a b) -> (LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) c d)) -> (LT.lt.{u1} β (Preorder.toLT.{u1} β _inst_2) d c) -> (LT.lt.{u2} α (Preorder.toLT.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) b a)
-Case conversion may be inaccurate. Consider using '#align lt_imp_lt_of_le_imp_le lt_imp_lt_of_le_imp_leₓ'. -/
theorem lt_imp_lt_of_le_imp_le {β} [LinearOrder α] [Preorder β] {a b : α} {c d : β}
(H : a ≤ b → c ≤ d) (h : d < c) : b < a :=
lt_of_not_le fun h' => (H h').not_lt h
#align lt_imp_lt_of_le_imp_le lt_imp_lt_of_le_imp_le
-/- warning: le_imp_le_iff_lt_imp_lt -> le_imp_le_iff_lt_imp_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : LinearOrder.{u2} β] {a : α} {b : α} {c : β} {d : β}, Iff ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (LE.le.{u2} β (Preorder.toHasLe.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) c d)) ((LT.lt.{u2} β (Preorder.toHasLt.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) d c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrder.{u2} α] [_inst_2 : LinearOrder.{u1} β] {a : α} {b : α} {c : β} {d : β}, Iff ((LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) a b) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) c d)) ((LT.lt.{u1} β (Preorder.toLT.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) d c) -> (LT.lt.{u2} α (Preorder.toLT.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) b a))
-Case conversion may be inaccurate. Consider using '#align le_imp_le_iff_lt_imp_lt le_imp_le_iff_lt_imp_ltₓ'. -/
theorem le_imp_le_iff_lt_imp_lt {β} [LinearOrder α] [LinearOrder β] {a b : α} {c d : β} :
a ≤ b → c ≤ d ↔ d < c → b < a :=
⟨lt_imp_lt_of_le_imp_le, le_imp_le_of_lt_imp_lt⟩
#align le_imp_le_iff_lt_imp_lt le_imp_le_iff_lt_imp_lt
-/- warning: lt_iff_lt_of_le_iff_le' -> lt_iff_lt_of_le_iff_le' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b : α} {c : β} {d : β}, (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) c d)) -> (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b a) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) d c)) -> (Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β _inst_2) d c))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {a : α} {b : α} {c : β} {d : β}, (Iff (LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) a b) (LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) c d)) -> (Iff (LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) b a) (LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) d c)) -> (Iff (LT.lt.{u2} α (Preorder.toLT.{u2} α _inst_1) b a) (LT.lt.{u1} β (Preorder.toLT.{u1} β _inst_2) d c))
-Case conversion may be inaccurate. Consider using '#align lt_iff_lt_of_le_iff_le' lt_iff_lt_of_le_iff_le'ₓ'. -/
theorem lt_iff_lt_of_le_iff_le' {β} [Preorder α] [Preorder β] {a b : α} {c d : β}
(H : a ≤ b ↔ c ≤ d) (H' : b ≤ a ↔ d ≤ c) : b < a ↔ d < c :=
lt_iff_le_not_le.trans <| (and_congr H' (not_congr H)).trans lt_iff_le_not_le.symm
#align lt_iff_lt_of_le_iff_le' lt_iff_lt_of_le_iff_le'
-/- warning: lt_iff_lt_of_le_iff_le -> lt_iff_lt_of_le_iff_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : LinearOrder.{u2} β] {a : α} {b : α} {c : β} {d : β}, (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) (LE.le.{u2} β (Preorder.toHasLe.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) c d)) -> (Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) d c))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrder.{u2} α] [_inst_2 : LinearOrder.{u1} β] {a : α} {b : α} {c : β} {d : β}, (Iff (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) a b) (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) c d)) -> (Iff (LT.lt.{u2} α (Preorder.toLT.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) b a) (LT.lt.{u1} β (Preorder.toLT.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) d c))
-Case conversion may be inaccurate. Consider using '#align lt_iff_lt_of_le_iff_le lt_iff_lt_of_le_iff_leₓ'. -/
theorem lt_iff_lt_of_le_iff_le {β} [LinearOrder α] [LinearOrder β] {a b : α} {c d : β}
(H : a ≤ b ↔ c ≤ d) : b < a ↔ d < c :=
not_le.symm.trans <| (not_congr H).trans <| not_le
#align lt_iff_lt_of_le_iff_le lt_iff_lt_of_le_iff_le
-/- warning: le_iff_le_iff_lt_iff_lt -> le_iff_le_iff_lt_iff_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : LinearOrder.{u2} β] {a : α} {b : α} {c : β} {d : β}, Iff (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) (LE.le.{u2} β (Preorder.toHasLe.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) c d)) (Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) d c))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrder.{u2} α] [_inst_2 : LinearOrder.{u1} β] {a : α} {b : α} {c : β} {d : β}, Iff (Iff (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) a b) (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) c d)) (Iff (LT.lt.{u2} α (Preorder.toLT.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) b a) (LT.lt.{u1} β (Preorder.toLT.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) d c))
-Case conversion may be inaccurate. Consider using '#align le_iff_le_iff_lt_iff_lt le_iff_le_iff_lt_iff_ltₓ'. -/
theorem le_iff_le_iff_lt_iff_lt {β} [LinearOrder α] [LinearOrder β] {a b : α} {c d : β} :
(a ≤ b ↔ c ≤ d) ↔ (b < a ↔ d < c) :=
⟨lt_iff_lt_of_le_iff_le, fun H => not_lt.symm.trans <| (not_congr H).trans <| not_lt⟩
#align le_iff_le_iff_lt_iff_lt le_iff_le_iff_lt_iff_lt
-/- warning: eq_of_forall_le_iff -> eq_of_forall_le_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) c a) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) c b)) -> (Eq.{succ u1} α a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) c a) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) c b)) -> (Eq.{succ u1} α a b)
-Case conversion may be inaccurate. Consider using '#align eq_of_forall_le_iff eq_of_forall_le_iffₓ'. -/
theorem eq_of_forall_le_iff [PartialOrder α] {a b : α} (H : ∀ c, c ≤ a ↔ c ≤ b) : a = b :=
((H _).1 le_rfl).antisymm ((H _).2 le_rfl)
#align eq_of_forall_le_iff eq_of_forall_le_iff
-/- warning: le_of_forall_le -> le_of_forall_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (forall (c : α), (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) c a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) c b)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (forall (c : α), (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) c a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) c b)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align le_of_forall_le le_of_forall_leₓ'. -/
theorem le_of_forall_le [Preorder α] {a b : α} (H : ∀ c, c ≤ a → c ≤ b) : a ≤ b :=
H _ le_rfl
#align le_of_forall_le le_of_forall_le
-/- warning: le_of_forall_le' -> le_of_forall_le' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (forall (c : α), (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (forall (c : α), (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b a)
-Case conversion may be inaccurate. Consider using '#align le_of_forall_le' le_of_forall_le'ₓ'. -/
theorem le_of_forall_le' [Preorder α] {a b : α} (H : ∀ c, a ≤ c → b ≤ c) : b ≤ a :=
H _ le_rfl
#align le_of_forall_le' le_of_forall_le'
-/- warning: le_of_forall_lt -> le_of_forall_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
-Case conversion may be inaccurate. Consider using '#align le_of_forall_lt le_of_forall_ltₓ'. -/
theorem le_of_forall_lt [LinearOrder α] {a b : α} (H : ∀ c, c < a → c < b) : a ≤ b :=
le_of_not_lt fun h => lt_irrefl _ (H _ h)
#align le_of_forall_lt le_of_forall_lt
-/- warning: forall_lt_iff_le -> forall_lt_iff_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (forall {{c : α}}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (forall {{c : α}}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
-Case conversion may be inaccurate. Consider using '#align forall_lt_iff_le forall_lt_iff_leₓ'. -/
theorem forall_lt_iff_le [LinearOrder α] {a b : α} : (∀ ⦃c⦄, c < a → c < b) ↔ a ≤ b :=
⟨le_of_forall_lt, fun h c hca => lt_of_lt_of_le hca h⟩
#align forall_lt_iff_le forall_lt_iff_le
-/- warning: le_of_forall_lt' -> le_of_forall_lt' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
-Case conversion may be inaccurate. Consider using '#align le_of_forall_lt' le_of_forall_lt'ₓ'. -/
theorem le_of_forall_lt' [LinearOrder α] {a b : α} (H : ∀ c, a < c → b < c) : b ≤ a :=
le_of_not_lt fun h => lt_irrefl _ (H _ h)
#align le_of_forall_lt' le_of_forall_lt'
-/- warning: forall_lt_iff_le' -> forall_lt_iff_le' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (forall {{c : α}}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (forall {{c : α}}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
-Case conversion may be inaccurate. Consider using '#align forall_lt_iff_le' forall_lt_iff_le'ₓ'. -/
theorem forall_lt_iff_le' [LinearOrder α] {a b : α} : (∀ ⦃c⦄, a < c → b < c) ↔ b ≤ a :=
⟨le_of_forall_lt', fun h c hac => lt_of_le_of_lt h hac⟩
#align forall_lt_iff_le' forall_lt_iff_le'
-/- warning: eq_of_forall_ge_iff -> eq_of_forall_ge_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a c) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b c)) -> (Eq.{succ u1} α a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a c) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b c)) -> (Eq.{succ u1} α a b)
-Case conversion may be inaccurate. Consider using '#align eq_of_forall_ge_iff eq_of_forall_ge_iffₓ'. -/
theorem eq_of_forall_ge_iff [PartialOrder α] {a b : α} (H : ∀ c, a ≤ c ↔ b ≤ c) : a = b :=
((H _).2 le_rfl).antisymm ((H _).1 le_rfl)
#align eq_of_forall_ge_iff eq_of_forall_ge_iff
-/- warning: eq_of_forall_lt_iff -> eq_of_forall_lt_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) -> (Eq.{succ u1} α a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) -> (Eq.{succ u1} α a b)
-Case conversion may be inaccurate. Consider using '#align eq_of_forall_lt_iff eq_of_forall_lt_iffₓ'. -/
theorem eq_of_forall_lt_iff [LinearOrder α] {a b : α} (h : ∀ c, c < a ↔ c < b) : a = b :=
(le_of_forall_lt fun _ => (h _).1).antisymm <| le_of_forall_lt fun _ => (h _).2
#align eq_of_forall_lt_iff eq_of_forall_lt_iff
-/- warning: eq_of_forall_gt_iff -> eq_of_forall_gt_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) -> (Eq.{succ u1} α a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) -> (Eq.{succ u1} α a b)
-Case conversion may be inaccurate. Consider using '#align eq_of_forall_gt_iff eq_of_forall_gt_iffₓ'. -/
theorem eq_of_forall_gt_iff [LinearOrder α] {a b : α} (h : ∀ c, a < c ↔ b < c) : a = b :=
(le_of_forall_lt' fun _ => (h _).2).antisymm <| le_of_forall_lt' fun _ => (h _).1
#align eq_of_forall_gt_iff eq_of_forall_gt_iff
-/- warning: rel_imp_eq_of_rel_imp_le -> rel_imp_eq_of_rel_imp_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PartialOrder.{u2} β] (r : α -> α -> Prop) [_inst_2 : IsSymm.{u1} α r] {f : α -> β}, (forall (a : α) (b : α), (r a b) -> (LE.le.{u2} β (Preorder.toHasLe.{u2} β (PartialOrder.toPreorder.{u2} β _inst_1)) (f a) (f b))) -> (forall {a : α} {b : α}, (r a b) -> (Eq.{succ u2} β (f a) (f b)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PartialOrder.{u2} β] (r : α -> α -> Prop) [_inst_2 : IsSymm.{u1} α r] {f : α -> β}, (forall (a : α) (b : α), (r a b) -> (LE.le.{u2} β (Preorder.toLE.{u2} β (PartialOrder.toPreorder.{u2} β _inst_1)) (f a) (f b))) -> (forall {a : α} {b : α}, (r a b) -> (Eq.{succ u2} β (f a) (f b)))
-Case conversion may be inaccurate. Consider using '#align rel_imp_eq_of_rel_imp_le rel_imp_eq_of_rel_imp_leₓ'. -/
/-- A symmetric relation implies two values are equal, when it implies they're less-equal. -/
theorem rel_imp_eq_of_rel_imp_le [PartialOrder β] (r : α → α → Prop) [IsSymm α r] {f : α → β}
(h : ∀ a b, r a b → f a ≤ f b) {a b : α} : r a b → f a = f b := fun hab =>
le_antisymm (h a b hab) (h b a <| symm hab)
#align rel_imp_eq_of_rel_imp_le rel_imp_eq_of_rel_imp_le
-/- warning: le_implies_le_of_le_of_le -> le_implies_le_of_le_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {a : α} {b : α} {c : α} {d : α} [_inst_1 : Preorder.{u1} α], (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) c a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b d) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) c d)
-but is expected to have type
- forall {α : Type.{u1}} {a : α} {b : α} {c : α} {d : α} [_inst_1 : Preorder.{u1} α], (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) c a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b d) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) c d)
-Case conversion may be inaccurate. Consider using '#align le_implies_le_of_le_of_le le_implies_le_of_le_of_leₓ'. -/
/-- monotonicity of `≤` with respect to `→` -/
theorem le_implies_le_of_le_of_le {a b c d : α} [Preorder α] (hca : c ≤ a) (hbd : b ≤ d) :
a ≤ b → c ≤ d := fun hab => (hca.trans hab).trans hbd
@@ -1297,24 +619,12 @@ section PartialOrder
variable [PartialOrder α]
-/- warning: commutative_of_le -> commutative_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PartialOrder.{u1} α] {f : β -> β -> α}, (forall (a : β) (b : β), LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) (f a b) (f b a)) -> (forall (a : β) (b : β), Eq.{succ u1} α (f a b) (f b a))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PartialOrder.{u1} α] {f : β -> β -> α}, (forall (a : β) (b : β), LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) (f a b) (f b a)) -> (forall (a : β) (b : β), Eq.{succ u1} α (f a b) (f b a))
-Case conversion may be inaccurate. Consider using '#align commutative_of_le commutative_of_leₓ'. -/
/-- To prove commutativity of a binary operation `○`, we only to check `a ○ b ≤ b ○ a` for all `a`,
`b`. -/
theorem commutative_of_le {f : β → β → α} (comm : ∀ a b, f a b ≤ f b a) : ∀ a b, f a b = f b a :=
fun a b => (comm _ _).antisymm <| comm _ _
#align commutative_of_le commutative_of_le
-/- warning: associative_of_commutative_of_le -> associative_of_commutative_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {f : α -> α -> α}, (Commutative.{u1} α f) -> (forall (a : α) (b : α) (c : α), LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) (f (f a b) c) (f a (f b c))) -> (Associative.{u1} α f)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {f : α -> α -> α}, (Commutative.{u1} α f) -> (forall (a : α) (b : α) (c : α), LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) (f (f a b) c) (f a (f b c))) -> (Associative.{u1} α f)
-Case conversion may be inaccurate. Consider using '#align associative_of_commutative_of_le associative_of_commutative_of_leₓ'. -/
/-- To prove associativity of a commutative binary operation `○`, we only to check
`(a ○ b) ○ c ≤ a ○ (b ○ c)` for all `a`, `b`, `c`. -/
theorem associative_of_commutative_of_le {f : α → α → α} (comm : Commutative f)
@@ -1324,12 +634,6 @@ theorem associative_of_commutative_of_le {f : α → α → α} (comm : Commutat
end PartialOrder
-/- warning: preorder.to_has_le_injective -> Preorder.toLE_injective is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}}, Function.Injective.{succ u1, succ u1} (Preorder.{u1} α) (LE.{u1} α) (Preorder.toHasLe.{u1} α)
-but is expected to have type
- forall {α : Type.{u1}}, Function.Injective.{succ u1, succ u1} (Preorder.{u1} α) (LE.{u1} α) (Preorder.toLE.{u1} α)
-Case conversion may be inaccurate. Consider using '#align preorder.to_has_le_injective Preorder.toLE_injectiveₓ'. -/
@[ext]
theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.toHasLe α) :=
fun A B h => by
@@ -1365,12 +669,6 @@ theorem LinearOrder.toPartialOrder_injective {α : Type _} :
#align linear_order.to_partial_order_injective LinearOrder.toPartialOrder_injective
-/
-/- warning: preorder.ext -> Preorder.ext is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {A : Preorder.{u1} α} {B : Preorder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α A) x y) (LE.le.{u1} α (Preorder.toHasLe.{u1} α B) x y)) -> (Eq.{succ u1} (Preorder.{u1} α) A B)
-but is expected to have type
- forall {α : Type.{u1}} {A : Preorder.{u1} α} {B : Preorder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toLE.{u1} α A) x y) (LE.le.{u1} α (Preorder.toLE.{u1} α B) x y)) -> (Eq.{succ u1} (Preorder.{u1} α) A B)
-Case conversion may be inaccurate. Consider using '#align preorder.ext Preorder.extₓ'. -/
theorem Preorder.ext {α} {A B : Preorder α}
(H :
∀ x y : α,
@@ -1380,12 +678,6 @@ theorem Preorder.ext {α} {A B : Preorder α}
A = B := by ext (x y); exact H x y
#align preorder.ext Preorder.ext
-/- warning: partial_order.ext -> PartialOrder.ext is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {A : PartialOrder.{u1} α} {B : PartialOrder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α A)) x y) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α B)) x y)) -> (Eq.{succ u1} (PartialOrder.{u1} α) A B)
-but is expected to have type
- forall {α : Type.{u1}} {A : PartialOrder.{u1} α} {B : PartialOrder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α A)) x y) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α B)) x y)) -> (Eq.{succ u1} (PartialOrder.{u1} α) A B)
-Case conversion may be inaccurate. Consider using '#align partial_order.ext PartialOrder.extₓ'. -/
theorem PartialOrder.ext {α} {A B : PartialOrder α}
(H :
∀ x y : α,
@@ -1395,12 +687,6 @@ theorem PartialOrder.ext {α} {A B : PartialOrder α}
A = B := by ext (x y); exact H x y
#align partial_order.ext PartialOrder.ext
-/- warning: linear_order.ext -> LinearOrder.ext is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {A : LinearOrder.{u1} α} {B : LinearOrder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α A))) x y) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α B))) x y)) -> (Eq.{succ u1} (LinearOrder.{u1} α) A B)
-but is expected to have type
- forall {α : Type.{u1}} {A : LinearOrder.{u1} α} {B : LinearOrder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α A))) x y) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α B))) x y)) -> (Eq.{succ u1} (LinearOrder.{u1} α) A B)
-Case conversion may be inaccurate. Consider using '#align linear_order.ext LinearOrder.extₓ'. -/
theorem LinearOrder.ext {α} {A B : LinearOrder α}
(H :
∀ x y : α,
@@ -1581,12 +867,6 @@ instance Pi.preorder {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)]
#align pi.preorder Pi.preorder
-/
-/- warning: pi.lt_def -> Pi.lt_def is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (α i)] {x : forall (i : ι), α i} {y : forall (i : ι), α i}, Iff (LT.lt.{max u1 u2} (forall (i : ι), α i) (Preorder.toHasLt.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i))) x y) (And (LE.le.{max u1 u2} (forall (i : ι), α i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => Preorder.toHasLe.{u2} (α i) (_inst_1 i))) x y) (Exists.{succ u1} ι (fun (i : ι) => LT.lt.{u2} (α i) (Preorder.toHasLt.{u2} (α i) (_inst_1 i)) (x i) (y i))))
-but is expected to have type
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (α i)] {x : forall (i : ι), α i} {y : forall (i : ι), α i}, Iff (LT.lt.{max u1 u2} (forall (i : ι), α i) (Preorder.toLT.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i))) x y) (And (LE.le.{max u1 u2} (forall (i : ι), α i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => Preorder.toLE.{u2} (α i) (_inst_1 i))) x y) (Exists.{succ u1} ι (fun (i : ι) => LT.lt.{u2} (α i) (Preorder.toLT.{u2} (α i) (_inst_1 i)) (x i) (y i))))
-Case conversion may be inaccurate. Consider using '#align pi.lt_def Pi.lt_defₓ'. -/
theorem Pi.lt_def {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] {x y : ∀ i, α i} :
x < y ↔ x ≤ y ∧ ∃ i, x i < y i := by
simp (config := { contextual := true }) [lt_iff_le_not_le, Pi.le_def]
@@ -1612,78 +892,30 @@ local infixl:50 " ≺ " => StrongLT
variable [∀ i, Preorder (π i)] {a b c : ∀ i, π i}
-/- warning: le_of_strong_lt -> le_of_strongLT is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) a b)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i}, (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) a b)
-Case conversion may be inaccurate. Consider using '#align le_of_strong_lt le_of_strongLTₓ'. -/
theorem le_of_strongLT (h : a ≺ b) : a ≤ b := fun i => (h _).le
#align le_of_strong_lt le_of_strongLT
-/- warning: lt_of_strong_lt -> lt_of_strongLT is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u1} ι], (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u1 u2} (forall (i : ι), π i) (Preorder.toHasLt.{max u1 u2} (forall (i : ι), π i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u2} ι], (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u2 u1} (forall (i : ι), π i) (Preorder.toLT.{max u2 u1} (forall (i : ι), π i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
-Case conversion may be inaccurate. Consider using '#align lt_of_strong_lt lt_of_strongLTₓ'. -/
theorem lt_of_strongLT [Nonempty ι] (h : a ≺ b) : a < b := by inhabit ι;
exact Pi.lt_def.2 ⟨le_of_strongLT h, default, h _⟩
#align lt_of_strong_lt lt_of_strongLT
-/- warning: strong_lt_of_strong_lt_of_le -> strongLT_of_strongLT_of_le is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a c)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) b c) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a c)
-Case conversion may be inaccurate. Consider using '#align strong_lt_of_strong_lt_of_le strongLT_of_strongLT_of_leₓ'. -/
theorem strongLT_of_strongLT_of_le (hab : a ≺ b) (hbc : b ≤ c) : a ≺ c := fun i =>
(hab _).trans_le <| hbc _
#align strong_lt_of_strong_lt_of_le strongLT_of_strongLT_of_le
-/- warning: strong_lt_of_le_of_strong_lt -> strongLT_of_le_of_strongLT is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) a b) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a c)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) a b) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) b c) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a c)
-Case conversion may be inaccurate. Consider using '#align strong_lt_of_le_of_strong_lt strongLT_of_le_of_strongLTₓ'. -/
theorem strongLT_of_le_of_strongLT (hab : a ≤ b) (hbc : b ≺ c) : a ≺ c := fun i =>
(hab _).trans_lt <| hbc _
#align strong_lt_of_le_of_strong_lt strongLT_of_le_of_strongLT
-/- warning: strong_lt.le -> StrongLT.le is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) a b)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i}, (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) a b)
-Case conversion may be inaccurate. Consider using '#align strong_lt.le StrongLT.leₓ'. -/
alias le_of_strongLT ← StrongLT.le
#align strong_lt.le StrongLT.le
-/- warning: strong_lt.lt -> StrongLT.lt is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u1} ι], (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u1 u2} (forall (i : ι), π i) (Preorder.toHasLt.{max u1 u2} (forall (i : ι), π i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u2} ι], (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u2 u1} (forall (i : ι), π i) (Preorder.toLT.{max u2 u1} (forall (i : ι), π i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
-Case conversion may be inaccurate. Consider using '#align strong_lt.lt StrongLT.ltₓ'. -/
alias lt_of_strongLT ← StrongLT.lt
#align strong_lt.lt StrongLT.lt
-/- warning: strong_lt.trans_le -> StrongLT.trans_le is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a c)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) b c) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a c)
-Case conversion may be inaccurate. Consider using '#align strong_lt.trans_le StrongLT.trans_leₓ'. -/
alias strongLT_of_strongLT_of_le ← StrongLT.trans_le
#align strong_lt.trans_le StrongLT.trans_le
-/- warning: has_le.le.trans_strong_lt -> LE.le.trans_strongLT is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) a b) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a c)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) a b) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) b c) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a c)
-Case conversion may be inaccurate. Consider using '#align has_le.le.trans_strong_lt LE.le.trans_strongLTₓ'. -/
alias strongLT_of_le_of_strongLT ← LE.le.trans_strongLT
#align has_le.le.trans_strong_lt LE.le.trans_strongLT
@@ -1693,98 +925,44 @@ section Function
variable [DecidableEq ι] [∀ i, Preorder (π i)] {x y : ∀ i, π i} {i : ι} {a b : π i}
-/- warning: le_update_iff -> le_update_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) x (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) y i a)) (And (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) (x i) a) (forall (j : ι), (Ne.{succ u1} ι j i) -> (LE.le.{u2} (π j) (Preorder.toHasLe.{u2} (π j) (_inst_2 j)) (x j) (y j))))
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) x (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) y i a)) (And (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) (x i) a) (forall (j : ι), (Ne.{succ u2} ι j i) -> (LE.le.{u1} (π j) (Preorder.toLE.{u1} (π j) (_inst_2 j)) (x j) (y j))))
-Case conversion may be inaccurate. Consider using '#align le_update_iff le_update_iffₓ'. -/
/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
theorem le_update_iff : x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => x j ≤ z
#align le_update_iff le_update_iff
-/- warning: update_le_iff -> update_le_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) y) (And (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) a (y i)) (forall (j : ι), (Ne.{succ u1} ι j i) -> (LE.le.{u2} (π j) (Preorder.toHasLe.{u2} (π j) (_inst_2 j)) (x j) (y j))))
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) y) (And (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a (y i)) (forall (j : ι), (Ne.{succ u2} ι j i) -> (LE.le.{u1} (π j) (Preorder.toLE.{u1} (π j) (_inst_2 j)) (x j) (y j))))
-Case conversion may be inaccurate. Consider using '#align update_le_iff update_le_iffₓ'. -/
/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
theorem update_le_iff : Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => z ≤ y j
#align update_le_iff update_le_iff
-/- warning: update_le_update_iff -> update_le_update_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) y i b)) (And (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) a b) (forall (j : ι), (Ne.{succ u1} ι j i) -> (LE.le.{u2} (π j) (Preorder.toHasLe.{u2} (π j) (_inst_2 j)) (x j) (y j))))
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u2, succ u1} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) y i b)) (And (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a b) (forall (j : ι), (Ne.{succ u2} ι j i) -> (LE.le.{u1} (π j) (Preorder.toLE.{u1} (π j) (_inst_2 j)) (x j) (y j))))
-Case conversion may be inaccurate. Consider using '#align update_le_update_iff update_le_update_iffₓ'. -/
/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
theorem update_le_update_iff :
Function.update x i a ≤ Function.update y i b ↔ a ≤ b ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j := by
simp (config := { contextual := true }) [update_le_iff]
#align update_le_update_iff update_le_update_iff
-/- warning: update_le_update_iff' -> update_le_update_iff' is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) a b)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u2, succ u1} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a b)
-Case conversion may be inaccurate. Consider using '#align update_le_update_iff' update_le_update_iff'ₓ'. -/
@[simp]
theorem update_le_update_iff' : update x i a ≤ update x i b ↔ a ≤ b := by
simp [update_le_update_iff]
#align update_le_update_iff' update_le_update_iff'
-/- warning: update_lt_update_iff -> update_lt_update_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LT.lt.{max u1 u2} (forall (a : ι), π a) (Preorder.toHasLt.{max u1 u2} (forall (a : ι), π a) (Pi.preorder.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LT.lt.{u2} (π i) (Preorder.toHasLt.{u2} (π i) (_inst_2 i)) a b)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LT.lt.{max u2 u1} (forall (a : ι), π a) (Preorder.toLT.{max u2 u1} (forall (a : ι), π a) (Pi.preorder.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u2, succ u1} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LT.lt.{u1} (π i) (Preorder.toLT.{u1} (π i) (_inst_2 i)) a b)
-Case conversion may be inaccurate. Consider using '#align update_lt_update_iff update_lt_update_iffₓ'. -/
@[simp]
theorem update_lt_update_iff : update x i a < update x i b ↔ a < b :=
lt_iff_lt_of_le_iff_le' update_le_update_iff' update_le_update_iff'
#align update_lt_update_iff update_lt_update_iff
-/- warning: le_update_self_iff -> le_update_self_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) x (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) (x i) a)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) x (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) (x i) a)
-Case conversion may be inaccurate. Consider using '#align le_update_self_iff le_update_self_iffₓ'. -/
@[simp]
theorem le_update_self_iff : x ≤ update x i a ↔ x i ≤ a := by simp [le_update_iff]
#align le_update_self_iff le_update_self_iff
-/- warning: update_le_self_iff -> update_le_self_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) x) (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) a (x i))
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) x) (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a (x i))
-Case conversion may be inaccurate. Consider using '#align update_le_self_iff update_le_self_iffₓ'. -/
@[simp]
theorem update_le_self_iff : update x i a ≤ x ↔ a ≤ x i := by simp [update_le_iff]
#align update_le_self_iff update_le_self_iff
-/- warning: lt_update_self_iff -> lt_update_self_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LT.lt.{max u1 u2} (forall (i : ι), π i) (Preorder.toHasLt.{max u1 u2} (forall (i : ι), π i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_2 i))) x (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LT.lt.{u2} (π i) (Preorder.toHasLt.{u2} (π i) (_inst_2 i)) (x i) a)
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LT.lt.{max u2 u1} (forall (i : ι), π i) (Preorder.toLT.{max u2 u1} (forall (i : ι), π i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_2 i))) x (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LT.lt.{u1} (π i) (Preorder.toLT.{u1} (π i) (_inst_2 i)) (x i) a)
-Case conversion may be inaccurate. Consider using '#align lt_update_self_iff lt_update_self_iffₓ'. -/
@[simp]
theorem lt_update_self_iff : x < update x i a ↔ x i < a := by simp [lt_iff_le_not_le]
#align lt_update_self_iff lt_update_self_iff
-/- warning: update_lt_self_iff -> update_lt_self_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LT.lt.{max u1 u2} (forall (a : ι), π a) (Preorder.toHasLt.{max u1 u2} (forall (a : ι), π a) (Pi.preorder.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) x) (LT.lt.{u2} (π i) (Preorder.toHasLt.{u2} (π i) (_inst_2 i)) a (x i))
-but is expected to have type
- forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LT.lt.{max u2 u1} (forall (a : ι), π a) (Preorder.toLT.{max u2 u1} (forall (a : ι), π a) (Pi.preorder.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) x) (LT.lt.{u1} (π i) (Preorder.toLT.{u1} (π i) (_inst_2 i)) a (x i))
-Case conversion may be inaccurate. Consider using '#align update_lt_self_iff update_lt_self_iffₓ'. -/
@[simp]
theorem update_lt_self_iff : update x i a < x ↔ a < x i := by simp [lt_iff_le_not_le]
#align update_lt_self_iff update_lt_self_iff
@@ -1816,22 +994,10 @@ namespace Function
variable [Preorder α] [Nonempty β] {a b : α}
-/- warning: function.const_le_const -> Function.const_le_const is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Nonempty.{succ u2} β] {a : α} {b : α}, Iff (LE.le.{max u2 u1} (β -> α) (Pi.hasLe.{u2, u1} β (fun (ᾰ : β) => α) (fun (i : β) => Preorder.toHasLe.{u1} α _inst_1)) (Function.const.{succ u1, succ u2} α β a) (Function.const.{succ u1, succ u2} α β b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Nonempty.{succ u2} β] {a : α} {b : α}, Iff (LE.le.{max u1 u2} (β -> α) (Pi.hasLe.{u2, u1} β (fun (ᾰ : β) => α) (fun (i : β) => Preorder.toLE.{u1} α _inst_1)) (Function.const.{succ u1, succ u2} α β a) (Function.const.{succ u1, succ u2} α β b)) (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align function.const_le_const Function.const_le_constₓ'. -/
@[simp]
theorem const_le_const : const β a ≤ const β b ↔ a ≤ b := by simp [Pi.le_def]
#align function.const_le_const Function.const_le_const
-/- warning: function.const_lt_const -> Function.const_lt_const is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Nonempty.{succ u2} β] {a : α} {b : α}, Iff (LT.lt.{max u2 u1} (β -> α) (Preorder.toHasLt.{max u2 u1} (β -> α) (Pi.preorder.{u2, u1} β (fun (ᾰ : β) => α) (fun (i : β) => _inst_1))) (Function.const.{succ u1, succ u2} α β a) (Function.const.{succ u1, succ u2} α β b)) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Nonempty.{succ u2} β] {a : α} {b : α}, Iff (LT.lt.{max u1 u2} (β -> α) (Preorder.toLT.{max u1 u2} (β -> α) (Pi.preorder.{u2, u1} β (fun (ᾰ : β) => α) (fun (i : β) => _inst_1))) (Function.const.{succ u1, succ u2} α β a) (Function.const.{succ u1, succ u2} α β b)) (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align function.const_lt_const Function.const_lt_constₓ'. -/
@[simp]
theorem const_lt_const : const β a < const β b ↔ a < b := by simpa [Pi.lt_def] using le_of_lt
#align function.const_lt_const Function.const_lt_const
@@ -1845,65 +1011,29 @@ section MinMaxRec
variable [LinearOrder α] {p : α → Prop} {x y : α}
-/- warning: min_rec -> min_rec is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {p : α -> Prop} {x : α} {y : α}, ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (p x)) -> ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x) -> (p y)) -> (p (LinearOrder.min.{u1} α _inst_1 x y))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {p : α -> Prop} {x : α} {y : α}, ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (p x)) -> ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x) -> (p y)) -> (p (Min.min.{u1} α (LinearOrder.toMin.{u1} α _inst_1) x y))
-Case conversion may be inaccurate. Consider using '#align min_rec min_recₓ'. -/
theorem min_rec (hx : x ≤ y → p x) (hy : y ≤ x → p y) : p (min x y) :=
(le_total x y).rec (fun h => (min_eq_left h).symm.subst (hx h)) fun h =>
(min_eq_right h).symm.subst (hy h)
#align min_rec min_rec
-/- warning: max_rec -> max_rec is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {p : α -> Prop} {x : α} {y : α}, ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x) -> (p x)) -> ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (p y)) -> (p (LinearOrder.max.{u1} α _inst_1 x y))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {p : α -> Prop} {x : α} {y : α}, ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x) -> (p x)) -> ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (p y)) -> (p (Max.max.{u1} α (LinearOrder.toMax.{u1} α _inst_1) x y))
-Case conversion may be inaccurate. Consider using '#align max_rec max_recₓ'. -/
theorem max_rec (hx : y ≤ x → p x) (hy : x ≤ y → p y) : p (max x y) :=
@min_rec αᵒᵈ _ _ _ _ hx hy
#align max_rec max_rec
-/- warning: min_rec' -> min_rec' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α} (p : α -> Prop), (p x) -> (p y) -> (p (LinearOrder.min.{u1} α _inst_1 x y))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α} (p : α -> Prop), (p x) -> (p y) -> (p (Min.min.{u1} α (LinearOrder.toMin.{u1} α _inst_1) x y))
-Case conversion may be inaccurate. Consider using '#align min_rec' min_rec'ₓ'. -/
theorem min_rec' (p : α → Prop) (hx : p x) (hy : p y) : p (min x y) :=
min_rec (fun _ => hx) fun _ => hy
#align min_rec' min_rec'
-/- warning: max_rec' -> max_rec' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α} (p : α -> Prop), (p x) -> (p y) -> (p (LinearOrder.max.{u1} α _inst_1 x y))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α} (p : α -> Prop), (p x) -> (p y) -> (p (Max.max.{u1} α (LinearOrder.toMax.{u1} α _inst_1) x y))
-Case conversion may be inaccurate. Consider using '#align max_rec' max_rec'ₓ'. -/
theorem max_rec' (p : α → Prop) (hx : p x) (hy : p y) : p (max x y) :=
max_rec (fun _ => hx) fun _ => hy
#align max_rec' max_rec'
-/- warning: min_def_lt -> min_def_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (x : α) (y : α), Eq.{succ u1} α (LinearOrder.min.{u1} α _inst_1 x y) (ite.{succ u1} α (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.decidable.{u1} α _inst_1 x y) x y)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (x : α) (y : α), Eq.{succ u1} α (Min.min.{u1} α (LinearOrder.toMin.{u1} α _inst_1) x y) (ite.{succ u1} α (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (instDecidableLtToLTToPreorderToPartialOrder.{u1} α _inst_1 x y) x y)
-Case conversion may be inaccurate. Consider using '#align min_def_lt min_def_ltₓ'. -/
theorem min_def_lt (x y : α) : min x y = if x < y then x else y :=
by
rw [min_comm, min_def, ← ite_not]
simp only [not_le]
#align min_def_lt min_def_lt
-/- warning: max_def_lt -> max_def_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (x : α) (y : α), Eq.{succ u1} α (LinearOrder.max.{u1} α _inst_1 x y) (ite.{succ u1} α (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.decidable.{u1} α _inst_1 x y) y x)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (x : α) (y : α), Eq.{succ u1} α (Max.max.{u1} α (LinearOrder.toMax.{u1} α _inst_1) x y) (ite.{succ u1} α (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (instDecidableLtToLTToPreorderToPartialOrder.{u1} α _inst_1 x y) y x)
-Case conversion may be inaccurate. Consider using '#align max_def_lt max_def_ltₓ'. -/
theorem max_def_lt (x y : α) : max x y = if x < y then y else x :=
by
rw [max_comm, max_def, ← ite_not]
@@ -1963,12 +1093,6 @@ def PartialOrder.lift {α β} [PartialOrder β] (f : α → β) (inj : Injective
#align partial_order.lift PartialOrder.lift
-/
-/- warning: linear_order.lift -> LinearOrder.lift is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u2} β] [_inst_2 : Sup.{u1} α] [_inst_3 : Inf.{u1} α] (f : α -> β), (Function.Injective.{succ u1, succ u2} α β f) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (Sup.sup.{u1} α _inst_2 x y)) (LinearOrder.max.{u2} β _inst_1 (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (Inf.inf.{u1} α _inst_3 x y)) (LinearOrder.min.{u2} β _inst_1 (f x) (f y))) -> (LinearOrder.{u1} α)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u2} β] [_inst_2 : Sup.{u1} α] [_inst_3 : Inf.{u1} α] (f : α -> β), (Function.Injective.{succ u1, succ u2} α β f) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (Sup.sup.{u1} α _inst_2 x y)) (Max.max.{u2} β (LinearOrder.toMax.{u2} β _inst_1) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (Inf.inf.{u1} α _inst_3 x y)) (Min.min.{u2} β (LinearOrder.toMin.{u2} β _inst_1) (f x) (f y))) -> (LinearOrder.{u1} α)
-Case conversion may be inaccurate. Consider using '#align linear_order.lift LinearOrder.liftₓ'. -/
/-- Transfer a `linear_order` on `β` to a `linear_order` on `α` using an injective
function `f : α → β`. This version takes `[has_sup α]` and `[has_inf α]` as arguments, then uses
them for `max` and `min` fields. See `linear_order.lift'` for a version that autogenerates `min` and
@@ -2053,22 +1177,10 @@ instance partialOrder [PartialOrder α] (p : α → Prop) : PartialOrder (Subtyp
#align subtype.partial_order Subtype.partialOrder
-/
-/- warning: subtype.decidable_le -> Subtype.decidableLE is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1))] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (LE.le.{u1} (Subtype.{succ u1} α p) (Subtype.hasLe.{u1} α (Preorder.toHasLe.{u1} α _inst_1) p))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.13892 : α) (x._@.Mathlib.Order.Basic._hyg.13894 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) x._@.Mathlib.Order.Basic._hyg.13892 x._@.Mathlib.Order.Basic._hyg.13894)] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (fun (x._@.Mathlib.Order.Basic._hyg.13915 : Subtype.{succ u1} α p) (x._@.Mathlib.Order.Basic._hyg.13917 : Subtype.{succ u1} α p) => LE.le.{u1} (Subtype.{succ u1} α p) (Subtype.le.{u1} α (Preorder.toLE.{u1} α _inst_1) p) x._@.Mathlib.Order.Basic._hyg.13915 x._@.Mathlib.Order.Basic._hyg.13917)
-Case conversion may be inaccurate. Consider using '#align subtype.decidable_le Subtype.decidableLEₓ'. -/
instance decidableLE [Preorder α] [h : @DecidableRel α (· ≤ ·)] {p : α → Prop} :
@DecidableRel (Subtype p) (· ≤ ·) := fun a b => h a b
#align subtype.decidable_le Subtype.decidableLE
-/- warning: subtype.decidable_lt -> Subtype.decidableLT is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1))] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (LT.lt.{u1} (Subtype.{succ u1} α p) (Subtype.hasLt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) p))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.13956 : α) (x._@.Mathlib.Order.Basic._hyg.13958 : α) => LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x._@.Mathlib.Order.Basic._hyg.13956 x._@.Mathlib.Order.Basic._hyg.13958)] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (fun (x._@.Mathlib.Order.Basic._hyg.13979 : Subtype.{succ u1} α p) (x._@.Mathlib.Order.Basic._hyg.13981 : Subtype.{succ u1} α p) => LT.lt.{u1} (Subtype.{succ u1} α p) (Subtype.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) p) x._@.Mathlib.Order.Basic._hyg.13979 x._@.Mathlib.Order.Basic._hyg.13981)
-Case conversion may be inaccurate. Consider using '#align subtype.decidable_lt Subtype.decidableLTₓ'. -/
instance decidableLT [Preorder α] [h : @DecidableRel α (· < ·)] {p : α → Prop} :
@DecidableRel (Subtype p) (· < ·) := fun a b => h a b
#align subtype.decidable_lt Subtype.decidableLT
@@ -2126,63 +1238,27 @@ instance (α : Type u) (β : Type v) [Preorder α] [Preorder β] : Preorder (α
le_trans := fun ⟨a, b⟩ ⟨c, d⟩ ⟨e, f⟩ ⟨hac, hbd⟩ ⟨hce, hdf⟩ =>
⟨le_trans hac hce, le_trans hbd hdf⟩ }
-/- warning: prod.swap_lt_swap -> Prod.swap_lt_swap is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {x : Prod.{u1, u2} α β} {y : Prod.{u1, u2} α β}, Iff (LT.lt.{max u2 u1} (Prod.{u2, u1} β α) (Preorder.toHasLt.{max u2 u1} (Prod.{u2, u1} β α) (Prod.preorder.{u2, u1} β α _inst_2 _inst_1)) (Prod.swap.{u1, u2} α β x) (Prod.swap.{u1, u2} α β y)) (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toHasLt.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) x y)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {x : Prod.{u1, u2} α β} {y : Prod.{u1, u2} α β}, Iff (LT.lt.{max u1 u2} (Prod.{u2, u1} β α) (Preorder.toLT.{max u1 u2} (Prod.{u2, u1} β α) (Prod.instPreorderProd.{u2, u1} β α _inst_2 _inst_1)) (Prod.swap.{u1, u2} α β x) (Prod.swap.{u1, u2} α β y)) (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instPreorderProd.{u1, u2} α β _inst_1 _inst_2)) x y)
-Case conversion may be inaccurate. Consider using '#align prod.swap_lt_swap Prod.swap_lt_swapₓ'. -/
@[simp]
theorem swap_lt_swap : x.symm < y.symm ↔ x < y :=
and_congr swap_le_swap (not_congr swap_le_swap)
#align prod.swap_lt_swap Prod.swap_lt_swap
-/- warning: prod.mk_le_mk_iff_left -> Prod.mk_le_mk_iff_left is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b : β}, Iff (LE.le.{max u1 u2} (Prod.{u1, u2} α β) (Prod.hasLe.{u1, u2} α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)) (Prod.mk.{u1, u2} α β a₁ b) (Prod.mk.{u1, u2} α β a₂ b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a₁ a₂)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b : β}, Iff (LE.le.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instLEProd.{u1, u2} α β (Preorder.toLE.{u1} α _inst_1) (Preorder.toLE.{u2} β _inst_2)) (Prod.mk.{u1, u2} α β a₁ b) (Prod.mk.{u1, u2} α β a₂ b)) (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a₁ a₂)
-Case conversion may be inaccurate. Consider using '#align prod.mk_le_mk_iff_left Prod.mk_le_mk_iff_leftₓ'. -/
theorem mk_le_mk_iff_left : (a₁, b) ≤ (a₂, b) ↔ a₁ ≤ a₂ :=
and_iff_left le_rfl
#align prod.mk_le_mk_iff_left Prod.mk_le_mk_iff_left
-/- warning: prod.mk_le_mk_iff_right -> Prod.mk_le_mk_iff_right is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b₁ : β} {b₂ : β}, Iff (LE.le.{max u1 u2} (Prod.{u1, u2} α β) (Prod.hasLe.{u1, u2} α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)) (Prod.mk.{u1, u2} α β a b₁) (Prod.mk.{u1, u2} α β a b₂)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) b₁ b₂)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b₁ : β} {b₂ : β}, Iff (LE.le.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instLEProd.{u1, u2} α β (Preorder.toLE.{u1} α _inst_1) (Preorder.toLE.{u2} β _inst_2)) (Prod.mk.{u1, u2} α β a b₁) (Prod.mk.{u1, u2} α β a b₂)) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) b₁ b₂)
-Case conversion may be inaccurate. Consider using '#align prod.mk_le_mk_iff_right Prod.mk_le_mk_iff_rightₓ'. -/
theorem mk_le_mk_iff_right : (a, b₁) ≤ (a, b₂) ↔ b₁ ≤ b₂ :=
and_iff_right le_rfl
#align prod.mk_le_mk_iff_right Prod.mk_le_mk_iff_right
-/- warning: prod.mk_lt_mk_iff_left -> Prod.mk_lt_mk_iff_left is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toHasLt.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a₁ b) (Prod.mk.{u1, u2} α β a₂ b)) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a₁ a₂)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instPreorderProd.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a₁ b) (Prod.mk.{u1, u2} α β a₂ b)) (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a₁ a₂)
-Case conversion may be inaccurate. Consider using '#align prod.mk_lt_mk_iff_left Prod.mk_lt_mk_iff_leftₓ'. -/
theorem mk_lt_mk_iff_left : (a₁, b) < (a₂, b) ↔ a₁ < a₂ :=
lt_iff_lt_of_le_iff_le' mk_le_mk_iff_left mk_le_mk_iff_left
#align prod.mk_lt_mk_iff_left Prod.mk_lt_mk_iff_left
-/- warning: prod.mk_lt_mk_iff_right -> Prod.mk_lt_mk_iff_right is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b₁ : β} {b₂ : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toHasLt.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a b₁) (Prod.mk.{u1, u2} α β a b₂)) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β _inst_2) b₁ b₂)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b₁ : β} {b₂ : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instPreorderProd.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a b₁) (Prod.mk.{u1, u2} α β a b₂)) (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) b₁ b₂)
-Case conversion may be inaccurate. Consider using '#align prod.mk_lt_mk_iff_right Prod.mk_lt_mk_iff_rightₓ'. -/
theorem mk_lt_mk_iff_right : (a, b₁) < (a, b₂) ↔ b₁ < b₂ :=
lt_iff_lt_of_le_iff_le' mk_le_mk_iff_right mk_le_mk_iff_right
#align prod.mk_lt_mk_iff_right Prod.mk_lt_mk_iff_right
-/- warning: prod.lt_iff -> Prod.lt_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {x : Prod.{u1, u2} α β} {y : Prod.{u1, u2} α β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toHasLt.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) x y) (Or (And (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) (Prod.fst.{u1, u2} α β x) (Prod.fst.{u1, u2} α β y)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) (Prod.snd.{u1, u2} α β x) (Prod.snd.{u1, u2} α β y))) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) (Prod.fst.{u1, u2} α β x) (Prod.fst.{u1, u2} α β y)) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β _inst_2) (Prod.snd.{u1, u2} α β x) (Prod.snd.{u1, u2} α β y))))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {x : Prod.{u1, u2} α β} {y : Prod.{u1, u2} α β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instPreorderProd.{u1, u2} α β _inst_1 _inst_2)) x y) (Or (And (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) (Prod.fst.{u1, u2} α β x) (Prod.fst.{u1, u2} α β y)) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) (Prod.snd.{u1, u2} α β x) (Prod.snd.{u1, u2} α β y))) (And (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) (Prod.fst.{u1, u2} α β x) (Prod.fst.{u1, u2} α β y)) (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) (Prod.snd.{u1, u2} α β x) (Prod.snd.{u1, u2} α β y))))
-Case conversion may be inaccurate. Consider using '#align prod.lt_iff Prod.lt_iffₓ'. -/
theorem lt_iff : x < y ↔ x.1 < y.1 ∧ x.2 ≤ y.2 ∨ x.1 ≤ y.1 ∧ x.2 < y.2 :=
by
refine' ⟨fun h => _, _⟩
@@ -2194,12 +1270,6 @@ theorem lt_iff : x < y ↔ x.1 < y.1 ∧ x.2 ≤ y.2 ∨ x.1 ≤ y.1 ∧ x.2 < y
· exact ⟨⟨h₁, h₂.le⟩, fun h => h₂.not_le h.2⟩
#align prod.lt_iff Prod.lt_iff
-/- warning: prod.mk_lt_mk -> Prod.mk_lt_mk is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b₁ : β} {b₂ : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toHasLt.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a₁ b₁) (Prod.mk.{u1, u2} α β a₂ b₂)) (Or (And (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a₁ a₂) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) b₁ b₂)) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a₁ a₂) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β _inst_2) b₁ b₂)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b₁ : β} {b₂ : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instPreorderProd.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a₁ b₁) (Prod.mk.{u1, u2} α β a₂ b₂)) (Or (And (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a₁ a₂) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) b₁ b₂)) (And (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a₁ a₂) (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) b₁ b₂)))
-Case conversion may be inaccurate. Consider using '#align prod.mk_lt_mk Prod.mk_lt_mkₓ'. -/
@[simp]
theorem mk_lt_mk : (a₁, b₁) < (a₂, b₂) ↔ a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂ :=
lt_iff
@@ -2266,12 +1336,6 @@ instance {α : ι → Type _} [∀ i, Preorder (α i)] [∀ i, DenselyOrdered (
⟨a.update i c, ⟨le_update_iff.2 ⟨ha.le, fun _ _ => le_rfl⟩, i, by rwa [update_same]⟩,
update_le_iff.2 ⟨hb.le, fun _ _ => hab _⟩, i, by rwa [update_same]⟩⟩
-/- warning: le_of_forall_le_of_dense -> le_of_forall_le_of_dense is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (forall (a : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a₂)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (forall (a : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a₂)
-Case conversion may be inaccurate. Consider using '#align le_of_forall_le_of_dense le_of_forall_le_of_denseₓ'. -/
theorem le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
(h : ∀ a, a₂ < a → a₁ ≤ a) : a₁ ≤ a₂ :=
le_of_not_gt fun ha =>
@@ -2279,23 +1343,11 @@ theorem le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂
lt_irrefl a <| lt_of_lt_of_le ‹a < a₁› (h _ ‹a₂ < a›)
#align le_of_forall_le_of_dense le_of_forall_le_of_dense
-/- warning: eq_of_le_of_forall_le_of_dense -> eq_of_le_of_forall_le_of_dense is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a₁) -> (forall (a : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a)) -> (Eq.{succ u1} α a₁ a₂)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a₁) -> (forall (a : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a)) -> (Eq.{succ u1} α a₁ a₂)
-Case conversion may be inaccurate. Consider using '#align eq_of_le_of_forall_le_of_dense eq_of_le_of_forall_le_of_denseₓ'. -/
theorem eq_of_le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α} (h₁ : a₂ ≤ a₁)
(h₂ : ∀ a, a₂ < a → a₁ ≤ a) : a₁ = a₂ :=
le_antisymm (le_of_forall_le_of_dense h₂) h₁
#align eq_of_le_of_forall_le_of_dense eq_of_le_of_forall_le_of_dense
-/- warning: le_of_forall_ge_of_dense -> le_of_forall_ge_of_dense is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (forall (a₃ : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₁) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₂)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a₂)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (forall (a₃ : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₁) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₂)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a₂)
-Case conversion may be inaccurate. Consider using '#align le_of_forall_ge_of_dense le_of_forall_ge_of_denseₓ'. -/
theorem le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
(h : ∀ a₃ < a₁, a₃ ≤ a₂) : a₁ ≤ a₂ :=
le_of_not_gt fun ha =>
@@ -2303,23 +1355,11 @@ theorem le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂
lt_irrefl a <| lt_of_le_of_lt (h _ ‹a < a₁›) ‹a₂ < a›
#align le_of_forall_ge_of_dense le_of_forall_ge_of_dense
-/- warning: eq_of_le_of_forall_ge_of_dense -> eq_of_le_of_forall_ge_of_dense is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a₁) -> (forall (a₃ : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₁) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₂)) -> (Eq.{succ u1} α a₁ a₂)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a₁) -> (forall (a₃ : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₁) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₂)) -> (Eq.{succ u1} α a₁ a₂)
-Case conversion may be inaccurate. Consider using '#align eq_of_le_of_forall_ge_of_dense eq_of_le_of_forall_ge_of_denseₓ'. -/
theorem eq_of_le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α} (h₁ : a₂ ≤ a₁)
(h₂ : ∀ a₃ < a₁, a₃ ≤ a₂) : a₁ = a₂ :=
(le_of_forall_ge_of_dense h₂).antisymm h₁
#align eq_of_le_of_forall_ge_of_dense eq_of_le_of_forall_ge_of_dense
-/- warning: dense_or_discrete -> dense_or_discrete is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a₁ : α) (a₂ : α), Or (Exists.{succ u1} α (fun (a : α) => And (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₂))) (And (forall (a : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a)) (forall (a : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₂) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₁)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a₁ : α) (a₂ : α), Or (Exists.{succ u1} α (fun (a : α) => And (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₂))) (And (forall (a : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a)) (forall (a : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₂) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₁)))
-Case conversion may be inaccurate. Consider using '#align dense_or_discrete dense_or_discreteₓ'. -/
theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
(∃ a, a₁ < a ∧ a < a₂) ∨ (∀ a, a₁ < a → a₂ ≤ a) ∧ ∀ a < a₂, a ≤ a₁ :=
or_iff_not_imp_left.2 fun h =>
@@ -2327,12 +1367,6 @@ theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
le_of_not_gt fun ha₁ => h ⟨a, ha₁, ha₂⟩⟩
#align dense_or_discrete dense_or_discrete
-/- warning: eq_or_eq_or_eq_of_forall_not_lt_lt -> eq_or_eq_or_eq_of_forall_not_lt_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α], (forall {{x : α}} {{y : α}} {{z : α}}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y z) -> False) -> (forall (x : α) (y : α) (z : α), Or (Eq.{succ u1} α x y) (Or (Eq.{succ u1} α y z) (Eq.{succ u1} α x z)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α], (forall {{x : α}} {{y : α}} {{z : α}}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y z) -> False) -> (forall (x : α) (y : α) (z : α), Or (Eq.{succ u1} α x y) (Or (Eq.{succ u1} α y z) (Eq.{succ u1} α x z)))
-Case conversion may be inaccurate. Consider using '#align eq_or_eq_or_eq_of_forall_not_lt_lt eq_or_eq_or_eq_of_forall_not_lt_ltₓ'. -/
/-- If a linear order has no elements `x < y < z`, then it has at most two elements. -/
theorem eq_or_eq_or_eq_of_forall_not_lt_lt {α : Type _} [LinearOrder α]
(h : ∀ ⦃x y z : α⦄, x < y → y < z → False) (x y z : α) : x = y ∨ y = z ∨ x = z :=
@@ -2360,43 +1394,19 @@ instance : LinearOrder PUnit := by
first
|trivial|simp only [eq_iff_true_of_subsingleton, not_true, and_false_iff]|exact Or.inl trivial
-/- warning: punit.max_eq -> PUnit.max_eq is a dubious translation:
-lean 3 declaration is
- forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}), Eq.{succ u1} PUnit.{succ u1} (LinearOrder.max.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1} a b) PUnit.unit.{succ u1}
-but is expected to have type
- forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}) {star : PUnit.{succ u1}}, Eq.{succ u1} PUnit.{succ u1} (Max.max.{u1} PUnit.{succ u1} (LinearOrder.toMax.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1}) a b) star
-Case conversion may be inaccurate. Consider using '#align punit.max_eq PUnit.max_eqₓ'. -/
theorem max_eq : max a b = unit :=
rfl
#align punit.max_eq PUnit.max_eq
-/- warning: punit.min_eq -> PUnit.min_eq is a dubious translation:
-lean 3 declaration is
- forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}), Eq.{succ u1} PUnit.{succ u1} (LinearOrder.min.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1} a b) PUnit.unit.{succ u1}
-but is expected to have type
- forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}) {star : PUnit.{succ u1}}, Eq.{succ u1} PUnit.{succ u1} (Min.min.{u1} PUnit.{succ u1} (LinearOrder.toMin.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1}) a b) star
-Case conversion may be inaccurate. Consider using '#align punit.min_eq PUnit.min_eqₓ'. -/
theorem min_eq : min a b = unit :=
rfl
#align punit.min_eq PUnit.min_eq
-/- warning: punit.le -> PUnit.le is a dubious translation:
-lean 3 declaration is
- forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}), LE.le.{u1} PUnit.{succ u1} (Preorder.toHasLe.{u1} PUnit.{succ u1} (PartialOrder.toPreorder.{u1} PUnit.{succ u1} (LinearOrder.toPartialOrder.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1}))) a b
-but is expected to have type
- forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}), LE.le.{u1} PUnit.{succ u1} (Preorder.toLE.{u1} PUnit.{succ u1} (PartialOrder.toPreorder.{u1} PUnit.{succ u1} (LinearOrder.toPartialOrder.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1}))) a b
-Case conversion may be inaccurate. Consider using '#align punit.le PUnit.leₓ'. -/
@[simp]
protected theorem le : a ≤ b :=
trivial
#align punit.le PUnit.le
-/- warning: punit.not_lt -> PUnit.not_lt is a dubious translation:
-lean 3 declaration is
- forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}), Not (LT.lt.{u1} PUnit.{succ u1} (Preorder.toHasLt.{u1} PUnit.{succ u1} (PartialOrder.toPreorder.{u1} PUnit.{succ u1} (LinearOrder.toPartialOrder.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1}))) a b)
-but is expected to have type
- forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}), Not (LT.lt.{u1} PUnit.{succ u1} (Preorder.toLT.{u1} PUnit.{succ u1} (PartialOrder.toPreorder.{u1} PUnit.{succ u1} (LinearOrder.toPartialOrder.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1}))) a b)
-Case conversion may be inaccurate. Consider using '#align punit.not_lt PUnit.not_ltₓ'. -/
@[simp]
theorem not_lt : ¬a < b :=
not_false
@@ -2458,12 +1468,6 @@ def AsLinearOrder (α : Type u) :=
instance {α} [Inhabited α] : Inhabited (AsLinearOrder α) :=
⟨(default : α)⟩
-/- warning: as_linear_order.linear_order -> AsLinearOrder.linearOrder is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : IsTotal.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))], LinearOrder.{u1} (AsLinearOrder.{u1} α)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : IsTotal.{u1} α (fun (x._@.Mathlib.Order.Basic._hyg.17094 : α) (x._@.Mathlib.Order.Basic._hyg.17096 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Order.Basic._hyg.17094 x._@.Mathlib.Order.Basic._hyg.17096)], LinearOrder.{u1} (AsLinearOrder.{u1} α)
-Case conversion may be inaccurate. Consider using '#align as_linear_order.linear_order AsLinearOrder.linearOrderₓ'. -/
noncomputable instance AsLinearOrder.linearOrder {α} [PartialOrder α] [IsTotal α (· ≤ ·)] :
LinearOrder (AsLinearOrder α) :=
{ (_ : PartialOrder α) with
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -1319,9 +1319,7 @@ Case conversion may be inaccurate. Consider using '#align associative_of_commuta
`(a ○ b) ○ c ≤ a ○ (b ○ c)` for all `a`, `b`, `c`. -/
theorem associative_of_commutative_of_le {f : α → α → α} (comm : Commutative f)
(assoc : ∀ a b c, f (f a b) c ≤ f a (f b c)) : Associative f := fun a b c =>
- le_antisymm (assoc _ _ _) <| by
- rw [comm, comm b, comm _ c, comm a]
- exact assoc _ _ _
+ le_antisymm (assoc _ _ _) <| by rw [comm, comm b, comm _ c, comm a]; exact assoc _ _ _
#align associative_of_commutative_of_le associative_of_commutative_of_le
end PartialOrder
@@ -1335,8 +1333,7 @@ Case conversion may be inaccurate. Consider using '#align preorder.to_has_le_inj
@[ext]
theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.toHasLe α) :=
fun A B h => by
- cases A
- cases B
+ cases A; cases B
injection h with h_le
have : A_lt = B_lt := by
funext a b
@@ -1348,12 +1345,8 @@ theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.to
#print PartialOrder.toPreorder_injective /-
@[ext]
theorem PartialOrder.toPreorder_injective {α : Type _} :
- Function.Injective (@PartialOrder.toPreorder α) := fun A B h =>
- by
- cases A
- cases B
- injection h
- congr
+ Function.Injective (@PartialOrder.toPreorder α) := fun A B h => by cases A; cases B;
+ injection h; congr
#align partial_order.to_preorder_injective PartialOrder.toPreorder_injective
-/
@@ -1384,9 +1377,7 @@ theorem Preorder.ext {α} {A B : Preorder α}
(haveI := A
x ≤ y) ↔
x ≤ y) :
- A = B := by
- ext (x y)
- exact H x y
+ A = B := by ext (x y); exact H x y
#align preorder.ext Preorder.ext
/- warning: partial_order.ext -> PartialOrder.ext is a dubious translation:
@@ -1401,9 +1392,7 @@ theorem PartialOrder.ext {α} {A B : PartialOrder α}
(haveI := A
x ≤ y) ↔
x ≤ y) :
- A = B := by
- ext (x y)
- exact H x y
+ A = B := by ext (x y); exact H x y
#align partial_order.ext PartialOrder.ext
/- warning: linear_order.ext -> LinearOrder.ext is a dubious translation:
@@ -1418,9 +1407,7 @@ theorem LinearOrder.ext {α} {A B : LinearOrder α}
(haveI := A
x ≤ y) ↔
x ≤ y) :
- A = B := by
- ext (x y)
- exact H x y
+ A = B := by ext (x y); exact H x y
#align linear_order.ext LinearOrder.ext
#print Order.Preimage /-
@@ -1640,9 +1627,7 @@ lean 3 declaration is
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u2} ι], (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u2 u1} (forall (i : ι), π i) (Preorder.toLT.{max u2 u1} (forall (i : ι), π i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
Case conversion may be inaccurate. Consider using '#align lt_of_strong_lt lt_of_strongLTₓ'. -/
-theorem lt_of_strongLT [Nonempty ι] (h : a ≺ b) : a < b :=
- by
- inhabit ι
+theorem lt_of_strongLT [Nonempty ι] (h : a ≺ b) : a < b := by inhabit ι;
exact Pi.lt_def.2 ⟨le_of_strongLT h, default, h _⟩
#align lt_of_strong_lt lt_of_strongLT
@@ -2000,16 +1985,8 @@ def LinearOrder.lift {α β} [LinearOrder β] [Sup α] [Inf α] (f : α → β)
DecidableEq := fun x y => decidable_of_iff (f x = f y) inj.eq_iff
min := (· ⊓ ·)
max := (· ⊔ ·)
- min_def := by
- ext (x y)
- apply inj
- rw [hinf, min_def, minDefault, apply_ite f]
- rfl
- max_def := by
- ext (x y)
- apply inj
- rw [hsup, max_def, maxDefault, apply_ite f]
- rfl }
+ min_def := by ext (x y); apply inj; rw [hinf, min_def, minDefault, apply_ite f]; rfl
+ max_def := by ext (x y); apply inj; rw [hsup, max_def, maxDefault, apply_ite f]; rfl }
#align linear_order.lift LinearOrder.lift
#print LinearOrder.lift' /-
@@ -2265,10 +2242,7 @@ instance OrderDual.denselyOrdered (α : Type u) [LT α] [DenselyOrdered α] : De
#print denselyOrdered_orderDual /-
@[simp]
theorem denselyOrdered_orderDual [LT α] : DenselyOrdered αᵒᵈ ↔ DenselyOrdered α :=
- ⟨by
- convert@OrderDual.denselyOrdered αᵒᵈ _
- cases ‹LT α›
- rfl, @OrderDual.denselyOrdered α _⟩
+ ⟨by convert@OrderDual.denselyOrdered αᵒᵈ _; cases ‹LT α›; rfl, @OrderDual.denselyOrdered α _⟩
#align densely_ordered_order_dual denselyOrdered_orderDual
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -848,7 +848,7 @@ theorem eq_iff_not_lt_of_le {α} [PartialOrder α] {x y : α} : x ≤ y → y =
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.2116 : α) (x._@.Mathlib.Order.Basic._hyg.2118 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Order.Basic._hyg.2116 x._@.Mathlib.Order.Basic._hyg.2118)] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.2117 : α) (x._@.Mathlib.Order.Basic._hyg.2119 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Order.Basic._hyg.2117 x._@.Mathlib.Order.Basic._hyg.2119)] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
Case conversion may be inaccurate. Consider using '#align decidable.eq_iff_le_not_lt Decidable.eq_iff_le_not_ltₓ'. -/
-- See Note [decidable namespace]
protected theorem Decidable.eq_iff_le_not_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
@@ -2080,7 +2080,7 @@ instance partialOrder [PartialOrder α] (p : α → Prop) : PartialOrder (Subtyp
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1))] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (LE.le.{u1} (Subtype.{succ u1} α p) (Subtype.hasLe.{u1} α (Preorder.toHasLe.{u1} α _inst_1) p))
but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.13874 : α) (x._@.Mathlib.Order.Basic._hyg.13876 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) x._@.Mathlib.Order.Basic._hyg.13874 x._@.Mathlib.Order.Basic._hyg.13876)] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (fun (x._@.Mathlib.Order.Basic._hyg.13897 : Subtype.{succ u1} α p) (x._@.Mathlib.Order.Basic._hyg.13899 : Subtype.{succ u1} α p) => LE.le.{u1} (Subtype.{succ u1} α p) (Subtype.le.{u1} α (Preorder.toLE.{u1} α _inst_1) p) x._@.Mathlib.Order.Basic._hyg.13897 x._@.Mathlib.Order.Basic._hyg.13899)
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.13892 : α) (x._@.Mathlib.Order.Basic._hyg.13894 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) x._@.Mathlib.Order.Basic._hyg.13892 x._@.Mathlib.Order.Basic._hyg.13894)] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (fun (x._@.Mathlib.Order.Basic._hyg.13915 : Subtype.{succ u1} α p) (x._@.Mathlib.Order.Basic._hyg.13917 : Subtype.{succ u1} α p) => LE.le.{u1} (Subtype.{succ u1} α p) (Subtype.le.{u1} α (Preorder.toLE.{u1} α _inst_1) p) x._@.Mathlib.Order.Basic._hyg.13915 x._@.Mathlib.Order.Basic._hyg.13917)
Case conversion may be inaccurate. Consider using '#align subtype.decidable_le Subtype.decidableLEₓ'. -/
instance decidableLE [Preorder α] [h : @DecidableRel α (· ≤ ·)] {p : α → Prop} :
@DecidableRel (Subtype p) (· ≤ ·) := fun a b => h a b
@@ -2090,7 +2090,7 @@ instance decidableLE [Preorder α] [h : @DecidableRel α (· ≤ ·)] {p : α
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1))] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (LT.lt.{u1} (Subtype.{succ u1} α p) (Subtype.hasLt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) p))
but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.13938 : α) (x._@.Mathlib.Order.Basic._hyg.13940 : α) => LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x._@.Mathlib.Order.Basic._hyg.13938 x._@.Mathlib.Order.Basic._hyg.13940)] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (fun (x._@.Mathlib.Order.Basic._hyg.13961 : Subtype.{succ u1} α p) (x._@.Mathlib.Order.Basic._hyg.13963 : Subtype.{succ u1} α p) => LT.lt.{u1} (Subtype.{succ u1} α p) (Subtype.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) p) x._@.Mathlib.Order.Basic._hyg.13961 x._@.Mathlib.Order.Basic._hyg.13963)
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.13956 : α) (x._@.Mathlib.Order.Basic._hyg.13958 : α) => LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x._@.Mathlib.Order.Basic._hyg.13956 x._@.Mathlib.Order.Basic._hyg.13958)] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (fun (x._@.Mathlib.Order.Basic._hyg.13979 : Subtype.{succ u1} α p) (x._@.Mathlib.Order.Basic._hyg.13981 : Subtype.{succ u1} α p) => LT.lt.{u1} (Subtype.{succ u1} α p) (Subtype.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) p) x._@.Mathlib.Order.Basic._hyg.13979 x._@.Mathlib.Order.Basic._hyg.13981)
Case conversion may be inaccurate. Consider using '#align subtype.decidable_lt Subtype.decidableLTₓ'. -/
instance decidableLT [Preorder α] [h : @DecidableRel α (· < ·)] {p : α → Prop} :
@DecidableRel (Subtype p) (· < ·) := fun a b => h a b
@@ -2488,7 +2488,7 @@ instance {α} [Inhabited α] : Inhabited (AsLinearOrder α) :=
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : IsTotal.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))], LinearOrder.{u1} (AsLinearOrder.{u1} α)
but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : IsTotal.{u1} α (fun (x._@.Mathlib.Order.Basic._hyg.17064 : α) (x._@.Mathlib.Order.Basic._hyg.17066 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Order.Basic._hyg.17064 x._@.Mathlib.Order.Basic._hyg.17066)], LinearOrder.{u1} (AsLinearOrder.{u1} α)
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : IsTotal.{u1} α (fun (x._@.Mathlib.Order.Basic._hyg.17094 : α) (x._@.Mathlib.Order.Basic._hyg.17096 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Order.Basic._hyg.17094 x._@.Mathlib.Order.Basic._hyg.17096)], LinearOrder.{u1} (AsLinearOrder.{u1} α)
Case conversion may be inaccurate. Consider using '#align as_linear_order.linear_order AsLinearOrder.linearOrderₓ'. -/
noncomputable instance AsLinearOrder.linearOrder {α} [PartialOrder α] [IsTotal α (· ≤ ·)] :
LinearOrder (AsLinearOrder α) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -74,29 +74,45 @@ section Preorder
variable [Preorder α] {a b c : α}
-#print le_trans' /-
+/- warning: le_trans' -> le_trans' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align le_trans' le_trans'ₓ'. -/
theorem le_trans' : b ≤ c → a ≤ b → a ≤ c :=
flip le_trans
#align le_trans' le_trans'
--/
-#print lt_trans' /-
+/- warning: lt_trans' -> lt_trans' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align lt_trans' lt_trans'ₓ'. -/
theorem lt_trans' : b < c → a < b → a < c :=
flip lt_trans
#align lt_trans' lt_trans'
--/
-#print lt_of_le_of_lt' /-
+/- warning: lt_of_le_of_lt' -> lt_of_le_of_lt' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align lt_of_le_of_lt' lt_of_le_of_lt'ₓ'. -/
theorem lt_of_le_of_lt' : b ≤ c → a < b → a < c :=
flip lt_of_lt_of_le
#align lt_of_le_of_lt' lt_of_le_of_lt'
--/
-#print lt_of_lt_of_le' /-
+/- warning: lt_of_lt_of_le' -> lt_of_lt_of_le' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align lt_of_lt_of_le' lt_of_lt_of_le'ₓ'. -/
theorem lt_of_lt_of_le' : b < c → a ≤ b → a < c :=
flip lt_of_le_of_lt
#align lt_of_lt_of_le' lt_of_lt_of_le'
--/
end Preorder
@@ -104,28 +120,44 @@ section PartialOrder
variable [PartialOrder α] {a b : α}
-#print ge_antisymm /-
+/- warning: ge_antisymm -> ge_antisymm is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α b a)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α b a)
+Case conversion may be inaccurate. Consider using '#align ge_antisymm ge_antisymmₓ'. -/
theorem ge_antisymm : a ≤ b → b ≤ a → b = a :=
flip le_antisymm
#align ge_antisymm ge_antisymm
--/
-#print lt_of_le_of_ne' /-
+/- warning: lt_of_le_of_ne' -> lt_of_le_of_ne' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α b a) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α b a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+Case conversion may be inaccurate. Consider using '#align lt_of_le_of_ne' lt_of_le_of_ne'ₓ'. -/
theorem lt_of_le_of_ne' : a ≤ b → b ≠ a → a < b := fun h₁ h₂ => lt_of_le_of_ne h₁ h₂.symm
#align lt_of_le_of_ne' lt_of_le_of_ne'
--/
-#print Ne.lt_of_le /-
+/- warning: ne.lt_of_le -> Ne.lt_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+Case conversion may be inaccurate. Consider using '#align ne.lt_of_le Ne.lt_of_leₓ'. -/
theorem Ne.lt_of_le : a ≠ b → a ≤ b → a < b :=
flip lt_of_le_of_ne
#align ne.lt_of_le Ne.lt_of_le
--/
-#print Ne.lt_of_le' /-
+/- warning: ne.lt_of_le' -> Ne.lt_of_le' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α b a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α b a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+Case conversion may be inaccurate. Consider using '#align ne.lt_of_le' Ne.lt_of_le'ₓ'. -/
theorem Ne.lt_of_le' : b ≠ a → a ≤ b → a < b :=
flip lt_of_le_of_ne'
#align ne.lt_of_le' Ne.lt_of_le'
--/
end PartialOrder
@@ -133,61 +165,181 @@ attribute [simp] le_refl
attribute [ext] LE
+/- warning: has_le.le.trans -> LE.le.trans is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_le.le.trans LE.le.transₓ'. -/
alias le_trans ← LE.le.trans
#align has_le.le.trans LE.le.trans
+/- warning: has_le.le.trans' -> LE.le.trans' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_le.le.trans' LE.le.trans'ₓ'. -/
alias le_trans' ← LE.le.trans'
#align has_le.le.trans' LE.le.trans'
+/- warning: has_le.le.trans_lt -> LE.le.trans_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_le.le.trans_lt LE.le.trans_ltₓ'. -/
alias lt_of_le_of_lt ← LE.le.trans_lt
#align has_le.le.trans_lt LE.le.trans_lt
+/- warning: has_le.le.trans_lt' -> LE.le.trans_lt' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_le.le.trans_lt' LE.le.trans_lt'ₓ'. -/
alias lt_of_le_of_lt' ← LE.le.trans_lt'
#align has_le.le.trans_lt' LE.le.trans_lt'
+/- warning: has_le.le.antisymm -> LE.le.antisymm is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α a b)
+Case conversion may be inaccurate. Consider using '#align has_le.le.antisymm LE.le.antisymmₓ'. -/
alias le_antisymm ← LE.le.antisymm
#align has_le.le.antisymm LE.le.antisymm
+/- warning: has_le.le.antisymm' -> LE.le.antisymm' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α b a)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) -> (Eq.{succ u1} α b a)
+Case conversion may be inaccurate. Consider using '#align has_le.le.antisymm' LE.le.antisymm'ₓ'. -/
alias ge_antisymm ← LE.le.antisymm'
#align has_le.le.antisymm' LE.le.antisymm'
+/- warning: has_le.le.lt_of_ne -> LE.le.lt_of_ne is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+Case conversion may be inaccurate. Consider using '#align has_le.le.lt_of_ne LE.le.lt_of_neₓ'. -/
alias lt_of_le_of_ne ← LE.le.lt_of_ne
#align has_le.le.lt_of_ne LE.le.lt_of_ne
+/- warning: has_le.le.lt_of_ne' -> LE.le.lt_of_ne' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α b a) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Ne.{succ u1} α b a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+Case conversion may be inaccurate. Consider using '#align has_le.le.lt_of_ne' LE.le.lt_of_ne'ₓ'. -/
alias lt_of_le_of_ne' ← LE.le.lt_of_ne'
#align has_le.le.lt_of_ne' LE.le.lt_of_ne'
+/- warning: has_le.le.lt_of_not_le -> LE.le.lt_of_not_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b a)) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b a)) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)
+Case conversion may be inaccurate. Consider using '#align has_le.le.lt_of_not_le LE.le.lt_of_not_leₓ'. -/
alias lt_of_le_not_le ← LE.le.lt_of_not_le
#align has_le.le.lt_of_not_le LE.le.lt_of_not_le
+/- warning: has_le.le.lt_or_eq -> LE.le.lt_or_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α a b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.lt_or_eq LE.le.lt_or_eqₓ'. -/
alias lt_or_eq_of_le ← LE.le.lt_or_eq
#align has_le.le.lt_or_eq LE.le.lt_or_eq
+/- warning: has_le.le.lt_or_eq_dec -> LE.le.lt_or_eq_dec is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Init.Algebra.Order._hyg.2046 : α) (x._@.Mathlib.Init.Algebra.Order._hyg.2048 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Init.Algebra.Order._hyg.2046 x._@.Mathlib.Init.Algebra.Order._hyg.2048)] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α a b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.lt_or_eq_dec LE.le.lt_or_eq_decₓ'. -/
alias Decidable.lt_or_eq_of_le ← LE.le.lt_or_eq_dec
#align has_le.le.lt_or_eq_dec LE.le.lt_or_eq_dec
+/- warning: has_lt.lt.le -> LT.lt.le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.le LT.lt.leₓ'. -/
alias le_of_lt ← LT.lt.le
#align has_lt.lt.le LT.lt.le
+/- warning: has_lt.lt.trans -> LT.lt.trans is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans LT.lt.transₓ'. -/
alias lt_trans ← LT.lt.trans
#align has_lt.lt.trans LT.lt.trans
+/- warning: has_lt.lt.trans' -> LT.lt.trans' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans' LT.lt.trans'ₓ'. -/
alias lt_trans' ← LT.lt.trans'
#align has_lt.lt.trans' LT.lt.trans'
+/- warning: has_lt.lt.trans_le -> LT.lt.trans_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans_le LT.lt.trans_leₓ'. -/
alias lt_of_lt_of_le ← LT.lt.trans_le
#align has_lt.lt.trans_le LT.lt.trans_le
+/- warning: has_lt.lt.trans_le' -> LT.lt.trans_le' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans_le' LT.lt.trans_le'ₓ'. -/
alias lt_of_lt_of_le' ← LT.lt.trans_le'
#align has_lt.lt.trans_le' LT.lt.trans_le'
+/- warning: has_lt.lt.ne -> LT.lt.ne is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Ne.{succ u1} α a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Ne.{succ u1} α a b)
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.ne LT.lt.neₓ'. -/
alias ne_of_lt ← LT.lt.ne
#align has_lt.lt.ne LT.lt.ne
+/- warning: has_lt.lt.asymm -> LT.lt.asymm is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a))
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.asymm LT.lt.asymmₓ'. -/
+/- warning: has_lt.lt.not_lt -> LT.lt.not_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a))
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.not_lt LT.lt.not_ltₓ'. -/
alias lt_asymm ← LT.lt.asymm LT.lt.not_lt
#align has_lt.lt.asymm LT.lt.asymm
#align has_lt.lt.not_lt LT.lt.not_lt
+/- warning: eq.le -> Eq.le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
+Case conversion may be inaccurate. Consider using '#align eq.le Eq.leₓ'. -/
alias le_of_eq ← Eq.le
#align eq.le Eq.le
@@ -197,89 +349,177 @@ section
variable [Preorder α] {a b c : α}
-#print le_rfl /-
+/- warning: le_rfl -> le_rfl is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α}, LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a a
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α}, LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a a
+Case conversion may be inaccurate. Consider using '#align le_rfl le_rflₓ'. -/
/-- A version of `le_refl` where the argument is implicit -/
theorem le_rfl : a ≤ a :=
le_refl a
#align le_rfl le_rfl
--/
-#print lt_self_iff_false /-
+/- warning: lt_self_iff_false -> lt_self_iff_false is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (x : α), Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) x x) False
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (x : α), Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x x) False
+Case conversion may be inaccurate. Consider using '#align lt_self_iff_false lt_self_iff_falseₓ'. -/
@[simp]
theorem lt_self_iff_false (x : α) : x < x ↔ False :=
⟨lt_irrefl x, False.elim⟩
#align lt_self_iff_false lt_self_iff_false
--/
-#print le_of_le_of_eq /-
+/- warning: le_of_le_of_eq -> le_of_le_of_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align le_of_le_of_eq le_of_le_of_eqₓ'. -/
theorem le_of_le_of_eq (hab : a ≤ b) (hbc : b = c) : a ≤ c :=
hab.trans hbc.le
#align le_of_le_of_eq le_of_le_of_eq
--/
-#print le_of_eq_of_le /-
+/- warning: le_of_eq_of_le -> le_of_eq_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align le_of_eq_of_le le_of_eq_of_leₓ'. -/
theorem le_of_eq_of_le (hab : a = b) (hbc : b ≤ c) : a ≤ c :=
hab.le.trans hbc
#align le_of_eq_of_le le_of_eq_of_le
--/
-#print lt_of_lt_of_eq /-
+/- warning: lt_of_lt_of_eq -> lt_of_lt_of_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align lt_of_lt_of_eq lt_of_lt_of_eqₓ'. -/
theorem lt_of_lt_of_eq (hab : a < b) (hbc : b = c) : a < c :=
hab.trans_le hbc.le
#align lt_of_lt_of_eq lt_of_lt_of_eq
--/
-#print lt_of_eq_of_lt /-
+/- warning: lt_of_eq_of_lt -> lt_of_eq_of_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align lt_of_eq_of_lt lt_of_eq_of_ltₓ'. -/
theorem lt_of_eq_of_lt (hab : a = b) (hbc : b < c) : a < c :=
hab.le.trans_lt hbc
#align lt_of_eq_of_lt lt_of_eq_of_lt
--/
-#print le_of_le_of_eq' /-
+/- warning: le_of_le_of_eq' -> le_of_le_of_eq' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align le_of_le_of_eq' le_of_le_of_eq'ₓ'. -/
theorem le_of_le_of_eq' : b ≤ c → a = b → a ≤ c :=
flip le_of_eq_of_le
#align le_of_le_of_eq' le_of_le_of_eq'
--/
-#print le_of_eq_of_le' /-
+/- warning: le_of_eq_of_le' -> le_of_eq_of_le' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align le_of_eq_of_le' le_of_eq_of_le'ₓ'. -/
theorem le_of_eq_of_le' : b = c → a ≤ b → a ≤ c :=
flip le_of_le_of_eq
#align le_of_eq_of_le' le_of_eq_of_le'
--/
-#print lt_of_lt_of_eq' /-
+/- warning: lt_of_lt_of_eq' -> lt_of_lt_of_eq' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align lt_of_lt_of_eq' lt_of_lt_of_eq'ₓ'. -/
theorem lt_of_lt_of_eq' : b < c → a = b → a < c :=
flip lt_of_eq_of_lt
#align lt_of_lt_of_eq' lt_of_lt_of_eq'
--/
-#print lt_of_eq_of_lt' /-
+/- warning: lt_of_eq_of_lt' -> lt_of_eq_of_lt' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align lt_of_eq_of_lt' lt_of_eq_of_lt'ₓ'. -/
theorem lt_of_eq_of_lt' : b = c → a < b → a < c :=
flip lt_of_lt_of_eq
#align lt_of_eq_of_lt' lt_of_eq_of_lt'
--/
+/- warning: has_le.le.trans_eq -> LE.le.trans_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_le.le.trans_eq LE.le.trans_eqₓ'. -/
alias le_of_le_of_eq ← LE.le.trans_eq
#align has_le.le.trans_eq LE.le.trans_eq
+/- warning: has_le.le.trans_eq' -> LE.le.trans_eq' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_le.le.trans_eq' LE.le.trans_eq'ₓ'. -/
alias le_of_le_of_eq' ← LE.le.trans_eq'
#align has_le.le.trans_eq' LE.le.trans_eq'
+/- warning: has_lt.lt.trans_eq -> LT.lt.trans_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans_eq LT.lt.trans_eqₓ'. -/
alias lt_of_lt_of_eq ← LT.lt.trans_eq
#align has_lt.lt.trans_eq LT.lt.trans_eq
+/- warning: has_lt.lt.trans_eq' -> LT.lt.trans_eq' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.trans_eq' LT.lt.trans_eq'ₓ'. -/
alias lt_of_lt_of_eq' ← LT.lt.trans_eq'
#align has_lt.lt.trans_eq' LT.lt.trans_eq'
+/- warning: eq.trans_le -> Eq.trans_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align eq.trans_le Eq.trans_leₓ'. -/
alias le_of_eq_of_le ← Eq.trans_le
#align eq.trans_le Eq.trans_le
+/- warning: eq.trans_ge -> Eq.trans_ge is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align eq.trans_ge Eq.trans_geₓ'. -/
alias le_of_eq_of_le' ← Eq.trans_ge
#align eq.trans_ge Eq.trans_ge
+/- warning: eq.trans_lt -> Eq.trans_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align eq.trans_lt Eq.trans_ltₓ'. -/
alias lt_of_eq_of_lt ← Eq.trans_lt
#align eq.trans_lt Eq.trans_lt
+/- warning: eq.trans_gt -> Eq.trans_gt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a c)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α} {c : α}, (Eq.{succ u1} α b c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a c)
+Case conversion may be inaccurate. Consider using '#align eq.trans_gt Eq.trans_gtₓ'. -/
alias lt_of_eq_of_lt' ← Eq.trans_gt
#align eq.trans_gt Eq.trans_gt
@@ -289,24 +529,36 @@ namespace Eq
variable [Preorder α] {x y z : α}
-#print Eq.ge /-
+/- warning: eq.ge -> Eq.ge is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) y x)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) y x)
+Case conversion may be inaccurate. Consider using '#align eq.ge Eq.geₓ'. -/
/-- If `x = y` then `y ≤ x`. Note: this lemma uses `y ≤ x` instead of `x ≥ y`, because `le` is used
almost exclusively in mathlib. -/
protected theorem ge (h : x = y) : y ≤ x :=
h.symm.le
#align eq.ge Eq.ge
--/
-#print Eq.not_lt /-
+/- warning: eq.not_lt -> Eq.not_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) x y))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x y))
+Case conversion may be inaccurate. Consider using '#align eq.not_lt Eq.not_ltₓ'. -/
theorem not_lt (h : x = y) : ¬x < y := fun h' => h'.Ne h
#align eq.not_lt Eq.not_lt
--/
-#print Eq.not_gt /-
+/- warning: eq.not_gt -> Eq.not_gt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) y x))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (Eq.{succ u1} α x y) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) y x))
+Case conversion may be inaccurate. Consider using '#align eq.not_gt Eq.not_gtₓ'. -/
theorem not_gt (h : x = y) : ¬y < x :=
h.symm.not_lt
#align eq.not_gt Eq.not_gt
--/
end Eq
@@ -324,61 +576,97 @@ section PartialOrder
variable [PartialOrder α] {a b : α}
-#print LE.le.lt_iff_ne /-
+/- warning: has_le.le.lt_iff_ne -> LE.le.lt_iff_ne is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α a b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.lt_iff_ne LE.le.lt_iff_neₓ'. -/
theorem lt_iff_ne (h : a ≤ b) : a < b ↔ a ≠ b :=
⟨fun h => h.Ne, h.lt_of_ne⟩
#align has_le.le.lt_iff_ne LE.le.lt_iff_ne
--/
-#print LE.le.gt_iff_ne /-
+/- warning: has_le.le.gt_iff_ne -> LE.le.gt_iff_ne is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α b a))
+Case conversion may be inaccurate. Consider using '#align has_le.le.gt_iff_ne LE.le.gt_iff_neₓ'. -/
theorem gt_iff_ne (h : a ≤ b) : a < b ↔ b ≠ a :=
⟨fun h => h.Ne.symm, h.lt_of_ne'⟩
#align has_le.le.gt_iff_ne LE.le.gt_iff_ne
--/
-#print LE.le.not_lt_iff_eq /-
+/- warning: has_le.le.not_lt_iff_eq -> LE.le.not_lt_iff_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Eq.{succ u1} α a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Eq.{succ u1} α a b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.not_lt_iff_eq LE.le.not_lt_iff_eqₓ'. -/
theorem not_lt_iff_eq (h : a ≤ b) : ¬a < b ↔ a = b :=
h.lt_iff_ne.not_left
#align has_le.le.not_lt_iff_eq LE.le.not_lt_iff_eq
--/
-#print LE.le.not_gt_iff_eq /-
+/- warning: has_le.le.not_gt_iff_eq -> LE.le.not_gt_iff_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Eq.{succ u1} α b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Eq.{succ u1} α b a))
+Case conversion may be inaccurate. Consider using '#align has_le.le.not_gt_iff_eq LE.le.not_gt_iff_eqₓ'. -/
theorem not_gt_iff_eq (h : a ≤ b) : ¬a < b ↔ b = a :=
h.gt_iff_ne.not_left
#align has_le.le.not_gt_iff_eq LE.le.not_gt_iff_eq
--/
-#print LE.le.le_iff_eq /-
+/- warning: has_le.le.le_iff_eq -> LE.le.le_iff_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) (Eq.{succ u1} α b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) (Eq.{succ u1} α b a))
+Case conversion may be inaccurate. Consider using '#align has_le.le.le_iff_eq LE.le.le_iff_eqₓ'. -/
theorem le_iff_eq (h : a ≤ b) : b ≤ a ↔ b = a :=
⟨fun h' => h'.antisymm h, Eq.le⟩
#align has_le.le.le_iff_eq LE.le.le_iff_eq
--/
-#print LE.le.ge_iff_eq /-
+/- warning: has_le.le.ge_iff_eq -> LE.le.ge_iff_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) (Eq.{succ u1} α a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a) (Eq.{succ u1} α a b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.ge_iff_eq LE.le.ge_iff_eqₓ'. -/
theorem ge_iff_eq (h : a ≤ b) : b ≤ a ↔ a = b :=
⟨h.antisymm, Eq.ge⟩
#align has_le.le.ge_iff_eq LE.le.ge_iff_eq
--/
end PartialOrder
-#print LE.le.lt_or_le /-
+/- warning: has_le.le.lt_or_le -> LE.le.lt_or_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.lt_or_le LE.le.lt_or_leₓ'. -/
theorem lt_or_le [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a < c ∨ c ≤ b :=
(lt_or_ge a c).imp id fun hc => le_trans hc h
#align has_le.le.lt_or_le LE.le.lt_or_le
--/
-#print LE.le.le_or_lt /-
+/- warning: has_le.le.le_or_lt -> LE.le.le_or_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.le_or_lt LE.le.le_or_ltₓ'. -/
theorem le_or_lt [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a ≤ c ∨ c < b :=
(le_or_gt a c).imp id fun hc => lt_of_lt_of_le hc h
#align has_le.le.le_or_lt LE.le.le_or_lt
--/
-#print LE.le.le_or_le /-
+/- warning: has_le.le.le_or_le -> LE.le.le_or_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (forall (c : α), Or (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.le_or_le LE.le.le_or_leₓ'. -/
theorem le_or_le [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a ≤ c ∨ c ≤ b :=
(h.le_or_lt c).elim Or.inl fun h => Or.inr <| le_of_lt h
#align has_le.le.le_or_le LE.le.le_or_le
--/
end LE.le
@@ -392,23 +680,35 @@ protected theorem gt [LT α] {x y : α} (h : x < y) : y > x :=
#align has_lt.lt.gt LT.lt.gt
-/
-#print LT.lt.false /-
+/- warning: has_lt.lt.false -> LT.lt.false is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) x x) -> False
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x x) -> False
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.false LT.lt.falseₓ'. -/
protected theorem false [Preorder α] {x : α} : x < x → False :=
lt_irrefl x
#align has_lt.lt.false LT.lt.false
--/
-#print LT.lt.ne' /-
+/- warning: has_lt.lt.ne' -> LT.lt.ne' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) x y) -> (Ne.{succ u1} α y x)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {x : α} {y : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x y) -> (Ne.{succ u1} α y x)
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.ne' LT.lt.ne'ₓ'. -/
theorem ne' [Preorder α] {x y : α} (h : x < y) : y ≠ x :=
h.Ne.symm
#align has_lt.lt.ne' LT.lt.ne'
--/
-#print LT.lt.lt_or_lt /-
+/- warning: has_lt.lt.lt_or_lt -> LT.lt.lt_or_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (forall (z : α), Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x z) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) z y))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (forall (z : α), Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x z) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) z y))
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.lt_or_lt LT.lt.lt_or_ltₓ'. -/
theorem lt_or_lt [LinearOrder α] {x y : α} (h : x < y) (z : α) : x < z ∨ z < y :=
(lt_or_ge z y).elim Or.inr fun hz => Or.inl <| h.trans_le hz
#align has_lt.lt.lt_or_lt LT.lt.lt_or_lt
--/
end LT.lt
@@ -428,13 +728,17 @@ protected theorem GT.gt.lt [LT α] {x y : α} (h : x > y) : y < x :=
#align gt.lt GT.gt.lt
-/
-#print ge_of_eq /-
+/- warning: ge_of_eq -> ge_of_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Eq.{succ u1} α a b) -> (GE.ge.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Eq.{succ u1} α a b) -> (GE.ge.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
+Case conversion may be inaccurate. Consider using '#align ge_of_eq ge_of_eqₓ'. -/
-- see Note [nolint_ge]
@[nolint ge_or_gt]
theorem ge_of_eq [Preorder α] {a b : α} (h : a = b) : a ≥ b :=
h.ge
#align ge_of_eq ge_of_eq
--/
#print ge_iff_le /-
-- see Note [nolint_ge]
@@ -452,151 +756,271 @@ theorem gt_iff_lt [LT α] {a b : α} : a > b ↔ b < a :=
#align gt_iff_lt gt_iff_lt
-/
-#print not_le_of_lt /-
+/- warning: not_le_of_lt -> not_le_of_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b a))
+Case conversion may be inaccurate. Consider using '#align not_le_of_lt not_le_of_ltₓ'. -/
theorem not_le_of_lt [Preorder α] {a b : α} (h : a < b) : ¬b ≤ a :=
(le_not_le_of_lt h).right
#align not_le_of_lt not_le_of_lt
--/
+/- warning: has_lt.lt.not_le -> LT.lt.not_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b) -> (Not (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b a))
+Case conversion may be inaccurate. Consider using '#align has_lt.lt.not_le LT.lt.not_leₓ'. -/
alias not_le_of_lt ← LT.lt.not_le
#align has_lt.lt.not_le LT.lt.not_le
-#print not_lt_of_le /-
+/- warning: not_lt_of_le -> not_lt_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a))
+Case conversion may be inaccurate. Consider using '#align not_lt_of_le not_lt_of_leₓ'. -/
theorem not_lt_of_le [Preorder α] {a b : α} (h : a ≤ b) : ¬b < a := fun hba => hba.not_le h
#align not_lt_of_le not_lt_of_le
--/
+/- warning: has_le.le.not_lt -> LE.le.not_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a))
+Case conversion may be inaccurate. Consider using '#align has_le.le.not_lt LE.le.not_ltₓ'. -/
alias not_lt_of_le ← LE.le.not_lt
#align has_le.le.not_lt LE.le.not_lt
-#print ne_of_not_le /-
+/- warning: ne_of_not_le -> ne_of_not_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)) -> (Ne.{succ u1} α a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (Not (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)) -> (Ne.{succ u1} α a b)
+Case conversion may be inaccurate. Consider using '#align ne_of_not_le ne_of_not_leₓ'. -/
theorem ne_of_not_le [Preorder α] {a b : α} (h : ¬a ≤ b) : a ≠ b := fun hab => h (le_of_eq hab)
#align ne_of_not_le ne_of_not_le
--/
-#print Decidable.le_iff_eq_or_lt /-
+/- warning: decidable.le_iff_eq_or_lt -> Decidable.le_iff_eq_or_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))] {a : α} {b : α}, Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.1865 : α) (x._@.Mathlib.Order.Basic._hyg.1867 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Order.Basic._hyg.1865 x._@.Mathlib.Order.Basic._hyg.1867)] {a : α} {b : α}, Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+Case conversion may be inaccurate. Consider using '#align decidable.le_iff_eq_or_lt Decidable.le_iff_eq_or_ltₓ'. -/
-- See Note [decidable namespace]
protected theorem Decidable.le_iff_eq_or_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
a ≤ b ↔ a = b ∨ a < b :=
Decidable.le_iff_lt_or_eq.trans or_comm
#align decidable.le_iff_eq_or_lt Decidable.le_iff_eq_or_lt
--/
-#print le_iff_eq_or_lt /-
+/- warning: le_iff_eq_or_lt -> le_iff_eq_or_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+Case conversion may be inaccurate. Consider using '#align le_iff_eq_or_lt le_iff_eq_or_ltₓ'. -/
theorem le_iff_eq_or_lt [PartialOrder α] {a b : α} : a ≤ b ↔ a = b ∨ a < b :=
le_iff_lt_or_eq.trans or_comm
#align le_iff_eq_or_lt le_iff_eq_or_lt
--/
-#print lt_iff_le_and_ne /-
+/- warning: lt_iff_le_and_ne -> lt_iff_le_and_ne is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (And (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Ne.{succ u1} α a b))
+Case conversion may be inaccurate. Consider using '#align lt_iff_le_and_ne lt_iff_le_and_neₓ'. -/
theorem lt_iff_le_and_ne [PartialOrder α] {a b : α} : a < b ↔ a ≤ b ∧ a ≠ b :=
⟨fun h => ⟨le_of_lt h, ne_of_lt h⟩, fun ⟨h1, h2⟩ => h1.lt_of_ne h2⟩
#align lt_iff_le_and_ne lt_iff_le_and_ne
--/
-#print eq_iff_not_lt_of_le /-
+/- warning: eq_iff_not_lt_of_le -> eq_iff_not_lt_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {x : α} {y : α}, Iff ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x y) -> (Eq.{succ u1} α y x)) (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x y))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {x : α} {y : α}, Iff ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x y) -> (Eq.{succ u1} α y x)) (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x y))
+Case conversion may be inaccurate. Consider using '#align eq_iff_not_lt_of_le eq_iff_not_lt_of_leₓ'. -/
theorem eq_iff_not_lt_of_le {α} [PartialOrder α] {x y : α} : x ≤ y → y = x ↔ ¬x < y := by
rw [lt_iff_le_and_ne, not_and, Classical.not_not, eq_comm]
#align eq_iff_not_lt_of_le eq_iff_not_lt_of_le
--/
-#print Decidable.eq_iff_le_not_lt /-
+/- warning: decidable.eq_iff_le_not_lt -> Decidable.eq_iff_le_not_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.2116 : α) (x._@.Mathlib.Order.Basic._hyg.2118 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Order.Basic._hyg.2116 x._@.Mathlib.Order.Basic._hyg.2118)] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
+Case conversion may be inaccurate. Consider using '#align decidable.eq_iff_le_not_lt Decidable.eq_iff_le_not_ltₓ'. -/
-- See Note [decidable namespace]
protected theorem Decidable.eq_iff_le_not_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
a = b ↔ a ≤ b ∧ ¬a < b :=
⟨fun h => ⟨h.le, h ▸ lt_irrefl _⟩, fun ⟨h₁, h₂⟩ =>
h₁.antisymm <| Decidable.by_contradiction fun h₃ => h₂ (h₁.lt_of_not_le h₃)⟩
#align decidable.eq_iff_le_not_lt Decidable.eq_iff_le_not_lt
--/
-#print eq_iff_le_not_lt /-
+/- warning: eq_iff_le_not_lt -> eq_iff_le_not_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (Eq.{succ u1} α a b) (And (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)))
+Case conversion may be inaccurate. Consider using '#align eq_iff_le_not_lt eq_iff_le_not_ltₓ'. -/
theorem eq_iff_le_not_lt [PartialOrder α] {a b : α} : a = b ↔ a ≤ b ∧ ¬a < b :=
haveI := Classical.dec
Decidable.eq_iff_le_not_lt
#align eq_iff_le_not_lt eq_iff_le_not_lt
--/
-#print eq_or_lt_of_le /-
+/- warning: eq_or_lt_of_le -> eq_or_lt_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+Case conversion may be inaccurate. Consider using '#align eq_or_lt_of_le eq_or_lt_of_leₓ'. -/
theorem eq_or_lt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : a = b ∨ a < b :=
h.lt_or_eq.symm
#align eq_or_lt_of_le eq_or_lt_of_le
--/
-#print eq_or_gt_of_le /-
+/- warning: eq_or_gt_of_le -> eq_or_gt_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α b a) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α b a) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+Case conversion may be inaccurate. Consider using '#align eq_or_gt_of_le eq_or_gt_of_leₓ'. -/
theorem eq_or_gt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : b = a ∨ a < b :=
h.lt_or_eq.symm.imp Eq.symm id
#align eq_or_gt_of_le eq_or_gt_of_le
--/
-#print gt_or_eq_of_le /-
+/- warning: gt_or_eq_of_le -> gt_or_eq_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α b a))
+Case conversion may be inaccurate. Consider using '#align gt_or_eq_of_le gt_or_eq_of_leₓ'. -/
theorem gt_or_eq_of_le [PartialOrder α] {a b : α} (hab : a ≤ b) : a < b ∨ b = a :=
(eq_or_gt_of_le hab).symm
#align gt_or_eq_of_le gt_or_eq_of_le
--/
+/- warning: has_le.le.eq_or_lt_dec -> LE.le.eq_or_lt_dec is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Init.Algebra.Order._hyg.2123 : α) (x._@.Mathlib.Init.Algebra.Order._hyg.2125 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Init.Algebra.Order._hyg.2123 x._@.Mathlib.Init.Algebra.Order._hyg.2125)] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.eq_or_lt_dec LE.le.eq_or_lt_decₓ'. -/
alias Decidable.eq_or_lt_of_le ← LE.le.eq_or_lt_dec
#align has_le.le.eq_or_lt_dec LE.le.eq_or_lt_dec
+/- warning: has_le.le.eq_or_lt -> LE.le.eq_or_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.eq_or_lt LE.le.eq_or_ltₓ'. -/
alias eq_or_lt_of_le ← LE.le.eq_or_lt
#align has_le.le.eq_or_lt LE.le.eq_or_lt
+/- warning: has_le.le.eq_or_gt -> LE.le.eq_or_gt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α b a) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (Eq.{succ u1} α b a) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+Case conversion may be inaccurate. Consider using '#align has_le.le.eq_or_gt LE.le.eq_or_gtₓ'. -/
alias eq_or_gt_of_le ← LE.le.eq_or_gt
#align has_le.le.eq_or_gt LE.le.eq_or_gt
+/- warning: has_le.le.gt_or_eq -> LE.le.gt_or_eq is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (Eq.{succ u1} α b a))
+Case conversion may be inaccurate. Consider using '#align has_le.le.gt_or_eq LE.le.gt_or_eqₓ'. -/
alias gt_or_eq_of_le ← LE.le.gt_or_eq
#align has_le.le.gt_or_eq LE.le.gt_or_eq
attribute [nolint decidable_classical] LE.le.eq_or_lt_dec
-#print eq_of_le_of_not_lt /-
+/- warning: eq_of_le_of_not_lt -> eq_of_le_of_not_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α a b)
+Case conversion may be inaccurate. Consider using '#align eq_of_le_of_not_lt eq_of_le_of_not_ltₓ'. -/
theorem eq_of_le_of_not_lt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba : ¬a < b) : a = b :=
hab.eq_or_lt.resolve_right hba
#align eq_of_le_of_not_lt eq_of_le_of_not_lt
--/
-#print eq_of_ge_of_not_gt /-
+/- warning: eq_of_ge_of_not_gt -> eq_of_ge_of_not_gt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α b a)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α b a)
+Case conversion may be inaccurate. Consider using '#align eq_of_ge_of_not_gt eq_of_ge_of_not_gtₓ'. -/
theorem eq_of_ge_of_not_gt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba : ¬a < b) : b = a :=
(hab.eq_or_lt.resolve_right hba).symm
#align eq_of_ge_of_not_gt eq_of_ge_of_not_gt
--/
+/- warning: has_le.le.eq_of_not_lt -> LE.le.eq_of_not_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α a b)
+Case conversion may be inaccurate. Consider using '#align has_le.le.eq_of_not_lt LE.le.eq_of_not_ltₓ'. -/
alias eq_of_le_of_not_lt ← LE.le.eq_of_not_lt
#align has_le.le.eq_of_not_lt LE.le.eq_of_not_lt
+/- warning: has_le.le.eq_of_not_gt -> LE.le.eq_of_not_gt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α b a)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) -> (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) -> (Eq.{succ u1} α b a)
+Case conversion may be inaccurate. Consider using '#align has_le.le.eq_of_not_gt LE.le.eq_of_not_gtₓ'. -/
alias eq_of_ge_of_not_gt ← LE.le.eq_of_not_gt
#align has_le.le.eq_of_not_gt LE.le.eq_of_not_gt
-#print Ne.le_iff_lt /-
+/- warning: ne.le_iff_lt -> Ne.le_iff_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b))
+Case conversion may be inaccurate. Consider using '#align ne.le_iff_lt Ne.le_iff_ltₓ'. -/
theorem Ne.le_iff_lt [PartialOrder α] {a b : α} (h : a ≠ b) : a ≤ b ↔ a < b :=
⟨fun h' => lt_of_le_of_ne h' h, fun h => h.le⟩
#align ne.le_iff_lt Ne.le_iff_lt
--/
-#print Ne.not_le_or_not_le /-
+/- warning: ne.not_le_or_not_le -> Ne.not_le_or_not_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (Or (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (Ne.{succ u1} α a b) -> (Or (Not (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (Not (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b a)))
+Case conversion may be inaccurate. Consider using '#align ne.not_le_or_not_le Ne.not_le_or_not_leₓ'. -/
theorem Ne.not_le_or_not_le [PartialOrder α] {a b : α} (h : a ≠ b) : ¬a ≤ b ∨ ¬b ≤ a :=
not_and_or.1 <| le_antisymm_iff.Not.1 h
#align ne.not_le_or_not_le Ne.not_le_or_not_le
--/
-#print Decidable.ne_iff_lt_iff_le /-
+/- warning: decidable.ne_iff_lt_iff_le -> Decidable.ne_iff_lt_iff_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableEq.{succ u1} α] {a : α} {b : α}, Iff (Iff (Ne.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : DecidableEq.{succ u1} α] {a : α} {b : α}, Iff (Iff (Ne.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+Case conversion may be inaccurate. Consider using '#align decidable.ne_iff_lt_iff_le Decidable.ne_iff_lt_iff_leₓ'. -/
-- See Note [decidable namespace]
protected theorem Decidable.ne_iff_lt_iff_le [PartialOrder α] [DecidableEq α] {a b : α} :
(a ≠ b ↔ a < b) ↔ a ≤ b :=
⟨fun h => Decidable.byCases le_of_eq (le_of_lt ∘ h.mp), fun h => ⟨lt_of_le_of_ne h, ne_of_lt⟩⟩
#align decidable.ne_iff_lt_iff_le Decidable.ne_iff_lt_iff_le
--/
-#print ne_iff_lt_iff_le /-
+/- warning: ne_iff_lt_iff_le -> ne_iff_lt_iff_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (Iff (Ne.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, Iff (Iff (Ne.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a b)
+Case conversion may be inaccurate. Consider using '#align ne_iff_lt_iff_le ne_iff_lt_iff_leₓ'. -/
@[simp]
theorem ne_iff_lt_iff_le [PartialOrder α] {a b : α} : (a ≠ b ↔ a < b) ↔ a ≤ b :=
haveI := Classical.dec
Decidable.ne_iff_lt_iff_le
#align ne_iff_lt_iff_le ne_iff_lt_iff_le
--/
/- warning: min_def' -> min_def' is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Eq.{succ u1} α (LinearOrder.min.{u1} α _inst_1 a b) (ite.{succ u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LE.le.decidable.{u1} α _inst_1 b a) b a)
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Eq.{succ u1} α (LinearOrder.min.{u1} α _inst_1 a b) (ite.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LE.le.decidable.{u1} α _inst_1 b a) b a)
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Eq.{succ u1} α (Min.min.{u1} α (LinearOrder.toMin.{u1} α _inst_1) a b) (ite.{succ u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (instDecidableLeToLEToPreorderToPartialOrder.{u1} α _inst_1 b a) b a)
Case conversion may be inaccurate. Consider using '#align min_def' min_def'ₓ'. -/
@@ -612,7 +1036,7 @@ theorem min_def' [LinearOrder α] (a b : α) : min a b = if b ≤ a then b else
/- warning: max_def' -> max_def' is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Eq.{succ u1} α (LinearOrder.max.{u1} α _inst_1 a b) (ite.{succ u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LE.le.decidable.{u1} α _inst_1 b a) a b)
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Eq.{succ u1} α (LinearOrder.max.{u1} α _inst_1 a b) (ite.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LE.le.decidable.{u1} α _inst_1 b a) a b)
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Eq.{succ u1} α (Max.max.{u1} α (LinearOrder.toMax.{u1} α _inst_1) a b) (ite.{succ u1} α (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (instDecidableLeToLEToPreorderToPartialOrder.{u1} α _inst_1 b a) a b)
Case conversion may be inaccurate. Consider using '#align max_def' max_def'ₓ'. -/
@@ -627,49 +1051,73 @@ theorem max_def' [LinearOrder α] (a b : α) : max a b = if b ≤ a then a else
· rw [if_neg (not_le.mpr GT.gt), if_pos gt.le]
#align max_def' max_def'
-#print lt_of_not_le /-
+/- warning: lt_of_not_le -> lt_of_not_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (Not (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
+Case conversion may be inaccurate. Consider using '#align lt_of_not_le lt_of_not_leₓ'. -/
theorem lt_of_not_le [LinearOrder α] {a b : α} (h : ¬b ≤ a) : a < b :=
((le_total _ _).resolve_right h).lt_of_not_le h
#align lt_of_not_le lt_of_not_le
--/
-#print lt_iff_not_le /-
+/- warning: lt_iff_not_le -> lt_iff_not_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (Not (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (Not (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x))
+Case conversion may be inaccurate. Consider using '#align lt_iff_not_le lt_iff_not_leₓ'. -/
theorem lt_iff_not_le [LinearOrder α] {x y : α} : x < y ↔ ¬y ≤ x :=
⟨not_le_of_lt, lt_of_not_le⟩
#align lt_iff_not_le lt_iff_not_le
--/
-#print Ne.lt_or_lt /-
+/- warning: ne.lt_or_lt -> Ne.lt_or_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, (Ne.{succ u1} α x y) -> (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, (Ne.{succ u1} α x y) -> (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x))
+Case conversion may be inaccurate. Consider using '#align ne.lt_or_lt Ne.lt_or_ltₓ'. -/
theorem Ne.lt_or_lt [LinearOrder α] {x y : α} (h : x ≠ y) : x < y ∨ y < x :=
lt_or_gt_of_ne h
#align ne.lt_or_lt Ne.lt_or_lt
--/
-#print lt_or_lt_iff_ne /-
+/- warning: lt_or_lt_iff_ne -> lt_or_lt_iff_ne is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, Iff (Or (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x)) (Ne.{succ u1} α x y)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {x : α} {y : α}, Iff (Or (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x)) (Ne.{succ u1} α x y)
+Case conversion may be inaccurate. Consider using '#align lt_or_lt_iff_ne lt_or_lt_iff_neₓ'. -/
/-- A version of `ne_iff_lt_or_gt` with LHS and RHS reversed. -/
@[simp]
theorem lt_or_lt_iff_ne [LinearOrder α] {x y : α} : x < y ∨ y < x ↔ x ≠ y :=
ne_iff_lt_or_gt.symm
#align lt_or_lt_iff_ne lt_or_lt_iff_ne
--/
-#print not_lt_iff_eq_or_lt /-
+/- warning: not_lt_iff_eq_or_lt -> not_lt_iff_eq_or_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (Not (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (Not (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)) (Or (Eq.{succ u1} α a b) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a))
+Case conversion may be inaccurate. Consider using '#align not_lt_iff_eq_or_lt not_lt_iff_eq_or_ltₓ'. -/
theorem not_lt_iff_eq_or_lt [LinearOrder α] {a b : α} : ¬a < b ↔ a = b ∨ b < a :=
not_lt.trans <| Decidable.le_iff_eq_or_lt.trans <| or_congr eq_comm Iff.rfl
#align not_lt_iff_eq_or_lt not_lt_iff_eq_or_lt
--/
-#print exists_ge_of_linear /-
+/- warning: exists_ge_of_linear -> exists_ge_of_linear is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Exists.{succ u1} α (fun (c : α) => And (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a : α) (b : α), Exists.{succ u1} α (fun (c : α) => And (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c))
+Case conversion may be inaccurate. Consider using '#align exists_ge_of_linear exists_ge_of_linearₓ'. -/
theorem exists_ge_of_linear [LinearOrder α] (a b : α) : ∃ c, a ≤ c ∧ b ≤ c :=
match le_total a b with
| Or.inl h => ⟨_, h, le_rfl⟩
| Or.inr h => ⟨_, le_rfl, h⟩
#align exists_ge_of_linear exists_ge_of_linear
--/
/- warning: lt_imp_lt_of_le_imp_le -> lt_imp_lt_of_le_imp_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b : α} {c : β} {d : β}, ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) c d)) -> (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) d c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b : α} {c : β} {d : β}, ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) c d)) -> (LT.lt.{u2} β (Preorder.toHasLt.{u2} β _inst_2) d c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
but is expected to have type
forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrder.{u2} α] [_inst_2 : Preorder.{u1} β] {a : α} {b : α} {c : β} {d : β}, ((LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) a b) -> (LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) c d)) -> (LT.lt.{u1} β (Preorder.toLT.{u1} β _inst_2) d c) -> (LT.lt.{u2} α (Preorder.toLT.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) b a)
Case conversion may be inaccurate. Consider using '#align lt_imp_lt_of_le_imp_le lt_imp_lt_of_le_imp_leₓ'. -/
@@ -680,7 +1128,7 @@ theorem lt_imp_lt_of_le_imp_le {β} [LinearOrder α] [Preorder β] {a b : α} {c
/- warning: le_imp_le_iff_lt_imp_lt -> le_imp_le_iff_lt_imp_lt is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : LinearOrder.{u2} β] {a : α} {b : α} {c : β} {d : β}, Iff ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (LE.le.{u2} β (Preorder.toLE.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) c d)) ((LT.lt.{u2} β (Preorder.toLT.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) d c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : LinearOrder.{u2} β] {a : α} {b : α} {c : β} {d : β}, Iff ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) -> (LE.le.{u2} β (Preorder.toHasLe.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) c d)) ((LT.lt.{u2} β (Preorder.toHasLt.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) d c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a))
but is expected to have type
forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrder.{u2} α] [_inst_2 : LinearOrder.{u1} β] {a : α} {b : α} {c : β} {d : β}, Iff ((LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) a b) -> (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) c d)) ((LT.lt.{u1} β (Preorder.toLT.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) d c) -> (LT.lt.{u2} α (Preorder.toLT.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) b a))
Case conversion may be inaccurate. Consider using '#align le_imp_le_iff_lt_imp_lt le_imp_le_iff_lt_imp_ltₓ'. -/
@@ -691,7 +1139,7 @@ theorem le_imp_le_iff_lt_imp_lt {β} [LinearOrder α] [LinearOrder β] {a b : α
/- warning: lt_iff_lt_of_le_iff_le' -> lt_iff_lt_of_le_iff_le' is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b : α} {c : β} {d : β}, (Iff (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) c d)) -> (Iff (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b a) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) d c)) -> (Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a) (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) d c))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b : α} {c : β} {d : β}, (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) c d)) -> (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b a) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) d c)) -> (Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β _inst_2) d c))
but is expected to have type
forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Preorder.{u2} α] [_inst_2 : Preorder.{u1} β] {a : α} {b : α} {c : β} {d : β}, (Iff (LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) a b) (LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) c d)) -> (Iff (LE.le.{u2} α (Preorder.toLE.{u2} α _inst_1) b a) (LE.le.{u1} β (Preorder.toLE.{u1} β _inst_2) d c)) -> (Iff (LT.lt.{u2} α (Preorder.toLT.{u2} α _inst_1) b a) (LT.lt.{u1} β (Preorder.toLT.{u1} β _inst_2) d c))
Case conversion may be inaccurate. Consider using '#align lt_iff_lt_of_le_iff_le' lt_iff_lt_of_le_iff_le'ₓ'. -/
@@ -702,7 +1150,7 @@ theorem lt_iff_lt_of_le_iff_le' {β} [Preorder α] [Preorder β] {a b : α} {c d
/- warning: lt_iff_lt_of_le_iff_le -> lt_iff_lt_of_le_iff_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : LinearOrder.{u2} β] {a : α} {b : α} {c : β} {d : β}, (Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) (LE.le.{u2} β (Preorder.toLE.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) c d)) -> (Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LT.lt.{u2} β (Preorder.toLT.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) d c))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : LinearOrder.{u2} β] {a : α} {b : α} {c : β} {d : β}, (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) (LE.le.{u2} β (Preorder.toHasLe.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) c d)) -> (Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) d c))
but is expected to have type
forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrder.{u2} α] [_inst_2 : LinearOrder.{u1} β] {a : α} {b : α} {c : β} {d : β}, (Iff (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) a b) (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) c d)) -> (Iff (LT.lt.{u2} α (Preorder.toLT.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) b a) (LT.lt.{u1} β (Preorder.toLT.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) d c))
Case conversion may be inaccurate. Consider using '#align lt_iff_lt_of_le_iff_le lt_iff_lt_of_le_iff_leₓ'. -/
@@ -713,7 +1161,7 @@ theorem lt_iff_lt_of_le_iff_le {β} [LinearOrder α] [LinearOrder β] {a b : α}
/- warning: le_iff_le_iff_lt_iff_lt -> le_iff_le_iff_lt_iff_lt is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : LinearOrder.{u2} β] {a : α} {b : α} {c : β} {d : β}, Iff (Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) (LE.le.{u2} β (Preorder.toLE.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) c d)) (Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LT.lt.{u2} β (Preorder.toLT.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) d c))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : LinearOrder.{u2} β] {a : α} {b : α} {c : β} {d : β}, Iff (Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b) (LE.le.{u2} β (Preorder.toHasLe.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) c d)) (Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β (PartialOrder.toPreorder.{u2} β (LinearOrder.toPartialOrder.{u2} β _inst_2))) d c))
but is expected to have type
forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LinearOrder.{u2} α] [_inst_2 : LinearOrder.{u1} β] {a : α} {b : α} {c : β} {d : β}, Iff (Iff (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) a b) (LE.le.{u1} β (Preorder.toLE.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) c d)) (Iff (LT.lt.{u2} α (Preorder.toLT.{u2} α (PartialOrder.toPreorder.{u2} α (LinearOrder.toPartialOrder.{u2} α _inst_1))) b a) (LT.lt.{u1} β (Preorder.toLT.{u1} β (PartialOrder.toPreorder.{u1} β (LinearOrder.toPartialOrder.{u1} β _inst_2))) d c))
Case conversion may be inaccurate. Consider using '#align le_iff_le_iff_lt_iff_lt le_iff_le_iff_lt_iff_ltₓ'. -/
@@ -722,94 +1170,151 @@ theorem le_iff_le_iff_lt_iff_lt {β} [LinearOrder α] [LinearOrder β] {a b : α
⟨lt_iff_lt_of_le_iff_le, fun H => not_lt.symm.trans <| (not_congr H).trans <| not_lt⟩
#align le_iff_le_iff_lt_iff_lt le_iff_le_iff_lt_iff_lt
-#print eq_of_forall_le_iff /-
+/- warning: eq_of_forall_le_iff -> eq_of_forall_le_iff is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) c a) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) c b)) -> (Eq.{succ u1} α a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) c a) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) c b)) -> (Eq.{succ u1} α a b)
+Case conversion may be inaccurate. Consider using '#align eq_of_forall_le_iff eq_of_forall_le_iffₓ'. -/
theorem eq_of_forall_le_iff [PartialOrder α] {a b : α} (H : ∀ c, c ≤ a ↔ c ≤ b) : a = b :=
((H _).1 le_rfl).antisymm ((H _).2 le_rfl)
#align eq_of_forall_le_iff eq_of_forall_le_iff
--/
-#print le_of_forall_le /-
+/- warning: le_of_forall_le -> le_of_forall_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (forall (c : α), (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) c a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) c b)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (forall (c : α), (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) c a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) c b)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
+Case conversion may be inaccurate. Consider using '#align le_of_forall_le le_of_forall_leₓ'. -/
theorem le_of_forall_le [Preorder α] {a b : α} (H : ∀ c, c ≤ a → c ≤ b) : a ≤ b :=
H _ le_rfl
#align le_of_forall_le le_of_forall_le
--/
-#print le_of_forall_le' /-
+/- warning: le_of_forall_le' -> le_of_forall_le' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (forall (c : α), (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a c) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b c)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b a)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, (forall (c : α), (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a c) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b c)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b a)
+Case conversion may be inaccurate. Consider using '#align le_of_forall_le' le_of_forall_le'ₓ'. -/
theorem le_of_forall_le' [Preorder α] {a b : α} (H : ∀ c, a ≤ c → b ≤ c) : b ≤ a :=
H _ le_rfl
#align le_of_forall_le' le_of_forall_le'
--/
-#print le_of_forall_lt /-
+/- warning: le_of_forall_lt -> le_of_forall_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
+Case conversion may be inaccurate. Consider using '#align le_of_forall_lt le_of_forall_ltₓ'. -/
theorem le_of_forall_lt [LinearOrder α] {a b : α} (H : ∀ c, c < a → c < b) : a ≤ b :=
le_of_not_lt fun h => lt_irrefl _ (H _ h)
#align le_of_forall_lt le_of_forall_lt
--/
-#print forall_lt_iff_le /-
+/- warning: forall_lt_iff_le -> forall_lt_iff_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (forall {{c : α}}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (forall {{c : α}}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a b)
+Case conversion may be inaccurate. Consider using '#align forall_lt_iff_le forall_lt_iff_leₓ'. -/
theorem forall_lt_iff_le [LinearOrder α] {a b : α} : (∀ ⦃c⦄, c < a → c < b) ↔ a ≤ b :=
⟨le_of_forall_lt, fun h c hca => lt_of_lt_of_le hca h⟩
#align forall_lt_iff_le forall_lt_iff_le
--/
-#print le_of_forall_lt' /-
+/- warning: le_of_forall_lt' -> le_of_forall_lt' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
+Case conversion may be inaccurate. Consider using '#align le_of_forall_lt' le_of_forall_lt'ₓ'. -/
theorem le_of_forall_lt' [LinearOrder α] {a b : α} (H : ∀ c, a < c → b < c) : b ≤ a :=
le_of_not_lt fun h => lt_irrefl _ (H _ h)
#align le_of_forall_lt' le_of_forall_lt'
--/
-#print forall_lt_iff_le' /-
+/- warning: forall_lt_iff_le' -> forall_lt_iff_le' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (forall {{c : α}}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, Iff (forall {{c : α}}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b a)
+Case conversion may be inaccurate. Consider using '#align forall_lt_iff_le' forall_lt_iff_le'ₓ'. -/
theorem forall_lt_iff_le' [LinearOrder α] {a b : α} : (∀ ⦃c⦄, a < c → b < c) ↔ b ≤ a :=
⟨le_of_forall_lt', fun h c hac => lt_of_le_of_lt h hac⟩
#align forall_lt_iff_le' forall_lt_iff_le'
--/
-#print eq_of_forall_ge_iff /-
+/- warning: eq_of_forall_ge_iff -> eq_of_forall_ge_iff is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a c) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b c)) -> (Eq.{succ u1} α a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) a c) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) b c)) -> (Eq.{succ u1} α a b)
+Case conversion may be inaccurate. Consider using '#align eq_of_forall_ge_iff eq_of_forall_ge_iffₓ'. -/
theorem eq_of_forall_ge_iff [PartialOrder α] {a b : α} (H : ∀ c, a ≤ c ↔ b ≤ c) : a = b :=
((H _).2 le_rfl).antisymm ((H _).1 le_rfl)
#align eq_of_forall_ge_iff eq_of_forall_ge_iff
--/
-#print eq_of_forall_lt_iff /-
+/- warning: eq_of_forall_lt_iff -> eq_of_forall_lt_iff is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) -> (Eq.{succ u1} α a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c a) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) c b)) -> (Eq.{succ u1} α a b)
+Case conversion may be inaccurate. Consider using '#align eq_of_forall_lt_iff eq_of_forall_lt_iffₓ'. -/
theorem eq_of_forall_lt_iff [LinearOrder α] {a b : α} (h : ∀ c, c < a ↔ c < b) : a = b :=
(le_of_forall_lt fun _ => (h _).1).antisymm <| le_of_forall_lt fun _ => (h _).2
#align eq_of_forall_lt_iff eq_of_forall_lt_iff
--/
-#print eq_of_forall_gt_iff /-
+/- warning: eq_of_forall_gt_iff -> eq_of_forall_gt_iff is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) -> (Eq.{succ u1} α a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {a : α} {b : α}, (forall (c : α), Iff (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a c) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) b c)) -> (Eq.{succ u1} α a b)
+Case conversion may be inaccurate. Consider using '#align eq_of_forall_gt_iff eq_of_forall_gt_iffₓ'. -/
theorem eq_of_forall_gt_iff [LinearOrder α] {a b : α} (h : ∀ c, a < c ↔ b < c) : a = b :=
(le_of_forall_lt' fun _ => (h _).2).antisymm <| le_of_forall_lt' fun _ => (h _).1
#align eq_of_forall_gt_iff eq_of_forall_gt_iff
--/
-#print rel_imp_eq_of_rel_imp_le /-
+/- warning: rel_imp_eq_of_rel_imp_le -> rel_imp_eq_of_rel_imp_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PartialOrder.{u2} β] (r : α -> α -> Prop) [_inst_2 : IsSymm.{u1} α r] {f : α -> β}, (forall (a : α) (b : α), (r a b) -> (LE.le.{u2} β (Preorder.toHasLe.{u2} β (PartialOrder.toPreorder.{u2} β _inst_1)) (f a) (f b))) -> (forall {a : α} {b : α}, (r a b) -> (Eq.{succ u2} β (f a) (f b)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PartialOrder.{u2} β] (r : α -> α -> Prop) [_inst_2 : IsSymm.{u1} α r] {f : α -> β}, (forall (a : α) (b : α), (r a b) -> (LE.le.{u2} β (Preorder.toLE.{u2} β (PartialOrder.toPreorder.{u2} β _inst_1)) (f a) (f b))) -> (forall {a : α} {b : α}, (r a b) -> (Eq.{succ u2} β (f a) (f b)))
+Case conversion may be inaccurate. Consider using '#align rel_imp_eq_of_rel_imp_le rel_imp_eq_of_rel_imp_leₓ'. -/
/-- A symmetric relation implies two values are equal, when it implies they're less-equal. -/
theorem rel_imp_eq_of_rel_imp_le [PartialOrder β] (r : α → α → Prop) [IsSymm α r] {f : α → β}
(h : ∀ a b, r a b → f a ≤ f b) {a b : α} : r a b → f a = f b := fun hab =>
le_antisymm (h a b hab) (h b a <| symm hab)
#align rel_imp_eq_of_rel_imp_le rel_imp_eq_of_rel_imp_le
--/
-#print le_implies_le_of_le_of_le /-
+/- warning: le_implies_le_of_le_of_le -> le_implies_le_of_le_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {a : α} {b : α} {c : α} {d : α} [_inst_1 : Preorder.{u1} α], (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) c a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) b d) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) c d)
+but is expected to have type
+ forall {α : Type.{u1}} {a : α} {b : α} {c : α} {d : α} [_inst_1 : Preorder.{u1} α], (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) c a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) b d) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b) -> (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) c d)
+Case conversion may be inaccurate. Consider using '#align le_implies_le_of_le_of_le le_implies_le_of_le_of_leₓ'. -/
/-- monotonicity of `≤` with respect to `→` -/
theorem le_implies_le_of_le_of_le {a b c d : α} [Preorder α] (hca : c ≤ a) (hbd : b ≤ d) :
a ≤ b → c ≤ d := fun hab => (hca.trans hab).trans hbd
#align le_implies_le_of_le_of_le le_implies_le_of_le_of_le
--/
section PartialOrder
variable [PartialOrder α]
-#print commutative_of_le /-
+/- warning: commutative_of_le -> commutative_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PartialOrder.{u1} α] {f : β -> β -> α}, (forall (a : β) (b : β), LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) (f a b) (f b a)) -> (forall (a : β) (b : β), Eq.{succ u1} α (f a b) (f b a))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PartialOrder.{u1} α] {f : β -> β -> α}, (forall (a : β) (b : β), LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) (f a b) (f b a)) -> (forall (a : β) (b : β), Eq.{succ u1} α (f a b) (f b a))
+Case conversion may be inaccurate. Consider using '#align commutative_of_le commutative_of_leₓ'. -/
/-- To prove commutativity of a binary operation `○`, we only to check `a ○ b ≤ b ○ a` for all `a`,
`b`. -/
theorem commutative_of_le {f : β → β → α} (comm : ∀ a b, f a b ≤ f b a) : ∀ a b, f a b = f b a :=
fun a b => (comm _ _).antisymm <| comm _ _
#align commutative_of_le commutative_of_le
--/
-#print associative_of_commutative_of_le /-
+/- warning: associative_of_commutative_of_le -> associative_of_commutative_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {f : α -> α -> α}, (Commutative.{u1} α f) -> (forall (a : α) (b : α) (c : α), LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) (f (f a b) c) (f a (f b c))) -> (Associative.{u1} α f)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] {f : α -> α -> α}, (Commutative.{u1} α f) -> (forall (a : α) (b : α) (c : α), LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) (f (f a b) c) (f a (f b c))) -> (Associative.{u1} α f)
+Case conversion may be inaccurate. Consider using '#align associative_of_commutative_of_le associative_of_commutative_of_leₓ'. -/
/-- To prove associativity of a commutative binary operation `○`, we only to check
`(a ○ b) ○ c ≤ a ○ (b ○ c)` for all `a`, `b`, `c`. -/
theorem associative_of_commutative_of_le {f : α → α → α} (comm : Commutative f)
@@ -818,14 +1323,18 @@ theorem associative_of_commutative_of_le {f : α → α → α} (comm : Commutat
rw [comm, comm b, comm _ c, comm a]
exact assoc _ _ _
#align associative_of_commutative_of_le associative_of_commutative_of_le
--/
end PartialOrder
-#print Preorder.toLE_injective /-
+/- warning: preorder.to_has_le_injective -> Preorder.toLE_injective is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}}, Function.Injective.{succ u1, succ u1} (Preorder.{u1} α) (LE.{u1} α) (Preorder.toHasLe.{u1} α)
+but is expected to have type
+ forall {α : Type.{u1}}, Function.Injective.{succ u1, succ u1} (Preorder.{u1} α) (LE.{u1} α) (Preorder.toLE.{u1} α)
+Case conversion may be inaccurate. Consider using '#align preorder.to_has_le_injective Preorder.toLE_injectiveₓ'. -/
@[ext]
-theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.toLE α) := fun A B h =>
- by
+theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.toHasLe α) :=
+ fun A B h => by
cases A
cases B
injection h with h_le
@@ -835,7 +1344,6 @@ theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.to
simp [A_lt_iff_le_not_le, B_lt_iff_le_not_le, h_le]
congr
#align preorder.to_has_le_injective Preorder.toLE_injective
--/
#print PartialOrder.toPreorder_injective /-
@[ext]
@@ -864,7 +1372,12 @@ theorem LinearOrder.toPartialOrder_injective {α : Type _} :
#align linear_order.to_partial_order_injective LinearOrder.toPartialOrder_injective
-/
-#print Preorder.ext /-
+/- warning: preorder.ext -> Preorder.ext is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {A : Preorder.{u1} α} {B : Preorder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α A) x y) (LE.le.{u1} α (Preorder.toHasLe.{u1} α B) x y)) -> (Eq.{succ u1} (Preorder.{u1} α) A B)
+but is expected to have type
+ forall {α : Type.{u1}} {A : Preorder.{u1} α} {B : Preorder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toLE.{u1} α A) x y) (LE.le.{u1} α (Preorder.toLE.{u1} α B) x y)) -> (Eq.{succ u1} (Preorder.{u1} α) A B)
+Case conversion may be inaccurate. Consider using '#align preorder.ext Preorder.extₓ'. -/
theorem Preorder.ext {α} {A B : Preorder α}
(H :
∀ x y : α,
@@ -875,9 +1388,13 @@ theorem Preorder.ext {α} {A B : Preorder α}
ext (x y)
exact H x y
#align preorder.ext Preorder.ext
--/
-#print PartialOrder.ext /-
+/- warning: partial_order.ext -> PartialOrder.ext is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {A : PartialOrder.{u1} α} {B : PartialOrder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α A)) x y) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α B)) x y)) -> (Eq.{succ u1} (PartialOrder.{u1} α) A B)
+but is expected to have type
+ forall {α : Type.{u1}} {A : PartialOrder.{u1} α} {B : PartialOrder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α A)) x y) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α B)) x y)) -> (Eq.{succ u1} (PartialOrder.{u1} α) A B)
+Case conversion may be inaccurate. Consider using '#align partial_order.ext PartialOrder.extₓ'. -/
theorem PartialOrder.ext {α} {A B : PartialOrder α}
(H :
∀ x y : α,
@@ -888,9 +1405,13 @@ theorem PartialOrder.ext {α} {A B : PartialOrder α}
ext (x y)
exact H x y
#align partial_order.ext PartialOrder.ext
--/
-#print LinearOrder.ext /-
+/- warning: linear_order.ext -> LinearOrder.ext is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {A : LinearOrder.{u1} α} {B : LinearOrder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α A))) x y) (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α B))) x y)) -> (Eq.{succ u1} (LinearOrder.{u1} α) A B)
+but is expected to have type
+ forall {α : Type.{u1}} {A : LinearOrder.{u1} α} {B : LinearOrder.{u1} α}, (forall (x : α) (y : α), Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α A))) x y) (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α B))) x y)) -> (Eq.{succ u1} (LinearOrder.{u1} α) A B)
+Case conversion may be inaccurate. Consider using '#align linear_order.ext LinearOrder.extₓ'. -/
theorem LinearOrder.ext {α} {A B : LinearOrder α}
(H :
∀ x y : α,
@@ -901,7 +1422,6 @@ theorem LinearOrder.ext {α} {A B : LinearOrder α}
ext (x y)
exact H x y
#align linear_order.ext LinearOrder.ext
--/
#print Order.Preimage /-
/-- Given a relation `R` on `β` and a function `f : α → β`, the preimage relation on `α` is defined
@@ -1074,12 +1594,16 @@ instance Pi.preorder {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)]
#align pi.preorder Pi.preorder
-/
-#print Pi.lt_def /-
+/- warning: pi.lt_def -> Pi.lt_def is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (α i)] {x : forall (i : ι), α i} {y : forall (i : ι), α i}, Iff (LT.lt.{max u1 u2} (forall (i : ι), α i) (Preorder.toHasLt.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i))) x y) (And (LE.le.{max u1 u2} (forall (i : ι), α i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => Preorder.toHasLe.{u2} (α i) (_inst_1 i))) x y) (Exists.{succ u1} ι (fun (i : ι) => LT.lt.{u2} (α i) (Preorder.toHasLt.{u2} (α i) (_inst_1 i)) (x i) (y i))))
+but is expected to have type
+ forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (α i)] {x : forall (i : ι), α i} {y : forall (i : ι), α i}, Iff (LT.lt.{max u1 u2} (forall (i : ι), α i) (Preorder.toLT.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i))) x y) (And (LE.le.{max u1 u2} (forall (i : ι), α i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => Preorder.toLE.{u2} (α i) (_inst_1 i))) x y) (Exists.{succ u1} ι (fun (i : ι) => LT.lt.{u2} (α i) (Preorder.toLT.{u2} (α i) (_inst_1 i)) (x i) (y i))))
+Case conversion may be inaccurate. Consider using '#align pi.lt_def Pi.lt_defₓ'. -/
theorem Pi.lt_def {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] {x y : ∀ i, α i} :
x < y ↔ x ≤ y ∧ ∃ i, x i < y i := by
simp (config := { contextual := true }) [lt_iff_le_not_le, Pi.le_def]
#align pi.lt_def Pi.lt_def
--/
#print Pi.partialOrder /-
instance Pi.partialOrder [∀ i, PartialOrder (π i)] : PartialOrder (∀ i, π i) :=
@@ -1103,7 +1627,7 @@ variable [∀ i, Preorder (π i)] {a b c : ∀ i, π i}
/- warning: le_of_strong_lt -> le_of_strongLT is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_1 i))) a b)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) a b)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i}, (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) a b)
Case conversion may be inaccurate. Consider using '#align le_of_strong_lt le_of_strongLTₓ'. -/
@@ -1112,7 +1636,7 @@ theorem le_of_strongLT (h : a ≺ b) : a ≤ b := fun i => (h _).le
/- warning: lt_of_strong_lt -> lt_of_strongLT is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u1} ι], (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u1 u2} (forall (i : ι), π i) (Preorder.toLT.{max u1 u2} (forall (i : ι), π i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u1} ι], (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u1 u2} (forall (i : ι), π i) (Preorder.toHasLt.{max u1 u2} (forall (i : ι), π i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u2} ι], (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u2 u1} (forall (i : ι), π i) (Preorder.toLT.{max u2 u1} (forall (i : ι), π i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
Case conversion may be inaccurate. Consider using '#align lt_of_strong_lt lt_of_strongLTₓ'. -/
@@ -1124,7 +1648,7 @@ theorem lt_of_strongLT [Nonempty ι] (h : a ≺ b) : a < b :=
/- warning: strong_lt_of_strong_lt_of_le -> strongLT_of_strongLT_of_le is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_1 i))) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) a c)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a c)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) b c) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a c)
Case conversion may be inaccurate. Consider using '#align strong_lt_of_strong_lt_of_le strongLT_of_strongLT_of_leₓ'. -/
@@ -1134,7 +1658,7 @@ theorem strongLT_of_strongLT_of_le (hab : a ≺ b) (hbc : b ≤ c) : a ≺ c :=
/- warning: strong_lt_of_le_of_strong_lt -> strongLT_of_le_of_strongLT is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_1 i))) a b) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) a c)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) a b) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a c)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) a b) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) b c) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a c)
Case conversion may be inaccurate. Consider using '#align strong_lt_of_le_of_strong_lt strongLT_of_le_of_strongLTₓ'. -/
@@ -1144,7 +1668,7 @@ theorem strongLT_of_le_of_strongLT (hab : a ≤ b) (hbc : b ≺ c) : a ≺ c :=
/- warning: strong_lt.le -> StrongLT.le is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_1 i))) a b)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) a b)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i}, (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) a b)
Case conversion may be inaccurate. Consider using '#align strong_lt.le StrongLT.leₓ'. -/
@@ -1153,7 +1677,7 @@ alias le_of_strongLT ← StrongLT.le
/- warning: strong_lt.lt -> StrongLT.lt is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u1} ι], (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u1 u2} (forall (i : ι), π i) (Preorder.toLT.{max u1 u2} (forall (i : ι), π i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u1} ι], (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u1 u2} (forall (i : ι), π i) (Preorder.toHasLt.{max u1 u2} (forall (i : ι), π i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} [_inst_2 : Nonempty.{succ u2} ι], (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LT.lt.{max u2 u1} (forall (i : ι), π i) (Preorder.toLT.{max u2 u1} (forall (i : ι), π i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_1 i))) a b)
Case conversion may be inaccurate. Consider using '#align strong_lt.lt StrongLT.ltₓ'. -/
@@ -1162,7 +1686,7 @@ alias lt_of_strongLT ← StrongLT.lt
/- warning: strong_lt.trans_le -> StrongLT.trans_le is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_1 i))) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) a c)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a b) -> (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a c)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a b) -> (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) b c) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a c)
Case conversion may be inaccurate. Consider using '#align strong_lt.trans_le StrongLT.trans_leₓ'. -/
@@ -1171,7 +1695,7 @@ alias strongLT_of_strongLT_of_le ← StrongLT.trans_le
/- warning: has_le.le.trans_strong_lt -> LE.le.trans_strongLT is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_1 i))) a b) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u2} (π i) (_inst_1 i)) a c)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Preorder.{u2} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_1 i))) a b) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) b c) -> (StrongLT.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLt.{u2} (π i) (_inst_1 i)) a c)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Preorder.{u1} (π i)] {a : forall (i : ι), π i} {b : forall (i : ι), π i} {c : forall (i : ι), π i}, (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_1 i))) a b) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) b c) -> (StrongLT.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLT.{u1} (π i) (_inst_1 i)) a c)
Case conversion may be inaccurate. Consider using '#align has_le.le.trans_strong_lt LE.le.trans_strongLTₓ'. -/
@@ -1186,7 +1710,7 @@ variable [DecidableEq ι] [∀ i, Preorder (π i)] {x y : ∀ i, π i} {i : ι}
/- warning: le_update_iff -> le_update_iff is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_2 i))) x (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) y i a)) (And (LE.le.{u2} (π i) (Preorder.toLE.{u2} (π i) (_inst_2 i)) (x i) a) (forall (j : ι), (Ne.{succ u1} ι j i) -> (LE.le.{u2} (π j) (Preorder.toLE.{u2} (π j) (_inst_2 j)) (x j) (y j))))
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) x (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) y i a)) (And (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) (x i) a) (forall (j : ι), (Ne.{succ u1} ι j i) -> (LE.le.{u2} (π j) (Preorder.toHasLe.{u2} (π j) (_inst_2 j)) (x j) (y j))))
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) x (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) y i a)) (And (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) (x i) a) (forall (j : ι), (Ne.{succ u2} ι j i) -> (LE.le.{u1} (π j) (Preorder.toLE.{u1} (π j) (_inst_2 j)) (x j) (y j))))
Case conversion may be inaccurate. Consider using '#align le_update_iff le_update_iffₓ'. -/
@@ -1197,7 +1721,7 @@ theorem le_update_iff : x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_
/- warning: update_le_iff -> update_le_iff is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) y) (And (LE.le.{u2} (π i) (Preorder.toLE.{u2} (π i) (_inst_2 i)) a (y i)) (forall (j : ι), (Ne.{succ u1} ι j i) -> (LE.le.{u2} (π j) (Preorder.toLE.{u2} (π j) (_inst_2 j)) (x j) (y j))))
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) y) (And (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) a (y i)) (forall (j : ι), (Ne.{succ u1} ι j i) -> (LE.le.{u2} (π j) (Preorder.toHasLe.{u2} (π j) (_inst_2 j)) (x j) (y j))))
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) y) (And (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a (y i)) (forall (j : ι), (Ne.{succ u2} ι j i) -> (LE.le.{u1} (π j) (Preorder.toLE.{u1} (π j) (_inst_2 j)) (x j) (y j))))
Case conversion may be inaccurate. Consider using '#align update_le_iff update_le_iffₓ'. -/
@@ -1208,7 +1732,7 @@ theorem update_le_iff : Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_
/- warning: update_le_update_iff -> update_le_update_iff is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) y i b)) (And (LE.le.{u2} (π i) (Preorder.toLE.{u2} (π i) (_inst_2 i)) a b) (forall (j : ι), (Ne.{succ u1} ι j i) -> (LE.le.{u2} (π j) (Preorder.toLE.{u2} (π j) (_inst_2 j)) (x j) (y j))))
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) y i b)) (And (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) a b) (forall (j : ι), (Ne.{succ u1} ι j i) -> (LE.le.{u2} (π j) (Preorder.toHasLe.{u2} (π j) (_inst_2 j)) (x j) (y j))))
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u2, succ u1} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) y i b)) (And (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a b) (forall (j : ι), (Ne.{succ u2} ι j i) -> (LE.le.{u1} (π j) (Preorder.toLE.{u1} (π j) (_inst_2 j)) (x j) (y j))))
Case conversion may be inaccurate. Consider using '#align update_le_update_iff update_le_update_iffₓ'. -/
@@ -1220,7 +1744,7 @@ theorem update_le_update_iff :
/- warning: update_le_update_iff' -> update_le_update_iff' is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LE.le.{u2} (π i) (Preorder.toLE.{u2} (π i) (_inst_2 i)) a b)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) a b)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u2, succ u1} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a b)
Case conversion may be inaccurate. Consider using '#align update_le_update_iff' update_le_update_iff'ₓ'. -/
@@ -1231,7 +1755,7 @@ theorem update_le_update_iff' : update x i a ≤ update x i b ↔ a ≤ b := by
/- warning: update_lt_update_iff -> update_lt_update_iff is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LT.lt.{max u1 u2} (forall (a : ι), π a) (Preorder.toLT.{max u1 u2} (forall (a : ι), π a) (Pi.preorder.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LT.lt.{u2} (π i) (Preorder.toLT.{u2} (π i) (_inst_2 i)) a b)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LT.lt.{max u1 u2} (forall (a : ι), π a) (Preorder.toHasLt.{max u1 u2} (forall (a : ι), π a) (Pi.preorder.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LT.lt.{u2} (π i) (Preorder.toHasLt.{u2} (π i) (_inst_2 i)) a b)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LT.lt.{max u2 u1} (forall (a : ι), π a) (Preorder.toLT.{max u2 u1} (forall (a : ι), π a) (Pi.preorder.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u2, succ u1} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LT.lt.{u1} (π i) (Preorder.toLT.{u1} (π i) (_inst_2 i)) a b)
Case conversion may be inaccurate. Consider using '#align update_lt_update_iff update_lt_update_iffₓ'. -/
@@ -1242,7 +1766,7 @@ theorem update_lt_update_iff : update x i a < update x i b ↔ a < b :=
/- warning: le_update_self_iff -> le_update_self_iff is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_2 i))) x (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LE.le.{u2} (π i) (Preorder.toLE.{u2} (π i) (_inst_2 i)) (x i) a)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) x (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) (x i) a)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) x (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) (x i) a)
Case conversion may be inaccurate. Consider using '#align le_update_self_iff le_update_self_iffₓ'. -/
@@ -1252,7 +1776,7 @@ theorem le_update_self_iff : x ≤ update x i a ↔ x i ≤ a := by simp [le_upd
/- warning: update_le_self_iff -> update_le_self_iff is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) x) (LE.le.{u2} (π i) (Preorder.toLE.{u2} (π i) (_inst_2 i)) a (x i))
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toHasLe.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) x) (LE.le.{u2} (π i) (Preorder.toHasLe.{u2} (π i) (_inst_2 i)) a (x i))
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) x) (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a (x i))
Case conversion may be inaccurate. Consider using '#align update_le_self_iff update_le_self_iffₓ'. -/
@@ -1262,7 +1786,7 @@ theorem update_le_self_iff : update x i a ≤ x ↔ a ≤ x i := by simp [update
/- warning: lt_update_self_iff -> lt_update_self_iff is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LT.lt.{max u1 u2} (forall (i : ι), π i) (Preorder.toLT.{max u1 u2} (forall (i : ι), π i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_2 i))) x (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LT.lt.{u2} (π i) (Preorder.toLT.{u2} (π i) (_inst_2 i)) (x i) a)
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LT.lt.{max u1 u2} (forall (i : ι), π i) (Preorder.toHasLt.{max u1 u2} (forall (i : ι), π i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_2 i))) x (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LT.lt.{u2} (π i) (Preorder.toHasLt.{u2} (π i) (_inst_2 i)) (x i) a)
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LT.lt.{max u2 u1} (forall (i : ι), π i) (Preorder.toLT.{max u2 u1} (forall (i : ι), π i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => _inst_2 i))) x (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LT.lt.{u1} (π i) (Preorder.toLT.{u1} (π i) (_inst_2 i)) (x i) a)
Case conversion may be inaccurate. Consider using '#align lt_update_self_iff lt_update_self_iffₓ'. -/
@@ -1272,7 +1796,7 @@ theorem lt_update_self_iff : x < update x i a ↔ x i < a := by simp [lt_iff_le_
/- warning: update_lt_self_iff -> update_lt_self_iff is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LT.lt.{max u1 u2} (forall (a : ι), π a) (Preorder.toLT.{max u1 u2} (forall (a : ι), π a) (Pi.preorder.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) x) (LT.lt.{u2} (π i) (Preorder.toLT.{u2} (π i) (_inst_2 i)) a (x i))
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LT.lt.{max u1 u2} (forall (a : ι), π a) (Preorder.toHasLt.{max u1 u2} (forall (a : ι), π a) (Pi.preorder.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) x) (LT.lt.{u2} (π i) (Preorder.toHasLt.{u2} (π i) (_inst_2 i)) a (x i))
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LT.lt.{max u2 u1} (forall (a : ι), π a) (Preorder.toLT.{max u2 u1} (forall (a : ι), π a) (Pi.preorder.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) x) (LT.lt.{u1} (π i) (Preorder.toLT.{u1} (π i) (_inst_2 i)) a (x i))
Case conversion may be inaccurate. Consider using '#align update_lt_self_iff update_lt_self_iffₓ'. -/
@@ -1307,17 +1831,25 @@ namespace Function
variable [Preorder α] [Nonempty β] {a b : α}
-#print Function.const_le_const /-
+/- warning: function.const_le_const -> Function.const_le_const is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Nonempty.{succ u2} β] {a : α} {b : α}, Iff (LE.le.{max u2 u1} (β -> α) (Pi.hasLe.{u2, u1} β (fun (ᾰ : β) => α) (fun (i : β) => Preorder.toHasLe.{u1} α _inst_1)) (Function.const.{succ u1, succ u2} α β a) (Function.const.{succ u1, succ u2} α β b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Nonempty.{succ u2} β] {a : α} {b : α}, Iff (LE.le.{max u1 u2} (β -> α) (Pi.hasLe.{u2, u1} β (fun (ᾰ : β) => α) (fun (i : β) => Preorder.toLE.{u1} α _inst_1)) (Function.const.{succ u1, succ u2} α β a) (Function.const.{succ u1, succ u2} α β b)) (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
+Case conversion may be inaccurate. Consider using '#align function.const_le_const Function.const_le_constₓ'. -/
@[simp]
theorem const_le_const : const β a ≤ const β b ↔ a ≤ b := by simp [Pi.le_def]
#align function.const_le_const Function.const_le_const
--/
-#print Function.const_lt_const /-
+/- warning: function.const_lt_const -> Function.const_lt_const is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Nonempty.{succ u2} β] {a : α} {b : α}, Iff (LT.lt.{max u2 u1} (β -> α) (Preorder.toHasLt.{max u2 u1} (β -> α) (Pi.preorder.{u2, u1} β (fun (ᾰ : β) => α) (fun (i : β) => _inst_1))) (Function.const.{succ u1, succ u2} α β a) (Function.const.{succ u1, succ u2} α β b)) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Nonempty.{succ u2} β] {a : α} {b : α}, Iff (LT.lt.{max u1 u2} (β -> α) (Preorder.toLT.{max u1 u2} (β -> α) (Pi.preorder.{u2, u1} β (fun (ᾰ : β) => α) (fun (i : β) => _inst_1))) (Function.const.{succ u1, succ u2} α β a) (Function.const.{succ u1, succ u2} α β b)) (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)
+Case conversion may be inaccurate. Consider using '#align function.const_lt_const Function.const_lt_constₓ'. -/
@[simp]
theorem const_lt_const : const β a < const β b ↔ a < b := by simpa [Pi.lt_def] using le_of_lt
#align function.const_lt_const Function.const_lt_const
--/
end Function
@@ -1330,7 +1862,7 @@ variable [LinearOrder α] {p : α → Prop} {x y : α}
/- warning: min_rec -> min_rec is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {p : α -> Prop} {x : α} {y : α}, ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (p x)) -> ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x) -> (p y)) -> (p (LinearOrder.min.{u1} α _inst_1 x y))
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {p : α -> Prop} {x : α} {y : α}, ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (p x)) -> ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x) -> (p y)) -> (p (LinearOrder.min.{u1} α _inst_1 x y))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {p : α -> Prop} {x : α} {y : α}, ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (p x)) -> ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x) -> (p y)) -> (p (Min.min.{u1} α (LinearOrder.toMin.{u1} α _inst_1) x y))
Case conversion may be inaccurate. Consider using '#align min_rec min_recₓ'. -/
@@ -1341,7 +1873,7 @@ theorem min_rec (hx : x ≤ y → p x) (hy : y ≤ x → p y) : p (min x y) :=
/- warning: max_rec -> max_rec is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {p : α -> Prop} {x : α} {y : α}, ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x) -> (p x)) -> ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (p y)) -> (p (LinearOrder.max.{u1} α _inst_1 x y))
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {p : α -> Prop} {x : α} {y : α}, ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x) -> (p x)) -> ((LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (p y)) -> (p (LinearOrder.max.{u1} α _inst_1 x y))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {p : α -> Prop} {x : α} {y : α}, ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y x) -> (p x)) -> ((LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (p y)) -> (p (Max.max.{u1} α (LinearOrder.toMax.{u1} α _inst_1) x y))
Case conversion may be inaccurate. Consider using '#align max_rec max_recₓ'. -/
@@ -1371,7 +1903,7 @@ theorem max_rec' (p : α → Prop) (hx : p x) (hy : p y) : p (max x y) :=
/- warning: min_def_lt -> min_def_lt is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (x : α) (y : α), Eq.{succ u1} α (LinearOrder.min.{u1} α _inst_1 x y) (ite.{succ u1} α (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.decidable.{u1} α _inst_1 x y) x y)
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (x : α) (y : α), Eq.{succ u1} α (LinearOrder.min.{u1} α _inst_1 x y) (ite.{succ u1} α (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.decidable.{u1} α _inst_1 x y) x y)
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (x : α) (y : α), Eq.{succ u1} α (Min.min.{u1} α (LinearOrder.toMin.{u1} α _inst_1) x y) (ite.{succ u1} α (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (instDecidableLtToLTToPreorderToPartialOrder.{u1} α _inst_1 x y) x y)
Case conversion may be inaccurate. Consider using '#align min_def_lt min_def_ltₓ'. -/
@@ -1383,7 +1915,7 @@ theorem min_def_lt (x y : α) : min x y = if x < y then x else y :=
/- warning: max_def_lt -> max_def_lt is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (x : α) (y : α), Eq.{succ u1} α (LinearOrder.max.{u1} α _inst_1 x y) (ite.{succ u1} α (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.decidable.{u1} α _inst_1 x y) y x)
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (x : α) (y : α), Eq.{succ u1} α (LinearOrder.max.{u1} α _inst_1 x y) (ite.{succ u1} α (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (LT.lt.decidable.{u1} α _inst_1 x y) y x)
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (x : α) (y : α), Eq.{succ u1} α (Max.max.{u1} α (LinearOrder.toMax.{u1} α _inst_1) x y) (ite.{succ u1} α (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) (instDecidableLtToLTToPreorderToPartialOrder.{u1} α _inst_1 x y) y x)
Case conversion may be inaccurate. Consider using '#align max_def_lt max_def_ltₓ'. -/
@@ -1544,17 +2076,25 @@ instance partialOrder [PartialOrder α] (p : α → Prop) : PartialOrder (Subtyp
#align subtype.partial_order Subtype.partialOrder
-/
-#print Subtype.decidableLE /-
+/- warning: subtype.decidable_le -> Subtype.decidableLE is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1))] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (LE.le.{u1} (Subtype.{succ u1} α p) (Subtype.hasLe.{u1} α (Preorder.toHasLe.{u1} α _inst_1) p))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.13874 : α) (x._@.Mathlib.Order.Basic._hyg.13876 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) x._@.Mathlib.Order.Basic._hyg.13874 x._@.Mathlib.Order.Basic._hyg.13876)] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (fun (x._@.Mathlib.Order.Basic._hyg.13897 : Subtype.{succ u1} α p) (x._@.Mathlib.Order.Basic._hyg.13899 : Subtype.{succ u1} α p) => LE.le.{u1} (Subtype.{succ u1} α p) (Subtype.le.{u1} α (Preorder.toLE.{u1} α _inst_1) p) x._@.Mathlib.Order.Basic._hyg.13897 x._@.Mathlib.Order.Basic._hyg.13899)
+Case conversion may be inaccurate. Consider using '#align subtype.decidable_le Subtype.decidableLEₓ'. -/
instance decidableLE [Preorder α] [h : @DecidableRel α (· ≤ ·)] {p : α → Prop} :
@DecidableRel (Subtype p) (· ≤ ·) := fun a b => h a b
#align subtype.decidable_le Subtype.decidableLE
--/
-#print Subtype.decidableLT /-
+/- warning: subtype.decidable_lt -> Subtype.decidableLT is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1))] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (LT.lt.{u1} (Subtype.{succ u1} α p) (Subtype.hasLt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) p))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] [h : DecidableRel.{succ u1} α (fun (x._@.Mathlib.Order.Basic._hyg.13938 : α) (x._@.Mathlib.Order.Basic._hyg.13940 : α) => LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) x._@.Mathlib.Order.Basic._hyg.13938 x._@.Mathlib.Order.Basic._hyg.13940)] {p : α -> Prop}, DecidableRel.{succ u1} (Subtype.{succ u1} α p) (fun (x._@.Mathlib.Order.Basic._hyg.13961 : Subtype.{succ u1} α p) (x._@.Mathlib.Order.Basic._hyg.13963 : Subtype.{succ u1} α p) => LT.lt.{u1} (Subtype.{succ u1} α p) (Subtype.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) p) x._@.Mathlib.Order.Basic._hyg.13961 x._@.Mathlib.Order.Basic._hyg.13963)
+Case conversion may be inaccurate. Consider using '#align subtype.decidable_lt Subtype.decidableLTₓ'. -/
instance decidableLT [Preorder α] [h : @DecidableRel α (· < ·)] {p : α → Prop} :
@DecidableRel (Subtype p) (· < ·) := fun a b => h a b
#align subtype.decidable_lt Subtype.decidableLT
--/
/-- A subtype of a linear order is a linear order. We explicitly give the proofs of decidable
equality and decidable order in order to ensure the decidability instances are all definitionally
@@ -1611,7 +2151,7 @@ instance (α : Type u) (β : Type v) [Preorder α] [Preorder β] : Preorder (α
/- warning: prod.swap_lt_swap -> Prod.swap_lt_swap is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {x : Prod.{u1, u2} α β} {y : Prod.{u1, u2} α β}, Iff (LT.lt.{max u2 u1} (Prod.{u2, u1} β α) (Preorder.toLT.{max u2 u1} (Prod.{u2, u1} β α) (Prod.preorder.{u2, u1} β α _inst_2 _inst_1)) (Prod.swap.{u1, u2} α β x) (Prod.swap.{u1, u2} α β y)) (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) x y)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {x : Prod.{u1, u2} α β} {y : Prod.{u1, u2} α β}, Iff (LT.lt.{max u2 u1} (Prod.{u2, u1} β α) (Preorder.toHasLt.{max u2 u1} (Prod.{u2, u1} β α) (Prod.preorder.{u2, u1} β α _inst_2 _inst_1)) (Prod.swap.{u1, u2} α β x) (Prod.swap.{u1, u2} α β y)) (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toHasLt.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) x y)
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {x : Prod.{u1, u2} α β} {y : Prod.{u1, u2} α β}, Iff (LT.lt.{max u1 u2} (Prod.{u2, u1} β α) (Preorder.toLT.{max u1 u2} (Prod.{u2, u1} β α) (Prod.instPreorderProd.{u2, u1} β α _inst_2 _inst_1)) (Prod.swap.{u1, u2} α β x) (Prod.swap.{u1, u2} α β y)) (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instPreorderProd.{u1, u2} α β _inst_1 _inst_2)) x y)
Case conversion may be inaccurate. Consider using '#align prod.swap_lt_swap Prod.swap_lt_swapₓ'. -/
@@ -1620,21 +2160,29 @@ theorem swap_lt_swap : x.symm < y.symm ↔ x < y :=
and_congr swap_le_swap (not_congr swap_le_swap)
#align prod.swap_lt_swap Prod.swap_lt_swap
-#print Prod.mk_le_mk_iff_left /-
+/- warning: prod.mk_le_mk_iff_left -> Prod.mk_le_mk_iff_left is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b : β}, Iff (LE.le.{max u1 u2} (Prod.{u1, u2} α β) (Prod.hasLe.{u1, u2} α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)) (Prod.mk.{u1, u2} α β a₁ b) (Prod.mk.{u1, u2} α β a₂ b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a₁ a₂)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b : β}, Iff (LE.le.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instLEProd.{u1, u2} α β (Preorder.toLE.{u1} α _inst_1) (Preorder.toLE.{u2} β _inst_2)) (Prod.mk.{u1, u2} α β a₁ b) (Prod.mk.{u1, u2} α β a₂ b)) (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a₁ a₂)
+Case conversion may be inaccurate. Consider using '#align prod.mk_le_mk_iff_left Prod.mk_le_mk_iff_leftₓ'. -/
theorem mk_le_mk_iff_left : (a₁, b) ≤ (a₂, b) ↔ a₁ ≤ a₂ :=
and_iff_left le_rfl
#align prod.mk_le_mk_iff_left Prod.mk_le_mk_iff_left
--/
-#print Prod.mk_le_mk_iff_right /-
+/- warning: prod.mk_le_mk_iff_right -> Prod.mk_le_mk_iff_right is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b₁ : β} {b₂ : β}, Iff (LE.le.{max u1 u2} (Prod.{u1, u2} α β) (Prod.hasLe.{u1, u2} α β (Preorder.toHasLe.{u1} α _inst_1) (Preorder.toHasLe.{u2} β _inst_2)) (Prod.mk.{u1, u2} α β a b₁) (Prod.mk.{u1, u2} α β a b₂)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) b₁ b₂)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b₁ : β} {b₂ : β}, Iff (LE.le.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instLEProd.{u1, u2} α β (Preorder.toLE.{u1} α _inst_1) (Preorder.toLE.{u2} β _inst_2)) (Prod.mk.{u1, u2} α β a b₁) (Prod.mk.{u1, u2} α β a b₂)) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) b₁ b₂)
+Case conversion may be inaccurate. Consider using '#align prod.mk_le_mk_iff_right Prod.mk_le_mk_iff_rightₓ'. -/
theorem mk_le_mk_iff_right : (a, b₁) ≤ (a, b₂) ↔ b₁ ≤ b₂ :=
and_iff_right le_rfl
#align prod.mk_le_mk_iff_right Prod.mk_le_mk_iff_right
--/
/- warning: prod.mk_lt_mk_iff_left -> Prod.mk_lt_mk_iff_left is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a₁ b) (Prod.mk.{u1, u2} α β a₂ b)) (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a₁ a₂)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toHasLt.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a₁ b) (Prod.mk.{u1, u2} α β a₂ b)) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a₁ a₂)
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instPreorderProd.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a₁ b) (Prod.mk.{u1, u2} α β a₂ b)) (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a₁ a₂)
Case conversion may be inaccurate. Consider using '#align prod.mk_lt_mk_iff_left Prod.mk_lt_mk_iff_leftₓ'. -/
@@ -1644,7 +2192,7 @@ theorem mk_lt_mk_iff_left : (a₁, b) < (a₂, b) ↔ a₁ < a₂ :=
/- warning: prod.mk_lt_mk_iff_right -> Prod.mk_lt_mk_iff_right is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b₁ : β} {b₂ : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a b₁) (Prod.mk.{u1, u2} α β a b₂)) (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) b₁ b₂)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b₁ : β} {b₂ : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toHasLt.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a b₁) (Prod.mk.{u1, u2} α β a b₂)) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β _inst_2) b₁ b₂)
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a : α} {b₁ : β} {b₂ : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instPreorderProd.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a b₁) (Prod.mk.{u1, u2} α β a b₂)) (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) b₁ b₂)
Case conversion may be inaccurate. Consider using '#align prod.mk_lt_mk_iff_right Prod.mk_lt_mk_iff_rightₓ'. -/
@@ -1654,7 +2202,7 @@ theorem mk_lt_mk_iff_right : (a, b₁) < (a, b₂) ↔ b₁ < b₂ :=
/- warning: prod.lt_iff -> Prod.lt_iff is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {x : Prod.{u1, u2} α β} {y : Prod.{u1, u2} α β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) x y) (Or (And (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) (Prod.fst.{u1, u2} α β x) (Prod.fst.{u1, u2} α β y)) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) (Prod.snd.{u1, u2} α β x) (Prod.snd.{u1, u2} α β y))) (And (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) (Prod.fst.{u1, u2} α β x) (Prod.fst.{u1, u2} α β y)) (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) (Prod.snd.{u1, u2} α β x) (Prod.snd.{u1, u2} α β y))))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {x : Prod.{u1, u2} α β} {y : Prod.{u1, u2} α β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toHasLt.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) x y) (Or (And (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) (Prod.fst.{u1, u2} α β x) (Prod.fst.{u1, u2} α β y)) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) (Prod.snd.{u1, u2} α β x) (Prod.snd.{u1, u2} α β y))) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) (Prod.fst.{u1, u2} α β x) (Prod.fst.{u1, u2} α β y)) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β _inst_2) (Prod.snd.{u1, u2} α β x) (Prod.snd.{u1, u2} α β y))))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {x : Prod.{u1, u2} α β} {y : Prod.{u1, u2} α β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instPreorderProd.{u1, u2} α β _inst_1 _inst_2)) x y) (Or (And (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) (Prod.fst.{u1, u2} α β x) (Prod.fst.{u1, u2} α β y)) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) (Prod.snd.{u1, u2} α β x) (Prod.snd.{u1, u2} α β y))) (And (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) (Prod.fst.{u1, u2} α β x) (Prod.fst.{u1, u2} α β y)) (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) (Prod.snd.{u1, u2} α β x) (Prod.snd.{u1, u2} α β y))))
Case conversion may be inaccurate. Consider using '#align prod.lt_iff Prod.lt_iffₓ'. -/
@@ -1671,7 +2219,7 @@ theorem lt_iff : x < y ↔ x.1 < y.1 ∧ x.2 ≤ y.2 ∨ x.1 ≤ y.1 ∧ x.2 < y
/- warning: prod.mk_lt_mk -> Prod.mk_lt_mk is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b₁ : β} {b₂ : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a₁ b₁) (Prod.mk.{u1, u2} α β a₂ b₂)) (Or (And (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a₁ a₂) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) b₁ b₂)) (And (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a₁ a₂) (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) b₁ b₂)))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b₁ : β} {b₂ : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toHasLt.{max u1 u2} (Prod.{u1, u2} α β) (Prod.preorder.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a₁ b₁) (Prod.mk.{u1, u2} α β a₂ b₂)) (Or (And (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a₁ a₂) (LE.le.{u2} β (Preorder.toHasLe.{u2} β _inst_2) b₁ b₂)) (And (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a₁ a₂) (LT.lt.{u2} β (Preorder.toHasLt.{u2} β _inst_2) b₁ b₂)))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Preorder.{u1} α] [_inst_2 : Preorder.{u2} β] {a₁ : α} {a₂ : α} {b₁ : β} {b₂ : β}, Iff (LT.lt.{max u1 u2} (Prod.{u1, u2} α β) (Preorder.toLT.{max u1 u2} (Prod.{u1, u2} α β) (Prod.instPreorderProd.{u1, u2} α β _inst_1 _inst_2)) (Prod.mk.{u1, u2} α β a₁ b₁) (Prod.mk.{u1, u2} α β a₂ b₂)) (Or (And (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a₁ a₂) (LE.le.{u2} β (Preorder.toLE.{u2} β _inst_2) b₁ b₂)) (And (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a₁ a₂) (LT.lt.{u2} β (Preorder.toLT.{u2} β _inst_2) b₁ b₂)))
Case conversion may be inaccurate. Consider using '#align prod.mk_lt_mk Prod.mk_lt_mkₓ'. -/
@@ -1744,48 +2292,73 @@ instance {α : ι → Type _} [∀ i, Preorder (α i)] [∀ i, DenselyOrdered (
⟨a.update i c, ⟨le_update_iff.2 ⟨ha.le, fun _ _ => le_rfl⟩, i, by rwa [update_same]⟩,
update_le_iff.2 ⟨hb.le, fun _ _ => hab _⟩, i, by rwa [update_same]⟩⟩
-#print le_of_forall_le_of_dense /-
+/- warning: le_of_forall_le_of_dense -> le_of_forall_le_of_dense is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (forall (a : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a₂)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (forall (a : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a₂)
+Case conversion may be inaccurate. Consider using '#align le_of_forall_le_of_dense le_of_forall_le_of_denseₓ'. -/
theorem le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
(h : ∀ a, a₂ < a → a₁ ≤ a) : a₁ ≤ a₂ :=
le_of_not_gt fun ha =>
let ⟨a, ha₁, ha₂⟩ := exists_between ha
lt_irrefl a <| lt_of_lt_of_le ‹a < a₁› (h _ ‹a₂ < a›)
#align le_of_forall_le_of_dense le_of_forall_le_of_dense
--/
-#print eq_of_le_of_forall_le_of_dense /-
+/- warning: eq_of_le_of_forall_le_of_dense -> eq_of_le_of_forall_le_of_dense is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a₁) -> (forall (a : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a)) -> (Eq.{succ u1} α a₁ a₂)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a₁) -> (forall (a : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a)) -> (Eq.{succ u1} α a₁ a₂)
+Case conversion may be inaccurate. Consider using '#align eq_of_le_of_forall_le_of_dense eq_of_le_of_forall_le_of_denseₓ'. -/
theorem eq_of_le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α} (h₁ : a₂ ≤ a₁)
(h₂ : ∀ a, a₂ < a → a₁ ≤ a) : a₁ = a₂ :=
le_antisymm (le_of_forall_le_of_dense h₂) h₁
#align eq_of_le_of_forall_le_of_dense eq_of_le_of_forall_le_of_dense
--/
-#print le_of_forall_ge_of_dense /-
+/- warning: le_of_forall_ge_of_dense -> le_of_forall_ge_of_dense is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (forall (a₃ : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₁) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₂)) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a₂)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (forall (a₃ : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₁) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₂)) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a₂)
+Case conversion may be inaccurate. Consider using '#align le_of_forall_ge_of_dense le_of_forall_ge_of_denseₓ'. -/
theorem le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
(h : ∀ a₃ < a₁, a₃ ≤ a₂) : a₁ ≤ a₂ :=
le_of_not_gt fun ha =>
let ⟨a, ha₁, ha₂⟩ := exists_between ha
lt_irrefl a <| lt_of_le_of_lt (h _ ‹a < a₁›) ‹a₂ < a›
#align le_of_forall_ge_of_dense le_of_forall_ge_of_dense
--/
-#print eq_of_le_of_forall_ge_of_dense /-
+/- warning: eq_of_le_of_forall_ge_of_dense -> eq_of_le_of_forall_ge_of_dense is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a₁) -> (forall (a₃ : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₁) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₂)) -> (Eq.{succ u1} α a₁ a₂)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] [_inst_2 : DenselyOrdered.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1)))] {a₁ : α} {a₂ : α}, (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a₁) -> (forall (a₃ : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₁) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₃ a₂)) -> (Eq.{succ u1} α a₁ a₂)
+Case conversion may be inaccurate. Consider using '#align eq_of_le_of_forall_ge_of_dense eq_of_le_of_forall_ge_of_denseₓ'. -/
theorem eq_of_le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α} (h₁ : a₂ ≤ a₁)
(h₂ : ∀ a₃ < a₁, a₃ ≤ a₂) : a₁ = a₂ :=
(le_of_forall_ge_of_dense h₂).antisymm h₁
#align eq_of_le_of_forall_ge_of_dense eq_of_le_of_forall_ge_of_dense
--/
-#print dense_or_discrete /-
+/- warning: dense_or_discrete -> dense_or_discrete is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a₁ : α) (a₂ : α), Or (Exists.{succ u1} α (fun (a : α) => And (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₂))) (And (forall (a : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a)) (forall (a : α), (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₂) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₁)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (a₁ : α) (a₂ : α), Or (Exists.{succ u1} α (fun (a : α) => And (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a) (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₂))) (And (forall (a : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₁ a) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a₂ a)) (forall (a : α), (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₂) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) a a₁)))
+Case conversion may be inaccurate. Consider using '#align dense_or_discrete dense_or_discreteₓ'. -/
theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
(∃ a, a₁ < a ∧ a < a₂) ∨ (∀ a, a₁ < a → a₂ ≤ a) ∧ ∀ a < a₂, a ≤ a₁ :=
or_iff_not_imp_left.2 fun h =>
⟨fun a ha₁ => le_of_not_gt fun ha₂ => h ⟨a, ha₁, ha₂⟩, fun a ha₂ =>
le_of_not_gt fun ha₁ => h ⟨a, ha₁, ha₂⟩⟩
#align dense_or_discrete dense_or_discrete
--/
-#print eq_or_eq_or_eq_of_forall_not_lt_lt /-
+/- warning: eq_or_eq_or_eq_of_forall_not_lt_lt -> eq_or_eq_or_eq_of_forall_not_lt_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α], (forall {{x : α}} {{y : α}} {{z : α}}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y z) -> False) -> (forall (x : α) (y : α) (z : α), Or (Eq.{succ u1} α x y) (Or (Eq.{succ u1} α y z) (Eq.{succ u1} α x z)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α], (forall {{x : α}} {{y : α}} {{z : α}}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) x y) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (LinearOrder.toPartialOrder.{u1} α _inst_1))) y z) -> False) -> (forall (x : α) (y : α) (z : α), Or (Eq.{succ u1} α x y) (Or (Eq.{succ u1} α y z) (Eq.{succ u1} α x z)))
+Case conversion may be inaccurate. Consider using '#align eq_or_eq_or_eq_of_forall_not_lt_lt eq_or_eq_or_eq_of_forall_not_lt_ltₓ'. -/
/-- If a linear order has no elements `x < y < z`, then it has at most two elements. -/
theorem eq_or_eq_or_eq_of_forall_not_lt_lt {α : Type _} [LinearOrder α]
(h : ∀ ⦃x y z : α⦄, x < y → y < z → False) (x y z : α) : x = y ∨ y = z ∨ x = z :=
@@ -1795,7 +2368,6 @@ theorem eq_or_eq_or_eq_of_forall_not_lt_lt {α : Type _} [LinearOrder α]
cases' hne.2.2.lt_or_lt with h₃ h₃
exacts[h h₁ h₂, h h₂ h₃, h h₃ h₂, h h₃ h₁, h h₁ h₃, h h₂ h₃, h h₁ h₃, h h₂ h₁]
#align eq_or_eq_or_eq_of_forall_not_lt_lt eq_or_eq_or_eq_of_forall_not_lt_lt
--/
namespace PUnit
@@ -1834,19 +2406,27 @@ theorem min_eq : min a b = unit :=
rfl
#align punit.min_eq PUnit.min_eq
-#print PUnit.le /-
+/- warning: punit.le -> PUnit.le is a dubious translation:
+lean 3 declaration is
+ forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}), LE.le.{u1} PUnit.{succ u1} (Preorder.toHasLe.{u1} PUnit.{succ u1} (PartialOrder.toPreorder.{u1} PUnit.{succ u1} (LinearOrder.toPartialOrder.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1}))) a b
+but is expected to have type
+ forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}), LE.le.{u1} PUnit.{succ u1} (Preorder.toLE.{u1} PUnit.{succ u1} (PartialOrder.toPreorder.{u1} PUnit.{succ u1} (LinearOrder.toPartialOrder.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1}))) a b
+Case conversion may be inaccurate. Consider using '#align punit.le PUnit.leₓ'. -/
@[simp]
protected theorem le : a ≤ b :=
trivial
#align punit.le PUnit.le
--/
-#print PUnit.not_lt /-
+/- warning: punit.not_lt -> PUnit.not_lt is a dubious translation:
+lean 3 declaration is
+ forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}), Not (LT.lt.{u1} PUnit.{succ u1} (Preorder.toHasLt.{u1} PUnit.{succ u1} (PartialOrder.toPreorder.{u1} PUnit.{succ u1} (LinearOrder.toPartialOrder.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1}))) a b)
+but is expected to have type
+ forall (a : PUnit.{succ u1}) (b : PUnit.{succ u1}), Not (LT.lt.{u1} PUnit.{succ u1} (Preorder.toLT.{u1} PUnit.{succ u1} (PartialOrder.toPreorder.{u1} PUnit.{succ u1} (LinearOrder.toPartialOrder.{u1} PUnit.{succ u1} PUnit.linearOrder.{u1}))) a b)
+Case conversion may be inaccurate. Consider using '#align punit.not_lt PUnit.not_ltₓ'. -/
@[simp]
theorem not_lt : ¬a < b :=
not_false
#align punit.not_lt PUnit.not_lt
--/
instance : DenselyOrdered PUnit :=
⟨fun _ _ => False.elim⟩
@@ -1904,12 +2484,16 @@ def AsLinearOrder (α : Type u) :=
instance {α} [Inhabited α] : Inhabited (AsLinearOrder α) :=
⟨(default : α)⟩
-#print AsLinearOrder.linearOrder /-
+/- warning: as_linear_order.linear_order -> AsLinearOrder.linearOrder is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : IsTotal.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)))], LinearOrder.{u1} (AsLinearOrder.{u1} α)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : IsTotal.{u1} α (fun (x._@.Mathlib.Order.Basic._hyg.17064 : α) (x._@.Mathlib.Order.Basic._hyg.17066 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)) x._@.Mathlib.Order.Basic._hyg.17064 x._@.Mathlib.Order.Basic._hyg.17066)], LinearOrder.{u1} (AsLinearOrder.{u1} α)
+Case conversion may be inaccurate. Consider using '#align as_linear_order.linear_order AsLinearOrder.linearOrderₓ'. -/
noncomputable instance AsLinearOrder.linearOrder {α} [PartialOrder α] [IsTotal α (· ≤ ·)] :
LinearOrder (AsLinearOrder α) :=
{ (_ : PartialOrder α) with
le_total := @total_of α (· ≤ ·) _
decidableLe := Classical.decRel _ }
#align as_linear_order.linear_order AsLinearOrder.linearOrder
--/
mathlib commit https://github.com/leanprover-community/mathlib/commit/8b8ba04e2f326f3f7cf24ad129beda58531ada61
@@ -1808,8 +1808,8 @@ instance : LinearOrder PUnit := by
max := fun _ _ => star
min := fun _ _ => star
DecidableEq := PUnit.decidableEq
- decidableLe := fun _ _ => Decidable.true
- decidableLt := fun _ _ => Decidable.false } <;>
+ decidableLe := fun _ _ => decidableTrue
+ decidableLt := fun _ _ => decidableFalse } <;>
intros <;>
first
|trivial|simp only [eq_iff_true_of_subsingleton, not_true, and_false_iff]|exact Or.inl trivial
mathlib commit https://github.com/leanprover-community/mathlib/commit/09079525fd01b3dda35e96adaa08d2f943e1648c
@@ -1007,7 +1007,7 @@ class HasCompl (α : Type _) where
export HasCompl (compl)
-/- ./././Mathport/Syntax/Translate/Command.lean:471:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
+/- ./././Mathport/Syntax/Translate/Command.lean:476:9: unsupported: advanced prec syntax «expr + »(max[std.prec.max], 1) -/
-- mathport name: «expr ᶜ»
postfix:999 "ᶜ" => compl
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e281deff072232a3c5b3e90034bd65dde396312
@@ -1218,11 +1218,23 @@ theorem update_le_update_iff :
simp (config := { contextual := true }) [update_le_iff]
#align update_le_update_iff update_le_update_iff
+/- warning: update_le_update_iff' -> update_le_update_iff' is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u1 u2} (forall (a : ι), π a) (Pi.hasLe.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LE.le.{u2} (π i) (Preorder.toLE.{u2} (π i) (_inst_2 i)) a b)
+but is expected to have type
+ forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u2, succ u1} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a b)
+Case conversion may be inaccurate. Consider using '#align update_le_update_iff' update_le_update_iff'ₓ'. -/
@[simp]
theorem update_le_update_iff' : update x i a ≤ update x i b ↔ a ≤ b := by
simp [update_le_update_iff]
#align update_le_update_iff' update_le_update_iff'
+/- warning: update_lt_update_iff -> update_lt_update_iff is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LT.lt.{max u1 u2} (forall (a : ι), π a) (Preorder.toLT.{max u1 u2} (forall (a : ι), π a) (Pi.preorder.{u1, u2} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u1, succ u2} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LT.lt.{u2} (π i) (Preorder.toLT.{u2} (π i) (_inst_2 i)) a b)
+but is expected to have type
+ forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LT.lt.{max u2 u1} (forall (a : ι), π a) (Preorder.toLT.{max u2 u1} (forall (a : ι), π a) (Pi.preorder.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => _inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u2, succ u1} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) x i b)) (LT.lt.{u1} (π i) (Preorder.toLT.{u1} (π i) (_inst_2 i)) a b)
+Case conversion may be inaccurate. Consider using '#align update_lt_update_iff update_lt_update_iffₓ'. -/
@[simp]
theorem update_lt_update_iff : update x i a < update x i b ↔ a < b :=
lt_iff_lt_of_le_iff_le' update_le_update_iff' update_le_update_iff'
mathlib commit https://github.com/leanprover-community/mathlib/commit/52932b3a083d4142e78a15dc928084a22fea9ba0
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
! This file was ported from Lean 3 source module order.basic
-! leanprover-community/mathlib commit 210657c4ea4a4a7b234392f70a3a2a83346dfa90
+! leanprover-community/mathlib commit 90df25ded755a2cf9651ea850d1abe429b1e4eb1
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -1218,6 +1218,16 @@ theorem update_le_update_iff :
simp (config := { contextual := true }) [update_le_iff]
#align update_le_update_iff update_le_update_iff
+@[simp]
+theorem update_le_update_iff' : update x i a ≤ update x i b ↔ a ≤ b := by
+ simp [update_le_update_iff]
+#align update_le_update_iff' update_le_update_iff'
+
+@[simp]
+theorem update_lt_update_iff : update x i a < update x i b ↔ a < b :=
+ lt_iff_lt_of_le_iff_le' update_le_update_iff' update_le_update_iff'
+#align update_lt_update_iff update_lt_update_iff
+
/- warning: le_update_self_iff -> le_update_self_iff is a dubious translation:
lean 3 declaration is
forall {ι : Type.{u1}} {π : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Preorder.{u2} (π i)] {x : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u1 u2} (forall (i : ι), π i) (Pi.hasLe.{u1, u2} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u2} (π i) (_inst_2 i))) x (Function.update.{succ u1, succ u2} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a)) (LE.le.{u2} (π i) (Preorder.toLE.{u2} (π i) (_inst_2 i)) (x i) a)
mathlib commit https://github.com/leanprover-community/mathlib/commit/039ef89bef6e58b32b62898dd48e9d1a4312bb65
@@ -494,9 +494,11 @@ theorem lt_iff_le_and_ne [PartialOrder α] {a b : α} : a < b ↔ a ≤ b ∧ a
#align lt_iff_le_and_ne lt_iff_le_and_ne
-/
+#print eq_iff_not_lt_of_le /-
theorem eq_iff_not_lt_of_le {α} [PartialOrder α] {x y : α} : x ≤ y → y = x ↔ ¬x < y := by
rw [lt_iff_le_and_ne, not_and, Classical.not_not, eq_comm]
#align eq_iff_not_lt_of_le eq_iff_not_lt_of_le
+-/
#print Decidable.eq_iff_le_not_lt /-
-- See Note [decidable namespace]
mathlib commit https://github.com/leanprover-community/mathlib/commit/88fcb83fe7996142dfcfe7368d31304a9adc874a
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
! This file was ported from Lean 3 source module order.basic
-! leanprover-community/mathlib commit de87d5053a9fe5cbde723172c0fb7e27e7436473
+! leanprover-community/mathlib commit 210657c4ea4a4a7b234392f70a3a2a83346dfa90
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -494,6 +494,10 @@ theorem lt_iff_le_and_ne [PartialOrder α] {a b : α} : a < b ↔ a ≤ b ∧ a
#align lt_iff_le_and_ne lt_iff_le_and_ne
-/
+theorem eq_iff_not_lt_of_le {α} [PartialOrder α] {x y : α} : x ≤ y → y = x ↔ ¬x < y := by
+ rw [lt_iff_le_and_ne, not_and, Classical.not_not, eq_comm]
+#align eq_iff_not_lt_of_le eq_iff_not_lt_of_le
+
#print Decidable.eq_iff_le_not_lt /-
-- See Note [decidable namespace]
protected theorem Decidable.eq_iff_le_not_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
mathlib commit https://github.com/leanprover-community/mathlib/commit/0148d455199ed64bf8eb2f493a1e7eb9211ce170
@@ -522,9 +522,11 @@ theorem eq_or_gt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : b = a ∨ a
#align eq_or_gt_of_le eq_or_gt_of_le
-/
+#print gt_or_eq_of_le /-
theorem gt_or_eq_of_le [PartialOrder α] {a b : α} (hab : a ≤ b) : a < b ∨ b = a :=
(eq_or_gt_of_le hab).symm
#align gt_or_eq_of_le gt_or_eq_of_le
+-/
alias Decidable.eq_or_lt_of_le ← LE.le.eq_or_lt_dec
#align has_le.le.eq_or_lt_dec LE.le.eq_or_lt_dec
mathlib commit https://github.com/leanprover-community/mathlib/commit/0148d455199ed64bf8eb2f493a1e7eb9211ce170
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
! This file was ported from Lean 3 source module order.basic
-! leanprover-community/mathlib commit 1f0096e6caa61e9c849ec2adbd227e960e9dff58
+! leanprover-community/mathlib commit de87d5053a9fe5cbde723172c0fb7e27e7436473
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -522,6 +522,10 @@ theorem eq_or_gt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : b = a ∨ a
#align eq_or_gt_of_le eq_or_gt_of_le
-/
+theorem gt_or_eq_of_le [PartialOrder α] {a b : α} (hab : a ≤ b) : a < b ∨ b = a :=
+ (eq_or_gt_of_le hab).symm
+#align gt_or_eq_of_le gt_or_eq_of_le
+
alias Decidable.eq_or_lt_of_le ← LE.le.eq_or_lt_dec
#align has_le.le.eq_or_lt_dec LE.le.eq_or_lt_dec
@@ -531,6 +535,9 @@ alias eq_or_lt_of_le ← LE.le.eq_or_lt
alias eq_or_gt_of_le ← LE.le.eq_or_gt
#align has_le.le.eq_or_gt LE.le.eq_or_gt
+alias gt_or_eq_of_le ← LE.le.gt_or_eq
+#align has_le.le.gt_or_eq LE.le.gt_or_eq
+
attribute [nolint decidable_classical] LE.le.eq_or_lt_dec
#print eq_of_le_of_not_lt /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -1681,7 +1681,7 @@ instance OrderDual.denselyOrdered (α : Type u) [LT α] [DenselyOrdered α] : De
@[simp]
theorem denselyOrdered_orderDual [LT α] : DenselyOrdered αᵒᵈ ↔ DenselyOrdered α :=
⟨by
- convert @OrderDual.denselyOrdered αᵒᵈ _
+ convert@OrderDual.denselyOrdered αᵒᵈ _
cases ‹LT α›
rfl, @OrderDual.denselyOrdered α _⟩
#align densely_ordered_order_dual denselyOrdered_orderDual
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
@@ -1175,7 +1175,7 @@ lean 3 declaration is
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u2 u1} (forall (i : ι), π i) (Pi.hasLe.{u2, u1} ι (fun (i : ι) => π i) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) x (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) y i a)) (And (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) (x i) a) (forall (j : ι), (Ne.{succ u2} ι j i) -> (LE.le.{u1} (π j) (Preorder.toLE.{u1} (π j) (_inst_2 j)) (x j) (y j))))
Case conversion may be inaccurate. Consider using '#align le_update_iff le_update_iffₓ'. -/
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
theorem le_update_iff : x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => x j ≤ z
#align le_update_iff le_update_iff
@@ -1186,7 +1186,7 @@ lean 3 declaration is
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) y) (And (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a (y i)) (forall (j : ι), (Ne.{succ u2} ι j i) -> (LE.le.{u1} (π j) (Preorder.toLE.{u1} (π j) (_inst_2 j)) (x j) (y j))))
Case conversion may be inaccurate. Consider using '#align update_le_iff update_le_iffₓ'. -/
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
theorem update_le_iff : Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z => z ≤ y j
#align update_le_iff update_le_iff
@@ -1197,7 +1197,7 @@ lean 3 declaration is
but is expected to have type
forall {ι : Type.{u2}} {π : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Preorder.{u1} (π i)] {x : forall (i : ι), π i} {y : forall (i : ι), π i} {i : ι} {a : π i} {b : π i}, Iff (LE.le.{max u2 u1} (forall (a : ι), π a) (Pi.hasLe.{u2, u1} ι (fun (a : ι) => π a) (fun (i : ι) => Preorder.toLE.{u1} (π i) (_inst_2 i))) (Function.update.{succ u2, succ u1} ι (fun (i : ι) => π i) (fun (a : ι) (b : ι) => _inst_1 a b) x i a) (Function.update.{succ u2, succ u1} ι (fun (a : ι) => π a) (fun (a : ι) (b : ι) => _inst_1 a b) y i b)) (And (LE.le.{u1} (π i) (Preorder.toLE.{u1} (π i) (_inst_2 i)) a b) (forall (j : ι), (Ne.{succ u2} ι j i) -> (LE.le.{u1} (π j) (Preorder.toLE.{u1} (π j) (_inst_2 j)) (x j) (y j))))
Case conversion may be inaccurate. Consider using '#align update_le_update_iff update_le_update_iffₓ'. -/
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (j «expr ≠ » i) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
theorem update_le_update_iff :
Function.update x i a ≤ Function.update y i b ↔ a ≤ b ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j := by
simp (config := { contextual := true }) [update_le_iff]
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -1361,27 +1361,27 @@ end MinMaxRec
/-! ### `has_sup` and `has_inf` -/
-#print HasSup /-
+#print Sup /-
/-- Typeclass for the `⊔` (`\lub`) notation -/
@[notation_class]
-class HasSup (α : Type u) where
+class Sup (α : Type u) where
sup : α → α → α
-#align has_sup HasSup
+#align has_sup Sup
-/
-#print HasInf /-
+#print Inf /-
/-- Typeclass for the `⊓` (`\glb`) notation -/
@[notation_class]
-class HasInf (α : Type u) where
+class Inf (α : Type u) where
inf : α → α → α
-#align has_inf HasInf
+#align has_inf Inf
-/
-- mathport name: «expr ⊔ »
-infixl:68 " ⊔ " => HasSup.sup
+infixl:68 " ⊔ " => Sup.sup
-- mathport name: «expr ⊓ »
-infixl:69 " ⊓ " => HasInf.inf
+infixl:69 " ⊓ " => Inf.inf
/-! ### Lifts of order instances -/
@@ -1411,16 +1411,16 @@ def PartialOrder.lift {α β} [PartialOrder β] (f : α → β) (inj : Injective
/- warning: linear_order.lift -> LinearOrder.lift is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u2} β] [_inst_2 : HasSup.{u1} α] [_inst_3 : HasInf.{u1} α] (f : α -> β), (Function.Injective.{succ u1, succ u2} α β f) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HasSup.sup.{u1} α _inst_2 x y)) (LinearOrder.max.{u2} β _inst_1 (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HasInf.inf.{u1} α _inst_3 x y)) (LinearOrder.min.{u2} β _inst_1 (f x) (f y))) -> (LinearOrder.{u1} α)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u2} β] [_inst_2 : Sup.{u1} α] [_inst_3 : Inf.{u1} α] (f : α -> β), (Function.Injective.{succ u1, succ u2} α β f) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (Sup.sup.{u1} α _inst_2 x y)) (LinearOrder.max.{u2} β _inst_1 (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (Inf.inf.{u1} α _inst_3 x y)) (LinearOrder.min.{u2} β _inst_1 (f x) (f y))) -> (LinearOrder.{u1} α)
but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u2} β] [_inst_2 : HasSup.{u1} α] [_inst_3 : HasInf.{u1} α] (f : α -> β), (Function.Injective.{succ u1, succ u2} α β f) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HasSup.sup.{u1} α _inst_2 x y)) (Max.max.{u2} β (LinearOrder.toMax.{u2} β _inst_1) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HasInf.inf.{u1} α _inst_3 x y)) (Min.min.{u2} β (LinearOrder.toMin.{u2} β _inst_1) (f x) (f y))) -> (LinearOrder.{u1} α)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LinearOrder.{u2} β] [_inst_2 : Sup.{u1} α] [_inst_3 : Inf.{u1} α] (f : α -> β), (Function.Injective.{succ u1, succ u2} α β f) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (Sup.sup.{u1} α _inst_2 x y)) (Max.max.{u2} β (LinearOrder.toMax.{u2} β _inst_1) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (Inf.inf.{u1} α _inst_3 x y)) (Min.min.{u2} β (LinearOrder.toMin.{u2} β _inst_1) (f x) (f y))) -> (LinearOrder.{u1} α)
Case conversion may be inaccurate. Consider using '#align linear_order.lift LinearOrder.liftₓ'. -/
/-- Transfer a `linear_order` on `β` to a `linear_order` on `α` using an injective
function `f : α → β`. This version takes `[has_sup α]` and `[has_inf α]` as arguments, then uses
them for `max` and `min` fields. See `linear_order.lift'` for a version that autogenerates `min` and
`max` fields. See note [reducible non-instances]. -/
@[reducible]
-def LinearOrder.lift {α β} [LinearOrder β] [HasSup α] [HasInf α] (f : α → β) (inj : Injective f)
+def LinearOrder.lift {α β} [LinearOrder β] [Sup α] [Inf α] (f : α → β) (inj : Injective f)
(hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
LinearOrder α :=
{
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -163,11 +163,6 @@ section
variable [Preorder α] {a b c : α}
-/-- A version of `le_refl` where the argument is implicit -/
-theorem le_rfl : a ≤ a :=
- le_refl a
-#align le_rfl le_rfl
-
@[simp]
theorem lt_self_iff_false (x : α) : x < x ↔ False :=
⟨lt_irrefl x, False.elim⟩
λ
by fun
(#11301)
Per the style guidelines, λ
is disallowed in mathlib.
This is close to exhaustive; I left some tactic code alone when it seemed to me that tactic could be upstreamed soon.
Notes
=>
to ↦
.Mathlib/Order/SupClosed
.λ x,
, which I also replaced.@@ -832,13 +832,13 @@ instance instPartialOrder (α : Type*) [PartialOrder α] : PartialOrder αᵒᵈ
instance instLinearOrder (α : Type*) [LinearOrder α] : LinearOrder αᵒᵈ where
__ := inferInstanceAs (PartialOrder αᵒᵈ)
- le_total := λ a b : α => le_total b a
+ le_total := fun a b : α ↦ le_total b a
max := fun a b ↦ (min a b : α)
min := fun a b ↦ (max a b : α)
min_def := fun a b ↦ show (max .. : α) = _ by rw [max_comm, max_def]; rfl
max_def := fun a b ↦ show (min .. : α) = _ by rw [min_comm, min_def]; rfl
- decidableLE := (inferInstance : DecidableRel (λ a b : α => b ≤ a))
- decidableLT := (inferInstance : DecidableRel (λ a b : α => b < a))
+ decidableLE := (inferInstance : DecidableRel (fun a b : α ↦ b ≤ a))
+ decidableLT := (inferInstance : DecidableRel (fun a b : α ↦ b < a))
#align order_dual.linear_order OrderDual.instLinearOrder
instance : ∀ [Inhabited α], Inhabited αᵒᵈ := fun [x : Inhabited α] => x
inst
prefix to instance names (#11238)
This is not exhaustive; it largely does not rename instances that relate to algebra, and only focuses on the "core" order files.
@@ -1247,7 +1247,7 @@ instance decidableLT [Preorder α] [h : @DecidableRel α (· < ·)] {p : α →
/-- A subtype of a linear order is a linear order. We explicitly give the proofs of decidable
equality and decidable order in order to ensure the decidability instances are all definitionally
equal. -/
-instance linearOrder [LinearOrder α] (p : α → Prop) : LinearOrder (Subtype p) :=
+instance instLinearOrder [LinearOrder α] (p : α → Prop) : LinearOrder (Subtype p) :=
@LinearOrder.lift (Subtype p) _ _ ⟨fun x y ↦ ⟨max x y, max_rec' _ x.2 y.2⟩⟩
⟨fun x y ↦ ⟨min x y, min_rec' _ x.2 y.2⟩⟩ (fun (a : Subtype p) ↦ (a : α))
Subtype.coe_injective (fun _ _ ↦ rfl) fun _ _ ↦
@@ -1432,7 +1432,7 @@ namespace PUnit
variable (a b : PUnit.{u + 1})
-instance linearOrder : LinearOrder PUnit where
+instance instLinearOrder : LinearOrder PUnit where
le := fun _ _ ↦ True
lt := fun _ _ ↦ False
max := fun _ _ ↦ unit
@@ -1268,7 +1268,7 @@ namespace Prod
instance (α : Type u) (β : Type v) [LE α] [LE β] : LE (α × β) :=
⟨fun p q ↦ p.1 ≤ q.1 ∧ p.2 ≤ q.2⟩
--- Porting note: new instance
+-- Porting note (#10754): new instance
instance instDecidableLE (α : Type u) (β : Type v) [LE α] [LE β] (x y : α × β)
[Decidable (x.1 ≤ y.1)] [Decidable (x.2 ≤ y.2)] : Decidable (x ≤ y) := And.decidable
@@ -1454,12 +1454,12 @@ theorem min_eq : min a b = unit :=
rfl
#align punit.min_eq PUnit.min_eq
--- Porting note: simp can prove this @[simp]
+-- Porting note (#10618): simp can prove this @[simp]
protected theorem le : a ≤ b :=
trivial
#align punit.le PUnit.le
--- Porting note: simp can prove this @[simp]
+-- Porting note (#10618): simp can prove this @[simp]
theorem not_lt : ¬a < b :=
not_false
#align punit.not_lt PUnit.not_lt
Data.Real.CauSeq
to Algebra.Order.CauSeq.Basic
Data.Real.CauSeqCompletion
to Algebra.Order.CauSeq.Completion
CauSeq
from Data.Complex.Exponential
to a new file Algebra.Order.CauSeq.BigOperators
Module
from Algebra.BigOperators.Intervals
to a new file Algebra.BigOperators.Module
abv_sum_le_sum_abv
as it's a duplicate of IsAbsoluteValue.abv_sum
@@ -487,6 +487,13 @@ theorem exists_ge_of_linear [LinearOrder α] (a b : α) : ∃ c, a ≤ c ∧ b
| Or.inr h => ⟨_, le_rfl, h⟩
#align exists_ge_of_linear exists_ge_of_linear
+lemma exists_forall_ge_and [LinearOrder α] {p q : α → Prop} :
+ (∃ i, ∀ j ≥ i, p j) → (∃ i, ∀ j ≥ i, q j) → ∃ i, ∀ j ≥ i, p j ∧ q j
+ | ⟨a, ha⟩, ⟨b, hb⟩ =>
+ let ⟨c, hac, hbc⟩ := exists_ge_of_linear a b
+ ⟨c, fun _d hcd ↦ ⟨ha _ $ hac.trans hcd, hb _ $ hbc.trans hcd⟩⟩
+#align exists_forall_ge_and exists_forall_ge_and
+
theorem lt_imp_lt_of_le_imp_le {β} [LinearOrder α] [Preorder β] {a b : α} {c d : β}
(H : a ≤ b → c ≤ d) (h : d < c) : b < a :=
lt_of_not_le fun h' ↦ (H h').not_lt h
@@ -9,7 +9,6 @@ import Mathlib.Data.Subtype
import Mathlib.Tactic.Spread
import Mathlib.Tactic.Convert
import Mathlib.Tactic.SimpRw
-import Mathlib.Tactic.Classical
import Mathlib.Tactic.Cases
import Mathlib.Order.Notation
With this change (and future similar changes), we can avoid importing heavier files if we only need notation, not lemmas.
@@ -11,6 +11,7 @@ import Mathlib.Tactic.Convert
import Mathlib.Tactic.SimpRw
import Mathlib.Tactic.Classical
import Mathlib.Tactic.Cases
+import Mathlib.Order.Notation
#align_import order.basic from "leanprover-community/mathlib"@"90df25ded755a2cf9651ea850d1abe429b1e4eb1"
@@ -35,9 +36,6 @@ classes and allows to transfer order instances.
### Extra class
-* `Sup`: type class for the `⊔` notation
-* `Inf`: type class for the `⊓` notation
-* `HasCompl`: type class for the `ᶜ` notation
* `DenselyOrdered`: An order with no gap, i.e. for any two elements `a < b` there exists `c` such
that `a < c < b`.
@@ -794,7 +792,6 @@ end ltByCases
/-! ### Order dual -/
-
/-- Type synonym to equip a type with the dual order: `≤` means `≥` and `<` means `>`. `αᵒᵈ` is
notation for `OrderDual α`. -/
def OrderDual (α : Type*) : Type _ :=
@@ -859,18 +856,6 @@ end OrderDual
/-! ### `HasCompl` -/
-/-- Set / lattice complement -/
-@[notation_class]
-class HasCompl (α : Type*) where
- /-- Set / lattice complement -/
- compl : α → α
-#align has_compl HasCompl
-
-export HasCompl (compl)
-
-@[inherit_doc]
-postfix:1024 "ᶜ" => compl
-
instance Prop.hasCompl : HasCompl Prop :=
⟨Not⟩
#align Prop.has_compl Prop.hasCompl
@@ -1077,32 +1062,8 @@ theorem max_def_lt (x y : α) : max x y = if x < y then y else x := by
end MinMaxRec
-/-! ### `Sup` and `Inf` -/
-
-
-/-- Typeclass for the `⊔` (`\lub`) notation -/
-@[notation_class, ext]
-class Sup (α : Type u) where
- /-- Least upper bound (`\lub` notation) -/
- sup : α → α → α
-#align has_sup Sup
-
-/-- Typeclass for the `⊓` (`\glb`) notation -/
-@[notation_class, ext]
-class Inf (α : Type u) where
- /-- Greatest lower bound (`\glb` notation) -/
- inf : α → α → α
-#align has_inf Inf
-
-@[inherit_doc]
-infixl:68 " ⊔ " => Sup.sup
-
-@[inherit_doc]
-infixl:69 " ⊓ " => Inf.inf
-
/-! ### Lifts of order instances -/
-
/-- Transfer a `Preorder` on `β` to a `Preorder` on `α` using a function `f : α → β`.
See note [reducible non-instances]. -/
@[reducible]
ltByCases
API (#9114)
I noticed that ltByCases
doesn't have any API, and it would be useful to have some when working trichotomously, especially if one wishes to define things trichotomously.
A non-dependent version is also defined.
@@ -238,7 +238,6 @@ theorem not_gt (h : x = y) : ¬y < x :=
end Eq
-
section
variable [Preorder α] {a b : α}
@@ -676,6 +675,123 @@ instance Order.Preimage.decidable {α β} (f : α → β) (s : β → β → Pro
DecidableRel (f ⁻¹'o s) := fun _ _ ↦ H _ _
#align order.preimage.decidable Order.Preimage.decidable
+section ltByCases
+
+variable [LinearOrder α] {P : Sort*} {x y : α}
+
+@[simp]
+lemma ltByCases_lt (h : x < y) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P} :
+ ltByCases x y h₁ h₂ h₃ = h₁ h := dif_pos h
+
+@[simp]
+lemma ltByCases_gt (h : y < x) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P} :
+ ltByCases x y h₁ h₂ h₃ = h₃ h := (dif_neg h.not_lt).trans (dif_pos h)
+
+@[simp]
+lemma ltByCases_eq (h : x = y) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P} :
+ ltByCases x y h₁ h₂ h₃ = h₂ h := (dif_neg h.not_lt).trans (dif_neg h.not_gt)
+
+lemma ltByCases_not_lt (h : ¬ x < y) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P}
+ (p : ¬ y < x → x = y := fun h' => (le_antisymm (le_of_not_gt h') (le_of_not_gt h))) :
+ ltByCases x y h₁ h₂ h₃ = if h' : y < x then h₃ h' else h₂ (p h') := dif_neg h
+
+lemma ltByCases_not_gt (h : ¬ y < x) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P}
+ (p : ¬ x < y → x = y := fun h' => (le_antisymm (le_of_not_gt h) (le_of_not_gt h'))) :
+ ltByCases x y h₁ h₂ h₃ = if h' : x < y then h₁ h' else h₂ (p h') :=
+ dite_congr rfl (fun _ => rfl) (fun _ => dif_neg h)
+
+lemma ltByCases_ne (h : x ≠ y) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P}
+ (p : ¬ x < y → y < x := fun h' => h.lt_or_lt.resolve_left h') :
+ ltByCases x y h₁ h₂ h₃ = if h' : x < y then h₁ h' else h₃ (p h') :=
+ dite_congr rfl (fun _ => rfl) (fun _ => dif_pos _)
+
+lemma ltByCases_comm {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P}
+ (p : y = x → x = y := fun h' => h'.symm) :
+ ltByCases x y h₁ h₂ h₃ = ltByCases y x h₃ (h₂ ∘ p) h₁ := by
+ refine ltByCases x y (fun h => ?_) (fun h => ?_) (fun h => ?_)
+ · rw [ltByCases_lt h, ltByCases_gt h]
+ · rw [ltByCases_eq h, ltByCases_eq h.symm, comp_apply]
+ · rw [ltByCases_lt h, ltByCases_gt h]
+
+lemma eq_iff_eq_of_lt_iff_lt_of_gt_iff_gt {x' y' : α}
+ (ltc : (x < y) ↔ (x' < y')) (gtc : (y < x) ↔ (y' < x')) :
+ x = y ↔ x' = y' := by simp_rw [eq_iff_le_not_lt, ← not_lt, ltc, gtc]
+
+lemma ltByCases_rec {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P} (p : P)
+ (hlt : (h : x < y) → h₁ h = p) (heq : (h : x = y) → h₂ h = p)
+ (hgt : (h : y < x) → h₃ h = p) :
+ ltByCases x y h₁ h₂ h₃ = p :=
+ ltByCases x y
+ (fun h => ltByCases_lt h ▸ hlt h)
+ (fun h => ltByCases_eq h ▸ heq h)
+ (fun h => ltByCases_gt h ▸ hgt h)
+
+lemma ltByCases_eq_iff {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P} {p : P} :
+ ltByCases x y h₁ h₂ h₃ = p ↔ (∃ h, h₁ h = p) ∨ (∃ h, h₂ h = p) ∨ (∃ h, h₃ h = p) := by
+ refine ltByCases x y (fun h => ?_) (fun h => ?_) (fun h => ?_)
+ · simp only [ltByCases_lt, exists_prop_of_true, h, h.not_lt, not_false_eq_true,
+ exists_prop_of_false, or_false, h.ne]
+ · simp only [h, lt_self_iff_false, ltByCases_eq, not_false_eq_true,
+ exists_prop_of_false, exists_prop_of_true, or_false, false_or]
+ · simp only [ltByCases_gt, exists_prop_of_true, h, h.not_lt, not_false_eq_true,
+ exists_prop_of_false, false_or, h.ne']
+
+lemma ltByCases_congr {x' y' : α} {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P}
+ {h₁' : x' < y' → P} {h₂' : x' = y' → P} {h₃' : y' < x' → P} (ltc : (x < y) ↔ (x' < y'))
+ (gtc : (y < x) ↔ (y' < x')) (hh'₁ : ∀ (h : x' < y'), h₁ (ltc.mpr h) = h₁' h)
+ (hh'₂ : ∀ (h : x' = y'), h₂ ((eq_iff_eq_of_lt_iff_lt_of_gt_iff_gt ltc gtc).mpr h) = h₂' h)
+ (hh'₃ : ∀ (h : y' < x'), h₃ (gtc.mpr h) = h₃' h) :
+ ltByCases x y h₁ h₂ h₃ = ltByCases x' y' h₁' h₂' h₃' := by
+ refine ltByCases_rec _ (fun h => ?_) (fun h => ?_) (fun h => ?_)
+ · rw [ltByCases_lt (ltc.mp h), hh'₁]
+ · rw [eq_iff_eq_of_lt_iff_lt_of_gt_iff_gt ltc gtc] at h
+ rw [ltByCases_eq h, hh'₂]
+ · rw [ltByCases_gt (gtc.mp h), hh'₃]
+
+/-- Perform a case-split on the ordering of `x` and `y` in a decidable linear order,
+non-dependently. -/
+abbrev ltTrichotomy (x y : α) (p q r : P) := ltByCases x y (fun _ => p) (fun _ => q) (fun _ => r)
+
+variable {p q r s : P}
+
+@[simp]
+lemma ltTrichotomy_lt (h : x < y) : ltTrichotomy x y p q r = p := ltByCases_lt h
+
+@[simp]
+lemma ltTrichotomy_gt (h : y < x) : ltTrichotomy x y p q r = r := ltByCases_gt h
+
+@[simp]
+lemma ltTrichotomy_eq (h : x = y) : ltTrichotomy x y p q r = q := ltByCases_eq h
+
+lemma ltTrichotomy_not_lt (h : ¬ x < y) :
+ ltTrichotomy x y p q r = if y < x then r else q := ltByCases_not_lt h
+
+lemma ltTrichotomy_not_gt (h : ¬ y < x) :
+ ltTrichotomy x y p q r = if x < y then p else q := ltByCases_not_gt h
+
+lemma ltTrichotomy_ne (h : x ≠ y) :
+ ltTrichotomy x y p q r = if x < y then p else r := ltByCases_ne h
+
+lemma ltTrichotomy_comm : ltTrichotomy x y p q r = ltTrichotomy y x r q p := ltByCases_comm
+
+lemma ltTrichotomy_self {p : P} : ltTrichotomy x y p p p = p :=
+ ltByCases_rec p (fun _ => rfl) (fun _ => rfl) (fun _ => rfl)
+
+lemma ltTrichotomy_eq_iff : ltTrichotomy x y p q r = s ↔
+ (x < y ∧ p = s) ∨ (x = y ∧ q = s) ∨ (y < x ∧ r = s) := by
+ refine ltByCases x y (fun h => ?_) (fun h => ?_) (fun h => ?_)
+ · simp only [ltTrichotomy_lt, false_and, true_and, or_false, h, h.not_lt, h.ne]
+ · simp only [ltTrichotomy_eq, false_and, true_and, or_false, false_or, h, lt_irrefl]
+ · simp only [ltTrichotomy_gt, false_and, true_and, false_or, h, h.not_lt, h.ne']
+
+lemma ltTrichotomy_congr {x' y' : α} {p' q' r' : P} (ltc : (x < y) ↔ (x' < y'))
+ (gtc : (y < x) ↔ (y' < x')) (hh'₁ : x' < y' → p = p')
+ (hh'₂ : x' = y' → q = q') (hh'₃ : y' < x' → r = r') :
+ ltTrichotomy x y p q r = ltTrichotomy x' y' p' q' r' :=
+ ltByCases_congr ltc gtc hh'₁ hh'₂ hh'₃
+
+end ltByCases
+
/-! ### Order dual -/
@@ -176,20 +176,9 @@ theorem lt_self_iff_false (x : α) : x < x ↔ False :=
⟨lt_irrefl x, False.elim⟩
#align lt_self_iff_false lt_self_iff_false
-theorem le_of_le_of_eq (hab : a ≤ b) (hbc : b = c) : a ≤ c :=
- hab.trans hbc.le
#align le_of_le_of_eq le_of_le_of_eq
-
-theorem le_of_eq_of_le (hab : a = b) (hbc : b ≤ c) : a ≤ c :=
- hab.le.trans hbc
#align le_of_eq_of_le le_of_eq_of_le
-
-theorem lt_of_lt_of_eq (hab : a < b) (hbc : b = c) : a < c :=
- hab.trans_le hbc.le
#align lt_of_lt_of_eq lt_of_lt_of_eq
-
-theorem lt_of_eq_of_lt (hab : a = b) (hbc : b < c) : a < c :=
- hab.le.trans_lt hbc
#align lt_of_eq_of_lt lt_of_eq_of_lt
theorem le_of_le_of_eq' : b ≤ c → a = b → a ≤ c :=
@@ -353,18 +342,7 @@ theorem ge_of_eq [Preorder α] {a b : α} (h : a = b) : a ≥ b :=
h.ge
#align ge_of_eq ge_of_eq
--- see Note [nolint_ge]
--- Porting note: linter not found @[nolint ge_or_gt]
-@[simp]
-theorem ge_iff_le [LE α] {a b : α} : a ≥ b ↔ b ≤ a :=
- Iff.rfl
#align ge_iff_le ge_iff_le
-
--- see Note [nolint_ge]
--- Porting note: linter not found @[nolint ge_or_gt]
-@[simp]
-theorem gt_iff_lt [LT α] {a b : α} : a > b ↔ b < a :=
- Iff.rfl
#align gt_iff_lt gt_iff_lt
theorem not_le_of_lt [Preorder α] {a b : α} (h : a < b) : ¬b ≤ a :=
@@ -1371,7 +1371,7 @@ namespace PUnit
variable (a b : PUnit.{u + 1})
-instance linearOrder: LinearOrder PUnit where
+instance linearOrder : LinearOrder PUnit where
le := fun _ _ ↦ True
lt := fun _ _ ↦ False
max := fun _ _ ↦ unit
The result of extending a nonnegative function by a nonnegative function is nonnegative.
@@ -1452,3 +1452,41 @@ noncomputable instance AsLinearOrder.linearOrder {α} [PartialOrder α] [IsTotal
le_total := @total_of α (· ≤ ·) _
decidableLE := Classical.decRel _
#align as_linear_order.linear_order AsLinearOrder.linearOrder
+
+section dite
+variable [One α] {p : Prop} [Decidable p] {a : p → α} {b : ¬ p → α}
+
+@[to_additive dite_nonneg]
+lemma one_le_dite [LE α] (ha : ∀ h, 1 ≤ a h) (hb : ∀ h, 1 ≤ b h) : 1 ≤ dite p a b := by
+ split; exacts [ha ‹_›, hb ‹_›]
+
+@[to_additive]
+lemma dite_le_one [LE α] (ha : ∀ h, a h ≤ 1) (hb : ∀ h, b h ≤ 1) : dite p a b ≤ 1 := by
+ split; exacts [ha ‹_›, hb ‹_›]
+
+@[to_additive dite_pos]
+lemma one_lt_dite [LT α] (ha : ∀ h, 1 < a h) (hb : ∀ h, 1 < b h) : 1 < dite p a b := by
+ split; exacts [ha ‹_›, hb ‹_›]
+
+@[to_additive]
+lemma dite_lt_one [LT α] (ha : ∀ h, a h < 1) (hb : ∀ h, b h < 1) : dite p a b < 1 := by
+ split; exacts [ha ‹_›, hb ‹_›]
+
+end dite
+
+section
+variable [One α] {p : Prop} [Decidable p] {a b : α}
+
+@[to_additive ite_nonneg]
+lemma one_le_ite [LE α] (ha : 1 ≤ a) (hb : 1 ≤ b) : 1 ≤ ite p a b := by split <;> assumption
+
+@[to_additive]
+lemma ite_le_one [LE α] (ha : a ≤ 1) (hb : b ≤ 1) : ite p a b ≤ 1 := by split <;> assumption
+
+@[to_additive ite_pos]
+lemma one_lt_ite [LT α] (ha : 1 < a) (hb : 1 < b) : 1 < ite p a b := by split <;> assumption
+
+@[to_additive]
+lemma ite_lt_one [LT α] (ha : a < 1) (hb : b < 1) : ite p a b < 1 := by split <;> assumption
+
+end
@@ -735,7 +735,7 @@ instance instPartialOrder (α : Type*) [PartialOrder α] : PartialOrder αᵒᵈ
instance instLinearOrder (α : Type*) [LinearOrder α] : LinearOrder αᵒᵈ where
__ := inferInstanceAs (PartialOrder αᵒᵈ)
- le_total := λ a b : α => le_total b a
+ le_total := λ a b : α => le_total b a
max := fun a b ↦ (min a b : α)
min := fun a b ↦ (max a b : α)
min_def := fun a b ↦ show (max .. : α) = _ by rw [max_comm, max_def]; rfl
I know that this is contrary to what we've done previously, but:
norm_num
/ ring
/ linarith
)(Oh
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -6,6 +6,11 @@ Authors: Jeremy Avigad, Mario Carneiro
import Mathlib.Init.Order.LinearOrder
import Mathlib.Data.Prod.Basic
import Mathlib.Data.Subtype
+import Mathlib.Tactic.Spread
+import Mathlib.Tactic.Convert
+import Mathlib.Tactic.SimpRw
+import Mathlib.Tactic.Classical
+import Mathlib.Tactic.Cases
#align_import order.basic from "leanprover-community/mathlib"@"90df25ded755a2cf9651ea850d1abe429b1e4eb1"
@@ -3,6 +3,7 @@ Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
-/
+import Mathlib.Init.Order.LinearOrder
import Mathlib.Data.Prod.Basic
import Mathlib.Data.Subtype
@@ -111,44 +111,46 @@ attribute [simp] le_refl
attribute [ext] LE
-alias le_trans ← LE.le.trans
+alias LE.le.trans := le_trans
-alias le_trans' ← LE.le.trans'
+alias LE.le.trans' := le_trans'
-alias lt_of_le_of_lt ← LE.le.trans_lt
+alias LE.le.trans_lt := lt_of_le_of_lt
-alias lt_of_le_of_lt' ← LE.le.trans_lt'
+alias LE.le.trans_lt' := lt_of_le_of_lt'
-alias le_antisymm ← LE.le.antisymm
+alias LE.le.antisymm := le_antisymm
-alias ge_antisymm ← LE.le.antisymm'
+alias LE.le.antisymm' := ge_antisymm
-alias lt_of_le_of_ne ← LE.le.lt_of_ne
+alias LE.le.lt_of_ne := lt_of_le_of_ne
-alias lt_of_le_of_ne' ← LE.le.lt_of_ne'
+alias LE.le.lt_of_ne' := lt_of_le_of_ne'
-alias lt_of_le_not_le ← LE.le.lt_of_not_le
+alias LE.le.lt_of_not_le := lt_of_le_not_le
-alias lt_or_eq_of_le ← LE.le.lt_or_eq
+alias LE.le.lt_or_eq := lt_or_eq_of_le
-alias Decidable.lt_or_eq_of_le ← LE.le.lt_or_eq_dec
+alias LE.le.lt_or_eq_dec := Decidable.lt_or_eq_of_le
-alias le_of_lt ← LT.lt.le
+alias LT.lt.le := le_of_lt
-alias lt_trans ← LT.lt.trans
+alias LT.lt.trans := lt_trans
-alias lt_trans' ← LT.lt.trans'
+alias LT.lt.trans' := lt_trans'
-alias lt_of_lt_of_le ← LT.lt.trans_le
+alias LT.lt.trans_le := lt_of_lt_of_le
-alias lt_of_lt_of_le' ← LT.lt.trans_le'
+alias LT.lt.trans_le' := lt_of_lt_of_le'
-alias ne_of_lt ← LT.lt.ne
+alias LT.lt.ne := ne_of_lt
#align has_lt.lt.ne LT.lt.ne
-alias lt_asymm ← LT.lt.asymm LT.lt.not_lt
+alias LT.lt.asymm := lt_asymm
-alias le_of_eq ← Eq.le
+alias LT.lt.not_lt := lt_asymm
+
+alias Eq.le := le_of_eq
#align eq.le Eq.le
-- Porting note: no `decidable_classical` linter
@@ -200,24 +202,24 @@ theorem lt_of_eq_of_lt' : b = c → a < b → a < c :=
flip lt_of_lt_of_eq
#align lt_of_eq_of_lt' lt_of_eq_of_lt'
-alias le_of_le_of_eq ← LE.le.trans_eq
+alias LE.le.trans_eq := le_of_le_of_eq
-alias le_of_le_of_eq' ← LE.le.trans_eq'
+alias LE.le.trans_eq' := le_of_le_of_eq'
-alias lt_of_lt_of_eq ← LT.lt.trans_eq
+alias LT.lt.trans_eq := lt_of_lt_of_eq
-alias lt_of_lt_of_eq' ← LT.lt.trans_eq'
+alias LT.lt.trans_eq' := lt_of_lt_of_eq'
-alias le_of_eq_of_le ← Eq.trans_le
+alias Eq.trans_le := le_of_eq_of_le
#align eq.trans_le Eq.trans_le
-alias le_of_eq_of_le' ← Eq.trans_ge
+alias Eq.trans_ge := le_of_eq_of_le'
#align eq.trans_ge Eq.trans_ge
-alias lt_of_eq_of_lt ← Eq.trans_lt
+alias Eq.trans_lt := lt_of_eq_of_lt
#align eq.trans_lt Eq.trans_lt
-alias lt_of_eq_of_lt' ← Eq.trans_gt
+alias Eq.trans_gt := lt_of_eq_of_lt'
#align eq.trans_gt Eq.trans_gt
end
@@ -363,12 +365,12 @@ theorem not_le_of_lt [Preorder α] {a b : α} (h : a < b) : ¬b ≤ a :=
(le_not_le_of_lt h).right
#align not_le_of_lt not_le_of_lt
-alias not_le_of_lt ← LT.lt.not_le
+alias LT.lt.not_le := not_le_of_lt
theorem not_lt_of_le [Preorder α] {a b : α} (h : a ≤ b) : ¬b < a := fun hba ↦ hba.not_le h
#align not_lt_of_le not_lt_of_le
-alias not_lt_of_le ← LE.le.not_lt
+alias LE.le.not_lt := not_lt_of_le
theorem ne_of_not_le [Preorder α] {a b : α} (h : ¬a ≤ b) : a ≠ b := fun hab ↦ h (le_of_eq hab)
#align ne_of_not_le ne_of_not_le
@@ -415,13 +417,13 @@ theorem gt_or_eq_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : a < b ∨ b
(eq_or_gt_of_le h).symm
#align gt_or_eq_of_le gt_or_eq_of_le
-alias Decidable.eq_or_lt_of_le ← LE.le.eq_or_lt_dec
+alias LE.le.eq_or_lt_dec := Decidable.eq_or_lt_of_le
-alias eq_or_lt_of_le ← LE.le.eq_or_lt
+alias LE.le.eq_or_lt := eq_or_lt_of_le
-alias eq_or_gt_of_le ← LE.le.eq_or_gt
+alias LE.le.eq_or_gt := eq_or_gt_of_le
-alias gt_or_eq_of_le ← LE.le.gt_or_eq
+alias LE.le.gt_or_eq := gt_or_eq_of_le
-- Porting note: no `decidable_classical` linter
-- attribute [nolint decidable_classical] LE.le.eq_or_lt_dec
@@ -434,9 +436,9 @@ theorem eq_of_ge_of_not_gt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba :
(hab.eq_or_lt.resolve_right hba).symm
#align eq_of_ge_of_not_gt eq_of_ge_of_not_gt
-alias eq_of_le_of_not_lt ← LE.le.eq_of_not_lt
+alias LE.le.eq_of_not_lt := eq_of_le_of_not_lt
-alias eq_of_ge_of_not_gt ← LE.le.eq_of_not_gt
+alias LE.le.eq_of_not_gt := eq_of_ge_of_not_gt
theorem Ne.le_iff_lt [PartialOrder α] {a b : α} (h : a ≠ b) : a ≤ b ↔ a < b :=
⟨fun h' ↦ lt_of_le_of_ne h' h, fun h ↦ h.le⟩
@@ -852,16 +854,16 @@ theorem strongLT_of_le_of_strongLT (hab : a ≤ b) (hbc : b ≺ c) : a ≺ c :=
(hab _).trans_lt <| hbc _
#align strong_lt_of_le_of_strong_lt strongLT_of_le_of_strongLT
-alias le_of_strongLT ← StrongLT.le
+alias StrongLT.le := le_of_strongLT
#align strong_lt.le StrongLT.le
-alias lt_of_strongLT ← StrongLT.lt
+alias StrongLT.lt := lt_of_strongLT
#align strong_lt.lt StrongLT.lt
-alias strongLT_of_strongLT_of_le ← StrongLT.trans_le
+alias StrongLT.trans_le := strongLT_of_strongLT_of_le
#align strong_lt.trans_le StrongLT.trans_le
-alias strongLT_of_le_of_strongLT ← LE.le.trans_strongLT
+alias LE.le.trans_strongLT := strongLT_of_le_of_strongLT
end Pi
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -62,7 +62,7 @@ open Function
universe u v w
-variable {ι : Type _} {α : Type u} {β : Type v} {γ : Type w} {π : ι → Type _} {r : α → α → Prop}
+variable {ι : Type*} {α : Type u} {β : Type v} {γ : Type w} {π : ι → Type*} {r : α → α → Prop}
section Preorder
@@ -604,7 +604,7 @@ theorem associative_of_commutative_of_le {f : α → α → α} (comm : Commutat
end PartialOrder
@[ext]
-theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.toLE α) :=
+theorem Preorder.toLE_injective {α : Type*} : Function.Injective (@Preorder.toLE α) :=
fun A B h ↦ match A, B with
| { lt := A_lt, lt_iff_le_not_le := A_iff, .. },
{ lt := B_lt, lt_iff_le_not_le := B_iff, .. } => by
@@ -618,7 +618,7 @@ theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.to
#align preorder.to_has_le_injective Preorder.toLE_injective
@[ext]
-theorem PartialOrder.toPreorder_injective {α : Type _} :
+theorem PartialOrder.toPreorder_injective {α : Type*} :
Function.Injective (@PartialOrder.toPreorder α) := fun A B h ↦ by
cases A
cases B
@@ -627,7 +627,7 @@ theorem PartialOrder.toPreorder_injective {α : Type _} :
#align partial_order.to_preorder_injective PartialOrder.toPreorder_injective
@[ext]
-theorem LinearOrder.toPartialOrder_injective {α : Type _} :
+theorem LinearOrder.toPartialOrder_injective {α : Type*} :
Function.Injective (@LinearOrder.toPartialOrder α) :=
fun A B h ↦ match A, B with
| { le := A_le, lt := A_lt,
@@ -695,7 +695,7 @@ instance Order.Preimage.decidable {α β} (f : α → β) (s : β → β → Pro
/-- Type synonym to equip a type with the dual order: `≤` means `≥` and `<` means `>`. `αᵒᵈ` is
notation for `OrderDual α`. -/
-def OrderDual (α : Type _) : Type _ :=
+def OrderDual (α : Type*) : Type _ :=
α
#align order_dual OrderDual
@@ -704,28 +704,28 @@ notation:max α "ᵒᵈ" => OrderDual α
namespace OrderDual
-instance (α : Type _) [h : Nonempty α] : Nonempty αᵒᵈ :=
+instance (α : Type*) [h : Nonempty α] : Nonempty αᵒᵈ :=
h
-instance (α : Type _) [h : Subsingleton α] : Subsingleton αᵒᵈ :=
+instance (α : Type*) [h : Subsingleton α] : Subsingleton αᵒᵈ :=
h
-instance (α : Type _) [LE α] : LE αᵒᵈ :=
+instance (α : Type*) [LE α] : LE αᵒᵈ :=
⟨fun x y : α ↦ y ≤ x⟩
-instance (α : Type _) [LT α] : LT αᵒᵈ :=
+instance (α : Type*) [LT α] : LT αᵒᵈ :=
⟨fun x y : α ↦ y < x⟩
-instance instPreorder (α : Type _) [Preorder α] : Preorder αᵒᵈ where
+instance instPreorder (α : Type*) [Preorder α] : Preorder αᵒᵈ where
le_refl := fun _ ↦ le_refl _
le_trans := fun _ _ _ hab hbc ↦ hbc.trans hab
lt_iff_le_not_le := fun _ _ ↦ lt_iff_le_not_le
-instance instPartialOrder (α : Type _) [PartialOrder α] : PartialOrder αᵒᵈ where
+instance instPartialOrder (α : Type*) [PartialOrder α] : PartialOrder αᵒᵈ where
__ := inferInstanceAs (Preorder αᵒᵈ)
le_antisymm := fun a b hab hba ↦ @le_antisymm α _ a b hba hab
-instance instLinearOrder (α : Type _) [LinearOrder α] : LinearOrder αᵒᵈ where
+instance instLinearOrder (α : Type*) [LinearOrder α] : LinearOrder αᵒᵈ where
__ := inferInstanceAs (PartialOrder αᵒᵈ)
le_total := λ a b : α => le_total b a
max := fun a b ↦ (min a b : α)
@@ -738,16 +738,16 @@ instance instLinearOrder (α : Type _) [LinearOrder α] : LinearOrder αᵒᵈ w
instance : ∀ [Inhabited α], Inhabited αᵒᵈ := fun [x : Inhabited α] => x
-theorem Preorder.dual_dual (α : Type _) [H : Preorder α] : OrderDual.instPreorder αᵒᵈ = H :=
+theorem Preorder.dual_dual (α : Type*) [H : Preorder α] : OrderDual.instPreorder αᵒᵈ = H :=
Preorder.ext fun _ _ ↦ Iff.rfl
#align order_dual.preorder.dual_dual OrderDual.Preorder.dual_dual
-theorem instPartialOrder.dual_dual (α : Type _) [H : PartialOrder α] :
+theorem instPartialOrder.dual_dual (α : Type*) [H : PartialOrder α] :
OrderDual.instPartialOrder αᵒᵈ = H :=
PartialOrder.ext fun _ _ ↦ Iff.rfl
#align order_dual.partial_order.dual_dual OrderDual.instPartialOrder.dual_dual
-theorem instLinearOrder.dual_dual (α : Type _) [H : LinearOrder α] :
+theorem instLinearOrder.dual_dual (α : Type*) [H : LinearOrder α] :
OrderDual.instLinearOrder αᵒᵈ = H :=
LinearOrder.ext fun _ _ ↦ Iff.rfl
#align order_dual.linear_order.dual_dual OrderDual.instLinearOrder.dual_dual
@@ -759,7 +759,7 @@ end OrderDual
/-- Set / lattice complement -/
@[notation_class]
-class HasCompl (α : Type _) where
+class HasCompl (α : Type*) where
/-- Set / lattice complement -/
compl : α → α
#align has_compl HasCompl
@@ -1306,7 +1306,7 @@ instance [Preorder α] [Preorder β] [DenselyOrdered α] [DenselyOrdered β] : D
· obtain ⟨c, ha, hb⟩ := exists_between h₂
exact ⟨(_, c), Or.inr ⟨h₁, ha⟩, Or.inr ⟨le_rfl, hb⟩⟩⟩
-instance {α : ι → Type _} [∀ i, Preorder (α i)] [∀ i, DenselyOrdered (α i)] :
+instance {α : ι → Type*} [∀ i, Preorder (α i)] [∀ i, DenselyOrdered (α i)] :
DenselyOrdered (∀ i, α i) :=
⟨fun a b ↦ by
classical
Per https://github.com/leanprover/lean4/issues/2343, we are going to need to change the automatic generation of instance names, as they become too long.
This PR ensures that everywhere in Mathlib that refers to an instance by name, that name is given explicitly, rather than being automatically generated.
There are four exceptions, which are now commented, with links to https://github.com/leanprover/lean4/issues/2343.
This was implemented by running Mathlib against a modified Lean that appended _ᾰ
to all automatically generated names, and fixing everything.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -716,16 +716,16 @@ instance (α : Type _) [LE α] : LE αᵒᵈ :=
instance (α : Type _) [LT α] : LT αᵒᵈ :=
⟨fun x y : α ↦ y < x⟩
-instance preorder (α : Type _) [Preorder α] : Preorder αᵒᵈ where
+instance instPreorder (α : Type _) [Preorder α] : Preorder αᵒᵈ where
le_refl := fun _ ↦ le_refl _
le_trans := fun _ _ _ hab hbc ↦ hbc.trans hab
lt_iff_le_not_le := fun _ _ ↦ lt_iff_le_not_le
-instance partialOrder (α : Type _) [PartialOrder α] : PartialOrder αᵒᵈ where
+instance instPartialOrder (α : Type _) [PartialOrder α] : PartialOrder αᵒᵈ where
__ := inferInstanceAs (Preorder αᵒᵈ)
le_antisymm := fun a b hab hba ↦ @le_antisymm α _ a b hba hab
-instance linearOrder (α : Type _) [LinearOrder α] : LinearOrder αᵒᵈ where
+instance instLinearOrder (α : Type _) [LinearOrder α] : LinearOrder αᵒᵈ where
__ := inferInstanceAs (PartialOrder αᵒᵈ)
le_total := λ a b : α => le_total b a
max := fun a b ↦ (min a b : α)
@@ -734,21 +734,23 @@ instance linearOrder (α : Type _) [LinearOrder α] : LinearOrder αᵒᵈ where
max_def := fun a b ↦ show (min .. : α) = _ by rw [min_comm, min_def]; rfl
decidableLE := (inferInstance : DecidableRel (λ a b : α => b ≤ a))
decidableLT := (inferInstance : DecidableRel (λ a b : α => b < a))
-#align order_dual.linear_order OrderDual.linearOrder
+#align order_dual.linear_order OrderDual.instLinearOrder
instance : ∀ [Inhabited α], Inhabited αᵒᵈ := fun [x : Inhabited α] => x
-theorem Preorder.dual_dual (α : Type _) [H : Preorder α] : OrderDual.preorder αᵒᵈ = H :=
+theorem Preorder.dual_dual (α : Type _) [H : Preorder α] : OrderDual.instPreorder αᵒᵈ = H :=
Preorder.ext fun _ _ ↦ Iff.rfl
#align order_dual.preorder.dual_dual OrderDual.Preorder.dual_dual
-theorem partialOrder.dual_dual (α : Type _) [H : PartialOrder α] : OrderDual.partialOrder αᵒᵈ = H :=
+theorem instPartialOrder.dual_dual (α : Type _) [H : PartialOrder α] :
+ OrderDual.instPartialOrder αᵒᵈ = H :=
PartialOrder.ext fun _ _ ↦ Iff.rfl
-#align order_dual.partial_order.dual_dual OrderDual.partialOrder.dual_dual
+#align order_dual.partial_order.dual_dual OrderDual.instPartialOrder.dual_dual
-theorem linearOrder.dual_dual (α : Type _) [H : LinearOrder α] : OrderDual.linearOrder αᵒᵈ = H :=
+theorem instLinearOrder.dual_dual (α : Type _) [H : LinearOrder α] :
+ OrderDual.instLinearOrder αᵒᵈ = H :=
LinearOrder.ext fun _ _ ↦ Iff.rfl
-#align order_dual.linear_order.dual_dual OrderDual.linearOrder.dual_dual
+#align order_dual.linear_order.dual_dual OrderDual.instLinearOrder.dual_dual
end OrderDual
@@ -1265,7 +1267,8 @@ end Preorder
/-- The pointwise partial order on a product.
(The lexicographic ordering is defined in `Order.Lexicographic`, and the instances are
available via the type synonym `α ×ₗ β = α × β`.) -/
-instance (α : Type u) (β : Type v) [PartialOrder α] [PartialOrder β] : PartialOrder (α × β) where
+instance instPartialOrder (α : Type u) (β : Type v) [PartialOrder α] [PartialOrder β] :
+ PartialOrder (α × β) where
__ := inferInstanceAs (Preorder (α × β))
le_antisymm := fun _ _ ⟨hac, hbd⟩ ⟨hca, hdb⟩ ↦ Prod.ext (hac.antisymm hca) (hbd.antisymm hdb)
@@ -241,6 +241,18 @@ theorem not_gt (h : x = y) : ¬y < x :=
end Eq
+
+section
+
+variable [Preorder α] {a b : α}
+
+@[simp] lemma le_of_subsingleton [Subsingleton α] : a ≤ b := (Subsingleton.elim a b).le
+
+-- Making this a @[simp] lemma causes confluences problems downstream.
+lemma not_lt_of_subsingleton [Subsingleton α] : ¬a < b := (Subsingleton.elim a b).not_lt
+
+end
+
namespace LE.le
-- see Note [nolint_ge]
@@ -724,8 +736,7 @@ instance linearOrder (α : Type _) [LinearOrder α] : LinearOrder αᵒᵈ where
decidableLT := (inferInstance : DecidableRel (λ a b : α => b < a))
#align order_dual.linear_order OrderDual.linearOrder
-instance : ∀ [Inhabited α], Inhabited αᵒᵈ := λ [x: Inhabited α] => x
-
+instance : ∀ [Inhabited α], Inhabited αᵒᵈ := fun [x : Inhabited α] => x
theorem Preorder.dual_dual (α : Type _) [H : Preorder α] : OrderDual.preorder αᵒᵈ = H :=
Preorder.ext fun _ _ ↦ Iff.rfl
@@ -2,15 +2,12 @@
Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
-
-! This file was ported from Lean 3 source module order.basic
-! leanprover-community/mathlib commit 90df25ded755a2cf9651ea850d1abe429b1e4eb1
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Prod.Basic
import Mathlib.Data.Subtype
+#align_import order.basic from "leanprover-community/mathlib"@"90df25ded755a2cf9651ea850d1abe429b1e4eb1"
+
/-!
# Basic definitions about `≤` and `<`
@@ -624,7 +624,7 @@ theorem LinearOrder.toPartialOrder_injective {α : Type _} :
| { le := A_le, lt := A_lt,
decidableLE := A_decidableLE, decidableEq := A_decidableEq, decidableLT := A_decidableLT
min := A_min, max := A_max, min_def := A_min_def, max_def := A_max_def,
- compare := A_compare, compare_eq_compareOfLessAndEq := A_compare_canonical, .. },
+ compare := A_compare, compare_eq_compareOfLessAndEq := A_compare_canonical, .. },
{ le := B_le, lt := B_lt,
decidableLE := B_decidableLE, decidableEq := B_decidableEq, decidableLT := B_decidableLT
min := B_min, max := B_max, min_def := B_min_def, max_def := B_max_def,
@@ -816,7 +816,7 @@ instance Pi.partialOrder [∀ i, PartialOrder (π i)] : PartialOrder (∀ i, π
section Pi
-/-- A function `a` is strongly less than a function `b` if `a i < b i` for all `i`. -/
+/-- A function `a` is strongly less than a function `b` if `a i < b i` for all `i`. -/
def StrongLT [∀ i, LT (π i)] (a b : ∀ i, π i) : Prop :=
∀ i, a i < b i
#align strong_lt StrongLT
@@ -757,32 +757,32 @@ class HasCompl (α : Type _) where
export HasCompl (compl)
@[inherit_doc]
-postfix:999 "ᶜ" => compl
+postfix:1024 "ᶜ" => compl
instance Prop.hasCompl : HasCompl Prop :=
⟨Not⟩
#align Prop.has_compl Prop.hasCompl
instance Pi.hasCompl {ι : Type u} {α : ι → Type v} [∀ i, HasCompl (α i)] : HasCompl (∀ i, α i) :=
- ⟨fun x i ↦ x iᶜ⟩
+ ⟨fun x i ↦ (x i)ᶜ⟩
#align pi.has_compl Pi.hasCompl
theorem Pi.compl_def {ι : Type u} {α : ι → Type v} [∀ i, HasCompl (α i)] (x : ∀ i, α i) :
- xᶜ = fun i ↦ x iᶜ :=
+ xᶜ = fun i ↦ (x i)ᶜ :=
rfl
#align pi.compl_def Pi.compl_def
@[simp]
theorem Pi.compl_apply {ι : Type u} {α : ι → Type v} [∀ i, HasCompl (α i)] (x : ∀ i, α i) (i : ι) :
- (xᶜ) i = x iᶜ :=
+ xᶜ i = (x i)ᶜ :=
rfl
#align pi.compl_apply Pi.compl_apply
-instance IsIrrefl.compl (r) [IsIrrefl α r] : IsRefl α (rᶜ) :=
+instance IsIrrefl.compl (r) [IsIrrefl α r] : IsRefl α rᶜ :=
⟨@irrefl α r _⟩
#align is_irrefl.compl IsIrrefl.compl
-instance IsRefl.compl (r) [IsRefl α r] : IsIrrefl α (rᶜ) :=
+instance IsRefl.compl (r) [IsRefl α r] : IsIrrefl α rᶜ :=
⟨fun a ↦ not_not_intro (refl a)⟩
#align is_refl.compl IsRefl.compl
Replace some porting notes about refine_struct
with uses of refine'
. We only really miss refine_struct
in situations where we later used pi_instance_derive_field
.
I also exercised some editorial discretion to remove some porting notes about refine_struct
when the original usage was (in my opinion) obfuscatory relative to just writing out the fields. (We shouldn't be using alternatives to handle different fields!)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -1352,7 +1352,6 @@ namespace PUnit
variable (a b : PUnit.{u + 1})
--- Porting note: no `refine_struct` at time of port
instance linearOrder: LinearOrder PUnit where
le := fun _ _ ↦ True
lt := fun _ _ ↦ False
We disable the "relaxed" auto-implicit feature, so only single character identifiers become eligible as auto-implicits. See discussion on zulip and 2.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>
@@ -1367,11 +1367,11 @@ instance linearOrder: LinearOrder PUnit where
le_antisymm := by intros; rfl
lt_iff_le_not_le := by simp only [not_true, and_false, forall_const]
-theorem max_eq : max a b = star :=
+theorem max_eq : max a b = unit :=
rfl
#align punit.max_eq PUnit.max_eq
-theorem min_eq : min a b = star :=
+theorem min_eq : min a b = unit :=
rfl
#align punit.min_eq PUnit.min_eq
Add the instance
instance instDecidableLE (α : Type u) (β : Type v) [LE α] [LE β] (x y : α × β) [Decidable (x.1 ≤ y.1)] [Decidable (x.2 ≤ y.2)] :
Decidable (x ≤ y)
@@ -1189,6 +1189,10 @@ namespace Prod
instance (α : Type u) (β : Type v) [LE α] [LE β] : LE (α × β) :=
⟨fun p q ↦ p.1 ≤ q.1 ∧ p.2 ≤ q.2⟩
+-- Porting note: new instance
+instance instDecidableLE (α : Type u) (β : Type v) [LE α] [LE β] (x y : α × β)
+ [Decidable (x.1 ≤ y.1)] [Decidable (x.2 ≤ y.2)] : Decidable (x ≤ y) := And.decidable
+
theorem le_def [LE α] [LE β] {x y : α × β} : x ≤ y ↔ x.1 ≤ y.1 ∧ x.2 ≤ y.2 :=
Iff.rfl
#align prod.le_def Prod.le_def
@@ -23,7 +23,7 @@ classes and allows to transfer order instances.
* `AsLinearOrder α`: A type synonym to promote `PartialOrder α` to `LinearOrder α` using
`IsTotal α (≤)`.
-### Transfering orders
+### Transferring orders
- `Order.Preimage`, `Preorder.lift`: Transfers a (pre)order on `β` to an order on `α`
using a function `f : α → β`.
This makes a mathlib4 version of mathlib3's tactic.basic
, now called Mathlib.Tactic.Common
, which imports all tactics which do not have significant theory requirements, and then is imported all across the base of the hierarchy.
This ensures that all common tactics are available nearly everywhere in the library, rather than having to be imported one-by-one as you need them.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -10,12 +10,6 @@ Authors: Jeremy Avigad, Mario Carneiro
-/
import Mathlib.Data.Prod.Basic
import Mathlib.Data.Subtype
-import Mathlib.Tactic.Classical
-import Mathlib.Tactic.Convert
-import Mathlib.Tactic.Inhabit
-import Mathlib.Tactic.SimpRw
-import Mathlib.Tactic.Spread
-import Mathlib.Tactic.SplitIfs
/-!
# Basic definitions about `≤` and `<`
LinearOrder
decidable fields (#4006)
This renames
decidable_eq
to decidableEq
decidable_lt
to decidableLT
decidable_le
to decidableLE
decidableLT_of_decidableLE
to decidableLTOfDecidableLE
decidableEq_of_decidableLE
to decidableEqOfDecidableLE
These fields are data not proofs, so they should be lowerCamelCased
.
@@ -628,17 +628,17 @@ theorem LinearOrder.toPartialOrder_injective {α : Type _} :
Function.Injective (@LinearOrder.toPartialOrder α) :=
fun A B h ↦ match A, B with
| { le := A_le, lt := A_lt,
- decidable_le := A_decidable_le, decidable_eq := A_decidable_eq, decidable_lt := A_decidable_lt
+ decidableLE := A_decidableLE, decidableEq := A_decidableEq, decidableLT := A_decidableLT
min := A_min, max := A_max, min_def := A_min_def, max_def := A_max_def,
compare := A_compare, compare_eq_compareOfLessAndEq := A_compare_canonical, .. },
{ le := B_le, lt := B_lt,
- decidable_le := B_decidable_le, decidable_eq := B_decidable_eq, decidable_lt := B_decidable_lt
+ decidableLE := B_decidableLE, decidableEq := B_decidableEq, decidableLT := B_decidableLT
min := B_min, max := B_max, min_def := B_min_def, max_def := B_max_def,
compare := B_compare, compare_eq_compareOfLessAndEq := B_compare_canonical, .. } => by
cases h
- obtain rfl : A_decidable_le = B_decidable_le := Subsingleton.elim _ _
- obtain rfl : A_decidable_eq = B_decidable_eq := Subsingleton.elim _ _
- obtain rfl : A_decidable_lt = B_decidable_lt := Subsingleton.elim _ _
+ obtain rfl : A_decidableLE = B_decidableLE := Subsingleton.elim _ _
+ obtain rfl : A_decidableEq = B_decidableEq := Subsingleton.elim _ _
+ obtain rfl : A_decidableLT = B_decidableLT := Subsingleton.elim _ _
have : A_min = B_min := by
funext a b
exact (A_min_def _ _).trans (B_min_def _ _).symm
@@ -729,8 +729,8 @@ instance linearOrder (α : Type _) [LinearOrder α] : LinearOrder αᵒᵈ where
min := fun a b ↦ (max a b : α)
min_def := fun a b ↦ show (max .. : α) = _ by rw [max_comm, max_def]; rfl
max_def := fun a b ↦ show (min .. : α) = _ by rw [min_comm, min_def]; rfl
- decidable_le := (inferInstance : DecidableRel (λ a b : α => b ≤ a))
- decidable_lt := (inferInstance : DecidableRel (λ a b : α => b < a))
+ decidableLE := (inferInstance : DecidableRel (λ a b : α => b ≤ a))
+ decidableLT := (inferInstance : DecidableRel (λ a b : α => b < a))
#align order_dual.linear_order OrderDual.linearOrder
instance : ∀ [Inhabited α], Inhabited αᵒᵈ := λ [x: Inhabited α] => x
@@ -1038,14 +1038,14 @@ def LinearOrder.lift {α β} [LinearOrder β] [Sup α] [Inf α] (f : α → β)
(hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
LinearOrder α :=
letI instOrdα : Ord α := ⟨fun a b ↦ compare (f a) (f b)⟩
- letI decidable_le := fun x y ↦ (inferInstance : Decidable (f x ≤ f y))
- letI decidable_lt := fun x y ↦ (inferInstance : Decidable (f x < f y))
- letI decidable_eq := fun x y ↦ decidable_of_iff (f x = f y) inj.eq_iff
+ letI decidableLE := fun x y ↦ (inferInstance : Decidable (f x ≤ f y))
+ letI decidableLT := fun x y ↦ (inferInstance : Decidable (f x < f y))
+ letI decidableEq := fun x y ↦ decidable_of_iff (f x = f y) inj.eq_iff
{ PartialOrder.lift f inj, instOrdα with
le_total := fun x y ↦ le_total (f x) (f y)
- decidable_le := decidable_le
- decidable_lt := decidable_lt
- decidable_eq := decidable_eq
+ decidableLE := decidableLE
+ decidableLT := decidableLT
+ decidableEq := decidableEq
min := (· ⊓ ·)
max := (· ⊔ ·)
min_def := by
@@ -1085,14 +1085,14 @@ def LinearOrder.liftWithOrd {α β} [LinearOrder β] [Sup α] [Inf α] [Ord α]
(inj : Injective f) (hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y))
(hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y))
(compare_f : ∀ a b : α, compare a b = compare (f a) (f b)) : LinearOrder α :=
- letI decidable_le := fun x y ↦ (inferInstance : Decidable (f x ≤ f y))
- letI decidable_lt := fun x y ↦ (inferInstance : Decidable (f x < f y))
- letI decidable_eq := fun x y ↦ decidable_of_iff (f x = f y) inj.eq_iff
+ letI decidableLE := fun x y ↦ (inferInstance : Decidable (f x ≤ f y))
+ letI decidableLT := fun x y ↦ (inferInstance : Decidable (f x < f y))
+ letI decidableEq := fun x y ↦ decidable_of_iff (f x = f y) inj.eq_iff
{ PartialOrder.lift f inj with
le_total := fun x y ↦ le_total (f x) (f y)
- decidable_le := decidable_le
- decidable_lt := decidable_lt
- decidable_eq := decidable_eq
+ decidableLE := decidableLE
+ decidableLT := decidableLT
+ decidableEq := decidableEq
min := (· ⊓ ·)
max := (· ⊔ ·)
min_def := by
@@ -1360,9 +1360,9 @@ instance linearOrder: LinearOrder PUnit where
lt := fun _ _ ↦ False
max := fun _ _ ↦ unit
min := fun _ _ ↦ unit
- decidable_eq := inferInstance
- decidable_le := fun _ _ ↦ Decidable.isTrue trivial
- decidable_lt := fun _ _ ↦ Decidable.isFalse id
+ decidableEq := inferInstance
+ decidableLE := fun _ _ ↦ Decidable.isTrue trivial
+ decidableLT := fun _ _ ↦ Decidable.isFalse id
le_refl := by intros; trivial
le_trans := by intros; trivial
le_total := by intros; exact Or.inl trivial
@@ -1434,5 +1434,5 @@ noncomputable instance AsLinearOrder.linearOrder {α} [PartialOrder α] [IsTotal
LinearOrder (AsLinearOrder α) where
__ := inferInstanceAs (PartialOrder α)
le_total := @total_of α (· ≤ ·) _
- decidable_le := Classical.decRel _
+ decidableLE := Classical.decRel _
#align as_linear_order.linear_order AsLinearOrder.linearOrder
Function.update
is monotone (#3587)
Match leanprover-community/mathlib#6418 and leanprover-community/mathlib#18841
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
! This file was ported from Lean 3 source module order.basic
-! leanprover-community/mathlib commit 210657c4ea4a4a7b234392f70a3a2a83346dfa90
+! leanprover-community/mathlib commit 90df25ded755a2cf9651ea850d1abe429b1e4eb1
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -878,6 +878,16 @@ theorem update_le_update_iff :
simp (config := { contextual := true }) [update_le_iff]
#align update_le_update_iff update_le_update_iff
+@[simp]
+theorem update_le_update_iff' : update x i a ≤ update x i b ↔ a ≤ b := by
+ simp [update_le_update_iff]
+#align update_le_update_iff' update_le_update_iff'
+
+@[simp]
+theorem update_lt_update_iff : update x i a < update x i b ↔ a < b :=
+ lt_iff_lt_of_le_iff_le' update_le_update_iff' update_le_update_iff'
+#align update_lt_update_iff update_lt_update_iff
+
@[simp]
theorem le_update_self_iff : x ≤ update x i a ↔ x i ≤ a := by simp [le_update_iff]
#align le_update_self_iff le_update_self_iff
order.basic
@de87d5053a9fe5cbde723172c0fb7e27e7436473
..210657c4ea4a4a7b234392f70a3a2a83346dfa90
order.well_founded
@1c521b4fb909320eca16b2bb6f8b5b0490b1cb5e
..210657c4ea4a4a7b234392f70a3a2a83346dfa90
order.order_iso_nat
@6623e6af705e97002a9054c1c05a980180276fc1
..210657c4ea4a4a7b234392f70a3a2a83346dfa90
order.compactly_generated
@861a26926586cd46ff80264d121cdb6fa0e35cc1
..210657c4ea4a4a7b234392f70a3a2a83346dfa90
ring_theory.noetherian
@da420a8c6dd5bdfb85c4ced85c34388f633bc6ff
..210657c4ea4a4a7b234392f70a3a2a83346dfa90
Mathlib 3: https://github.com/leanprover-community/mathlib/pull/15071
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
! This file was ported from Lean 3 source module order.basic
-! leanprover-community/mathlib commit de87d5053a9fe5cbde723172c0fb7e27e7436473
+! leanprover-community/mathlib commit 210657c4ea4a4a7b234392f70a3a2a83346dfa90
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -384,6 +384,10 @@ theorem lt_iff_le_and_ne [PartialOrder α] {a b : α} : a < b ↔ a ≤ b ∧ a
⟨fun h ↦ ⟨le_of_lt h, ne_of_lt h⟩, fun ⟨h1, h2⟩ ↦ h1.lt_of_ne h2⟩
#align lt_iff_le_and_ne lt_iff_le_and_ne
+theorem eq_iff_not_lt_of_le {α} [PartialOrder α] {x y : α} : x ≤ y → y = x ↔ ¬x < y := by
+ rw [lt_iff_le_and_ne, not_and, Classical.not_not, eq_comm]
+#align eq_iff_not_lt_of_le eq_iff_not_lt_of_le
+
-- See Note [decidable namespace]
protected theorem Decidable.eq_iff_le_not_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
a = b ↔ a ≤ b ∧ ¬a < b :=
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
! This file was ported from Lean 3 source module order.basic
-! leanprover-community/mathlib commit 1f0096e6caa61e9c849ec2adbd227e960e9dff58
+! leanprover-community/mathlib commit de87d5053a9fe5cbde723172c0fb7e27e7436473
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -404,12 +404,18 @@ theorem eq_or_gt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : b = a ∨ a
h.lt_or_eq.symm.imp Eq.symm id
#align eq_or_gt_of_le eq_or_gt_of_le
+theorem gt_or_eq_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : a < b ∨ b = a :=
+ (eq_or_gt_of_le h).symm
+#align gt_or_eq_of_le gt_or_eq_of_le
+
alias Decidable.eq_or_lt_of_le ← LE.le.eq_or_lt_dec
alias eq_or_lt_of_le ← LE.le.eq_or_lt
alias eq_or_gt_of_le ← LE.le.eq_or_gt
+alias gt_or_eq_of_le ← LE.le.gt_or_eq
+
-- Porting note: no `decidable_classical` linter
-- attribute [nolint decidable_classical] LE.le.eq_or_lt_dec
LinearOrder α
extends Ord α
(#2858)
This PR makes LinearOrder
lawfully extend Ord
.
Since LinearOrder
has decidable order relations, we take compare
to be compareOfLessAndEq
by default for a linear order.
Since typeclass synthesis is preferred by structure instances to optparams, this does not create non-defeq diamonds for types which already have a different implementation of Ord
.
We also add a field compare_eq_compareOfLessAndEq
which encodes the lawful quality by demanding equality to the canonical comparison.
Motivation: Array
functions like min
largely use Ord
, so this lets us seamlessly use these array functions when we only have a linear order.
See zulip.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -15,6 +15,7 @@ import Mathlib.Tactic.Convert
import Mathlib.Tactic.Inhabit
import Mathlib.Tactic.SimpRw
import Mathlib.Tactic.Spread
+import Mathlib.Tactic.SplitIfs
/-!
# Basic definitions about `≤` and `<`
@@ -616,12 +617,18 @@ theorem PartialOrder.toPreorder_injective {α : Type _} :
theorem LinearOrder.toPartialOrder_injective {α : Type _} :
Function.Injective (@LinearOrder.toPartialOrder α) :=
fun A B h ↦ match A, B with
- | { le := A_le, lt := A_lt, decidable_le := A_decidable_le,
- min := A_min, max := A_max, min_def := A_min_def, max_def := A_max_def, .. },
- { le := B_le, lt := B_lt, decidable_le := B_decidable_le,
- min := B_min, max := B_max, min_def := B_min_def, max_def := B_max_def, .. } => by
+ | { le := A_le, lt := A_lt,
+ decidable_le := A_decidable_le, decidable_eq := A_decidable_eq, decidable_lt := A_decidable_lt
+ min := A_min, max := A_max, min_def := A_min_def, max_def := A_max_def,
+ compare := A_compare, compare_eq_compareOfLessAndEq := A_compare_canonical, .. },
+ { le := B_le, lt := B_lt,
+ decidable_le := B_decidable_le, decidable_eq := B_decidable_eq, decidable_lt := B_decidable_lt
+ min := B_min, max := B_max, min_def := B_min_def, max_def := B_max_def,
+ compare := B_compare, compare_eq_compareOfLessAndEq := B_compare_canonical, .. } => by
cases h
obtain rfl : A_decidable_le = B_decidable_le := Subsingleton.elim _ _
+ obtain rfl : A_decidable_eq = B_decidable_eq := Subsingleton.elim _ _
+ obtain rfl : A_decidable_lt = B_decidable_lt := Subsingleton.elim _ _
have : A_min = B_min := by
funext a b
exact (A_min_def _ _).trans (B_min_def _ _).symm
@@ -630,7 +637,10 @@ theorem LinearOrder.toPartialOrder_injective {α : Type _} :
funext a b
exact (A_max_def _ _).trans (B_max_def _ _).symm
cases this
- congr <;> exact Subsingleton.elim _ _
+ have : A_compare = B_compare := by
+ funext a b
+ exact (A_compare_canonical _ _).trans (B_compare_canonical _ _).symm
+ congr
#align linear_order.to_partial_order_injective LinearOrder.toPartialOrder_injective
theorem Preorder.ext {α} {A B : Preorder α}
@@ -985,19 +995,37 @@ def PartialOrder.lift {α β} [PartialOrder β] (f : α → β) (inj : Injective
{ Preorder.lift f with le_antisymm := fun _ _ h₁ h₂ ↦ inj (h₁.antisymm h₂) }
#align partial_order.lift PartialOrder.lift
+theorem compare_of_injective_eq_compareOfLessAndEq (a b : α) [LinearOrder β]
+ [DecidableEq α] (f : α → β) (inj : Injective f)
+ [Decidable (LT.lt (self := PartialOrder.lift f inj |>.toLT) a b)] :
+ compare (f a) (f b) =
+ @compareOfLessAndEq _ a b (PartialOrder.lift f inj |>.toLT) _ _ := by
+ have h := LinearOrder.compare_eq_compareOfLessAndEq (f a) (f b)
+ simp only [h, compareOfLessAndEq]
+ split_ifs <;> try (first | rfl | contradiction)
+ · have : ¬ f a = f b := by rename_i h; exact inj.ne h
+ contradiction
+ · have : f a = f b := by rename_i h; exact congrArg f h
+ contradiction
+
/-- Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
function `f : α → β`. This version takes `[Sup α]` and `[Inf α]` as arguments, then uses
them for `max` and `min` fields. See `LinearOrder.lift'` for a version that autogenerates `min` and
-`max` fields. See note [reducible non-instances]. -/
+`max` fields, and `LinearOrder.liftWithOrd` for one that does not auto-generate `compare`
+fields. See note [reducible non-instances]. -/
@[reducible]
def LinearOrder.lift {α β} [LinearOrder β] [Sup α] [Inf α] (f : α → β) (inj : Injective f)
(hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
LinearOrder α :=
- { PartialOrder.lift f inj with
+ letI instOrdα : Ord α := ⟨fun a b ↦ compare (f a) (f b)⟩
+ letI decidable_le := fun x y ↦ (inferInstance : Decidable (f x ≤ f y))
+ letI decidable_lt := fun x y ↦ (inferInstance : Decidable (f x < f y))
+ letI decidable_eq := fun x y ↦ decidable_of_iff (f x = f y) inj.eq_iff
+ { PartialOrder.lift f inj, instOrdα with
le_total := fun x y ↦ le_total (f x) (f y)
- decidable_le := fun x y ↦ (inferInstance : Decidable (f x ≤ f y))
- decidable_lt := fun x y ↦ (inferInstance : Decidable (f x < f y))
- decidable_eq := fun x y ↦ decidable_of_iff (f x = f y) inj.eq_iff
+ decidable_le := decidable_le
+ decidable_lt := decidable_lt
+ decidable_eq := decidable_eq
min := (· ⊓ ·)
max := (· ⊔ ·)
min_def := by
@@ -1009,12 +1037,14 @@ def LinearOrder.lift {α β} [LinearOrder β] [Sup α] [Inf α] (f : α → β)
intros x y
apply inj
rw [apply_ite f]
- exact (hsup _ _).trans (max_def _ _) }
-#align linear_order.lift LinearOrder.lift
+ exact (hsup _ _).trans (max_def _ _)
+ compare_eq_compareOfLessAndEq := fun a b ↦
+ compare_of_injective_eq_compareOfLessAndEq a b f inj }
/-- Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
function `f : α → β`. This version autogenerates `min` and `max` fields. See `LinearOrder.lift`
-for a version that takes `[Sup α]` and `[Inf α]`, then uses them as `max` and `min`.
+for a version that takes `[Sup α]` and `[Inf α]`, then uses them as `max` and `min`. See
+`LinearOrder.liftWithOrd'` for a version which does not auto-generate `compare` fields.
See note [reducible non-instances]. -/
@[reducible]
def LinearOrder.lift' {α β} [LinearOrder β] (f : α → β) (inj : Injective f) : LinearOrder α :=
@@ -1024,6 +1054,55 @@ def LinearOrder.lift' {α β} [LinearOrder β] (f : α → β) (inj : Injective
(apply_ite f _ _ _).trans (min_def _ _).symm
#align linear_order.lift' LinearOrder.lift'
+/-- Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
+function `f : α → β`. This version takes `[Sup α]` and `[Inf α]` as arguments, then uses
+them for `max` and `min` fields. It also takes `[Ord α]` as an argument and uses them for `compare`
+fields. See `LinearOrder.lift` for a version that autogenerates `compare` fields, and
+`LinearOrder.liftWithOrd'` for one that auto-generates `min` and `max` fields.
+fields. See note [reducible non-instances]. -/
+@[reducible]
+def LinearOrder.liftWithOrd {α β} [LinearOrder β] [Sup α] [Inf α] [Ord α] (f : α → β)
+ (inj : Injective f) (hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y))
+ (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y))
+ (compare_f : ∀ a b : α, compare a b = compare (f a) (f b)) : LinearOrder α :=
+ letI decidable_le := fun x y ↦ (inferInstance : Decidable (f x ≤ f y))
+ letI decidable_lt := fun x y ↦ (inferInstance : Decidable (f x < f y))
+ letI decidable_eq := fun x y ↦ decidable_of_iff (f x = f y) inj.eq_iff
+ { PartialOrder.lift f inj with
+ le_total := fun x y ↦ le_total (f x) (f y)
+ decidable_le := decidable_le
+ decidable_lt := decidable_lt
+ decidable_eq := decidable_eq
+ min := (· ⊓ ·)
+ max := (· ⊔ ·)
+ min_def := by
+ intros x y
+ apply inj
+ rw [apply_ite f]
+ exact (hinf _ _).trans (min_def _ _)
+ max_def := by
+ intros x y
+ apply inj
+ rw [apply_ite f]
+ exact (hsup _ _).trans (max_def _ _)
+ compare_eq_compareOfLessAndEq := fun a b ↦
+ (compare_f a b).trans <| compare_of_injective_eq_compareOfLessAndEq a b f inj }
+
+/-- Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
+function `f : α → β`. This version auto-generates `min` and `max` fields. It also takes `[Ord α]`
+as an argument and uses them for `compare` fields. See `LinearOrder.lift` for a version that
+autogenerates `compare` fields, and `LinearOrder.liftWithOrd` for one that doesn't auto-generate
+`min` and `max` fields. fields. See note [reducible non-instances]. -/
+@[reducible]
+def LinearOrder.liftWithOrd' {α β} [LinearOrder β] [Ord α] (f : α → β)
+ (inj : Injective f)
+ (compare_f : ∀ a b : α, compare a b = compare (f a) (f b)) : LinearOrder α :=
+ @LinearOrder.liftWithOrd α β _ ⟨fun x y ↦ if f x ≤ f y then y else x⟩
+ ⟨fun x y ↦ if f x ≤ f y then x else y⟩ _ f inj
+ (fun _ _ ↦ (apply_ite f _ _ _).trans (max_def _ _).symm)
+ (fun _ _ ↦ (apply_ite f _ _ _).trans (min_def _ _).symm)
+ compare_f
+
/-! ### Subtype of an order -/
@@ -37,8 +37,8 @@ classes and allows to transfer order instances.
### Extra class
-* `HasSup`: type class for the `⊔` notation
-* `HasInf`: type class for the `⊓` notation
+* `Sup`: type class for the `⊔` notation
+* `Inf`: type class for the `⊓` notation
* `HasCompl`: type class for the `ᶜ` notation
* `DenselyOrdered`: An order with no gap, i.e. for any two elements `a < b` there exists `c` such
that `a < c < b`.
@@ -941,28 +941,28 @@ theorem max_def_lt (x y : α) : max x y = if x < y then y else x := by
end MinMaxRec
-/-! ### `HasSup` and `HasInf` -/
+/-! ### `Sup` and `Inf` -/
/-- Typeclass for the `⊔` (`\lub`) notation -/
@[notation_class, ext]
-class HasSup (α : Type u) where
+class Sup (α : Type u) where
/-- Least upper bound (`\lub` notation) -/
sup : α → α → α
-#align has_sup HasSup
+#align has_sup Sup
/-- Typeclass for the `⊓` (`\glb`) notation -/
@[notation_class, ext]
-class HasInf (α : Type u) where
+class Inf (α : Type u) where
/-- Greatest lower bound (`\glb` notation) -/
inf : α → α → α
-#align has_inf HasInf
+#align has_inf Inf
@[inherit_doc]
-infixl:68 " ⊔ " => HasSup.sup
+infixl:68 " ⊔ " => Sup.sup
@[inherit_doc]
-infixl:69 " ⊓ " => HasInf.inf
+infixl:69 " ⊓ " => Inf.inf
/-! ### Lifts of order instances -/
@@ -986,11 +986,11 @@ def PartialOrder.lift {α β} [PartialOrder β] (f : α → β) (inj : Injective
#align partial_order.lift PartialOrder.lift
/-- Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
-function `f : α → β`. This version takes `[HasSup α]` and `[HasInf α]` as arguments, then uses
+function `f : α → β`. This version takes `[Sup α]` and `[Inf α]` as arguments, then uses
them for `max` and `min` fields. See `LinearOrder.lift'` for a version that autogenerates `min` and
`max` fields. See note [reducible non-instances]. -/
@[reducible]
-def LinearOrder.lift {α β} [LinearOrder β] [HasSup α] [HasInf α] (f : α → β) (inj : Injective f)
+def LinearOrder.lift {α β} [LinearOrder β] [Sup α] [Inf α] (f : α → β) (inj : Injective f)
(hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
LinearOrder α :=
{ PartialOrder.lift f inj with
@@ -1014,7 +1014,7 @@ def LinearOrder.lift {α β} [LinearOrder β] [HasSup α] [HasInf α] (f : α
/-- Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
function `f : α → β`. This version autogenerates `min` and `max` fields. See `LinearOrder.lift`
-for a version that takes `[HasSup α]` and `[HasInf α]`, then uses them as `max` and `min`.
+for a version that takes `[Sup α]` and `[Inf α]`, then uses them as `max` and `min`.
See note [reducible non-instances]. -/
@[reducible]
def LinearOrder.lift' {α β} [LinearOrder β] (f : α → β) (inj : Injective f) : LinearOrder α :=
All these changes in Mathlib 3 were backported from this repository or were forward-ported earler.
topology.basic
@8631e2d5ea77f6c13054d9151d82b83069680cb1
..bcfa726826abd57587355b4b5b7e78ad6527b7e4
topology.separation
@59694bd07f0a39c5beccba34bd9f413a160782bf
..92ca63f0fb391a9ca5f22d2409a6080e786d99f7
order.filter.basic
@996b0ff959da753a555053a480f36e5f264d4207
..24e75f1ee89ff37e99581084704f3f6a950db2ea
order.basic
@d4f69d96f3532729da8ebb763f4bc26fcf640f06
..1f0096e6caa61e9c849ec2adbd227e960e9dff58
algebra.group.type_tags
@6eb334bd8f3433d5b08ba156b8ec3e6af47e1904
..2e0975f6a25dd3fbfb9e41556a77f075f6269748
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
! This file was ported from Lean 3 source module order.basic
-! leanprover-community/mathlib commit d4f69d96f3532729da8ebb763f4bc26fcf640f06
+! leanprover-community/mathlib commit 1f0096e6caa61e9c849ec2adbd227e960e9dff58
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
This PR is the result of a slight variant on the following "algorithm"
_
and make all uppercase letters into lowercase_
and make all uppercase letters into lowercase(original_lean3_name, OriginalLean4Name)
#align
statement just before the next empty line#align
statement to have been inserted too early)@@ -157,6 +157,7 @@ alias ne_of_lt ← LT.lt.ne
alias lt_asymm ← LT.lt.asymm LT.lt.not_lt
alias le_of_eq ← Eq.le
+#align eq.le Eq.le
-- Porting note: no `decidable_classical` linter
-- attribute [nolint decidable_classical] LE.le.lt_or_eq_dec
@@ -216,12 +217,16 @@ alias lt_of_lt_of_eq ← LT.lt.trans_eq
alias lt_of_lt_of_eq' ← LT.lt.trans_eq'
alias le_of_eq_of_le ← Eq.trans_le
+#align eq.trans_le Eq.trans_le
alias le_of_eq_of_le' ← Eq.trans_ge
+#align eq.trans_ge Eq.trans_ge
alias lt_of_eq_of_lt ← Eq.trans_lt
+#align eq.trans_lt Eq.trans_lt
alias lt_of_eq_of_lt' ← Eq.trans_gt
+#align eq.trans_gt Eq.trans_gt
end
@@ -824,10 +829,13 @@ theorem strongLT_of_le_of_strongLT (hab : a ≤ b) (hbc : b ≺ c) : a ≺ c :=
#align strong_lt_of_le_of_strong_lt strongLT_of_le_of_strongLT
alias le_of_strongLT ← StrongLT.le
+#align strong_lt.le StrongLT.le
alias lt_of_strongLT ← StrongLT.lt
+#align strong_lt.lt StrongLT.lt
alias strongLT_of_strongLT_of_le ← StrongLT.trans_le
+#align strong_lt.trans_le StrongLT.trans_le
alias strongLT_of_le_of_strongLT ← LE.le.trans_strongLT
Partial forward-port of leanprover-community/mathlib#18245
@@ -1233,6 +1233,16 @@ theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
fun a ha₂ ↦ le_of_not_gt fun ha₁ ↦ h ⟨a, ha₁, ha₂⟩⟩
#align dense_or_discrete dense_or_discrete
+/-- If a linear order has no elements `x < y < z`, then it has at most two elements. -/
+lemma eq_or_eq_or_eq_of_forall_not_lt_lt [LinearOrder α]
+ (h : ∀ ⦃x y z : α⦄, x < y → y < z → False) (x y z : α) : x = y ∨ y = z ∨ x = z := by
+ by_contra hne
+ simp only [not_or, ← Ne.def] at hne
+ cases' hne.1.lt_or_lt with h₁ h₁ <;> cases' hne.2.1.lt_or_lt with h₂ h₂ <;>
+ cases' hne.2.2.lt_or_lt with h₃ h₃
+ exacts [h h₁ h₂, h h₂ h₃, h h₃ h₂, h h₃ h₁, h h₁ h₃, h h₂ h₃, h h₁ h₃, h h₂ h₁]
+#align eq_or_eq_or_eq_of_forall_not_lt_lt eq_or_eq_or_eq_of_forall_not_lt_lt
+
namespace PUnit
variable (a b : PUnit.{u + 1})
@@ -1238,7 +1238,7 @@ namespace PUnit
variable (a b : PUnit.{u + 1})
-- Porting note: no `refine_struct` at time of port
-instance : LinearOrder PUnit where
+instance linearOrder: LinearOrder PUnit where
le := fun _ _ ↦ True
lt := fun _ _ ↦ False
max := fun _ _ ↦ unit
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -1250,7 +1250,7 @@ instance : LinearOrder PUnit where
le_trans := by intros; trivial
le_total := by intros; exact Or.inl trivial
le_antisymm := by intros; rfl
- lt_iff_le_not_le := by simp only [not_true, and_false, iff_self, forall_const]
+ lt_iff_le_not_le := by simp only [not_true, and_false, forall_const]
theorem max_eq : max a b = star :=
rfl
There seem to have been a number of changes since this was ported, and this takes the opportunity to restore the #align
s.
@@ -4,12 +4,16 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
! This file was ported from Lean 3 source module order.basic
-! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
+! leanprover-community/mathlib commit d4f69d96f3532729da8ebb763f4bc26fcf640f06
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Data.Prod.Basic
import Mathlib.Data.Subtype
+import Mathlib.Tactic.Classical
+import Mathlib.Tactic.Convert
+import Mathlib.Tactic.Inhabit
+import Mathlib.Tactic.SimpRw
import Mathlib.Tactic.Spread
/-!
@@ -66,7 +70,7 @@ open Function
universe u v w
-variable {α : Type u} {β : Type v} {γ : Type w} {r : α → α → Prop}
+variable {ι : Type _} {α : Type u} {β : Type v} {γ : Type w} {π : ι → Type _} {r : α → α → Prop}
section Preorder
@@ -74,15 +78,19 @@ variable [Preorder α] {a b c : α}
theorem le_trans' : b ≤ c → a ≤ b → a ≤ c :=
flip le_trans
+#align le_trans' le_trans'
theorem lt_trans' : b < c → a < b → a < c :=
flip lt_trans
+#align lt_trans' lt_trans'
theorem lt_of_le_of_lt' : b ≤ c → a < b → a < c :=
flip lt_of_lt_of_le
+#align lt_of_le_of_lt' lt_of_le_of_lt'
theorem lt_of_lt_of_le' : b < c → a ≤ b → a < c :=
flip lt_of_le_of_lt
+#align lt_of_lt_of_le' lt_of_lt_of_le'
end Preorder
@@ -92,14 +100,18 @@ variable [PartialOrder α] {a b : α}
theorem ge_antisymm : a ≤ b → b ≤ a → b = a :=
flip le_antisymm
+#align ge_antisymm ge_antisymm
theorem lt_of_le_of_ne' : a ≤ b → b ≠ a → a < b := fun h₁ h₂ ↦ lt_of_le_of_ne h₁ h₂.symm
+#align lt_of_le_of_ne' lt_of_le_of_ne'
theorem Ne.lt_of_le : a ≠ b → a ≤ b → a < b :=
flip lt_of_le_of_ne
+#align ne.lt_of_le Ne.lt_of_le
theorem Ne.lt_of_le' : b ≠ a → a ≤ b → a < b :=
flip lt_of_le_of_ne'
+#align ne.lt_of_le' Ne.lt_of_le'
end PartialOrder
@@ -156,34 +168,44 @@ variable [Preorder α] {a b c : α}
/-- A version of `le_refl` where the argument is implicit -/
theorem le_rfl : a ≤ a :=
le_refl a
+#align le_rfl le_rfl
@[simp]
theorem lt_self_iff_false (x : α) : x < x ↔ False :=
⟨lt_irrefl x, False.elim⟩
+#align lt_self_iff_false lt_self_iff_false
theorem le_of_le_of_eq (hab : a ≤ b) (hbc : b = c) : a ≤ c :=
hab.trans hbc.le
+#align le_of_le_of_eq le_of_le_of_eq
theorem le_of_eq_of_le (hab : a = b) (hbc : b ≤ c) : a ≤ c :=
hab.le.trans hbc
+#align le_of_eq_of_le le_of_eq_of_le
theorem lt_of_lt_of_eq (hab : a < b) (hbc : b = c) : a < c :=
hab.trans_le hbc.le
+#align lt_of_lt_of_eq lt_of_lt_of_eq
theorem lt_of_eq_of_lt (hab : a = b) (hbc : b < c) : a < c :=
hab.le.trans_lt hbc
+#align lt_of_eq_of_lt lt_of_eq_of_lt
theorem le_of_le_of_eq' : b ≤ c → a = b → a ≤ c :=
flip le_of_eq_of_le
+#align le_of_le_of_eq' le_of_le_of_eq'
theorem le_of_eq_of_le' : b = c → a ≤ b → a ≤ c :=
flip le_of_le_of_eq
+#align le_of_eq_of_le' le_of_eq_of_le'
theorem lt_of_lt_of_eq' : b < c → a = b → a < c :=
flip lt_of_eq_of_lt
+#align lt_of_lt_of_eq' lt_of_lt_of_eq'
theorem lt_of_eq_of_lt' : b = c → a < b → a < c :=
flip lt_of_lt_of_eq
+#align lt_of_eq_of_lt' lt_of_eq_of_lt'
alias le_of_le_of_eq ← LE.le.trans_eq
@@ -211,111 +233,170 @@ variable [Preorder α] {x y z : α}
almost exclusively in mathlib. -/
protected theorem ge (h : x = y) : y ≤ x :=
h.symm.le
+#align eq.ge Eq.ge
theorem not_lt (h : x = y) : ¬x < y := fun h' ↦ h'.ne h
+#align eq.not_lt Eq.not_lt
theorem not_gt (h : x = y) : ¬y < x :=
h.symm.not_lt
+#align eq.not_gt Eq.not_gt
end Eq
namespace LE.le
+-- see Note [nolint_ge]
+-- Porting note: linter not found @[nolint ge_or_gt]
protected theorem ge [LE α] {x y : α} (h : x ≤ y) : y ≥ x :=
h
+#align has_le.le.ge LE.le.ge
+
+section PartialOrder
-section partial_order
variable [PartialOrder α] {a b : α}
-lemma lt_iff_ne (h : a ≤ b) : a < b ↔ a ≠ b := ⟨fun h ↦ h.ne, h.lt_of_ne⟩
-lemma gt_iff_ne (h : a ≤ b) : a < b ↔ b ≠ a := ⟨fun h ↦ h.ne.symm, h.lt_of_ne'⟩
-lemma not_lt_iff_eq (h : a ≤ b) : ¬ a < b ↔ a = b := h.lt_iff_ne.not_left
-lemma not_gt_iff_eq (h : a ≤ b) : ¬ a < b ↔ b = a := h.gt_iff_ne.not_left
+theorem lt_iff_ne (h : a ≤ b) : a < b ↔ a ≠ b :=
+ ⟨fun h ↦ h.ne, h.lt_of_ne⟩
+#align has_le.le.lt_iff_ne LE.le.lt_iff_ne
+
+theorem gt_iff_ne (h : a ≤ b) : a < b ↔ b ≠ a :=
+ ⟨fun h ↦ h.ne.symm, h.lt_of_ne'⟩
+#align has_le.le.gt_iff_ne LE.le.gt_iff_ne
+
+theorem not_lt_iff_eq (h : a ≤ b) : ¬a < b ↔ a = b :=
+ h.lt_iff_ne.not_left
+#align has_le.le.not_lt_iff_eq LE.le.not_lt_iff_eq
-lemma le_iff_eq (h : a ≤ b) : b ≤ a ↔ b = a := ⟨fun h' ↦ h'.antisymm h, Eq.le⟩
-lemma ge_iff_eq (h : a ≤ b) : b ≤ a ↔ a = b := ⟨h.antisymm, Eq.ge⟩
+theorem not_gt_iff_eq (h : a ≤ b) : ¬a < b ↔ b = a :=
+ h.gt_iff_ne.not_left
+#align has_le.le.not_gt_iff_eq LE.le.not_gt_iff_eq
-end partial_order
+theorem le_iff_eq (h : a ≤ b) : b ≤ a ↔ b = a :=
+ ⟨fun h' ↦ h'.antisymm h, Eq.le⟩
+#align has_le.le.le_iff_eq LE.le.le_iff_eq
+
+theorem ge_iff_eq (h : a ≤ b) : b ≤ a ↔ a = b :=
+ ⟨h.antisymm, Eq.ge⟩
+#align has_le.le.ge_iff_eq LE.le.ge_iff_eq
+
+end PartialOrder
theorem lt_or_le [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a < c ∨ c ≤ b :=
((lt_or_ge a c).imp id) fun hc ↦ le_trans hc h
+#align has_le.le.lt_or_le LE.le.lt_or_le
theorem le_or_lt [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a ≤ c ∨ c < b :=
((le_or_gt a c).imp id) fun hc ↦ lt_of_lt_of_le hc h
+#align has_le.le.le_or_lt LE.le.le_or_lt
theorem le_or_le [LinearOrder α] {a b : α} (h : a ≤ b) (c : α) : a ≤ c ∨ c ≤ b :=
(h.le_or_lt c).elim Or.inl fun h ↦ Or.inr <| le_of_lt h
+#align has_le.le.le_or_le LE.le.le_or_le
end LE.le
namespace LT.lt
+-- see Note [nolint_ge]
+-- Porting note: linter not found @[nolint ge_or_gt]
protected theorem gt [LT α] {x y : α} (h : x < y) : y > x :=
h
+#align has_lt.lt.gt LT.lt.gt
protected theorem false [Preorder α] {x : α} : x < x → False :=
lt_irrefl x
+#align has_lt.lt.false LT.lt.false
theorem ne' [Preorder α] {x y : α} (h : x < y) : y ≠ x :=
h.ne.symm
+#align has_lt.lt.ne' LT.lt.ne'
theorem lt_or_lt [LinearOrder α] {x y : α} (h : x < y) (z : α) : x < z ∨ z < y :=
(lt_or_ge z y).elim Or.inr fun hz ↦ Or.inl <| h.trans_le hz
+#align has_lt.lt.lt_or_lt LT.lt.lt_or_lt
end LT.lt
-protected theorem ge.le [LE α] {x y : α} (h : x ≥ y) : y ≤ x :=
+-- see Note [nolint_ge]
+-- Porting note: linter not found @[nolint ge_or_gt]
+protected theorem GE.ge.le [LE α] {x y : α} (h : x ≥ y) : y ≤ x :=
h
+#align ge.le GE.ge.le
-protected theorem gt.lt [LT α] {x y : α} (h : x > y) : y < x :=
+-- see Note [nolint_ge]
+-- Porting note: linter not found @[nolint ge_or_gt]
+protected theorem GT.gt.lt [LT α] {x y : α} (h : x > y) : y < x :=
h
+#align gt.lt GT.gt.lt
+-- see Note [nolint_ge]
+-- Porting note: linter not found @[nolint ge_or_gt]
theorem ge_of_eq [Preorder α] {a b : α} (h : a = b) : a ≥ b :=
h.ge
+#align ge_of_eq ge_of_eq
+-- see Note [nolint_ge]
+-- Porting note: linter not found @[nolint ge_or_gt]
+@[simp]
theorem ge_iff_le [LE α] {a b : α} : a ≥ b ↔ b ≤ a :=
Iff.rfl
+#align ge_iff_le ge_iff_le
+-- see Note [nolint_ge]
+-- Porting note: linter not found @[nolint ge_or_gt]
+@[simp]
theorem gt_iff_lt [LT α] {a b : α} : a > b ↔ b < a :=
Iff.rfl
+#align gt_iff_lt gt_iff_lt
theorem not_le_of_lt [Preorder α] {a b : α} (h : a < b) : ¬b ≤ a :=
(le_not_le_of_lt h).right
+#align not_le_of_lt not_le_of_lt
alias not_le_of_lt ← LT.lt.not_le
theorem not_lt_of_le [Preorder α] {a b : α} (h : a ≤ b) : ¬b < a := fun hba ↦ hba.not_le h
+#align not_lt_of_le not_lt_of_le
alias not_lt_of_le ← LE.le.not_lt
theorem ne_of_not_le [Preorder α] {a b : α} (h : ¬a ≤ b) : a ≠ b := fun hab ↦ h (le_of_eq hab)
+#align ne_of_not_le ne_of_not_le
-- See Note [decidable namespace]
protected theorem Decidable.le_iff_eq_or_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
a ≤ b ↔ a = b ∨ a < b :=
Decidable.le_iff_lt_or_eq.trans or_comm
+#align decidable.le_iff_eq_or_lt Decidable.le_iff_eq_or_lt
theorem le_iff_eq_or_lt [PartialOrder α] {a b : α} : a ≤ b ↔ a = b ∨ a < b :=
le_iff_lt_or_eq.trans or_comm
+#align le_iff_eq_or_lt le_iff_eq_or_lt
theorem lt_iff_le_and_ne [PartialOrder α] {a b : α} : a < b ↔ a ≤ b ∧ a ≠ b :=
⟨fun h ↦ ⟨le_of_lt h, ne_of_lt h⟩, fun ⟨h1, h2⟩ ↦ h1.lt_of_ne h2⟩
+#align lt_iff_le_and_ne lt_iff_le_and_ne
-- See Note [decidable namespace]
protected theorem Decidable.eq_iff_le_not_lt [PartialOrder α] [@DecidableRel α (· ≤ ·)] {a b : α} :
a = b ↔ a ≤ b ∧ ¬a < b :=
⟨fun h ↦ ⟨h.le, h ▸ lt_irrefl _⟩, fun ⟨h₁, h₂⟩ ↦
h₁.antisymm <| Decidable.by_contradiction fun h₃ ↦ h₂ (h₁.lt_of_not_le h₃)⟩
+#align decidable.eq_iff_le_not_lt Decidable.eq_iff_le_not_lt
theorem eq_iff_le_not_lt [PartialOrder α] {a b : α} : a = b ↔ a ≤ b ∧ ¬a < b :=
haveI := Classical.dec
Decidable.eq_iff_le_not_lt
+#align eq_iff_le_not_lt eq_iff_le_not_lt
theorem eq_or_lt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : a = b ∨ a < b :=
h.lt_or_eq.symm
+#align eq_or_lt_of_le eq_or_lt_of_le
theorem eq_or_gt_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : b = a ∨ a < b :=
h.lt_or_eq.symm.imp Eq.symm id
+#align eq_or_gt_of_le eq_or_gt_of_le
alias Decidable.eq_or_lt_of_le ← LE.le.eq_or_lt_dec
@@ -328,9 +409,11 @@ alias eq_or_gt_of_le ← LE.le.eq_or_gt
theorem eq_of_le_of_not_lt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba : ¬a < b) : a = b :=
hab.eq_or_lt.resolve_right hba
+#align eq_of_le_of_not_lt eq_of_le_of_not_lt
theorem eq_of_ge_of_not_gt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba : ¬a < b) : b = a :=
(hab.eq_or_lt.resolve_right hba).symm
+#align eq_of_ge_of_not_gt eq_of_ge_of_not_gt
alias eq_of_le_of_not_lt ← LE.le.eq_of_not_lt
@@ -338,115 +421,166 @@ alias eq_of_ge_of_not_gt ← LE.le.eq_of_not_gt
theorem Ne.le_iff_lt [PartialOrder α] {a b : α} (h : a ≠ b) : a ≤ b ↔ a < b :=
⟨fun h' ↦ lt_of_le_of_ne h' h, fun h ↦ h.le⟩
+#align ne.le_iff_lt Ne.le_iff_lt
theorem Ne.not_le_or_not_le [PartialOrder α] {a b : α} (h : a ≠ b) : ¬a ≤ b ∨ ¬b ≤ a :=
not_and_or.1 <| le_antisymm_iff.not.1 h
+#align ne.not_le_or_not_le Ne.not_le_or_not_le
+-- See Note [decidable namespace]
protected theorem Decidable.ne_iff_lt_iff_le [PartialOrder α] [DecidableEq α] {a b : α} :
(a ≠ b ↔ a < b) ↔ a ≤ b :=
⟨fun h ↦ Decidable.byCases le_of_eq (le_of_lt ∘ h.mp), fun h ↦ ⟨lt_of_le_of_ne h, ne_of_lt⟩⟩
+#align decidable.ne_iff_lt_iff_le Decidable.ne_iff_lt_iff_le
@[simp]
theorem ne_iff_lt_iff_le [PartialOrder α] {a b : α} : (a ≠ b ↔ a < b) ↔ a ≤ b :=
haveI := Classical.dec
Decidable.ne_iff_lt_iff_le
+#align ne_iff_lt_iff_le ne_iff_lt_iff_le
+
+-- Variant of `min_def` with the branches reversed.
+theorem min_def' [LinearOrder α] (a b : α) : min a b = if b ≤ a then b else a := by
+ rw [min_def]
+ rcases lt_trichotomy a b with (lt | eq | gt)
+ · rw [if_pos lt.le, if_neg (not_le.mpr lt)]
+ · rw [if_pos eq.le, if_pos eq.ge, eq]
+ · rw [if_neg (not_le.mpr gt.gt), if_pos gt.le]
+#align min_def' min_def'
+
+-- Variant of `min_def` with the branches reversed.
+-- This is sometimes useful as it used to be the default.
+theorem max_def' [LinearOrder α] (a b : α) : max a b = if b ≤ a then a else b := by
+ rw [max_def]
+ rcases lt_trichotomy a b with (lt | eq | gt)
+ · rw [if_pos lt.le, if_neg (not_le.mpr lt)]
+ · rw [if_pos eq.le, if_pos eq.ge, eq]
+ · rw [if_neg (not_le.mpr gt.gt), if_pos gt.le]
+#align max_def' max_def'
theorem lt_of_not_le [LinearOrder α] {a b : α} (h : ¬b ≤ a) : a < b :=
((le_total _ _).resolve_right h).lt_of_not_le h
+#align lt_of_not_le lt_of_not_le
theorem lt_iff_not_le [LinearOrder α] {x y : α} : x < y ↔ ¬y ≤ x :=
⟨not_le_of_lt, lt_of_not_le⟩
+#align lt_iff_not_le lt_iff_not_le
theorem Ne.lt_or_lt [LinearOrder α] {x y : α} (h : x ≠ y) : x < y ∨ y < x :=
lt_or_gt_of_ne h
+#align ne.lt_or_lt Ne.lt_or_lt
/-- A version of `ne_iff_lt_or_gt` with LHS and RHS reversed. -/
@[simp]
theorem lt_or_lt_iff_ne [LinearOrder α] {x y : α} : x < y ∨ y < x ↔ x ≠ y :=
ne_iff_lt_or_gt.symm
+#align lt_or_lt_iff_ne lt_or_lt_iff_ne
theorem not_lt_iff_eq_or_lt [LinearOrder α] {a b : α} : ¬a < b ↔ a = b ∨ b < a :=
not_lt.trans <| Decidable.le_iff_eq_or_lt.trans <| or_congr eq_comm Iff.rfl
+#align not_lt_iff_eq_or_lt not_lt_iff_eq_or_lt
theorem exists_ge_of_linear [LinearOrder α] (a b : α) : ∃ c, a ≤ c ∧ b ≤ c :=
match le_total a b with
| Or.inl h => ⟨_, h, le_rfl⟩
| Or.inr h => ⟨_, le_rfl, h⟩
+#align exists_ge_of_linear exists_ge_of_linear
theorem lt_imp_lt_of_le_imp_le {β} [LinearOrder α] [Preorder β] {a b : α} {c d : β}
(H : a ≤ b → c ≤ d) (h : d < c) : b < a :=
lt_of_not_le fun h' ↦ (H h').not_lt h
+#align lt_imp_lt_of_le_imp_le lt_imp_lt_of_le_imp_le
theorem le_imp_le_iff_lt_imp_lt {β} [LinearOrder α] [LinearOrder β] {a b : α} {c d : β} :
a ≤ b → c ≤ d ↔ d < c → b < a :=
⟨lt_imp_lt_of_le_imp_le, le_imp_le_of_lt_imp_lt⟩
+#align le_imp_le_iff_lt_imp_lt le_imp_le_iff_lt_imp_lt
theorem lt_iff_lt_of_le_iff_le' {β} [Preorder α] [Preorder β] {a b : α} {c d : β}
(H : a ≤ b ↔ c ≤ d) (H' : b ≤ a ↔ d ≤ c) : b < a ↔ d < c :=
lt_iff_le_not_le.trans <| (and_congr H' (not_congr H)).trans lt_iff_le_not_le.symm
+#align lt_iff_lt_of_le_iff_le' lt_iff_lt_of_le_iff_le'
theorem lt_iff_lt_of_le_iff_le {β} [LinearOrder α] [LinearOrder β] {a b : α} {c d : β}
(H : a ≤ b ↔ c ≤ d) : b < a ↔ d < c :=
not_le.symm.trans <| (not_congr H).trans <| not_le
+#align lt_iff_lt_of_le_iff_le lt_iff_lt_of_le_iff_le
theorem le_iff_le_iff_lt_iff_lt {β} [LinearOrder α] [LinearOrder β] {a b : α} {c d : β} :
(a ≤ b ↔ c ≤ d) ↔ (b < a ↔ d < c) :=
⟨lt_iff_lt_of_le_iff_le, fun H ↦ not_lt.symm.trans <| (not_congr H).trans <| not_lt⟩
+#align le_iff_le_iff_lt_iff_lt le_iff_le_iff_lt_iff_lt
theorem eq_of_forall_le_iff [PartialOrder α] {a b : α} (H : ∀ c, c ≤ a ↔ c ≤ b) : a = b :=
((H _).1 le_rfl).antisymm ((H _).2 le_rfl)
+#align eq_of_forall_le_iff eq_of_forall_le_iff
theorem le_of_forall_le [Preorder α] {a b : α} (H : ∀ c, c ≤ a → c ≤ b) : a ≤ b :=
H _ le_rfl
+#align le_of_forall_le le_of_forall_le
theorem le_of_forall_le' [Preorder α] {a b : α} (H : ∀ c, a ≤ c → b ≤ c) : b ≤ a :=
H _ le_rfl
+#align le_of_forall_le' le_of_forall_le'
theorem le_of_forall_lt [LinearOrder α] {a b : α} (H : ∀ c, c < a → c < b) : a ≤ b :=
le_of_not_lt fun h ↦ lt_irrefl _ (H _ h)
+#align le_of_forall_lt le_of_forall_lt
theorem forall_lt_iff_le [LinearOrder α] {a b : α} : (∀ ⦃c⦄, c < a → c < b) ↔ a ≤ b :=
⟨le_of_forall_lt, fun h _ hca ↦ lt_of_lt_of_le hca h⟩
+#align forall_lt_iff_le forall_lt_iff_le
theorem le_of_forall_lt' [LinearOrder α] {a b : α} (H : ∀ c, a < c → b < c) : b ≤ a :=
le_of_not_lt fun h ↦ lt_irrefl _ (H _ h)
+#align le_of_forall_lt' le_of_forall_lt'
theorem forall_lt_iff_le' [LinearOrder α] {a b : α} : (∀ ⦃c⦄, a < c → b < c) ↔ b ≤ a :=
⟨le_of_forall_lt', fun h _ hac ↦ lt_of_le_of_lt h hac⟩
+#align forall_lt_iff_le' forall_lt_iff_le'
theorem eq_of_forall_ge_iff [PartialOrder α] {a b : α} (H : ∀ c, a ≤ c ↔ b ≤ c) : a = b :=
((H _).2 le_rfl).antisymm ((H _).1 le_rfl)
+#align eq_of_forall_ge_iff eq_of_forall_ge_iff
theorem eq_of_forall_lt_iff [LinearOrder α] {a b : α} (h : ∀ c, c < a ↔ c < b) : a = b :=
(le_of_forall_lt fun _ ↦ (h _).1).antisymm <| le_of_forall_lt fun _ ↦ (h _).2
+#align eq_of_forall_lt_iff eq_of_forall_lt_iff
theorem eq_of_forall_gt_iff [LinearOrder α] {a b : α} (h : ∀ c, a < c ↔ b < c) : a = b :=
(le_of_forall_lt' fun _ ↦ (h _).2).antisymm <| le_of_forall_lt' fun _ ↦ (h _).1
+#align eq_of_forall_gt_iff eq_of_forall_gt_iff
/-- A symmetric relation implies two values are equal, when it implies they're less-equal. -/
theorem rel_imp_eq_of_rel_imp_le [PartialOrder β] (r : α → α → Prop) [IsSymm α r] {f : α → β}
(h : ∀ a b, r a b → f a ≤ f b) {a b : α} : r a b → f a = f b := fun hab ↦
le_antisymm (h a b hab) (h b a <| symm hab)
+#align rel_imp_eq_of_rel_imp_le rel_imp_eq_of_rel_imp_le
/-- monotonicity of `≤` with respect to `→` -/
theorem le_implies_le_of_le_of_le {a b c d : α} [Preorder α] (hca : c ≤ a) (hbd : b ≤ d) :
a ≤ b → c ≤ d :=
fun hab ↦ (hca.trans hab).trans hbd
+#align le_implies_le_of_le_of_le le_implies_le_of_le_of_le
section PartialOrder
+
variable [PartialOrder α]
/-- To prove commutativity of a binary operation `○`, we only to check `a ○ b ≤ b ○ a` for all `a`,
`b`. -/
-lemma commutative_of_le {f : β → β → α} (comm : ∀ a b, f a b ≤ f b a) : ∀ a b, f a b = f b a :=
-fun _ _ ↦ (comm _ _).antisymm $ comm _ _
+theorem commutative_of_le {f : β → β → α} (comm : ∀ a b, f a b ≤ f b a) : ∀ a b, f a b = f b a :=
+ fun _ _ ↦ (comm _ _).antisymm <| comm _ _
+#align commutative_of_le commutative_of_le
/-- To prove associativity of a commutative binary operation `○`, we only to check
`(a ○ b) ○ c ≤ a ○ (b ○ c)` for all `a`, `b`, `c`. -/
-lemma associative_of_commutative_of_le {f : α → α → α} (comm : Commutative f)
- (assoc : ∀ a b c, f (f a b) c ≤ f a (f b c)) :
- Associative f :=
-fun a b c ↦ le_antisymm (assoc _ _ _) $ by rw [comm, comm b, comm _ c, comm a]; exact assoc _ _ _
+theorem associative_of_commutative_of_le {f : α → α → α} (comm : Commutative f)
+ (assoc : ∀ a b c, f (f a b) c ≤ f a (f b c)) : Associative f := fun a b c ↦
+ le_antisymm (assoc _ _ _) <| by
+ rw [comm, comm b, comm _ c, comm a]
+ exact assoc _ _ _
+#align associative_of_commutative_of_le associative_of_commutative_of_le
end PartialOrder
@@ -466,8 +600,7 @@ theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.to
@[ext]
theorem PartialOrder.toPreorder_injective {α : Type _} :
- Function.Injective (@PartialOrder.toPreorder α) :=
- fun A B h ↦ by
+ Function.Injective (@PartialOrder.toPreorder α) := fun A B h ↦ by
cases A
cases B
cases h
@@ -499,16 +632,19 @@ theorem Preorder.ext {α} {A B : Preorder α}
(H : ∀ x y : α, (haveI := A; x ≤ y) ↔ x ≤ y) : A = B := by
ext x y
exact H x y
+#align preorder.ext Preorder.ext
theorem PartialOrder.ext {α} {A B : PartialOrder α}
(H : ∀ x y : α, (haveI := A; x ≤ y) ↔ x ≤ y) : A = B := by
ext x y
exact H x y
+#align partial_order.ext PartialOrder.ext
theorem LinearOrder.ext {α} {A B : LinearOrder α}
(H : ∀ x y : α, (haveI := A; x ≤ y) ↔ x ≤ y) : A = B := by
ext x y
exact H x y
+#align linear_order.ext LinearOrder.ext
/-- Given a relation `R` on `β` and a function `f : α → β`, the preimage relation on `α` is defined
by `x ≤ y ↔ f x ≤ f y`. It is the unique relation on `α` making `f` a `RelEmbedding` (assuming `f`
@@ -516,14 +652,15 @@ is injective). -/
@[simp]
def Order.Preimage {α β} (f : α → β) (s : β → β → Prop) (x y : α) : Prop :=
s (f x) (f y)
+#align order.preimage Order.Preimage
@[inherit_doc]
infixl:80 " ⁻¹'o " => Order.Preimage
/-- The preimage of a decidable order is decidable. -/
instance Order.Preimage.decidable {α β} (f : α → β) (s : β → β → Prop) [H : DecidableRel s] :
- DecidableRel (f ⁻¹'o s) :=
- fun _ _ ↦ H _ _
+ DecidableRel (f ⁻¹'o s) := fun _ _ ↦ H _ _
+#align order.preimage.decidable Order.Preimage.decidable
/-! ### Order dual -/
@@ -532,6 +669,7 @@ instance Order.Preimage.decidable {α β} (f : α → β) (s : β → β → Pro
notation for `OrderDual α`. -/
def OrderDual (α : Type _) : Type _ :=
α
+#align order_dual OrderDual
@[inherit_doc]
notation:max α "ᵒᵈ" => OrderDual α
@@ -545,10 +683,10 @@ instance (α : Type _) [h : Subsingleton α] : Subsingleton αᵒᵈ :=
h
instance (α : Type _) [LE α] : LE αᵒᵈ :=
- ⟨fun a b => @LE.le α _ b a⟩
+ ⟨fun x y : α ↦ y ≤ x⟩
instance (α : Type _) [LT α] : LT αᵒᵈ :=
- ⟨fun a b => @LT.lt α _ b a⟩
+ ⟨fun x y : α ↦ y < x⟩
instance preorder (α : Type _) [Preorder α] : Preorder αᵒᵈ where
le_refl := fun _ ↦ le_refl _
@@ -575,13 +713,15 @@ instance : ∀ [Inhabited α], Inhabited αᵒᵈ := λ [x: Inhabited α] => x
theorem Preorder.dual_dual (α : Type _) [H : Preorder α] : OrderDual.preorder αᵒᵈ = H :=
Preorder.ext fun _ _ ↦ Iff.rfl
+#align order_dual.preorder.dual_dual OrderDual.Preorder.dual_dual
-theorem partialOrder.dual_dual (α : Type _) [H : PartialOrder α] :
- OrderDual.partialOrder αᵒᵈ = H :=
+theorem partialOrder.dual_dual (α : Type _) [H : PartialOrder α] : OrderDual.partialOrder αᵒᵈ = H :=
PartialOrder.ext fun _ _ ↦ Iff.rfl
+#align order_dual.partial_order.dual_dual OrderDual.partialOrder.dual_dual
theorem linearOrder.dual_dual (α : Type _) [H : LinearOrder α] : OrderDual.linearOrder αᵒᵈ = H :=
LinearOrder.ext fun _ _ ↦ Iff.rfl
+#align order_dual.linear_order.dual_dual OrderDual.linearOrder.dual_dual
end OrderDual
@@ -593,90 +733,167 @@ end OrderDual
class HasCompl (α : Type _) where
/-- Set / lattice complement -/
compl : α → α
+#align has_compl HasCompl
export HasCompl (compl)
@[inherit_doc]
postfix:999 "ᶜ" => compl
-instance : HasCompl Prop :=
+instance Prop.hasCompl : HasCompl Prop :=
⟨Not⟩
+#align Prop.has_compl Prop.hasCompl
-instance {ι : Type u} {α : ι → Type v} [∀ i, HasCompl (α i)] : HasCompl (∀ i, α i) :=
+instance Pi.hasCompl {ι : Type u} {α : ι → Type v} [∀ i, HasCompl (α i)] : HasCompl (∀ i, α i) :=
⟨fun x i ↦ x iᶜ⟩
+#align pi.has_compl Pi.hasCompl
theorem Pi.compl_def {ι : Type u} {α : ι → Type v} [∀ i, HasCompl (α i)] (x : ∀ i, α i) :
xᶜ = fun i ↦ x iᶜ :=
rfl
+#align pi.compl_def Pi.compl_def
@[simp]
theorem Pi.compl_apply {ι : Type u} {α : ι → Type v} [∀ i, HasCompl (α i)] (x : ∀ i, α i) (i : ι) :
(xᶜ) i = x iᶜ :=
rfl
+#align pi.compl_apply Pi.compl_apply
-instance (r) [IsIrrefl α r] : IsRefl α (rᶜ) :=
+instance IsIrrefl.compl (r) [IsIrrefl α r] : IsRefl α (rᶜ) :=
⟨@irrefl α r _⟩
+#align is_irrefl.compl IsIrrefl.compl
-instance (r) [IsRefl α r] : IsIrrefl α (rᶜ) :=
+instance IsRefl.compl (r) [IsRefl α r] : IsIrrefl α (rᶜ) :=
⟨fun a ↦ not_not_intro (refl a)⟩
+#align is_refl.compl IsRefl.compl
/-! ### Order instances on the function space -/
-instance {ι : Type u} {α : ι → Type v} [∀ i, LE (α i)] : LE (∀ i, α i) where
- le x y := ∀ i, x i ≤ y i
+instance Pi.hasLe {ι : Type u} {α : ι → Type v} [∀ i, LE (α i)] :
+ LE (∀ i, α i) where le x y := ∀ i, x i ≤ y i
+#align pi.has_le Pi.hasLe
theorem Pi.le_def {ι : Type u} {α : ι → Type v} [∀ i, LE (α i)] {x y : ∀ i, α i} :
x ≤ y ↔ ∀ i, x i ≤ y i :=
Iff.rfl
+#align pi.le_def Pi.le_def
-instance {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] : Preorder (∀ i, α i) where
+instance Pi.preorder {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] : Preorder (∀ i, α i) where
__ := inferInstanceAs (LE (∀ i, α i))
le_refl := fun a i ↦ le_refl (a i)
le_trans := fun a b c h₁ h₂ i ↦ le_trans (h₁ i) (h₂ i)
+#align pi.preorder Pi.preorder
theorem Pi.lt_def {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] {x y : ∀ i, α i} :
x < y ↔ x ≤ y ∧ ∃ i, x i < y i := by
simp (config := { contextual := true }) [lt_iff_le_not_le, Pi.le_def]
+#align pi.lt_def Pi.lt_def
+
+instance Pi.partialOrder [∀ i, PartialOrder (π i)] : PartialOrder (∀ i, π i) where
+ __ := Pi.preorder
+ le_antisymm := fun _ _ h1 h2 ↦ funext fun b ↦ (h1 b).antisymm (h2 b)
+#align pi.partial_order Pi.partialOrder
+
+section Pi
+
+/-- A function `a` is strongly less than a function `b` if `a i < b i` for all `i`. -/
+def StrongLT [∀ i, LT (π i)] (a b : ∀ i, π i) : Prop :=
+ ∀ i, a i < b i
+#align strong_lt StrongLT
+
+@[inherit_doc]
+local infixl:50 " ≺ " => StrongLT
+
+variable [∀ i, Preorder (π i)] {a b c : ∀ i, π i}
+
+theorem le_of_strongLT (h : a ≺ b) : a ≤ b := fun _ ↦ (h _).le
+#align le_of_strong_lt le_of_strongLT
+
+theorem lt_of_strongLT [Nonempty ι] (h : a ≺ b) : a < b := by
+ inhabit ι
+ exact Pi.lt_def.2 ⟨le_of_strongLT h, default, h _⟩
+#align lt_of_strong_lt lt_of_strongLT
+
+theorem strongLT_of_strongLT_of_le (hab : a ≺ b) (hbc : b ≤ c) : a ≺ c := fun _ ↦
+ (hab _).trans_le <| hbc _
+#align strong_lt_of_strong_lt_of_le strongLT_of_strongLT_of_le
+
+theorem strongLT_of_le_of_strongLT (hab : a ≤ b) (hbc : b ≺ c) : a ≺ c := fun _ ↦
+ (hab _).trans_lt <| hbc _
+#align strong_lt_of_le_of_strong_lt strongLT_of_le_of_strongLT
+
+alias le_of_strongLT ← StrongLT.le
+
+alias lt_of_strongLT ← StrongLT.lt
+
+alias strongLT_of_strongLT_of_le ← StrongLT.trans_le
-theorem le_update_iff {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] [DecidableEq ι]
- {x y : ∀ i, α i} {i : ι} {a : α i} :
- x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
+alias strongLT_of_le_of_strongLT ← LE.le.trans_strongLT
+
+end Pi
+
+section Function
+
+variable [DecidableEq ι] [∀ i, Preorder (π i)] {x y : ∀ i, π i} {i : ι} {a b : π i}
+
+theorem le_update_iff : x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z ↦ x j ≤ z
+#align le_update_iff le_update_iff
-theorem update_le_iff {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] [DecidableEq ι]
- {x y : ∀ i, α i} {i : ι} {a : α i} :
- Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
+theorem update_le_iff : Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j :=
Function.forall_update_iff _ fun j z ↦ z ≤ y j
+#align update_le_iff update_le_iff
-theorem update_le_update_iff {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] [DecidableEq ι]
- {x y : ∀ i, α i} {i : ι} {a b : α i} :
+theorem update_le_update_iff :
Function.update x i a ≤ Function.update y i b ↔ a ≤ b ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j := by
simp (config := { contextual := true }) [update_le_iff]
+#align update_le_update_iff update_le_update_iff
-instance {ι : Type u} {α : ι → Type v} [∀ i, PartialOrder (α i)] :
- PartialOrder (∀ i, α i) where
- __ := inferInstanceAs (Preorder (∀ i, α i))
- le_antisymm := fun _ _ h1 h2 ↦ funext fun b ↦ (h1 b).antisymm (h2 b)
+@[simp]
+theorem le_update_self_iff : x ≤ update x i a ↔ x i ≤ a := by simp [le_update_iff]
+#align le_update_self_iff le_update_self_iff
+
+@[simp]
+theorem update_le_self_iff : update x i a ≤ x ↔ a ≤ x i := by simp [update_le_iff]
+#align update_le_self_iff update_le_self_iff
+
+@[simp]
+theorem lt_update_self_iff : x < update x i a ↔ x i < a := by simp [lt_iff_le_not_le]
+#align lt_update_self_iff lt_update_self_iff
+
+@[simp]
+theorem update_lt_self_iff : update x i a < x ↔ a < x i := by simp [lt_iff_le_not_le]
+#align update_lt_self_iff update_lt_self_iff
+
+end Function
instance Pi.sdiff {ι : Type u} {α : ι → Type v} [∀ i, SDiff (α i)] : SDiff (∀ i, α i) :=
⟨fun x y i ↦ x i \ y i⟩
+#align pi.has_sdiff Pi.sdiff
theorem Pi.sdiff_def {ι : Type u} {α : ι → Type v} [∀ i, SDiff (α i)] (x y : ∀ i, α i) :
x \ y = fun i ↦ x i \ y i :=
rfl
+#align pi.sdiff_def Pi.sdiff_def
@[simp]
theorem Pi.sdiff_apply {ι : Type u} {α : ι → Type v} [∀ i, SDiff (α i)] (x y : ∀ i, α i) (i : ι) :
(x \ y) i = x i \ y i :=
rfl
+#align pi.sdiff_apply Pi.sdiff_apply
namespace Function
+
variable [Preorder α] [Nonempty β] {a b : α}
-@[simp] lemma const_le_const : const β a ≤ const β b ↔ a ≤ b := by simp [Pi.le_def]
-@[simp] lemma const_lt_const : const β a < const β b ↔ a < b := by
- simpa [Pi.lt_def] using le_of_lt (α := α)
+@[simp]
+theorem const_le_const : const β a ≤ const β b ↔ a ≤ b := by simp [Pi.le_def]
+#align function.const_le_const Function.const_le_const
+
+@[simp]
+theorem const_lt_const : const β a < const β b ↔ a < b := by simpa [Pi.lt_def] using le_of_lt
+#align function.const_lt_const Function.const_lt_const
end Function
@@ -688,25 +905,31 @@ section MinMaxRec
variable [LinearOrder α] {p : α → Prop} {x y : α}
theorem min_rec (hx : x ≤ y → p x) (hy : y ≤ x → p y) : p (min x y) :=
- (le_total x y).rec (fun h ↦ (min_eq_left h).symm.subst (hx h))
- fun h ↦ (min_eq_right h).symm.subst (hy h)
+ (le_total x y).rec (fun h ↦ (min_eq_left h).symm.subst (hx h)) fun h ↦
+ (min_eq_right h).symm.subst (hy h)
+#align min_rec min_rec
theorem max_rec (hx : y ≤ x → p x) (hy : x ≤ y → p y) : p (max x y) :=
@min_rec αᵒᵈ _ _ _ _ hx hy
+#align max_rec max_rec
theorem min_rec' (p : α → Prop) (hx : p x) (hy : p y) : p (min x y) :=
min_rec (fun _ ↦ hx) fun _ ↦ hy
+#align min_rec' min_rec'
theorem max_rec' (p : α → Prop) (hx : p x) (hy : p y) : p (max x y) :=
max_rec (fun _ ↦ hx) fun _ ↦ hy
+#align max_rec' max_rec'
-theorem min_def' (x y : α) : min x y = if x < y then x else y := by
+theorem min_def_lt (x y : α) : min x y = if x < y then x else y := by
rw [min_comm, min_def, ← ite_not]
simp only [not_le]
+#align min_def_lt min_def_lt
-theorem max_def' (x y : α) : max x y = if y < x then x else y := by
- rw [max_def, ← ite_not]
+theorem max_def_lt (x y : α) : max x y = if x < y then y else x := by
+ rw [max_comm, max_def, ← ite_not]
simp only [not_le]
+#align max_def_lt max_def_lt
end MinMaxRec
@@ -718,12 +941,14 @@ end MinMaxRec
class HasSup (α : Type u) where
/-- Least upper bound (`\lub` notation) -/
sup : α → α → α
+#align has_sup HasSup
/-- Typeclass for the `⊓` (`\glb`) notation -/
@[notation_class, ext]
class HasInf (α : Type u) where
/-- Greatest lower bound (`\glb` notation) -/
inf : α → α → α
+#align has_inf HasInf
@[inherit_doc]
infixl:68 " ⊔ " => HasSup.sup
@@ -743,12 +968,14 @@ def Preorder.lift {α β} [Preorder β] (f : α → β) : Preorder α where
le_trans _ _ _ := _root_.le_trans
lt x y := f x < f y
lt_iff_le_not_le _ _ := _root_.lt_iff_le_not_le
+#align preorder.lift Preorder.lift
/-- Transfer a `PartialOrder` on `β` to a `PartialOrder` on `α` using an injective
function `f : α → β`. See note [reducible non-instances]. -/
@[reducible]
def PartialOrder.lift {α β} [PartialOrder β] (f : α → β) (inj : Injective f) : PartialOrder α :=
{ Preorder.lift f with le_antisymm := fun _ _ h₁ h₂ ↦ inj (h₁.antisymm h₂) }
+#align partial_order.lift PartialOrder.lift
/-- Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
function `f : α → β`. This version takes `[HasSup α]` and `[HasInf α]` as arguments, then uses
@@ -759,21 +986,23 @@ def LinearOrder.lift {α β} [LinearOrder β] [HasSup α] [HasInf α] (f : α
(hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
LinearOrder α :=
{ PartialOrder.lift f inj with
- le_total := fun x y ↦ le_total (f x) (f y)
- decidable_le := fun x y ↦ (inferInstance : Decidable (f x ≤ f y))
- decidable_lt := fun x y ↦ (inferInstance : Decidable (f x < f y))
- decidable_eq := fun x y ↦ decidable_of_iff (f x = f y) inj.eq_iff,
- min := (· ⊓ ·), max := (· ⊔ ·),
- min_def := by
- intros x y
- apply inj
- rw [apply_ite f]
- exact (hinf _ _).trans (min_def _ _)
- max_def := by
- intros x y
- apply inj
- rw [apply_ite f]
- exact (hsup _ _).trans (max_def _ _) }
+ le_total := fun x y ↦ le_total (f x) (f y)
+ decidable_le := fun x y ↦ (inferInstance : Decidable (f x ≤ f y))
+ decidable_lt := fun x y ↦ (inferInstance : Decidable (f x < f y))
+ decidable_eq := fun x y ↦ decidable_of_iff (f x = f y) inj.eq_iff
+ min := (· ⊓ ·)
+ max := (· ⊔ ·)
+ min_def := by
+ intros x y
+ apply inj
+ rw [apply_ite f]
+ exact (hinf _ _).trans (min_def _ _)
+ max_def := by
+ intros x y
+ apply inj
+ rw [apply_ite f]
+ exact (hsup _ _).trans (max_def _ _) }
+#align linear_order.lift LinearOrder.lift
/-- Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
function `f : α → β`. This version autogenerates `min` and `max` fields. See `LinearOrder.lift`
@@ -781,14 +1010,11 @@ for a version that takes `[HasSup α]` and `[HasInf α]`, then uses them as `max
See note [reducible non-instances]. -/
@[reducible]
def LinearOrder.lift' {α β} [LinearOrder β] (f : α → β) (inj : Injective f) : LinearOrder α :=
- { PartialOrder.lift f inj with
- le_total := λ x y => le_total (f x) (f y),
- toMin := minOfLe
- toMax := maxOfLe
- decidable_le := λ x y => (inferInstance : Decidable (f x ≤ f y))
- decidable_lt := λ x y => (inferInstance : Decidable (f x < f y))
- decidable_eq := λ _ _ => decidable_of_iff _ inj.eq_iff
- }
+ @LinearOrder.lift α β _ ⟨fun x y ↦ if f x ≤ f y then y else x⟩
+ ⟨fun x y ↦ if f x ≤ f y then x else y⟩ f inj
+ (fun _ _ ↦ (apply_ite f _ _ _).trans (max_def _ _).symm) fun _ _ ↦
+ (apply_ite f _ _ _).trans (min_def _ _).symm
+#align linear_order.lift' LinearOrder.lift'
/-! ### Subtype of an order -/
@@ -805,35 +1031,38 @@ instance lt [LT α] {p : α → Prop} : LT (Subtype p) :=
theorem mk_le_mk [LE α] {p : α → Prop} {x y : α} {hx : p x} {hy : p y} :
(⟨x, hx⟩ : Subtype p) ≤ ⟨y, hy⟩ ↔ x ≤ y :=
Iff.rfl
+#align subtype.mk_le_mk Subtype.mk_le_mk
@[simp]
theorem mk_lt_mk [LT α] {p : α → Prop} {x y : α} {hx : p x} {hy : p y} :
(⟨x, hx⟩ : Subtype p) < ⟨y, hy⟩ ↔ x < y :=
Iff.rfl
+#align subtype.mk_lt_mk Subtype.mk_lt_mk
--- Porting note: no `norm_cast` due to eagerly elaborated coercions
-@[simp]
+@[simp, norm_cast]
theorem coe_le_coe [LE α] {p : α → Prop} {x y : Subtype p} : (x : α) ≤ y ↔ x ≤ y :=
Iff.rfl
+#align subtype.coe_le_coe Subtype.coe_le_coe
--- Porting note: no `norm_cast` due to eagerly elaborated coercions
-@[simp]
+@[simp, norm_cast]
theorem coe_lt_coe [LT α] {p : α → Prop} {x y : Subtype p} : (x : α) < y ↔ x < y :=
Iff.rfl
+#align subtype.coe_lt_coe Subtype.coe_lt_coe
instance preorder [Preorder α] (p : α → Prop) : Preorder (Subtype p) :=
Preorder.lift (fun (a : Subtype p) ↦ (a : α))
instance partialOrder [PartialOrder α] (p : α → Prop) : PartialOrder (Subtype p) :=
PartialOrder.lift (fun (a : Subtype p) ↦ (a : α)) Subtype.coe_injective
+#align subtype.partial_order Subtype.partialOrder
instance decidableLE [Preorder α] [h : @DecidableRel α (· ≤ ·)] {p : α → Prop} :
- @DecidableRel (Subtype p) (· ≤ ·) :=
- fun a b ↦ h a b
+ @DecidableRel (Subtype p) (· ≤ ·) := fun a b ↦ h a b
+#align subtype.decidable_le Subtype.decidableLE
instance decidableLT [Preorder α] [h : @DecidableRel α (· < ·)] {p : α → Prop} :
- @DecidableRel (Subtype p) (· < ·) :=
- fun a b ↦ h a b
+ @DecidableRel (Subtype p) (· < ·) := fun a b ↦ h a b
+#align subtype.decidable_lt Subtype.decidableLT
/-- A subtype of a linear order is a linear order. We explicitly give the proofs of decidable
equality and decidable order in order to ensure the decidability instances are all definitionally
@@ -841,7 +1070,8 @@ equal. -/
instance linearOrder [LinearOrder α] (p : α → Prop) : LinearOrder (Subtype p) :=
@LinearOrder.lift (Subtype p) _ _ ⟨fun x y ↦ ⟨max x y, max_rec' _ x.2 y.2⟩⟩
⟨fun x y ↦ ⟨min x y, min_rec' _ x.2 y.2⟩⟩ (fun (a : Subtype p) ↦ (a : α))
- Subtype.coe_injective (fun _ _ ↦ rfl) fun _ _ ↦ rfl
+ Subtype.coe_injective (fun _ _ ↦ rfl) fun _ _ ↦
+ rfl
end Subtype
@@ -860,14 +1090,17 @@ instance (α : Type u) (β : Type v) [LE α] [LE β] : LE (α × β) :=
theorem le_def [LE α] [LE β] {x y : α × β} : x ≤ y ↔ x.1 ≤ y.1 ∧ x.2 ≤ y.2 :=
Iff.rfl
+#align prod.le_def Prod.le_def
@[simp]
theorem mk_le_mk [LE α] [LE β] {x₁ x₂ : α} {y₁ y₂ : β} : (x₁, y₁) ≤ (x₂, y₂) ↔ x₁ ≤ x₂ ∧ y₁ ≤ y₂ :=
Iff.rfl
+#align prod.mk_le_mk Prod.mk_le_mk
@[simp]
theorem swap_le_swap [LE α] [LE β] {x y : α × β} : x.swap ≤ y.swap ↔ x ≤ y :=
and_comm
+#align prod.swap_le_swap Prod.swap_le_swap
section Preorder
@@ -881,31 +1114,38 @@ instance (α : Type u) (β : Type v) [Preorder α] [Preorder β] : Preorder (α
@[simp]
theorem swap_lt_swap : x.swap < y.swap ↔ x < y :=
and_congr swap_le_swap (not_congr swap_le_swap)
+#align prod.swap_lt_swap Prod.swap_lt_swap
theorem mk_le_mk_iff_left : (a₁, b) ≤ (a₂, b) ↔ a₁ ≤ a₂ :=
and_iff_left le_rfl
+#align prod.mk_le_mk_iff_left Prod.mk_le_mk_iff_left
theorem mk_le_mk_iff_right : (a, b₁) ≤ (a, b₂) ↔ b₁ ≤ b₂ :=
and_iff_right le_rfl
+#align prod.mk_le_mk_iff_right Prod.mk_le_mk_iff_right
theorem mk_lt_mk_iff_left : (a₁, b) < (a₂, b) ↔ a₁ < a₂ :=
lt_iff_lt_of_le_iff_le' mk_le_mk_iff_left mk_le_mk_iff_left
+#align prod.mk_lt_mk_iff_left Prod.mk_lt_mk_iff_left
theorem mk_lt_mk_iff_right : (a, b₁) < (a, b₂) ↔ b₁ < b₂ :=
lt_iff_lt_of_le_iff_le' mk_le_mk_iff_right mk_le_mk_iff_right
+#align prod.mk_lt_mk_iff_right Prod.mk_lt_mk_iff_right
theorem lt_iff : x < y ↔ x.1 < y.1 ∧ x.2 ≤ y.2 ∨ x.1 ≤ y.1 ∧ x.2 < y.2 := by
refine' ⟨fun h ↦ _, _⟩
- · by_cases h₁:y.1 ≤ x.1
- · refine Or.inr ⟨h.1.1, LE.le.lt_of_not_le h.1.2 fun h₂ ↦ h.2 ⟨h₁, h₂⟩⟩
+ · by_cases h₁ : y.1 ≤ x.1
+ · exact Or.inr ⟨h.1.1, LE.le.lt_of_not_le h.1.2 fun h₂ ↦ h.2 ⟨h₁, h₂⟩⟩
· exact Or.inl ⟨LE.le.lt_of_not_le h.1.1 h₁, h.1.2⟩
· rintro (⟨h₁, h₂⟩ | ⟨h₁, h₂⟩)
· exact ⟨⟨h₁.le, h₂⟩, fun h ↦ h₁.not_le h.1⟩
· exact ⟨⟨h₁, h₂.le⟩, fun h ↦ h₂.not_le h.2⟩
+#align prod.lt_iff Prod.lt_iff
@[simp]
theorem mk_lt_mk : (a₁, b₁) < (a₂, b₂) ↔ a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂ :=
lt_iff
+#align prod.mk_lt_mk Prod.mk_lt_mk
end Preorder
@@ -921,42 +1161,77 @@ end Prod
/-! ### Additional order classes -/
-/-- An order is dense if there is an element between any pair of distinct elements. -/
+/-- An order is dense if there is an element between any pair of distinct comparable elements. -/
class DenselyOrdered (α : Type u) [LT α] : Prop where
/-- An order is dense if there is an element between any pair of distinct elements. -/
dense : ∀ a₁ a₂ : α, a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂
+#align densely_ordered DenselyOrdered
theorem exists_between [LT α] [DenselyOrdered α] : ∀ {a₁ a₂ : α}, a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂ :=
DenselyOrdered.dense _ _
+#align exists_between exists_between
-instance (α : Type u) [LT α] [h : DenselyOrdered α] : DenselyOrdered αᵒᵈ :=
+instance OrderDual.denselyOrdered (α : Type u) [LT α] [h : DenselyOrdered α] :
+ DenselyOrdered αᵒᵈ :=
⟨fun _ _ ha ↦ (@exists_between α _ h _ _ ha).imp fun _ ↦ And.symm⟩
+#align order_dual.densely_ordered OrderDual.denselyOrdered
+
+@[simp]
+theorem denselyOrdered_orderDual [LT α] : DenselyOrdered αᵒᵈ ↔ DenselyOrdered α :=
+ ⟨by convert @OrderDual.denselyOrdered αᵒᵈ _, @OrderDual.denselyOrdered α _⟩
+#align densely_ordered_order_dual denselyOrdered_orderDual
+
+instance [Preorder α] [Preorder β] [DenselyOrdered α] [DenselyOrdered β] : DenselyOrdered (α × β) :=
+ ⟨fun a b ↦ by
+ simp_rw [Prod.lt_iff]
+ rintro (⟨h₁, h₂⟩ | ⟨h₁, h₂⟩)
+ · obtain ⟨c, ha, hb⟩ := exists_between h₁
+ exact ⟨(c, _), Or.inl ⟨ha, h₂⟩, Or.inl ⟨hb, le_rfl⟩⟩
+ · obtain ⟨c, ha, hb⟩ := exists_between h₂
+ exact ⟨(_, c), Or.inr ⟨h₁, ha⟩, Or.inr ⟨le_rfl, hb⟩⟩⟩
+
+instance {α : ι → Type _} [∀ i, Preorder (α i)] [∀ i, DenselyOrdered (α i)] :
+ DenselyOrdered (∀ i, α i) :=
+ ⟨fun a b ↦ by
+ classical
+ simp_rw [Pi.lt_def]
+ rintro ⟨hab, i, hi⟩
+ obtain ⟨c, ha, hb⟩ := exists_between hi
+ exact
+ ⟨Function.update a i c,
+ ⟨le_update_iff.2 ⟨ha.le, fun _ _ ↦ le_rfl⟩, i, by rwa [update_same]⟩,
+ update_le_iff.2 ⟨hb.le, fun _ _ ↦ hab _⟩, i, by rwa [update_same]⟩⟩
theorem le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
(h : ∀ a, a₂ < a → a₁ ≤ a) : a₁ ≤ a₂ :=
le_of_not_gt fun ha ↦
let ⟨a, ha₁, ha₂⟩ := exists_between ha
lt_irrefl a <| lt_of_lt_of_le ‹a < a₁› (h _ ‹a₂ < a›)
+#align le_of_forall_le_of_dense le_of_forall_le_of_dense
theorem eq_of_le_of_forall_le_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α} (h₁ : a₂ ≤ a₁)
(h₂ : ∀ a, a₂ < a → a₁ ≤ a) : a₁ = a₂ :=
le_antisymm (le_of_forall_le_of_dense h₂) h₁
+#align eq_of_le_of_forall_le_of_dense eq_of_le_of_forall_le_of_dense
theorem le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
(h : ∀ a₃ < a₁, a₃ ≤ a₂) : a₁ ≤ a₂ :=
le_of_not_gt fun ha ↦
let ⟨a, ha₁, ha₂⟩ := exists_between ha
lt_irrefl a <| lt_of_le_of_lt (h _ ‹a < a₁›) ‹a₂ < a›
+#align le_of_forall_ge_of_dense le_of_forall_ge_of_dense
theorem eq_of_le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α} (h₁ : a₂ ≤ a₁)
(h₂ : ∀ a₃ < a₁, a₃ ≤ a₂) : a₁ = a₂ :=
(le_of_forall_ge_of_dense h₂).antisymm h₁
+#align eq_of_le_of_forall_ge_of_dense eq_of_le_of_forall_ge_of_dense
theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
(∃ a, a₁ < a ∧ a < a₂) ∨ (∀ a, a₁ < a → a₂ ≤ a) ∧ ∀ a < a₂, a ≤ a₁ :=
or_iff_not_imp_left.2 fun h ↦
⟨fun a ha₁ ↦ le_of_not_gt fun ha₂ ↦ h ⟨a, ha₁, ha₂⟩,
fun a ha₂ ↦ le_of_not_gt fun ha₁ ↦ h ⟨a, ha₁, ha₂⟩⟩
+#align dense_or_discrete dense_or_discrete
namespace PUnit
@@ -979,41 +1254,49 @@ instance : LinearOrder PUnit where
theorem max_eq : max a b = star :=
rfl
+#align punit.max_eq PUnit.max_eq
theorem min_eq : min a b = star :=
rfl
+#align punit.min_eq PUnit.min_eq
+-- Porting note: simp can prove this @[simp]
protected theorem le : a ≤ b :=
- le_refl _
-
-theorem not_lt : ¬a < b := by
- simp only [lt_self_iff_false]
-
+ trivial
+#align punit.le PUnit.le
+-- Porting note: simp can prove this @[simp]
+theorem not_lt : ¬a < b :=
+ not_false
+#align punit.not_lt PUnit.not_lt
instance : DenselyOrdered PUnit :=
- ⟨fun _ _ h ↦ (not_lt _ _ h).elim⟩
+ ⟨fun _ _ ↦ False.elim⟩
end PUnit
section «Prop»
/-- Propositions form a complete boolean algebra, where the `≤` relation is given by implication. -/
-instance : LE Prop :=
- ⟨fun p q ↦ p → q⟩
+instance Prop.le : LE Prop :=
+ ⟨(· → ·)⟩
+#align Prop.has_le Prop.le
@[simp]
-theorem le_Prop_eq : ((· ≤ ·) : Prop → Prop → Prop) = (fun p q ↦ p → q) :=
+theorem le_Prop_eq : ((· ≤ ·) : Prop → Prop → Prop) = (· → ·) :=
rfl
+#align le_Prop_eq le_Prop_eq
theorem subrelation_iff_le {r s : α → α → Prop} : Subrelation r s ↔ r ≤ s :=
Iff.rfl
+#align subrelation_iff_le subrelation_iff_le
-instance : PartialOrder Prop where
- __ := inferInstanceAs (LE Prop)
- le_refl := fun _ ↦ id
- le_trans := fun a b c f g ↦ g ∘ f
- le_antisymm := fun a b Hab Hba ↦ propext ⟨Hab, Hba⟩
+instance Prop.partialOrder : PartialOrder Prop where
+ __ := Prop.le
+ le_refl _ := id
+ le_trans _ _ _ f g := g ∘ f
+ le_antisymm _ _ Hab Hba := propext ⟨Hab, Hba⟩
+#align Prop.partial_order Prop.partialOrder
end «Prop»
@@ -1025,14 +1308,14 @@ variable {s : β → β → Prop} {t : γ → γ → Prop}
/-- Type synonym to create an instance of `LinearOrder` from a `PartialOrder` and `IsTotal α (≤)` -/
def AsLinearOrder (α : Type u) :=
α
+#align as_linear_order AsLinearOrder
instance {α} [Inhabited α] : Inhabited (AsLinearOrder α) :=
⟨(default : α)⟩
-noncomputable instance {α} [PartialOrder α] [IsTotal α (· ≤ ·)] :
+noncomputable instance AsLinearOrder.linearOrder {α} [PartialOrder α] [IsTotal α (· ≤ ·)] :
LinearOrder (AsLinearOrder α) where
__ := inferInstanceAs (PartialOrder α)
le_total := @total_of α (· ≤ ·) _
decidable_le := Classical.decRel _
- toMin := @minOfLe α _ (Classical.decRel _)
- toMax := @maxOfLe α _ (Classical.decRel _)
+#align as_linear_order.linear_order AsLinearOrder.linearOrder
The script used to do this is included. The yaml file was obtained from https://raw.githubusercontent.com/wiki/leanprover-community/mathlib/mathlib4-port-status.md
@@ -2,6 +2,11 @@
Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro
+
+! This file was ported from Lean 3 source module order.basic
+! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
-/
import Mathlib.Data.Prod.Basic
import Mathlib.Data.Subtype
All dependencies are ported!