lean-ja / lean-by-example

コード例で学ぶ Lean 言語
https://lean-ja.github.io/lean-by-example/
MIT License
15 stars 5 forks source link

unfold と dsimp の違いを追記する #409

Closed Seasawher closed 3 days ago

Seasawher commented 3 days ago
import Lean

open Lean Parser

def checkParse (cat : Name) (s : String) : MetaM Unit := do
  if let .error s := runParserCategory (← getEnv) cat s then
    throwError s

run_meta checkParse `tactic "unfold foo"

/-- error: <input>:1:7: expected identifier -/
#guard_msgs in run_meta checkParse `tactic "unfold (· + ·)"