; @author Naoki Nishida
; @cops 809
(format CTRS oriented :problem infeasibility)
(fun 0 0)
(fun app 2)
(fun cons 2)
(fun empty 1)
(fun f 2)
(fun false 0)
(fun fstsplit 2)
(fun length 1)
(fun leq 2)
(fun map_f 2)
(fun nil 0)
(fun process 2)
(fun s 1)
(fun self 0)
(fun sndsplit 2)
(fun true 0)
(rule (fstsplit 0 x) nil)
(rule (fstsplit (s n) nil) nil)
(rule (fstsplit (s n) (cons h t)) (cons h (fstsplit n t)))
(rule (sndsplit 0 x) x)
(rule (sndsplit (s n) nil) nil)
(rule (sndsplit (s n) (cons h t)) (sndsplit n t))
(rule (empty nil) true)
(rule (empty (cons h t)) false)
(rule (leq 0 m) true)
(rule (leq (s n) 0) false)
(rule (leq (s n) (s m)) (leq n m))
(rule (length nil) 0)
(rule (length (cons h t)) (s (length t)))
(rule (app nil x) x)
(rule (app (cons h t) x) (cons h (app t x)))
(rule (map_f pid nil) nil)
(rule (map_f pid (cons h t)) (app (f pid h) (map_f pid t)))
(rule (process store m) (process (app (map_f self nil) (sndsplit m store)) m) (= (leq m (length store)) true) (= (empty (fstsplit m store)) false))
(rule (process store m) (process (sndsplit m (app (map_f self nil) store)) m) (= (leq m (length store)) false) (= (empty (fstsplit m (app (map_f self nil) store))) false))
(infeasible? (= (leq x2 (length x1)) true) (= (empty (fstsplit x2 x1)) false) (= (leq x2 (length x1)) false) (= (empty (fstsplit x2 (app (map_f self nil) x1))) false))