R
↳Dependency Pair Analysis
AP(s(X)) -> MARK(X)
ALEQ(s(X), s(Y)) -> ALEQ(mark(X), mark(Y))
ALEQ(s(X), s(Y)) -> MARK(X)
ALEQ(s(X), s(Y)) -> MARK(Y)
AIF(true, X, Y) -> MARK(X)
AIF(false, X, Y) -> MARK(Y)
ADIFF(X, Y) -> AIF(aleq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
ADIFF(X, Y) -> ALEQ(mark(X), mark(Y))
ADIFF(X, Y) -> MARK(X)
ADIFF(X, Y) -> MARK(Y)
MARK(p(X)) -> AP(mark(X))
MARK(p(X)) -> MARK(X)
MARK(leq(X1, X2)) -> ALEQ(mark(X1), mark(X2))
MARK(leq(X1, X2)) -> MARK(X1)
MARK(leq(X1, X2)) -> MARK(X2)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(if(X1, X2, X3)) -> MARK(X1)
MARK(diff(X1, X2)) -> ADIFF(mark(X1), mark(X2))
MARK(diff(X1, X2)) -> MARK(X1)
MARK(diff(X1, X2)) -> MARK(X2)
MARK(s(X)) -> MARK(X)
R
↳DPs
→DP Problem 1
↳Narrowing Transformation
ADIFF(X, Y) -> MARK(Y)
ADIFF(X, Y) -> MARK(X)
ALEQ(s(X), s(Y)) -> MARK(Y)
ADIFF(X, Y) -> ALEQ(mark(X), mark(Y))
MARK(s(X)) -> MARK(X)
MARK(diff(X1, X2)) -> MARK(X2)
MARK(diff(X1, X2)) -> MARK(X1)
AIF(false, X, Y) -> MARK(Y)
ADIFF(X, Y) -> AIF(aleq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(diff(X1, X2)) -> ADIFF(mark(X1), mark(X2))
MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(true, X, Y) -> MARK(X)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(leq(X1, X2)) -> MARK(X2)
MARK(leq(X1, X2)) -> MARK(X1)
ALEQ(s(X), s(Y)) -> MARK(X)
ALEQ(s(X), s(Y)) -> ALEQ(mark(X), mark(Y))
MARK(leq(X1, X2)) -> ALEQ(mark(X1), mark(X2))
MARK(p(X)) -> MARK(X)
MARK(p(X)) -> AP(mark(X))
AP(s(X)) -> MARK(X)
ap(0) -> 0
ap(s(X)) -> mark(X)
ap(X) -> p(X)
aleq(0, Y) -> true
aleq(s(X), 0) -> false
aleq(s(X), s(Y)) -> aleq(mark(X), mark(Y))
aleq(X1, X2) -> leq(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
adiff(X, Y) -> aif(aleq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
adiff(X1, X2) -> diff(X1, X2)
mark(p(X)) -> ap(mark(X))
mark(leq(X1, X2)) -> aleq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(diff(X1, X2)) -> adiff(mark(X1), mark(X2))
mark(0) -> 0
mark(s(X)) -> s(mark(X))
mark(true) -> true
mark(false) -> false
innermost
16 new Dependency Pairs are created:
ALEQ(s(X), s(Y)) -> ALEQ(mark(X), mark(Y))
ALEQ(s(p(X'')), s(Y)) -> ALEQ(ap(mark(X'')), mark(Y))
ALEQ(s(leq(X1', X2')), s(Y)) -> ALEQ(aleq(mark(X1'), mark(X2')), mark(Y))
ALEQ(s(if(X1', X2', X3')), s(Y)) -> ALEQ(aif(mark(X1'), X2', X3'), mark(Y))
ALEQ(s(diff(X1', X2')), s(Y)) -> ALEQ(adiff(mark(X1'), mark(X2')), mark(Y))
ALEQ(s(0), s(Y)) -> ALEQ(0, mark(Y))
ALEQ(s(s(X'')), s(Y)) -> ALEQ(s(mark(X'')), mark(Y))
ALEQ(s(true), s(Y)) -> ALEQ(true, mark(Y))
ALEQ(s(false), s(Y)) -> ALEQ(false, mark(Y))
ALEQ(s(X), s(p(X''))) -> ALEQ(mark(X), ap(mark(X'')))
ALEQ(s(X), s(leq(X1', X2'))) -> ALEQ(mark(X), aleq(mark(X1'), mark(X2')))
ALEQ(s(X), s(if(X1', X2', X3'))) -> ALEQ(mark(X), aif(mark(X1'), X2', X3'))
ALEQ(s(X), s(diff(X1', X2'))) -> ALEQ(mark(X), adiff(mark(X1'), mark(X2')))
ALEQ(s(X), s(0)) -> ALEQ(mark(X), 0)
ALEQ(s(X), s(s(X''))) -> ALEQ(mark(X), s(mark(X'')))
ALEQ(s(X), s(true)) -> ALEQ(mark(X), true)
ALEQ(s(X), s(false)) -> ALEQ(mark(X), false)
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 2
↳Narrowing Transformation
ADIFF(X, Y) -> MARK(X)
ALEQ(s(X), s(s(X''))) -> ALEQ(mark(X), s(mark(X'')))
ALEQ(s(X), s(diff(X1', X2'))) -> ALEQ(mark(X), adiff(mark(X1'), mark(X2')))
ALEQ(s(X), s(if(X1', X2', X3'))) -> ALEQ(mark(X), aif(mark(X1'), X2', X3'))
ALEQ(s(X), s(leq(X1', X2'))) -> ALEQ(mark(X), aleq(mark(X1'), mark(X2')))
ALEQ(s(X), s(p(X''))) -> ALEQ(mark(X), ap(mark(X'')))
ALEQ(s(s(X'')), s(Y)) -> ALEQ(s(mark(X'')), mark(Y))
ALEQ(s(diff(X1', X2')), s(Y)) -> ALEQ(adiff(mark(X1'), mark(X2')), mark(Y))
ALEQ(s(if(X1', X2', X3')), s(Y)) -> ALEQ(aif(mark(X1'), X2', X3'), mark(Y))
ALEQ(s(leq(X1', X2')), s(Y)) -> ALEQ(aleq(mark(X1'), mark(X2')), mark(Y))
ALEQ(s(p(X'')), s(Y)) -> ALEQ(ap(mark(X'')), mark(Y))
ALEQ(s(X), s(Y)) -> MARK(Y)
ADIFF(X, Y) -> ALEQ(mark(X), mark(Y))
MARK(s(X)) -> MARK(X)
MARK(diff(X1, X2)) -> MARK(X2)
MARK(diff(X1, X2)) -> MARK(X1)
AIF(false, X, Y) -> MARK(Y)
ADIFF(X, Y) -> AIF(aleq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(diff(X1, X2)) -> ADIFF(mark(X1), mark(X2))
MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(true, X, Y) -> MARK(X)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(leq(X1, X2)) -> MARK(X2)
MARK(leq(X1, X2)) -> MARK(X1)
ALEQ(s(X), s(Y)) -> MARK(X)
MARK(leq(X1, X2)) -> ALEQ(mark(X1), mark(X2))
MARK(p(X)) -> MARK(X)
AP(s(X)) -> MARK(X)
MARK(p(X)) -> AP(mark(X))
ADIFF(X, Y) -> MARK(Y)
ap(0) -> 0
ap(s(X)) -> mark(X)
ap(X) -> p(X)
aleq(0, Y) -> true
aleq(s(X), 0) -> false
aleq(s(X), s(Y)) -> aleq(mark(X), mark(Y))
aleq(X1, X2) -> leq(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
adiff(X, Y) -> aif(aleq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
adiff(X1, X2) -> diff(X1, X2)
mark(p(X)) -> ap(mark(X))
mark(leq(X1, X2)) -> aleq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(diff(X1, X2)) -> adiff(mark(X1), mark(X2))
mark(0) -> 0
mark(s(X)) -> s(mark(X))
mark(true) -> true
mark(false) -> false
innermost
17 new Dependency Pairs are created:
ADIFF(X, Y) -> AIF(aleq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
ADIFF(X', Y') -> AIF(leq(mark(X'), mark(Y')), 0, s(diff(p(X'), Y')))
ADIFF(p(X''), Y) -> AIF(aleq(ap(mark(X'')), mark(Y)), 0, s(diff(p(p(X'')), Y)))
ADIFF(leq(X1', X2'), Y) -> AIF(aleq(aleq(mark(X1'), mark(X2')), mark(Y)), 0, s(diff(p(leq(X1', X2')), Y)))
ADIFF(if(X1', X2', X3'), Y) -> AIF(aleq(aif(mark(X1'), X2', X3'), mark(Y)), 0, s(diff(p(if(X1', X2', X3')), Y)))
ADIFF(diff(X1', X2'), Y) -> AIF(aleq(adiff(mark(X1'), mark(X2')), mark(Y)), 0, s(diff(p(diff(X1', X2')), Y)))
ADIFF(0, Y) -> AIF(aleq(0, mark(Y)), 0, s(diff(p(0), Y)))
ADIFF(s(X''), Y) -> AIF(aleq(s(mark(X'')), mark(Y)), 0, s(diff(p(s(X'')), Y)))
ADIFF(true, Y) -> AIF(aleq(true, mark(Y)), 0, s(diff(p(true), Y)))
ADIFF(false, Y) -> AIF(aleq(false, mark(Y)), 0, s(diff(p(false), Y)))
ADIFF(X, p(X'')) -> AIF(aleq(mark(X), ap(mark(X''))), 0, s(diff(p(X), p(X''))))
ADIFF(X, leq(X1', X2')) -> AIF(aleq(mark(X), aleq(mark(X1'), mark(X2'))), 0, s(diff(p(X), leq(X1', X2'))))
ADIFF(X, if(X1', X2', X3')) -> AIF(aleq(mark(X), aif(mark(X1'), X2', X3')), 0, s(diff(p(X), if(X1', X2', X3'))))
ADIFF(X, diff(X1', X2')) -> AIF(aleq(mark(X), adiff(mark(X1'), mark(X2'))), 0, s(diff(p(X), diff(X1', X2'))))
ADIFF(X, 0) -> AIF(aleq(mark(X), 0), 0, s(diff(p(X), 0)))
ADIFF(X, s(X'')) -> AIF(aleq(mark(X), s(mark(X''))), 0, s(diff(p(X), s(X''))))
ADIFF(X, true) -> AIF(aleq(mark(X), true), 0, s(diff(p(X), true)))
ADIFF(X, false) -> AIF(aleq(mark(X), false), 0, s(diff(p(X), false)))
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 2
↳Nar
...
→DP Problem 3
↳Narrowing Transformation
ADIFF(X, false) -> AIF(aleq(mark(X), false), 0, s(diff(p(X), false)))
ADIFF(X, true) -> AIF(aleq(mark(X), true), 0, s(diff(p(X), true)))
ADIFF(X, s(X'')) -> AIF(aleq(mark(X), s(mark(X''))), 0, s(diff(p(X), s(X''))))
ADIFF(X, 0) -> AIF(aleq(mark(X), 0), 0, s(diff(p(X), 0)))
ADIFF(X, diff(X1', X2')) -> AIF(aleq(mark(X), adiff(mark(X1'), mark(X2'))), 0, s(diff(p(X), diff(X1', X2'))))
ADIFF(X, if(X1', X2', X3')) -> AIF(aleq(mark(X), aif(mark(X1'), X2', X3')), 0, s(diff(p(X), if(X1', X2', X3'))))
ADIFF(X, leq(X1', X2')) -> AIF(aleq(mark(X), aleq(mark(X1'), mark(X2'))), 0, s(diff(p(X), leq(X1', X2'))))
ADIFF(X, p(X'')) -> AIF(aleq(mark(X), ap(mark(X''))), 0, s(diff(p(X), p(X''))))
ADIFF(false, Y) -> AIF(aleq(false, mark(Y)), 0, s(diff(p(false), Y)))
ADIFF(true, Y) -> AIF(aleq(true, mark(Y)), 0, s(diff(p(true), Y)))
ADIFF(s(X''), Y) -> AIF(aleq(s(mark(X'')), mark(Y)), 0, s(diff(p(s(X'')), Y)))
ADIFF(0, Y) -> AIF(aleq(0, mark(Y)), 0, s(diff(p(0), Y)))
ADIFF(diff(X1', X2'), Y) -> AIF(aleq(adiff(mark(X1'), mark(X2')), mark(Y)), 0, s(diff(p(diff(X1', X2')), Y)))
ADIFF(if(X1', X2', X3'), Y) -> AIF(aleq(aif(mark(X1'), X2', X3'), mark(Y)), 0, s(diff(p(if(X1', X2', X3')), Y)))
ADIFF(leq(X1', X2'), Y) -> AIF(aleq(aleq(mark(X1'), mark(X2')), mark(Y)), 0, s(diff(p(leq(X1', X2')), Y)))
AIF(false, X, Y) -> MARK(Y)
ADIFF(p(X''), Y) -> AIF(aleq(ap(mark(X'')), mark(Y)), 0, s(diff(p(p(X'')), Y)))
ADIFF(X, Y) -> MARK(Y)
ALEQ(s(X), s(s(X''))) -> ALEQ(mark(X), s(mark(X'')))
ALEQ(s(X), s(diff(X1', X2'))) -> ALEQ(mark(X), adiff(mark(X1'), mark(X2')))
ALEQ(s(X), s(if(X1', X2', X3'))) -> ALEQ(mark(X), aif(mark(X1'), X2', X3'))
ALEQ(s(X), s(leq(X1', X2'))) -> ALEQ(mark(X), aleq(mark(X1'), mark(X2')))
ALEQ(s(X), s(p(X''))) -> ALEQ(mark(X), ap(mark(X'')))
ALEQ(s(s(X'')), s(Y)) -> ALEQ(s(mark(X'')), mark(Y))
ALEQ(s(diff(X1', X2')), s(Y)) -> ALEQ(adiff(mark(X1'), mark(X2')), mark(Y))
ALEQ(s(if(X1', X2', X3')), s(Y)) -> ALEQ(aif(mark(X1'), X2', X3'), mark(Y))
ALEQ(s(leq(X1', X2')), s(Y)) -> ALEQ(aleq(mark(X1'), mark(X2')), mark(Y))
ALEQ(s(p(X'')), s(Y)) -> ALEQ(ap(mark(X'')), mark(Y))
MARK(s(X)) -> MARK(X)
MARK(diff(X1, X2)) -> MARK(X2)
MARK(diff(X1, X2)) -> MARK(X1)
ALEQ(s(X), s(Y)) -> MARK(Y)
ADIFF(X, Y) -> ALEQ(mark(X), mark(Y))
MARK(diff(X1, X2)) -> ADIFF(mark(X1), mark(X2))
MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(true, X, Y) -> MARK(X)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(leq(X1, X2)) -> MARK(X2)
MARK(leq(X1, X2)) -> MARK(X1)
ALEQ(s(X), s(Y)) -> MARK(X)
MARK(leq(X1, X2)) -> ALEQ(mark(X1), mark(X2))
MARK(p(X)) -> MARK(X)
AP(s(X)) -> MARK(X)
MARK(p(X)) -> AP(mark(X))
ADIFF(X, Y) -> MARK(X)
ap(0) -> 0
ap(s(X)) -> mark(X)
ap(X) -> p(X)
aleq(0, Y) -> true
aleq(s(X), 0) -> false
aleq(s(X), s(Y)) -> aleq(mark(X), mark(Y))
aleq(X1, X2) -> leq(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
adiff(X, Y) -> aif(aleq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
adiff(X1, X2) -> diff(X1, X2)
mark(p(X)) -> ap(mark(X))
mark(leq(X1, X2)) -> aleq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(diff(X1, X2)) -> adiff(mark(X1), mark(X2))
mark(0) -> 0
mark(s(X)) -> s(mark(X))
mark(true) -> true
mark(false) -> false
innermost
16 new Dependency Pairs are created:
ADIFF(X, Y) -> ALEQ(mark(X), mark(Y))
ADIFF(p(X''), Y) -> ALEQ(ap(mark(X'')), mark(Y))
ADIFF(leq(X1', X2'), Y) -> ALEQ(aleq(mark(X1'), mark(X2')), mark(Y))
ADIFF(if(X1', X2', X3'), Y) -> ALEQ(aif(mark(X1'), X2', X3'), mark(Y))
ADIFF(diff(X1', X2'), Y) -> ALEQ(adiff(mark(X1'), mark(X2')), mark(Y))
ADIFF(0, Y) -> ALEQ(0, mark(Y))
ADIFF(s(X''), Y) -> ALEQ(s(mark(X'')), mark(Y))
ADIFF(true, Y) -> ALEQ(true, mark(Y))
ADIFF(false, Y) -> ALEQ(false, mark(Y))
ADIFF(X, p(X'')) -> ALEQ(mark(X), ap(mark(X'')))
ADIFF(X, leq(X1', X2')) -> ALEQ(mark(X), aleq(mark(X1'), mark(X2')))
ADIFF(X, if(X1', X2', X3')) -> ALEQ(mark(X), aif(mark(X1'), X2', X3'))
ADIFF(X, diff(X1', X2')) -> ALEQ(mark(X), adiff(mark(X1'), mark(X2')))
ADIFF(X, 0) -> ALEQ(mark(X), 0)
ADIFF(X, s(X'')) -> ALEQ(mark(X), s(mark(X'')))
ADIFF(X, true) -> ALEQ(mark(X), true)
ADIFF(X, false) -> ALEQ(mark(X), false)
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 2
↳Nar
...
→DP Problem 4
↳Remaining Obligation(s)
ADIFF(X, s(X'')) -> ALEQ(mark(X), s(mark(X'')))
ADIFF(X, diff(X1', X2')) -> ALEQ(mark(X), adiff(mark(X1'), mark(X2')))
ADIFF(X, if(X1', X2', X3')) -> ALEQ(mark(X), aif(mark(X1'), X2', X3'))
ADIFF(X, leq(X1', X2')) -> ALEQ(mark(X), aleq(mark(X1'), mark(X2')))
ADIFF(X, p(X'')) -> ALEQ(mark(X), ap(mark(X'')))
ADIFF(s(X''), Y) -> ALEQ(s(mark(X'')), mark(Y))
ADIFF(diff(X1', X2'), Y) -> ALEQ(adiff(mark(X1'), mark(X2')), mark(Y))
ADIFF(if(X1', X2', X3'), Y) -> ALEQ(aif(mark(X1'), X2', X3'), mark(Y))
ADIFF(leq(X1', X2'), Y) -> ALEQ(aleq(mark(X1'), mark(X2')), mark(Y))
ALEQ(s(X), s(s(X''))) -> ALEQ(mark(X), s(mark(X'')))
ALEQ(s(X), s(diff(X1', X2'))) -> ALEQ(mark(X), adiff(mark(X1'), mark(X2')))
ALEQ(s(X), s(if(X1', X2', X3'))) -> ALEQ(mark(X), aif(mark(X1'), X2', X3'))
ALEQ(s(X), s(leq(X1', X2'))) -> ALEQ(mark(X), aleq(mark(X1'), mark(X2')))
ALEQ(s(X), s(p(X''))) -> ALEQ(mark(X), ap(mark(X'')))
ALEQ(s(s(X'')), s(Y)) -> ALEQ(s(mark(X'')), mark(Y))
ALEQ(s(diff(X1', X2')), s(Y)) -> ALEQ(adiff(mark(X1'), mark(X2')), mark(Y))
ALEQ(s(if(X1', X2', X3')), s(Y)) -> ALEQ(aif(mark(X1'), X2', X3'), mark(Y))
ALEQ(s(leq(X1', X2')), s(Y)) -> ALEQ(aleq(mark(X1'), mark(X2')), mark(Y))
ALEQ(s(p(X'')), s(Y)) -> ALEQ(ap(mark(X'')), mark(Y))
ALEQ(s(X), s(Y)) -> MARK(Y)
ADIFF(p(X''), Y) -> ALEQ(ap(mark(X'')), mark(Y))
ADIFF(X, true) -> AIF(aleq(mark(X), true), 0, s(diff(p(X), true)))
ADIFF(X, s(X'')) -> AIF(aleq(mark(X), s(mark(X''))), 0, s(diff(p(X), s(X''))))
ADIFF(X, 0) -> AIF(aleq(mark(X), 0), 0, s(diff(p(X), 0)))
ADIFF(X, diff(X1', X2')) -> AIF(aleq(mark(X), adiff(mark(X1'), mark(X2'))), 0, s(diff(p(X), diff(X1', X2'))))
ADIFF(X, if(X1', X2', X3')) -> AIF(aleq(mark(X), aif(mark(X1'), X2', X3')), 0, s(diff(p(X), if(X1', X2', X3'))))
ADIFF(X, leq(X1', X2')) -> AIF(aleq(mark(X), aleq(mark(X1'), mark(X2'))), 0, s(diff(p(X), leq(X1', X2'))))
ADIFF(X, p(X'')) -> AIF(aleq(mark(X), ap(mark(X''))), 0, s(diff(p(X), p(X''))))
ADIFF(false, Y) -> AIF(aleq(false, mark(Y)), 0, s(diff(p(false), Y)))
ADIFF(true, Y) -> AIF(aleq(true, mark(Y)), 0, s(diff(p(true), Y)))
ADIFF(s(X''), Y) -> AIF(aleq(s(mark(X'')), mark(Y)), 0, s(diff(p(s(X'')), Y)))
ADIFF(0, Y) -> AIF(aleq(0, mark(Y)), 0, s(diff(p(0), Y)))
ADIFF(diff(X1', X2'), Y) -> AIF(aleq(adiff(mark(X1'), mark(X2')), mark(Y)), 0, s(diff(p(diff(X1', X2')), Y)))
ADIFF(if(X1', X2', X3'), Y) -> AIF(aleq(aif(mark(X1'), X2', X3'), mark(Y)), 0, s(diff(p(if(X1', X2', X3')), Y)))
ADIFF(leq(X1', X2'), Y) -> AIF(aleq(aleq(mark(X1'), mark(X2')), mark(Y)), 0, s(diff(p(leq(X1', X2')), Y)))
ADIFF(p(X''), Y) -> AIF(aleq(ap(mark(X'')), mark(Y)), 0, s(diff(p(p(X'')), Y)))
ADIFF(X, Y) -> MARK(Y)
MARK(s(X)) -> MARK(X)
MARK(diff(X1, X2)) -> MARK(X2)
MARK(diff(X1, X2)) -> MARK(X1)
ADIFF(X, Y) -> MARK(X)
MARK(diff(X1, X2)) -> ADIFF(mark(X1), mark(X2))
MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(false, X, Y) -> MARK(Y)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(leq(X1, X2)) -> MARK(X2)
MARK(leq(X1, X2)) -> MARK(X1)
ALEQ(s(X), s(Y)) -> MARK(X)
MARK(leq(X1, X2)) -> ALEQ(mark(X1), mark(X2))
MARK(p(X)) -> MARK(X)
AP(s(X)) -> MARK(X)
MARK(p(X)) -> AP(mark(X))
AIF(true, X, Y) -> MARK(X)
ADIFF(X, false) -> AIF(aleq(mark(X), false), 0, s(diff(p(X), false)))
ap(0) -> 0
ap(s(X)) -> mark(X)
ap(X) -> p(X)
aleq(0, Y) -> true
aleq(s(X), 0) -> false
aleq(s(X), s(Y)) -> aleq(mark(X), mark(Y))
aleq(X1, X2) -> leq(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
adiff(X, Y) -> aif(aleq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
adiff(X1, X2) -> diff(X1, X2)
mark(p(X)) -> ap(mark(X))
mark(leq(X1, X2)) -> aleq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(diff(X1, X2)) -> adiff(mark(X1), mark(X2))
mark(0) -> 0
mark(s(X)) -> s(mark(X))
mark(true) -> true
mark(false) -> false
innermost