test(tests/lean): add new simplifier test

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-01-23 22:23:19 -08:00
parent 26bea77721
commit 1a3660180e
2 changed files with 20 additions and 0 deletions

12
tests/lean/simp21.lean Normal file
View file

@ -0,0 +1,12 @@
variable vec : Nat → Type
rewrite_set simple
add_rewrite Nat::add_assoc Nat::add_zeror eq_id : simple
variable n : Nat
(*
local t = parse_lean([[ vec n = vec (n + 0) ]])
print(t)
print("===>")
local t2, pr = simplify(t, "simple")
print(t2)
print(pr)
*)

View file

@ -0,0 +1,8 @@
Set: pp::colors
Set: pp::unicode
Assumed: vec
Assumed: n
vec n = vec (n + 0)
===>
trans (congr2 (eq (vec n)) (congr2 vec (Nat::add_zeror n))) (eq_id (vec n))