; @origtpdbfilename ./TRS/currying/Ste92/motivation.trs
; @xtcfilename "./TRS_Standard/Applicative_first_order_05/motivation.xml"
(format TRS)
(fun app 2)
(fun g 0)
(fun h 0)
(fun f 0)
(fun map 0)
(fun nil 0)
(fun cons 0)
(fun filter 0)
(fun filter2 0)
(fun true 0)
(fun false 0)
(rule (app g (app h (app g x))) (app g x))
(rule (app g (app g x)) (app g (app h (app g x))))
(rule (app h (app h x)) (app h (app (app f (app h x)) x)))
(rule (app (app map |fun|) nil) nil)
(rule (app (app map |fun|) (app (app cons x) xs)) (app (app cons (app |fun| x)) (app (app map |fun|) xs)))
(rule (app (app filter |fun|) nil) nil)
(rule (app (app filter |fun|) (app (app cons x) xs)) (app (app (app (app filter2 (app |fun| x)) |fun|) x) xs))
(rule (app (app (app (app filter2 true) |fun|) x) xs) (app (app cons x) (app (app filter |fun|) xs)))
(rule (app (app (app (app filter2 false) |fun|) x) xs) (app (app filter |fun|) xs))