Skip to content

fix: read vcgen goal type through a tactic have/let annotation - #14469

Merged
sgraf812 merged 1 commit into
masterfrom
worktree-vcgen-lctx-triple
Jul 20, 2026
Merged

fix: read vcgen goal type through a tactic have/let annotation#14469
sgraf812 merged 1 commit into
masterfrom
worktree-vcgen-lctx-triple

Conversation

@sgraf812

Copy link
Copy Markdown
Contributor

This PR makes vcgen work after a preceding tactic have, let, or suffices, which previously failed with "vcgen: could not determine the program type of the goal".

Those tactics desugar through refine_lift no_implicit_lambda% …, wrapping the resulting goal type in a noImplicitLambda mdata node. vcgen classifies the goal by its head, which the annotation hid: inferProgType? returned none, and the goal-shape dispatch in solve fell through so the whole triple was emitted as an untouched VC. Both now consume the metadata before inspecting the head.

@sgraf812 sgraf812 added the changelog-tactics User facing tactics label Jul 20, 2026
This PR makes `vcgen` work after a preceding tactic `have`, `let`, or `suffices`, which previously failed with "vcgen: could not determine the program type of the goal".

Those tactics desugar through `refine_lift no_implicit_lambda% …`, wrapping the resulting goal type in a `noImplicitLambda` `mdata` node. `vcgen` classifies the goal by its head, which the annotation hid: `inferProgType?` returned `none`, and the goal-shape dispatch in `solve` fell through so the whole triple was emitted as an untouched VC. Both now consume the metadata before inspecting the head.
@sgraf812
sgraf812 force-pushed the worktree-vcgen-lctx-triple branch from 5743775 to a589169 Compare July 20, 2026 21:26
@sgraf812
sgraf812 marked this pull request as ready for review July 20, 2026 21:35
@sgraf812
sgraf812 enabled auto-merge July 20, 2026 21:35
@sgraf812
sgraf812 added this pull request to the merge queue Jul 20, 2026
@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 20, 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 4237bc682acfe36467bb593cd4eb43b29dc640e8 --onto 323137b022369d56a044ae5af01d1efd55872361. You can force Mathlib CI using the force-mathlib-ci label. (2026-07-20 21:59:27)

@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 4237bc682acfe36467bb593cd4eb43b29dc640e8 --onto 49ff95727f98d43984726b26742d17a1ceea9dd5. You can force reference manual CI using the force-manual-ci label. (2026-07-20 21:59:29)

Merged via the queue into master with commit 3259610 Jul 20, 2026
19 checks passed
@sgraf812
sgraf812 deleted the worktree-vcgen-lctx-triple branch July 21, 2026 06:56
robsimmons pushed a commit that referenced this pull request Jul 29, 2026
…14469)

This PR makes `vcgen` work after a preceding tactic `have`, `let`, or
`suffices`, which previously failed with "vcgen: could not determine the
program type of the goal".

Those tactics desugar through `refine_lift no_implicit_lambda% …`,
wrapping the resulting goal type in a `noImplicitLambda` `mdata` node.
`vcgen` classifies the goal by its head, which the annotation hid:
`inferProgType?` returned `none`, and the goal-shape dispatch in `solve`
fell through so the whole triple was emitted as an untouched VC. Both
now consume the metadata before inspecting the head.
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