Skip to content

feat(Algebra): expand Subalgebra.restrictScalars API#38018

Open
matthewjasper wants to merge 1 commit intoleanprover-community:masterfrom
matthewjasper:algebra-restrict-scalars-api
Open

feat(Algebra): expand Subalgebra.restrictScalars API#38018
matthewjasper wants to merge 1 commit intoleanprover-community:masterfrom
matthewjasper:algebra-restrict-scalars-api

Conversation

@matthewjasper
Copy link
Copy Markdown
Collaborator

Add an instance for the original algebra structure, the implied scalar tower instances, and the algebra equivalence with the original subalgebra. Use this to remove some set_option backward.isDefEq.respectTransparency.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

PR summary 00dbc4ec64

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ restrictScalars.SMul
+ restrictScalars.coe_algebraMap
+ restrictScalars.coe_smul
+ restrictScalars.isScalarTower
+ restrictScalars.isScalarTower'
+ restrictScalars.origAlgebra
+ restrictScalarsEquiv
+ restrictScalarsEquiv_apply
+ restrictScalarsEquiv_symm_apply

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) = (3.00, 0.00)
Current number Change Type
6412 -3 backward.isDefEq.respectTransparency

Current commit 988f6f43ac
Reference commit 00dbc4ec64

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).

@github-actions github-actions bot added the t-ring-theory Ring theory label Apr 13, 2026
@matthewjasper matthewjasper force-pushed the algebra-restrict-scalars-api branch from 2d0555b to 988f6f4 Compare April 13, 2026 21:41
Comment on lines +125 to +131
toFun s :=
let ⟨u, hu⟩ := algebraMap S U s
⟨u, by rwa [mem_restrictScalars]⟩
map_zero' := by ext; simp
map_one' := by ext; simp
map_add' x y := by ext; simp
map_mul' x y := by ext; simp
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use something like RingHom.restrict here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-ring-theory Ring theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants