This PR ensures that `mvcgen` not only tries to close stateful subgoals by assumption, but also pure Lean goals. Closes #9362.
This commit is contained in:
parent
c5a5c5572f
commit
f3ac38ff2c
2 changed files with 21 additions and 1 deletions
|
|
@ -409,5 +409,5 @@ def elabMVCGen : Tactic := fun stx => withMainContext do
|
|||
-- but optConfig is not a leading_parser, and neither is the syntax for `lemmas`
|
||||
let ctx ← mkSpecContext stx[1] stx[2]
|
||||
let vcs ← genVCs (← getMainGoal) ctx (fuel := .unlimited)
|
||||
let tac ← `(tactic| try (apply $(mkIdent ``Std.Do.SPred.Tactic.Pure.intro); trivial))
|
||||
let tac ← `(tactic| try ((try apply $(mkIdent ``Std.Do.SPred.Tactic.Pure.intro)); trivial))
|
||||
for vc in vcs do discard <| runTactic vc tac
|
||||
|
|
|
|||
20
tests/lean/run/9362.lean
Normal file
20
tests/lean/run/9362.lean
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import Std.Tactic.Do
|
||||
|
||||
open Std.Do
|
||||
|
||||
set_option mvcgen.warning false
|
||||
|
||||
axiom G (lt : Nat) : Id Unit
|
||||
|
||||
noncomputable def F : Id Unit := do
|
||||
G 1
|
||||
|
||||
axiom P : Prop
|
||||
|
||||
@[spec]
|
||||
axiom G_spec (h : P) :
|
||||
⦃⌜True⌝⦄ G 1 ⦃⇓ _ => ⌜0 < 1⌝⦄
|
||||
|
||||
theorem F_spec (h : P) :
|
||||
⦃⌜True⌝⦄ F ⦃⇓ _ => ⌜0 < 1⌝⦄ := by
|
||||
mvcgen [F] -- should close (h : P ⊢ P) by trivial
|
||||
Loading…
Add table
Reference in a new issue