Skip to content

Conversation

@sgraf812
Copy link
Contributor

This PR implements a hint tactic mvcgen?, expanding to mvcgen invariants?

Example:

/--
info: Try this:
  [apply] mvcgen invariants?
---
info: Try this:
  [apply] mvcgen [mySum] invariants?
---
info: Try this:
  [apply] mvcgen +elimLets invariants?
---
info: Try this:
  [apply] mvcgen +elimLets [mySum] invariants?
-/
#guard_msgs (info) in
theorem mySum_suggest_invariant_short (l : List Nat) : mySum l = l.sum := by
  generalize h : mySum l = r
  apply Id.of_wp_run_eq h
  mvcgen?
  mvcgen? [mySum]
  mvcgen? +elimLets
  mvcgen? +elimLets [mySum]
  all_goals admit

@sgraf812 sgraf812 added the changelog-language Language features and metaprograms label Oct 15, 2025
@sgraf812 sgraf812 enabled auto-merge October 15, 2025 08:19
@sgraf812 sgraf812 added this pull request to the merge queue Oct 15, 2025
Merged via the queue into master with commit 4077bf2 Oct 15, 2025
19 checks passed
@sgraf812 sgraf812 deleted the sg/mvcgen-hint branch October 15, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-language Language features and metaprograms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants