Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename DivInvMonoid.Pow #19884

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Mathlib/Algebra/Group/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -858,13 +858,13 @@ class SubNegMonoid (G : Type u) extends AddMonoid G, Neg G, Sub G where

attribute [to_additive SubNegMonoid] DivInvMonoid

instance DivInvMonoid.Pow {M} [DivInvMonoid M] : Pow M ℤ :=
instance DivInvMonoid.toZPow {M} [DivInvMonoid M] : Pow M ℤ :=
⟨fun x n ↦ DivInvMonoid.zpow n x⟩

instance SubNegMonoid.SMulInt {M} [SubNegMonoid M] : SMul ℤ M :=
instance SubNegMonoid.toZSMul {M} [SubNegMonoid M] : SMul ℤ M :=
⟨SubNegMonoid.zsmul⟩

attribute [to_additive existing SubNegMonoid.SMulInt] DivInvMonoid.Pow
attribute [to_additive existing] DivInvMonoid.toZPow

/-- A group is called *cyclic* if it is generated by a single element. -/
class IsAddCyclic (G : Type u) [SMul ℤ G] : Prop where
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/ZMod/IntUnitsPower.lean
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ instance Int.instUnitsPow : Pow ℤˣ R where
-- The above instances form no typeclass diamonds with the standard power operators
-- but we will need `reducible_and_instances` which currently fails https://github.com/leanprover-community/mathlib4/issues/10906
example : Int.instUnitsPow = Monoid.toNatPow := rfl
example : Int.instUnitsPow = DivInvMonoid.Pow := rfl
example : Int.instUnitsPow = DivInvMonoid.toZPow := rfl

@[simp] lemma ofMul_uzpow (u : ℤˣ) (r : R) : Additive.ofMul (u ^ r) = r • Additive.ofMul u := rfl

Expand Down
Loading