Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: define Squash as a Quotient #6642

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

vihdzp
Copy link
Contributor

@vihdzp vihdzp commented Jan 14, 2025

This PR changes the definition of Squash to use Quotient by upstreaming true_equivalence (now equivalence_true) and trueSetoid (now Setoid.trivial). The new definition is def-eq to the old one, but ensures that Squash can be used whenever a Quotient argument is expected without having to explicitly provide the setoid.

Besides being useful functionality, this makes Mathlib's Trunc completely equivalent to Squash. Mathlib PR #18952 will deprecate the former in favor of the latter.

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jan 14, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Jan 14, 2025

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 9dbe5e6f9ce6bc686541218f62ff6b8063dfc4dc --onto e9bd9807ef7a983365df9ac55d35040d0b2d5ef2. (2025-01-14 16:17:35)
  • 💥 Mathlib branch lean-pr-testing-6642 build failed against this PR. (2025-01-15 15:18:26) View Log

@kim-em kim-em added the changelog-library Library label Jan 14, 2025
@kim-em
Copy link
Collaborator

kim-em commented Jan 14, 2025

@vihdzp, you can add the (newly required) changelog-* labels by commenting with the label name that you want. In this case I've added changelog-library for you.

@kim-em
Copy link
Collaborator

kim-em commented Jan 14, 2025

Please rebase onto nightly-with-mathlib and makes sure Mathlib is happy.

@kim-em kim-em added the awaiting-mathlib We should not merge this until we have a successful Mathlib build label Jan 14, 2025
src/Init/Core.lean Outdated Show resolved Hide resolved
src/Init/Core.lean Outdated Show resolved Hide resolved
src/Init/Core.lean Outdated Show resolved Hide resolved
@kim-em kim-em added the awaiting-author Waiting for PR author to address issues label Jan 15, 2025
@vihdzp
Copy link
Contributor Author

vihdzp commented Jan 15, 2025

@kim-em FYI, I don't have permission to add labels myself.

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 15, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 15, 2025
@leanprover-community-bot leanprover-community-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Jan 15, 2025
@vihdzp
Copy link
Contributor Author

vihdzp commented Jan 15, 2025

The breakage here is due to Setoid.trivial being inferred in place of trivial. Should the former become protected?

@collares
Copy link
Contributor

@kim-em FYI, I don't have permission to add labels myself.

If you add a comment containing just a label name, a bot automatically adds the corresponding label for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author Waiting for PR author to address issues awaiting-mathlib We should not merge this until we have a successful Mathlib build breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan changelog-library Library toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants