The power operator on ℤˣ
by ZMod 2
, ℕ
, and ℤ
#
See also the related negOnePow
.
TODO #
Implementation notes #
In future, we could consider a LawfulPower M R
typeclass; but we can save ourselves a lot of work
by using Module R (Additive M)
in its place, especially since this already has instances for
R = ℕ
and R = ℤ
.
This is an indirect way of saying that ℤˣ
has a power operation by ZMod 2
.
theorem
uzpow_coe_nat
{R : Type u_1}
[CommSemiring R]
[Module R (Additive ℤˣ)]
(s : ℤˣ)
(n : ℕ)
[n.AtLeastTwo]
:
s ^ OfNat.ofNat n = s ^ OfNat.ofNat n