Typeclasses for power-associative structures #
In this file we define power-associativity for algebraic structures with a multiplication operation.
The class is a Prop-valued mixin named PNatPowAssoc
, where PNat
means only strictly positive
powers are considered.
Results #
ppow_add
a defining property:x ^ (k + n) = x ^ k * x ^ n
ppow_one
a defining property:x ^ 1 = x
ppow_assoc
strictly positive powers of an element have associative multiplication.ppow_comm
x ^ m * x ^ n = x ^ n * x ^ m
for strictly positivem
andn
.ppow_mul
x ^ (m * n) = (x ^ m) ^ n
for strictly positivem
andn
.ppow_eq_pow
monoid exponentiation coincides with semigroup exponentiation.
Instances #
- PNatPowAssoc for products and Pi types
Todo #
NatPowAssoc
forMulOneClass
- more or less the same flow- It seems unlikely that anyone will want
NatSMulAssoc
andPNatSMulAssoc
as additive versions of power-associativity, but we have found that it is not hard to write.
A Prop
-valued mixin for power-associative multiplication in the non-unital setting.
Multiplication is power-associative.
Exponent one is identity.
Instances
instance
Pi.instPNatPowAssoc
{ι : Type u_2}
{α : ι → Type u_3}
[(i : ι) → Mul (α i)]
[(i : ι) → Pow (α i) ℕ+]
[∀ (i : ι), PNatPowAssoc (α i)]
:
PNatPowAssoc ((i : ι) → α i)
Equations
- (_ : PNatPowAssoc ((i : ι) → α i)) = (_ : PNatPowAssoc ((i : ι) → α i))
instance
Prod.instPNatPowAssoc
{M : Type u_1}
{N : Type u_2}
[Mul M]
[Pow M ℕ+]
[PNatPowAssoc M]
[Mul N]
[Pow N ℕ+]
[PNatPowAssoc N]
:
PNatPowAssoc (M × N)
Equations
- (_ : PNatPowAssoc (M × N)) = (_ : PNatPowAssoc (M × N))