(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)
Q is empty.
(1) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
(2) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__P(s(X)) → MARK(X)
A__LEQ(s(X), s(Y)) → A__LEQ(mark(X), mark(Y))
A__LEQ(s(X), s(Y)) → MARK(X)
A__LEQ(s(X), s(Y)) → MARK(Y)
A__IF(true, X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
MARK(p(X)) → A__P(mark(X))
MARK(p(X)) → MARK(X)
MARK(leq(X1, X2)) → A__LEQ(mark(X1), mark(X2))
MARK(leq(X1, X2)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X2)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(diff(X1, X2)) → MARK(X1)
MARK(diff(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
The TRS R consists of the following rules:
a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)
Q is empty.
We have to consider all minimal (P,Q,R)-chains.