Skip to content

feat: NSMul/NPow type class#38036

Open
JovanGerb wants to merge 6 commits intoleanprover-community:masterfrom
JovanGerb:Jovan-NSMul
Open

feat: NSMul/NPow type class#38036
JovanGerb wants to merge 6 commits intoleanprover-community:masterfrom
JovanGerb:Jovan-NSMul

Conversation

@JovanGerb
Copy link
Copy Markdown
Contributor

This PR is an attempt at splitting out the NSMul class for the nsmul data field in AddMonoid.

TODO: the same for ZSMul, QSMul and NNQSMul.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

PR summary 044631201f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ DivInvMonoid.toPow
+ NPow
+ NSMul
+ ZPow
+ ZSMul
+ instance (n : ℕ) [NeZero n] : HPow (Fin n) ℕ (Fin n)
+ instance (n : ℕ) [NeZero n] : Pow (Fin n) ℕ
+ instance (priority := low) NPow.ofPow {M : Type*} [Pow M ℕ] : NPow M := ⟨fun n x ↦ x ^ n⟩
+ instance (priority := low) ZPow.ofPow {G : Type*} [Pow G ℤ] : ZPow G
- DivInvMonoid.toZPow
- SubNegMonoid.toZSMul

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


Decrease in tech debt: (relative, absolute) = (1.24, 0.00)
Current number Change Type
6395 1 backward.isDefEq.respectTransparency
803 -2 backward.privateInPublic
414 -1 backward.privateInPublic.warn

Current commit fa54279527
Reference commit 044631201f

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@JovanGerb JovanGerb added the WIP Work in progress label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant