(0) Obligation:

Clauses:

ordered([]).
ordered(.(X1, [])).
ordered(Xs) :- ','(no(max1el_list(Xs)), ','(head(Xs, X), ','(tail(Xs, Ys), ','(head(Ys, Y), ','(tail(Ys, Zs), ','(less(X, s(Y)), ordered(.(Y, Zs)))))))).
head([], X2).
head(.(X, X3), X).
tail([], []).
tail(.(X4, Xs), Xs).
less(0, s(X5)).
less(X, Y) :- ','(no(zero(X)), ','(p(X, Px), ','(p(Y, Py), less(Px, Py)))).
p(0, 0).
p(s(X), X).
max1el_list([]).
max1el_list(.(X6, [])).
zero(0).
no(X) :- ','(X, ','(!, failure(a))).
no(X7).
failure(b).

Queries:

ordered(g).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

less107(s(T112)) :- less107(T112).
less80(s(T99), 0) :- less107(T99).
less80(s(T99), s(T118)) :- less80(T99, T118).
ordered1(.(s(T72), .(T77, T48))) :- less80(T72, T77).
ordered1(.(T31, .(T47, T48))) :- ','(lessc53(T31, T47), ordered1(.(T47, T48))).

Clauses:

orderedc1([]).
orderedc1(.(T3, [])).
orderedc1(.(T31, .(T47, T48))) :- ','(lessc53(T31, T47), orderedc1(.(T47, T48))).
lessc107(s(T112)) :- lessc107(T112).
lessc80(0, s(T84)).
lessc80(s(T99), 0) :- lessc107(T99).
lessc80(s(T99), s(T118)) :- lessc80(T99, T118).
lessc53(0, T57).
lessc53(s(T72), T77) :- lessc80(T72, T77).

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)
less80_in: (b,b)
less107_in: (b)
lessc53_in: (b,b)
lessc80_in: (b,b)
lessc107_in: (b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

ORDERED1_IN_G(.(s(T72), .(T77, T48))) → U4_G(T72, T77, T48, less80_in_gg(T72, T77))
ORDERED1_IN_G(.(s(T72), .(T77, T48))) → LESS80_IN_GG(T72, T77)
LESS80_IN_GG(s(T99), 0) → U2_GG(T99, less107_in_g(T99))
LESS80_IN_GG(s(T99), 0) → LESS107_IN_G(T99)
LESS107_IN_G(s(T112)) → U1_G(T112, less107_in_g(T112))
LESS107_IN_G(s(T112)) → LESS107_IN_G(T112)
LESS80_IN_GG(s(T99), s(T118)) → U3_GG(T99, T118, less80_in_gg(T99, T118))
LESS80_IN_GG(s(T99), s(T118)) → LESS80_IN_GG(T99, T118)
ORDERED1_IN_G(.(T31, .(T47, T48))) → U5_G(T31, T47, T48, lessc53_in_gg(T31, T47))
U5_G(T31, T47, T48, lessc53_out_gg(T31, T47)) → U6_G(T31, T47, T48, ordered1_in_g(.(T47, T48)))
U5_G(T31, T47, T48, lessc53_out_gg(T31, T47)) → ORDERED1_IN_G(.(T47, T48))

The TRS R consists of the following rules:

lessc53_in_gg(0, T57) → lessc53_out_gg(0, T57)
lessc53_in_gg(s(T72), T77) → U13_gg(T72, T77, lessc80_in_gg(T72, T77))
lessc80_in_gg(0, s(T84)) → lessc80_out_gg(0, s(T84))
lessc80_in_gg(s(T99), 0) → U11_gg(T99, lessc107_in_g(T99))
lessc107_in_g(s(T112)) → U10_g(T112, lessc107_in_g(T112))
U10_g(T112, lessc107_out_g(T112)) → lessc107_out_g(s(T112))
U11_gg(T99, lessc107_out_g(T99)) → lessc80_out_gg(s(T99), 0)
lessc80_in_gg(s(T99), s(T118)) → U12_gg(T99, T118, lessc80_in_gg(T99, T118))
U12_gg(T99, T118, lessc80_out_gg(T99, T118)) → lessc80_out_gg(s(T99), s(T118))
U13_gg(T72, T77, lessc80_out_gg(T72, T77)) → lessc53_out_gg(s(T72), T77)

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(.(s(T72), .(T77, T48))) → U4_G(T72, T77, T48, less80_in_gg(T72, T77))
ORDERED1_IN_G(.(s(T72), .(T77, T48))) → LESS80_IN_GG(T72, T77)
LESS80_IN_GG(s(T99), 0) → U2_GG(T99, less107_in_g(T99))
LESS80_IN_GG(s(T99), 0) → LESS107_IN_G(T99)
LESS107_IN_G(s(T112)) → U1_G(T112, less107_in_g(T112))
LESS107_IN_G(s(T112)) → LESS107_IN_G(T112)
LESS80_IN_GG(s(T99), s(T118)) → U3_GG(T99, T118, less80_in_gg(T99, T118))
LESS80_IN_GG(s(T99), s(T118)) → LESS80_IN_GG(T99, T118)
ORDERED1_IN_G(.(T31, .(T47, T48))) → U5_G(T31, T47, T48, lessc53_in_gg(T31, T47))
U5_G(T31, T47, T48, lessc53_out_gg(T31, T47)) → U6_G(T31, T47, T48, ordered1_in_g(.(T47, T48)))
U5_G(T31, T47, T48, lessc53_out_gg(T31, T47)) → ORDERED1_IN_G(.(T47, T48))

The TRS R consists of the following rules:

lessc53_in_gg(0, T57) → lessc53_out_gg(0, T57)
lessc53_in_gg(s(T72), T77) → U13_gg(T72, T77, lessc80_in_gg(T72, T77))
lessc80_in_gg(0, s(T84)) → lessc80_out_gg(0, s(T84))
lessc80_in_gg(s(T99), 0) → U11_gg(T99, lessc107_in_g(T99))
lessc107_in_g(s(T112)) → U10_g(T112, lessc107_in_g(T112))
U10_g(T112, lessc107_out_g(T112)) → lessc107_out_g(s(T112))
U11_gg(T99, lessc107_out_g(T99)) → lessc80_out_gg(s(T99), 0)
lessc80_in_gg(s(T99), s(T118)) → U12_gg(T99, T118, lessc80_in_gg(T99, T118))
U12_gg(T99, T118, lessc80_out_gg(T99, T118)) → lessc80_out_gg(s(T99), s(T118))
U13_gg(T72, T77, lessc80_out_gg(T72, T77)) → lessc53_out_gg(s(T72), T77)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 7 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

LESS107_IN_G(s(T112)) → LESS107_IN_G(T112)

The TRS R consists of the following rules:

lessc53_in_gg(0, T57) → lessc53_out_gg(0, T57)
lessc53_in_gg(s(T72), T77) → U13_gg(T72, T77, lessc80_in_gg(T72, T77))
lessc80_in_gg(0, s(T84)) → lessc80_out_gg(0, s(T84))
lessc80_in_gg(s(T99), 0) → U11_gg(T99, lessc107_in_g(T99))
lessc107_in_g(s(T112)) → U10_g(T112, lessc107_in_g(T112))
U10_g(T112, lessc107_out_g(T112)) → lessc107_out_g(s(T112))
U11_gg(T99, lessc107_out_g(T99)) → lessc80_out_gg(s(T99), 0)
lessc80_in_gg(s(T99), s(T118)) → U12_gg(T99, T118, lessc80_in_gg(T99, T118))
U12_gg(T99, T118, lessc80_out_gg(T99, T118)) → lessc80_out_gg(s(T99), s(T118))
U13_gg(T72, T77, lessc80_out_gg(T72, T77)) → lessc53_out_gg(s(T72), T77)

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:

LESS107_IN_G(s(T112)) → LESS107_IN_G(T112)

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:

LESS107_IN_G(s(T112)) → LESS107_IN_G(T112)

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:

  • LESS107_IN_G(s(T112)) → LESS107_IN_G(T112)
    The graph contains the following edges 1 > 1

(13) YES

(14) Obligation:

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

LESS80_IN_GG(s(T99), s(T118)) → LESS80_IN_GG(T99, T118)

The TRS R consists of the following rules:

lessc53_in_gg(0, T57) → lessc53_out_gg(0, T57)
lessc53_in_gg(s(T72), T77) → U13_gg(T72, T77, lessc80_in_gg(T72, T77))
lessc80_in_gg(0, s(T84)) → lessc80_out_gg(0, s(T84))
lessc80_in_gg(s(T99), 0) → U11_gg(T99, lessc107_in_g(T99))
lessc107_in_g(s(T112)) → U10_g(T112, lessc107_in_g(T112))
U10_g(T112, lessc107_out_g(T112)) → lessc107_out_g(s(T112))
U11_gg(T99, lessc107_out_g(T99)) → lessc80_out_gg(s(T99), 0)
lessc80_in_gg(s(T99), s(T118)) → U12_gg(T99, T118, lessc80_in_gg(T99, T118))
U12_gg(T99, T118, lessc80_out_gg(T99, T118)) → lessc80_out_gg(s(T99), s(T118))
U13_gg(T72, T77, lessc80_out_gg(T72, T77)) → lessc53_out_gg(s(T72), T77)

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

(15) UsableRulesProof (EQUIVALENT transformation)

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

(16) Obligation:

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

LESS80_IN_GG(s(T99), s(T118)) → LESS80_IN_GG(T99, T118)

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

(17) PiDPToQDPProof (EQUIVALENT transformation)

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

(18) Obligation:

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

LESS80_IN_GG(s(T99), s(T118)) → LESS80_IN_GG(T99, T118)

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

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

  • LESS80_IN_GG(s(T99), s(T118)) → LESS80_IN_GG(T99, T118)
    The graph contains the following edges 1 > 1, 2 > 2

(20) YES

(21) Obligation:

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

ORDERED1_IN_G(.(T31, .(T47, T48))) → U5_G(T31, T47, T48, lessc53_in_gg(T31, T47))
U5_G(T31, T47, T48, lessc53_out_gg(T31, T47)) → ORDERED1_IN_G(.(T47, T48))

The TRS R consists of the following rules:

lessc53_in_gg(0, T57) → lessc53_out_gg(0, T57)
lessc53_in_gg(s(T72), T77) → U13_gg(T72, T77, lessc80_in_gg(T72, T77))
lessc80_in_gg(0, s(T84)) → lessc80_out_gg(0, s(T84))
lessc80_in_gg(s(T99), 0) → U11_gg(T99, lessc107_in_g(T99))
lessc107_in_g(s(T112)) → U10_g(T112, lessc107_in_g(T112))
U10_g(T112, lessc107_out_g(T112)) → lessc107_out_g(s(T112))
U11_gg(T99, lessc107_out_g(T99)) → lessc80_out_gg(s(T99), 0)
lessc80_in_gg(s(T99), s(T118)) → U12_gg(T99, T118, lessc80_in_gg(T99, T118))
U12_gg(T99, T118, lessc80_out_gg(T99, T118)) → lessc80_out_gg(s(T99), s(T118))
U13_gg(T72, T77, lessc80_out_gg(T72, T77)) → lessc53_out_gg(s(T72), T77)

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

(22) PiDPToQDPProof (EQUIVALENT transformation)

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

(23) Obligation:

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

ORDERED1_IN_G(.(T31, .(T47, T48))) → U5_G(T31, T47, T48, lessc53_in_gg(T31, T47))
U5_G(T31, T47, T48, lessc53_out_gg(T31, T47)) → ORDERED1_IN_G(.(T47, T48))

The TRS R consists of the following rules:

lessc53_in_gg(0, T57) → lessc53_out_gg(0, T57)
lessc53_in_gg(s(T72), T77) → U13_gg(T72, T77, lessc80_in_gg(T72, T77))
lessc80_in_gg(0, s(T84)) → lessc80_out_gg(0, s(T84))
lessc80_in_gg(s(T99), 0) → U11_gg(T99, lessc107_in_g(T99))
lessc107_in_g(s(T112)) → U10_g(T112, lessc107_in_g(T112))
U10_g(T112, lessc107_out_g(T112)) → lessc107_out_g(s(T112))
U11_gg(T99, lessc107_out_g(T99)) → lessc80_out_gg(s(T99), 0)
lessc80_in_gg(s(T99), s(T118)) → U12_gg(T99, T118, lessc80_in_gg(T99, T118))
U12_gg(T99, T118, lessc80_out_gg(T99, T118)) → lessc80_out_gg(s(T99), s(T118))
U13_gg(T72, T77, lessc80_out_gg(T72, T77)) → lessc53_out_gg(s(T72), T77)

The set Q consists of the following terms:

lessc53_in_gg(x0, x1)
lessc80_in_gg(x0, x1)
lessc107_in_g(x0)
U10_g(x0, x1)
U11_gg(x0, x1)
U12_gg(x0, x1, x2)
U13_gg(x0, x1, x2)

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

(24) 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 rules of the TRS R:

U11_gg(T99, lessc107_out_g(T99)) → lessc80_out_gg(s(T99), 0)

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 2·x1 + x2   
POL(0) = 0   
POL(ORDERED1_IN_G(x1)) = 2·x1   
POL(U10_g(x1, x2)) = x1 + x2   
POL(U11_gg(x1, x2)) = x1 + x2   
POL(U12_gg(x1, x2, x3)) = x1 + x2 + x3   
POL(U13_gg(x1, x2, x3)) = x1 + x2 + x3   
POL(U5_G(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + x4   
POL(lessc107_in_g(x1)) = x1   
POL(lessc107_out_g(x1)) = 1 + x1   
POL(lessc53_in_gg(x1, x2)) = x1 + 2·x2   
POL(lessc53_out_gg(x1, x2)) = x1 + 2·x2   
POL(lessc80_in_gg(x1, x2)) = x1 + x2   
POL(lessc80_out_gg(x1, x2)) = x1 + x2   
POL(s(x1)) = 2·x1   

(25) Obligation:

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

ORDERED1_IN_G(.(T31, .(T47, T48))) → U5_G(T31, T47, T48, lessc53_in_gg(T31, T47))
U5_G(T31, T47, T48, lessc53_out_gg(T31, T47)) → ORDERED1_IN_G(.(T47, T48))

The TRS R consists of the following rules:

lessc53_in_gg(0, T57) → lessc53_out_gg(0, T57)
lessc53_in_gg(s(T72), T77) → U13_gg(T72, T77, lessc80_in_gg(T72, T77))
lessc80_in_gg(0, s(T84)) → lessc80_out_gg(0, s(T84))
lessc80_in_gg(s(T99), 0) → U11_gg(T99, lessc107_in_g(T99))
lessc107_in_g(s(T112)) → U10_g(T112, lessc107_in_g(T112))
U10_g(T112, lessc107_out_g(T112)) → lessc107_out_g(s(T112))
lessc80_in_gg(s(T99), s(T118)) → U12_gg(T99, T118, lessc80_in_gg(T99, T118))
U12_gg(T99, T118, lessc80_out_gg(T99, T118)) → lessc80_out_gg(s(T99), s(T118))
U13_gg(T72, T77, lessc80_out_gg(T72, T77)) → lessc53_out_gg(s(T72), T77)

The set Q consists of the following terms:

lessc53_in_gg(x0, x1)
lessc80_in_gg(x0, x1)
lessc107_in_g(x0)
U10_g(x0, x1)
U11_gg(x0, x1)
U12_gg(x0, x1, x2)
U13_gg(x0, x1, x2)

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

(26) 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(.(T31, .(T47, T48))) → U5_G(T31, T47, T48, lessc53_in_gg(T31, T47))


Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(0) = 0   
POL(ORDERED1_IN_G(x1)) = x1   
POL(U10_g(x1, x2)) = x1 + x2   
POL(U11_gg(x1, x2)) = x1 + x2   
POL(U12_gg(x1, x2, x3)) = x1 + x2 + x3   
POL(U13_gg(x1, x2, x3)) = x1 + x2 + x3   
POL(U5_G(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + 2·x3 + x4   
POL(lessc107_in_g(x1)) = x1   
POL(lessc107_out_g(x1)) = x1   
POL(lessc53_in_gg(x1, x2)) = x1 + 2·x2   
POL(lessc53_out_gg(x1, x2)) = x1 + 2·x2   
POL(lessc80_in_gg(x1, x2)) = x1 + x2   
POL(lessc80_out_gg(x1, x2)) = x1 + x2   
POL(s(x1)) = 2·x1   

(27) Obligation:

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

U5_G(T31, T47, T48, lessc53_out_gg(T31, T47)) → ORDERED1_IN_G(.(T47, T48))

The TRS R consists of the following rules:

lessc53_in_gg(0, T57) → lessc53_out_gg(0, T57)
lessc53_in_gg(s(T72), T77) → U13_gg(T72, T77, lessc80_in_gg(T72, T77))
lessc80_in_gg(0, s(T84)) → lessc80_out_gg(0, s(T84))
lessc80_in_gg(s(T99), 0) → U11_gg(T99, lessc107_in_g(T99))
lessc107_in_g(s(T112)) → U10_g(T112, lessc107_in_g(T112))
U10_g(T112, lessc107_out_g(T112)) → lessc107_out_g(s(T112))
lessc80_in_gg(s(T99), s(T118)) → U12_gg(T99, T118, lessc80_in_gg(T99, T118))
U12_gg(T99, T118, lessc80_out_gg(T99, T118)) → lessc80_out_gg(s(T99), s(T118))
U13_gg(T72, T77, lessc80_out_gg(T72, T77)) → lessc53_out_gg(s(T72), T77)

The set Q consists of the following terms:

lessc53_in_gg(x0, x1)
lessc80_in_gg(x0, x1)
lessc107_in_g(x0)
U10_g(x0, x1)
U11_gg(x0, x1)
U12_gg(x0, x1, x2)
U13_gg(x0, x1, x2)

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

(28) DependencyGraphProof (EQUIVALENT transformation)

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

(29) TRUE