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
Multiplication is power-associative.
theorem
NatPowAssoc.npow_zero
{M : Type u_2}
:
∀ {inst : MulOneClass M} {inst_1 : Pow M ℕ} [self : NatPowAssoc M] (x : M), x ^ 0 = 1
Exponent zero is one.
theorem
NatPowAssoc.npow_one
{M : Type u_2}
:
∀ {inst : MulOneClass M} {inst_1 : Pow M ℕ} [self : NatPowAssoc M] (x : M), x ^ 1 = x
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]