Adjoining a zero/one to semigroups and related algebraic structures #
This file contains different results about adjoining an element to an algebraic structure which then
behaves like a zero or a one. An example is adjoining a one to a semigroup to obtain a monoid. That
this provides an example of an adjunction is proved in algebra.category.Mon.adjunctions
.
Another result says that adjoining to a group an element zero
gives a group_with_zero
. For more
information about these structures (which are not that standard in informal mathematics, see
algebra.group_with_zero.basic
)
Equations
Equations
Equations
- with_one.has_one = {one := none α}
Equations
- with_zero.has_zero = {zero := none α}
Equations
Equations
Equations
- with_one.has_inv = {inv := λ (a : with_one α), option.map has_inv.inv a}
Equations
- with_zero.has_neg = {neg := λ (a : with_zero α), option.map has_neg.neg a}
Equations
- with_one.inhabited = {default := 1}
Equations
- with_zero.inhabited = {default := 0}
Equations
- with_zero.has_coe_t = {coe := some α}
Equations
- with_one.has_coe_t = {coe := some α}
Equations
- with_zero.can_lift = {coe := coe coe_to_lift, cond := λ (a : with_zero α), a ≠ 0, prf := _}
Equations
- with_one.can_lift = {coe := coe coe_to_lift, cond := λ (a : with_one α), a ≠ 1, prf := _}
Equations
- with_zero.add_zero_class = {zero := 0, add := has_add.add with_zero.has_add, zero_add := _, add_zero := _}
Equations
- with_one.mul_one_class = {one := 1, mul := has_mul.mul with_one.has_mul, one_mul := _, mul_one := _}
Equations
- with_zero.add_monoid = {add := add_zero_class.add with_zero.add_zero_class, add_assoc := _, zero := add_zero_class.zero with_zero.add_zero_class, zero_add := _, add_zero := _, nsmul := nsmul_rec (add_zero_class.to_has_add (with_zero α)), nsmul_zero' := _, nsmul_succ' := _}
Equations
- with_one.monoid = {mul := mul_one_class.mul with_one.mul_one_class, mul_assoc := _, one := mul_one_class.one with_one.mul_one_class, one_mul := _, mul_one := _, npow := npow_rec (mul_one_class.to_has_mul (with_one α)), npow_zero' := _, npow_succ' := _}
Equations
- with_zero.add_comm_monoid = {add := add_monoid.add with_zero.add_monoid, add_assoc := _, zero := add_monoid.zero with_zero.add_monoid, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul with_zero.add_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _}
Equations
- with_one.comm_monoid = {mul := monoid.mul with_one.monoid, mul_assoc := _, one := monoid.one with_one.monoid, one_mul := _, mul_one := _, npow := monoid.npow with_one.monoid, npow_zero' := _, npow_succ' := _, mul_comm := _}
coe
as a bundled morphism
Equations
- with_zero.coe_add_hom = {to_fun := coe coe_to_lift, map_add' := _}
coe
as a bundled morphism
Equations
- with_one.coe_mul_hom = {to_fun := coe coe_to_lift, map_mul' := _}
Lift an add_semigroup homomorphism f
to a bundled add_monoid homorphism.
Lift a semigroup homomorphism f
to a bundled monoid homorphism.
A version of equiv.option_congr
for with_zero
.
Equations
- e.with_zero_congr = {to_fun := ⇑(with_zero.map e.to_add_hom), inv_fun := ⇑(with_zero.map e.symm.to_add_hom), left_inv := _, right_inv := _, map_add' := _}
A version of equiv.option_congr
for with_one
.
Equations
- e.with_one_congr = {to_fun := ⇑(with_one.map e.to_mul_hom), inv_fun := ⇑(with_one.map e.symm.to_mul_hom), left_inv := _, right_inv := _, map_mul' := _}
Equations
- with_zero.has_one = {one := ↑1}
Equations
- with_zero.mul_zero_class = {mul := λ (o₁ o₂ : with_zero α), option.bind o₁ (λ (a : α), option.map (λ (b : α), a * b) o₂), zero := 0, zero_mul := _, mul_zero := _}
Equations
Equations
Equations
- with_zero.mul_zero_one_class = {one := 1, mul := mul_zero_class.mul with_zero.mul_zero_class, one_mul := _, mul_one := _, zero := mul_zero_class.zero with_zero.mul_zero_class, zero_mul := _, mul_zero := _}
Equations
- with_zero.monoid_with_zero = {mul := mul_zero_one_class.mul with_zero.mul_zero_one_class, mul_assoc := _, one := mul_zero_one_class.one with_zero.mul_zero_one_class, one_mul := _, mul_one := _, npow := λ (n : ℕ) (x : with_zero α), x ^ n, npow_zero' := _, npow_succ' := _, zero := mul_zero_one_class.zero with_zero.mul_zero_one_class, zero_mul := _, mul_zero := _}
Equations
- with_zero.comm_monoid_with_zero = {mul := monoid_with_zero.mul with_zero.monoid_with_zero, mul_assoc := _, one := monoid_with_zero.one with_zero.monoid_with_zero, one_mul := _, mul_one := _, npow := monoid_with_zero.npow with_zero.monoid_with_zero, npow_zero' := _, npow_succ' := _, mul_comm := _, zero := monoid_with_zero.zero with_zero.monoid_with_zero, zero_mul := _, mul_zero := _}
Given an inverse operation on α
there is an inverse operation
on with_zero α
sending 0
to 0
Equations
- with_zero.has_inv = {inv := λ (a : with_zero α), option.map has_inv.inv a}
Equations
- with_zero.has_div = {div := λ (o₁ o₂ : with_zero α), option.bind o₁ (λ (a : α), option.map (λ (b : α), a / b) o₂)}
Equations
- with_zero.int.has_pow = {pow := λ (x : with_zero α) (n : ℤ), with_zero.int.has_pow._match_1 x n}
- with_zero.int.has_pow._match_1 (some x) n = ↑(x ^ n)
- with_zero.int.has_pow._match_1 none -[1+ n] = 0
- with_zero.int.has_pow._match_1 none (int.of_nat n.succ) = 0
- with_zero.int.has_pow._match_1 none (int.of_nat 0) = 1
Equations
- with_zero.div_inv_monoid = {mul := monoid_with_zero.mul with_zero.monoid_with_zero, mul_assoc := _, one := monoid_with_zero.one with_zero.monoid_with_zero, one_mul := _, mul_one := _, npow := monoid_with_zero.npow with_zero.monoid_with_zero, npow_zero' := _, npow_succ' := _, inv := has_inv.inv with_zero.has_inv, div := has_div.div with_zero.has_div, div_eq_mul_inv := _, zpow := λ (n : ℤ) (x : with_zero α), x ^ n, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _}
if G
is a group then with_zero G
is a group with zero.
Equations
- with_zero.group_with_zero = {mul := monoid_with_zero.mul with_zero.monoid_with_zero, mul_assoc := _, one := monoid_with_zero.one with_zero.monoid_with_zero, one_mul := _, mul_one := _, npow := monoid_with_zero.npow with_zero.monoid_with_zero, npow_zero' := _, npow_succ' := _, zero := monoid_with_zero.zero with_zero.monoid_with_zero, zero_mul := _, mul_zero := _, inv := div_inv_monoid.inv with_zero.div_inv_monoid, div := div_inv_monoid.div with_zero.div_inv_monoid, div_eq_mul_inv := _, zpow := div_inv_monoid.zpow with_zero.div_inv_monoid, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, exists_pair_ne := _, inv_zero := _, mul_inv_cancel := _}
Equations
- with_zero.comm_group_with_zero = {mul := group_with_zero.mul with_zero.group_with_zero, mul_assoc := _, one := group_with_zero.one with_zero.group_with_zero, one_mul := _, mul_one := _, npow := group_with_zero.npow with_zero.group_with_zero, npow_zero' := _, npow_succ' := _, mul_comm := _, zero := group_with_zero.zero with_zero.group_with_zero, zero_mul := _, mul_zero := _, inv := group_with_zero.inv with_zero.group_with_zero, div := group_with_zero.div with_zero.group_with_zero, div_eq_mul_inv := _, zpow := group_with_zero.zpow with_zero.group_with_zero, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, exists_pair_ne := _, inv_zero := _, mul_inv_cancel := _}
Equations
- with_zero.semiring = {add := add_comm_monoid.add with_zero.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero with_zero.add_comm_monoid, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul with_zero.add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := mul_zero_class.mul with_zero.mul_zero_class, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := monoid_with_zero.one with_zero.monoid_with_zero, one_mul := _, mul_one := _, npow := monoid_with_zero.npow with_zero.monoid_with_zero, npow_zero' := _, npow_succ' := _}