Lifting algebraic data classes along injective/surjective maps #
This file provides definitions that are meant to deal with situations such as the following:
Suppose that G
is a group, and H
is a type endowed with
has_one H
, has_mul H
, and has_inv H
.
Suppose furthermore, that f : G → H
is a surjective map
that respects the multiplication, and the unit elements.
Then H
satisfies the group axioms.
The relevant definition in this case is function.surjective.group
.
Dually, there is also function.injective.group
.
And there are versions for (additive) (commutative) semigroups/monoids.
Injective #
A type endowed with *
is a semigroup,
if it admits an injective map that preserves *
to a semigroup.
See note [reducible non-instances].
Equations
- function.injective.semigroup f hf mul = {mul := has_mul.mul _inst_1, mul_assoc := _}
A type endowed with +
is an additive semigroup,
if it admits an injective map that preserves +
to an additive semigroup.
Equations
- function.injective.add_semigroup f hf mul = {add := has_add.add _inst_1, add_assoc := _}
A type endowed with +
is an additive commutative semigroup,
if it admits an injective map that preserves +
to an additive commutative semigroup.
Equations
- function.injective.add_comm_semigroup f hf mul = {add := add_semigroup.add (function.injective.add_semigroup f hf mul), add_assoc := _, add_comm := _}
A type endowed with *
is a commutative semigroup,
if it admits an injective map that preserves *
to a commutative semigroup.
See note [reducible non-instances].
Equations
- function.injective.comm_semigroup f hf mul = {mul := semigroup.mul (function.injective.semigroup f hf mul), mul_assoc := _, mul_comm := _}
A type endowed with *
is a left cancel semigroup,
if it admits an injective map that preserves *
to a left cancel semigroup.
See note [reducible non-instances].
Equations
- function.injective.left_cancel_semigroup f hf mul = {mul := has_mul.mul _inst_1, mul_assoc := _, mul_left_cancel := _}
A type endowed with +
is an additive left cancel semigroup,
if it admits an injective map that preserves +
to an additive left cancel semigroup.
Equations
- function.injective.add_left_cancel_semigroup f hf mul = {add := has_add.add _inst_1, add_assoc := _, add_left_cancel := _}
A type endowed with *
is a right cancel semigroup,
if it admits an injective map that preserves *
to a right cancel semigroup.
See note [reducible non-instances].
Equations
- function.injective.right_cancel_semigroup f hf mul = {mul := has_mul.mul _inst_1, mul_assoc := _, mul_right_cancel := _}
A type endowed with +
is an additive right cancel semigroup,
if it admits an injective map that preserves +
to an additive right cancel semigroup.
Equations
- function.injective.add_right_cancel_semigroup f hf mul = {add := has_add.add _inst_1, add_assoc := _, add_right_cancel := _}
A type endowed with 0
and +
is an add_zero_class,
if it admits an injective map that preserves 0
and +
to an add_zero_class.
Equations
- function.injective.add_zero_class f hf one mul = {zero := 0, add := has_add.add _inst_1, zero_add := _, add_zero := _}
A type endowed with 1
and *
is a mul_one_class,
if it admits an injective map that preserves 1
and *
to a mul_one_class.
See note [reducible non-instances].
Equations
- function.injective.mul_one_class f hf one mul = {one := 1, mul := has_mul.mul _inst_1, one_mul := _, mul_one := _}
A type endowed with 0
and +
is an additive monoid,
if it admits an injective map that preserves 0
and +
to an additive monoid.
Equations
- function.injective.add_monoid f hf one mul = {add := add_semigroup.add (function.injective.add_semigroup f hf mul), add_assoc := _, zero := add_zero_class.zero (function.injective.add_zero_class f hf one mul), zero_add := _, add_zero := _, nsmul := nsmul_rec (add_zero_class.to_has_add M₁), nsmul_zero' := _, nsmul_succ' := _}
A type endowed with 1
and *
is a monoid,
if it admits an injective map that preserves 1
and *
to a monoid.
See note [reducible non-instances].
Equations
- function.injective.monoid f hf one mul = {mul := semigroup.mul (function.injective.semigroup f hf mul), mul_assoc := _, one := mul_one_class.one (function.injective.mul_one_class f hf one mul), one_mul := _, mul_one := _, npow := npow_rec (mul_one_class.to_has_mul M₁), npow_zero' := _, npow_succ' := _}
A type endowed with 0
and +
is an additive monoid,
if it admits an injective map that preserves 0
and +
to an additive monoid.
This version takes a custom nsmul
as a [has_scalar ℕ M₁]
argument.
Equations
- function.injective.add_monoid_smul f hf one mul npow = {add := add_monoid.add (function.injective.add_monoid f hf one mul), add_assoc := _, zero := add_monoid.zero (function.injective.add_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := λ (n : ℕ) (x : M₁), n • x, nsmul_zero' := _, nsmul_succ' := _}
A type endowed with 1
and *
is a monoid,
if it admits an injective map that preserves 1
and *
to a monoid.
This version takes a custom npow
as a [has_pow M₁ ℕ]
argument.
See note [reducible non-instances].
Equations
- function.injective.monoid_pow f hf one mul npow = {mul := monoid.mul (function.injective.monoid f hf one mul), mul_assoc := _, one := monoid.one (function.injective.monoid f hf one mul), one_mul := _, mul_one := _, npow := λ (n : ℕ) (x : M₁), x ^ n, npow_zero' := _, npow_succ' := _}
A type endowed with 1
and *
is a left cancel monoid,
if it admits an injective map that preserves 1
and *
to a left cancel monoid.
See note [reducible non-instances].
Equations
- function.injective.left_cancel_monoid f hf one mul = {mul := left_cancel_semigroup.mul (function.injective.left_cancel_semigroup f hf mul), mul_assoc := _, mul_left_cancel := _, one := monoid.one (function.injective.monoid f hf one mul), one_mul := _, mul_one := _, npow := monoid.npow (function.injective.monoid f hf one mul), npow_zero' := _, npow_succ' := _}
A type endowed with 0
and +
is an additive left cancel monoid,
if it admits an injective map that preserves 0
and +
to an additive left cancel monoid.
Equations
- function.injective.add_left_cancel_monoid f hf one mul = {add := add_left_cancel_semigroup.add (function.injective.add_left_cancel_semigroup f hf mul), add_assoc := _, add_left_cancel := _, zero := add_monoid.zero (function.injective.add_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := add_monoid.nsmul (function.injective.add_monoid f hf one mul), nsmul_zero' := _, nsmul_succ' := _}
A type endowed with 1
and *
is a right cancel monoid,
if it admits an injective map that preserves 1
and *
to a right cancel monoid.
See note [reducible non-instances].
Equations
- function.injective.right_cancel_monoid f hf one mul = {mul := right_cancel_semigroup.mul (function.injective.right_cancel_semigroup f hf mul), mul_assoc := _, mul_right_cancel := _, one := monoid.one (function.injective.monoid f hf one mul), one_mul := _, mul_one := _, npow := monoid.npow (function.injective.monoid f hf one mul), npow_zero' := _, npow_succ' := _}
A type endowed with 0
and +
is an additive left cancel monoid,
if it admits an injective map that preserves 0
and +
to an additive left cancel monoid.
Equations
- function.injective.add_right_cancel_monoid f hf one mul = {add := add_right_cancel_semigroup.add (function.injective.add_right_cancel_semigroup f hf mul), add_assoc := _, add_right_cancel := _, zero := add_monoid.zero (function.injective.add_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := add_monoid.nsmul (function.injective.add_monoid f hf one mul), nsmul_zero' := _, nsmul_succ' := _}
A type endowed with 0
and +
is an additive left cancel monoid,
if it admits an injective map that preserves 0
and +
to an additive left cancel monoid.
Equations
- function.injective.add_cancel_monoid f hf one mul = {add := add_left_cancel_monoid.add (function.injective.add_left_cancel_monoid f hf one mul), add_assoc := _, add_left_cancel := _, zero := add_left_cancel_monoid.zero (function.injective.add_left_cancel_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := add_left_cancel_monoid.nsmul (function.injective.add_left_cancel_monoid f hf one mul), nsmul_zero' := _, nsmul_succ' := _, add_right_cancel := _}
A type endowed with 1
and *
is a cancel monoid,
if it admits an injective map that preserves 1
and *
to a cancel monoid.
See note [reducible non-instances].
Equations
- function.injective.cancel_monoid f hf one mul = {mul := left_cancel_monoid.mul (function.injective.left_cancel_monoid f hf one mul), mul_assoc := _, mul_left_cancel := _, one := left_cancel_monoid.one (function.injective.left_cancel_monoid f hf one mul), one_mul := _, mul_one := _, npow := left_cancel_monoid.npow (function.injective.left_cancel_monoid f hf one mul), npow_zero' := _, npow_succ' := _, mul_right_cancel := _}
A type endowed with 0
and +
is an additive commutative monoid,
if it admits an injective map that preserves 0
and +
to an additive commutative monoid.
Equations
- function.injective.add_comm_monoid f hf one mul = {add := add_comm_semigroup.add (function.injective.add_comm_semigroup f hf mul), add_assoc := _, zero := add_monoid.zero (function.injective.add_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := add_monoid.nsmul (function.injective.add_monoid f hf one mul), nsmul_zero' := _, nsmul_succ' := _, add_comm := _}
A type endowed with 1
and *
is a commutative monoid,
if it admits an injective map that preserves 1
and *
to a commutative monoid.
See note [reducible non-instances].
Equations
- function.injective.comm_monoid f hf one mul = {mul := comm_semigroup.mul (function.injective.comm_semigroup f hf mul), mul_assoc := _, one := monoid.one (function.injective.monoid f hf one mul), one_mul := _, mul_one := _, npow := monoid.npow (function.injective.monoid f hf one mul), npow_zero' := _, npow_succ' := _, mul_comm := _}
A type endowed with 0
and +
is an additive cancel commutative monoid,
if it admits an injective map that preserves 0
and +
to an additive cancel commutative monoid.
Equations
- function.injective.add_cancel_comm_monoid f hf one mul = {add := add_left_cancel_semigroup.add (function.injective.add_left_cancel_semigroup f hf mul), add_assoc := _, add_left_cancel := _, zero := add_comm_monoid.zero (function.injective.add_comm_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul (function.injective.add_comm_monoid f hf one mul), nsmul_zero' := _, nsmul_succ' := _, add_comm := _}
A type endowed with 1
and *
is a cancel commutative monoid,
if it admits an injective map that preserves 1
and *
to a cancel commutative monoid.
See note [reducible non-instances].
Equations
- function.injective.cancel_comm_monoid f hf one mul = {mul := left_cancel_semigroup.mul (function.injective.left_cancel_semigroup f hf mul), mul_assoc := _, mul_left_cancel := _, one := comm_monoid.one (function.injective.comm_monoid f hf one mul), one_mul := _, mul_one := _, npow := comm_monoid.npow (function.injective.comm_monoid f hf one mul), npow_zero' := _, npow_succ' := _, mul_comm := _}
A type endowed with 0
, +
, unary -
, and binary -
is a sub_neg_monoid
if it admits an injective map that preserves 0
, +
, unary -
, and binary -
to
a sub_neg_monoid
.
Equations
- function.injective.sub_neg_monoid f hf one mul inv div = {add := add_monoid.add (function.injective.add_monoid f hf one mul), add_assoc := _, zero := add_monoid.zero (function.injective.add_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := add_monoid.nsmul (function.injective.add_monoid f hf one mul), nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg _inst_3, sub := has_sub.sub _inst_4, sub_eq_add_neg := _, zsmul := zsmul_rec {neg := has_neg.neg _inst_3}, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _}
A type endowed with 1
, *
, ⁻¹
, and /
is a div_inv_monoid
if it admits an injective map that preserves 1
, *
, ⁻¹
, and /
to a div_inv_monoid
.
See note [reducible non-instances].
Equations
- function.injective.div_inv_monoid f hf one mul inv div = {mul := monoid.mul (function.injective.monoid f hf one mul), mul_assoc := _, one := monoid.one (function.injective.monoid f hf one mul), one_mul := _, mul_one := _, npow := monoid.npow (function.injective.monoid f hf one mul), npow_zero' := _, npow_succ' := _, inv := has_inv.inv _inst_3, div := has_div.div _inst_4, div_eq_mul_inv := _, zpow := zpow_rec {inv := has_inv.inv _inst_3}, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _}
A type endowed with 1
, *
, ⁻¹
, and /
is a div_inv_monoid
if it admits an injective map that preserves 1
, *
, ⁻¹
, and /
to a div_inv_monoid
.
This version takes custom npow
and zpow
as [has_pow M₁ ℕ]
and [has_pow M₁ ℤ]
arguments.
See note [reducible non-instances].
Equations
- function.injective.div_inv_monoid_pow f hf one mul inv div npow zpow = {mul := monoid.mul (function.injective.monoid_pow f hf one mul npow), mul_assoc := _, one := monoid.one (function.injective.monoid_pow f hf one mul npow), one_mul := _, mul_one := _, npow := monoid.npow (function.injective.monoid_pow f hf one mul npow), npow_zero' := _, npow_succ' := _, inv := div_inv_monoid.inv (function.injective.div_inv_monoid f hf one mul inv div), div := div_inv_monoid.div (function.injective.div_inv_monoid f hf one mul inv div), div_eq_mul_inv := _, zpow := λ (n : ℤ) (x : M₁), x ^ n, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _}
A type endowed with 0
, +
, unary -
, and binary -
is a sub_neg_monoid
if it admits an injective map that preserves 0
, +
, unary -
, and binary -
to
a sub_neg_monoid
.
This version takes custom nsmul
and zsmul
as [has_scalar ℕ M₁]
and
[has_scalar ℤ M₁]
arguments.
Equations
- function.injective.sub_neg_monoid_smul f hf one mul inv div npow zpow = {add := add_monoid.add (function.injective.add_monoid_smul f hf one mul npow), add_assoc := _, zero := add_monoid.zero (function.injective.add_monoid_smul f hf one mul npow), zero_add := _, add_zero := _, nsmul := add_monoid.nsmul (function.injective.add_monoid_smul f hf one mul npow), nsmul_zero' := _, nsmul_succ' := _, neg := sub_neg_monoid.neg (function.injective.sub_neg_monoid f hf one mul inv div), sub := sub_neg_monoid.sub (function.injective.sub_neg_monoid f hf one mul inv div), sub_eq_add_neg := _, zsmul := λ (n : ℤ) (x : M₁), n • x, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _}
A type endowed with 1
, *
and ⁻¹
is a group,
if it admits an injective map that preserves 1
, *
and ⁻¹
to a group.
See note [reducible non-instances].
Equations
- function.injective.group f hf one mul inv div = {mul := div_inv_monoid.mul (function.injective.div_inv_monoid f hf one mul inv div), mul_assoc := _, one := div_inv_monoid.one (function.injective.div_inv_monoid f hf one mul inv div), one_mul := _, mul_one := _, npow := div_inv_monoid.npow (function.injective.div_inv_monoid f hf one mul inv div), npow_zero' := _, npow_succ' := _, inv := div_inv_monoid.inv (function.injective.div_inv_monoid f hf one mul inv div), div := div_inv_monoid.div (function.injective.div_inv_monoid f hf one mul inv div), div_eq_mul_inv := _, zpow := div_inv_monoid.zpow (function.injective.div_inv_monoid f hf one mul inv div), zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _}
A type endowed with 0
and +
is an additive group,
if it admits an injective map that preserves 0
and +
to an additive group.
Equations
- function.injective.add_group f hf one mul inv div = {add := sub_neg_monoid.add (function.injective.sub_neg_monoid f hf one mul inv div), add_assoc := _, zero := sub_neg_monoid.zero (function.injective.sub_neg_monoid f hf one mul inv div), zero_add := _, add_zero := _, nsmul := sub_neg_monoid.nsmul (function.injective.sub_neg_monoid f hf one mul inv div), nsmul_zero' := _, nsmul_succ' := _, neg := sub_neg_monoid.neg (function.injective.sub_neg_monoid f hf one mul inv div), sub := sub_neg_monoid.sub (function.injective.sub_neg_monoid f hf one mul inv div), sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul (function.injective.sub_neg_monoid f hf one mul inv div), zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _}
A type endowed with 0
and +
is an additive group,
if it admits an injective map that preserves 0
and +
to an additive group.
This version takes custom nsmul
and zsmul
as [has_scalar ℕ M₁]
and
[has_scalar ℤ M₁]
arguments.
Equations
- function.injective.add_group_smul f hf one mul inv div npow zpow = {add := sub_neg_monoid.add (function.injective.sub_neg_monoid_smul f hf one mul inv div npow zpow), add_assoc := _, zero := sub_neg_monoid.zero (function.injective.sub_neg_monoid_smul f hf one mul inv div npow zpow), zero_add := _, add_zero := _, nsmul := sub_neg_monoid.nsmul (function.injective.sub_neg_monoid_smul f hf one mul inv div npow zpow), nsmul_zero' := _, nsmul_succ' := _, neg := sub_neg_monoid.neg (function.injective.sub_neg_monoid_smul f hf one mul inv div npow zpow), sub := sub_neg_monoid.sub (function.injective.sub_neg_monoid_smul f hf one mul inv div npow zpow), sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul (function.injective.sub_neg_monoid_smul f hf one mul inv div npow zpow), zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _}
A type endowed with 1
, *
and ⁻¹
is a group,
if it admits an injective map that preserves 1
, *
and ⁻¹
to a group.
This version takes custom npow
and zpow
as [has_pow M₁ ℕ]
and [has_pow M₁ ℤ]
arguments.
See note [reducible non-instances].
Equations
- function.injective.group_pow f hf one mul inv div npow zpow = {mul := div_inv_monoid.mul (function.injective.div_inv_monoid_pow f hf one mul inv div npow zpow), mul_assoc := _, one := div_inv_monoid.one (function.injective.div_inv_monoid_pow f hf one mul inv div npow zpow), one_mul := _, mul_one := _, npow := div_inv_monoid.npow (function.injective.div_inv_monoid_pow f hf one mul inv div npow zpow), npow_zero' := _, npow_succ' := _, inv := div_inv_monoid.inv (function.injective.div_inv_monoid_pow f hf one mul inv div npow zpow), div := div_inv_monoid.div (function.injective.div_inv_monoid_pow f hf one mul inv div npow zpow), div_eq_mul_inv := _, zpow := div_inv_monoid.zpow (function.injective.div_inv_monoid_pow f hf one mul inv div npow zpow), zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _}
A type endowed with 1
, *
and ⁻¹
is a commutative group,
if it admits an injective map that preserves 1
, *
and ⁻¹
to a commutative group.
See note [reducible non-instances].
Equations
- function.injective.comm_group f hf one mul inv div = {mul := comm_monoid.mul (function.injective.comm_monoid f hf one mul), mul_assoc := _, one := comm_monoid.one (function.injective.comm_monoid f hf one mul), one_mul := _, mul_one := _, npow := comm_monoid.npow (function.injective.comm_monoid f hf one mul), npow_zero' := _, npow_succ' := _, inv := group.inv (function.injective.group f hf one mul inv div), div := group.div (function.injective.group f hf one mul inv div), div_eq_mul_inv := _, zpow := group.zpow (function.injective.group f hf one mul inv div), zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _, mul_comm := _}
A type endowed with 0
and +
is an additive commutative group,
if it admits an injective map that preserves 0
and +
to an additive commutative group.
Equations
- function.injective.add_comm_group f hf one mul inv div = {add := add_comm_monoid.add (function.injective.add_comm_monoid f hf one mul), add_assoc := _, zero := add_comm_monoid.zero (function.injective.add_comm_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul (function.injective.add_comm_monoid f hf one mul), nsmul_zero' := _, nsmul_succ' := _, neg := add_group.neg (function.injective.add_group f hf one mul inv div), sub := add_group.sub (function.injective.add_group f hf one mul inv div), sub_eq_add_neg := _, zsmul := add_group.zsmul (function.injective.add_group f hf one mul inv div), zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _}
Surjective #
A type endowed with +
is an additive semigroup,
if it admits a surjective map that preserves +
from an additive semigroup.
Equations
- function.surjective.add_semigroup f hf mul = {add := has_add.add _inst_1, add_assoc := _}
A type endowed with *
is a semigroup,
if it admits a surjective map that preserves *
from a semigroup.
See note [reducible non-instances].
Equations
- function.surjective.semigroup f hf mul = {mul := has_mul.mul _inst_1, mul_assoc := _}
A type endowed with *
is a commutative semigroup,
if it admits a surjective map that preserves *
from a commutative semigroup.
See note [reducible non-instances].
Equations
- function.surjective.comm_semigroup f hf mul = {mul := semigroup.mul (function.surjective.semigroup f hf mul), mul_assoc := _, mul_comm := _}
A type endowed with +
is an additive commutative semigroup,
if it admits a surjective map that preserves +
from an additive commutative semigroup.
Equations
- function.surjective.add_comm_semigroup f hf mul = {add := add_semigroup.add (function.surjective.add_semigroup f hf mul), add_assoc := _, add_comm := _}
A type endowed with 1
and *
is a mul_one_class,
if it admits a surjective map that preserves 1
and *
from a mul_one_class.
See note [reducible non-instances].
Equations
- function.surjective.mul_one_class f hf one mul = {one := 1, mul := has_mul.mul _inst_1, one_mul := _, mul_one := _}
A type endowed with 0
and +
is an add_zero_class,
if it admits a surjective map that preserves 0
and +
to an add_zero_class.
Equations
- function.surjective.add_zero_class f hf one mul = {zero := 0, add := has_add.add _inst_1, zero_add := _, add_zero := _}
A type endowed with 1
and *
is a monoid,
if it admits a surjective map that preserves 1
and *
from a monoid.
See note [reducible non-instances].
Equations
- function.surjective.monoid f hf one mul = {mul := semigroup.mul (function.surjective.semigroup f hf mul), mul_assoc := _, one := mul_one_class.one (function.surjective.mul_one_class f hf one mul), one_mul := _, mul_one := _, npow := npow_rec (mul_one_class.to_has_mul M₂), npow_zero' := _, npow_succ' := _}
A type endowed with 0
and +
is an additive monoid,
if it admits a surjective map that preserves 0
and +
to an additive monoid.
Equations
- function.surjective.add_monoid f hf one mul = {add := add_semigroup.add (function.surjective.add_semigroup f hf mul), add_assoc := _, zero := add_zero_class.zero (function.surjective.add_zero_class f hf one mul), zero_add := _, add_zero := _, nsmul := nsmul_rec (add_zero_class.to_has_add M₂), nsmul_zero' := _, nsmul_succ' := _}
A type endowed with 0
and +
is an additive monoid,
if it admits a surjective map that preserves 0
and +
to an additive monoid.
This version takes a custom nsmul
as a [has_scalar ℕ M₂]
argument.
Equations
- function.surjective.add_monoid_smul f hf one mul npow = {add := add_monoid.add (function.surjective.add_monoid f hf one mul), add_assoc := _, zero := add_monoid.zero (function.surjective.add_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := λ (n : ℕ) (x : M₂), n • x, nsmul_zero' := _, nsmul_succ' := _}
A type endowed with 1
and *
is a monoid,
if it admits a surjective map that preserves 1
and *
to a monoid.
This version takes a custom npow
as a [has_pow M₂ ℕ]
argument.
See note [reducible non-instances].
Equations
- function.surjective.monoid_pow f hf one mul npow = {mul := monoid.mul (function.surjective.monoid f hf one mul), mul_assoc := _, one := monoid.one (function.surjective.monoid f hf one mul), one_mul := _, mul_one := _, npow := λ (n : ℕ) (x : M₂), x ^ n, npow_zero' := _, npow_succ' := _}
A type endowed with 0
and +
is an additive commutative monoid,
if it admits a surjective map that preserves 0
and +
to an additive commutative monoid.
Equations
- function.surjective.add_comm_monoid f hf one mul = {add := add_comm_semigroup.add (function.surjective.add_comm_semigroup f hf mul), add_assoc := _, zero := add_monoid.zero (function.surjective.add_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := add_monoid.nsmul (function.surjective.add_monoid f hf one mul), nsmul_zero' := _, nsmul_succ' := _, add_comm := _}
A type endowed with 1
and *
is a commutative monoid,
if it admits a surjective map that preserves 1
and *
from a commutative monoid.
See note [reducible non-instances].
Equations
- function.surjective.comm_monoid f hf one mul = {mul := comm_semigroup.mul (function.surjective.comm_semigroup f hf mul), mul_assoc := _, one := monoid.one (function.surjective.monoid f hf one mul), one_mul := _, mul_one := _, npow := monoid.npow (function.surjective.monoid f hf one mul), npow_zero' := _, npow_succ' := _, mul_comm := _}
A type endowed with 1
, *
, ⁻¹
, and /
is a div_inv_monoid
,
if it admits a surjective map that preserves 1
, *
, ⁻¹
, and /
from a div_inv_monoid
See note [reducible non-instances].
Equations
- function.surjective.div_inv_monoid f hf one mul inv div = {mul := monoid.mul (function.surjective.monoid f hf one mul), mul_assoc := _, one := monoid.one (function.surjective.monoid f hf one mul), one_mul := _, mul_one := _, npow := monoid.npow (function.surjective.monoid f hf one mul), npow_zero' := _, npow_succ' := _, inv := has_inv.inv _inst_3, div := has_div.div _inst_4, div_eq_mul_inv := _, zpow := zpow_rec {inv := has_inv.inv _inst_3}, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _}
A type endowed with 0
, +
, and -
(unary and binary) is an additive group,
if it admits a surjective map that preserves 0
, +
, and -
from a sub_neg_monoid
Equations
- function.surjective.sub_neg_monoid f hf one mul inv div = {add := add_monoid.add (function.surjective.add_monoid f hf one mul), add_assoc := _, zero := add_monoid.zero (function.surjective.add_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := add_monoid.nsmul (function.surjective.add_monoid f hf one mul), nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg _inst_3, sub := has_sub.sub _inst_4, sub_eq_add_neg := _, zsmul := zsmul_rec {neg := has_neg.neg _inst_3}, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _}
A type endowed with 0
, +
, unary -
, and binary -
is a sub_neg_monoid
if it admits a surjective map that preserves 0
, +
, unary -
, and binary -
to
a sub_neg_monoid
.
This version takes custom nsmul
and zsmul
as [has_scalar ℕ M₂]
and
[has_scalar ℤ M₂]
arguments.
Equations
- function.surjective.sub_neg_monoid_smul f hf one mul inv div npow zpow = {add := add_monoid.add (function.surjective.add_monoid_smul f hf one mul npow), add_assoc := _, zero := add_monoid.zero (function.surjective.add_monoid_smul f hf one mul npow), zero_add := _, add_zero := _, nsmul := add_monoid.nsmul (function.surjective.add_monoid_smul f hf one mul npow), nsmul_zero' := _, nsmul_succ' := _, neg := sub_neg_monoid.neg (function.surjective.sub_neg_monoid f hf one mul inv div), sub := sub_neg_monoid.sub (function.surjective.sub_neg_monoid f hf one mul inv div), sub_eq_add_neg := _, zsmul := λ (n : ℤ) (x : M₂), n • x, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _}
A type endowed with 1
, *
, ⁻¹
, and /
is a div_inv_monoid
if it admits a surjective map that preserves 1
, *
, ⁻¹
, and /
to a div_inv_monoid
.
This version takes custom npow
and zpow
as [has_pow M₂ ℕ]
and [has_pow M₂ ℤ]
arguments.
See note [reducible non-instances].
Equations
- function.surjective.div_inv_monoid_pow f hf one mul inv div npow zpow = {mul := monoid.mul (function.surjective.monoid_pow f hf one mul npow), mul_assoc := _, one := monoid.one (function.surjective.monoid_pow f hf one mul npow), one_mul := _, mul_one := _, npow := monoid.npow (function.surjective.monoid_pow f hf one mul npow), npow_zero' := _, npow_succ' := _, inv := div_inv_monoid.inv (function.surjective.div_inv_monoid f hf one mul inv div), div := div_inv_monoid.div (function.surjective.div_inv_monoid f hf one mul inv div), div_eq_mul_inv := _, zpow := λ (n : ℤ) (x : M₂), x ^ n, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _}
A type endowed with 1
, *
, ⁻¹
, and /
is a group,
if it admits a surjective map that preserves 1
, *
, ⁻¹
, and /
from a group.
See note [reducible non-instances].
Equations
- function.surjective.group f hf one mul inv div = {mul := div_inv_monoid.mul (function.surjective.div_inv_monoid f hf one mul inv div), mul_assoc := _, one := div_inv_monoid.one (function.surjective.div_inv_monoid f hf one mul inv div), one_mul := _, mul_one := _, npow := div_inv_monoid.npow (function.surjective.div_inv_monoid f hf one mul inv div), npow_zero' := _, npow_succ' := _, inv := div_inv_monoid.inv (function.surjective.div_inv_monoid f hf one mul inv div), div := div_inv_monoid.div (function.surjective.div_inv_monoid f hf one mul inv div), div_eq_mul_inv := _, zpow := div_inv_monoid.zpow (function.surjective.div_inv_monoid f hf one mul inv div), zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _}
A type endowed with 0
, +
, and unary -
is an additive group,
if it admits a surjective map that preserves 0
, +
, and -
from an additive group.
Equations
- function.surjective.add_group f hf one mul inv div = {add := sub_neg_monoid.add (function.surjective.sub_neg_monoid f hf one mul inv div), add_assoc := _, zero := sub_neg_monoid.zero (function.surjective.sub_neg_monoid f hf one mul inv div), zero_add := _, add_zero := _, nsmul := sub_neg_monoid.nsmul (function.surjective.sub_neg_monoid f hf one mul inv div), nsmul_zero' := _, nsmul_succ' := _, neg := sub_neg_monoid.neg (function.surjective.sub_neg_monoid f hf one mul inv div), sub := sub_neg_monoid.sub (function.surjective.sub_neg_monoid f hf one mul inv div), sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul (function.surjective.sub_neg_monoid f hf one mul inv div), zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _}
A type endowed with 0
and +
is an additive group,
if it admits a surjective map that preserves 0
and +
to an additive group.
This version takes custom nsmul
and zsmul
as [has_scalar ℕ M₂]
and
[has_scalar ℤ M₂]
arguments.
Equations
- function.surjective.add_group_smul f hf one mul inv div npow zpow = {add := sub_neg_monoid.add (function.surjective.sub_neg_monoid_smul f hf one mul inv div npow zpow), add_assoc := _, zero := sub_neg_monoid.zero (function.surjective.sub_neg_monoid_smul f hf one mul inv div npow zpow), zero_add := _, add_zero := _, nsmul := sub_neg_monoid.nsmul (function.surjective.sub_neg_monoid_smul f hf one mul inv div npow zpow), nsmul_zero' := _, nsmul_succ' := _, neg := sub_neg_monoid.neg (function.surjective.sub_neg_monoid_smul f hf one mul inv div npow zpow), sub := sub_neg_monoid.sub (function.surjective.sub_neg_monoid_smul f hf one mul inv div npow zpow), sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul (function.surjective.sub_neg_monoid_smul f hf one mul inv div npow zpow), zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _}
A type endowed with 1
, *
and ⁻¹
is a group,
if it admits a surjective map that preserves 1
, *
and ⁻¹
to a group.
This version takes custom npow
and zpow
as [has_pow M₂ ℕ]
and [has_pow M₂ ℤ]
arguments.
See note [reducible non-instances].
Equations
- function.surjective.group_pow f hf one mul inv div npow zpow = {mul := div_inv_monoid.mul (function.surjective.div_inv_monoid_pow f hf one mul inv div npow zpow), mul_assoc := _, one := div_inv_monoid.one (function.surjective.div_inv_monoid_pow f hf one mul inv div npow zpow), one_mul := _, mul_one := _, npow := div_inv_monoid.npow (function.surjective.div_inv_monoid_pow f hf one mul inv div npow zpow), npow_zero' := _, npow_succ' := _, inv := div_inv_monoid.inv (function.surjective.div_inv_monoid_pow f hf one mul inv div npow zpow), div := div_inv_monoid.div (function.surjective.div_inv_monoid_pow f hf one mul inv div npow zpow), div_eq_mul_inv := _, zpow := div_inv_monoid.zpow (function.surjective.div_inv_monoid_pow f hf one mul inv div npow zpow), zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _}
A type endowed with 1
, *
, ⁻¹
, and /
is a commutative group,
if it admits a surjective map that preserves 1
, *
, ⁻¹
, and /
from a commutative group.
See note [reducible non-instances].
Equations
- function.surjective.comm_group f hf one mul inv div = {mul := comm_monoid.mul (function.surjective.comm_monoid f hf one mul), mul_assoc := _, one := comm_monoid.one (function.surjective.comm_monoid f hf one mul), one_mul := _, mul_one := _, npow := comm_monoid.npow (function.surjective.comm_monoid f hf one mul), npow_zero' := _, npow_succ' := _, inv := group.inv (function.surjective.group f hf one mul inv div), div := group.div (function.surjective.group f hf one mul inv div), div_eq_mul_inv := _, zpow := group.zpow (function.surjective.group f hf one mul inv div), zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _, mul_comm := _}
A type endowed with 0
and +
is an additive commutative group,
if it admits a surjective map that preserves 0
and +
to an additive commutative group.
Equations
- function.surjective.add_comm_group f hf one mul inv div = {add := add_comm_monoid.add (function.surjective.add_comm_monoid f hf one mul), add_assoc := _, zero := add_comm_monoid.zero (function.surjective.add_comm_monoid f hf one mul), zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul (function.surjective.add_comm_monoid f hf one mul), nsmul_zero' := _, nsmul_succ' := _, neg := add_group.neg (function.surjective.add_group f hf one mul inv div), sub := add_group.sub (function.surjective.add_group f hf one mul inv div), sub_eq_add_neg := _, zsmul := add_group.zsmul (function.surjective.add_group f hf one mul inv div), zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _}