Skip to content

refactor: reorder Triple to program-first#14103

Merged
sgraf812 merged 1 commit into
masterfrom
triple-reorder
Jun 18, 2026
Merged

refactor: reorder Triple to program-first#14103
sgraf812 merged 1 commit into
masterfrom
triple-reorder

Conversation

@sgraf812

@sgraf812 sgraf812 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

This PR reorders the arguments of Triple so the program comes first: Triple pre x post epost becomes Triple x pre post epost. The program now drives elaboration, so its monad and return type are fixed before the pre- and postconditions are elaborated.

@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 Jun 18, 2026
@mathlib-lean-pr-testing

mathlib-lean-pr-testing Bot commented Jun 18, 2026

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 7821657e0630f8e0dd487658de0459202fd55670 --onto 4792cd22887c8b529a351f6563b693426ff2a8f8. You can force Mathlib CI using the force-mathlib-ci label. (2026-06-18 13:48:11)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 518dc662d70fe6c566a0c935157690ee8ae53558 --onto 4792cd22887c8b529a351f6563b693426ff2a8f8. You can force Mathlib CI using the force-mathlib-ci label. (2026-06-18 17:44:41)

@leanprover-bot

leanprover-bot commented Jun 18, 2026

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 7821657e0630f8e0dd487658de0459202fd55670 --onto 803553a556fd82fa1060efb0c43eda542130cb16. You can force reference manual CI using the force-manual-ci label. (2026-06-18 13:48:13)
  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 518dc662d70fe6c566a0c935157690ee8ae53558 --onto 803553a556fd82fa1060efb0c43eda542130cb16. You can force reference manual CI using the force-manual-ci label. (2026-06-18 17:44:42)

@sgraf812 sgraf812 marked this pull request as ready for review June 18, 2026 16:50
@sgraf812 sgraf812 requested a review from TwoFX as a code owner June 18, 2026 16:50
This PR reorders the arguments of `Triple` so the program comes first: `Triple pre x post epost` becomes `Triple x pre post epost`. The program now drives elaboration, so its monad and return type are fixed before the pre- and postconditions are elaborated.

Test consumers are switched to the `⦃ … ⦄` notation where possible, which is insulated from the argument order. The remaining raw uses keep a generic `epost` variable or a custom assertion lattice without a `⊥`, neither of which the notation can express.
@sgraf812 sgraf812 enabled auto-merge June 18, 2026 17:22
@sgraf812 sgraf812 added this pull request to the merge queue Jun 18, 2026
Merged via the queue into master with commit 8e073a2 Jun 18, 2026
17 checks passed
@sgraf812 sgraf812 deleted the triple-reorder branch June 18, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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