Skip to content

fix: vcgen equation specs for deep-embedding program types - #14530

Merged
sgraf812 merged 1 commit into
masterfrom
fix-vcgen-deep-embedding-eq-specs
Jul 24, 2026
Merged

fix: vcgen equation specs for deep-embedding program types#14530
sgraf812 merged 1 commit into
masterfrom
fix-vcgen-deep-embedding-eq-specs

Conversation

@sgraf812

@sgraf812 sgraf812 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

This PR fixes a panic in vcgen when an equation or unfold spec supplied via vcgen [someDef] is used for a program in a deep embedding, i.e. a program type with a bare Std.Internal.Do.WP instance rather than a monadic one.

The fix unifies the equation's type with the goal's program type under first-order approximation at reducible transparency and reuses the goal's wp arguments (info.args.take 7) for the wp_le_wp_of_eq instantiation.

@sgraf812
sgraf812 force-pushed the fix-vcgen-deep-embedding-eq-specs branch from 79a1494 to 87210f7 Compare July 24, 2026 10:54
@sgraf812
sgraf812 force-pushed the fix-vcgen-deep-embedding-eq-specs branch from 87210f7 to 42a0049 Compare July 24, 2026 11:17
@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 Jul 24, 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 22ffba44b5d75f7a1353bb0265089c233eddd5e9 --onto 3259610687883ec1ea48c481aba2469f2f83facf. You can force Mathlib CI using the force-mathlib-ci label. (2026-07-24 11:20:48)

@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 22ffba44b5d75f7a1353bb0265089c233eddd5e9 --onto 49ff95727f98d43984726b26742d17a1ceea9dd5. You can force reference manual CI using the force-manual-ci label. (2026-07-24 11:20:50)

@sgraf812
sgraf812 marked this pull request as ready for review July 24, 2026 11:27
@sgraf812
sgraf812 enabled auto-merge July 24, 2026 11:27
@sgraf812
sgraf812 disabled auto-merge July 24, 2026 11:27
@sgraf812 sgraf812 added the changelog-tactics User facing tactics label Jul 24, 2026
@sgraf812
sgraf812 enabled auto-merge July 24, 2026 11:31
@sgraf812
sgraf812 added this pull request to the merge queue Jul 24, 2026
Merged via the queue into master with commit 8d96b70 Jul 24, 2026
33 of 34 checks passed
@sgraf812
sgraf812 deleted the fix-vcgen-deep-embedding-eq-specs branch July 24, 2026 12:22
robsimmons pushed a commit that referenced this pull request Jul 29, 2026
This PR fixes a panic in `vcgen` when an equation or unfold spec
supplied via `vcgen [someDef]` is used for a program in a deep
embedding, i.e. a program type with a bare `Std.Internal.Do.WP` instance
rather than a monadic one.

The fix unifies the equation's type with the goal's program type under
first-order approximation at reducible transparency and reuses the
goal's `wp` arguments (`info.args.take 7`) for the `wp_le_wp_of_eq`
instantiation.
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