2014-01-25 06:32:55 +00:00
|
|
|
rewrite_set simple
|
|
|
|
add_rewrite eq_id imp_truel imp_truer Nat::add_zeror : simple
|
|
|
|
variables a b : Nat
|
|
|
|
(*
|
|
|
|
local opts = options({"simplifier", "contextual"}, false)
|
|
|
|
local t = parse_lean('λ x, a = a → x = a')
|
2014-01-27 23:02:05 +00:00
|
|
|
local t2, pr = simplify(t, "simple", opts)
|
2014-01-25 06:32:55 +00:00
|
|
|
print(t2)
|
|
|
|
print(pr)
|
|
|
|
get_environment():type_check(pr)
|
|
|
|
*)
|
|
|
|
|
|
|
|
(*
|
|
|
|
local opts = options({"simplifier", "contextual"}, false)
|
|
|
|
local t = parse_lean('λ x, x = a → x = x')
|
2014-01-27 23:02:05 +00:00
|
|
|
local t2, pr = simplify(t, "simple", opts)
|
2014-01-25 06:32:55 +00:00
|
|
|
print(t2)
|
|
|
|
print(pr)
|
|
|
|
get_environment():type_check(pr)
|
|
|
|
*)
|
|
|
|
|
|
|
|
(*
|
|
|
|
local opts = options({"simplifier", "contextual"}, false)
|
|
|
|
local t = parse_lean('λ x, x = a + 0 → a = a')
|
2014-01-27 23:02:05 +00:00
|
|
|
local t2, pr = simplify(t, "simple", opts)
|
2014-01-25 06:32:55 +00:00
|
|
|
print(t2)
|
|
|
|
print(pr)
|
|
|
|
*)
|
|
|
|
|
|
|
|
(*
|
|
|
|
local t = parse_lean('λ x, a + 0 = 1 → x > a')
|
|
|
|
local t2, pr = simplify(t, "simple")
|
|
|
|
print(t2)
|
|
|
|
print(pr)
|
|
|
|
get_environment():type_check(pr)
|
|
|
|
*)
|