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 NatPowAssoc
.
Results #
npow_add
a defining property:x ^ (k + n) = x ^ k * x ^ n
npow_one
a defining property:x ^ 1 = x
npow_assoc
strictly positive powers of an element have associative multiplication.npow_comm
x ^ m * x ^ n = x ^ n * x ^ m
for strictly positivem
andn
.npow_mul
x ^ (m * n) = (x ^ m) ^ n
for strictly positivem
andn
.npow_eq_pow
monoid exponentiation coincides with semigroup exponentiation.
Instances #
We also produce the following instances:
NatPowAssoc
for Monoids, Pi types and products.
TODO #
- to_additive?
A mixin for power-associative multiplication.
Multiplication is power-associative.
Exponent zero is one.
Exponent one is identity.
Instances
theorem
NatPowAssoc.npow_add
{M : Type u_2}
[MulOneClass M]
[Pow M ℕ]
[self : NatPowAssoc M]
(k : ℕ)
(n : ℕ)
(x : M)
:
Multiplication is power-associative.
theorem
NatPowAssoc.npow_zero
{M : Type u_2}
[MulOneClass M]
[Pow M ℕ]
[self : NatPowAssoc M]
(x : M)
:
Exponent zero is one.
theorem
NatPowAssoc.npow_one
{M : Type u_2}
[MulOneClass M]
[Pow M ℕ]
[self : NatPowAssoc M]
(x : M)
:
Exponent one is identity.
@[simp]
@[simp]
theorem
neg_npow_assoc
{R : Type u_2}
[NonAssocRing R]
[Pow R ℕ]
[NatPowAssoc R]
(a : R)
(b : R)
(k : ℕ)
:
instance
Pi.instNatPowAssoc
{ι : Type u_2}
{α : ι → Type u_3}
[(i : ι) → MulOneClass (α i)]
[(i : ι) → Pow (α i) ℕ]
[∀ (i : ι), NatPowAssoc (α i)]
:
NatPowAssoc ((i : ι) → α i)
Equations
- ⋯ = ⋯
instance
Prod.instNatPowAssoc
{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[Pow M ℕ]
[NatPowAssoc M]
[MulOneClass N]
[Pow N ℕ]
[NatPowAssoc N]
:
NatPowAssoc (M × N)
Equations
- ⋯ = ⋯
@[simp]
theorem
Nat.cast_npow
(R : Type u_2)
[NonAssocSemiring R]
[Pow R ℕ]
[NatPowAssoc R]
(n : ℕ)
(m : ℕ)
:
@[simp]