Skip to content

feat: improve processLevel at Sym/Pattern.lean#13896

Merged
leodemoura merged 1 commit into
masterfrom
sym_apply_issue
May 30, 2026
Merged

feat: improve processLevel at Sym/Pattern.lean#13896
leodemoura merged 1 commit into
masterfrom
sym_apply_issue

Conversation

@leodemoura
Copy link
Copy Markdown
Member

This PR improves the support for universe constraints in the SymM pattern matcher/unifier. Two new cases are supported

  1. u + 1 =?= v reduces to u =?= v' IF some v' = decLevel? v

  2. max u ?v =?= u is solved using ?v := u. The solution is an approximation. The same approximation is used at LevelDefEq.lean.
    We say it is an approximation because the solution ?v := 0 is ignored.

This PR improves the support for universe constraints in the `SymM` pattern matcher/unifier.
Two new cases are supported

1) `u + 1 =?= v` reduces to `u =?= v'` IF `some v' = decLevel? v`

2) `max u ?v =?= u` is solved using `?v := u`. The solution is an approximation. The same approximation is used at `LevelDefEq.lean`.
   We say it is an approximation because the solution `?v := 0` is ignored.
@leodemoura leodemoura added the changelog-tactics User facing tactics label May 29, 2026
@leodemoura leodemoura enabled auto-merge May 29, 2026 23:47
@leodemoura leodemoura added this pull request to the merge queue May 29, 2026
Merged via the queue into master with commit 1744bf5 May 30, 2026
22 checks passed
@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 May 30, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase c743a573e305de6caa318e0d2b0782814b8656ce --onto c47a0c7cf035381a2bcdd4cdf2442782eb4a5214. You can force Mathlib CI using the force-mathlib-ci label. (2026-05-30 00:33:31)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase c743a573e305de6caa318e0d2b0782814b8656ce --onto 803553a556fd82fa1060efb0c43eda542130cb16. You can force reference manual CI using the force-manual-ci label. (2026-05-30 00:33:32)

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

Labels

changelog-tactics User facing tactics 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.

2 participants