feat: add try rfl at end of convTarget
This commit is contained in:
parent
18bcc458d0
commit
8a249bddd2
4 changed files with 4 additions and 5 deletions
|
|
@ -111,6 +111,7 @@ private def convTarget (conv : Syntax) : TacticM Unit := withMainContext do
|
|||
let target ← getMainTarget
|
||||
let (targetNew, proof) ← convert target (evalTactic conv)
|
||||
liftMetaTactic1 fun mvarId => replaceTargetEq mvarId targetNew proof
|
||||
evalTactic (← `(tactic| try rfl))
|
||||
|
||||
private def convLocalDecl (conv : Syntax) (hUserName : Name) : TacticM Unit := withMainContext do
|
||||
let localDecl ← getLocalDeclFromUserName hUserName
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ example (x y : Nat) : f x (x + y + 0) y = y + x := by
|
|||
change x + y
|
||||
traceState
|
||||
rw [Nat.add_comm]
|
||||
rfl
|
||||
|
||||
example : id (fun x y => 0 + x + y) = Nat.add := by
|
||||
conv =>
|
||||
|
|
@ -61,11 +60,9 @@ example : id (fun x y => 0 + x + y) = Nat.add := by
|
|||
traceState
|
||||
rw [Nat.zero_add]
|
||||
traceState
|
||||
rfl
|
||||
|
||||
example : id (fun x y => 0 + x + y) = Nat.add := by
|
||||
conv =>
|
||||
enter [1, 1, a, b]
|
||||
traceState
|
||||
rw [Nat.zero_add]
|
||||
rfl
|
||||
|
|
|
|||
|
|
@ -13,3 +13,6 @@ a b : Nat
|
|||
⊢ 0 + a + b
|
||||
a b : Nat
|
||||
⊢ a + b
|
||||
case h.h
|
||||
a b : Nat
|
||||
⊢ 0 + a + b
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ example (x y : Nat) : p (x + y) (0 + y + x) := by
|
|||
traceState
|
||||
skip
|
||||
done
|
||||
rfl
|
||||
|
||||
axiom div_self (x : Nat) : x ≠ 0 → x / x = 1
|
||||
|
||||
|
|
@ -69,4 +68,3 @@ example : id (fun x => 0 + x) = id := by
|
|||
arg 1
|
||||
funext y
|
||||
rw [Nat.zero_add]
|
||||
rfl
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue