(0) Obligation:

Clauses:

less(0, s(X2)).
less(X, Y) :- ','(no(zero(X)), ','(p(X, X1), ','(p(Y, Y1), less(X1, Y1)))).
p(0, 0).
p(s(X), X).
zero(0).
no(X) :- ','(X, ','(!, failure(a))).
no(X3).
failure(b).

Queries:

less(g,a).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

less35(s(T34)) :- less35(T34).
less1(s(T21), 0) :- less35(T21).
less1(s(T21), s(T41)) :- less1(T21, T41).

Clauses:

lessc35(s(T34)) :- lessc35(T34).
lessc1(0, s(T4)).
lessc1(s(T21), 0) :- lessc35(T21).
lessc1(s(T21), s(T41)) :- lessc1(T21, T41).

Afs:

less1(x1, x2)  =  less1(x1)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
less1_in: (b,f)
less35_in: (b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

LESS1_IN_GA(s(T21), 0) → U2_GA(T21, less35_in_g(T21))
LESS1_IN_GA(s(T21), 0) → LESS35_IN_G(T21)
LESS35_IN_G(s(T34)) → U1_G(T34, less35_in_g(T34))
LESS35_IN_G(s(T34)) → LESS35_IN_G(T34)
LESS1_IN_GA(s(T21), s(T41)) → U3_GA(T21, T41, less1_in_ga(T21, T41))
LESS1_IN_GA(s(T21), s(T41)) → LESS1_IN_GA(T21, T41)

R is empty.
The argument filtering Pi contains the following mapping:
less1_in_ga(x1, x2)  =  less1_in_ga(x1)
s(x1)  =  s(x1)
less35_in_g(x1)  =  less35_in_g(x1)
0  =  0
LESS1_IN_GA(x1, x2)  =  LESS1_IN_GA(x1)
U2_GA(x1, x2)  =  U2_GA(x1, x2)
LESS35_IN_G(x1)  =  LESS35_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
U3_GA(x1, x2, x3)  =  U3_GA(x1, x3)

We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESS1_IN_GA(s(T21), 0) → U2_GA(T21, less35_in_g(T21))
LESS1_IN_GA(s(T21), 0) → LESS35_IN_G(T21)
LESS35_IN_G(s(T34)) → U1_G(T34, less35_in_g(T34))
LESS35_IN_G(s(T34)) → LESS35_IN_G(T34)
LESS1_IN_GA(s(T21), s(T41)) → U3_GA(T21, T41, less1_in_ga(T21, T41))
LESS1_IN_GA(s(T21), s(T41)) → LESS1_IN_GA(T21, T41)

R is empty.
The argument filtering Pi contains the following mapping:
less1_in_ga(x1, x2)  =  less1_in_ga(x1)
s(x1)  =  s(x1)
less35_in_g(x1)  =  less35_in_g(x1)
0  =  0
LESS1_IN_GA(x1, x2)  =  LESS1_IN_GA(x1)
U2_GA(x1, x2)  =  U2_GA(x1, x2)
LESS35_IN_G(x1)  =  LESS35_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
U3_GA(x1, x2, x3)  =  U3_GA(x1, x3)

We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 4 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESS35_IN_G(s(T34)) → LESS35_IN_G(T34)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(8) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(9) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LESS35_IN_G(s(T34)) → LESS35_IN_G(T34)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(10) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LESS35_IN_G(s(T34)) → LESS35_IN_G(T34)
    The graph contains the following edges 1 > 1

(11) YES

(12) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESS1_IN_GA(s(T21), s(T41)) → LESS1_IN_GA(T21, T41)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
LESS1_IN_GA(x1, x2)  =  LESS1_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(13) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LESS1_IN_GA(s(T21)) → LESS1_IN_GA(T21)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(15) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LESS1_IN_GA(s(T21)) → LESS1_IN_GA(T21)
    The graph contains the following edges 1 > 1

(16) YES