Commit 2023-11-04 14:26 0a1d2bb8

View on Github →

refactor(Data/ZMod/IntUnitsPower): generalize ZMod 2 to work for Nat and Int too (#7866) Instead of providing instance : Pow ℤˣ (ZMod 2), this now provides instance [Module R (Additive ℤˣ)] : Pow ℤˣ R. It turns out that this instance already exists for and , so all we need to do is create instance : Module (ZMod 2) (Additive ℤˣ) and we obtain new definitions that generalize over all three types. As a result of the generalization, z₂pow has been renamed in lemmas to uzpow (units of ). The motivation here is that I need $(-1) ^ i$ to make sense (and be lawful) for ZMod 2 (on clifford algebras) and (on exterior algebras). Zulip thread

Estimated changes

added theorem ZMod.smul_units_def
modified theorem mul_uzpow
added theorem ofMul_uzpow
modified theorem one_uzpow
added theorem toMul_uzpow
modified theorem uzpow_add
deleted theorem uzpow_def
added theorem uzpow_intCast
modified theorem uzpow_mul
modified theorem uzpow_natCast
modified theorem uzpow_neg
modified theorem uzpow_one
modified theorem uzpow_sub
modified theorem uzpow_zero