Skip to content

feat(Logic/Equiv/Defs): add coe_ofBijective simp lemma#38286

Open
b-mehta wants to merge 1 commit intoleanprover-community:masterfrom
b-mehta:feat/equiv-coe-ofBijective
Open

feat(Logic/Equiv/Defs): add coe_ofBijective simp lemma#38286
b-mehta wants to merge 1 commit intoleanprover-community:masterfrom
b-mehta:feat/equiv-coe-ofBijective

Conversation

@b-mehta
Copy link
Copy Markdown
Contributor

@b-mehta b-mehta commented Apr 20, 2026

We have the applied version of this, but that doesn't fire on the coerced equiv


Open in Gitpod

@b-mehta b-mehta added the easy < 20s of review time. See the lifecycle page for guidelines. label Apr 20, 2026
@github-actions
Copy link
Copy Markdown

PR summary 4fceb4697e

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ coe_ofBijective

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.


No changes to technical debt.

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-logic Logic (model theory, etc) label Apr 20, 2026
left_inv := leftInverse_surjInv hf
right_inv := rightInverse_surjInv _

@[simp] lemma coe_ofBijective (f : α → β) (hf : Bijective f) : ⇑(ofBijective f hf) = f := rfl
Copy link
Copy Markdown
Member

@eric-wieser eric-wieser Apr 20, 2026

Choose a reason for hiding this comment

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

Doesn't having this prevent Equiv.apply_symm_apply firing on ofBijective f hf ((ofBijective f hf).symm x)? I think we often avoid making such lemmas simp for this reason.

Suggested change
@[simp] lemma coe_ofBijective (f : α → β) (hf : Bijective f) : ⇑(ofBijective f hf) = f := rfl
lemma coe_ofBijective (f : α → β) (hf : Bijective f) : ⇑(ofBijective f hf) = f := rfl

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doesn't ofBijective_apply already do that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Exactly, and there are already loads of @[simp] lemmas like this in mathlib, eg QuaternionAlgebra.coe_addEquivTuple, Equiv.coe_constVSub, WithZero.coe_expEquiv_apply (which I found by just looking through search results in alphabetic order.

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

Labels

easy < 20s of review time. See the lifecycle page for guidelines. t-logic Logic (model theory, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants