lean2/tests/lean/simp.lean
Leonardo de Moura d322f63113 feat(frontends/lea): add commands for creating and managing rewrite rule sets
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-19 12:03:59 -08:00

37 lines
613 B
Text

variable f : Nat → Nat
variable g : Nat → Nat → Nat
rewrite_set fgrules
axiom Axf1 : ∀ x, f (f x) = x
add_rewrite Axf1 : fgrules
axiom Axfg : ∀ x, g x x = x
add_rewrite Axfg : fgrules
variables a b : Nat
print rewrite_set fgrules
(*
local t = parse_lean('g a (f (f a))')
print(simplify(t, {'fgrules'}))
*)
disable_rewrite Axfg : fgrules
(*
local t = parse_lean('g a (f (f a))')
print(simplify(t, {'fgrules'}))
*)
enable_rewrite Axfg : fgrules
(*
local t = parse_lean('g a (f (f a))')
print(simplify(t, {'fgrules'}))
*)
(*
local t = parse_lean('g a (f (f a))')
print(simplify(t, 'fgrules'))
*)