The areas / V04. Order and lattices
Mathlib.Algebra.Order.Monoid.Unbundled.Defs
108 declarations. Mathlib docs · Source
Covariants and contravariants
This file contains general lemmas and instances to work with the interactions between a relation and an action on a Type.
The intended application is the splitting of the ordering from the algebraic assumptions on the
operations in the Ordered[...] hierarchy.
The strategy is to introduce two more flexible typeclasses, CovariantClass and
ContravariantClass:
CovariantClassmodels the implicationa ≤ b → c * a ≤ c * b(multiplication is monotone),ContravariantClassmodels the implicationa * b < a * c → b < c.
Since Co(ntra)variantClass takes as input the operation (typically (+) or (*)) and the order
relation (typically (≤) or (<)), these are the only two typeclasses that I have used.
The general approach is to formulate the lemma that you are interested in and prove it, with the
IsOrdered[...] typeclass of your liking. After that, you convert the typeclass,
say [IsOrderedCancelMonoid M], into whichever typeclasses, e.g.
[CovariantClass M M (Function.swap (*)) (≤)]
and have a go at seeing if the proof still works!
Note that it is possible to combine several Co(ntra)variantClass assumptions together.
Indeed, the usual ordered typeclasses arise from assuming the pair
[CovariantClass M M (*) (≤)] [ContravariantClass M M (*) (<)]
on top of order/algebraic assumptions.
A formal remark is that normally CovariantClass uses the (≤)-relation, while
ContravariantClass uses the (<)-relation. This need not be the case in general, but seems to be
the most common usage. In the opposite direction, the implication
[Semigroup α] [PartialOrder α] [ContravariantClass α α (*) (≤)] → LeftCancelSemigroup α
holds -- note the Co*ntra* assumption on the (≤)-relation.
Formalization notes
We stick to the convention of using Function.swap (*) (or Function.swap (+)), for the
typeclass assumptions, since Function.swap is slightly better behaved than flip.
However, sometimes as a non-typeclass assumption, we prefer flip (*) (or flip (+)),
as it is easier to use.
TODO
This is unergonomic. Inline in MulLeftMono and friends.
def Covariant E1 #
(M : Type u_1) → (N : Type u_2) → (M → N → N) → (N → N → Prop) → Prop
Covariant is useful to formulate succinctly statements about the interactions between an
action of a Type on another one and a relation on the acted-upon Type.
See the CovariantClass doc-string for its meaning.
def Contravariant E1 #
(M : Type u_1) → (N : Type u_2) → (M → N → N) → (N → N → Prop) → Prop
Contravariant is useful to formulate succinctly statements about the interactions between an
action of a Type on another one and a relation on the acted-upon Type.
See the ContravariantClass doc-string for its meaning.
class CovariantClass E1 #
(M : Type u_1) → (N : Type u_2) → (M → N → N) → (N → N → Prop) → Prop
Given an action μ of a Type M on a Type N and a relation r on N, informally, the
CovariantClass says that "the action μ preserves the relation r."
More precisely, the CovariantClass is a class taking two Types M N, together with an "action"
μ : M → N → N and a relation r : N → N → Prop. Its unique field elim is the assertion that
for all m ∈ M and all elements n₁, n₂ ∈ N, if the relation r holds for the pair
(n₁, n₂), then, the relation r also holds for the pair (μ m n₁, μ m n₂),
obtained from (n₁, n₂) by acting upon it by m.
If m : M and h : r n₁ n₂, then CovariantClass.elim m h : r (μ m n₁) (μ m n₂).
ctor CovariantClass.mk E0 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop}, Covariant M N μ r → CovariantClass M N μ r
theorem CovariantClass.elim E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop} [self : CovariantClass M N μ r], Covariant M N μ r
For all m ∈ M and all elements n₁, n₂ ∈ N, if the relation r holds for the pair
(n₁, n₂), then, the relation r also holds for the pair (μ m n₁, μ m n₂)
class ContravariantClass E1 #
(M : Type u_1) → (N : Type u_2) → (M → N → N) → (N → N → Prop) → Prop
Given an action μ of a Type M on a Type N and a relation r on N, informally, the
ContravariantClass says that "if the result of the action μ on a pair satisfies the
relation r, then the initial pair satisfied the relation r."
More precisely, the ContravariantClass is a class taking two Types M N, together with an
"action" μ : M → N → N and a relation r : N → N → Prop. Its unique field elim is the
assertion that for all m ∈ M and all elements n₁, n₂ ∈ N, if the relation r holds for the
pair (μ m n₁, μ m n₂) obtained from (n₁, n₂) by acting upon it by m, then, the relation
r also holds for the pair (n₁, n₂).
If m : M and h : r (μ m n₁) (μ m n₂), then ContravariantClass.elim m h : r n₁ n₂.
ctor ContravariantClass.mk E0 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop}, Contravariant M N μ r → ContravariantClass M N μ r
theorem ContravariantClass.elim E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop} [self : ContravariantClass M N μ r],
Contravariant M N μ r
For all m ∈ M and all elements n₁, n₂ ∈ N, if the relation r holds for the
pair (μ m n₁, μ m n₂) obtained from (n₁, n₂) by acting upon it by m, then, the relation
r also holds for the pair (n₁, n₂).
abbrev MulLeftMono E3 #
(M : Type u_1) → [Mul M] → [LE M] → Prop
Typeclass for monotonicity of multiplication on the left,
namely b₁ ≤ b₂ → a * b₁ ≤ a * b₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedMonoid.
abbrev MulRightMono E3 #
(M : Type u_1) → [Mul M] → [LE M] → Prop
Typeclass for monotonicity of multiplication on the right,
namely a₁ ≤ a₂ → a₁ * b ≤ a₂ * b.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedMonoid.
abbrev AddLeftMono E1 #
(M : Type u_1) → [Add M] → [LE M] → Prop
Typeclass for monotonicity of addition on the left,
namely b₁ ≤ b₂ → a + b₁ ≤ a + b₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedAddMonoid.
abbrev AddRightMono E1 #
(M : Type u_1) → [Add M] → [LE M] → Prop
Typeclass for monotonicity of addition on the right,
namely a₁ ≤ a₂ → a₁ + b ≤ a₂ + b.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedAddMonoid.
abbrev MulLeftStrictMono E1 #
(M : Type u_1) → [Mul M] → [LT M] → Prop
Typeclass for monotonicity of multiplication on the left,
namely b₁ < b₂ → a * b₁ < a * b₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedMonoid.
abbrev MulRightStrictMono E1 #
(M : Type u_1) → [Mul M] → [LT M] → Prop
Typeclass for monotonicity of multiplication on the right,
namely a₁ < a₂ → a₁ * b < a₂ * b.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedMonoid.
abbrev AddLeftStrictMono E1 #
(M : Type u_1) → [Add M] → [LT M] → Prop
Typeclass for monotonicity of addition on the left,
namely b₁ < b₂ → a + b₁ < a + b₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedAddMonoid.
abbrev AddRightStrictMono E1 #
(M : Type u_1) → [Add M] → [LT M] → Prop
Typeclass for monotonicity of addition on the right,
namely a₁ < a₂ → a₁ + b < a₂ + b.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedAddMonoid.
abbrev MulLeftReflectLT E1 #
(M : Type u_1) → [Mul M] → [LT M] → Prop
Typeclass for strict reverse monotonicity of multiplication on the left,
namely a * b₁ < a * b₂ → b₁ < b₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedMonoid.
abbrev MulRightReflectLT E1 #
(M : Type u_1) → [Mul M] → [LT M] → Prop
Typeclass for strict reverse monotonicity of multiplication on the right,
namely a₁ * b < a₂ * b → a₁ < a₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedMonoid.
abbrev AddLeftReflectLT E1 #
(M : Type u_1) → [Add M] → [LT M] → Prop
Typeclass for strict reverse monotonicity of addition on the left,
namely a + b₁ < a + b₂ → b₁ < b₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedAddMonoid.
abbrev AddRightReflectLT E1 #
(M : Type u_1) → [Add M] → [LT M] → Prop
Typeclass for strict reverse monotonicity of addition on the right,
namely a₁ * b < a₂ * b → a₁ < a₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedAddMonoid.
class MulLeftReflectLE E1 #
(M : Type u_1) → [Mul M] → [LE M] → Prop
Typeclass for reverse monotonicity of multiplication on the left,
namely a * b₁ ≤ a * b₂ → b₁ ≤ b₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedCancelMonoid.
ctor MulLeftReflectLE.mk E0 #
∀ {M : Type u_1} [inst : Mul M] [inst_1 : LE M], (∀ {a b₁ b₂ : M}, a * b₁ ≤ a * b₂ → b₁ ≤ b₂) → MulLeftReflectLE M
theorem MulLeftReflectLE.le_of_mul_le_mul_left' E1 #
∀ {M : Type u_1} {inst : Mul M} {inst_1 : LE M} [self : MulLeftReflectLE M] {a b₁ b₂ : M}, a * b₁ ≤ a * b₂ → b₁ ≤ b₂
Do not use this. Use le_of_mul_le_mul_left' instead.
class MulRightReflectLE E1 #
(M : Type u_1) → [Mul M] → [LE M] → Prop
Typeclass for reverse monotonicity of multiplication on the right,
namely a₁ * b ≤ a₂ * b → a₁ ≤ a₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedCancelMonoid.
ctor MulRightReflectLE.mk E0 #
∀ {M : Type u_1} [inst : Mul M] [inst_1 : LE M], (∀ {b a₁ a₂ : M}, a₁ * b ≤ a₂ * b → a₁ ≤ a₂) → MulRightReflectLE M
theorem MulRightReflectLE.le_of_mul_le_mul_right' E1 #
∀ {M : Type u_1} {inst : Mul M} {inst_1 : LE M} [self : MulRightReflectLE M] {b a₁ a₂ : M}, a₁ * b ≤ a₂ * b → a₁ ≤ a₂
Do not use this. Use le_of_mul_le_mul_right' instead.
class AddLeftReflectLE E1 #
(M : Type u_1) → [Add M] → [LE M] → Prop
Typeclass for reverse monotonicity of addition on the left,
namely a + b₁ ≤ a + b₂ → b₁ ≤ b₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedCancelAddMonoid.
ctor AddLeftReflectLE.mk E0 #
∀ {M : Type u_1} [inst : Add M] [inst_1 : LE M], (∀ {a b₁ b₂ : M}, a + b₁ ≤ a + b₂ → b₁ ≤ b₂) → AddLeftReflectLE M
theorem AddLeftReflectLE.le_of_add_le_add_left E1 #
∀ {M : Type u_1} {inst : Add M} {inst_1 : LE M} [self : AddLeftReflectLE M] {a b₁ b₂ : M}, a + b₁ ≤ a + b₂ → b₁ ≤ b₂
Do not use this. Use le_of_add_le_add_left instead.
class AddRightReflectLE E1 #
(M : Type u_1) → [Add M] → [LE M] → Prop
Typeclass for reverse monotonicity of addition on the right,
namely a₁ + b ≤ a₂ + b → a₁ ≤ a₂.
You should usually not use this very granular typeclass directly, but rather a typeclass like
IsOrderedCancelAddMonoid.
ctor AddRightReflectLE.mk E0 #
∀ {M : Type u_1} [inst : Add M] [inst_1 : LE M], (∀ {b a₁ a₂ : M}, a₁ + b ≤ a₂ + b → a₁ ≤ a₂) → AddRightReflectLE M
theorem AddRightReflectLE.le_of_add_le_add_right E1 #
∀ {M : Type u_1} {inst : Add M} {inst_1 : LE M} [self : AddRightReflectLE M] {b a₁ a₂ : M}, a₁ + b ≤ a₂ + b → a₁ ≤ a₂
Do not use this. Use le_of_add_le_add_right instead.
theorem rel_iff_cov' E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop},
Covariant M N μ r → Contravariant M N μ r → ∀ {m : M} {a b : N}, r (μ m a) (μ m b) ↔ r a b
theorem rel_iff_cov E1 #
∀ (M : Type u_1) (N : Type u_2) (μ : M → N → N) (r : N → N → Prop) [CovariantClass M N μ r] [ContravariantClass M N μ r]
(m : M) {a b : N}, r (μ m a) (μ m b) ↔ r a b
theorem Covariant.flip E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop}, Covariant M N μ r → Covariant M N μ (flip r)
theorem Contravariant.flip E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop}, Contravariant M N μ r → Contravariant M N μ (flip r)
theorem act_rel_act_of_rel E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop} [CovariantClass M N μ r] (m : M) {a b : N},
r a b → r (μ m a) (μ m b)
theorem Group.covariant_iff_contravariant E1 #
∀ {N : Type u_2} {r : N → N → Prop} [inst : Group N],
Covariant N N (fun x1 x2 ↦ x1 * x2) r ↔ Contravariant N N (fun x1 x2 ↦ x1 * x2) r
theorem AddGroup.covariant_iff_contravariant E1 #
∀ {N : Type u_2} {r : N → N → Prop} [inst : AddGroup N],
Covariant N N (fun x1 x2 ↦ x1 + x2) r ↔ Contravariant N N (fun x1 x2 ↦ x1 + x2) r
instance AddGroup.covconv E0 #
∀ {N : Type u_2} {r : N → N → Prop} [inst : AddGroup N] [CovariantClass N N (fun x1 x2 ↦ x1 + x2) r],
ContravariantClass N N (fun x1 x2 ↦ x1 + x2) r
instance Group.covconv E0 #
∀ {N : Type u_2} {r : N → N → Prop} [inst : Group N] [CovariantClass N N (fun x1 x2 ↦ x1 * x2) r],
ContravariantClass N N (fun x1 x2 ↦ x1 * x2) r
instance AddGroup.addLeftReflectLE_of_addLeftMono E0 #
∀ {N : Type u_2} [inst : AddGroup N] [inst_1 : LE N] [AddLeftMono N], AddLeftReflectLE N
instance Group.mulLeftReflectLE_of_mulLeftMono E0 #
∀ {N : Type u_2} [inst : Group N] [inst_1 : LE N] [MulLeftMono N], MulLeftReflectLE N
theorem Group.mulLeftReflectLT_of_mulLeftStrictMono E1 #
∀ {N : Type u_2} [inst : Group N] [inst_1 : LT N] [MulLeftStrictMono N], MulLeftReflectLT N
theorem AddGroup.addLeftReflectLT_of_addLeftStrictMono E1 #
∀ {N : Type u_2} [inst : AddGroup N] [inst_1 : LT N] [AddLeftStrictMono N], AddLeftReflectLT N
theorem Group.covariant_swap_iff_contravariant_swap E1 #
∀ {N : Type u_2} {r : N → N → Prop} [inst : Group N],
Covariant N N (Function.swap fun x1 x2 ↦ x1 * x2) r ↔ Contravariant N N (Function.swap fun x1 x2 ↦ x1 * x2) r
theorem AddGroup.covariant_swap_iff_contravariant_swap E1 #
∀ {N : Type u_2} {r : N → N → Prop} [inst : AddGroup N],
Covariant N N (Function.swap fun x1 x2 ↦ x1 + x2) r ↔ Contravariant N N (Function.swap fun x1 x2 ↦ x1 + x2) r
instance AddGroup.covconv_swap E0 #
∀ {N : Type u_2} {r : N → N → Prop} [inst : AddGroup N] [CovariantClass N N (Function.swap fun x1 x2 ↦ x1 + x2) r],
ContravariantClass N N (Function.swap fun x1 x2 ↦ x1 + x2) r
instance Group.covconv_swap E0 #
∀ {N : Type u_2} {r : N → N → Prop} [inst : Group N] [CovariantClass N N (Function.swap fun x1 x2 ↦ x1 * x2) r],
ContravariantClass N N (Function.swap fun x1 x2 ↦ x1 * x2) r
instance AddGroup.addRightReflectLE_of_addRightMono E0 #
∀ {N : Type u_2} [inst : AddGroup N] [inst_1 : LE N] [AddRightMono N], AddRightReflectLE N
instance Group.mulRightReflectLE_of_mulRightMono E0 #
∀ {N : Type u_2} [inst : Group N] [inst_1 : LE N] [MulRightMono N], MulRightReflectLE N
theorem Group.mulRightReflectLT_of_mulRightStrictMono E1 #
∀ {N : Type u_2} [inst : Group N] [inst_1 : LT N] [MulRightStrictMono N], MulRightReflectLT N
theorem AddGroup.addRightReflectLT_of_addRightStrictMono E1 #
∀ {N : Type u_2} [inst : AddGroup N] [inst_1 : LT N] [AddRightStrictMono N], AddRightReflectLT N
theorem act_rel_of_rel_of_act_rel E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop} [CovariantClass M N μ r] [IsTrans N r] (m : M)
{a b c : N}, r a b → r (μ m b) c → r (μ m a) c
theorem rel_act_of_rel_of_rel_act E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop} [CovariantClass M N μ r] [IsTrans N r] (m : M)
{a b c : N}, r a b → r c (μ m a) → r c (μ m b)
theorem act_rel_act_of_rel_of_rel E1 #
∀ {N : Type u_2} {r : N → N → Prop} {mu : N → N → N} [IsTrans N r] [i : CovariantClass N N mu r]
[i' : CovariantClass N N (Function.swap mu) r] {a b c d : N}, r a b → r c d → r (mu a c) (mu b d)
theorem rel_of_act_rel_act E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop} [ContravariantClass M N μ r] (m : M) {a b : N},
r (μ m a) (μ m b) → r a b
theorem act_rel_of_act_rel_of_rel_act_rel E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop} [ContravariantClass M N μ r] [IsTrans N r] (m : M)
{a b c : N}, r (μ m a) b → r (μ m b) (μ m c) → r (μ m a) c
theorem rel_act_of_act_rel_act_of_rel_act E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {r : N → N → Prop} [ContravariantClass M N μ r] [IsTrans N r] (m : M)
{a b c : N}, r (μ m a) (μ m b) → r b (μ m c) → r a (μ m c)
theorem Covariant.monotone_of_const E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} [inst : Preorder N] [CovariantClass M N μ fun x1 x2 ↦ x1 ≤ x2] (m : M),
Monotone (μ m)
The partial application of a constant to a covariant operator is monotone.
theorem Monotone.covariant_of_const E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {α : Type u_3} [inst : Preorder α] [inst_1 : Preorder N] {f : N → α}
[CovariantClass M N μ fun x1 x2 ↦ x1 ≤ x2], Monotone f → ∀ (m : M), Monotone fun x ↦ f (μ m x)
A monotone function remains monotone when composed with the partial application
of a covariant operator. E.g., ∀ (m : ℕ), Monotone f → Monotone (fun n ↦ f (m + n)).
theorem Monotone.covariant_of_const' E1 #
∀ {N : Type u_2} {α : Type u_3} [inst : Preorder α] [inst_1 : Preorder N] {f : N → α} {μ : N → N → N}
[CovariantClass N N (Function.swap μ) fun x1 x2 ↦ x1 ≤ x2], Monotone f → ∀ (m : N), Monotone fun x ↦ f (μ x m)
Same as Monotone.covariant_of_const, but with the constant on the other side of
the operator. E.g., ∀ (m : ℕ), Monotone f → Monotone (fun n ↦ f (n + m)).
theorem Antitone.covariant_of_const E1 #
∀ {M : Type u_1} {N : Type u_2} {μ : M → N → N} {α : Type u_3} [inst : Preorder α] [inst_1 : Preorder N] {f : N → α}
[CovariantClass M N μ fun x1 x2 ↦ x1 ≤ x2], Antitone f → ∀ (m : M), Antitone fun x ↦ f (μ m x)
Dual of Monotone.covariant_of_const
theorem Antitone.covariant_of_const' E1 #
∀ {N : Type u_2} {α : Type u_3} [inst : Preorder α] [inst_1 : Preorder N] {f : N → α} {μ : N → N → N}
[CovariantClass N N (Function.swap μ) fun x1 x2 ↦ x1 ≤ x2], Antitone f → ∀ (m : N), Antitone fun x ↦ f (μ x m)
Dual of Monotone.covariant_of_const'
theorem covariant_le_of_covariant_lt E1 #
∀ (M : Type u_1) (N : Type u_2) (μ : M → N → N) [inst : PartialOrder N],
(Covariant M N μ fun x1 x2 ↦ x1 < x2) → Covariant M N μ fun x1 x2 ↦ x1 ≤ x2
theorem covariantClass_le_of_lt E1 #
∀ (M : Type u_1) (N : Type u_2) (μ : M → N → N) [inst : PartialOrder N] [CovariantClass M N μ fun x1 x2 ↦ x1 < x2],
CovariantClass M N μ fun x1 x2 ↦ x1 ≤ x2
theorem addLeftMono_of_addLeftStrictMono E1 #
∀ (M : Type u_3) [inst : Add M] [inst_1 : PartialOrder M] [AddLeftStrictMono M], AddLeftMono M
theorem mulLeftMono_of_mulLeftStrictMono E1 #
∀ (M : Type u_3) [inst : Mul M] [inst_1 : PartialOrder M] [MulLeftStrictMono M], MulLeftMono M
theorem mulRightMono_of_mulRightStrictMono E1 #
∀ (M : Type u_3) [inst : Mul M] [inst_1 : PartialOrder M] [MulRightStrictMono M], MulRightMono M
theorem addRightMono_of_addRightStrictMono E1 #
∀ (M : Type u_3) [inst : Add M] [inst_1 : PartialOrder M] [AddRightStrictMono M], AddRightMono M
theorem contravariant_le_iff_contravariant_lt_and_eq E0 #
∀ (M : Type u_1) (N : Type u_2) (μ : M → N → N) [inst : PartialOrder N],
(Contravariant M N μ fun x1 x2 ↦ x1 ≤ x2) ↔
(Contravariant M N μ fun x1 x2 ↦ x1 < x2) ∧ Contravariant M N μ fun x1 x2 ↦ x1 = x2
theorem contravariant_lt_of_contravariant_le E1 #
∀ (M : Type u_1) (N : Type u_2) (μ : M → N → N) [inst : PartialOrder N],
(Contravariant M N μ fun x1 x2 ↦ x1 ≤ x2) → Contravariant M N μ fun x1 x2 ↦ x1 < x2
theorem covariant_le_iff_contravariant_lt E1 #
∀ (M : Type u_1) (N : Type u_2) (μ : M → N → N) [inst : LinearOrder N],
(Covariant M N μ fun x1 x2 ↦ x1 ≤ x2) ↔ Contravariant M N μ fun x1 x2 ↦ x1 < x2
theorem covariant_lt_iff_contravariant_le E1 #
∀ (M : Type u_1) (N : Type u_2) (μ : M → N → N) [inst : LinearOrder N],
(Covariant M N μ fun x1 x2 ↦ x1 < x2) ↔ Contravariant M N μ fun x1 x2 ↦ x1 ≤ x2
theorem covariant_flip_iff E0 #
∀ (N : Type u_2) (r : N → N → Prop) (mu : N → N → N) [h : Std.Commutative mu],
Covariant N N (flip mu) r ↔ Covariant N N mu r
theorem contravariant_flip_iff E0 #
∀ (N : Type u_2) (r : N → N → Prop) (mu : N → N → N) [h : Std.Commutative mu],
Contravariant N N (flip mu) r ↔ Contravariant N N mu r
instance contravariant_lt_of_covariant_le E0 #
∀ (N : Type u_2) (mu : N → N → N) [inst : LinearOrder N] [CovariantClass N N mu fun x1 x2 ↦ x1 ≤ x2],
ContravariantClass N N mu fun x1 x2 ↦ x1 < x2
theorem addLeftReflectLT_of_addLeftMono E1 #
∀ (N : Type u_2) [inst : Add N] [inst_1 : LinearOrder N] [AddLeftMono N], AddLeftReflectLT N
theorem mulLeftReflectLT_of_mulLeftMono E1 #
∀ (N : Type u_2) [inst : Mul N] [inst_1 : LinearOrder N] [MulLeftMono N], MulLeftReflectLT N
theorem mulRightReflectLT_of_mulRightMono E1 #
∀ (N : Type u_2) [inst : Mul N] [inst_1 : LinearOrder N] [MulRightMono N], MulRightReflectLT N
theorem addRightReflectLT_of_addRightMono E1 #
∀ (N : Type u_2) [inst : Add N] [inst_1 : LinearOrder N] [AddRightMono N], AddRightReflectLT N
instance covariant_lt_of_contravariant_le E0 #
∀ (N : Type u_2) (mu : N → N → N) [inst : LinearOrder N] [ContravariantClass N N mu fun x1 x2 ↦ x1 ≤ x2],
CovariantClass N N mu fun x1 x2 ↦ x1 < x2
instance addLeftStrictMono_of_addLeftReflectLE E0 #
∀ (N : Type u_2) [inst : Add N] [inst_1 : LinearOrder N] [AddLeftReflectLE N], AddLeftStrictMono N
instance mulLeftStrictMono_of_mulLeftReflectLE E0 #
∀ (N : Type u_2) [inst : Mul N] [inst_1 : LinearOrder N] [MulLeftReflectLE N], MulLeftStrictMono N
instance addRightStrictMono_of_addRightReflectLE E0 #
∀ (N : Type u_2) [inst : Add N] [inst_1 : LinearOrder N] [AddRightReflectLE N], AddRightStrictMono N
instance mulRightStrictMono_of_mulRightReflectLE E0 #
∀ (N : Type u_2) [inst : Mul N] [inst_1 : LinearOrder N] [MulRightReflectLE N], MulRightStrictMono N
instance covariant_swap_add_of_covariant_add E0 #
∀ (N : Type u_2) (r : N → N → Prop) [inst : AddCommSemigroup N] [CovariantClass N N (fun x1 x2 ↦ x1 + x2) r],
CovariantClass N N (Function.swap fun x1 x2 ↦ x1 + x2) r
instance covariant_swap_mul_of_covariant_mul E0 #
∀ (N : Type u_2) (r : N → N → Prop) [inst : CommSemigroup N] [CovariantClass N N (fun x1 x2 ↦ x1 * x2) r],
CovariantClass N N (Function.swap fun x1 x2 ↦ x1 * x2) r
theorem addRightMono_of_addLeftMono E1 #
∀ (N : Type u_2) [inst : AddCommSemigroup N] [inst_1 : LE N] [AddLeftMono N], AddRightMono N
theorem mulRightMono_of_mulLeftMono E1 #
∀ (N : Type u_2) [inst : CommSemigroup N] [inst_1 : LE N] [MulLeftMono N], MulRightMono N
theorem mulRightStrictMono_of_mulLeftStrictMono E1 #
∀ (N : Type u_2) [inst : CommSemigroup N] [inst_1 : LT N] [MulLeftStrictMono N], MulRightStrictMono N
theorem addRightStrictMono_of_addLeftStrictMono E1 #
∀ (N : Type u_2) [inst : AddCommSemigroup N] [inst_1 : LT N] [AddLeftStrictMono N], AddRightStrictMono N
instance contravariant_swap_mul_of_contravariant_mul E0 #
∀ (N : Type u_2) (r : N → N → Prop) [inst : CommSemigroup N] [ContravariantClass N N (fun x1 x2 ↦ x1 * x2) r],
ContravariantClass N N (Function.swap fun x1 x2 ↦ x1 * x2) r
instance contravariant_swap_add_of_contravariant_add E0 #
∀ (N : Type u_2) (r : N → N → Prop) [inst : AddCommSemigroup N] [ContravariantClass N N (fun x1 x2 ↦ x1 + x2) r],
ContravariantClass N N (Function.swap fun x1 x2 ↦ x1 + x2) r
instance mulRightReflectLE_of_mulLeftReflectLE E0 #
∀ (N : Type u_2) [inst : CommSemigroup N] [inst_1 : LE N] [MulLeftReflectLE N], MulRightReflectLE N
instance addRightReflectLE_of_addLeftReflectLE E0 #
∀ (N : Type u_2) [inst : AddCommSemigroup N] [inst_1 : LE N] [AddLeftReflectLE N], AddRightReflectLE N
theorem addRightReflectLT_of_addLeftReflectLT E1 #
∀ (N : Type u_2) [inst : AddCommSemigroup N] [inst_1 : LT N] [AddLeftReflectLT N], AddRightReflectLT N
theorem mulRightReflectLT_of_mulLeftReflectLT E1 #
∀ (N : Type u_2) [inst : CommSemigroup N] [inst_1 : LT N] [MulLeftReflectLT N], MulRightReflectLT N
theorem covariant_lt_of_covariant_le_of_contravariant_eq E0 #
∀ (M : Type u_1) (N : Type u_2) (μ : M → N → N) [ContravariantClass M N μ fun x1 x2 ↦ x1 = x2] [inst : PartialOrder N]
[CovariantClass M N μ fun x1 x2 ↦ x1 ≤ x2], CovariantClass M N μ fun x1 x2 ↦ x1 < x2
theorem contravariant_le_of_contravariant_eq_and_lt E1 #
∀ (M : Type u_1) (N : Type u_2) (μ : M → N → N) [inst : PartialOrder N] [ContravariantClass M N μ fun x1 x2 ↦ x1 = x2]
[ContravariantClass M N μ fun x1 x2 ↦ x1 < x2], ContravariantClass M N μ fun x1 x2 ↦ x1 ≤ x2
instance IsLeftCancelMul.mulLeftStrictMono_of_mulLeftMono E0 #
∀ (N : Type u_2) [inst : Mul N] [IsLeftCancelMul N] [inst_2 : PartialOrder N] [MulLeftMono N], MulLeftStrictMono N
instance IsLeftCancelAdd.addLeftStrictMono_of_addLeftMono E0 #
∀ (N : Type u_2) [inst : Add N] [IsLeftCancelAdd N] [inst_2 : PartialOrder N] [AddLeftMono N], AddLeftStrictMono N
instance IsRightCancelAdd.addRightStrictMono_of_addRightMono E0 #
∀ (N : Type u_2) [inst : Add N] [IsRightCancelAdd N] [inst_2 : PartialOrder N] [AddRightMono N], AddRightStrictMono N
instance IsRightCancelMul.mulRightStrictMono_of_mulRightMono E0 #
∀ (N : Type u_2) [inst : Mul N] [IsRightCancelMul N] [inst_2 : PartialOrder N] [MulRightMono N], MulRightStrictMono N
instance IsLeftCancelMul.mulLeftReflectLE_of_mulLeftReflectLT E0 #
∀ (N : Type u_2) [inst : Mul N] [IsLeftCancelMul N] [inst_2 : PartialOrder N] [MulLeftReflectLT N], MulLeftReflectLE N
instance IsLeftCancelAdd.addLeftReflectLE_of_addLeftReflectLT E0 #
∀ (N : Type u_2) [inst : Add N] [IsLeftCancelAdd N] [inst_2 : PartialOrder N] [AddLeftReflectLT N], AddLeftReflectLE N
instance IsRightCancelAdd.addRightReflectLE_of_addRightReflectLT E0 #
∀ (N : Type u_2) [inst : Add N] [IsRightCancelAdd N] [inst_2 : PartialOrder N] [AddRightReflectLT N],
AddRightReflectLE N
instance IsRightCancelMul.mulRightReflectLE_of_mulRightReflectLT E0 #
∀ (N : Type u_2) [inst : Mul N] [IsRightCancelMul N] [inst_2 : PartialOrder N] [MulRightReflectLT N],
MulRightReflectLE N