@[instance]
Equations
- enat.has_zero = {zero := roption.some 0}
@[instance]
Equations
- enat.has_one = {one := roption.some 1}
@[instance]
Equations
- enat.has_coe = {coe := roption.some ℕ}
@[instance]
Equations
@[instance]
Equations
- enat.add_comm_monoid = {add := has_add.add enat.has_add, add_assoc := enat.add_comm_monoid._proof_1, zero := 0, zero_add := enat.add_comm_monoid._proof_2, add_zero := enat.add_comm_monoid._proof_3, add_comm := enat.add_comm_monoid._proof_4}
@[instance]
Equations
- enat.has_top = {top := roption.none ℕ}
@[instance]
Equations
- enat.partial_order = {le := has_le.le enat.has_le, lt := preorder.lt._default has_le.le, le_refl := enat.partial_order._proof_1, le_trans := enat.partial_order._proof_2, lt_iff_le_not_le := enat.partial_order._proof_3, le_antisymm := enat.partial_order._proof_4}
@[instance]
Equations
- enat.semilattice_sup_bot = {bot := ⊥, le := partial_order.le enat.partial_order, lt := partial_order.lt enat.partial_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, bot_le := enat.semilattice_sup_bot._proof_1, sup := has_sup.sup enat.has_sup, le_sup_left := enat.semilattice_sup_bot._proof_2, le_sup_right := enat.semilattice_sup_bot._proof_3, sup_le := enat.semilattice_sup_bot._proof_4}
@[instance]
Equations
- enat.order_top = {top := ⊤, le := semilattice_sup_bot.le enat.semilattice_sup_bot, lt := semilattice_sup_bot.lt enat.semilattice_sup_bot, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_top := enat.order_top._proof_1}
@[instance]
Equations
- enat.decidable_linear_order = {le := partial_order.le enat.partial_order, lt := partial_order.lt enat.partial_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := enat.decidable_linear_order._proof_1, decidable_le := classical.dec_rel has_le.le, decidable_eq := decidable_eq_of_decidable_le (classical.dec_rel has_le.le), decidable_lt := decidable_lt_of_decidable_le (classical.dec_rel has_le.le)}
@[instance]
Equations
- enat.bounded_lattice = {sup := semilattice_sup_bot.sup enat.semilattice_sup_bot, le := order_top.le enat.order_top, lt := order_top.lt enat.order_top, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := min enat.decidable_linear_order, inf_le_left := _, inf_le_right := _, le_inf := enat.bounded_lattice._proof_1, top := order_top.top enat.order_top, le_top := _, bot := semilattice_sup_bot.bot enat.semilattice_sup_bot, bot_le := _}
@[instance]
Equations
- enat.ordered_add_comm_monoid = {add := add_comm_monoid.add enat.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero enat.add_comm_monoid, zero_add := _, add_zero := _, add_comm := _, le := decidable_linear_order.le enat.decidable_linear_order, lt := decidable_linear_order.lt enat.decidable_linear_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := enat.ordered_add_comm_monoid._proof_1, lt_of_add_lt_add_left := enat.ordered_add_comm_monoid._proof_2}
@[instance]
Equations
- enat.canonically_ordered_add_monoid = {add := ordered_add_comm_monoid.add enat.ordered_add_comm_monoid, add_assoc := _, zero := ordered_add_comm_monoid.zero enat.ordered_add_comm_monoid, zero_add := _, add_zero := _, add_comm := _, le := semilattice_sup_bot.le enat.semilattice_sup_bot, lt := semilattice_sup_bot.lt enat.semilattice_sup_bot, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _, lt_of_add_lt_add_left := _, bot := semilattice_sup_bot.bot enat.semilattice_sup_bot, bot_le := _, le_iff_exists_add := enat.canonically_ordered_add_monoid._proof_1}
@[simp]
theorem
enat.to_with_top_le
{x y : enat}
[decidable x.dom]
[decidable y.dom] :
x.to_with_top ≤ y.to_with_top ↔ x ≤ y
@[simp]
theorem
enat.to_with_top_lt
{x y : enat}
[decidable x.dom]
[decidable y.dom] :
x.to_with_top < y.to_with_top ↔ x < y
Order isomorphism between enat
and with_top ℕ
.
Equations
- enat.with_top_equiv = {to_fun := λ (x : enat), x.to_with_top, inv_fun := λ (x : with_top ℕ), enat.with_top_equiv._match_1 x, left_inv := enat.with_top_equiv._proof_1, right_inv := enat.with_top_equiv._proof_2}
- enat.with_top_equiv._match_1 (option.some n) = ↑n
- enat.with_top_equiv._match_1 option.none = ⊤
@[simp]
theorem
enat.with_top_equiv_le
{x y : enat} :
⇑enat.with_top_equiv x ≤ ⇑enat.with_top_equiv y ↔ x ≤ y
@[simp]
theorem
enat.with_top_equiv_lt
{x y : enat} :
⇑enat.with_top_equiv x < ⇑enat.with_top_equiv y ↔ x < y
@[simp]
theorem
enat.with_top_equiv_symm_le
{x y : with_top ℕ} :
⇑(enat.with_top_equiv.symm) x ≤ ⇑(enat.with_top_equiv.symm) y ↔ x ≤ y
@[simp]
theorem
enat.with_top_equiv_symm_lt
{x y : with_top ℕ} :
⇑(enat.with_top_equiv.symm) x < ⇑(enat.with_top_equiv.symm) y ↔ x < y
@[instance]
Equations
- enat.has_well_founded = {r := has_lt.lt (preorder.to_has_lt enat), wf := enat.lt_wf}