This PR fixes `split` in the presence of metavariables in the target. The fix consists of replacing an internal use of `apply` for instantiating match splitters by a new, simpler variant `applyN`. This new `applyN` is not prone to #8436, which is the ultimate cause for `split` failing on targets containing metavariables. --------- Co-authored-by: Sebastian Graf <sg@lean-fro.org> Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>
15 lines
319 B
Text
15 lines
319 B
Text
/-!
|
||
Tests that `split` works when there are metavariables in the target.
|
||
-/
|
||
theorem split_subgoals {x : Option Nat × Nat} :
|
||
match x.fst with
|
||
| some _ => True
|
||
| none => True
|
||
:= by
|
||
have h {P : Prop} {x'} : (x' = 4 ∧ P) → P := by simp
|
||
apply h
|
||
split
|
||
rotate_right
|
||
· exact 4
|
||
· trivial
|
||
· trivial
|