fix: read vcgen goal type through a tactic have/let annotation - #14469
Merged
Conversation
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
force-pushed
the
worktree-vcgen-lctx-triple
branch
from
July 20, 2026 21:26
5743775 to
a589169
Compare
sgraf812
marked this pull request as ready for review
July 20, 2026 21:35
sgraf812
enabled auto-merge
July 20, 2026 21:35
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes
vcgenwork after a preceding tactichave,let, orsuffices, 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 anoImplicitLambdamdatanode.vcgenclassifies the goal by its head, which the annotation hid:inferProgType?returnednone, and the goal-shape dispatch insolvefell through so the whole triple was emitted as an untouched VC. Both now consume the metadata before inspecting the head.