Module docstring
{"# Adjoining top/bottom elements to ordered monoids. "}
{"# Adjoining top/bottom elements to ordered monoids. "}
WithTop.isOrderedAddMonoid
instance
[AddCommMonoid α] [PartialOrder α] [IsOrderedAddMonoid α] : IsOrderedAddMonoid (WithTop α)
instance isOrderedAddMonoid [AddCommMonoid α] [PartialOrder α] [IsOrderedAddMonoid α] :
IsOrderedAddMonoid (WithTop α) where
add_le_add_left _ _ := add_le_add_left
WithTop.canonicallyOrderedAdd
instance
[Add α] [Preorder α] [CanonicallyOrderedAdd α] : CanonicallyOrderedAdd (WithTop α)
instance canonicallyOrderedAdd [Add α] [Preorder α] [CanonicallyOrderedAdd α] :
CanonicallyOrderedAdd (WithTop α) :=
{ WithTop.existsAddOfLE with
le_self_add := fun a b =>
match a, b with
| ⊤, ⊤ => le_rfl
| (a : α), ⊤ => le_top
| (a : α), (b : α) => WithTop.coe_le_coe.2 le_self_add
| ⊤, (b : α) => le_rfl }
WithBot.isOrderedAddMonoid
instance
[AddCommMonoid α] [PartialOrder α] [IsOrderedAddMonoid α] : IsOrderedAddMonoid (WithBot α)
instance isOrderedAddMonoid [AddCommMonoid α] [PartialOrder α] [IsOrderedAddMonoid α] :
IsOrderedAddMonoid (WithBot α) :=
{ add_le_add_left := fun _ _ h c => add_le_add_left h c }
WithBot.le_self_add
theorem
[Add α] [LE α] [CanonicallyOrderedAdd α] {x : WithBot α} (hx : x ≠ ⊥) (y : WithBot α) : y ≤ y + x
protected theorem le_self_add [Add α] [LE α] [CanonicallyOrderedAdd α]
{x : WithBot α} (hx : x ≠ ⊥) (y : WithBot α) :
y ≤ y + x := by
induction x
· simp at hx
induction y
· simp
· rw [← WithBot.coe_add, WithBot.coe_le_coe]
exact le_self_add
WithBot.le_add_self
theorem
[AddCommMagma α] [LE α] [CanonicallyOrderedAdd α] {x : WithBot α} (hx : x ≠ ⊥) (y : WithBot α) : y ≤ x + y
protected theorem le_add_self [AddCommMagma α] [LE α] [CanonicallyOrderedAdd α]
{x : WithBot α} (hx : x ≠ ⊥) (y : WithBot α) :
y ≤ x + y := by
induction x
· simp at hx
induction y
· simp
· rw [← WithBot.coe_add, WithBot.coe_le_coe]
exact le_add_self