Module docstring
{"# Pi instances for ordered groups and monoids
This file defines instances for ordered group, monoid, and related structures on Pi types. "}
{"# Pi instances for ordered groups and monoids
This file defines instances for ordered group, monoid, and related structures on Pi types. "}
Pi.isOrderedMonoid
instance
{ι : Type*} {Z : ι → Type*} [∀ i, CommMonoid (Z i)] [∀ i, PartialOrder (Z i)] [∀ i, IsOrderedMonoid (Z i)] :
IsOrderedMonoid (∀ i, Z i)
/-- The product of a family of ordered commutative monoids is an ordered commutative monoid. -/
@[to_additive
"The product of a family of ordered additive commutative monoids is
an ordered additive commutative monoid."]
instance isOrderedMonoid {ι : Type*} {Z : ι → Type*} [∀ i, CommMonoid (Z i)]
[∀ i, PartialOrder (Z i)] [∀ i, IsOrderedMonoid (Z i)] :
IsOrderedMonoid (∀ i, Z i) where
mul_le_mul_left _ _ w _ := fun i => mul_le_mul_left' (w i) _
Pi.existsMulOfLe
instance
{ι : Type*} {α : ι → Type*} [∀ i, LE (α i)] [∀ i, Mul (α i)] [∀ i, ExistsMulOfLE (α i)] : ExistsMulOfLE (∀ i, α i)
@[to_additive]
instance existsMulOfLe {ι : Type*} {α : ι → Type*} [∀ i, LE (α i)] [∀ i, Mul (α i)]
[∀ i, ExistsMulOfLE (α i)] : ExistsMulOfLE (∀ i, α i) :=
⟨fun h =>
⟨fun i => (exists_mul_of_le <| h i).choose,
funext fun i => (exists_mul_of_le <| h i).choose_spec⟩⟩
Pi.instCanonicallyOrderedMulForall
instance
{ι : Type*} {Z : ι → Type*} [∀ i, Monoid (Z i)] [∀ i, PartialOrder (Z i)] [∀ i, CanonicallyOrderedMul (Z i)] :
CanonicallyOrderedMul (∀ i, Z i)
/-- The product of a family of canonically ordered monoids is a canonically ordered monoid. -/
@[to_additive
"The product of a family of canonically ordered additive monoids is
a canonically ordered additive monoid."]
instance {ι : Type*} {Z : ι → Type*} [∀ i, Monoid (Z i)] [∀ i, PartialOrder (Z i)]
[∀ i, CanonicallyOrderedMul (Z i)] :
CanonicallyOrderedMul (∀ i, Z i) where
__ := Pi.existsMulOfLe
le_self_mul _ _ := fun _ => le_self_mul
Pi.isOrderedCancelMonoid
instance
[∀ i, CommMonoid <| f i] [∀ i, PartialOrder <| f i] [∀ i, IsOrderedCancelMonoid <| f i] :
IsOrderedCancelMonoid (∀ i : I, f i)
@[to_additive]
instance isOrderedCancelMonoid [∀ i, CommMonoid <| f i] [∀ i, PartialOrder <| f i]
[∀ i, IsOrderedCancelMonoid <| f i] :
IsOrderedCancelMonoid (∀ i : I, f i) where
le_of_mul_le_mul_left _ _ _ h i := le_of_mul_le_mul_left' (h i)
Pi.isOrderedRing
instance
[∀ i, Semiring (f i)] [∀ i, PartialOrder (f i)] [∀ i, IsOrderedRing (f i)] : IsOrderedRing (∀ i, f i)
instance isOrderedRing [∀ i, Semiring (f i)] [∀ i, PartialOrder (f i)] [∀ i, IsOrderedRing (f i)] :
IsOrderedRing (∀ i, f i) where
add_le_add_left _ _ hab _ := fun _ => add_le_add_left (hab _) _
zero_le_one := fun i => zero_le_one (α := f i)
mul_le_mul_of_nonneg_left _ _ _ hab hc := fun _ => mul_le_mul_of_nonneg_left (hab _) <| hc _
mul_le_mul_of_nonneg_right _ _ _ hab hc := fun _ => mul_le_mul_of_nonneg_right (hab _) <| hc _
Function.one_le_const_of_one_le
theorem
(ha : 1 ≤ a) : 1 ≤ const β a
@[to_additive const_nonneg_of_nonneg]
theorem one_le_const_of_one_le (ha : 1 ≤ a) : 1 ≤ const β a := fun _ => ha
Function.const_le_one_of_le_one
theorem
(ha : a ≤ 1) : const β a ≤ 1
@[to_additive]
theorem const_le_one_of_le_one (ha : a ≤ 1) : const β a ≤ 1 := fun _ => ha
Function.one_le_const
theorem
: 1 ≤ const β a ↔ 1 ≤ a
@[to_additive (attr := simp) const_nonneg]
theorem one_le_const : 1 ≤ const β a ↔ 1 ≤ a :=
const_le_const
Function.one_lt_const
theorem
: 1 < const β a ↔ 1 < a
@[to_additive (attr := simp) const_pos]
theorem one_lt_const : 1 < const β a ↔ 1 < a :=
const_lt_const
Function.const_le_one
theorem
: const β a ≤ 1 ↔ a ≤ 1
@[to_additive (attr := simp)]
theorem const_le_one : constconst β a ≤ 1 ↔ a ≤ 1 :=
const_le_const
Function.const_lt_one
theorem
: const β a < 1 ↔ a < 1
@[to_additive (attr := simp) const_neg']
theorem const_lt_one : constconst β a < 1 ↔ a < 1 :=
const_lt_const
Function.one_le_extend
theorem
(hg : 1 ≤ g) (he : 1 ≤ e) : 1 ≤ extend f g e
@[to_additive extend_nonneg] lemma one_le_extend (hg : 1 ≤ g) (he : 1 ≤ e) : 1 ≤ extend f g e :=
fun _b ↦ by classical exact one_le_dite (fun _ ↦ hg _) (fun _ ↦ he _)
Function.extend_le_one
theorem
(hg : g ≤ 1) (he : e ≤ 1) : extend f g e ≤ 1
@[to_additive] lemma extend_le_one (hg : g ≤ 1) (he : e ≤ 1) : extend f g e ≤ 1 :=
fun _b ↦ by classical exact dite_le_one (fun _ ↦ hg _) (fun _ ↦ he _)
Pi.mulSingle_le_mulSingle
theorem
: mulSingle i a ≤ mulSingle i b ↔ a ≤ b
@[to_additive (attr := simp)]
lemma mulSingle_le_mulSingle : mulSinglemulSingle i a ≤ mulSingle i b ↔ a ≤ b := by
simp [mulSingle, update_le_update_iff]
Pi.one_le_mulSingle
theorem
: 1 ≤ mulSingle i a ↔ 1 ≤ a
@[to_additive (attr := simp) single_nonneg]
lemma one_le_mulSingle : 1 ≤ mulSingle i a ↔ 1 ≤ a := by simp [mulSingle]
Pi.mulSingle_le_one
theorem
: mulSingle i a ≤ 1 ↔ a ≤ 1
@[to_additive (attr := simp)]
lemma mulSingle_le_one : mulSinglemulSingle i a ≤ 1 ↔ a ≤ 1 := by simp [mulSingle]