mathlib4 icon indicating copy to clipboard operation
mathlib4 copied to clipboard

feat(Algebra): characterise when a submodule constructor is equal to `⊥`

Open YaelDillies opened this issue 1 week ago • 5 comments


Open in Gitpod

YaelDillies avatar Dec 13 '25 10:12 YaelDillies

PR summary 45d036c35b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ toAddSubmonoid_eq_top + toSubsemigroup_inj + toSubsemigroup_injective +++ mk_eq_bot +++ mk_eq_top

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

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

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


No changes to technical debt.

You can run this locally as

./scripts/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[bot] avatar Dec 13 '25 10:12 github-actions[bot]

Can you point me to somewhere that this is needed? Is it possible to just add SetLike.ext_iff into your simp call? I am not that sure if we want this or not.

erdOne avatar Dec 13 '25 10:12 erdOne

It is really hard to find again in the diff of #30563, but why would not want these? We have Submodule.coe_eq_zero and do not expect people to rewrite with Submodule.coe_inj backwards afterall.

YaelDillies avatar Dec 13 '25 12:12 YaelDillies

I do not think they are analogous. Coercion and mk are different. I don't think we in general should be stating lemmas about mk or should be seeing mk at all.

... but we do have Submodule.mk_eq_zero though, which is even weirder because zero isn't even the simpNF. If there are already precedent them maybe we can have them...

erdOne avatar Dec 13 '25 14:12 erdOne

And can you add the analogous lemmas for top? Thanks.

erdOne avatar Dec 13 '25 14:12 erdOne