Adjoining top/bottom elements to ordered monoids. #
@[implicit_reducible]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem
WithTop.map_eq_one_iff
{β : Type v}
{α : Type u_1}
{f : α → β}
{v : WithTop α}
[One β]
:
map f v = 1 ↔ ∃ (x : α), v = ↑x ∧ f x = 1
theorem
WithTop.map_eq_zero_iff
{β : Type v}
{α : Type u_1}
{f : α → β}
{v : WithTop α}
[Zero β]
:
map f v = 0 ↔ ∃ (x : α), v = ↑x ∧ f x = 0
theorem
WithTop.one_eq_map_iff
{β : Type v}
{α : Type u_1}
{f : α → β}
{v : WithTop α}
[One β]
:
1 = map f v ↔ ∃ (x : α), v = ↑x ∧ f x = 1
theorem
WithTop.zero_eq_map_iff
{β : Type v}
{α : Type u_1}
{f : α → β}
{v : WithTop α}
[Zero β]
:
0 = map f v ↔ ∃ (x : α), v = ↑x ∧ f x = 0
@[simp]
@[simp]
theorem
WithTop.add_eq_coe
{α : Type u}
[Add α]
{a b : WithTop α}
{c : α}
:
a + b = ↑c ↔ ∃ (a' : α) (b' : α), ↑a' = a ∧ ↑b' = b ∧ a' + b' = c
theorem
WithTop.add_right_inj
{α : Type u}
[Add α]
{x y z : WithTop α}
[IsRightCancelAdd α]
(hz : z ≠ ⊤)
:
x + z = y + z ↔ x = y
theorem
WithTop.add_right_cancel
{α : Type u}
[Add α]
{x y z : WithTop α}
[IsRightCancelAdd α]
(hz : z ≠ ⊤)
(h : x + z = y + z)
:
x = y
theorem
WithTop.add_left_inj
{α : Type u}
[Add α]
{x y z : WithTop α}
[IsLeftCancelAdd α]
(hx : x ≠ ⊤)
:
x + y = x + z ↔ y = z
theorem
WithTop.add_left_cancel
{α : Type u}
[Add α]
{x y z : WithTop α}
[IsLeftCancelAdd α]
(hx : x ≠ ⊤)
(h : x + y = x + z)
:
y = z
instance
WithTop.addRightMono
{α : Type u}
[Add α]
[LE α]
[AddRightMono α]
:
AddRightMono (WithTop α)
theorem
WithTop.le_of_add_le_add_left
{α : Type u}
[Add α]
{x y z : WithTop α}
[LE α]
[AddLeftReflectLE α]
(hx : x ≠ ⊤)
:
theorem
WithTop.le_of_add_le_add_right
{α : Type u}
[Add α]
{x y z : WithTop α}
[LE α]
[AddRightReflectLE α]
(hz : z ≠ ⊤)
:
theorem
WithTop.add_lt_add_left
{α : Type u}
[Add α]
{x y z : WithTop α}
[LT α]
[AddLeftStrictMono α]
(hx : x ≠ ⊤)
:
theorem
WithTop.add_lt_add_right
{α : Type u}
[Add α]
{x y z : WithTop α}
[LT α]
[AddRightStrictMono α]
(hz : z ≠ ⊤)
:
theorem
WithTop.add_lt_add
{α : Type u}
[Add α]
{w x y z : WithTop α}
[Preorder α]
[AddLeftStrictMono α]
[AddRightStrictMono α]
(xz : x < z)
(yw : y < w)
:
theorem
WithTop.add_le_add_iff_left
{α : Type u}
[Add α]
{x y z : WithTop α}
[LE α]
[AddLeftMono α]
[AddLeftReflectLE α]
(hx : x ≠ ⊤)
:
theorem
WithTop.add_le_add_iff_right
{α : Type u}
[Add α]
{x y z : WithTop α}
[LE α]
[AddRightMono α]
[AddRightReflectLE α]
(hz : z ≠ ⊤)
:
theorem
WithTop.add_lt_add_iff_left
{α : Type u}
[Add α]
{x y z : WithTop α}
[LT α]
[AddLeftStrictMono α]
[AddLeftReflectLT α]
(hx : x ≠ ⊤)
:
theorem
WithTop.add_lt_add_iff_right
{α : Type u}
[Add α]
{x y z : WithTop α}
[LT α]
[AddRightStrictMono α]
[AddRightReflectLT α]
(hz : z ≠ ⊤)
:
theorem
WithTop.add_lt_add_of_le_of_lt
{α : Type u}
[Add α]
{w x y z : WithTop α}
[Preorder α]
[AddLeftStrictMono α]
[AddRightMono α]
(hw : w ≠ ⊤)
(hwy : w ≤ y)
(hxz : x < z)
:
theorem
WithTop.add_lt_add_of_lt_of_le
{α : Type u}
[Add α]
{w x y z : WithTop α}
[Preorder α]
[AddLeftMono α]
[AddRightStrictMono α]
(hx : x ≠ ⊤)
(hwy : w < y)
(hxz : x ≤ z)
:
theorem
WithTop.addLECancellable_of_ne_top
{α : Type u}
[Add α]
{x : WithTop α}
[LE α]
[AddLeftReflectLE α]
(hx : x ≠ ⊤)
:
theorem
WithTop.addLECancellable_of_lt_top
{α : Type u}
[Add α]
{x : WithTop α}
[Preorder α]
[AddLeftReflectLE α]
(hx : x < ⊤)
:
theorem
WithTop.addLECancellable_iff_ne_top
{α : Type u}
[Add α]
{x : WithTop α}
[Nonempty α]
[Preorder α]
[AddLeftReflectLE α]
:
AddLECancellable x ↔ x ≠ ⊤
@[simp]
theorem
WithTop.map_add
{α : Type u}
{β : Type v}
[Add α]
{F : Type u_1}
[Add β]
[FunLike F α β]
[AddHomClass F α β]
(f : F)
(a b : WithTop α)
:
@[implicit_reducible]
@[implicit_reducible]
@[implicit_reducible]
@[implicit_reducible]
@[simp]
Coercion from α to WithTop α as an AddMonoidHom.
Instances For
@[implicit_reducible]
@[implicit_reducible]
@[implicit_reducible]
@[simp]
@[simp]
@[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
@[simp]
theorem
WithTop.map_ofNat
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : α → β}
(n : ℕ)
[n.AtLeastTwo]
:
map f (OfNat.ofNat n) = ↑(f (OfNat.ofNat n))
@[simp]
theorem
WithTop.map_natCast
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : α → β}
(n : ℕ)
:
map f ↑n = ↑(f ↑n)
theorem
WithTop.map_eq_ofNat_iff
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : β → α}
{n : ℕ}
[n.AtLeastTwo]
{a : WithTop β}
:
map f a = OfNat.ofNat n ↔ ∃ (x : β), a = ↑x ∧ f x = ↑n
theorem
WithTop.ofNat_eq_map_iff
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : β → α}
{n : ℕ}
[n.AtLeastTwo]
{a : WithTop β}
:
OfNat.ofNat n = map f a ↔ ∃ (x : β), a = ↑x ∧ f x = ↑n
theorem
WithTop.map_eq_natCast_iff
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : β → α}
{n : ℕ}
{a : WithTop β}
:
map f a = ↑n ↔ ∃ (x : β), a = ↑x ∧ f x = ↑n
theorem
WithTop.natCast_eq_map_iff
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : β → α}
{n : ℕ}
{a : WithTop β}
:
↑n = map f a ↔ ∃ (x : β), a = ↑x ∧ f x = ↑n
@[implicit_reducible]
instance
WithTop.existsAddOfLE
{α : Type u}
[LE α]
[Add α]
[ExistsAddOfLE α]
:
ExistsAddOfLE (WithTop α)
A version of WithTop.map for OneHoms.
Instances For
A version of WithTop.map for ZeroHoms
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 AddHoms.
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 AddMonoidHoms.
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
@[implicit_reducible]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem
WithBot.map_eq_one_iff
{β : Type v}
{α : Type u_1}
{f : α → β}
{v : WithBot α}
[One β]
:
map f v = 1 ↔ ∃ (x : α), v = ↑x ∧ f x = 1
theorem
WithBot.map_eq_zero_iff
{β : Type v}
{α : Type u_1}
{f : α → β}
{v : WithBot α}
[Zero β]
:
map f v = 0 ↔ ∃ (x : α), v = ↑x ∧ f x = 0
theorem
WithBot.one_eq_map_iff
{β : Type v}
{α : Type u_1}
{f : α → β}
{v : WithBot α}
[One β]
:
1 = map f v ↔ ∃ (x : α), v = ↑x ∧ f x = 1
theorem
WithBot.zero_eq_map_iff
{β : Type v}
{α : Type u_1}
{f : α → β}
{v : WithBot α}
[Zero β]
:
0 = map f v ↔ ∃ (x : α), v = ↑x ∧ f x = 0
@[simp]
@[simp]
theorem
WithBot.add_eq_coe
{α : Type u}
[Add α]
{a b : WithBot α}
{c : α}
:
a + b = ↑c ↔ ∃ (a' : α) (b' : α), ↑a' = a ∧ ↑b' = b ∧ a' + b' = c
theorem
WithBot.add_right_inj
{α : Type u}
[Add α]
{x y z : WithBot α}
[IsRightCancelAdd α]
(hz : z ≠ ⊥)
:
x + z = y + z ↔ x = y
theorem
WithBot.add_right_cancel
{α : Type u}
[Add α]
{x y z : WithBot α}
[IsRightCancelAdd α]
(hz : z ≠ ⊥)
(h : x + z = y + z)
:
x = y
theorem
WithBot.add_left_inj
{α : Type u}
[Add α]
{x y z : WithBot α}
[IsLeftCancelAdd α]
(hx : x ≠ ⊥)
:
x + y = x + z ↔ y = z
theorem
WithBot.add_left_cancel
{α : Type u}
[Add α]
{x y z : WithBot α}
[IsLeftCancelAdd α]
(hx : x ≠ ⊥)
(h : x + y = x + z)
:
y = z
instance
WithBot.addRightMono
{α : Type u}
[Add α]
[LE α]
[AddRightMono α]
:
AddRightMono (WithBot α)
theorem
WithBot.le_of_add_le_add_left
{α : Type u}
[Add α]
{x y z : WithBot α}
[LE α]
[AddLeftReflectLE α]
(hx : x ≠ ⊥)
:
theorem
WithBot.le_of_add_le_add_right
{α : Type u}
[Add α]
{x y z : WithBot α}
[LE α]
[AddRightReflectLE α]
(hz : z ≠ ⊥)
:
theorem
WithBot.add_lt_add_left
{α : Type u}
[Add α]
{x y z : WithBot α}
[LT α]
[AddLeftStrictMono α]
(hx : x ≠ ⊥)
:
theorem
WithBot.add_lt_add_right
{α : Type u}
[Add α]
{x y z : WithBot α}
[LT α]
[AddRightStrictMono α]
(hz : z ≠ ⊥)
:
theorem
WithBot.add_le_add_iff_left
{α : Type u}
[Add α]
{x y z : WithBot α}
[LE α]
[AddLeftMono α]
[AddLeftReflectLE α]
(hx : x ≠ ⊥)
:
theorem
WithBot.add_le_add_iff_right
{α : Type u}
[Add α]
{x y z : WithBot α}
[LE α]
[AddRightMono α]
[AddRightReflectLE α]
(hz : z ≠ ⊥)
:
theorem
WithBot.add_lt_add_iff_left
{α : Type u}
[Add α]
{x y z : WithBot α}
[LT α]
[AddLeftStrictMono α]
[AddLeftReflectLT α]
(hx : x ≠ ⊥)
:
theorem
WithBot.add_lt_add_iff_right
{α : Type u}
[Add α]
{x y z : WithBot α}
[LT α]
[AddRightStrictMono α]
[AddRightReflectLT α]
(hz : z ≠ ⊥)
:
theorem
WithBot.add_lt_add_of_le_of_lt
{α : Type u}
[Add α]
{w x y z : WithBot α}
[Preorder α]
[AddLeftStrictMono α]
[AddRightMono α]
(hw : w ≠ ⊥)
(hwy : w ≤ y)
(hxz : x < z)
:
theorem
WithBot.add_lt_add_of_lt_of_le
{α : Type u}
[Add α]
{w x y z : WithBot α}
[Preorder α]
[AddLeftMono α]
[AddRightStrictMono α]
(hx : x ≠ ⊥)
(hwy : w < y)
(hxz : x ≤ z)
:
theorem
WithBot.addLECancellable_of_ne_bot
{α : Type u}
[Add α]
{x : WithBot α}
[LE α]
[AddLeftReflectLE α]
(hx : x ≠ ⊥)
:
theorem
WithBot.addLECancellable_of_lt_bot
{α : Type u}
[Add α]
{x : WithBot α}
[Preorder α]
[AddLeftReflectLE α]
(hx : x < ⊥)
:
theorem
WithBot.addLECancellable_iff_ne_bot
{α : Type u}
[Add α]
{x : WithBot α}
[Nonempty α]
[Preorder α]
[AddLeftReflectLE α]
:
AddLECancellable x ↔ x ≠ ⊥
theorem
WithBot.add_le_add_iff_right'
{α : Type u_1}
[Add α]
[LE α]
[AddRightMono α]
[AddRightReflectLE α]
{a b c : WithBot (WithTop α)}
(hc : c ≠ ⊥)
(hc' : c ≠ ⊤)
:
Addition in WithBot (WithTop α) is right cancellative provided the element
being cancelled is not ⊤ or ⊥.
@[simp]
theorem
WithBot.map_add
{α : Type u}
{β : Type v}
[Add α]
{F : Type u_1}
[Add β]
[FunLike F α β]
[AddHomClass F α β]
(f : F)
(a b : WithBot α)
:
@[implicit_reducible]
@[implicit_reducible]
@[implicit_reducible]
@[implicit_reducible]
Coercion from α to WithBot α as an AddMonoidHom.
Instances For
@[simp]
@[implicit_reducible]
@[implicit_reducible]
@[implicit_reducible]
@[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
@[simp]
theorem
WithBot.map_ofNat
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : α → β}
(n : ℕ)
[n.AtLeastTwo]
:
map f (OfNat.ofNat n) = ↑(f (OfNat.ofNat n))
@[simp]
theorem
WithBot.map_natCast
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : α → β}
(n : ℕ)
:
map f ↑n = ↑(f ↑n)
theorem
WithBot.map_eq_ofNat_iff
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : β → α}
{n : ℕ}
[n.AtLeastTwo]
{a : WithBot β}
:
map f a = OfNat.ofNat n ↔ ∃ (x : β), a = ↑x ∧ f x = ↑n
theorem
WithBot.ofNat_eq_map_iff
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : β → α}
{n : ℕ}
[n.AtLeastTwo]
{a : WithBot β}
:
OfNat.ofNat n = map f a ↔ ∃ (x : β), a = ↑x ∧ f x = ↑n
theorem
WithBot.map_eq_natCast_iff
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : β → α}
{n : ℕ}
{a : WithBot β}
:
map f a = ↑n ↔ ∃ (x : β), a = ↑x ∧ f x = ↑n
theorem
WithBot.natCast_eq_map_iff
{α : Type u}
{β : Type v}
[AddMonoidWithOne α]
{f : β → α}
{n : ℕ}
{a : WithBot β}
:
↑n = map f a ↔ ∃ (x : β), a = ↑x ∧ f x = ↑n
@[simp]
@[implicit_reducible]
A version of WithBot.map for OneHoms.
Instances For
A version of WithBot.map for ZeroHoms
Instances For
@[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
@[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
A version of WithBot.map for AddHoms.
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 AddMonoidHoms.
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