doc-next-gen

Mathlib.Algebra.Order.Module.Defs

Module docstring

{"# Monotonicity of scalar multiplication by positive elements

This file defines typeclasses to reason about monotonicity of the operations * b ↦ a • b, \"left scalar multiplication\" * a ↦ a • b, \"right scalar multiplication\"

We use eight typeclasses to encode the various properties we care about for those two operations. These typeclasses are meant to be mostly internal to this file, to set up each lemma in the appropriate generality.

Less granular typeclasses like OrderedAddCommMonoid, LinearOrderedField, OrderedSMul should be enough for most purposes, and the system is set up so that they imply the correct granular typeclasses here. If those are enough for you, you may stop reading here! Else, beware that what follows is a bit technical.

Definitions

In all that follows, α and β are orders which have a 0 and such that α acts on β by scalar multiplication. Note however that we do not use lawfulness of this action in most of the file. Hence should be considered here as a mostly arbitrary function α → β → β.

We use the following four typeclasses to reason about left scalar multiplication (b ↦ a • b): * PosSMulMono: If a ≥ 0, then b₁ ≤ b₂ implies a • b₁ ≤ a • b₂. * PosSMulStrictMono: If a > 0, then b₁ < b₂ implies a • b₁ < a • b₂. * PosSMulReflectLT: If a ≥ 0, then a • b₁ < a • b₂ implies b₁ < b₂. * PosSMulReflectLE: If a > 0, then a • b₁ ≤ a • b₂ implies b₁ ≤ b₂.

We use the following four typeclasses to reason about right scalar multiplication (a ↦ a • b): * SMulPosMono: If b ≥ 0, then a₁ ≤ a₂ implies a₁ • b ≤ a₂ • b. * SMulPosStrictMono: If b > 0, then a₁ < a₂ implies a₁ • b < a₂ • b. * SMulPosReflectLT: If b ≥ 0, then a₁ • b < a₂ • b implies a₁ < a₂. * SMulPosReflectLE: If b > 0, then a₁ • b ≤ a₂ • b implies a₁ ≤ a₂.

Constructors

The four typeclasses about nonnegativity can usually be checked only on positive inputs due to their condition becoming trivial when a = 0 or b = 0. We therefore make the following constructors available: PosSMulMono.of_pos, PosSMulReflectLT.of_pos, SMulPosMono.of_pos, SMulPosReflectLT.of_pos

Implications

As α and β get more and more structure, those typeclasses end up being equivalent. The commonly used implications are: * When α, β are partial orders: * PosSMulStrictMono → PosSMulMono * SMulPosStrictMono → SMulPosMono * PosSMulReflectLE → PosSMulReflectLT * SMulPosReflectLE → SMulPosReflectLT * When β is a linear order: * PosSMulStrictMono → PosSMulReflectLE * PosSMulReflectLT → PosSMulMono (not registered as instance) * SMulPosReflectLT → SMulPosMono (not registered as instance) * PosSMulReflectLE → PosSMulStrictMono (not registered as instance) * SMulPosReflectLE → SMulPosStrictMono (not registered as instance) * When α is a linear order: * SMulPosStrictMono → SMulPosReflectLE * When α is an ordered ring, β an ordered group and also an α-module: * PosSMulMono → SMulPosMono * PosSMulStrictMono → SMulPosStrictMono * When α is an linear ordered semifield, β is an α-module: * PosSMulStrictMono → PosSMulReflectLT * PosSMulMono → PosSMulReflectLE * When α is a semiring, β is an α-module with NoZeroSMulDivisors: * PosSMulMono → PosSMulStrictMono (not registered as instance) * When α is a ring, β is an α-module with NoZeroSMulDivisors: * SMulPosMono → SMulPosStrictMono (not registered as instance)

Further, the bundled non-granular typeclasses imply the granular ones like so: * OrderedSMul → PosSMulStrictMono * OrderedSMul → PosSMulReflectLT

Unless otherwise stated, all these implications are registered as instances, which means that in practice you should not worry about these implications. However, if you encounter a case where you think a statement is true but not covered by the current implications, please bring it up on Zulip!

Implementation notes

This file uses custom typeclasses instead of abbreviations of CovariantClass/ContravariantClass because: * They get displayed as classes in the docs. In particular, one can see their list of instances, instead of their instances being invariably dumped to the CovariantClass/ContravariantClass list. * They don't pollute other typeclass searches. Having many abbreviations of the same typeclass for different purposes always felt like a performance issue (more instances with the same key, for no added benefit), and indeed making the classes here abbreviation previous creates timeouts due to the higher number of CovariantClass/ContravariantClass instances. * SMulPosReflectLT/SMulPosReflectLE do not fit in the framework since they relate on two different types. So we would have to generalise CovariantClass/ContravariantClass to three types and two relations. * Very minor, but the constructors let you work with a : α, h : 0 ≤ a instead of a : {a : α // 0 ≤ a}. This actually makes some instances surprisingly cleaner to prove. * The CovariantClass/ContravariantClass framework is only useful to automate very simple logic anyway. It is easily copied over.

In the future, it would be good to make the corresponding typeclasses in Mathlib.Algebra.Order.GroupWithZero.Unbundled custom typeclasses too.

TODO

This file acts as a substitute for Mathlib.Algebra.Order.SMul. We now need to * finish the transition by deleting the duplicate lemmas * rearrange the non-duplicate lemmas into new files * generalise (most of) the lemmas from Mathlib.Algebra.Order.Module to here * rethink OrderedSMul "}

PosSMulMono structure
Full source
/-- Typeclass for monotonicity of scalar multiplication by nonnegative elements on the left,
namely `b₁ ≤ b₂ → a • b₁ ≤ a • b₂` if `0 ≤ a`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class PosSMulMono : Prop where
  /-- Do not use this. Use `smul_le_smul_of_nonneg_left` instead. -/
  protected elim ⦃a : α⦄ (ha : 0 ≤ a) ⦃b₁ b₂ : β⦄ (hb : b₁ ≤ b₂) : a • b₁ ≤ a • b₂
Monotonicity of left scalar multiplication by nonnegative elements
Informal description
A typeclass stating that for a scalar multiplication operation `• : α → β → β`, if `a ≥ 0` in `α`, then the operation `b ↦ a • b` is monotone in `β`. That is, for any `a ≥ 0` and any `b₁ ≤ b₂` in `β`, we have `a • b₁ ≤ a • b₂`.
PosSMulStrictMono structure
Full source
/-- Typeclass for strict monotonicity of scalar multiplication by positive elements on the left,
namely `b₁ < b₂ → a • b₁ < a • b₂` if `0 < a`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class PosSMulStrictMono : Prop where
  /-- Do not use this. Use `smul_lt_smul_of_pos_left` instead. -/
  protected elim ⦃a : α⦄ (ha : 0 < a) ⦃b₁ b₂ : β⦄ (hb : b₁ < b₂) : a • b₁ < a • b₂
Strict monotonicity of left scalar multiplication by positive elements
Informal description
A typeclass stating that for a scalar multiplication operation `• : α → β → β`, if `a > 0` in `α`, then the operation `b ↦ a • b` is strictly monotone in `β`. That is, for any `a > 0` and any `b₁ < b₂` in `β`, we have `a • b₁ < a • b₂`.
PosSMulReflectLT structure
Full source
/-- Typeclass for strict reverse monotonicity of scalar multiplication by nonnegative elements on
the left, namely `a • b₁ < a • b₂ → b₁ < b₂` if `0 ≤ a`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class PosSMulReflectLT : Prop where
  /-- Do not use this. Use `lt_of_smul_lt_smul_left` instead. -/
  protected elim ⦃a : α⦄ (ha : 0 ≤ a) ⦃b₁ b₂ : β⦄ (hb : a • b₁ < a • b₂) : b₁ < b₂
Reflection of strict inequalities under left scalar multiplication by nonnegative elements
Informal description
A typeclass stating that for a scalar multiplication operation `• : α → β → β`, if `a ≥ 0` in `α`, then the operation `b ↦ a • b` reflects strict inequalities in `β`. That is, for any `a ≥ 0` and any `b₁, b₂` in `β`, if `a • b₁ < a • b₂`, then `b₁ < b₂`.
PosSMulReflectLE structure
Full source
/-- Typeclass for reverse monotonicity of scalar multiplication by positive elements on the left,
namely `a • b₁ ≤ a • b₂ → b₁ ≤ b₂` if `0 < a`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class PosSMulReflectLE : Prop where
  /-- Do not use this. Use `le_of_smul_lt_smul_left` instead. -/
  protected elim ⦃a : α⦄ (ha : 0 < a) ⦃b₁ b₂ : β⦄ (hb : a • b₁ ≤ a • b₂) : b₁ ≤ b₂
Reflection of order under left scalar multiplication by positive elements
Informal description
A typeclass asserting that for a scalar multiplication operation `• : α → β → β`, if a positive element `a > 0` in `α` acts on elements `b₁, b₂` in `β`, then the inequality `a • b₁ ≤ a • b₂` implies `b₁ ≤ b₂`. This captures the property that left scalar multiplication by positive elements reflects the order relation `≤`.
SMulPosMono structure
Full source
/-- Typeclass for monotonicity of scalar multiplication by nonnegative elements on the left,
namely `a₁ ≤ a₂ → a₁ • b ≤ a₂ • b` if `0 ≤ b`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class SMulPosMono : Prop where
  /-- Do not use this. Use `smul_le_smul_of_nonneg_right` instead. -/
  protected elim ⦃b : β⦄ (hb : 0 ≤ b) ⦃a₁ a₂ : α⦄ (ha : a₁ ≤ a₂) : a₁ • b ≤ a₂ • b
Monotonicity of scalar multiplication with nonnegative elements on the right
Informal description
The typeclass `SMulPosMono` captures the property that for any element \( b \geq 0 \) in an ordered type \( \beta \), the scalar multiplication operation \( \bullet : \alpha \to \beta \to \beta \) is monotone in its first argument. That is, for any \( a_1, a_2 \in \alpha \), if \( a_1 \leq a_2 \), then \( a_1 \bullet b \leq a_2 \bullet b \).
SMulPosStrictMono structure
Full source
/-- Typeclass for strict monotonicity of scalar multiplication by positive elements on the left,
namely `a₁ < a₂ → a₁ • b < a₂ • b` if `0 < b`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class SMulPosStrictMono : Prop where
  /-- Do not use this. Use `smul_lt_smul_of_pos_right` instead. -/
  protected elim ⦃b : β⦄ (hb : 0 < b) ⦃a₁ a₂ : α⦄ (ha : a₁ < a₂) : a₁ • b < a₂ • b
Strict monotonicity of left scalar multiplication by positive elements
Informal description
A structure representing the property that scalar multiplication is strictly monotone in the left argument when the right argument is positive. Specifically, for any \( b > 0 \), if \( a_1 < a_2 \) then \( a_1 \bullet b < a_2 \bullet b \).
SMulPosReflectLT structure
Full source
/-- Typeclass for strict reverse monotonicity of scalar multiplication by nonnegative elements on
the left, namely `a₁ • b < a₂ • b → a₁ < a₂` if `0 ≤ b`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class SMulPosReflectLT : Prop where
  /-- Do not use this. Use `lt_of_smul_lt_smul_right` instead. -/
  protected elim ⦃b : β⦄ (hb : 0 ≤ b) ⦃a₁ a₂ : α⦄ (hb : a₁ • b < a₂ • b) : a₁ < a₂
Reflection of strict order under right scalar multiplication by nonnegative elements
Informal description
The structure `SMulPosReflectLT` captures the property that for a scalar multiplication operation `• : α → β → β`, if an element `b : β` is nonnegative (i.e., `0 ≤ b`), then the strict inequality `a₁ • b < a₂ • b` implies `a₁ < a₂`. In other words, scalar multiplication by nonnegative elements on the right reflects strict order in the first argument. This structure is typically used as part of a larger framework for reasoning about ordered algebraic structures and their interactions with scalar multiplication. It's one of several granular typeclasses designed to capture specific monotonicity and reflection properties of scalar multiplication.
SMulPosReflectLE structure
Full source
/-- Typeclass for reverse monotonicity of scalar multiplication by positive elements on the left,
namely `a₁ • b ≤ a₂ • b → a₁ ≤ a₂` if `0 < b`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class SMulPosReflectLE : Prop where
  /-- Do not use this. Use `le_of_smul_lt_smul_right` instead. -/
  protected elim ⦃b : β⦄ (hb : 0 < b) ⦃a₁ a₂ : α⦄ (hb : a₁ • b ≤ a₂ • b) : a₁ ≤ a₂
Reverse monotonicity of right scalar multiplication by positive elements
Informal description
A structure representing the property that for a scalar multiplication operation `• : α → β → β`, if `b > 0` in `β`, then the inequality `a₁ • b ≤ a₂ • b` implies `a₁ ≤ a₂` in `α`. This captures the reverse monotonicity of right scalar multiplication by positive elements.
PosMulMono.toPosSMulMono instance
[PosMulMono α] : PosSMulMono α α
Full source
instance (priority := 100) PosMulMono.toPosSMulMono [PosMulMono α] : PosSMulMono α α where
  elim _a ha _b₁ _b₂ hb := mul_le_mul_of_nonneg_left hb ha
Monotonicity of Scalar Multiplication from Monotonicity of Left Multiplication
Informal description
For any preorder $\alpha$ where left multiplication by nonnegative elements is monotone (i.e., the typeclass `PosMulMono α` holds), the scalar multiplication operation $\alpha \times \alpha \to \alpha$ given by $(a, b) \mapsto a \cdot b$ satisfies the property that for any $a \geq 0$, the map $b \mapsto a \cdot b$ is monotone. In other words, if $b_1 \leq b_2$, then $a \cdot b_1 \leq a \cdot b_2$ for all $a \geq 0$.
PosMulStrictMono.toPosSMulStrictMono instance
[PosMulStrictMono α] : PosSMulStrictMono α α
Full source
instance (priority := 100) PosMulStrictMono.toPosSMulStrictMono [PosMulStrictMono α] :
    PosSMulStrictMono α α where
  elim _a ha _b₁ _b₂ hb := mul_lt_mul_of_pos_left hb ha
Strict Monotonicity of Scalar Multiplication from Strict Monotonicity of Left Multiplication
Informal description
For any preorder $\alpha$ where left multiplication by positive elements is strictly monotone (i.e., the typeclass `PosMulStrictMono α` holds), the scalar multiplication operation $\bullet : \alpha \to \alpha \to \alpha$ is strictly monotone in its second argument when the first argument is positive (i.e., the typeclass `PosSMulStrictMono α α` holds). In other words, if $a > 0$ and $b_1 < b_2$, then $a \bullet b_1 < a \bullet b_2$.
PosMulReflectLT.toPosSMulReflectLT instance
[PosMulReflectLT α] : PosSMulReflectLT α α
Full source
instance (priority := 100) PosMulReflectLT.toPosSMulReflectLT [PosMulReflectLT α] :
    PosSMulReflectLT α α where
  elim _a ha _b₁ _b₂ h := lt_of_mul_lt_mul_left h ha
Reflection of Strict Inequalities under Left Scalar Multiplication from Reflection under Left Multiplication
Informal description
For any preorder $\alpha$ where left multiplication by nonnegative elements reflects strict inequalities (i.e., the typeclass `PosMulReflectLT` holds), the scalar multiplication operation $\bullet : \alpha \to \alpha \to \alpha$ also reflects strict inequalities when the scalar is nonnegative (i.e., the typeclass `PosSMulReflectLT` holds). In other words, if $a \geq 0$ and $a \bullet b_1 < a \bullet b_2$, then $b_1 < b_2$.
PosMulReflectLE.toPosSMulReflectLE instance
[PosMulReflectLE α] : PosSMulReflectLE α α
Full source
instance (priority := 100) PosMulReflectLE.toPosSMulReflectLE [PosMulReflectLE α] :
    PosSMulReflectLE α α where
  elim _a ha _b₁ _b₂ h := le_of_mul_le_mul_left h ha
Reflection of Non-Strict Order under Left Scalar Multiplication from Reflection under Left Multiplication
Informal description
For any preorder $\alpha$ where left multiplication by positive elements reflects the non-strict order (i.e., the typeclass `PosMulReflectLE α` holds), the scalar multiplication operation $\bullet : \alpha \to \alpha \to \alpha$ also reflects the non-strict order when the scalar is positive (i.e., the typeclass `PosSMulReflectLE α α` holds). In other words, if $a > 0$ and $a \bullet b_1 \leq a \bullet b_2$, then $b_1 \leq b_2$.
MulPosMono.toSMulPosMono instance
[MulPosMono α] : SMulPosMono α α
Full source
instance (priority := 100) MulPosMono.toSMulPosMono [MulPosMono α] : SMulPosMono α α where
  elim _b hb _a₁ _a₂ ha := mul_le_mul_of_nonneg_right ha hb
Monotonicity of Scalar Multiplication from Monotonicity of Right Multiplication
Informal description
For any preorder $\alpha$ where right multiplication by nonnegative elements is monotone (i.e., `MulPosMono α` holds), the scalar multiplication operation $\bullet : \alpha \to \alpha \to \alpha$ is also monotone in its first argument when the second argument is nonnegative (i.e., `SMulPosMono α` holds). In other words, if $b \geq 0$ and $a_1 \leq a_2$, then $a_1 \bullet b \leq a_2 \bullet b$.
MulPosStrictMono.toSMulPosStrictMono instance
[MulPosStrictMono α] : SMulPosStrictMono α α
Full source
instance (priority := 100) MulPosStrictMono.toSMulPosStrictMono [MulPosStrictMono α] :
    SMulPosStrictMono α α where
  elim _b hb _a₁ _a₂ ha := mul_lt_mul_of_pos_right ha hb
Strict Monotonicity of Scalar Multiplication from Strict Monotonicity of Right Multiplication
Informal description
For any preorder $\alpha$ where right multiplication by positive elements is strictly monotone (i.e., `MulPosStrictMono α` holds), the scalar multiplication operation $\bullet : \alpha \to \alpha \to \alpha$ is also strictly monotone in its first argument when the second argument is positive (i.e., `SMulPosStrictMono α α` holds). In other words, if $b > 0$ and $a_1 < a_2$, then $a_1 \bullet b < a_2 \bullet b$.
MulPosReflectLT.toSMulPosReflectLT instance
[MulPosReflectLT α] : SMulPosReflectLT α α
Full source
instance (priority := 100) MulPosReflectLT.toSMulPosReflectLT [MulPosReflectLT α] :
    SMulPosReflectLT α α where
  elim _b hb _a₁ _a₂ h := lt_of_mul_lt_mul_right h hb
Reflection of Strict Order under Scalar Multiplication by Nonnegative Elements
Informal description
For any preorder $\alpha$ where right multiplication by nonnegative elements reflects the strict order (i.e., $\alpha$ satisfies `MulPosReflectLT`), the scalar multiplication operation $\alpha \times \alpha \to \alpha$ also satisfies the property that for any nonnegative element $b \geq 0$, the inequality $a_1 \cdot b < a_2 \cdot b$ implies $a_1 < a_2$.
MulPosReflectLE.toSMulPosReflectLE instance
[MulPosReflectLE α] : SMulPosReflectLE α α
Full source
instance (priority := 100) MulPosReflectLE.toSMulPosReflectLE [MulPosReflectLE α] :
    SMulPosReflectLE α α where
  elim _b hb _a₁ _a₂ h := le_of_mul_le_mul_right h hb
Reflection of Non-Strict Order under Scalar Multiplication by Positive Elements
Informal description
For any preorder $\alpha$ where right multiplication by positive elements reflects the non-strict order (i.e., $\alpha$ satisfies `MulPosReflectLE`), the scalar multiplication operation $\alpha \times \alpha \to \alpha$ also satisfies the property that for any positive element $b > 0$, the inequality $a_1 \cdot b \leq a_2 \cdot b$ implies $a_1 \leq a_2$.
monotone_smul_left_of_nonneg theorem
[PosSMulMono α β] (ha : 0 ≤ a) : Monotone ((a • ·) : β → β)
Full source
lemma monotone_smul_left_of_nonneg [PosSMulMono α β] (ha : 0 ≤ a) : Monotone ((a • ·) : β → β) :=
  PosSMulMono.elim ha
Monotonicity of Left Scalar Multiplication by Nonnegative Elements
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulMono` (i.e., left scalar multiplication by nonnegative elements is monotone), then for any $a \in \alpha$ with $0 \leq a$, the function $b \mapsto a \cdot b$ is monotone on $\beta$.
strictMono_smul_left_of_pos theorem
[PosSMulStrictMono α β] (ha : 0 < a) : StrictMono ((a • ·) : β → β)
Full source
lemma strictMono_smul_left_of_pos [PosSMulStrictMono α β] (ha : 0 < a) :
    StrictMono ((a • ·) : β → β) := PosSMulStrictMono.elim ha
Strict Monotonicity of Left Scalar Multiplication by Positive Elements
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulStrictMono` (i.e., left scalar multiplication by positive elements is strictly monotone), then for any $a \in \alpha$ with $0 < a$, the function $b \mapsto a \cdot b$ is strictly monotone on $\beta$.
smul_le_smul_of_nonneg_left theorem
[PosSMulMono α β] (hb : b₁ ≤ b₂) (ha : 0 ≤ a) : a • b₁ ≤ a • b₂
Full source
@[gcongr] lemma smul_le_smul_of_nonneg_left [PosSMulMono α β] (hb : b₁ ≤ b₂) (ha : 0 ≤ a) :
    a • b₁ ≤ a • b₂ := monotone_smul_left_of_nonneg ha hb
Monotonicity of left scalar multiplication by nonnegative elements: $a \geq 0 \land b_1 \leq b_2 \Rightarrow a \cdot b_1 \leq a \cdot b_2$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulMono` (i.e., left scalar multiplication by nonnegative elements is monotone), then for any $a \in \alpha$ with $0 \leq a$ and any $b_1, b_2 \in \beta$ with $b_1 \leq b_2$, we have $a \cdot b_1 \leq a \cdot b_2$.
smul_lt_smul_of_pos_left theorem
[PosSMulStrictMono α β] (hb : b₁ < b₂) (ha : 0 < a) : a • b₁ < a • b₂
Full source
@[gcongr] lemma smul_lt_smul_of_pos_left [PosSMulStrictMono α β] (hb : b₁ < b₂) (ha : 0 < a) :
    a • b₁ < a • b₂ := strictMono_smul_left_of_pos ha hb
Strict monotonicity of left scalar multiplication: $a > 0 \land b_1 < b_2 \Rightarrow a \cdot b_1 < a \cdot b_2$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulStrictMono` (i.e., left scalar multiplication by positive elements is strictly monotone), then for any $a \in \alpha$ with $0 < a$ and any $b_1, b_2 \in \beta$ with $b_1 < b_2$, we have $a \cdot b_1 < a \cdot b_2$.
lt_of_smul_lt_smul_left theorem
[PosSMulReflectLT α β] (h : a • b₁ < a • b₂) (ha : 0 ≤ a) : b₁ < b₂
Full source
lemma lt_of_smul_lt_smul_left [PosSMulReflectLT α β] (h : a • b₁ < a • b₂) (ha : 0 ≤ a) : b₁ < b₂ :=
  PosSMulReflectLT.elim ha h
Reflection of strict inequality under left scalar multiplication by nonnegative elements
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, and let $\cdot : \alpha \to \beta \to \beta$ be a scalar multiplication operation. If $\alpha$ and $\beta$ satisfy the `PosSMulReflectLT` condition (i.e., left scalar multiplication by nonnegative elements reflects strict inequalities), then for any $a \in \alpha$ with $0 \leq a$ and any $b_1, b_2 \in \beta$, the inequality $a \cdot b_1 < a \cdot b_2$ implies $b_1 < b_2$.
le_of_smul_le_smul_left theorem
[PosSMulReflectLE α β] (h : a • b₁ ≤ a • b₂) (ha : 0 < a) : b₁ ≤ b₂
Full source
lemma le_of_smul_le_smul_left [PosSMulReflectLE α β] (h : a • b₁ ≤ a • b₂) (ha : 0 < a) : b₁ ≤ b₂ :=
  PosSMulReflectLE.elim ha h
Reflection of inequality under left scalar multiplication by positive elements
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, and let $\cdot : \alpha \to \beta \to \beta$ be a scalar multiplication operation. If $\alpha$ and $\beta$ satisfy the `PosSMulReflectLE` condition (i.e., left scalar multiplication by positive elements reflects inequalities), then for any $a \in \alpha$ with $0 < a$ and any $b_1, b_2 \in \beta$, the inequality $a \cdot b_1 \leq a \cdot b_2$ implies $b_1 \leq b_2$.
smul_le_smul_iff_of_pos_left theorem
[PosSMulMono α β] [PosSMulReflectLE α β] (ha : 0 < a) : a • b₁ ≤ a • b₂ ↔ b₁ ≤ b₂
Full source
@[simp]
lemma smul_le_smul_iff_of_pos_left [PosSMulMono α β] [PosSMulReflectLE α β] (ha : 0 < a) :
    a • b₁ ≤ a • b₂ ↔ b₁ ≤ b₂ :=
  ⟨fun h ↦ le_of_smul_le_smul_left h ha, fun h ↦ smul_le_smul_of_nonneg_left h ha.le⟩
Equivalence of inequalities under left scalar multiplication by positive elements: $a > 0 \Rightarrow (a \cdot b_1 \leq a \cdot b_2 \leftrightarrow b_1 \leq b_2)$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ and $\beta$ satisfy both `PosSMulMono` (left scalar multiplication by nonnegative elements is monotone) and `PosSMulReflectLE` (left scalar multiplication by positive elements reflects order). Then for any positive element $a > 0$ in $\alpha$, the inequality $a \cdot b_1 \leq a \cdot b_2$ holds if and only if $b_1 \leq b_2$ in $\beta$.
smul_lt_smul_iff_of_pos_left theorem
[PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) : a • b₁ < a • b₂ ↔ b₁ < b₂
Full source
@[simp]
lemma smul_lt_smul_iff_of_pos_left [PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) :
    a • b₁ < a • b₂ ↔ b₁ < b₂ :=
  ⟨fun h ↦ lt_of_smul_lt_smul_left h ha.le, fun hb ↦ smul_lt_smul_of_pos_left hb ha⟩
Strict inequality equivalence under left scalar multiplication by positive elements: $a > 0 \Rightarrow (a \cdot b_1 < a \cdot b_2 \leftrightarrow b_1 < b_2)$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ and $\beta$ satisfy both `PosSMulStrictMono` (left scalar multiplication by positive elements is strictly monotone) and `PosSMulReflectLT` (left scalar multiplication by nonnegative elements reflects strict inequalities), then for any positive element $a > 0$ in $\alpha$, the inequality $a \cdot b_1 < a \cdot b_2$ holds if and only if $b_1 < b_2$ in $\beta$.
monotone_smul_right_of_nonneg theorem
[SMulPosMono α β] (hb : 0 ≤ b) : Monotone ((· • b) : α → β)
Full source
lemma monotone_smul_right_of_nonneg [SMulPosMono α β] (hb : 0 ≤ b) : Monotone ((· • b) : α → β) :=
  SMulPosMono.elim hb
Monotonicity of Right Scalar Multiplication by Nonnegative Elements
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosMono` (i.e., scalar multiplication is monotone in the left argument when the right argument is nonnegative), then for any $b \geq 0$ in $\beta$, the function $a \mapsto a \bullet b$ is monotone on $\alpha$.
strictMono_smul_right_of_pos theorem
[SMulPosStrictMono α β] (hb : 0 < b) : StrictMono ((· • b) : α → β)
Full source
lemma strictMono_smul_right_of_pos [SMulPosStrictMono α β] (hb : 0 < b) :
    StrictMono ((· • b) : α → β) := SMulPosStrictMono.elim hb
Strict Monotonicity of Right Scalar Multiplication by Positive Elements
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosStrictMono` (i.e., scalar multiplication is strictly monotone in the left argument when the right argument is positive), then for any $b > 0$ in $\beta$, the function $a \mapsto a \bullet b$ is strictly monotone on $\alpha$.
smul_le_smul_of_nonneg_right theorem
[SMulPosMono α β] (ha : a₁ ≤ a₂) (hb : 0 ≤ b) : a₁ • b ≤ a₂ • b
Full source
@[gcongr] lemma smul_le_smul_of_nonneg_right [SMulPosMono α β] (ha : a₁ ≤ a₂) (hb : 0 ≤ b) :
    a₁ • b ≤ a₂ • b := monotone_smul_right_of_nonneg hb ha
Monotonicity of scalar multiplication with nonnegative right argument
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosMono` (i.e., scalar multiplication is monotone in the left argument when the right argument is nonnegative), then for any $a_1, a_2 \in \alpha$ with $a_1 \leq a_2$ and any $b \in \beta$ with $0 \leq b$, we have $a_1 \bullet b \leq a_2 \bullet b$.
smul_lt_smul_of_pos_right theorem
[SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : 0 < b) : a₁ • b < a₂ • b
Full source
@[gcongr] lemma smul_lt_smul_of_pos_right [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : 0 < b) :
    a₁ • b < a₂ • b := strictMono_smul_right_of_pos hb ha
Strict Monotonicity of Scalar Multiplication with Positive Right Argument: $a_1 < a_2 \Rightarrow a_1 \bullet b < a_2 \bullet b$ for $b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosStrictMono` (i.e., scalar multiplication is strictly monotone in the left argument when the right argument is positive), then for any $a_1, a_2 \in \alpha$ with $a_1 < a_2$ and any $b \in \beta$ with $0 < b$, we have $a_1 \bullet b < a_2 \bullet b$.
lt_of_smul_lt_smul_right theorem
[SMulPosReflectLT α β] (h : a₁ • b < a₂ • b) (hb : 0 ≤ b) : a₁ < a₂
Full source
lemma lt_of_smul_lt_smul_right [SMulPosReflectLT α β] (h : a₁ • b < a₂ • b) (hb : 0 ≤ b) :
    a₁ < a₂ := SMulPosReflectLT.elim hb h
Reflection of strict inequality under right scalar multiplication by nonnegative elements
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, and let $\cdot : \alpha \rightarrow \beta \rightarrow \beta$ be a scalar multiplication operation. If $\beta$ satisfies the property that for any nonnegative element $b \in \beta$ (i.e., $0 \leq b$), the inequality $a_1 \cdot b < a_2 \cdot b$ implies $a_1 < a_2$, then for any $a_1, a_2 \in \alpha$ and $b \in \beta$ with $0 \leq b$, we have that $a_1 \cdot b < a_2 \cdot b$ implies $a_1 < a_2$.
le_of_smul_le_smul_right theorem
[SMulPosReflectLE α β] (h : a₁ • b ≤ a₂ • b) (hb : 0 < b) : a₁ ≤ a₂
Full source
lemma le_of_smul_le_smul_right [SMulPosReflectLE α β] (h : a₁ • b ≤ a₂ • b) (hb : 0 < b) :
    a₁ ≤ a₂ := SMulPosReflectLE.elim hb h
Reverse monotonicity of right scalar multiplication by positive elements: $a_1 \cdot b \leq a_2 \cdot b \Rightarrow a_1 \leq a_2$ for $b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, and let $\cdot : \alpha \rightarrow \beta \rightarrow \beta$ be a scalar multiplication operation. If $\beta$ satisfies the property that for any positive element $b \in \beta$ (i.e., $0 < b$), the inequality $a_1 \cdot b \leq a_2 \cdot b$ implies $a_1 \leq a_2$, then for any $a_1, a_2 \in \alpha$ and $b \in \beta$ with $0 < b$, we have that $a_1 \cdot b \leq a_2 \cdot b$ implies $a_1 \leq a_2$.
smul_le_smul_iff_of_pos_right theorem
[SMulPosMono α β] [SMulPosReflectLE α β] (hb : 0 < b) : a₁ • b ≤ a₂ • b ↔ a₁ ≤ a₂
Full source
@[simp]
lemma smul_le_smul_iff_of_pos_right [SMulPosMono α β] [SMulPosReflectLE α β] (hb : 0 < b) :
    a₁ • b ≤ a₂ • b ↔ a₁ ≤ a₂ :=
  ⟨fun h ↦ le_of_smul_le_smul_right h hb, fun ha ↦ smul_le_smul_of_nonneg_right ha hb.le⟩
Equivalence of scalar inequality and argument inequality for positive right scalar: $a_1 \cdot b \leq a_2 \cdot b \leftrightarrow a_1 \leq a_2$ when $b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \rightarrow \beta \rightarrow \beta$. If $\alpha$ satisfies `SMulPosMono` (monotonicity of right scalar multiplication when the right argument is nonnegative) and `SMulPosReflectLE` (reverse monotonicity when the right argument is positive), then for any positive element $b \in \beta$ (i.e., $0 < b$), the inequality $a_1 \cdot b \leq a_2 \cdot b$ holds if and only if $a_1 \leq a_2$ in $\alpha$.
smul_lt_smul_iff_of_pos_right theorem
[SMulPosStrictMono α β] [SMulPosReflectLT α β] (hb : 0 < b) : a₁ • b < a₂ • b ↔ a₁ < a₂
Full source
@[simp]
lemma smul_lt_smul_iff_of_pos_right [SMulPosStrictMono α β] [SMulPosReflectLT α β] (hb : 0 < b) :
    a₁ • b < a₂ • b ↔ a₁ < a₂ :=
  ⟨fun h ↦ lt_of_smul_lt_smul_right h hb.le, fun ha ↦ smul_lt_smul_of_pos_right ha hb⟩
Strict order equivalence under right scalar multiplication by positive elements: $a_1 \cdot b < a_2 \cdot b \leftrightarrow a_1 < a_2$ for $b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \rightarrow \beta \rightarrow \beta$. If $\alpha$ satisfies `SMulPosStrictMono` (strict monotonicity of left multiplication by positive elements) and `SMulPosReflectLT` (reflection of strict order under right multiplication by nonnegative elements), then for any positive element $b \in \beta$ (i.e., $0 < b$), the inequality $a_1 \cdot b < a_2 \cdot b$ holds if and only if $a_1 < a_2$.
smul_lt_smul_of_le_of_lt theorem
[PosSMulStrictMono α β] [SMulPosMono α β] (ha : a₁ ≤ a₂) (hb : b₁ < b₂) (h₁ : 0 < a₁) (h₂ : 0 ≤ b₂) : a₁ • b₁ < a₂ • b₂
Full source
lemma smul_lt_smul_of_le_of_lt [PosSMulStrictMono α β] [SMulPosMono α β] (ha : a₁ ≤ a₂)
    (hb : b₁ < b₂) (h₁ : 0 < a₁) (h₂ : 0 ≤ b₂) : a₁ • b₁ < a₂ • b₂ :=
  (smul_lt_smul_of_pos_left hb h₁).trans_le (smul_le_smul_of_nonneg_right ha h₂)
Strict inequality preservation under scalar multiplication with $a_1 \leq a_2$, $b_1 < b_2$, $a_1 > 0$, and $b_2 \geq 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ satisfies `PosSMulStrictMono` (left scalar multiplication by positive elements is strictly monotone) and `SMulPosMono` (scalar multiplication is monotone in the left argument when the right argument is nonnegative). Then for any $a_1, a_2 \in \alpha$ with $a_1 \leq a_2$ and $0 < a_1$, and any $b_1, b_2 \in \beta$ with $b_1 < b_2$ and $0 \leq b_2$, we have $a_1 \cdot b_1 < a_2 \cdot b_2$.
smul_lt_smul_of_le_of_lt' theorem
[PosSMulStrictMono α β] [SMulPosMono α β] (ha : a₁ ≤ a₂) (hb : b₁ < b₂) (h₂ : 0 < a₂) (h₁ : 0 ≤ b₁) : a₁ • b₁ < a₂ • b₂
Full source
lemma smul_lt_smul_of_le_of_lt' [PosSMulStrictMono α β] [SMulPosMono α β] (ha : a₁ ≤ a₂)
    (hb : b₁ < b₂) (h₂ : 0 < a₂) (h₁ : 0 ≤ b₁) : a₁ • b₁ < a₂ • b₂ :=
  (smul_le_smul_of_nonneg_right ha h₁).trans_lt (smul_lt_smul_of_pos_left hb h₂)
Strict inequality under scalar multiplication with $a_1 \leq a_2$, $b_1 < b_2$, $0 < a_2$, and $0 \leq b_1$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ satisfies `PosSMulStrictMono` (left scalar multiplication by positive elements is strictly monotone) and `SMulPosMono` (scalar multiplication is monotone in the left argument when the right argument is nonnegative). Then for any $a_1, a_2 \in \alpha$ with $a_1 \leq a_2$ and $0 < a_2$, and any $b_1, b_2 \in \beta$ with $b_1 < b_2$ and $0 \leq b_1$, we have $a_1 \cdot b_1 < a_2 \cdot b_2$.
smul_lt_smul_of_lt_of_le theorem
[PosSMulMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : b₁ ≤ b₂) (h₁ : 0 ≤ a₁) (h₂ : 0 < b₂) : a₁ • b₁ < a₂ • b₂
Full source
lemma smul_lt_smul_of_lt_of_le [PosSMulMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂)
    (hb : b₁ ≤ b₂) (h₁ : 0 ≤ a₁) (h₂ : 0 < b₂) : a₁ • b₁ < a₂ • b₂ :=
  (smul_le_smul_of_nonneg_left hb h₁).trans_lt (smul_lt_smul_of_pos_right ha h₂)
Strict inequality preservation under scalar multiplication with left-strict and right-nonstrict conditions
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume: 1. Left scalar multiplication by nonnegative elements is monotone (i.e., $\alpha$ satisfies `PosSMulMono`) 2. Right scalar multiplication is strictly monotone when the right argument is positive (i.e., $\alpha$ satisfies `SMulPosStrictMono`) Then for any $a_1, a_2 \in \alpha$ with $a_1 < a_2$ and $0 \leq a_1$, and any $b_1, b_2 \in \beta$ with $b_1 \leq b_2$ and $0 < b_2$, we have $a_1 \cdot b_1 < a_2 \cdot b_2$.
smul_lt_smul_of_lt_of_le' theorem
[PosSMulMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : b₁ ≤ b₂) (h₂ : 0 ≤ a₂) (h₁ : 0 < b₁) : a₁ • b₁ < a₂ • b₂
Full source
lemma smul_lt_smul_of_lt_of_le' [PosSMulMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂)
    (hb : b₁ ≤ b₂) (h₂ : 0 ≤ a₂) (h₁ : 0 < b₁) : a₁ • b₁ < a₂ • b₂ :=
  (smul_lt_smul_of_pos_right ha h₁).trans_le (smul_le_smul_of_nonneg_left hb h₂)
Strict inequality under scalar multiplication: $a_1 < a_2 \land b_1 \leq b_2 \Rightarrow a_1 \cdot b_1 < a_2 \cdot b_2$ with positivity conditions
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that: 1. Left scalar multiplication by nonnegative elements is monotone (i.e., $\alpha$ satisfies `PosSMulMono`). 2. Scalar multiplication is strictly monotone in the left argument when the right argument is positive (i.e., $\alpha$ satisfies `SMulPosStrictMono`). Then for any $a_1, a_2 \in \alpha$ with $a_1 < a_2$ and $0 \leq a_2$, and any $b_1, b_2 \in \beta$ with $b_1 \leq b_2$ and $0 < b_1$, we have $a_1 \cdot b_1 < a_2 \cdot b_2$.
smul_lt_smul theorem
[PosSMulStrictMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : b₁ < b₂) (h₁ : 0 < a₁) (h₂ : 0 < b₂) : a₁ • b₁ < a₂ • b₂
Full source
lemma smul_lt_smul [PosSMulStrictMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : b₁ < b₂)
    (h₁ : 0 < a₁) (h₂ : 0 < b₂) : a₁ • b₁ < a₂ • b₂ :=
  (smul_lt_smul_of_pos_left hb h₁).trans (smul_lt_smul_of_pos_right ha h₂)
Strict Monotonicity of Scalar Multiplication: $0 < a_1 < a_2 \land 0 < b_1 < b_2 \Rightarrow a_1 \cdot b_1 < a_2 \cdot b_2$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulStrictMono` (left scalar multiplication by positive elements is strictly monotone) and `SMulPosStrictMono` (scalar multiplication is strictly monotone in the left argument when the right argument is positive), then for any $a_1, a_2 \in \alpha$ with $0 < a_1 < a_2$ and any $b_1, b_2 \in \beta$ with $0 < b_1 < b_2$, we have $a_1 \cdot b_1 < a_2 \cdot b_2$.
smul_lt_smul' theorem
[PosSMulStrictMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : b₁ < b₂) (h₂ : 0 < a₂) (h₁ : 0 < b₁) : a₁ • b₁ < a₂ • b₂
Full source
lemma smul_lt_smul' [PosSMulStrictMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : b₁ < b₂)
    (h₂ : 0 < a₂) (h₁ : 0 < b₁) : a₁ • b₁ < a₂ • b₂ :=
  (smul_lt_smul_of_pos_right ha h₁).trans (smul_lt_smul_of_pos_left hb h₂)
Strict Monotonicity of Scalar Multiplication: $a_1 < a_2 \land b_1 < b_2 \Rightarrow a_1 \cdot b_1 < a_2 \cdot b_2$ under positivity conditions
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If left scalar multiplication by positive elements is strictly monotone (i.e., $a > 0$ implies $b \mapsto a \cdot b$ is strictly increasing) and right scalar multiplication is strictly monotone for positive elements (i.e., $b > 0$ implies $a \mapsto a \cdot b$ is strictly increasing), then for any $a_1, a_2 \in \alpha$ with $a_1 < a_2$ and $0 < a_2$, and any $b_1, b_2 \in \beta$ with $b_1 < b_2$ and $0 < b_1$, we have $a_1 \cdot b_1 < a_2 \cdot b_2$.
smul_le_smul theorem
[PosSMulMono α β] [SMulPosMono α β] (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) (h₁ : 0 ≤ a₁) (h₂ : 0 ≤ b₂) : a₁ • b₁ ≤ a₂ • b₂
Full source
lemma smul_le_smul [PosSMulMono α β] [SMulPosMono α β] (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂)
    (h₁ : 0 ≤ a₁) (h₂ : 0 ≤ b₂) : a₁ • b₁ ≤ a₂ • b₂ :=
  (smul_le_smul_of_nonneg_left hb h₁).trans (smul_le_smul_of_nonneg_right ha h₂)
Monotonicity of scalar multiplication under nonnegative conditions: $a_1 \leq a_2 \land b_1 \leq b_2 \land a_1 \geq 0 \land b_2 \geq 0 \Rightarrow a_1 \cdot b_1 \leq a_2 \cdot b_2$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulMono` (left scalar multiplication by nonnegative elements is monotone) and `SMulPosMono` (scalar multiplication is monotone in the left argument when the right argument is nonnegative), then for any $a_1, a_2 \in \alpha$ with $a_1 \leq a_2$ and $0 \leq a_1$, and any $b_1, b_2 \in \beta$ with $b_1 \leq b_2$ and $0 \leq b_2$, we have $a_1 \cdot b_1 \leq a_2 \cdot b_2$.
smul_le_smul' theorem
[PosSMulMono α β] [SMulPosMono α β] (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) (h₂ : 0 ≤ a₂) (h₁ : 0 ≤ b₁) : a₁ • b₁ ≤ a₂ • b₂
Full source
lemma smul_le_smul' [PosSMulMono α β] [SMulPosMono α β] (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) (h₂ : 0 ≤ a₂)
    (h₁ : 0 ≤ b₁) : a₁ • b₁ ≤ a₂ • b₂ :=
  (smul_le_smul_of_nonneg_right ha h₁).trans (smul_le_smul_of_nonneg_left hb h₂)
Monotonicity of scalar multiplication with positive elements: $a_1 \leq a_2 \land b_1 \leq b_2 \land a_2 > 0 \land b_1 > 0 \Rightarrow a_1 \cdot b_1 \leq a_2 \cdot b_2$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulMono` (left scalar multiplication by nonnegative elements is monotone) and `SMulPosMono` (scalar multiplication is monotone in the left argument when the right argument is nonnegative), then for any $a_1, a_2 \in \alpha$ with $a_1 \leq a_2$ and $0 < a_2$, and any $b_1, b_2 \in \beta$ with $b_1 \leq b_2$ and $0 < b_1$, we have $a_1 \cdot b_1 \leq a_2 \cdot b_2$.
PosSMulStrictMono.toPosSMulReflectLE instance
[PosSMulStrictMono α β] : PosSMulReflectLE α β
Full source
instance (priority := 100) PosSMulStrictMono.toPosSMulReflectLE [PosSMulStrictMono α β] :
    PosSMulReflectLE α β where
  elim _a ha _b₁ _b₂ := (strictMono_smul_left_of_pos ha).le_iff_le.1
Strict Monotonicity Implies Order Reflection in Left Scalar Multiplication
Informal description
For any preordered types $\alpha$ and $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, if left scalar multiplication by positive elements is strictly monotone (i.e., $a > 0$ and $b_1 < b_2$ implies $a \cdot b_1 < a \cdot b_2$), then left scalar multiplication by positive elements reflects the order relation $\leq$ (i.e., $a > 0$ and $a \cdot b_1 \leq a \cdot b_2$ implies $b_1 \leq b_2$).
PosSMulReflectLE.toPosSMulStrictMono theorem
[PosSMulReflectLE α β] : PosSMulStrictMono α β
Full source
lemma PosSMulReflectLE.toPosSMulStrictMono [PosSMulReflectLE α β] : PosSMulStrictMono α β where
  elim _a ha _b₁ _b₂ hb := not_le.1 fun h ↦ hb.not_le <| le_of_smul_le_smul_left h ha
Reflection of Order Implies Strict Monotonicity in Left Scalar Multiplication
Informal description
If for a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$ on preordered types $\alpha$ and $\beta$, left multiplication by positive elements reflects the order relation $\leq$ (i.e., $a > 0$ and $a \cdot b_1 \leq a \cdot b_2$ implies $b_1 \leq b_2$), then left multiplication by positive elements is strictly monotone (i.e., $a > 0$ and $b_1 < b_2$ implies $a \cdot b_1 < a \cdot b_2$).
posSMulStrictMono_iff_PosSMulReflectLE theorem
: PosSMulStrictMono α β ↔ PosSMulReflectLE α β
Full source
lemma posSMulStrictMono_iff_PosSMulReflectLE : PosSMulStrictMonoPosSMulStrictMono α β ↔ PosSMulReflectLE α β :=
  ⟨fun _ ↦ inferInstance, fun _ ↦ PosSMulReflectLE.toPosSMulStrictMono⟩
Equivalence of Strict Monotonicity and Order Reflection in Left Scalar Multiplication by Positive Elements
Informal description
For preordered types $\alpha$ and $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, the following are equivalent: 1. Left scalar multiplication by positive elements is strictly monotone (i.e., for any $a > 0$ in $\alpha$ and $b_1 < b_2$ in $\beta$, we have $a \cdot b_1 < a \cdot b_2$). 2. Left scalar multiplication by positive elements reflects the order relation $\leq$ (i.e., for any $a > 0$ in $\alpha$ and $b_1, b_2$ in $\beta$, if $a \cdot b_1 \leq a \cdot b_2$, then $b_1 \leq b_2$).
PosSMulMono.toPosSMulReflectLT instance
[PosSMulMono α β] : PosSMulReflectLT α β
Full source
instance PosSMulMono.toPosSMulReflectLT [PosSMulMono α β] : PosSMulReflectLT α β where
  elim _a ha _b₁ _b₂ := (monotone_smul_left_of_nonneg ha).reflect_lt
Monotonicity of Left Scalar Multiplication Implies Reflection of Strict Inequalities
Informal description
For any preordered types $\alpha$ and $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, if left scalar multiplication by nonnegative elements is monotone (i.e., $a \geq 0$ implies $b \mapsto a \cdot b$ is monotone), then left scalar multiplication by nonnegative elements also reflects strict inequalities (i.e., $a \geq 0$ and $a \cdot b_1 < a \cdot b_2$ implies $b_1 < b_2$).
PosSMulReflectLT.toPosSMulMono theorem
[PosSMulReflectLT α β] : PosSMulMono α β
Full source
lemma PosSMulReflectLT.toPosSMulMono [PosSMulReflectLT α β] : PosSMulMono α β where
  elim _a ha _b₁ _b₂ hb := not_lt.1 fun h ↦ hb.not_lt <| lt_of_smul_lt_smul_left h ha
Reflection of Strict Inequalities Implies Monotonicity in Left Scalar Multiplication
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If left scalar multiplication by nonnegative elements reflects strict inequalities (i.e., for any $a \geq 0$ in $\alpha$ and $b_1, b_2$ in $\beta$, $a \cdot b_1 < a \cdot b_2$ implies $b_1 < b_2$), then left scalar multiplication by nonnegative elements is also monotone (i.e., for any $a \geq 0$ in $\alpha$ and $b_1 \leq b_2$ in $\beta$, $a \cdot b_1 \leq a \cdot b_2$).
posSMulMono_iff_posSMulReflectLT theorem
: PosSMulMono α β ↔ PosSMulReflectLT α β
Full source
lemma posSMulMono_iff_posSMulReflectLT : PosSMulMonoPosSMulMono α β ↔ PosSMulReflectLT α β :=
  ⟨fun _ ↦ PosSMulMono.toPosSMulReflectLT, fun _ ↦ PosSMulReflectLT.toPosSMulMono⟩
Equivalence of Monotonicity and Strict Inequality Reflection in Left Scalar Multiplication by Nonnegative Elements
Informal description
For preordered types $\alpha$ and $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, the following are equivalent: 1. Left scalar multiplication by nonnegative elements is monotone (i.e., for any $a \geq 0$ in $\alpha$ and $b_1 \leq b_2$ in $\beta$, we have $a \cdot b_1 \leq a \cdot b_2$). 2. Left scalar multiplication by nonnegative elements reflects strict inequalities (i.e., for any $a \geq 0$ in $\alpha$ and $b_1, b_2$ in $\beta$, if $a \cdot b_1 < a \cdot b_2$, then $b_1 < b_2$).
smul_max_of_nonneg theorem
[PosSMulMono α β] (ha : 0 ≤ a) (b₁ b₂ : β) : a • max b₁ b₂ = max (a • b₁) (a • b₂)
Full source
lemma smul_max_of_nonneg [PosSMulMono α β] (ha : 0 ≤ a) (b₁ b₂ : β) :
    a • max b₁ b₂ = max (a • b₁) (a • b₂) := (monotone_smul_left_of_nonneg ha).map_max
Scalar multiplication distributes over maximum for nonnegative scalars: $a \cdot \max(b_1, b_2) = \max(a \cdot b_1, a \cdot b_2)$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$ such that left scalar multiplication by nonnegative elements is monotone (i.e., $\alpha$ satisfies `PosSMulMono`). Then for any nonnegative $a \in \alpha$ (i.e., $0 \leq a$) and any $b_1, b_2 \in \beta$, we have: \[ a \cdot \max(b_1, b_2) = \max(a \cdot b_1, a \cdot b_2). \]
smul_min_of_nonneg theorem
[PosSMulMono α β] (ha : 0 ≤ a) (b₁ b₂ : β) : a • min b₁ b₂ = min (a • b₁) (a • b₂)
Full source
lemma smul_min_of_nonneg [PosSMulMono α β] (ha : 0 ≤ a) (b₁ b₂ : β) :
    a • min b₁ b₂ = min (a • b₁) (a • b₂) := (monotone_smul_left_of_nonneg ha).map_min
Scalar multiplication distributes over minimum for nonnegative scalars: $a \cdot \min(b_1, b_2) = \min(a \cdot b_1, a \cdot b_2)$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$ such that left scalar multiplication by nonnegative elements is monotone (i.e., $\alpha$ satisfies `PosSMulMono`). Then for any nonnegative $a \in \alpha$ (i.e., $0 \leq a$) and any $b_1, b_2 \in \beta$, we have: \[ a \cdot \min(b_1, b_2) = \min(a \cdot b_1, a \cdot b_2). \]
SMulPosReflectLE.toSMulPosStrictMono theorem
[SMulPosReflectLE α β] : SMulPosStrictMono α β
Full source
lemma SMulPosReflectLE.toSMulPosStrictMono [SMulPosReflectLE α β] : SMulPosStrictMono α β where
  elim _b hb _a₁ _a₂ ha := not_le.1 fun h ↦ ha.not_le <| le_of_smul_le_smul_of_pos_right h hb
Reverse monotonicity of right scalar multiplication implies strict monotonicity for positive elements
Informal description
If for a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$ and any positive element $b > 0$ in $\beta$, the inequality $a_1 \cdot b \leq a_2 \cdot b$ implies $a_1 \leq a_2$ in $\alpha$ (i.e., $\alpha$ satisfies `SMulPosReflectLE`), then the scalar multiplication is strictly monotone in the left argument when the right argument is positive (i.e., $\alpha$ satisfies `SMulPosStrictMono`).
SMulPosReflectLT.toSMulPosMono theorem
[SMulPosReflectLT α β] : SMulPosMono α β
Full source
lemma SMulPosReflectLT.toSMulPosMono [SMulPosReflectLT α β] : SMulPosMono α β where
  elim _b hb _a₁ _a₂ ha := not_lt.1 fun h ↦ ha.not_lt <| lt_of_smul_lt_smul_right h hb
Reflection of strict order under right scalar multiplication implies monotonicity for nonnegative elements
Informal description
If for a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$ and any nonnegative element $b \geq 0$ in $\beta$, the strict inequality $a_1 \cdot b < a_2 \cdot b$ implies $a_1 < a_2$ in $\alpha$ (i.e., $\alpha$ satisfies `SMulPosReflectLT`), then the scalar multiplication is monotone in the left argument when the right argument is nonnegative (i.e., $\alpha$ satisfies `SMulPosMono`).
SMulPosStrictMono.toSMulPosReflectLE instance
[SMulPosStrictMono α β] : SMulPosReflectLE α β
Full source
instance (priority := 100) SMulPosStrictMono.toSMulPosReflectLE [SMulPosStrictMono α β] :
    SMulPosReflectLE α β where
  elim _b hb _a₁ _a₂ h := not_lt.1 fun ha ↦ h.not_lt <| smul_lt_smul_of_pos_right ha hb
Strict Monotonicity Implies Order Reflection for Positive Scalar Multiplication
Informal description
For any preorders $\alpha$ and $\beta$ with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$, if scalar multiplication is strictly monotone in the left argument when the right argument is positive (i.e., $\alpha$ satisfies `SMulPosStrictMono`), then it also reflects the non-strict order in the left argument when the right argument is positive (i.e., $\alpha$ satisfies `SMulPosReflectLE`). In other words, if $a_1 \bullet b \leq a_2 \bullet b$ and $b > 0$, then $a_1 \leq a_2$.
SMulPosMono.toSMulPosReflectLT theorem
[SMulPosMono α β] : SMulPosReflectLT α β
Full source
lemma SMulPosMono.toSMulPosReflectLT [SMulPosMono α β] : SMulPosReflectLT α β where
  elim _b hb _a₁ _a₂ h := not_le.1 fun ha ↦ h.not_le <| smul_le_smul_of_nonneg_right ha hb
Monotonicity of scalar multiplication implies reflection of strict order for nonnegative right arguments
Informal description
If scalar multiplication by nonnegative elements on the right is monotone (i.e., the operation $\bullet : \alpha \to \beta \to \beta$ satisfies $a_1 \leq a_2$ and $0 \leq b$ implies $a_1 \bullet b \leq a_2 \bullet b$), then it also reflects strict order in the first argument (i.e., $a_1 \bullet b < a_2 \bullet b$ and $0 \leq b$ implies $a_1 < a_2$).
smulPosStrictMono_iff_SMulPosReflectLE theorem
: SMulPosStrictMono α β ↔ SMulPosReflectLE α β
Full source
lemma smulPosStrictMono_iff_SMulPosReflectLE : SMulPosStrictMonoSMulPosStrictMono α β ↔ SMulPosReflectLE α β :=
  ⟨fun _ ↦ SMulPosStrictMono.toSMulPosReflectLE, fun _ ↦ SMulPosReflectLE.toSMulPosStrictMono⟩
Equivalence of Strict Monotonicity and Order Reflection for Positive Scalar Multiplication
Informal description
For preorders $\alpha$ and $\beta$ with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$, the following are equivalent: 1. Scalar multiplication is strictly monotone in the left argument when the right argument is positive (i.e., for any $b > 0$, $a_1 < a_2$ implies $a_1 \bullet b < a_2 \bullet b$). 2. Scalar multiplication reflects the non-strict order in the left argument when the right argument is positive (i.e., for any $b > 0$, $a_1 \bullet b \leq a_2 \bullet b$ implies $a_1 \leq a_2$).
smulPosMono_iff_smulPosReflectLT theorem
: SMulPosMono α β ↔ SMulPosReflectLT α β
Full source
lemma smulPosMono_iff_smulPosReflectLT : SMulPosMonoSMulPosMono α β ↔ SMulPosReflectLT α β :=
  ⟨fun _ ↦ SMulPosMono.toSMulPosReflectLT, fun _ ↦ SMulPosReflectLT.toSMulPosMono⟩
Equivalence of Monotonicity and Order Reflection in Right Scalar Multiplication
Informal description
For types $\alpha$ and $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, the following are equivalent: 1. For any $b \geq 0$ in $\beta$, the operation $\cdot$ is monotone in its first argument (i.e., $a_1 \leq a_2$ implies $a_1 \cdot b \leq a_2 \cdot b$). 2. For any $b \geq 0$ in $\beta$, the operation $\cdot$ reflects strict order in its first argument (i.e., $a_1 \cdot b < a_2 \cdot b$ implies $a_1 < a_2$).
smul_pos theorem
[PosSMulStrictMono α β] (ha : 0 < a) (hb : 0 < b) : 0 < a • b
Full source
lemma smul_pos [PosSMulStrictMono α β] (ha : 0 < a) (hb : 0 < b) : 0 < a • b := by
  simpa only [smul_zero] using smul_lt_smul_of_pos_left hb ha
Positivity of scalar multiplication: $a > 0 \land b > 0 \Rightarrow a \cdot b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulStrictMono` (i.e., left scalar multiplication by positive elements is strictly monotone), then for any $a \in \alpha$ with $0 < a$ and $b \in \beta$ with $0 < b$, we have $0 < a \cdot b$.
smul_neg_of_pos_of_neg theorem
[PosSMulStrictMono α β] (ha : 0 < a) (hb : b < 0) : a • b < 0
Full source
lemma smul_neg_of_pos_of_neg [PosSMulStrictMono α β] (ha : 0 < a) (hb : b < 0) : a • b < 0 := by
  simpa only [smul_zero] using smul_lt_smul_of_pos_left hb ha
Negative scalar multiplication by positive elements: $a > 0 \land b < 0 \Rightarrow a \cdot b < 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulStrictMono` (i.e., left scalar multiplication by positive elements is strictly monotone), then for any $a \in \alpha$ with $0 < a$ and any $b \in \beta$ with $b < 0$, we have $a \cdot b < 0$.
smul_pos_iff_of_pos_left theorem
[PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) : 0 < a • b ↔ 0 < b
Full source
@[simp]
lemma smul_pos_iff_of_pos_left [PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) :
    0 < a • b ↔ 0 < b := by
  simpa only [smul_zero] using smul_lt_smul_iff_of_pos_left ha (b₁ := 0) (b₂ := b)
Positivity equivalence under left scalar multiplication by positive elements: $a > 0 \Rightarrow (0 < a \cdot b \leftrightarrow 0 < b)$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ and $\beta$ satisfy both `PosSMulStrictMono` (left scalar multiplication by positive elements is strictly monotone) and `PosSMulReflectLT` (left scalar multiplication by nonnegative elements reflects strict inequalities), then for any positive element $a > 0$ in $\alpha$, the inequality $0 < a \cdot b$ holds if and only if $0 < b$ in $\beta$.
smul_neg_iff_of_pos_left theorem
[PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) : a • b < 0 ↔ b < 0
Full source
lemma smul_neg_iff_of_pos_left [PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) :
    a • b < 0 ↔ b < 0 := by
  simpa only [smul_zero]  using smul_lt_smul_iff_of_pos_left ha (b₂ := (0 : β))
Negative scalar multiplication equivalence under positive left scalar: $a > 0 \Rightarrow (a \cdot b < 0 \leftrightarrow b < 0)$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ and $\beta$ satisfy both `PosSMulStrictMono` (left scalar multiplication by positive elements is strictly monotone) and `PosSMulReflectLT` (left scalar multiplication by nonnegative elements reflects strict inequalities), then for any positive element $a > 0$ in $\alpha$, the inequality $a \cdot b < 0$ holds if and only if $b < 0$ in $\beta$.
smul_nonneg theorem
[PosSMulMono α β] (ha : 0 ≤ a) (hb : 0 ≤ b₁) : 0 ≤ a • b₁
Full source
lemma smul_nonneg [PosSMulMono α β] (ha : 0 ≤ a) (hb : 0 ≤ b₁) : 0 ≤ a • b₁ := by
  simpa only [smul_zero] using smul_le_smul_of_nonneg_left hb ha
Nonnegativity preservation under left scalar multiplication by nonnegative elements
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulMono` (i.e., left scalar multiplication by nonnegative elements is monotone), then for any $a \in \alpha$ with $0 \leq a$ and any $b \in \beta$ with $0 \leq b$, we have $0 \leq a \cdot b$.
smul_nonpos_of_nonneg_of_nonpos theorem
[PosSMulMono α β] (ha : 0 ≤ a) (hb : b ≤ 0) : a • b ≤ 0
Full source
lemma smul_nonpos_of_nonneg_of_nonpos [PosSMulMono α β] (ha : 0 ≤ a) (hb : b ≤ 0) : a • b ≤ 0 := by
  simpa only [smul_zero] using smul_le_smul_of_nonneg_left hb ha
Nonpositivity preservation under left scalar multiplication by nonnegative elements
Informal description
Let $\alpha$ and $\beta$ be preorders with zero and a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `PosSMulMono` (i.e., left scalar multiplication by nonnegative elements is monotone), then for any $a \in \alpha$ with $0 \leq a$ and any $b \in \beta$ with $b \leq 0$, we have $a \cdot b \leq 0$.
pos_of_smul_pos_left theorem
[PosSMulReflectLT α β] (h : 0 < a • b) (ha : 0 ≤ a) : 0 < b
Full source
lemma pos_of_smul_pos_left [PosSMulReflectLT α β] (h : 0 < a • b) (ha : 0 ≤ a) : 0 < b :=
  lt_of_smul_lt_smul_left (by rwa [smul_zero]) ha
Positivity reflection under left scalar multiplication by nonnegative elements
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, and let $\cdot : \alpha \to \beta \to \beta$ be a scalar multiplication operation. If $\alpha$ and $\beta$ satisfy the condition that left scalar multiplication by nonnegative elements reflects strict inequalities, then for any $a \in \alpha$ with $0 \leq a$ and any $b \in \beta$, the inequality $0 < a \cdot b$ implies $0 < b$.
neg_of_smul_neg_left theorem
[PosSMulReflectLT α β] (h : a • b < 0) (ha : 0 ≤ a) : b < 0
Full source
lemma neg_of_smul_neg_left [PosSMulReflectLT α β] (h : a • b < 0) (ha : 0 ≤ a) : b < 0 :=
  lt_of_smul_lt_smul_left (by rwa [smul_zero]) ha
Negativity reflection under left scalar multiplication by nonnegative elements
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, and let $\cdot : \alpha \to \beta \to \beta$ be a scalar multiplication operation. If $\alpha$ and $\beta$ satisfy the `PosSMulReflectLT` condition (i.e., left scalar multiplication by nonnegative elements reflects strict inequalities), then for any $a \in \alpha$ with $0 \leq a$ and any $b \in \beta$, the inequality $a \cdot b < 0$ implies $b < 0$.
smul_pos' theorem
[SMulPosStrictMono α β] (ha : 0 < a) (hb : 0 < b) : 0 < a • b
Full source
lemma smul_pos' [SMulPosStrictMono α β] (ha : 0 < a) (hb : 0 < b) : 0 < a • b := by
  simpa only [zero_smul] using smul_lt_smul_of_pos_right ha hb
Positivity of scalar multiplication with positive arguments: $0 < a$ and $0 < b$ implies $0 < a \bullet b$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosStrictMono` (i.e., scalar multiplication is strictly monotone in the left argument when the right argument is positive), then for any $a \in \alpha$ with $0 < a$ and any $b \in \beta$ with $0 < b$, we have $0 < a \bullet b$.
smul_neg_of_neg_of_pos theorem
[SMulPosStrictMono α β] (ha : a < 0) (hb : 0 < b) : a • b < 0
Full source
lemma smul_neg_of_neg_of_pos [SMulPosStrictMono α β] (ha : a < 0) (hb : 0 < b) : a • b < 0 := by
  simpa only [zero_smul] using smul_lt_smul_of_pos_right ha hb
Negativity of Scalar Multiplication: $a < 0$ and $b > 0$ implies $a \bullet b < 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosStrictMono` (i.e., scalar multiplication is strictly monotone in the left argument when the right argument is positive), then for any $a \in \alpha$ with $a < 0$ and any $b \in \beta$ with $0 < b$, we have $a \bullet b < 0$.
smul_pos_iff_of_pos_right theorem
[SMulPosStrictMono α β] [SMulPosReflectLT α β] (hb : 0 < b) : 0 < a • b ↔ 0 < a
Full source
@[simp]
lemma smul_pos_iff_of_pos_right [SMulPosStrictMono α β] [SMulPosReflectLT α β] (hb : 0 < b) :
    0 < a • b ↔ 0 < a := by
  simpa only [zero_smul] using smul_lt_smul_iff_of_pos_right hb (a₁ := 0) (a₂ := a)
Positivity equivalence under right scalar multiplication: $0 < a \cdot b \leftrightarrow 0 < a$ for $b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosStrictMono` (strict monotonicity of left multiplication by positive elements) and `SMulPosReflectLT` (reflection of strict order under right multiplication by nonnegative elements), then for any positive element $b \in \beta$ (i.e., $0 < b$), the inequality $0 < a \cdot b$ holds if and only if $0 < a$.
smul_nonneg' theorem
[SMulPosMono α β] (ha : 0 ≤ a) (hb : 0 ≤ b₁) : 0 ≤ a • b₁
Full source
lemma smul_nonneg' [SMulPosMono α β] (ha : 0 ≤ a) (hb : 0 ≤ b₁) : 0 ≤ a • b₁ := by
  simpa only [zero_smul] using smul_le_smul_of_nonneg_right ha hb
Nonnegativity of scalar multiplication with nonnegative arguments
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosMono` (i.e., scalar multiplication is monotone in the left argument when the right argument is nonnegative), then for any $a \in \alpha$ with $0 \leq a$ and any $b_1 \in \beta$ with $0 \leq b_1$, we have $0 \leq a \bullet b_1$.
smul_nonpos_of_nonpos_of_nonneg theorem
[SMulPosMono α β] (ha : a ≤ 0) (hb : 0 ≤ b) : a • b ≤ 0
Full source
lemma smul_nonpos_of_nonpos_of_nonneg [SMulPosMono α β] (ha : a ≤ 0) (hb : 0 ≤ b) : a • b ≤ 0 := by
  simpa only [zero_smul] using smul_le_smul_of_nonneg_right ha hb
Nonpositivity of scalar product with nonnegative element under nonpositive scalar
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosMono` (i.e., scalar multiplication is monotone in the left argument when the right argument is nonnegative), then for any $a \in \alpha$ with $a \leq 0$ and any $b \in \beta$ with $0 \leq b$, we have $a \bullet b \leq 0$.
pos_of_smul_pos_right theorem
[SMulPosReflectLT α β] (h : 0 < a • b) (hb : 0 ≤ b) : 0 < a
Full source
lemma pos_of_smul_pos_right [SMulPosReflectLT α β] (h : 0 < a • b) (hb : 0 ≤ b) : 0 < a :=
  lt_of_smul_lt_smul_right (by rwa [zero_smul]) hb
Positivity of scalar implied by positivity of scalar product with nonnegative element
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \rightarrow \beta \rightarrow \beta$. If $\beta$ satisfies the property that for any nonnegative element $b \in \beta$ (i.e., $0 \leq b$), the inequality $0 < a \cdot b$ implies $0 < a$, then for any $a \in \alpha$ and $b \in \beta$ with $0 \leq b$, we have that $0 < a \cdot b$ implies $0 < a$.
neg_of_smul_neg_right theorem
[SMulPosReflectLT α β] (h : a • b < 0) (hb : 0 ≤ b) : a < 0
Full source
lemma neg_of_smul_neg_right [SMulPosReflectLT α β] (h : a • b < 0) (hb : 0 ≤ b) : a < 0 :=
  lt_of_smul_lt_smul_right (by rwa [zero_smul]) hb
Negation of Scalar Implied by Negation of Scalar Product with Nonnegative Element
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \rightarrow \beta \rightarrow \beta$. If $\beta$ satisfies the property that for any nonnegative element $b \in \beta$ (i.e., $0 \leq b$), the inequality $a \cdot b < 0$ implies $a < 0$, then for any $a \in \alpha$ and $b \in \beta$ with $0 \leq b$, we have that $a \cdot b < 0$ implies $a < 0$.
pos_iff_pos_of_smul_pos theorem
[PosSMulReflectLT α β] [SMulPosReflectLT α β] (hab : 0 < a • b) : 0 < a ↔ 0 < b
Full source
lemma pos_iff_pos_of_smul_pos [PosSMulReflectLT α β] [SMulPosReflectLT α β] (hab : 0 < a • b) :
    0 < a ↔ 0 < b :=
  ⟨pos_of_smul_pos_left hab ∘ le_of_lt, pos_of_smul_pos_right hab ∘ le_of_lt⟩
Positivity equivalence under scalar multiplication: $0 < a \cdot b \implies (0 < a \leftrightarrow 0 < b)$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ and $\beta$ satisfy the conditions that left scalar multiplication by nonnegative elements reflects strict inequalities (`PosSMulReflectLT`) and right scalar multiplication by nonnegative elements reflects strict inequalities (`SMulPosReflectLT`), then for any $a \in \alpha$ and $b \in \beta$ with $0 < a \cdot b$, we have $0 < a$ if and only if $0 < b$.
PosSMulMono.of_pos theorem
(h₀ : ∀ a : α, 0 < a → ∀ b₁ b₂ : β, b₁ ≤ b₂ → a • b₁ ≤ a • b₂) : PosSMulMono α β
Full source
/-- A constructor for `PosSMulMono` requiring you to prove `b₁ ≤ b₂ → a • b₁ ≤ a • b₂` only when
`0 < a` -/
lemma PosSMulMono.of_pos (h₀ : ∀ a : α, 0 < a → ∀ b₁ b₂ : β, b₁ ≤ b₂ → a • b₁ ≤ a • b₂) :
    PosSMulMono α β where
  elim a ha b₁ b₂ h := by
    obtain ha | ha := ha.eq_or_lt
    · simp [← ha]
    · exact h₀ _ ha _ _ h
Monotonicity of Left Scalar Multiplication by Positive Elements Implies General Case
Informal description
Let $\alpha$ and $\beta$ be partially ordered types with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Suppose that for every positive element $a > 0$ in $\alpha$, the map $b \mapsto a \cdot b$ is monotone in $\beta$, i.e., for any $b_1, b_2 \in \beta$, if $b_1 \leq b_2$ then $a \cdot b_1 \leq a \cdot b_2$. Then the scalar multiplication satisfies the `PosSMulMono` property, meaning this monotonicity holds for all nonnegative $a \geq 0$.
PosSMulReflectLT.of_pos theorem
(h₀ : ∀ a : α, 0 < a → ∀ b₁ b₂ : β, a • b₁ < a • b₂ → b₁ < b₂) : PosSMulReflectLT α β
Full source
/-- A constructor for `PosSMulReflectLT` requiring you to prove `a • b₁ < a • b₂ → b₁ < b₂` only
when `0 < a` -/
lemma PosSMulReflectLT.of_pos (h₀ : ∀ a : α, 0 < a → ∀ b₁ b₂ : β, a • b₁ < a • b₂ → b₁ < b₂) :
    PosSMulReflectLT α β where
  elim a ha b₁ b₂ h := by
    obtain ha | ha := ha.eq_or_lt
    · simp [← ha] at h
    · exact h₀ _ ha _ _ h
Reflection of Strict Inequalities under Left Scalar Multiplication by Positive Elements Implies General Case
Informal description
Let $\alpha$ and $\beta$ be types with partial orders and zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Suppose that for every positive element $a > 0$ in $\alpha$, the map $b \mapsto a \cdot b$ reflects strict inequalities in $\beta$, i.e., for any $b_1, b_2 \in \beta$, if $a \cdot b_1 < a \cdot b_2$ then $b_1 < b_2$. Then the scalar multiplication satisfies the `PosSMulReflectLT` property, meaning this reflection holds for all nonnegative $a \geq 0$.
SMulPosMono.of_pos theorem
(h₀ : ∀ b : β, 0 < b → ∀ a₁ a₂ : α, a₁ ≤ a₂ → a₁ • b ≤ a₂ • b) : SMulPosMono α β
Full source
/-- A constructor for `SMulPosMono` requiring you to prove `a₁ ≤ a₂ → a₁ • b ≤ a₂ • b` only when
`0 < b` -/
lemma SMulPosMono.of_pos (h₀ : ∀ b : β, 0 < b → ∀ a₁ a₂ : α, a₁ ≤ a₂ → a₁ • b ≤ a₂ • b) :
    SMulPosMono α β where
  elim b hb a₁ a₂ h := by
    obtain hb | hb := hb.eq_or_lt
    · simp [← hb]
    · exact h₀ _ hb _ _ h
Monotonicity of Right Scalar Multiplication by Positive Elements Implies General Case
Informal description
Let $\alpha$ and $\beta$ be partially ordered types with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Suppose that for every positive element $b > 0$ in $\beta$, the map $a \mapsto a \cdot b$ is monotone in $\alpha$, i.e., for any $a_1, a_2 \in \alpha$, if $a_1 \leq a_2$ then $a_1 \cdot b \leq a_2 \cdot b$. Then the scalar multiplication satisfies the `SMulPosMono` property, meaning this monotonicity holds for all nonnegative $b \geq 0$.
SMulPosReflectLT.of_pos theorem
(h₀ : ∀ b : β, 0 < b → ∀ a₁ a₂ : α, a₁ • b < a₂ • b → a₁ < a₂) : SMulPosReflectLT α β
Full source
/-- A constructor for `SMulPosReflectLT` requiring you to prove `a₁ • b < a₂ • b → a₁ < a₂` only
when `0 < b` -/
lemma SMulPosReflectLT.of_pos (h₀ : ∀ b : β, 0 < b → ∀ a₁ a₂ : α, a₁ • b < a₂ • b → a₁ < a₂) :
    SMulPosReflectLT α β where
  elim b hb a₁ a₂ h := by
    obtain hb | hb := hb.eq_or_lt
    · simp [← hb] at h
    · exact h₀ _ hb _ _ h
Reflection of Strict Inequalities under Right Scalar Multiplication by Positive Elements Implies General Case
Informal description
Let $\alpha$ and $\beta$ be partially ordered types with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Suppose that for every positive element $b > 0$ in $\beta$, the map $a \mapsto a \cdot b$ reflects strict inequalities in $\alpha$, i.e., for any $a_1, a_2 \in \alpha$, if $a_1 \cdot b < a_2 \cdot b$ then $a_1 < a_2$. Then the scalar multiplication satisfies the `SMulPosReflectLT` property, meaning this reflection holds for all nonnegative $b \geq 0$.
PosSMulStrictMono.toPosSMulMono instance
[PosSMulStrictMono α β] : PosSMulMono α β
Full source
instance (priority := 100) PosSMulStrictMono.toPosSMulMono [PosSMulStrictMono α β] :
    PosSMulMono α β :=
  PosSMulMono.of_pos fun _a ha ↦ (strictMono_smul_left_of_pos ha).monotone
Strict Monotonicity of Left Scalar Multiplication Implies Monotonicity
Informal description
For any partially ordered types $\alpha$ and $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, if left scalar multiplication by positive elements is strictly monotone (i.e., satisfies `PosSMulStrictMono`), then it is also monotone for nonnegative elements (i.e., satisfies `PosSMulMono`). In other words, if for all $a > 0$ in $\alpha$ and $b_1 < b_2$ in $\beta$ we have $a \cdot b_1 < a \cdot b_2$, then for all $a \geq 0$ in $\alpha$ and $b_1 \leq b_2$ in $\beta$ we have $a \cdot b_1 \leq a \cdot b_2$.
SMulPosStrictMono.toSMulPosMono instance
[SMulPosStrictMono α β] : SMulPosMono α β
Full source
instance (priority := 100) SMulPosStrictMono.toSMulPosMono [SMulPosStrictMono α β] :
    SMulPosMono α β :=
  SMulPosMono.of_pos fun _b hb ↦ (strictMono_smul_right_of_pos hb).monotone
Strict monotonicity of scalar multiplication implies monotonicity
Informal description
For any ordered types $\alpha$ and $\beta$ with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$, if the operation is strictly monotone in the left argument when the right argument is positive (i.e., satisfies `SMulPosStrictMono`), then it is also monotone in the left argument for all nonnegative right arguments (i.e., satisfies `SMulPosMono`).
PosSMulReflectLE.toPosSMulReflectLT instance
[PosSMulReflectLE α β] : PosSMulReflectLT α β
Full source
instance (priority := 100) PosSMulReflectLE.toPosSMulReflectLT [PosSMulReflectLE α β] :
    PosSMulReflectLT α β :=
  PosSMulReflectLT.of_pos fun a ha b₁ b₂ h ↦
    (le_of_smul_le_smul_of_pos_left h.le ha).lt_of_ne <| by rintro rfl; simp at h
Reflection of $\leq$ Implies Reflection of $<$ in Left Scalar Multiplication
Informal description
For types $\alpha$ and $\beta$ with partial orders and zero elements, if left scalar multiplication by positive elements reflects the order relation $\leq$ (i.e., satisfies `PosSMulReflectLE`), then it also reflects strict inequalities (i.e., satisfies `PosSMulReflectLT`). In other words, if for all $a > 0$ in $\alpha$ and $b_1, b_2$ in $\beta$, the inequality $a \cdot b_1 \leq a \cdot b_2$ implies $b_1 \leq b_2$, then for all $a \geq 0$ in $\alpha$ and $b_1, b_2$ in $\beta$, the strict inequality $a \cdot b_1 < a \cdot b_2$ implies $b_1 < b_2$.
SMulPosReflectLE.toSMulPosReflectLT instance
[SMulPosReflectLE α β] : SMulPosReflectLT α β
Full source
instance (priority := 100) SMulPosReflectLE.toSMulPosReflectLT [SMulPosReflectLE α β] :
    SMulPosReflectLT α β :=
  SMulPosReflectLT.of_pos fun b hb a₁ a₂ h ↦
    (le_of_smul_le_smul_of_pos_right h.le hb).lt_of_ne <| by rintro rfl; simp at h
Reflection of Strict Inequalities from Non-Strict Inequalities under Right Scalar Multiplication by Nonnegative Elements
Informal description
For any partially ordered types $\alpha$ and $\beta$ with zero elements and a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, if the scalar multiplication satisfies the property that for all $b > 0$ in $\beta$, the inequality $a_1 \cdot b \leq a_2 \cdot b$ implies $a_1 \leq a_2$ in $\alpha$, then it also satisfies the property that for all $b \geq 0$ in $\beta$, the strict inequality $a_1 \cdot b < a_2 \cdot b$ implies $a_1 < a_2$ in $\alpha$.
smul_eq_smul_iff_eq_and_eq_of_pos theorem
[PosSMulStrictMono α β] [SMulPosStrictMono α β] (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) (h₁ : 0 < a₁) (h₂ : 0 < b₂) : a₁ • b₁ = a₂ • b₂ ↔ a₁ = a₂ ∧ b₁ = b₂
Full source
lemma smul_eq_smul_iff_eq_and_eq_of_pos [PosSMulStrictMono α β] [SMulPosStrictMono α β]
    (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) (h₁ : 0 < a₁) (h₂ : 0 < b₂) :
    a₁ • b₁ = a₂ • b₂ ↔ a₁ = a₂ ∧ b₁ = b₂ := by
  refine ⟨fun h ↦ ?_, by rintro ⟨rfl, rfl⟩; rfl⟩
  simp only [eq_iff_le_not_lt, ha, hb, true_and]
  refine ⟨fun ha ↦ h.not_lt ?_, fun hb ↦ h.not_lt ?_⟩
  · exact (smul_le_smul_of_nonneg_left hb h₁.le).trans_lt (smul_lt_smul_of_pos_right ha h₂)
  · exact (smul_lt_smul_of_pos_left hb h₁).trans_le (smul_le_smul_of_nonneg_right ha h₂.le)
Equality of scalar products under strict monotonicity: $a_1 \cdot b_1 = a_2 \cdot b_2 \leftrightarrow a_1 = a_2 \land b_1 = b_2$
Informal description
Let $\alpha$ and $\beta$ be partially ordered types with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ satisfies `PosSMulStrictMono` (left scalar multiplication by positive elements is strictly monotone) and `SMulPosStrictMono` (scalar multiplication is strictly monotone in the left argument when the right argument is positive). For any $a_1, a_2 \in \alpha$ with $a_1 \leq a_2$ and $0 < a_1$, and any $b_1, b_2 \in \beta$ with $b_1 \leq b_2$ and $0 < b_2$, we have: \[ a_1 \cdot b_1 = a_2 \cdot b_2 \quad \text{if and only if} \quad a_1 = a_2 \text{ and } b_1 = b_2. \]
smul_eq_smul_iff_eq_and_eq_of_pos' theorem
[PosSMulStrictMono α β] [SMulPosStrictMono α β] (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) (h₂ : 0 < a₂) (h₁ : 0 < b₁) : a₁ • b₁ = a₂ • b₂ ↔ a₁ = a₂ ∧ b₁ = b₂
Full source
lemma smul_eq_smul_iff_eq_and_eq_of_pos' [PosSMulStrictMono α β] [SMulPosStrictMono α β]
    (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) (h₂ : 0 < a₂) (h₁ : 0 < b₁) :
    a₁ • b₁ = a₂ • b₂ ↔ a₁ = a₂ ∧ b₁ = b₂ := by
  refine ⟨fun h ↦ ?_, by rintro ⟨rfl, rfl⟩; rfl⟩
  simp only [eq_iff_le_not_lt, ha, hb, true_and]
  refine ⟨fun ha ↦ h.not_lt ?_, fun hb ↦ h.not_lt ?_⟩
  · exact (smul_lt_smul_of_pos_right ha h₁).trans_le (smul_le_smul_of_nonneg_left hb h₂.le)
  · exact (smul_le_smul_of_nonneg_right ha h₁.le).trans_lt (smul_lt_smul_of_pos_left hb h₂)
Equality of scalar products under strict monotonicity: $a_1 \cdot b_1 = a_2 \cdot b_2 \leftrightarrow a_1 = a_2 \land b_1 = b_2$ for $a_1 \leq a_2$, $b_1 \leq b_2$, $0 < a_2$, and $0 < b_1$
Informal description
Let $\alpha$ and $\beta$ be partially ordered types with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that: 1. Left scalar multiplication by positive elements is strictly monotone (i.e., satisfies `PosSMulStrictMono`). 2. Scalar multiplication is strictly monotone in the left argument when the right argument is positive (i.e., satisfies `SMulPosStrictMono`). For any $a_1, a_2 \in \alpha$ with $a_1 \leq a_2$ and $0 < a_2$, and any $b_1, b_2 \in \beta$ with $b_1 \leq b_2$ and $0 < b_1$, the equality $a_1 \cdot b_1 = a_2 \cdot b_2$ holds if and only if $a_1 = a_2$ and $b_1 = b_2$.
pos_and_pos_or_neg_and_neg_of_smul_pos theorem
[PosSMulMono α β] [SMulPosMono α β] (hab : 0 < a • b) : 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0
Full source
lemma pos_and_pos_or_neg_and_neg_of_smul_pos [PosSMulMono α β] [SMulPosMono α β] (hab : 0 < a • b) :
    0 < a ∧ 0 < b0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0 := by
  obtain ha | rfl | ha := lt_trichotomy a 0
  · refine Or.inr ⟨ha, lt_imp_lt_of_le_imp_le (fun hb ↦ ?_) hab⟩
    exact smul_nonpos_of_nonpos_of_nonneg ha.le hb
  · rw [zero_smul] at hab
    exact hab.false.elim
  · refine Or.inl ⟨ha, lt_imp_lt_of_le_imp_le (fun hb ↦ ?_) hab⟩
    exact smul_nonpos_of_nonneg_of_nonpos ha.le hb
Signs in Scalar Product: $0 < a \cdot b \Rightarrow (0 < a \land 0 < b) \lor (a < 0 \land b < 0)$
Informal description
Let $\alpha$ and $\beta$ be preordered types with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ satisfies `PosSMulMono` (left scalar multiplication by nonnegative elements is monotone) and `SMulPosMono` (scalar multiplication is monotone in the left argument when the right argument is nonnegative). If the scalar product $a \cdot b$ is positive ($0 < a \cdot b$), then either both $a$ and $b$ are positive ($0 < a$ and $0 < b$), or both are negative ($a < 0$ and $b < 0$).
neg_of_smul_pos_right theorem
[PosSMulMono α β] [SMulPosMono α β] (h : 0 < a • b) (ha : a ≤ 0) : b < 0
Full source
lemma neg_of_smul_pos_right [PosSMulMono α β] [SMulPosMono α β] (h : 0 < a • b) (ha : a ≤ 0) :
    b < 0 := ((pos_and_pos_or_neg_and_neg_of_smul_pos h).resolve_left fun h ↦ h.1.not_le ha).2
Negativity of right factor in positive scalar product when left factor is non-positive: $0 < a \cdot b \land a \leq 0 \Rightarrow b < 0$
Informal description
Let $\alpha$ and $\beta$ be preordered types with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ satisfies `PosSMulMono` (left scalar multiplication by nonnegative elements is monotone) and `SMulPosMono` (scalar multiplication is monotone in the left argument when the right argument is nonnegative). If the scalar product $a \cdot b$ is positive ($0 < a \cdot b$) and $a \leq 0$, then $b < 0$.
neg_of_smul_pos_left theorem
[PosSMulMono α β] [SMulPosMono α β] (h : 0 < a • b) (ha : b ≤ 0) : a < 0
Full source
lemma neg_of_smul_pos_left [PosSMulMono α β] [SMulPosMono α β] (h : 0 < a • b) (ha : b ≤ 0) :
    a < 0 := ((pos_and_pos_or_neg_and_neg_of_smul_pos h).resolve_left fun h ↦ h.2.not_le ha).1
Negativity of Left Argument in Positive Scalar Product with Nonpositive Right Argument
Informal description
Let $\alpha$ and $\beta$ be preordered types with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ satisfies `PosSMulMono` (left scalar multiplication by nonnegative elements is monotone) and `SMulPosMono` (scalar multiplication is monotone in the left argument when the right argument is nonnegative). If the scalar product $a \cdot b$ is positive ($0 < a \cdot b$) and $b \leq 0$, then $a < 0$.
neg_iff_neg_of_smul_pos theorem
[PosSMulMono α β] [SMulPosMono α β] (hab : 0 < a • b) : a < 0 ↔ b < 0
Full source
lemma neg_iff_neg_of_smul_pos [PosSMulMono α β] [SMulPosMono α β] (hab : 0 < a • b) :
    a < 0 ↔ b < 0 :=
  ⟨neg_of_smul_pos_right hab ∘ le_of_lt, neg_of_smul_pos_left hab ∘ le_of_lt⟩
Negativity Equivalence in Positive Scalar Product: $0 < a \cdot b \Rightarrow (a < 0 \leftrightarrow b < 0)$
Informal description
Let $\alpha$ and $\beta$ be preordered types with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ satisfies `PosSMulMono` (left scalar multiplication by nonnegative elements is monotone) and `SMulPosMono` (scalar multiplication is monotone in the left argument when the right argument is nonnegative). If the scalar product $a \cdot b$ is positive ($0 < a \cdot b$), then $a < 0$ if and only if $b < 0$.
neg_of_smul_neg_left' theorem
[SMulPosMono α β] (h : a • b < 0) (ha : 0 ≤ a) : b < 0
Full source
lemma neg_of_smul_neg_left' [SMulPosMono α β] (h : a • b < 0) (ha : 0 ≤ a) : b < 0 :=
  lt_of_not_ge fun hb ↦ (smul_nonneg' ha hb).not_lt h
Negativity of right argument from negative scalar product with nonnegative left argument
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosMono` (i.e., scalar multiplication is monotone in the left argument when the right argument is nonnegative), then for any $a \in \alpha$ with $0 \leq a$ and any $b \in \beta$, if $a \bullet b < 0$, then $b < 0$.
neg_of_smul_neg_right' theorem
[PosSMulMono α β] (h : a • b < 0) (hb : 0 ≤ b) : a < 0
Full source
lemma neg_of_smul_neg_right' [PosSMulMono α β] (h : a • b < 0) (hb : 0 ≤ b) : a < 0 :=
  lt_of_not_ge fun ha ↦ (smul_nonneg ha hb).not_lt h
Negativity of scalar from negativity of product when right operand is nonnegative
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \rightarrow \beta \rightarrow \beta$. If $\alpha$ satisfies `PosSMulMono` (monotonicity of left scalar multiplication by nonnegative elements), then for any $a \in \alpha$ and $b \in \beta$ with $a \cdot b < 0$ and $0 \leq b$, we have $a < 0$.
le_smul_iff_one_le_left theorem
[SMulPosMono α β] [SMulPosReflectLE α β] (hb : 0 < b) : b ≤ a • b ↔ 1 ≤ a
Full source
@[simp]
lemma le_smul_iff_one_le_left [SMulPosMono α β] [SMulPosReflectLE α β] (hb : 0 < b) :
    b ≤ a • b ↔ 1 ≤ a := Iff.trans (by rw [one_smul]) (smul_le_smul_iff_of_pos_right hb)
Inequality characterization: $b \leq a \cdot b \leftrightarrow 1 \leq a$ for positive $b$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \rightarrow \beta \rightarrow \beta$. If $\alpha$ satisfies `SMulPosMono` (monotonicity of right scalar multiplication when the right argument is nonnegative) and `SMulPosReflectLE` (reverse monotonicity when the right argument is positive), then for any positive element $b \in \beta$ (i.e., $0 < b$), the inequality $b \leq a \cdot b$ holds if and only if $1 \leq a$ in $\alpha$.
lt_smul_iff_one_lt_left theorem
[SMulPosStrictMono α β] [SMulPosReflectLT α β] (hb : 0 < b) : b < a • b ↔ 1 < a
Full source
@[simp]
lemma lt_smul_iff_one_lt_left [SMulPosStrictMono α β] [SMulPosReflectLT α β] (hb : 0 < b) :
    b < a • b ↔ 1 < a := Iff.trans (by rw [one_smul]) (smul_lt_smul_iff_of_pos_right hb)
Strict order equivalence under left scalar multiplication: $b < a \cdot b \leftrightarrow 1 < a$ for $b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \rightarrow \beta \rightarrow \beta$. If $\alpha$ satisfies strict monotonicity of left multiplication by positive elements (`SMulPosStrictMono`) and reflection of strict order under right multiplication by nonnegative elements (`SMulPosReflectLT`), then for any positive element $b \in \beta$ (i.e., $0 < b$), the inequality $b < a \cdot b$ holds if and only if $1 < a$.
smul_le_iff_le_one_left theorem
[SMulPosMono α β] [SMulPosReflectLE α β] (hb : 0 < b) : a • b ≤ b ↔ a ≤ 1
Full source
@[simp]
lemma smul_le_iff_le_one_left [SMulPosMono α β] [SMulPosReflectLE α β] (hb : 0 < b) :
    a • b ≤ b ↔ a ≤ 1 := Iff.trans (by rw [one_smul]) (smul_le_smul_iff_of_pos_right hb)
Scalar multiplication upper bound condition: $a \cdot b \leq b \leftrightarrow a \leq 1$ for $b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \rightarrow \beta \rightarrow \beta$. If $\alpha$ satisfies `SMulPosMono` (monotonicity of right scalar multiplication when the right argument is nonnegative) and `SMulPosReflectLE` (reverse monotonicity when the right argument is positive), then for any positive element $b \in \beta$ (i.e., $0 < b$), the inequality $a \cdot b \leq b$ holds if and only if $a \leq 1$ in $\alpha$.
smul_lt_iff_lt_one_left theorem
[SMulPosStrictMono α β] [SMulPosReflectLT α β] (hb : 0 < b) : a • b < b ↔ a < 1
Full source
@[simp]
lemma smul_lt_iff_lt_one_left [SMulPosStrictMono α β] [SMulPosReflectLT α β] (hb : 0 < b) :
    a • b < b ↔ a < 1 := Iff.trans (by rw [one_smul]) (smul_lt_smul_iff_of_pos_right hb)
Strict inequality under scalar multiplication with positive right argument: $a \cdot b < b \leftrightarrow a < 1$ for $b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, equipped with a scalar multiplication operation $\cdot : \alpha \rightarrow \beta \rightarrow \beta$. If $\alpha$ satisfies `SMulPosStrictMono` (strict monotonicity of left multiplication by positive elements) and `SMulPosReflectLT` (reflection of strict order under right multiplication by nonnegative elements), then for any positive element $b \in \beta$ (i.e., $0 < b$), the inequality $a \cdot b < b$ holds if and only if $a < 1$.
smul_le_of_le_one_left theorem
[SMulPosMono α β] (hb : 0 ≤ b) (h : a ≤ 1) : a • b ≤ b
Full source
lemma smul_le_of_le_one_left [SMulPosMono α β] (hb : 0 ≤ b) (h : a ≤ 1) : a • b ≤ b := by
  simpa only [one_smul] using smul_le_smul_of_nonneg_right h hb
Upper bound for scalar multiplication with left argument at most one
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosMono` (i.e., scalar multiplication is monotone in the left argument when the right argument is nonnegative), then for any $a \in \alpha$ with $a \leq 1$ and any $b \in \beta$ with $0 \leq b$, we have $a \bullet b \leq b$.
le_smul_of_one_le_left theorem
[SMulPosMono α β] (hb : 0 ≤ b) (h : 1 ≤ a) : b ≤ a • b
Full source
lemma le_smul_of_one_le_left [SMulPosMono α β] (hb : 0 ≤ b) (h : 1 ≤ a) : b ≤ a • b := by
  simpa only [one_smul] using smul_le_smul_of_nonneg_right h hb
Monotonicity of scalar multiplication with nonnegative right argument and left argument greater than or equal to one
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosMono` (i.e., scalar multiplication is monotone in the left argument when the right argument is nonnegative), then for any $b \in \beta$ with $0 \leq b$ and any $a \in \alpha$ with $1 \leq a$, we have $b \leq a \bullet b$.
smul_lt_of_lt_one_left theorem
[SMulPosStrictMono α β] (hb : 0 < b) (h : a < 1) : a • b < b
Full source
lemma smul_lt_of_lt_one_left [SMulPosStrictMono α β] (hb : 0 < b) (h : a < 1) : a • b < b := by
  simpa only [one_smul] using smul_lt_smul_of_pos_right h hb
Strict Monotonicity of Scalar Multiplication Below One: $a < 1 \Rightarrow a \bullet b < b$ for $b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosStrictMono` (i.e., scalar multiplication is strictly monotone in the left argument when the right argument is positive), then for any $a \in \alpha$ with $a < 1$ and any $b \in \beta$ with $0 < b$, we have $a \bullet b < b$.
lt_smul_of_one_lt_left theorem
[SMulPosStrictMono α β] (hb : 0 < b) (h : 1 < a) : b < a • b
Full source
lemma lt_smul_of_one_lt_left [SMulPosStrictMono α β] (hb : 0 < b) (h : 1 < a) : b < a • b := by
  simpa only [one_smul] using smul_lt_smul_of_pos_right h hb
Strict Monotonicity of Scalar Multiplication: $1 < a \Rightarrow b < a \bullet b$ for $b > 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosStrictMono` (i.e., scalar multiplication is strictly monotone in the left argument when the right argument is positive), then for any $b \in \beta$ with $0 < b$ and any $a \in \alpha$ with $1 < a$, we have $b < a \bullet b$.
PosSMulMono.toPosSMulStrictMono theorem
[PosSMulMono α β] : PosSMulStrictMono α β
Full source
lemma PosSMulMono.toPosSMulStrictMono [PosSMulMono α β] : PosSMulStrictMono α β :=
  ⟨fun _a ha _b₁ _b₂ hb ↦ (smul_le_smul_of_nonneg_left hb.le ha.le).lt_of_ne <|
    (smul_right_injective _ ha.ne').ne hb.ne⟩
Implication from Monotonicity to Strict Monotonicity in Left Scalar Multiplication
Informal description
If the scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$ is monotone in the second argument for all nonnegative scalars (i.e., $\alpha$ satisfies `PosSMulMono`), then it is strictly monotone in the second argument for all positive scalars (i.e., $\alpha$ satisfies `PosSMulStrictMono`). In other words, if for all $a \geq 0$ in $\alpha$ and $b_1 \leq b_2$ in $\beta$, we have $a \cdot b_1 \leq a \cdot b_2$, then for all $a > 0$ in $\alpha$ and $b_1 < b_2$ in $\beta$, we have $a \cdot b_1 < a \cdot b_2$.
PosSMulReflectLT.toPosSMulReflectLE instance
[PosSMulReflectLT α β] : PosSMulReflectLE α β
Full source
instance PosSMulReflectLT.toPosSMulReflectLE [PosSMulReflectLT α β] : PosSMulReflectLE α β :=
  ⟨fun _a ha _b₁ _b₂ h ↦ h.eq_or_lt.elim (fun h ↦ (smul_right_injective _ ha.ne' h).le) fun h' ↦
    (lt_of_smul_lt_smul_left h' ha.le).le⟩
Reflection of Non-Strict Inequalities under Left Scalar Multiplication by Positive Elements
Informal description
For any preorders $\alpha$ and $\beta$ with zero and a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, if left scalar multiplication by nonnegative elements reflects strict inequalities (i.e., $\alpha$ and $\beta$ satisfy `PosSMulReflectLT`), then left scalar multiplication by positive elements reflects non-strict inequalities (i.e., $\alpha$ and $\beta$ satisfy `PosSMulReflectLE`). In other words, if $a > 0$ and $a \cdot b_1 \leq a \cdot b_2$, then $b_1 \leq b_2$.
posSMulMono_iff_posSMulStrictMono theorem
: PosSMulMono α β ↔ PosSMulStrictMono α β
Full source
lemma posSMulMono_iff_posSMulStrictMono : PosSMulMonoPosSMulMono α β ↔ PosSMulStrictMono α β :=
  ⟨fun _ ↦ PosSMulMono.toPosSMulStrictMono, fun _ ↦ inferInstance⟩
Equivalence of Monotonicity and Strict Monotonicity for Left Scalar Multiplication
Informal description
For a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$ between partially ordered types $\alpha$ and $\beta$, the following are equivalent: 1. Left scalar multiplication by nonnegative elements is monotone (i.e., for all $a \geq 0$ in $\alpha$ and $b_1 \leq b_2$ in $\beta$, we have $a \cdot b_1 \leq a \cdot b_2$). 2. Left scalar multiplication by positive elements is strictly monotone (i.e., for all $a > 0$ in $\alpha$ and $b_1 < b_2$ in $\beta$, we have $a \cdot b_1 < a \cdot b_2$).
PosSMulReflectLE_iff_posSMulReflectLT theorem
: PosSMulReflectLE α β ↔ PosSMulReflectLT α β
Full source
lemma PosSMulReflectLE_iff_posSMulReflectLT : PosSMulReflectLEPosSMulReflectLE α β ↔ PosSMulReflectLT α β :=
  ⟨fun _ ↦ inferInstance, fun _ ↦ PosSMulReflectLT.toPosSMulReflectLE⟩
Equivalence of Order Reflection Properties in Left Scalar Multiplication
Informal description
For types $\alpha$ and $\beta$ with partial orders and zero elements, the following are equivalent: 1. Left scalar multiplication by positive elements reflects the order relation $\leq$ (i.e., for any $a > 0$ in $\alpha$ and $b_1, b_2$ in $\beta$, if $a \cdot b_1 \leq a \cdot b_2$, then $b_1 \leq b_2$). 2. Left scalar multiplication by nonnegative elements reflects strict inequalities (i.e., for any $a \geq 0$ in $\alpha$ and $b_1, b_2$ in $\beta$, if $a \cdot b_1 < a \cdot b_2$, then $b_1 < b_2$).
SMulPosMono.toSMulPosStrictMono theorem
[SMulPosMono α β] : SMulPosStrictMono α β
Full source
lemma SMulPosMono.toSMulPosStrictMono [SMulPosMono α β] : SMulPosStrictMono α β :=
  ⟨fun _b hb _a₁ _a₂ ha ↦ (smul_le_smul_of_nonneg_right ha.le hb.le).lt_of_ne <|
    (smul_left_injective _ hb.ne').ne ha.ne⟩
Monotonicity Implies Strict Monotonicity for Scalar Multiplication with Positive Right Argument
Informal description
If scalar multiplication in $\alpha$ is monotone in the left argument when the right argument is nonnegative (i.e., $\alpha$ satisfies `SMulPosMono`), then it is strictly monotone in the left argument when the right argument is positive (i.e., $\alpha$ satisfies `SMulPosStrictMono`).
smulPosMono_iff_smulPosStrictMono theorem
: SMulPosMono α β ↔ SMulPosStrictMono α β
Full source
lemma smulPosMono_iff_smulPosStrictMono : SMulPosMonoSMulPosMono α β ↔ SMulPosStrictMono α β :=
  ⟨fun _ ↦ SMulPosMono.toSMulPosStrictMono, fun _ ↦ inferInstance⟩
Equivalence of Monotonicity and Strict Monotonicity for Scalar Multiplication with Nonnegative Right Argument
Informal description
For ordered types $\alpha$ and $\beta$ with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$, the following are equivalent: 1. For any $b \geq 0$ in $\beta$, the operation $\bullet$ is monotone in its left argument (i.e., $a_1 \leq a_2$ implies $a_1 \bullet b \leq a_2 \bullet b$). 2. For any $b > 0$ in $\beta$, the operation $\bullet$ is strictly monotone in its left argument (i.e., $a_1 < a_2$ implies $a_1 \bullet b < a_2 \bullet b$).
SMulPosReflectLT.toSMulPosReflectLE theorem
[SMulPosReflectLT α β] : SMulPosReflectLE α β
Full source
lemma SMulPosReflectLT.toSMulPosReflectLE [SMulPosReflectLT α β] : SMulPosReflectLE α β :=
  ⟨fun _b hb _a₁ _a₂ h ↦ h.eq_or_lt.elim (fun h ↦ (smul_left_injective _ hb.ne' h).le) fun h' ↦
    (lt_of_smul_lt_smul_right h' hb.le).le⟩
Reflection of Non-Strict Inequality from Strict Reflection Property in Right Scalar Multiplication
Informal description
Let $\alpha$ and $\beta$ be preorders with zero elements, and let $\cdot : \alpha \rightarrow \beta \rightarrow \beta$ be a scalar multiplication operation. If $\beta$ satisfies the property that for any nonnegative element $b \in \beta$ (i.e., $0 \leq b$), the strict inequality $a_1 \cdot b < a_2 \cdot b$ implies $a_1 < a_2$, then $\beta$ also satisfies that for any positive element $b \in \beta$ (i.e., $0 < b$), the inequality $a_1 \cdot b \leq a_2 \cdot b$ implies $a_1 \leq a_2$.
SMulPosReflectLE_iff_smulPosReflectLT theorem
: SMulPosReflectLE α β ↔ SMulPosReflectLT α β
Full source
lemma SMulPosReflectLE_iff_smulPosReflectLT : SMulPosReflectLESMulPosReflectLE α β ↔ SMulPosReflectLT α β :=
  ⟨fun _ ↦ inferInstance, fun _ ↦ SMulPosReflectLT.toSMulPosReflectLE⟩
Equivalence of Non-Strict and Strict Reflection Properties for Right Scalar Multiplication
Informal description
For types $\alpha$ and $\beta$ with partial orders and zero elements, and a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, the following are equivalent: 1. For any positive element $b > 0$ in $\beta$, the inequality $a_1 \cdot b \leq a_2 \cdot b$ implies $a_1 \leq a_2$ in $\alpha$ (i.e., $\beta$ satisfies `SMulPosReflectLE`). 2. For any nonnegative element $b \geq 0$ in $\beta$, the strict inequality $a_1 \cdot b < a_2 \cdot b$ implies $a_1 < a_2$ in $\alpha$ (i.e., $\beta$ satisfies `SMulPosReflectLT`).
inv_smul_le_iff_of_pos theorem
[PosSMulMono α β] [PosSMulReflectLE α β] (ha : 0 < a) : a⁻¹ • b₁ ≤ b₂ ↔ b₁ ≤ a • b₂
Full source
lemma inv_smul_le_iff_of_pos [PosSMulMono α β] [PosSMulReflectLE α β] (ha : 0 < a) :
    a⁻¹a⁻¹ • b₁ ≤ b₂ ↔ b₁ ≤ a • b₂ := by rw [← smul_le_smul_iff_of_pos_left ha, smul_inv_smul₀ ha.ne']
Inequality equivalence under inverse left scalar multiplication by positive elements: $a > 0 \Rightarrow (a^{-1} \cdot b_1 \leq b_2 \leftrightarrow b_1 \leq a \cdot b_2)$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ and $\beta$ satisfy both `PosSMulMono` (left scalar multiplication by nonnegative elements is monotone) and `PosSMulReflectLE` (left scalar multiplication by positive elements reflects order). Then for any positive element $a > 0$ in $\alpha$, the inequality $a^{-1} \cdot b_1 \leq b_2$ holds if and only if $b_1 \leq a \cdot b_2$ in $\beta$.
le_inv_smul_iff_of_pos theorem
[PosSMulMono α β] [PosSMulReflectLE α β] (ha : 0 < a) : b₁ ≤ a⁻¹ • b₂ ↔ a • b₁ ≤ b₂
Full source
lemma le_inv_smul_iff_of_pos [PosSMulMono α β] [PosSMulReflectLE α β] (ha : 0 < a) :
    b₁ ≤ a⁻¹ • b₂ ↔ a • b₁ ≤ b₂ := by rw [← smul_le_smul_iff_of_pos_left ha, smul_inv_smul₀ ha.ne']
Inequality equivalence under inverse left scalar multiplication: $a > 0 \Rightarrow (b_1 \leq a^{-1} \cdot b_2 \leftrightarrow a \cdot b_1 \leq b_2)$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ and $\beta$ satisfy both `PosSMulMono` (left scalar multiplication by nonnegative elements is monotone) and `PosSMulReflectLE` (left scalar multiplication by positive elements reflects order). Then for any positive element $a > 0$ in $\alpha$, the inequality $b_1 \leq a^{-1} \cdot b_2$ holds if and only if $a \cdot b_1 \leq b_2$ in $\beta$.
inv_smul_lt_iff_of_pos theorem
[PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) : a⁻¹ • b₁ < b₂ ↔ b₁ < a • b₂
Full source
lemma inv_smul_lt_iff_of_pos [PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) :
    a⁻¹a⁻¹ • b₁ < b₂ ↔ b₁ < a • b₂ := by rw [← smul_lt_smul_iff_of_pos_left ha, smul_inv_smul₀ ha.ne']
Equivalence of strict inequalities under inverse left scalar multiplication: $a > 0 \Rightarrow (a^{-1} \cdot b_1 < b_2 \leftrightarrow b_1 < a \cdot b_2)$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. If $\alpha$ and $\beta$ satisfy both `PosSMulStrictMono` (left scalar multiplication by positive elements is strictly monotone) and `PosSMulReflectLT` (left scalar multiplication by nonnegative elements reflects strict inequalities), then for any positive element $a > 0$ in $\alpha$, the inequality $a^{-1} \cdot b_1 < b_2$ holds if and only if $b_1 < a \cdot b_2$ in $\beta$.
lt_inv_smul_iff_of_pos theorem
[PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) : b₁ < a⁻¹ • b₂ ↔ a • b₁ < b₂
Full source
lemma lt_inv_smul_iff_of_pos [PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) :
    b₁ < a⁻¹ • b₂ ↔ a • b₁ < b₂ := by rw [← smul_lt_smul_iff_of_pos_left ha, smul_inv_smul₀ ha.ne']
Inequality equivalence under inverse left scalar multiplication: $a > 0 \Rightarrow (b_1 < a^{-1} \cdot b_2 \leftrightarrow a \cdot b_1 < b_2)$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume $\alpha$ and $\beta$ satisfy both `PosSMulStrictMono` (left scalar multiplication by positive elements is strictly monotone) and `PosSMulReflectLT` (left scalar multiplication by nonnegative elements reflects strict inequalities). Then for any positive element $a > 0$ in $\alpha$, the inequality $b_1 < a^{-1} \cdot b_2$ holds if and only if $a \cdot b_1 < b_2$ in $\beta$.
OrderIso.smulRight definition
[PosSMulMono α β] [PosSMulReflectLE α β] {a : α} (ha : 0 < a) : β ≃o β
Full source
/-- Right scalar multiplication as an order isomorphism. -/
@[simps!]
def OrderIso.smulRight [PosSMulMono α β] [PosSMulReflectLE α β] {a : α} (ha : 0 < a) : β ≃o β where
  toEquiv := Equiv.smulRight ha.ne'
  map_rel_iff' := smul_le_smul_iff_of_pos_left ha
Order isomorphism induced by right scalar multiplication with a positive element
Informal description
Given a scalar multiplication operation `• : α → β → β` where `α` and `β` are preordered types, and given a positive element `a > 0` in `α`, the function `b ↦ a • b` is an order isomorphism from `β` to itself. This means that for any `b₁, b₂ ∈ β`, we have `b₁ ≤ b₂` if and only if `a • b₁ ≤ a • b₂`.
OrderDual.instPosSMulMono instance
[PosSMulMono α β] : PosSMulMono α βᵒᵈ
Full source
instance instPosSMulMono [PosSMulMono α β] : PosSMulMono α βᵒᵈ where
  elim _a ha _b₁ _b₂ hb := smul_le_smul_of_nonneg_left (β := β) hb ha
Monotonicity of Left Scalar Multiplication in the Order Dual
Informal description
For any preordered types $\alpha$ and $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, if left scalar multiplication by nonnegative elements is monotone (i.e., $\alpha$ satisfies `PosSMulMono`), then the same property holds for the order dual $\beta^{\text{op}}$. In other words, for any $a \geq 0$ in $\alpha$ and any $b_1 \leq b_2$ in $\beta^{\text{op}}$ (which means $b_2 \leq b_1$ in $\beta$), we have $a \cdot b_1 \leq a \cdot b_2$ in $\beta^{\text{op}}$.
OrderDual.instPosSMulStrictMono instance
[PosSMulStrictMono α β] : PosSMulStrictMono α βᵒᵈ
Full source
instance instPosSMulStrictMono [PosSMulStrictMono α β] : PosSMulStrictMono α βᵒᵈ where
  elim _a ha _b₁ _b₂ hb := smul_lt_smul_of_pos_left (β := β) hb ha
Strict Monotonicity of Left Scalar Multiplication Preserved Under Order Duality
Informal description
For any preordered types $\alpha$ and $\beta$ where left scalar multiplication by positive elements is strictly monotone (i.e., $a > 0$ implies $b \mapsto a \cdot b$ is strictly increasing), the same property holds for the order dual $\beta^{\text{op}}$. That is, left scalar multiplication by positive elements in $\alpha$ is strictly monotone with respect to the dual order on $\beta$.
OrderDual.instPosSMulReflectLT instance
[PosSMulReflectLT α β] : PosSMulReflectLT α βᵒᵈ
Full source
instance instPosSMulReflectLT [PosSMulReflectLT α β] : PosSMulReflectLT α βᵒᵈ where
  elim _a ha _b₁ _b₂ h := lt_of_smul_lt_smul_of_nonneg_left (β := β) h ha
Reflection of Strict Inequalities under Left Scalar Multiplication in the Order Dual
Informal description
For any type $\alpha$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$ that reflects strict inequalities under left multiplication by nonnegative elements (i.e., if $a \geq 0$ and $a \cdot b_1 < a \cdot b_2$, then $b_1 < b_2$), the same property holds for the order dual $\beta^{\text{op}}$.
OrderDual.instPosSMulReflectLE instance
[PosSMulReflectLE α β] : PosSMulReflectLE α βᵒᵈ
Full source
instance instPosSMulReflectLE [PosSMulReflectLE α β] : PosSMulReflectLE α βᵒᵈ where
  elim _a ha _b₁ _b₂ h := le_of_smul_le_smul_of_pos_left (β := β) h ha
Reflection of Order Under Left Scalar Multiplication by Positive Elements in the Order Dual
Informal description
For any type $\alpha$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$ that reflects the order relation $\leq$ when acting by positive elements (i.e., if $a > 0$ and $a \cdot b_1 \leq a \cdot b_2$ implies $b_1 \leq b_2$), the same property holds for the order dual $\beta^{\text{op}}$. In other words, left scalar multiplication by positive elements reflects the order $\leq$ in the dual order of $\beta$.
OrderDual.instSMulPosMono instance
[SMulPosMono α β] : SMulPosMono α βᵒᵈ
Full source
instance instSMulPosMono [SMulPosMono α β] : SMulPosMono α βᵒᵈ where
  elim _b hb a₁ a₂ ha := by
    rw [← neg_le_neg_iff, ← smul_neg, ← smul_neg]
    exact smul_le_smul_of_nonneg_right (β := β) ha <| neg_nonneg.2 hb
Monotonicity of Scalar Multiplication in the Order Dual
Informal description
For any preordered types $\alpha$ and $\beta$ where scalar multiplication is monotone in the left argument when the right argument is nonnegative (i.e., $\alpha$ satisfies `SMulPosMono`), the order dual $\beta^{\text{op}}$ also satisfies `SMulPosMono`. That is, for any $b \geq 0$ in $\beta^{\text{op}}$ (which means $b \leq 0$ in $\beta$), if $a_1 \leq a_2$ in $\alpha$, then $a_1 \bullet b \leq a_2 \bullet b$ in $\beta^{\text{op}}$.
OrderDual.instSMulPosStrictMono instance
[SMulPosStrictMono α β] : SMulPosStrictMono α βᵒᵈ
Full source
instance instSMulPosStrictMono [SMulPosStrictMono α β] : SMulPosStrictMono α βᵒᵈ where
  elim _b hb a₁ a₂ ha := by
    rw [← neg_lt_neg_iff, ← smul_neg, ← smul_neg]
    exact smul_lt_smul_of_pos_right (β := β) ha <| neg_pos.2 hb
Strict Monotonicity of Scalar Multiplication in the Order Dual
Informal description
For any preordered types $\alpha$ and $\beta$ where scalar multiplication is strictly monotone in the left argument when the right argument is positive (i.e., $\alpha$ satisfies `SMulPosStrictMono`), the order dual $\beta^{\text{op}}$ also satisfies `SMulPosStrictMono`. That is, for any $b > 0$ in $\beta^{\text{op}}$ (which means $b < 0$ in $\beta$), if $a_1 < a_2$ in $\alpha$, then $a_1 \bullet b < a_2 \bullet b$ in $\beta^{\text{op}}$.
OrderDual.instSMulPosReflectLT instance
[SMulPosReflectLT α β] : SMulPosReflectLT α βᵒᵈ
Full source
instance instSMulPosReflectLT [SMulPosReflectLT α β] : SMulPosReflectLT α βᵒᵈ where
  elim _b hb a₁ a₂ h := by
    rw [← neg_lt_neg_iff, ← smul_neg, ← smul_neg] at h
    exact lt_of_smul_lt_smul_right (β := β) h <| neg_nonneg.2 hb
Reflection of Strict Order under Scalar Multiplication in the Order Dual
Informal description
For any preordered types $\alpha$ and $\beta$ where scalar multiplication reflects strict order in the left argument when the right argument is nonnegative (i.e., $\alpha$ satisfies `SMulPosReflectLT`), the order dual $\beta^{\text{op}}$ also satisfies `SMulPosReflectLT`. That is, for any $b \geq 0$ in $\beta^{\text{op}}$ (which means $b \leq 0$ in $\beta$), if $a_1 \bullet b < a_2 \bullet b$ in $\beta^{\text{op}}$, then $a_1 < a_2$ in $\alpha$.
OrderDual.instSMulPosReflectLE instance
[SMulPosReflectLE α β] : SMulPosReflectLE α βᵒᵈ
Full source
instance instSMulPosReflectLE [SMulPosReflectLE α β] : SMulPosReflectLE α βᵒᵈ where
  elim _b hb a₁ a₂ h := by
    rw [← neg_le_neg_iff, ← smul_neg, ← smul_neg] at h
    exact le_of_smul_le_smul_right (β := β) h <| neg_pos.2 hb
Reverse Monotonicity of Right Scalar Multiplication by Positive Elements in Order Dual
Informal description
For any preorders $\alpha$ and $\beta$ with zero elements and a scalar multiplication operation $\cdot : \alpha \rightarrow \beta \rightarrow \beta$, if $\beta$ satisfies the property that for any positive element $b \in \beta$ (i.e., $0 < b$), the inequality $a_1 \cdot b \leq a_2 \cdot b$ implies $a_1 \leq a_2$, then the same property holds for the order dual $\beta^{\text{op}}$.
smul_add_smul_le_smul_add_smul theorem
(ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) : a₁ • b₂ + a₂ • b₁ ≤ a₁ • b₁ + a₂ • b₂
Full source
/-- Binary **rearrangement inequality**. -/
lemma smul_add_smul_le_smul_add_smul (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) :
    a₁ • b₂ + a₂ • b₁ ≤ a₁ • b₁ + a₂ • b₂ := by
  obtain ⟨a, ha₀, rfl⟩ := exists_nonneg_add_of_le ha
  rw [add_smul, add_smul, add_left_comm]
  gcongr
Rearrangement inequality for scalar multiplication: $a_1 \leq a_2 \land b_1 \leq b_2 \Rightarrow a_1 b_2 + a_2 b_1 \leq a_1 b_1 + a_2 b_2$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. For any $a_1, a_2 \in \alpha$ with $a_1 \leq a_2$ and any $b_1, b_2 \in \beta$ with $b_1 \leq b_2$, we have the inequality: $$ a_1 \cdot b_2 + a_2 \cdot b_1 \leq a_1 \cdot b_1 + a_2 \cdot b_2 $$
smul_add_smul_le_smul_add_smul' theorem
(ha : a₂ ≤ a₁) (hb : b₂ ≤ b₁) : a₁ • b₂ + a₂ • b₁ ≤ a₁ • b₁ + a₂ • b₂
Full source
/-- Binary **rearrangement inequality**. -/
lemma smul_add_smul_le_smul_add_smul' (ha : a₂ ≤ a₁) (hb : b₂ ≤ b₁) :
    a₁ • b₂ + a₂ • b₁ ≤ a₁ • b₁ + a₂ • b₂ := by
  simp_rw [add_comm (a₁ • _)]; exact smul_add_smul_le_smul_add_smul ha hb
Rearrangement inequality for scalar multiplication (dual version): $a_2 \leq a_1 \land b_2 \leq b_1 \Rightarrow a_1 b_2 + a_2 b_1 \leq a_1 b_1 + a_2 b_2$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. For any $a_1, a_2 \in \alpha$ with $a_2 \leq a_1$ and any $b_1, b_2 \in \beta$ with $b_2 \leq b_1$, we have the inequality: $$ a_1 \cdot b_2 + a_2 \cdot b_1 \leq a_1 \cdot b_1 + a_2 \cdot b_2 $$
smul_add_smul_lt_smul_add_smul theorem
(ha : a₁ < a₂) (hb : b₁ < b₂) : a₁ • b₂ + a₂ • b₁ < a₁ • b₁ + a₂ • b₂
Full source
/-- Binary strict **rearrangement inequality**. -/
lemma smul_add_smul_lt_smul_add_smul (ha : a₁ < a₂) (hb : b₁ < b₂) :
    a₁ • b₂ + a₂ • b₁ < a₁ • b₁ + a₂ • b₂ := by
  obtain ⟨a, ha₀, rfl⟩ := lt_iff_exists_pos_add.1 ha
  rw [add_smul, add_smul, add_left_comm]
  gcongr
Strict rearrangement inequality for scalar multiplication: $a_1 < a_2 \land b_1 < b_2 \Rightarrow a_1 b_2 + a_2 b_1 < a_1 b_1 + a_2 b_2$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. For any $a_1, a_2 \in \alpha$ with $a_1 < a_2$ and any $b_1, b_2 \in \beta$ with $b_1 < b_2$, we have the strict inequality: $$ a_1 \cdot b_2 + a_2 \cdot b_1 < a_1 \cdot b_1 + a_2 \cdot b_2 $$
smul_add_smul_lt_smul_add_smul' theorem
(ha : a₂ < a₁) (hb : b₂ < b₁) : a₁ • b₂ + a₂ • b₁ < a₁ • b₁ + a₂ • b₂
Full source
/-- Binary strict **rearrangement inequality**. -/
lemma smul_add_smul_lt_smul_add_smul' (ha : a₂ < a₁) (hb : b₂ < b₁) :
    a₁ • b₂ + a₂ • b₁ < a₁ • b₁ + a₂ • b₂ := by
  simp_rw [add_comm (a₁ • _)]; exact smul_add_smul_lt_smul_add_smul ha hb
Strict rearrangement inequality for scalar multiplication: $a_2 < a_1 \land b_2 < b_1 \Rightarrow a_1 b_2 + a_2 b_1 < a_1 b_1 + a_2 b_2$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. For any $a_1, a_2 \in \alpha$ with $a_2 < a_1$ and any $b_1, b_2 \in \beta$ with $b_2 < b_1$, we have the strict inequality: $$ a_1 \cdot b_2 + a_2 \cdot b_1 < a_1 \cdot b_1 + a_2 \cdot b_2 $$
smul_le_smul_of_nonpos_left theorem
(h : b₁ ≤ b₂) (ha : a ≤ 0) : a • b₂ ≤ a • b₁
Full source
lemma smul_le_smul_of_nonpos_left (h : b₁ ≤ b₂) (ha : a ≤ 0) : a • b₂ ≤ a • b₁ := by
  rw [← neg_neg a, neg_smul, neg_smul (-a), neg_le_neg_iff]
  exact smul_le_smul_of_nonneg_left h (neg_nonneg_of_nonpos ha)
Monotonicity of left scalar multiplication by nonpositive elements: $a \leq 0 \land b_1 \leq b_2 \Rightarrow a \cdot b_2 \leq a \cdot b_1$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. For any $a \in \alpha$ with $a \leq 0$ and any $b_1, b_2 \in \beta$ with $b_1 \leq b_2$, we have $a \cdot b_2 \leq a \cdot b_1$.
antitone_smul_left theorem
(ha : a ≤ 0) : Antitone ((a • ·) : β → β)
Full source
lemma antitone_smul_left (ha : a ≤ 0) : Antitone ((a • ·) : β → β) :=
  fun _ _ h ↦ smul_le_smul_of_nonpos_left h ha
Antitonicity of Left Scalar Multiplication by Nonpositive Elements
Informal description
For any scalar $a \leq 0$ in a partially ordered type $\alpha$ acting on a partially ordered type $\beta$ via scalar multiplication, the function $b \mapsto a \cdot b$ is antitone. That is, for any $b_1 \leq b_2$ in $\beta$, we have $a \cdot b_2 \leq a \cdot b_1$.
PosSMulMono.toSMulPosMono instance
: SMulPosMono α β
Full source
instance PosSMulMono.toSMulPosMono : SMulPosMono α β where
  elim _b hb a₁ a₂ ha := by rw [← sub_nonneg, ← sub_smul]; exact smul_nonneg (sub_nonneg.2 ha) hb
Monotonicity of Right Scalar Multiplication from Left Scalar Multiplication Monotonicity
Informal description
For any ordered semiring $\alpha$ and ordered additive commutative group $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, if left scalar multiplication by nonnegative elements is monotone (i.e., satisfies `PosSMulMono`), then scalar multiplication with nonnegative elements on the right is also monotone (i.e., satisfies `SMulPosMono`). In other words, if for all $a \geq 0$ in $\alpha$ and $b_1 \leq b_2$ in $\beta$ we have $a \cdot b_1 \leq a \cdot b_2$, then for all $b \geq 0$ in $\beta$ and $a_1 \leq a_2$ in $\alpha$ we have $a_1 \cdot b \leq a_2 \cdot b$.
smul_lt_smul_of_neg_left theorem
(hb : b₁ < b₂) (ha : a < 0) : a • b₂ < a • b₁
Full source
lemma smul_lt_smul_of_neg_left (hb : b₁ < b₂) (ha : a < 0) : a • b₂ < a • b₁ := by
  rw [← neg_neg a, neg_smul, neg_smul (-a), neg_lt_neg_iff]
  exact smul_lt_smul_of_pos_left hb (neg_pos_of_neg ha)
Strict antimonotonicity of left scalar multiplication: $a < 0 \land b_1 < b_2 \Rightarrow a \cdot b_2 < a \cdot b_1$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. For any $a \in \alpha$ with $a < 0$ and any $b_1, b_2 \in \beta$ with $b_1 < b_2$, we have $a \cdot b_2 < a \cdot b_1$.
strictAnti_smul_left theorem
(ha : a < 0) : StrictAnti ((a • ·) : β → β)
Full source
lemma strictAnti_smul_left (ha : a < 0) : StrictAnti ((a • ·) : β → β) :=
  fun _ _ h ↦ smul_lt_smul_of_neg_left h ha
Strict antimonotonicity of scalar multiplication by negative elements: $a < 0 \Rightarrow (b \mapsto a \cdot b)$ strictly decreasing
Informal description
For any element $a < 0$ in an ordered semiring $\alpha$ acting on an ordered additive commutative group $\beta$, the function $b \mapsto a \cdot b$ is strictly antitone. That is, for any $b_1, b_2 \in \beta$, if $b_1 < b_2$ then $a \cdot b_2 < a \cdot b_1$.
PosSMulStrictMono.toSMulPosStrictMono instance
: SMulPosStrictMono α β
Full source
instance PosSMulStrictMono.toSMulPosStrictMono : SMulPosStrictMono α β where
  elim _b hb a₁ a₂ ha := by rw [← sub_pos, ← sub_smul]; exact smul_pos (sub_pos.2 ha) hb
Strict Monotonicity of Scalar Multiplication by Positive Elements Implies Strict Monotonicity in the Left Argument for Positive Right Arguments
Informal description
If scalar multiplication by positive elements in $\alpha$ is strictly monotone in $\beta$, then scalar multiplication is also strictly monotone in $\alpha$ when the right argument in $\beta$ is positive. In other words, if for any $a > 0$ in $\alpha$ the map $b \mapsto a \cdot b$ is strictly increasing, then for any $b > 0$ in $\beta$ the map $a \mapsto a \cdot b$ is also strictly increasing.
le_of_smul_le_smul_of_neg theorem
[PosSMulReflectLE α β] (h : a • b₁ ≤ a • b₂) (ha : a < 0) : b₂ ≤ b₁
Full source
lemma le_of_smul_le_smul_of_neg [PosSMulReflectLE α β] (h : a • b₁ ≤ a • b₂) (ha : a < 0) :
    b₂ ≤ b₁ := by
  rw [← neg_neg a, neg_smul, neg_smul (-a), neg_le_neg_iff] at h
  exact le_of_smul_le_smul_of_pos_left h <| neg_pos.2 ha
Order Reflection under Left Scalar Multiplication by Negative Elements
Informal description
Let $\alpha$ and $\beta$ be ordered structures where $\alpha$ acts on $\beta$ via scalar multiplication. Suppose that $\alpha$ satisfies the `PosSMulReflectLE` property (left scalar multiplication by positive elements reflects the order relation). Then for any negative element $a < 0$ in $\alpha$ and any elements $b_1, b_2$ in $\beta$, if $a \cdot b_1 \leq a \cdot b_2$, it follows that $b_2 \leq b_1$.
lt_of_smul_lt_smul_of_nonpos theorem
[PosSMulReflectLT α β] (h : a • b₁ < a • b₂) (ha : a ≤ 0) : b₂ < b₁
Full source
lemma lt_of_smul_lt_smul_of_nonpos [PosSMulReflectLT α β] (h : a • b₁ < a • b₂) (ha : a ≤ 0) :
    b₂ < b₁ := by
  rw [← neg_neg a, neg_smul, neg_smul (-a), neg_lt_neg_iff] at h
  exact lt_of_smul_lt_smul_of_nonneg_left h (neg_nonneg_of_nonpos ha)
Reflection of Strict Inequality under Left Scalar Multiplication by Nonpositive Elements
Informal description
Let $\alpha$ and $\beta$ be ordered types with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Suppose that $\alpha$ and $\beta$ satisfy the `PosSMulReflectLT` condition, meaning that for any $a \geq 0$ in $\alpha$, the operation $b \mapsto a \cdot b$ reflects strict inequalities in $\beta$. Then for any $a \leq 0$ in $\alpha$ and any $b_1, b_2$ in $\beta$, if $a \cdot b_1 < a \cdot b_2$, it follows that $b_2 < b_1$.
smul_nonneg_of_nonpos_of_nonpos theorem
[SMulPosMono α β] (ha : a ≤ 0) (hb : b ≤ 0) : 0 ≤ a • b
Full source
lemma smul_nonneg_of_nonpos_of_nonpos [SMulPosMono α β] (ha : a ≤ 0) (hb : b ≤ 0) : 0 ≤ a • b :=
  smul_nonpos_of_nonpos_of_nonneg (β := βᵒᵈ) ha hb
Nonnegativity of scalar product with nonpositive elements under nonpositive scalar
Informal description
Let $\alpha$ and $\beta$ be preordered types with zero elements, equipped with a scalar multiplication operation $\bullet : \alpha \to \beta \to \beta$. If $\alpha$ satisfies `SMulPosMono` (i.e., scalar multiplication is monotone in the left argument when the right argument is nonnegative), then for any $a \in \alpha$ with $a \leq 0$ and any $b \in \beta$ with $b \leq 0$, we have $0 \leq a \bullet b$.
smul_le_smul_iff_of_neg_left theorem
[PosSMulMono α β] [PosSMulReflectLE α β] (ha : a < 0) : a • b₁ ≤ a • b₂ ↔ b₂ ≤ b₁
Full source
lemma smul_le_smul_iff_of_neg_left [PosSMulMono α β] [PosSMulReflectLE α β] (ha : a < 0) :
    a • b₁ ≤ a • b₂ ↔ b₂ ≤ b₁ := by
  rw [← neg_neg a, neg_smul, neg_smul (-a), neg_le_neg_iff]
  exact smul_le_smul_iff_of_pos_left (neg_pos_of_neg ha)
Order Reversal Under Left Scalar Multiplication by Negative Elements: $a < 0 \Rightarrow (a \cdot b_1 \leq a \cdot b_2 \leftrightarrow b_2 \leq b_1)$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. Assume that $\alpha$ and $\beta$ satisfy both `PosSMulMono` (left scalar multiplication by nonnegative elements is monotone) and `PosSMulReflectLE` (left scalar multiplication by positive elements reflects order). Then for any negative element $a < 0$ in $\alpha$, the inequality $a \cdot b_1 \leq a \cdot b_2$ holds if and only if $b_2 \leq b_1$ in $\beta$.
smul_lt_smul_iff_of_neg_left theorem
(ha : a < 0) : a • b₁ < a • b₂ ↔ b₂ < b₁
Full source
lemma smul_lt_smul_iff_of_neg_left (ha : a < 0) : a • b₁ < a • b₂ ↔ b₂ < b₁ := by
  rw [← neg_neg a, neg_smul, neg_smul (-a), neg_lt_neg_iff]
  exact smul_lt_smul_iff_of_pos_left (neg_pos_of_neg ha)
Strict inequality equivalence under left scalar multiplication by negative elements: $a < 0 \Rightarrow (a \cdot b_1 < a \cdot b_2 \leftrightarrow b_2 < b_1)$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. For any negative element $a < 0$ in $\alpha$, the inequality $a \cdot b_1 < a \cdot b_2$ holds if and only if $b_2 < b_1$ in $\beta$.
smul_pos_iff_of_neg_left theorem
(ha : a < 0) : 0 < a • b ↔ b < 0
Full source
lemma smul_pos_iff_of_neg_left (ha : a < 0) : 0 < a • b ↔ b < 0 := by
  simpa only [smul_zero] using smul_lt_smul_iff_of_neg_left ha (b₁ := (0 : β))
Positivity under left scalar multiplication by negative elements: $a < 0 \Rightarrow (0 < a \cdot b \leftrightarrow b < 0)$
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, equipped with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. For any negative element $a < 0$ in $\alpha$, the inequality $0 < a \cdot b$ holds if and only if $b < 0$ in $\beta$.
smul_neg_iff_of_neg_left theorem
(ha : a < 0) : a • b < 0 ↔ 0 < b
Full source
lemma smul_neg_iff_of_neg_left (ha : a < 0) : a • b < 0 ↔ 0 < b := by
  simpa only [smul_zero] using smul_lt_smul_iff_of_neg_left ha (b₂ := (0 : β))
Negation of scalar product by negative element: $a < 0 \Rightarrow (a \cdot b < 0 \leftrightarrow b > 0)$
Informal description
For any element $a < 0$ in a preordered type $\alpha$ with zero, and any element $b$ in a preordered type $\beta$ with zero, the inequality $a \cdot b < 0$ holds if and only if $0 < b$.
smul_max_of_nonpos theorem
(ha : a ≤ 0) (b₁ b₂ : β) : a • max b₁ b₂ = min (a • b₁) (a • b₂)
Full source
lemma smul_max_of_nonpos (ha : a ≤ 0) (b₁ b₂ : β) : a • max b₁ b₂ = min (a • b₁) (a • b₂) :=
  (antitone_smul_left ha : Antitone (_ : β → β)).map_max
Scalar Multiplication of Maximum by Nonpositive Scalar Yields Minimum of Scalar Multiplications
Informal description
For any scalar $a \leq 0$ in a partially ordered type $\alpha$ acting on a partially ordered type $\beta$ via scalar multiplication, and for any elements $b_1, b_2 \in \beta$, the scalar multiplication of $a$ with the maximum of $b_1$ and $b_2$ equals the minimum of the scalar multiplications $a \cdot b_1$ and $a \cdot b_2$. That is: $$ a \cdot \max(b_1, b_2) = \min(a \cdot b_1, a \cdot b_2) $$
smul_min_of_nonpos theorem
(ha : a ≤ 0) (b₁ b₂ : β) : a • min b₁ b₂ = max (a • b₁) (a • b₂)
Full source
lemma smul_min_of_nonpos (ha : a ≤ 0) (b₁ b₂ : β) : a • min b₁ b₂ = max (a • b₁) (a • b₂) :=
  (antitone_smul_left ha : Antitone (_ : β → β)).map_min
Scalar Multiplication of Minimum by Nonpositive Elements Yields Maximum of Scalar Multiplications
Informal description
For any scalar $a \leq 0$ in a partially ordered type $\alpha$ acting on a partially ordered type $\beta$ via scalar multiplication, and for any elements $b_1, b_2 \in \beta$, the scalar multiplication of $a$ with the minimum of $b_1$ and $b_2$ equals the maximum of the scalar multiplications $a \cdot b_1$ and $a \cdot b_2$. That is, $a \cdot \min(b_1, b_2) = \max(a \cdot b_1, a \cdot b_2)$.
nonneg_and_nonneg_or_nonpos_and_nonpos_of_smul_nonneg theorem
(hab : 0 ≤ a • b) : 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0
Full source
lemma nonneg_and_nonneg_or_nonpos_and_nonpos_of_smul_nonneg (hab : 0 ≤ a • b) :
    0 ≤ a ∧ 0 ≤ b0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0 := by
  simp only [Decidable.or_iff_not_not_and_not, not_and, not_le]
  refine fun ab nab ↦ hab.not_lt ?_
  obtain ha | rfl | ha := lt_trichotomy 0 a
  exacts [smul_neg_of_pos_of_neg ha (ab ha.le), ((ab le_rfl).asymm (nab le_rfl)).elim,
    smul_neg_of_neg_of_pos ha (nab ha.le)]
Nonnegativity of Scalar Product Implies Nonnegative or Nonpositive Factors: $0 \leq a \cdot b \Rightarrow (0 \leq a \land 0 \leq b) \lor (a \leq 0 \land b \leq 0)$
Informal description
For any elements $a$ in a preordered type $\alpha$ and $b$ in a preordered type $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, if $0 \leq a \cdot b$, then either both $0 \leq a$ and $0 \leq b$ hold, or both $a \leq 0$ and $b \leq 0$ hold.
smul_nonneg_iff theorem
: 0 ≤ a • b ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0
Full source
lemma smul_nonneg_iff : 0 ≤ a • b ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0 :=
  ⟨nonneg_and_nonneg_or_nonpos_and_nonpos_of_smul_nonneg,
    fun h ↦ h.elim (and_imp.2 smul_nonneg) (and_imp.2 smul_nonneg_of_nonpos_of_nonpos)⟩
Characterization of Nonnegative Scalar Products: $0 \leq a \cdot b \iff (0 \leq a \land 0 \leq b) \lor (a \leq 0 \land b \leq 0)$
Informal description
For any elements $a$ in a preordered type $\alpha$ and $b$ in a preordered type $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, the scalar product $a \cdot b$ is nonnegative if and only if either both $a$ and $b$ are nonnegative, or both $a$ and $b$ are nonpositive. That is, $$0 \leq a \cdot b \iff (0 \leq a \land 0 \leq b) \lor (a \leq 0 \land b \leq 0).$$
smul_nonpos_iff theorem
: a • b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b
Full source
lemma smul_nonpos_iff : a • b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b := by
  rw [← neg_nonneg, ← smul_neg, smul_nonneg_iff, neg_nonneg, neg_nonpos]
Characterization of Nonpositive Scalar Products: $a \cdot b \leq 0 \iff (0 \leq a \land b \leq 0) \lor (a \leq 0 \land 0 \leq b)$
Informal description
For any elements $a$ in a preordered type $\alpha$ and $b$ in a preordered type $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, the scalar product $a \cdot b$ is nonpositive if and only if either $0 \leq a$ and $b \leq 0$, or $a \leq 0$ and $0 \leq b$. That is, $$a \cdot b \leq 0 \iff (0 \leq a \land b \leq 0) \lor (a \leq 0 \land 0 \leq b).$$
smul_nonneg_iff_pos_imp_nonneg theorem
: 0 ≤ a • b ↔ (0 < a → 0 ≤ b) ∧ (0 < b → 0 ≤ a)
Full source
lemma smul_nonneg_iff_pos_imp_nonneg : 0 ≤ a • b ↔ (0 < a → 0 ≤ b) ∧ (0 < b → 0 ≤ a) :=
  smul_nonneg_iff.trans <| by
    simp_rw [← not_le, ← or_iff_not_imp_left]; have := le_total a 0; have := le_total b 0; tauto
Nonnegativity of Scalar Product via Positive Implications: $0 \leq a \cdot b \iff (a > 0 \to b \geq 0) \land (b > 0 \to a \geq 0)$
Informal description
For any elements $a$ in a preordered type $\alpha$ and $b$ in a preordered type $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, the scalar product $a \cdot b$ is nonnegative if and only if both of the following hold: 1. If $a > 0$, then $b \geq 0$; 2. If $b > 0$, then $a \geq 0$. In other words, $$0 \leq a \cdot b \iff (0 < a \to 0 \leq b) \land (0 < b \to 0 \leq a).$$
smul_nonneg_iff_neg_imp_nonpos theorem
: 0 ≤ a • b ↔ (a < 0 → b ≤ 0) ∧ (b < 0 → a ≤ 0)
Full source
lemma smul_nonneg_iff_neg_imp_nonpos : 0 ≤ a • b ↔ (a < 0 → b ≤ 0) ∧ (b < 0 → a ≤ 0) := by
  rw [← neg_smul_neg, smul_nonneg_iff_pos_imp_nonneg]; simp only [neg_pos, neg_nonneg]
Nonnegativity of Scalar Product via Negative Implications: $0 \leq a \cdot b \iff (a < 0 \to b \leq 0) \land (b < 0 \to a \leq 0)$
Informal description
For any elements $a$ in a preordered type $\alpha$ and $b$ in a preordered type $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, the scalar product $a \cdot b$ is nonnegative if and only if both of the following hold: 1. If $a < 0$, then $b \leq 0$; 2. If $b < 0$, then $a \leq 0$. In other words, $$0 \leq a \cdot b \iff (a < 0 \to b \leq 0) \land (b < 0 \to a \leq 0).$$
smul_nonpos_iff_pos_imp_nonpos theorem
: a • b ≤ 0 ↔ (0 < a → b ≤ 0) ∧ (b < 0 → 0 ≤ a)
Full source
lemma smul_nonpos_iff_pos_imp_nonpos : a • b ≤ 0 ↔ (0 < a → b ≤ 0) ∧ (b < 0 → 0 ≤ a) := by
  rw [← neg_nonneg, ← smul_neg, smul_nonneg_iff_pos_imp_nonneg]; simp only [neg_pos, neg_nonneg]
Nonpositivity of Scalar Product via Positive Implications: $a \cdot b \leq 0 \iff (a > 0 \to b \leq 0) \land (b < 0 \to a \geq 0)$
Informal description
For any elements $a$ in a preordered type $\alpha$ and $b$ in a preordered type $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, the scalar product $a \cdot b$ is nonpositive if and only if both of the following hold: 1. If $a > 0$, then $b \leq 0$; 2. If $b < 0$, then $a \geq 0$. In other words, $$a \cdot b \leq 0 \iff (0 < a \to b \leq 0) \land (b < 0 \to 0 \leq a).$$
smul_nonpos_iff_neg_imp_nonneg theorem
: a • b ≤ 0 ↔ (a < 0 → 0 ≤ b) ∧ (0 < b → a ≤ 0)
Full source
lemma smul_nonpos_iff_neg_imp_nonneg : a • b ≤ 0 ↔ (a < 0 → 0 ≤ b) ∧ (0 < b → a ≤ 0) := by
  rw [← neg_nonneg, ← neg_smul, smul_nonneg_iff_pos_imp_nonneg]; simp only [neg_pos, neg_nonneg]
Nonpositivity of Scalar Product via Negative and Positive Implications: $a \cdot b \leq 0 \iff (a < 0 \to b \geq 0) \land (b > 0 \to a \leq 0)$
Informal description
For any elements $a$ in a preordered type $\alpha$ and $b$ in a preordered type $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, the scalar product $a \cdot b$ is nonpositive if and only if both of the following hold: 1. If $a < 0$, then $b \geq 0$; 2. If $b > 0$, then $a \leq 0$. In other words, $$a \cdot b \leq 0 \iff (a < 0 \to 0 \leq b) \land (0 < b \to a \leq 0).$$
PosSMulMono.toPosSMulReflectLE instance
[MulAction α β] [PosSMulMono α β] : PosSMulReflectLE α β
Full source
instance (priority := 100) PosSMulMono.toPosSMulReflectLE [MulAction α β] [PosSMulMono α β] :
    PosSMulReflectLE α β where
  elim _a ha b₁ b₂ h := by
    simpa [ha.ne'] using smul_le_smul_of_nonneg_left h <| inv_nonneg.2 ha.le
Monotonicity of Left Scalar Multiplication Implies Order Reflection for Positive Scalars
Informal description
For any type $\alpha$ acting on a type $\beta$ via scalar multiplication, if left scalar multiplication by nonnegative elements is monotone (i.e., $a \geq 0$ and $b_1 \leq b_2$ implies $a \cdot b_1 \leq a \cdot b_2$), then left scalar multiplication by positive elements reflects the order (i.e., $a > 0$ and $a \cdot b_1 \leq a \cdot b_2$ implies $b_1 \leq b_2$).
PosSMulStrictMono.toPosSMulReflectLT instance
[MulActionWithZero α β] [PosSMulStrictMono α β] : PosSMulReflectLT α β
Full source
instance (priority := 100) PosSMulStrictMono.toPosSMulReflectLT [MulActionWithZero α β]
    [PosSMulStrictMono α β] : PosSMulReflectLT α β :=
  PosSMulReflectLT.of_pos fun a ha b₁ b₂ h ↦ by
    simpa [ha.ne'] using smul_lt_smul_of_pos_left h <| inv_pos.2 ha
Reflection of Strict Inequalities under Left Scalar Multiplication by Nonnegative Elements from Strict Monotonicity
Informal description
For any types $\alpha$ and $\beta$ with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$, if $\alpha$ and $\beta$ are equipped with partial orders and zero elements, and if left scalar multiplication by positive elements is strictly monotone (i.e., $a > 0$ and $b_1 < b_2$ implies $a \cdot b_1 < a \cdot b_2$), then left scalar multiplication by nonnegative elements reflects strict inequalities (i.e., $a \geq 0$ and $a \cdot b_1 < a \cdot b_2$ implies $b_1 < b_2$).
inv_smul_le_iff_of_neg theorem
(h : a < 0) : a⁻¹ • b₁ ≤ b₂ ↔ a • b₂ ≤ b₁
Full source
lemma inv_smul_le_iff_of_neg (h : a < 0) : a⁻¹a⁻¹ • b₁ ≤ b₂ ↔ a • b₂ ≤ b₁ := by
  rw [← smul_le_smul_iff_of_neg_left h, smul_inv_smul₀ h.ne]
Order Reversal Under Scalar Multiplication by Negative Elements: $a^{-1} \cdot b_1 \leq b_2 \leftrightarrow a \cdot b_2 \leq b_1$
Informal description
Let $\alpha$ and $\beta$ be ordered structures with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. For any negative scalar $a < 0$ in $\alpha$, the inequality $a^{-1} \cdot b_1 \leq b_2$ holds if and only if $a \cdot b_2 \leq b_1$ holds in $\beta$.
smul_inv_le_iff_of_neg theorem
(h : a < 0) : b₁ ≤ a⁻¹ • b₂ ↔ b₂ ≤ a • b₁
Full source
lemma smul_inv_le_iff_of_neg (h : a < 0) : b₁ ≤ a⁻¹ • b₂ ↔ b₂ ≤ a • b₁ := by
  rw [← smul_le_smul_iff_of_neg_left h, smul_inv_smul₀ h.ne]
Order Reversal Under Scalar Multiplication by Negative Elements: $b_1 \leq a^{-1} \cdot b_2 \leftrightarrow b_2 \leq a \cdot b_1$ for $a < 0$
Informal description
Let $\alpha$ and $\beta$ be preorders with a scalar multiplication operation $\cdot : \alpha \to \beta \to \beta$. For any negative element $a < 0$ in $\alpha$, the inequality $b_1 \leq a^{-1} \cdot b_2$ holds if and only if $b_2 \leq a \cdot b_1$ in $\beta$.
OrderIso.smulRightDual definition
(ha : a < 0) : β ≃o βᵒᵈ
Full source
/-- Left scalar multiplication as an order isomorphism. -/
@[simps!]
def OrderIso.smulRightDual (ha : a < 0) : β ≃o βᵒᵈ where
  toEquiv := (Equiv.smulRight ha.ne).trans toDual
  map_rel_iff' := (@OrderDual.toDual_le_toDual β).trans <| smul_le_smul_iff_of_neg_left ha
Order isomorphism induced by negative scalar multiplication
Informal description
For a negative scalar $a < 0$ in an ordered scalar action, the map $b \mapsto a \cdot b$ induces an order isomorphism between $\beta$ and its order dual $\beta^{\text{op}}$. This means that for any $b_1, b_2 \in \beta$, we have $b_1 \leq b_2$ in $\beta$ if and only if $a \cdot b_2 \leq a \cdot b_1$ in $\beta^{\text{op}}$.
inv_smul_lt_iff_of_neg theorem
(h : a < 0) : a⁻¹ • b₁ < b₂ ↔ a • b₂ < b₁
Full source
lemma inv_smul_lt_iff_of_neg (h : a < 0) : a⁻¹a⁻¹ • b₁ < b₂ ↔ a • b₂ < b₁ := by
  rw [← smul_lt_smul_iff_of_neg_left h, smul_inv_smul₀ h.ne]
Inequality equivalence under inverse scalar multiplication by negative elements: $a^{-1} \cdot b_1 < b_2 \leftrightarrow a \cdot b_2 < b_1$ for $a < 0$
Informal description
For any negative scalar $a < 0$ in an ordered scalar action, the inequality $a^{-1} \cdot b_1 < b_2$ holds if and only if $a \cdot b_2 < b_1$.
smul_inv_lt_iff_of_neg theorem
(h : a < 0) : b₁ < a⁻¹ • b₂ ↔ b₂ < a • b₁
Full source
lemma smul_inv_lt_iff_of_neg (h : a < 0) : b₁ < a⁻¹ • b₂ ↔ b₂ < a • b₁ := by
  rw [← smul_lt_smul_iff_of_neg_left h, smul_inv_smul₀ h.ne]
Inequality equivalence under scalar multiplication by negative inverse: $a < 0 \Rightarrow (b_1 < a^{-1} \cdot b_2 \leftrightarrow b_2 < a \cdot b_1)$
Informal description
For any negative scalar $a < 0$ in an ordered scalar action, the inequality $b_1 < a^{-1} \cdot b_2$ holds if and only if $b_2 < a \cdot b_1$.
Pi.instPosSMulMono instance
[∀ i, PosSMulMono α (β i)] : PosSMulMono α (∀ i, β i)
Full source
instance instPosSMulMono [∀ i, PosSMulMono α (β i)] : PosSMulMono α (∀ i, β i) where
  elim _a ha _b₁ _b₂ hb i := smul_le_smul_of_nonneg_left (hb i) ha
Monotonicity of Pointwise Scalar Multiplication by Nonnegative Elements in Function Spaces
Informal description
For any family of types $\beta_i$ each equipped with a preorder structure and a scalar multiplication operation $\cdot : \alpha \to \beta_i \to \beta_i$, if for each $i$, the scalar multiplication by nonnegative elements in $\alpha$ is monotone in $\beta_i$ (i.e., $\alpha$ and $\beta_i$ satisfy the `PosSMulMono` condition), then the pointwise scalar multiplication on the function space $\forall i, \beta_i$ also satisfies the `PosSMulMono` condition. In other words, for any $a \geq 0$ in $\alpha$ and any functions $f, g : \forall i, \beta_i$, if $f(i) \leq g(i)$ for all $i$, then $(a \cdot f)(i) \leq (a \cdot g)(i)$ for all $i$.
Pi.instSMulPosMono instance
[∀ i, SMulPosMono α (β i)] : SMulPosMono α (∀ i, β i)
Full source
instance instSMulPosMono [∀ i, SMulPosMono α (β i)] : SMulPosMono α (∀ i, β i) where
  elim _b hb _a₁ _a₂ ha i := smul_le_smul_of_nonneg_right ha (hb i)
Monotonicity of Pointwise Scalar Multiplication with Nonnegative Right Argument in Function Spaces
Informal description
For any family of types $\beta_i$ each equipped with a preorder structure and a scalar multiplication operation $\cdot : \alpha \to \beta_i \to \beta_i$, if for each $i$, the scalar multiplication by nonnegative elements in $\beta_i$ is monotone in the left argument (i.e., $\alpha$ and $\beta_i$ satisfy the `SMulPosMono` condition), then the pointwise scalar multiplication on the function space $\forall i, \beta_i$ also satisfies the `SMulPosMono` condition. In other words, for any $b \geq 0$ in $\beta_i$ and any functions $f, g : \forall i, \alpha$ with $f \leq g$, we have $f(i) \cdot b \leq g(i) \cdot b$ for all $i$.
Pi.instPosSMulReflectLE instance
[∀ i, PosSMulReflectLE α (β i)] : PosSMulReflectLE α (∀ i, β i)
Full source
instance instPosSMulReflectLE [∀ i, PosSMulReflectLE α (β i)] : PosSMulReflectLE α (∀ i, β i) where
  elim _a ha _b₁ _b₂ h i := le_of_smul_le_smul_left (h i) ha
Reflection of Order under Pointwise Scalar Multiplication by Positive Elements
Informal description
For any family of types $\beta_i$ each equipped with a preorder structure and a scalar multiplication operation $\cdot : \alpha \to \beta_i \to \beta_i$, if for each $i$, the scalar multiplication by positive elements in $\alpha$ reflects the order relation $\leq$ on $\beta_i$ (i.e., $\alpha$ and $\beta_i$ satisfy the `PosSMulReflectLE` condition), then the pointwise scalar multiplication on the function space $\forall i, \beta_i$ also satisfies the `PosSMulReflectLE` condition. In other words, for any $a > 0$ in $\alpha$ and any functions $f, g : \forall i, \beta_i$, if $a \cdot f(i) \leq a \cdot g(i)$ for all $i$, then $f(i) \leq g(i)$ for all $i$.
Pi.instSMulPosReflectLE instance
[∀ i, SMulPosReflectLE α (β i)] : SMulPosReflectLE α (∀ i, β i)
Full source
instance instSMulPosReflectLE [∀ i, SMulPosReflectLE α (β i)] : SMulPosReflectLE α (∀ i, β i) where
  elim _b hb _a₁ _a₂ h := by
    obtain ⟨-, i, hi⟩ := lt_def.1 hb; exact le_of_smul_le_smul_right (h _) hi
Reflection of Order under Pointwise Right Scalar Multiplication by Positive Elements in Function Spaces
Informal description
For any family of types $\beta_i$ each equipped with a preorder structure and a scalar multiplication operation $\cdot : \alpha \to \beta_i \to \beta_i$, if for each $i$, the scalar multiplication by positive elements in $\beta_i$ reflects the order relation $\leq$ on $\alpha$ (i.e., $\alpha$ and $\beta_i$ satisfy the `SMulPosReflectLE` condition), then the pointwise scalar multiplication on the function space $\forall i, \beta_i$ also satisfies the `SMulPosReflectLE` condition. In other words, for any $b > 0$ in $\beta_i$ and any functions $f, g : \forall i, \alpha$, if $f(i) \cdot b \leq g(i) \cdot b$ for all $i$, then $f(i) \leq g(i)$ for all $i$.
Pi.instPosSMulStrictMono instance
[∀ i, PosSMulStrictMono α (β i)] : PosSMulStrictMono α (∀ i, β i)
Full source
instance instPosSMulStrictMono [∀ i, PosSMulStrictMono α (β i)] :
    PosSMulStrictMono α (∀ i, β i) where
  elim := by
    simp_rw [lt_def]
    rintro _a ha _b₁ _b₂ ⟨hb, i, hi⟩
    exact ⟨smul_le_smul_of_nonneg_left hb ha.le, i, smul_lt_smul_of_pos_left hi ha⟩
Strict Monotonicity of Pointwise Scalar Multiplication by Positive Elements in Function Spaces
Informal description
For any family of types $\beta_i$ each equipped with a scalar multiplication operation $\cdot : \alpha \to \beta_i \to \beta_i$, if for each $i$, left scalar multiplication by positive elements in $\alpha$ is strictly monotone in $\beta_i$ (i.e., satisfies `PosSMulStrictMono`), then the pointwise scalar multiplication on the function space $\forall i, \beta_i$ also satisfies the `PosSMulStrictMono` condition. In other words, for any $a > 0$ in $\alpha$ and any functions $f, g : \forall i, \beta_i$, if $f(i) < g(i)$ for all $i$, then $(a \cdot f)(i) < (a \cdot g)(i)$ for all $i$.
Pi.instSMulPosStrictMono instance
[∀ i, SMulPosStrictMono α (β i)] : SMulPosStrictMono α (∀ i, β i)
Full source
instance instSMulPosStrictMono [∀ i, SMulPosStrictMono α (β i)] :
    SMulPosStrictMono α (∀ i, β i) where
  elim := by
    simp_rw [lt_def]
    rintro a ⟨ha, i, hi⟩ _b₁ _b₂ hb
    exact ⟨smul_le_smul_of_nonneg_right hb.le ha, i, smul_lt_smul_of_pos_right hb hi⟩
Strict Monotonicity of Pointwise Scalar Multiplication with Positive Right Argument in Function Spaces
Informal description
For any family of types $\beta_i$ each equipped with a preorder and a scalar multiplication operation $\cdot : \alpha \to \beta_i \to \beta_i$, if for each $i$, the scalar multiplication is strictly monotone in the left argument when the right argument is positive (i.e., satisfies `SMulPosStrictMono`), then the pointwise scalar multiplication on the function space $\forall i, \beta_i$ also satisfies `SMulPosStrictMono`. In other words, for any $b > 0$ in $\beta_i$ and any functions $f, g : \forall i, \alpha$ with $f < g$, we have $f(i) \cdot b < g(i) \cdot b$ for all $i$.
Pi.instSMulPosReflectLT instance
[∀ i, SMulPosReflectLT α (β i)] : SMulPosReflectLT α (∀ i, β i)
Full source
instance instSMulPosReflectLT [∀ i, SMulPosReflectLT α (β i)] : SMulPosReflectLT α (∀ i, β i) where
  elim := by
    simp_rw [lt_def]
    rintro b hb _a₁ _a₂ ⟨-, i, hi⟩
    exact lt_of_smul_lt_smul_right hi <| hb _
Reflection of Strict Order Under Right Scalar Multiplication in Function Spaces
Informal description
For any family of types $\beta_i$ each equipped with a scalar multiplication operation $\cdot : \alpha \rightarrow \beta_i \rightarrow \beta_i$ that reflects strict order under right multiplication by nonnegative elements (i.e., for each $i$, if $0 \leq b_i$ and $a_1 \cdot b_i < a_2 \cdot b_i$, then $a_1 < a_2$), the function space $\forall i, \beta_i$ inherits this property: for any $f$ in the function space with $0 \leq f(i)$ for all $i$, if $a_1 \cdot f < a_2 \cdot f$ pointwise, then $a_1 < a_2$.
PosSMulMono.lift theorem
[PosSMulMono α γ] (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂) (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulMono α β
Full source
lemma PosSMulMono.lift [PosSMulMono α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulMono α β where
  elim a ha b₁ b₂ hb := by simp only [← hf, smul] at *; exact smul_le_smul_of_nonneg_left hb ha
Lifting of Monotonicity of Left Scalar Multiplication via Order-Reflecting Map
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, and let $\gamma$ be another preorder with zero. Suppose there exists a function $f : \beta \to \gamma$ such that: 1. $f$ is order-reflecting, i.e., for any $b_1, b_2 \in \beta$, $f(b_1) \leq f(b_2)$ if and only if $b_1 \leq b_2$. 2. $f$ preserves scalar multiplication, i.e., for any $a \in \alpha$ and $b \in \beta$, $f(a \cdot b) = a \cdot f(b)$. If left scalar multiplication by nonnegative elements in $\alpha$ is monotone for $\gamma$ (i.e., $\alpha$ and $\gamma$ satisfy `PosSMulMono`), then left scalar multiplication by nonnegative elements in $\alpha$ is also monotone for $\beta$.
PosSMulStrictMono.lift theorem
[PosSMulStrictMono α γ] (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂) (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulStrictMono α β
Full source
lemma PosSMulStrictMono.lift [PosSMulStrictMono α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulStrictMono α β where
  elim a ha b₁ b₂ hb := by
    simp only [← lt_iff_lt_of_le_iff_le' hf hf, smul] at *; exact smul_lt_smul_of_pos_left hb ha
Lifting of Strict Monotonicity of Left Scalar Multiplication via Order-Reflecting Homomorphism
Informal description
Let $\alpha$ and $\gamma$ be preorders with zero, and let $\beta$ be another preorder with zero. Suppose there exists a function $f : \beta \to \gamma$ such that: 1. $f$ is order-reflecting, i.e., for any $b_1, b_2 \in \beta$, $f(b_1) \leq f(b_2)$ if and only if $b_1 \leq b_2$. 2. $f$ preserves scalar multiplication, i.e., for any $a \in \alpha$ and $b \in \beta$, $f(a \cdot b) = a \cdot f(b)$. If left scalar multiplication by positive elements is strictly monotone in $\gamma$ (i.e., $\alpha$ and $\gamma$ satisfy `PosSMulStrictMono`), then left scalar multiplication by positive elements is also strictly monotone in $\beta$.
PosSMulReflectLE.lift theorem
[PosSMulReflectLE α γ] (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂) (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulReflectLE α β
Full source
lemma PosSMulReflectLE.lift [PosSMulReflectLE α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulReflectLE α β where
  elim a ha b₁ b₂ h := hf.1 <| le_of_smul_le_smul_left (by simpa only [smul] using hf.2 h) ha
Lifting of Order Reflection under Left Scalar Multiplication via Order-Reflecting Map
Informal description
Let $\alpha$ and $\beta$ be preorders with zero, and let $\gamma$ be another preorder with zero. Given a function $f : \beta \to \gamma$ that is order-reflecting (i.e., $f(b_1) \leq f(b_2)$ if and only if $b_1 \leq b_2$ for any $b_1, b_2 \in \beta$) and preserves scalar multiplication (i.e., $f(a \cdot b) = a \cdot f(b)$ for any $a \in \alpha$ and $b \in \beta$), if $\alpha$ and $\gamma$ satisfy the `PosSMulReflectLE` condition, then $\alpha$ and $\beta$ also satisfy the `PosSMulReflectLE` condition.
PosSMulReflectLT.lift theorem
[PosSMulReflectLT α γ] (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂) (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulReflectLT α β
Full source
lemma PosSMulReflectLT.lift [PosSMulReflectLT α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulReflectLT α β where
  elim a ha b₁ b₂ h := by
    simp only [← lt_iff_lt_of_le_iff_le' hf hf, smul] at *; exact lt_of_smul_lt_smul_left h ha
Lifting of Strict Inequality Reflection under Left Scalar Multiplication via Order-Reflecting Homomorphism
Informal description
Let $\alpha$ and $\gamma$ be preorders with zero, and let $\beta$ be another preorder with zero. Suppose there exists a function $f : \beta \to \gamma$ such that: 1. $f$ is order-reflecting, i.e., for any $b_1, b_2 \in \beta$, $f(b_1) \leq f(b_2)$ if and only if $b_1 \leq b_2$. 2. $f$ preserves scalar multiplication, i.e., for any $a \in \alpha$ and $b \in \beta$, $f(a \cdot b) = a \cdot f(b)$. If $\alpha$ and $\gamma$ satisfy the `PosSMulReflectLT` condition (i.e., left scalar multiplication by nonnegative elements reflects strict inequalities), then $\alpha$ and $\beta$ also satisfy the `PosSMulReflectLT` condition.
SMulPosMono.lift theorem
[SMulPosMono α γ] (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂) (smul : ∀ (a : α) b, f (a • b) = a • f b) (zero : f 0 = 0) : SMulPosMono α β
Full source
lemma SMulPosMono.lift [SMulPosMono α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b)
    (zero : f 0 = 0) : SMulPosMono α β where
  elim b hb a₁ a₂ ha := by
    simp only [← hf, zero, smul] at *; exact smul_le_smul_of_nonneg_right ha hb
Lifting of Monotonicity in Left Scalar Multiplication via Order-Reflecting Homomorphism
Informal description
Let $\alpha$, $\beta$, and $\gamma$ be preorders with zero elements, and let $f : \beta \to \gamma$ be a function such that: 1. For any $b_1, b_2 \in \beta$, $f(b_1) \leq f(b_2)$ if and only if $b_1 \leq b_2$; 2. For any $a \in \alpha$ and $b \in \beta$, $f(a \cdot b) = a \cdot f(b)$; 3. $f(0) = 0$. If scalar multiplication in $\alpha$ and $\gamma$ is monotone in the left argument when the right argument is nonnegative (i.e., $\alpha$ and $\gamma$ satisfy `SMulPosMono`), then scalar multiplication in $\alpha$ and $\beta$ also satisfies this monotonicity property.
SMulPosStrictMono.lift theorem
[SMulPosStrictMono α γ] (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂) (smul : ∀ (a : α) b, f (a • b) = a • f b) (zero : f 0 = 0) : SMulPosStrictMono α β
Full source
lemma SMulPosStrictMono.lift [SMulPosStrictMono α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b)
    (zero : f 0 = 0) : SMulPosStrictMono α β where
  elim b hb a₁ a₂ ha := by
    simp only [← lt_iff_lt_of_le_iff_le' hf hf, zero, smul] at *
    exact smul_lt_smul_of_pos_right ha hb
Lifting of Strict Monotonicity in Left Scalar Multiplication via Order-Reflecting Homomorphism
Informal description
Let $\alpha$, $\beta$, and $\gamma$ be preorders with zero elements, and let $f : \beta \to \gamma$ be a function such that: 1. For any $b_1, b_2 \in \beta$, $f(b_1) \leq f(b_2)$ if and only if $b_1 \leq b_2$; 2. For any $a \in \alpha$ and $b \in \beta$, $f(a \cdot b) = a \cdot f(b)$; 3. $f(0) = 0$. If scalar multiplication in $\alpha$ and $\gamma$ is strictly monotone in the left argument when the right argument is positive (i.e., $\alpha$ and $\gamma$ satisfy `SMulPosStrictMono`), then scalar multiplication in $\alpha$ and $\beta$ is also strictly monotone in the left argument when the right argument is positive.
SMulPosReflectLE.lift theorem
[SMulPosReflectLE α γ] (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂) (smul : ∀ (a : α) b, f (a • b) = a • f b) (zero : f 0 = 0) : SMulPosReflectLE α β
Full source
lemma SMulPosReflectLE.lift [SMulPosReflectLE α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b)
    (zero : f 0 = 0) : SMulPosReflectLE α β where
  elim b hb a₁ a₂ h := by
    simp only [← hf, ← lt_iff_lt_of_le_iff_le' hf hf, zero, smul] at *
    exact le_of_smul_le_smul_right h hb
Lifting of Right Scalar Multiplication Order Reflection Property for Positive Elements
Informal description
Let $\alpha$, $\beta$, and $\gamma$ be preorders with zero elements, and let $f : \beta \to \gamma$ be a function such that: 1. For any $b_1, b_2 \in \beta$, $f(b_1) \leq f(b_2)$ if and only if $b_1 \leq b_2$; 2. For any $a \in \alpha$ and $b \in \beta$, $f(a \cdot b) = a \cdot f(b)$; 3. $f(0) = 0$. If $\alpha$ and $\gamma$ satisfy the property that for any $b \in \gamma$ with $b > 0$, the inequality $a_1 \cdot b \leq a_2 \cdot b$ implies $a_1 \leq a_2$ in $\alpha$, then $\alpha$ and $\beta$ also satisfy this property.
SMulPosReflectLT.lift theorem
[SMulPosReflectLT α γ] (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂) (smul : ∀ (a : α) b, f (a • b) = a • f b) (zero : f 0 = 0) : SMulPosReflectLT α β
Full source
lemma SMulPosReflectLT.lift [SMulPosReflectLT α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b)
    (zero : f 0 = 0) : SMulPosReflectLT α β where
  elim b hb a₁ a₂ h := by
    simp only [← hf, ← lt_iff_lt_of_le_iff_le' hf hf, zero, smul] at *
    exact lt_of_smul_lt_smul_right h hb
Lifting of Right Scalar Multiplication Strict Order Reflection Property
Informal description
Let $\alpha$, $\beta$, and $\gamma$ be preorders with zero elements, and let $f : \beta \to \gamma$ be a function such that: 1. $f$ reflects the order relation, i.e., for any $b_1, b_2 \in \beta$, $f(b_1) \leq f(b_2)$ if and only if $b_1 \leq b_2$; 2. $f$ preserves scalar multiplication, i.e., for any $a \in \alpha$ and $b \in \beta$, $f(a \cdot b) = a \cdot f(b)$; 3. $f$ maps zero to zero, i.e., $f(0) = 0$. If $\alpha$ and $\gamma$ satisfy the property that scalar multiplication by nonnegative elements on the right reflects strict order (i.e., for $b \geq 0$ in $\gamma$, $a_1 \cdot b < a_2 \cdot b$ implies $a_1 < a_2$), then $\alpha$ and $\beta$ also satisfy this property.
OrderedSemiring.toPosSMulMonoNat instance
[Semiring α] [PartialOrder α] [IsOrderedRing α] : PosSMulMono ℕ α
Full source
instance OrderedSemiring.toPosSMulMonoNat [Semiring α] [PartialOrder α] [IsOrderedRing α] :
    PosSMulMono  α where
  elim _n _ _a _b hab := nsmul_le_nsmul_right hab _
Monotonicity of Left Scalar Multiplication by Natural Numbers in Ordered Semirings
Informal description
For any ordered semiring $\alpha$, scalar multiplication by natural numbers is monotone on the left. That is, for any natural number $n$ and any elements $a \leq b$ in $\alpha$, we have $n \cdot a \leq n \cdot b$.
OrderedSemiring.toSMulPosMonoNat instance
[Semiring α] [PartialOrder α] [IsOrderedRing α] : SMulPosMono ℕ α
Full source
instance OrderedSemiring.toSMulPosMonoNat [Semiring α] [PartialOrder α] [IsOrderedRing α] :
    SMulPosMono  α where
  elim _a ha _m _n hmn := nsmul_le_nsmul_left ha hmn
Monotonicity of Right Scalar Multiplication by Natural Numbers in Ordered Semirings
Informal description
For any ordered semiring $\alpha$ (a semiring with a partial order where addition and multiplication by nonnegative elements are monotone), scalar multiplication by natural numbers on the right is monotone. That is, for any $b \geq 0$ in $\alpha$ and natural numbers $n_1 \leq n_2$, we have $n_1 \cdot b \leq n_2 \cdot b$.
StrictOrderedSemiring.toPosSMulStrictMonoNat instance
[Semiring α] [PartialOrder α] [IsStrictOrderedRing α] : PosSMulStrictMono ℕ α
Full source
instance StrictOrderedSemiring.toPosSMulStrictMonoNat
    [Semiring α] [PartialOrder α] [IsStrictOrderedRing α] :
    PosSMulStrictMono  α where
  elim _n hn _a _b hab := nsmul_right_strictMono hn.ne' hab
Strict Monotonicity of Left Scalar Multiplication by Positive Natural Numbers in Strict Ordered Semirings
Informal description
For any strict ordered semiring $\alpha$, scalar multiplication by natural numbers is strictly monotone on the left. That is, for any natural number $n > 0$ and any elements $a < b$ in $\alpha$, we have $n \cdot a < n \cdot b$.
StrictOrderedSemiring.toSMulPosStrictMonoNat instance
[Semiring α] [PartialOrder α] [IsStrictOrderedRing α] : SMulPosStrictMono ℕ α
Full source
instance StrictOrderedSemiring.toSMulPosStrictMonoNat
    [Semiring α] [PartialOrder α] [IsStrictOrderedRing α] :
    SMulPosStrictMono  α where
  elim _a ha _m _n hmn := nsmul_lt_nsmul_left ha hmn
Strict Monotonicity of Right Scalar Multiplication by Natural Numbers in Strict Ordered Semirings
Informal description
For any strict ordered semiring $\alpha$, scalar multiplication by natural numbers on the right is strictly monotone when the left argument is positive. That is, for any $b > 0$ in $\alpha$ and natural numbers $n_1 < n_2$, we have $n_1 \cdot b < n_2 \cdot b$.
Mathlib.Meta.Positivity.evalHSMul definition
: PositivityExt
Full source
/-- Positivity extension for HSMul, i.e. (_ • _). -/
@[positivity HSMul.hSMul _ _]
def evalHSMul : PositivityExt where eval {_u α} zα pα (e : Q($α)) := do
  let .app (.app (.app (.app (.app (.app
        (.const ``HSMul.hSMul [u1, _, _]) (β : Q(Type u1))) _) _) _)
          (a : Q($β))) (b : Q($α)) ← whnfR e | throwError "failed to match hSMul"
  let zM : Q(Zero $β) ← synthInstanceQ q(Zero $β)
  let pM : Q(PartialOrder $β) ← synthInstanceQ q(PartialOrder $β)
  -- Using `q()` here would be impractical, as we would have to manually `synthInstanceQ` all the
  -- required typeclasses. Ideally we could tell `q()` to do this automatically.
  match ← core zM pM a, ← core zα pα b with
  | .positive pa, .positive pb =>
      pure (.positive (← mkAppM ``smul_pos #[pa, pb]))
  | .positive pa, .nonnegative pb =>
      pure (.nonnegative (← mkAppM ``smul_nonneg_of_pos_of_nonneg #[pa, pb]))
  | .nonnegative pa, .positive pb =>
      pure (.nonnegative (← mkAppM ``smul_nonneg_of_nonneg_of_pos #[pa, pb]))
  | .nonnegative pa, .nonnegative pb =>
      pure (.nonnegative (← mkAppM ``smul_nonneg #[pa, pb]))
  | .positive pa, .nonzero pb =>
      pure (.nonzero (← mkAppM ``smul_ne_zero_of_pos_of_ne_zero #[pa, pb]))
  | .nonzero pa, .positive pb =>
      pure (.nonzero (← mkAppM ``smul_ne_zero_of_ne_zero_of_pos #[pa, pb]))
  | .nonzero pa, .nonzero pb =>
      pure (.nonzero (← mkAppM ``smul_ne_zero #[pa, pb]))
  | _, _ => pure .none
Positivity analysis for scalar multiplication
Informal description
The positivity extension for the scalar multiplication operation `(_ • _)` analyzes expressions of the form `a • b` where `a` is an element of a type `β` with zero and partial order, and `b` is an element of a type `α` with zero and partial order. It determines the positivity properties of `a • b` based on the positivity properties of `a` and `b` as follows: 1. If both `a` and `b` are positive, then `a • b` is positive. 2. If `a` is positive and `b` is non-negative, then `a • b` is non-negative. 3. If `a` is non-negative and `b` is positive, then `a • b` is non-negative. 4. If both `a` and `b` are non-negative, then `a • b` is non-negative. 5. If `a` is positive and `b` is non-zero, then `a • b` is non-zero. 6. If `a` is non-zero and `b` is positive, then `a • b` is non-zero. 7. If both `a` and `b` are non-zero, then `a • b` is non-zero. In all other cases, no positivity conclusion can be drawn.