7a4eb4b8ed
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
36 lines
929 B
Text
36 lines
929 B
Text
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')
|
|
local t2, pr = simplify(t, "simple", get_environment(), context(), opts)
|
|
print(t2)
|
|
print(pr)
|
|
get_environment():type_check(pr)
|
|
*)
|
|
|
|
(*
|
|
local opts = options({"simplifier", "contextual"}, false)
|
|
local t = parse_lean('λ x, x = a → x = x')
|
|
local t2, pr = simplify(t, "simple", get_environment(), context(), opts)
|
|
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')
|
|
local t2, pr = simplify(t, "simple", get_environment(), context(), opts)
|
|
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)
|
|
*)
|