(0) Obligation:

Clauses:

ordered([]).
ordered(.(X1, [])).
ordered(.(X, .(Y, Xs))) :- ','(less(X, s(Y)), ordered(.(Y, Xs))).
less(0, s(X2)).
less(s(X), s(Y)) :- less(X, Y).

Queries:

ordered(g).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

less21(s(T37), s(T38)) :- less21(T37, T38).
ordered1(.(0, .(T15, T10))) :- ordered1(.(T15, T10)).
ordered1(.(s(T22), .(T23, T10))) :- less21(T22, T23).
ordered1(.(s(T22), .(T23, T10))) :- ','(lessc21(T22, T23), ordered1(.(T23, T10))).

Clauses:

orderedc1([]).
orderedc1(.(T3, [])).
orderedc1(.(0, .(T15, T10))) :- orderedc1(.(T15, T10)).
orderedc1(.(s(T22), .(T23, T10))) :- ','(lessc21(T22, T23), orderedc1(.(T23, T10))).
lessc21(0, s(T32)).
lessc21(s(T37), s(T38)) :- lessc21(T37, T38).

Afs:

ordered1(x1)  =  ordered1(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:
ordered1_in: (b)
less21_in: (b,b)
lessc21_in: (b,b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

ORDERED1_IN_G(.(0, .(T15, T10))) → U2_G(T15, T10, ordered1_in_g(.(T15, T10)))
ORDERED1_IN_G(.(0, .(T15, T10))) → ORDERED1_IN_G(.(T15, T10))
ORDERED1_IN_G(.(s(T22), .(T23, T10))) → U3_G(T22, T23, T10, less21_in_gg(T22, T23))
ORDERED1_IN_G(.(s(T22), .(T23, T10))) → LESS21_IN_GG(T22, T23)
LESS21_IN_GG(s(T37), s(T38)) → U1_GG(T37, T38, less21_in_gg(T37, T38))
LESS21_IN_GG(s(T37), s(T38)) → LESS21_IN_GG(T37, T38)
ORDERED1_IN_G(.(s(T22), .(T23, T10))) → U4_G(T22, T23, T10, lessc21_in_gg(T22, T23))
U4_G(T22, T23, T10, lessc21_out_gg(T22, T23)) → U5_G(T22, T23, T10, ordered1_in_g(.(T23, T10)))
U4_G(T22, T23, T10, lessc21_out_gg(T22, T23)) → ORDERED1_IN_G(.(T23, T10))

The TRS R consists of the following rules:

lessc21_in_gg(0, s(T32)) → lessc21_out_gg(0, s(T32))
lessc21_in_gg(s(T37), s(T38)) → U10_gg(T37, T38, lessc21_in_gg(T37, T38))
U10_gg(T37, T38, lessc21_out_gg(T37, T38)) → lessc21_out_gg(s(T37), s(T38))

Pi is empty.
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:

ORDERED1_IN_G(.(0, .(T15, T10))) → U2_G(T15, T10, ordered1_in_g(.(T15, T10)))
ORDERED1_IN_G(.(0, .(T15, T10))) → ORDERED1_IN_G(.(T15, T10))
ORDERED1_IN_G(.(s(T22), .(T23, T10))) → U3_G(T22, T23, T10, less21_in_gg(T22, T23))
ORDERED1_IN_G(.(s(T22), .(T23, T10))) → LESS21_IN_GG(T22, T23)
LESS21_IN_GG(s(T37), s(T38)) → U1_GG(T37, T38, less21_in_gg(T37, T38))
LESS21_IN_GG(s(T37), s(T38)) → LESS21_IN_GG(T37, T38)
ORDERED1_IN_G(.(s(T22), .(T23, T10))) → U4_G(T22, T23, T10, lessc21_in_gg(T22, T23))
U4_G(T22, T23, T10, lessc21_out_gg(T22, T23)) → U5_G(T22, T23, T10, ordered1_in_g(.(T23, T10)))
U4_G(T22, T23, T10, lessc21_out_gg(T22, T23)) → ORDERED1_IN_G(.(T23, T10))

The TRS R consists of the following rules:

lessc21_in_gg(0, s(T32)) → lessc21_out_gg(0, s(T32))
lessc21_in_gg(s(T37), s(T38)) → U10_gg(T37, T38, lessc21_in_gg(T37, T38))
U10_gg(T37, T38, lessc21_out_gg(T37, T38)) → lessc21_out_gg(s(T37), s(T38))

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

LESS21_IN_GG(s(T37), s(T38)) → LESS21_IN_GG(T37, T38)

The TRS R consists of the following rules:

lessc21_in_gg(0, s(T32)) → lessc21_out_gg(0, s(T32))
lessc21_in_gg(s(T37), s(T38)) → U10_gg(T37, T38, lessc21_in_gg(T37, T38))
U10_gg(T37, T38, lessc21_out_gg(T37, T38)) → lessc21_out_gg(s(T37), s(T38))

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

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

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

LESS21_IN_GG(s(T37), s(T38)) → LESS21_IN_GG(T37, T38)

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

(10) PiDPToQDPProof (EQUIVALENT transformation)

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

(11) Obligation:

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

LESS21_IN_GG(s(T37), s(T38)) → LESS21_IN_GG(T37, T38)

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

(12) 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:

  • LESS21_IN_GG(s(T37), s(T38)) → LESS21_IN_GG(T37, T38)
    The graph contains the following edges 1 > 1, 2 > 2

(13) YES

(14) Obligation:

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

ORDERED1_IN_G(.(s(T22), .(T23, T10))) → U4_G(T22, T23, T10, lessc21_in_gg(T22, T23))
U4_G(T22, T23, T10, lessc21_out_gg(T22, T23)) → ORDERED1_IN_G(.(T23, T10))
ORDERED1_IN_G(.(0, .(T15, T10))) → ORDERED1_IN_G(.(T15, T10))

The TRS R consists of the following rules:

lessc21_in_gg(0, s(T32)) → lessc21_out_gg(0, s(T32))
lessc21_in_gg(s(T37), s(T38)) → U10_gg(T37, T38, lessc21_in_gg(T37, T38))
U10_gg(T37, T38, lessc21_out_gg(T37, T38)) → lessc21_out_gg(s(T37), s(T38))

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

(15) PiDPToQDPProof (EQUIVALENT transformation)

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

(16) Obligation:

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

ORDERED1_IN_G(.(s(T22), .(T23, T10))) → U4_G(T22, T23, T10, lessc21_in_gg(T22, T23))
U4_G(T22, T23, T10, lessc21_out_gg(T22, T23)) → ORDERED1_IN_G(.(T23, T10))
ORDERED1_IN_G(.(0, .(T15, T10))) → ORDERED1_IN_G(.(T15, T10))

The TRS R consists of the following rules:

lessc21_in_gg(0, s(T32)) → lessc21_out_gg(0, s(T32))
lessc21_in_gg(s(T37), s(T38)) → U10_gg(T37, T38, lessc21_in_gg(T37, T38))
U10_gg(T37, T38, lessc21_out_gg(T37, T38)) → lessc21_out_gg(s(T37), s(T38))

The set Q consists of the following terms:

lessc21_in_gg(x0, x1)
U10_gg(x0, x1, x2)

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

(17) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

ORDERED1_IN_G(.(s(T22), .(T23, T10))) → U4_G(T22, T23, T10, lessc21_in_gg(T22, T23))
ORDERED1_IN_G(.(0, .(T15, T10))) → ORDERED1_IN_G(.(T15, T10))


Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(0) = 0   
POL(ORDERED1_IN_G(x1)) = x1   
POL(U10_gg(x1, x2, x3)) = x1 + x2 + x3   
POL(U4_G(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + 2·x3 + 2·x4   
POL(lessc21_in_gg(x1, x2)) = x1 + x2   
POL(lessc21_out_gg(x1, x2)) = x1 + x2   
POL(s(x1)) = 2·x1   

(18) Obligation:

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

U4_G(T22, T23, T10, lessc21_out_gg(T22, T23)) → ORDERED1_IN_G(.(T23, T10))

The TRS R consists of the following rules:

lessc21_in_gg(0, s(T32)) → lessc21_out_gg(0, s(T32))
lessc21_in_gg(s(T37), s(T38)) → U10_gg(T37, T38, lessc21_in_gg(T37, T38))
U10_gg(T37, T38, lessc21_out_gg(T37, T38)) → lessc21_out_gg(s(T37), s(T38))

The set Q consists of the following terms:

lessc21_in_gg(x0, x1)
U10_gg(x0, x1, x2)

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

(19) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(20) TRUE