Skip to content

[Merged by Bors] - chore(Algebra/Quaternion): use abbrev instead of def - #46446

Closed
JovanGerb wants to merge 3 commits into
leanprover-community:masterfrom
JovanGerb:Jovan-Quaternion
Closed

JovanGerb wants to merge 3 commits into
leanprover-community:masterfrom
JovanGerb:Jovan-Quaternion

Conversation

@JovanGerb

@JovanGerb JovanGerb commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

This PR is a follow up to #43078 which made Quaternion an abbrev for QuaternionAlgebra. To match this, we want that the operations on Quaternion are also abbrevs for those on QuaternionAlgebra where possible. As a result we can remove most @[simp] and @[norm_cast] tags on Quaternion lemmas.

This PR removes an instance diamond and some simpNF technical debt. It also removes some unnecessary scoped simp.


@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

PR summary 72a363183d

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

- instance : CoeTC R ℍ[R] := ⟨coe⟩

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

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

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit 72a3631).

  • +0 new declarations
  • −1 removed declarations
-Quaternion.instCoeTC

No changes to strong technical debt.
No changes to weak technical debt.

Current commit 72a363183d
Reference commit 46c4980fbc

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py 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).

@github-actions github-actions Bot added the t-algebra Algebra (groups, rings, fields, etc) label Nov 24, 2026
@Vierkantor Vierkantor added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Nov 25, 2026
@Vierkantor

Copy link
Copy Markdown
Contributor

Looks like this needs a fix for the deprecation. Mostly looks good otherwise!

@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Nov 26, 2026
@JovanGerb

Copy link
Copy Markdown
Contributor Author

!radar

@leanprover-radar

leanprover-radar commented Nov 26, 2026 •

Copy link
Copy Markdown

Benchmark results for 72a3631 against 46c4980 are in. No significant results found. @JovanGerb

  • ✅ build//instructions: -1.7G (-0.00%)

Small changes (10✅, 13🟥)

  • 23 hidden

@ocfnash

ocfnash commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Thanks!

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Nov 30, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Nov 30, 2026
This PR is a follow up to #43078 which made `Quaternion` an `abbrev` for `QuaternionAlgebra`. To match this, we want that the operations on `Quaternion` are also `abbrev`s for those on `QuaternionAlgebra` where possible. As a result we can remove most `@[simp]` and `@[norm_cast]` tags on `Quaternion` lemmas.

This PR removes an instance diamond and some `simpNF` technical debt. It also removes some unnecessary `scoped simp`.
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Nov 30, 2026
@mathlib-bors

mathlib-bors Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title chore(Algebra/Quaternion): use abbrev instead of def [Merged by Bors] - chore(Algebra/Quaternion): use abbrev instead of def Nov 30, 2026
@mathlib-bors mathlib-bors Bot closed this Nov 30, 2026
TJHeeringa pushed a commit to TJHeeringa/mathlib4 that referenced this pull request Dec 2, 2026
…community#46446)

This PR is a follow up to leanprover-community#43078 which made `Quaternion` an `abbrev` for `QuaternionAlgebra`. To match this, we want that the operations on `Quaternion` are also `abbrev`s for those on `QuaternionAlgebra` where possible. As a result we can remove most `@[simp]` and `@[norm_cast]` tags on `Quaternion` lemmas.

This PR removes an instance diamond and some `simpNF` technical debt. It also removes some unnecessary `scoped simp`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants