Adjoining top/bottom elements to ordered monoids. #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
@[simp]
@[simp]
@[simp]
@[simp]
@[protected, simp]
theorem
with_top.map_zero
{α : Type u}
[has_zero α]
{β : Type u_1}
(f : α → β) :
with_top.map f 0 = ↑(f 0)
@[protected, simp]
theorem
with_top.map_one
{α : Type u}
[has_one α]
{β : Type u_1}
(f : α → β) :
with_top.map f 1 = ↑(f 1)
@[protected, instance]
def
with_top.zero_le_one_class
{α : Type u}
[has_one α]
[has_zero α]
[has_le α]
[zero_le_one_class α] :
Equations
@[protected, instance]
Equations
@[protected, instance]
def
with_top.covariant_class_add_le
{α : Type u}
[has_add α]
[has_le α]
[covariant_class α α has_add.add has_le.le] :
@[protected, instance]
def
with_top.covariant_class_swap_add_le
{α : Type u}
[has_add α]
[has_le α]
[covariant_class α α (function.swap has_add.add) has_le.le] :
@[protected, instance]
def
with_top.contravariant_class_add_lt
{α : Type u}
[has_add α]
[has_lt α]
[contravariant_class α α has_add.add has_lt.lt] :
@[protected, instance]
def
with_top.contravariant_class_swap_add_lt
{α : Type u}
[has_add α]
[has_lt α]
[contravariant_class α α (function.swap has_add.add) has_lt.lt] :
@[protected]
theorem
with_top.le_of_add_le_add_left
{α : Type u}
[has_add α]
{a b c : with_top α}
[has_le α]
[contravariant_class α α has_add.add has_le.le]
(ha : a ≠ ⊤)
(h : a + b ≤ a + c) :
b ≤ c
@[protected]
theorem
with_top.le_of_add_le_add_right
{α : Type u}
[has_add α]
{a b c : with_top α}
[has_le α]
[contravariant_class α α (function.swap has_add.add) has_le.le]
(ha : a ≠ ⊤)
(h : b + a ≤ c + a) :
b ≤ c
@[protected]
theorem
with_top.add_lt_add_left
{α : Type u}
[has_add α]
{a b c : with_top α}
[has_lt α]
[covariant_class α α has_add.add has_lt.lt]
(ha : a ≠ ⊤)
(h : b < c) :
@[protected]
theorem
with_top.add_lt_add_right
{α : Type u}
[has_add α]
{a b c : with_top α}
[has_lt α]
[covariant_class α α (function.swap has_add.add) has_lt.lt]
(ha : a ≠ ⊤)
(h : b < c) :
@[protected]
theorem
with_top.add_le_add_iff_left
{α : Type u}
[has_add α]
{a b c : with_top α}
[has_le α]
[covariant_class α α has_add.add has_le.le]
[contravariant_class α α has_add.add has_le.le]
(ha : a ≠ ⊤) :
@[protected]
theorem
with_top.add_le_add_iff_right
{α : Type u}
[has_add α]
{a b c : with_top α}
[has_le α]
[covariant_class α α (function.swap has_add.add) has_le.le]
[contravariant_class α α (function.swap has_add.add) has_le.le]
(ha : a ≠ ⊤) :
@[protected]
theorem
with_top.add_lt_add_iff_left
{α : Type u}
[has_add α]
{a b c : with_top α}
[has_lt α]
[covariant_class α α has_add.add has_lt.lt]
[contravariant_class α α has_add.add has_lt.lt]
(ha : a ≠ ⊤) :
@[protected]
theorem
with_top.add_lt_add_iff_right
{α : Type u}
[has_add α]
{a b c : with_top α}
[has_lt α]
[covariant_class α α (function.swap has_add.add) has_lt.lt]
[contravariant_class α α (function.swap has_add.add) has_lt.lt]
(ha : a ≠ ⊤) :
@[protected]
theorem
with_top.add_lt_add_of_le_of_lt
{α : Type u}
[has_add α]
{a b c d : with_top α}
[preorder α]
[covariant_class α α has_add.add has_lt.lt]
[covariant_class α α (function.swap has_add.add) has_le.le]
(ha : a ≠ ⊤)
(hab : a ≤ b)
(hcd : c < d) :
@[protected]
theorem
with_top.add_lt_add_of_lt_of_le
{α : Type u}
[has_add α]
{a b c d : with_top α}
[preorder α]
[covariant_class α α has_add.add has_le.le]
[covariant_class α α (function.swap has_add.add) has_lt.lt]
(hc : c ≠ ⊤)
(hab : a < b)
(hcd : c ≤ d) :
@[protected, simp]
theorem
with_top.map_add
{α : Type u}
{β : Type v}
[has_add α]
{F : Type u_1}
[has_add β]
[add_hom_class F α β]
(f : F)
(a b : with_top α) :
with_top.map ⇑f (a + b) = with_top.map ⇑f a + with_top.map ⇑f b
@[protected, instance]
Equations
@[protected, instance]
Equations
- with_top.add_comm_semigroup = {add := add_semigroup.add with_top.add_semigroup, add_assoc := _, add_comm := _}
@[protected, instance]
Equations
- with_top.add_zero_class = {zero := 0, add := has_add.add with_top.has_add, zero_add := _, add_zero := _}
@[protected, instance]
Equations
- with_top.add_monoid = {add := add_zero_class.add with_top.add_zero_class, add_assoc := _, zero := add_zero_class.zero with_top.add_zero_class, zero_add := _, add_zero := _, nsmul := nsmul_rec (add_zero_class.to_has_add (with_top α)), nsmul_zero' := _, nsmul_succ' := _}
@[protected, instance]
Equations
- with_top.add_comm_monoid = {add := add_monoid.add with_top.add_monoid, add_assoc := _, zero := add_monoid.zero with_top.add_monoid, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul with_top.add_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _}
@[protected, instance]
Equations
- with_top.add_monoid_with_one = {nat_cast := λ (n : ℕ), ↑↑n, add := add_monoid.add with_top.add_monoid, add_assoc := _, zero := add_monoid.zero with_top.add_monoid, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul with_top.add_monoid, nsmul_zero' := _, nsmul_succ' := _, one := 1, nat_cast_zero := _, nat_cast_succ := _}
@[protected, instance]
Equations
- with_top.add_comm_monoid_with_one = {nat_cast := add_monoid_with_one.nat_cast with_top.add_monoid_with_one, add := add_monoid_with_one.add with_top.add_monoid_with_one, add_assoc := _, zero := add_monoid_with_one.zero with_top.add_monoid_with_one, zero_add := _, add_zero := _, nsmul := add_monoid_with_one.nsmul with_top.add_monoid_with_one, nsmul_zero' := _, nsmul_succ' := _, one := add_monoid_with_one.one with_top.add_monoid_with_one, nat_cast_zero := _, nat_cast_succ := _, add_comm := _}
@[protected, instance]
Equations
- with_top.ordered_add_comm_monoid = {add := add_comm_monoid.add with_top.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero with_top.add_comm_monoid, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul with_top.add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, le := partial_order.le with_top.partial_order, lt := partial_order.lt with_top.partial_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _}
@[protected, instance]
def
with_top.linear_ordered_add_comm_monoid_with_top
{α : Type u}
[linear_ordered_add_comm_monoid α] :
Equations
- with_top.linear_ordered_add_comm_monoid_with_top = {le := linear_order.le with_top.linear_order, lt := linear_order.lt with_top.linear_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _, decidable_le := linear_order.decidable_le with_top.linear_order, decidable_eq := linear_order.decidable_eq with_top.linear_order, decidable_lt := linear_order.decidable_lt with_top.linear_order, max := linear_order.max with_top.linear_order, max_def := _, min := linear_order.min with_top.linear_order, min_def := _, add := ordered_add_comm_monoid.add with_top.ordered_add_comm_monoid, add_assoc := _, zero := ordered_add_comm_monoid.zero with_top.ordered_add_comm_monoid, zero_add := _, add_zero := _, nsmul := ordered_add_comm_monoid.nsmul with_top.ordered_add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, add_le_add_left := _, top := order_top.top with_top.order_top, le_top := _, top_add' := _}
@[protected, instance]
@[protected, instance]
Equations
- with_top.canonically_ordered_add_monoid = {add := ordered_add_comm_monoid.add with_top.ordered_add_comm_monoid, add_assoc := _, zero := ordered_add_comm_monoid.zero with_top.ordered_add_comm_monoid, zero_add := _, add_zero := _, nsmul := ordered_add_comm_monoid.nsmul with_top.ordered_add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, le := ordered_add_comm_monoid.le with_top.ordered_add_comm_monoid, lt := ordered_add_comm_monoid.lt with_top.ordered_add_comm_monoid, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _, bot := order_bot.bot with_top.order_bot, bot_le := _, exists_add_of_le := _, le_self_add := _}
@[protected, instance]
def
with_top.canonically_linear_ordered_add_monoid
{α : Type u}
[canonically_linear_ordered_add_monoid α] :
Equations
- with_top.canonically_linear_ordered_add_monoid = {add := canonically_ordered_add_monoid.add with_top.canonically_ordered_add_monoid, add_assoc := _, zero := canonically_ordered_add_monoid.zero with_top.canonically_ordered_add_monoid, zero_add := _, add_zero := _, nsmul := canonically_ordered_add_monoid.nsmul with_top.canonically_ordered_add_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, le := canonically_ordered_add_monoid.le with_top.canonically_ordered_add_monoid, lt := canonically_ordered_add_monoid.lt with_top.canonically_ordered_add_monoid, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _, bot := canonically_ordered_add_monoid.bot with_top.canonically_ordered_add_monoid, bot_le := _, exists_add_of_le := _, le_self_add := _, le_total := _, decidable_le := linear_order.decidable_le with_top.linear_order, decidable_eq := linear_order.decidable_eq with_top.linear_order, decidable_lt := linear_order.decidable_lt with_top.linear_order, max := linear_order.max with_top.linear_order, max_def := _, min := linear_order.min with_top.linear_order, min_def := _}
@[simp, norm_cast]
Coercion from α
to with_top α
as an add_monoid_hom
.
Equations
- with_top.coe_add_hom = {to_fun := coe coe_to_lift, map_zero' := _, map_add' := _}
@[simp]
@[simp, norm_cast]
@[protected]
A version of with_top.map
for one_hom
s.
Equations
- f.with_top_map = {to_fun := with_top.map ⇑f, map_one' := _}
@[simp]
theorem
zero_hom.with_top_map_apply
{M : Type u_1}
{N : Type u_2}
[has_zero M]
[has_zero N]
(f : zero_hom M N) :
⇑(f.with_top_map) = with_top.map ⇑f
@[simp]
theorem
one_hom.with_top_map_apply
{M : Type u_1}
{N : Type u_2}
[has_one M]
[has_one N]
(f : one_hom M N) :
⇑(f.with_top_map) = with_top.map ⇑f
@[protected]
def
zero_hom.with_top_map
{M : Type u_1}
{N : Type u_2}
[has_zero M]
[has_zero N]
(f : zero_hom M N) :
A version of with_top.map
for zero_hom
s
Equations
- f.with_top_map = {to_fun := with_top.map ⇑f, map_zero' := _}
@[protected]
A version of with_top.map
for add_hom
s.
Equations
- f.with_top_map = {to_fun := with_top.map ⇑f, map_add' := _}
@[simp]
theorem
add_hom.with_top_map_apply
{M : Type u_1}
{N : Type u_2}
[has_add M]
[has_add N]
(f : add_hom M N) :
⇑(f.with_top_map) = with_top.map ⇑f
@[simp]
theorem
add_monoid_hom.with_top_map_apply
{M : Type u_1}
{N : Type u_2}
[add_zero_class M]
[add_zero_class N]
(f : M →+ N) :
⇑(f.with_top_map) = with_top.map ⇑f
@[protected]
def
add_monoid_hom.with_top_map
{M : Type u_1}
{N : Type u_2}
[add_zero_class M]
[add_zero_class N]
(f : M →+ N) :
A version of with_top.map
for add_monoid_hom
s.
Equations
- f.with_top_map = {to_fun := with_top.map ⇑f, map_zero' := _, map_add' := _}
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]
def
with_bot.zero_le_one_class
{α : Type u}
[has_zero α]
[has_one α]
[has_le α]
[zero_le_one_class α] :
Equations
@[simp]
@[simp]
@[simp]
@[simp]
@[protected, simp]
theorem
with_bot.map_zero
{α : Type u}
{β : Type u_1}
[has_zero α]
(f : α → β) :
with_bot.map f 0 = ↑(f 0)
@[protected, simp]
theorem
with_bot.map_one
{α : Type u}
{β : Type u_1}
[has_one α]
(f : α → β) :
with_bot.map f 1 = ↑(f 1)
@[norm_cast]
@[protected, simp]
theorem
with_bot.map_add
{α : Type u}
{β : Type v}
[has_add α]
{F : Type u_1}
[has_add β]
[add_hom_class F α β]
(f : F)
(a b : with_bot α) :
with_bot.map ⇑f (a + b) = with_bot.map ⇑f a + with_bot.map ⇑f b
@[protected]
A version of with_bot.map
for one_hom
s.
Equations
- f.with_bot_map = {to_fun := with_bot.map ⇑f, map_one' := _}
@[simp]
theorem
zero_hom.with_bot_map_apply
{M : Type u_1}
{N : Type u_2}
[has_zero M]
[has_zero N]
(f : zero_hom M N) :
⇑(f.with_bot_map) = with_bot.map ⇑f
@[simp]
theorem
one_hom.with_bot_map_apply
{M : Type u_1}
{N : Type u_2}
[has_one M]
[has_one N]
(f : one_hom M N) :
⇑(f.with_bot_map) = with_bot.map ⇑f
@[protected]
def
zero_hom.with_bot_map
{M : Type u_1}
{N : Type u_2}
[has_zero M]
[has_zero N]
(f : zero_hom M N) :
A version of with_bot.map
for zero_hom
s
Equations
- f.with_bot_map = {to_fun := with_bot.map ⇑f, map_zero' := _}
@[simp]
theorem
add_hom.with_bot_map_apply
{M : Type u_1}
{N : Type u_2}
[has_add M]
[has_add N]
(f : add_hom M N) :
⇑(f.with_bot_map) = with_bot.map ⇑f
@[protected]
A version of with_bot.map
for add_hom
s.
Equations
- f.with_bot_map = {to_fun := with_bot.map ⇑f, map_add' := _}
@[protected]
def
add_monoid_hom.with_bot_map
{M : Type u_1}
{N : Type u_2}
[add_zero_class M]
[add_zero_class N]
(f : M →+ N) :
A version of with_bot.map
for add_monoid_hom
s.
Equations
- f.with_bot_map = {to_fun := with_bot.map ⇑f, map_zero' := _, map_add' := _}
@[simp]
theorem
add_monoid_hom.with_bot_map_apply
{M : Type u_1}
{N : Type u_2}
[add_zero_class M]
[add_zero_class N]
(f : M →+ N) :
⇑(f.with_bot_map) = with_bot.map ⇑f
@[protected, instance]
def
with_bot.covariant_class_add_le
{α : Type u}
[has_add α]
[preorder α]
[covariant_class α α has_add.add has_le.le] :
@[protected, instance]
def
with_bot.covariant_class_swap_add_le
{α : Type u}
[has_add α]
[preorder α]
[covariant_class α α (function.swap has_add.add) has_le.le] :
@[protected, instance]
def
with_bot.contravariant_class_add_lt
{α : Type u}
[has_add α]
[preorder α]
[contravariant_class α α has_add.add has_lt.lt] :
@[protected, instance]
def
with_bot.contravariant_class_swap_add_lt
{α : Type u}
[has_add α]
[preorder α]
[contravariant_class α α (function.swap has_add.add) has_lt.lt] :
@[protected]
theorem
with_bot.le_of_add_le_add_left
{α : Type u}
[has_add α]
{a b c : with_bot α}
[preorder α]
[contravariant_class α α has_add.add has_le.le]
(ha : a ≠ ⊥)
(h : a + b ≤ a + c) :
b ≤ c
@[protected]
theorem
with_bot.le_of_add_le_add_right
{α : Type u}
[has_add α]
{a b c : with_bot α}
[preorder α]
[contravariant_class α α (function.swap has_add.add) has_le.le]
(ha : a ≠ ⊥)
(h : b + a ≤ c + a) :
b ≤ c
@[protected]
theorem
with_bot.add_lt_add_left
{α : Type u}
[has_add α]
{a b c : with_bot α}
[preorder α]
[covariant_class α α has_add.add has_lt.lt]
(ha : a ≠ ⊥)
(h : b < c) :
@[protected]
theorem
with_bot.add_lt_add_right
{α : Type u}
[has_add α]
{a b c : with_bot α}
[preorder α]
[covariant_class α α (function.swap has_add.add) has_lt.lt]
(ha : a ≠ ⊥)
(h : b < c) :
@[protected]
theorem
with_bot.add_le_add_iff_left
{α : Type u}
[has_add α]
{a b c : with_bot α}
[preorder α]
[covariant_class α α has_add.add has_le.le]
[contravariant_class α α has_add.add has_le.le]
(ha : a ≠ ⊥) :
@[protected]
theorem
with_bot.add_le_add_iff_right
{α : Type u}
[has_add α]
{a b c : with_bot α}
[preorder α]
[covariant_class α α (function.swap has_add.add) has_le.le]
[contravariant_class α α (function.swap has_add.add) has_le.le]
(ha : a ≠ ⊥) :
@[protected]
theorem
with_bot.add_lt_add_iff_left
{α : Type u}
[has_add α]
{a b c : with_bot α}
[preorder α]
[covariant_class α α has_add.add has_lt.lt]
[contravariant_class α α has_add.add has_lt.lt]
(ha : a ≠ ⊥) :
@[protected]
theorem
with_bot.add_lt_add_iff_right
{α : Type u}
[has_add α]
{a b c : with_bot α}
[preorder α]
[covariant_class α α (function.swap has_add.add) has_lt.lt]
[contravariant_class α α (function.swap has_add.add) has_lt.lt]
(ha : a ≠ ⊥) :
@[protected]
theorem
with_bot.add_lt_add_of_le_of_lt
{α : Type u}
[has_add α]
{a b c d : with_bot α}
[preorder α]
[covariant_class α α has_add.add has_lt.lt]
[covariant_class α α (function.swap has_add.add) has_le.le]
(hb : b ≠ ⊥)
(hab : a ≤ b)
(hcd : c < d) :
@[protected]
theorem
with_bot.add_lt_add_of_lt_of_le
{α : Type u}
[has_add α]
{a b c d : with_bot α}
[preorder α]
[covariant_class α α has_add.add has_le.le]
[covariant_class α α (function.swap has_add.add) has_lt.lt]
(hd : d ≠ ⊥)
(hab : a < b)
(hcd : c ≤ d) :
@[protected, instance]
Equations
- with_bot.ordered_add_comm_monoid = {add := add_comm_monoid.add with_bot.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero with_bot.add_comm_monoid, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul with_bot.add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, le := partial_order.le with_bot.partial_order, lt := partial_order.lt with_bot.partial_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _}
@[protected, instance]
Equations
- with_bot.linear_ordered_add_comm_monoid = {le := linear_order.le with_bot.linear_order, lt := linear_order.lt with_bot.linear_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _, decidable_le := linear_order.decidable_le with_bot.linear_order, decidable_eq := linear_order.decidable_eq with_bot.linear_order, decidable_lt := linear_order.decidable_lt with_bot.linear_order, max := linear_order.max with_bot.linear_order, max_def := _, min := linear_order.min with_bot.linear_order, min_def := _, add := ordered_add_comm_monoid.add with_bot.ordered_add_comm_monoid, add_assoc := _, zero := ordered_add_comm_monoid.zero with_bot.ordered_add_comm_monoid, zero_add := _, add_zero := _, nsmul := ordered_add_comm_monoid.nsmul with_bot.ordered_add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, add_le_add_left := _}