Adjoining top/bottom elements to ordered monoids. #
@[simp]
@[simp]
Equations
- WithTop.add = { add := Option.map₂ fun (x1 x2 : α) => x1 + x2 }
theorem
WithTop.add_le_add_iff_left
{α : Type u}
[Add α]
{a b c : WithTop α}
[LE α]
[AddLeftMono α]
[AddLeftReflectLE α]
(ha : a ≠ ⊤)
:
theorem
WithTop.add_le_add_iff_right
{α : Type u}
[Add α]
{a b c : WithTop α}
[LE α]
[AddRightMono α]
[AddRightReflectLE α]
(ha : a ≠ ⊤)
:
theorem
WithTop.add_lt_add_iff_left
{α : Type u}
[Add α]
{a b c : WithTop α}
[LT α]
[AddLeftStrictMono α]
[AddLeftReflectLT α]
(ha : a ≠ ⊤)
:
theorem
WithTop.add_lt_add_iff_right
{α : Type u}
[Add α]
{a b c : WithTop α}
[LT α]
[AddRightStrictMono α]
[AddRightReflectLT α]
(ha : a ≠ ⊤)
:
theorem
WithTop.add_lt_add_of_le_of_lt
{α : Type u}
[Add α]
{a b c d : WithTop α}
[Preorder α]
[AddLeftStrictMono α]
[AddRightMono α]
(ha : a ≠ ⊤)
(hab : a ≤ b)
(hcd : c < d)
:
theorem
WithTop.add_lt_add_of_lt_of_le
{α : Type u}
[Add α]
{a b c d : WithTop α}
[Preorder α]
[AddLeftMono α]
[AddRightStrictMono α]
(hc : c ≠ ⊤)
(hab : a < b)
(hcd : c ≤ d)
:
theorem
WithTop.addLECancellable_of_ne_top
{α : Type u}
[Add α]
{a : WithTop α}
[Preorder α]
[ContravariantClass α α (fun (x1 x2 : α) => x1 + x2) fun (x1 x2 : α) => x1 ≤ x2]
(ha : a ≠ ⊤)
:
theorem
WithTop.addLECancellable_of_lt_top
{α : Type u}
[Add α]
{a : WithTop α}
[Preorder α]
[ContravariantClass α α (fun (x1 x2 : α) => x1 + x2) fun (x1 x2 : α) => x1 ≤ x2]
(ha : a < ⊤)
:
theorem
WithTop.addLECancellable_iff_ne_top
{α : Type u}
[Add α]
{a : WithTop α}
[Nonempty α]
[Preorder α]
[ContravariantClass α α (fun (x1 x2 : α) => x1 + x2) fun (x1 x2 : α) => x1 ≤ x2]
:
AddLECancellable a ↔ a ≠ ⊤
@[simp]
theorem
WithTop.map_add
{α : Type u}
{β : Type v}
[Add α]
{F : Type u_1}
[Add β]
[FunLike F α β]
[AddHomClass F α β]
(f : F)
(a b : WithTop α)
:
WithTop.map (⇑f) (a + b) = WithTop.map (⇑f) a + WithTop.map (⇑f) b
Equations
- WithTop.addSemigroup = AddSemigroup.mk ⋯
Equations
- WithTop.addCommSemigroup = AddCommSemigroup.mk ⋯
Equations
- WithTop.addZeroClass = AddZeroClass.mk ⋯ ⋯
Coercion from α
to WithTop α
as an AddMonoidHom
.
Equations
- WithTop.addHom = { toFun := WithTop.some, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Equations
- WithTop.addCommMonoid = AddCommMonoid.mk ⋯
Equations
- WithTop.addMonoidWithOne = AddMonoidWithOne.mk ⋯ ⋯
@[simp]
@[deprecated WithTop.coe_natCast]
Alias of WithTop.coe_natCast
.
@[deprecated WithTop.natCast_ne_top]
Alias of WithTop.natCast_ne_top
.
@[deprecated WithTop.top_ne_natCast]
Alias of WithTop.top_ne_natCast
.
@[simp]
theorem
WithTop.coe_ofNat
{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
:
↑(OfNat.ofNat n) = OfNat.ofNat n
@[simp]
theorem
WithTop.coe_eq_ofNat
{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
(m : α)
:
↑m = OfNat.ofNat n ↔ m = OfNat.ofNat n
@[simp]
theorem
WithTop.ofNat_eq_coe
{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
(m : α)
:
OfNat.ofNat n = ↑m ↔ OfNat.ofNat n = m
@[simp]
theorem
WithTop.ofNat_ne_top
{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
:
OfNat.ofNat n ≠ ⊤
@[simp]
theorem
WithTop.top_ne_ofNat
{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
:
⊤ ≠ OfNat.ofNat n
Equations
- WithTop.addCommMonoidWithOne = AddCommMonoidWithOne.mk ⋯
theorem
WithTop.existsAddOfLE
{α : Type u}
[LE α]
[Add α]
[ExistsAddOfLE α]
:
ExistsAddOfLE (WithTop α)
@[deprecated WithTop.top_pos]
Alias of WithTop.top_pos
.
A version of WithTop.map
for OneHom
s.
Equations
- f.withTopMap = { toFun := WithTop.map ⇑f, map_one' := ⋯ }
Instances For
A version of WithTop.map
for ZeroHom
s
Equations
- f.withTopMap = { toFun := WithTop.map ⇑f, map_zero' := ⋯ }
Instances For
@[simp]
theorem
ZeroHom.withTopMap_apply
{M : Type u_1}
{N : Type u_2}
[Zero M]
[Zero N]
(f : ZeroHom M N)
:
⇑f.withTopMap = WithTop.map ⇑f
@[simp]
theorem
OneHom.withTopMap_apply
{M : Type u_1}
{N : Type u_2}
[One M]
[One N]
(f : OneHom M N)
:
⇑f.withTopMap = WithTop.map ⇑f
A version of WithTop.map
for AddHom
s.
Equations
- f.withTopMap = { toFun := WithTop.map ⇑f, map_add' := ⋯ }
Instances For
@[simp]
theorem
AddHom.withTopMap_apply
{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(f : M →ₙ+ N)
:
⇑f.withTopMap = WithTop.map ⇑f
def
AddMonoidHom.withTopMap
{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)
:
A version of WithTop.map
for AddMonoidHom
s.
Equations
- f.withTopMap = { toFun := WithTop.map ⇑f, map_zero' := ⋯, map_add' := ⋯ }
Instances For
@[simp]
theorem
AddMonoidHom.withTopMap_apply
{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)
:
⇑f.withTopMap = WithTop.map ⇑f
@[simp]
@[simp]
Equations
- WithBot.AddSemigroup = WithTop.addSemigroup
Equations
- WithBot.addCommSemigroup = WithTop.addCommSemigroup
Equations
- WithBot.addZeroClass = WithTop.addZeroClass
Coercion from α
to WithBot α
as an AddMonoidHom
.
Equations
- WithBot.addHom = { toFun := WithTop.some, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Equations
- WithBot.addCommMonoid = WithTop.addCommMonoid
Equations
- WithBot.addMonoidWithOne = WithTop.addMonoidWithOne
@[deprecated WithBot.coe_natCast]
Alias of WithBot.coe_natCast
.
@[deprecated WithBot.natCast_ne_bot]
Alias of WithBot.natCast_ne_bot
.
@[deprecated WithBot.bot_ne_natCast]
Alias of WithBot.bot_ne_natCast
.
@[simp]
theorem
WithBot.coe_ofNat
{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
:
↑(OfNat.ofNat n) = OfNat.ofNat n
@[simp]
theorem
WithBot.coe_eq_ofNat
{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
(m : α)
:
↑m = OfNat.ofNat n ↔ m = OfNat.ofNat n
@[simp]
theorem
WithBot.ofNat_eq_coe
{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
(m : α)
:
OfNat.ofNat n = ↑m ↔ OfNat.ofNat n = m
@[simp]
theorem
WithBot.ofNat_ne_bot
{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
:
OfNat.ofNat n ≠ ⊥
@[simp]
theorem
WithBot.bot_ne_ofNat
{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
:
⊥ ≠ OfNat.ofNat n
Equations
- WithBot.addCommMonoidWithOne = WithTop.addCommMonoidWithOne
@[simp]
theorem
WithBot.map_add
{α : Type u}
{β : Type v}
[Add α]
{F : Type u_1}
[Add β]
[FunLike F α β]
[AddHomClass F α β]
(f : F)
(a b : WithBot α)
:
WithBot.map (⇑f) (a + b) = WithBot.map (⇑f) a + WithBot.map (⇑f) b
A version of WithBot.map
for OneHom
s.
Equations
- f.withBotMap = { toFun := WithBot.map ⇑f, map_one' := ⋯ }
Instances For
A version of WithBot.map
for ZeroHom
s
Equations
- f.withBotMap = { toFun := WithBot.map ⇑f, map_zero' := ⋯ }
Instances For
@[simp]
theorem
OneHom.withBotMap_apply
{M : Type u_1}
{N : Type u_2}
[One M]
[One N]
(f : OneHom M N)
:
⇑f.withBotMap = WithBot.map ⇑f
@[simp]
theorem
ZeroHom.withBotMap_apply
{M : Type u_1}
{N : Type u_2}
[Zero M]
[Zero N]
(f : ZeroHom M N)
:
⇑f.withBotMap = WithBot.map ⇑f
A version of WithBot.map
for AddHom
s.
Equations
- f.withBotMap = { toFun := WithBot.map ⇑f, map_add' := ⋯ }
Instances For
@[simp]
theorem
AddHom.withBotMap_apply
{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(f : M →ₙ+ N)
:
⇑f.withBotMap = WithBot.map ⇑f
def
AddMonoidHom.withBotMap
{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)
:
A version of WithBot.map
for AddMonoidHom
s.
Equations
- f.withBotMap = { toFun := WithBot.map ⇑f, map_zero' := ⋯, map_add' := ⋯ }
Instances For
@[simp]
theorem
AddMonoidHom.withBotMap_apply
{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)
:
⇑f.withBotMap = WithBot.map ⇑f
theorem
WithBot.addLeftMono
{α : Type u}
[Add α]
[Preorder α]
[AddLeftMono α]
:
AddLeftMono (WithBot α)
theorem
WithBot.addRightMono
{α : Type u}
[Add α]
[Preorder α]
[AddRightMono α]
:
AddRightMono (WithBot α)
theorem
WithBot.add_le_add_iff_left
{α : Type u}
[Add α]
{a b c : WithBot α}
[Preorder α]
[AddLeftMono α]
[AddLeftReflectLE α]
(ha : a ≠ ⊥)
:
theorem
WithBot.add_le_add_iff_right
{α : Type u}
[Add α]
{a b c : WithBot α}
[Preorder α]
[AddRightMono α]
[AddRightReflectLE α]
(ha : a ≠ ⊥)
:
theorem
WithBot.add_lt_add_iff_left
{α : Type u}
[Add α]
{a b c : WithBot α}
[Preorder α]
[AddLeftStrictMono α]
[AddLeftReflectLT α]
(ha : a ≠ ⊥)
:
theorem
WithBot.add_lt_add_iff_right
{α : Type u}
[Add α]
{a b c : WithBot α}
[Preorder α]
[AddRightStrictMono α]
[AddRightReflectLT α]
(ha : a ≠ ⊥)
:
theorem
WithBot.add_lt_add_of_le_of_lt
{α : Type u}
[Add α]
{a b c d : WithBot α}
[Preorder α]
[AddLeftStrictMono α]
[AddRightMono α]
(hb : b ≠ ⊥)
(hab : a ≤ b)
(hcd : c < d)
:
theorem
WithBot.add_lt_add_of_lt_of_le
{α : Type u}
[Add α]
{a b c d : WithBot α}
[Preorder α]
[AddLeftMono α]
[AddRightStrictMono α]
(hd : d ≠ ⊥)
(hab : a < b)
(hcd : c ≤ d)
: