(0) Obligation:

Clauses:

ordered([]).
ordered(.(X, [])).
ordered(.(X, .(Y, Xs))) :- ','(le(X, Y), ordered(.(Y, Xs))).
le(s(X), s(Y)) :- le(X, Y).
le(0, s(0)).
le(0, 0).

Queries:

ordered(g).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

le19(s(T33), s(T34)) :- le19(T33, T34).
le19(0, s(0)).
le19(0, 0).
ordered1([]).
ordered1(.(T3, [])).
ordered1(.(s(T19), .(s(T20), T10))) :- le19(T19, T20).
ordered1(.(s(T19), .(s(T20), T10))) :- ','(le19(T19, T20), ordered1(.(s(T20), T10))).
ordered1(.(0, .(s(0), T10))) :- ordered1(.(s(0), T10)).
ordered1(.(0, .(0, T10))) :- ordered1(.(0, T10)).

Queries:

ordered1(g).

(3) PrologToPiTRSProof (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)
le19_in: (b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

ordered1_in_g([]) → ordered1_out_g([])
ordered1_in_g(.(T3, [])) → ordered1_out_g(.(T3, []))
ordered1_in_g(.(s(T19), .(s(T20), T10))) → U2_g(T19, T20, T10, le19_in_gg(T19, T20))
le19_in_gg(s(T33), s(T34)) → U1_gg(T33, T34, le19_in_gg(T33, T34))
le19_in_gg(0, s(0)) → le19_out_gg(0, s(0))
le19_in_gg(0, 0) → le19_out_gg(0, 0)
U1_gg(T33, T34, le19_out_gg(T33, T34)) → le19_out_gg(s(T33), s(T34))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → ordered1_out_g(.(s(T19), .(s(T20), T10)))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → U3_g(T19, T20, T10, ordered1_in_g(.(s(T20), T10)))
ordered1_in_g(.(0, .(s(0), T10))) → U4_g(T10, ordered1_in_g(.(s(0), T10)))
ordered1_in_g(.(0, .(0, T10))) → U5_g(T10, ordered1_in_g(.(0, T10)))
U5_g(T10, ordered1_out_g(.(0, T10))) → ordered1_out_g(.(0, .(0, T10)))
U4_g(T10, ordered1_out_g(.(s(0), T10))) → ordered1_out_g(.(0, .(s(0), T10)))
U3_g(T19, T20, T10, ordered1_out_g(.(s(T20), T10))) → ordered1_out_g(.(s(T19), .(s(T20), T10)))

Pi is empty.

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

ordered1_in_g([]) → ordered1_out_g([])
ordered1_in_g(.(T3, [])) → ordered1_out_g(.(T3, []))
ordered1_in_g(.(s(T19), .(s(T20), T10))) → U2_g(T19, T20, T10, le19_in_gg(T19, T20))
le19_in_gg(s(T33), s(T34)) → U1_gg(T33, T34, le19_in_gg(T33, T34))
le19_in_gg(0, s(0)) → le19_out_gg(0, s(0))
le19_in_gg(0, 0) → le19_out_gg(0, 0)
U1_gg(T33, T34, le19_out_gg(T33, T34)) → le19_out_gg(s(T33), s(T34))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → ordered1_out_g(.(s(T19), .(s(T20), T10)))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → U3_g(T19, T20, T10, ordered1_in_g(.(s(T20), T10)))
ordered1_in_g(.(0, .(s(0), T10))) → U4_g(T10, ordered1_in_g(.(s(0), T10)))
ordered1_in_g(.(0, .(0, T10))) → U5_g(T10, ordered1_in_g(.(0, T10)))
U5_g(T10, ordered1_out_g(.(0, T10))) → ordered1_out_g(.(0, .(0, T10)))
U4_g(T10, ordered1_out_g(.(s(0), T10))) → ordered1_out_g(.(0, .(s(0), T10)))
U3_g(T19, T20, T10, ordered1_out_g(.(s(T20), T10))) → ordered1_out_g(.(s(T19), .(s(T20), T10)))

Pi is empty.

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

ORDERED1_IN_G(.(s(T19), .(s(T20), T10))) → U2_G(T19, T20, T10, le19_in_gg(T19, T20))
ORDERED1_IN_G(.(s(T19), .(s(T20), T10))) → LE19_IN_GG(T19, T20)
LE19_IN_GG(s(T33), s(T34)) → U1_GG(T33, T34, le19_in_gg(T33, T34))
LE19_IN_GG(s(T33), s(T34)) → LE19_IN_GG(T33, T34)
U2_G(T19, T20, T10, le19_out_gg(T19, T20)) → U3_G(T19, T20, T10, ordered1_in_g(.(s(T20), T10)))
U2_G(T19, T20, T10, le19_out_gg(T19, T20)) → ORDERED1_IN_G(.(s(T20), T10))
ORDERED1_IN_G(.(0, .(s(0), T10))) → U4_G(T10, ordered1_in_g(.(s(0), T10)))
ORDERED1_IN_G(.(0, .(s(0), T10))) → ORDERED1_IN_G(.(s(0), T10))
ORDERED1_IN_G(.(0, .(0, T10))) → U5_G(T10, ordered1_in_g(.(0, T10)))
ORDERED1_IN_G(.(0, .(0, T10))) → ORDERED1_IN_G(.(0, T10))

The TRS R consists of the following rules:

ordered1_in_g([]) → ordered1_out_g([])
ordered1_in_g(.(T3, [])) → ordered1_out_g(.(T3, []))
ordered1_in_g(.(s(T19), .(s(T20), T10))) → U2_g(T19, T20, T10, le19_in_gg(T19, T20))
le19_in_gg(s(T33), s(T34)) → U1_gg(T33, T34, le19_in_gg(T33, T34))
le19_in_gg(0, s(0)) → le19_out_gg(0, s(0))
le19_in_gg(0, 0) → le19_out_gg(0, 0)
U1_gg(T33, T34, le19_out_gg(T33, T34)) → le19_out_gg(s(T33), s(T34))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → ordered1_out_g(.(s(T19), .(s(T20), T10)))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → U3_g(T19, T20, T10, ordered1_in_g(.(s(T20), T10)))
ordered1_in_g(.(0, .(s(0), T10))) → U4_g(T10, ordered1_in_g(.(s(0), T10)))
ordered1_in_g(.(0, .(0, T10))) → U5_g(T10, ordered1_in_g(.(0, T10)))
U5_g(T10, ordered1_out_g(.(0, T10))) → ordered1_out_g(.(0, .(0, T10)))
U4_g(T10, ordered1_out_g(.(s(0), T10))) → ordered1_out_g(.(0, .(s(0), T10)))
U3_g(T19, T20, T10, ordered1_out_g(.(s(T20), T10))) → ordered1_out_g(.(s(T19), .(s(T20), T10)))

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

(6) Obligation:

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

ORDERED1_IN_G(.(s(T19), .(s(T20), T10))) → U2_G(T19, T20, T10, le19_in_gg(T19, T20))
ORDERED1_IN_G(.(s(T19), .(s(T20), T10))) → LE19_IN_GG(T19, T20)
LE19_IN_GG(s(T33), s(T34)) → U1_GG(T33, T34, le19_in_gg(T33, T34))
LE19_IN_GG(s(T33), s(T34)) → LE19_IN_GG(T33, T34)
U2_G(T19, T20, T10, le19_out_gg(T19, T20)) → U3_G(T19, T20, T10, ordered1_in_g(.(s(T20), T10)))
U2_G(T19, T20, T10, le19_out_gg(T19, T20)) → ORDERED1_IN_G(.(s(T20), T10))
ORDERED1_IN_G(.(0, .(s(0), T10))) → U4_G(T10, ordered1_in_g(.(s(0), T10)))
ORDERED1_IN_G(.(0, .(s(0), T10))) → ORDERED1_IN_G(.(s(0), T10))
ORDERED1_IN_G(.(0, .(0, T10))) → U5_G(T10, ordered1_in_g(.(0, T10)))
ORDERED1_IN_G(.(0, .(0, T10))) → ORDERED1_IN_G(.(0, T10))

The TRS R consists of the following rules:

ordered1_in_g([]) → ordered1_out_g([])
ordered1_in_g(.(T3, [])) → ordered1_out_g(.(T3, []))
ordered1_in_g(.(s(T19), .(s(T20), T10))) → U2_g(T19, T20, T10, le19_in_gg(T19, T20))
le19_in_gg(s(T33), s(T34)) → U1_gg(T33, T34, le19_in_gg(T33, T34))
le19_in_gg(0, s(0)) → le19_out_gg(0, s(0))
le19_in_gg(0, 0) → le19_out_gg(0, 0)
U1_gg(T33, T34, le19_out_gg(T33, T34)) → le19_out_gg(s(T33), s(T34))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → ordered1_out_g(.(s(T19), .(s(T20), T10)))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → U3_g(T19, T20, T10, ordered1_in_g(.(s(T20), T10)))
ordered1_in_g(.(0, .(s(0), T10))) → U4_g(T10, ordered1_in_g(.(s(0), T10)))
ordered1_in_g(.(0, .(0, T10))) → U5_g(T10, ordered1_in_g(.(0, T10)))
U5_g(T10, ordered1_out_g(.(0, T10))) → ordered1_out_g(.(0, .(0, T10)))
U4_g(T10, ordered1_out_g(.(s(0), T10))) → ordered1_out_g(.(0, .(s(0), T10)))
U3_g(T19, T20, T10, ordered1_out_g(.(s(T20), T10))) → ordered1_out_g(.(s(T19), .(s(T20), T10)))

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

(7) DependencyGraphProof (EQUIVALENT transformation)

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

(8) Complex Obligation (AND)

(9) Obligation:

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

LE19_IN_GG(s(T33), s(T34)) → LE19_IN_GG(T33, T34)

The TRS R consists of the following rules:

ordered1_in_g([]) → ordered1_out_g([])
ordered1_in_g(.(T3, [])) → ordered1_out_g(.(T3, []))
ordered1_in_g(.(s(T19), .(s(T20), T10))) → U2_g(T19, T20, T10, le19_in_gg(T19, T20))
le19_in_gg(s(T33), s(T34)) → U1_gg(T33, T34, le19_in_gg(T33, T34))
le19_in_gg(0, s(0)) → le19_out_gg(0, s(0))
le19_in_gg(0, 0) → le19_out_gg(0, 0)
U1_gg(T33, T34, le19_out_gg(T33, T34)) → le19_out_gg(s(T33), s(T34))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → ordered1_out_g(.(s(T19), .(s(T20), T10)))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → U3_g(T19, T20, T10, ordered1_in_g(.(s(T20), T10)))
ordered1_in_g(.(0, .(s(0), T10))) → U4_g(T10, ordered1_in_g(.(s(0), T10)))
ordered1_in_g(.(0, .(0, T10))) → U5_g(T10, ordered1_in_g(.(0, T10)))
U5_g(T10, ordered1_out_g(.(0, T10))) → ordered1_out_g(.(0, .(0, T10)))
U4_g(T10, ordered1_out_g(.(s(0), T10))) → ordered1_out_g(.(0, .(s(0), T10)))
U3_g(T19, T20, T10, ordered1_out_g(.(s(T20), T10))) → ordered1_out_g(.(s(T19), .(s(T20), T10)))

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

(10) UsableRulesProof (EQUIVALENT transformation)

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

(11) Obligation:

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

LE19_IN_GG(s(T33), s(T34)) → LE19_IN_GG(T33, T34)

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

(12) PiDPToQDPProof (EQUIVALENT transformation)

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

(13) Obligation:

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

LE19_IN_GG(s(T33), s(T34)) → LE19_IN_GG(T33, T34)

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

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

  • LE19_IN_GG(s(T33), s(T34)) → LE19_IN_GG(T33, T34)
    The graph contains the following edges 1 > 1, 2 > 2

(15) YES

(16) Obligation:

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

U2_G(T19, T20, T10, le19_out_gg(T19, T20)) → ORDERED1_IN_G(.(s(T20), T10))
ORDERED1_IN_G(.(s(T19), .(s(T20), T10))) → U2_G(T19, T20, T10, le19_in_gg(T19, T20))

The TRS R consists of the following rules:

ordered1_in_g([]) → ordered1_out_g([])
ordered1_in_g(.(T3, [])) → ordered1_out_g(.(T3, []))
ordered1_in_g(.(s(T19), .(s(T20), T10))) → U2_g(T19, T20, T10, le19_in_gg(T19, T20))
le19_in_gg(s(T33), s(T34)) → U1_gg(T33, T34, le19_in_gg(T33, T34))
le19_in_gg(0, s(0)) → le19_out_gg(0, s(0))
le19_in_gg(0, 0) → le19_out_gg(0, 0)
U1_gg(T33, T34, le19_out_gg(T33, T34)) → le19_out_gg(s(T33), s(T34))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → ordered1_out_g(.(s(T19), .(s(T20), T10)))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → U3_g(T19, T20, T10, ordered1_in_g(.(s(T20), T10)))
ordered1_in_g(.(0, .(s(0), T10))) → U4_g(T10, ordered1_in_g(.(s(0), T10)))
ordered1_in_g(.(0, .(0, T10))) → U5_g(T10, ordered1_in_g(.(0, T10)))
U5_g(T10, ordered1_out_g(.(0, T10))) → ordered1_out_g(.(0, .(0, T10)))
U4_g(T10, ordered1_out_g(.(s(0), T10))) → ordered1_out_g(.(0, .(s(0), T10)))
U3_g(T19, T20, T10, ordered1_out_g(.(s(T20), T10))) → ordered1_out_g(.(s(T19), .(s(T20), T10)))

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

(17) UsableRulesProof (EQUIVALENT transformation)

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

(18) Obligation:

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

U2_G(T19, T20, T10, le19_out_gg(T19, T20)) → ORDERED1_IN_G(.(s(T20), T10))
ORDERED1_IN_G(.(s(T19), .(s(T20), T10))) → U2_G(T19, T20, T10, le19_in_gg(T19, T20))

The TRS R consists of the following rules:

le19_in_gg(s(T33), s(T34)) → U1_gg(T33, T34, le19_in_gg(T33, T34))
le19_in_gg(0, s(0)) → le19_out_gg(0, s(0))
le19_in_gg(0, 0) → le19_out_gg(0, 0)
U1_gg(T33, T34, le19_out_gg(T33, T34)) → le19_out_gg(s(T33), s(T34))

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

(19) PiDPToQDPProof (EQUIVALENT transformation)

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

(20) Obligation:

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

U2_G(T19, T20, T10, le19_out_gg(T19, T20)) → ORDERED1_IN_G(.(s(T20), T10))
ORDERED1_IN_G(.(s(T19), .(s(T20), T10))) → U2_G(T19, T20, T10, le19_in_gg(T19, T20))

The TRS R consists of the following rules:

le19_in_gg(s(T33), s(T34)) → U1_gg(T33, T34, le19_in_gg(T33, T34))
le19_in_gg(0, s(0)) → le19_out_gg(0, s(0))
le19_in_gg(0, 0) → le19_out_gg(0, 0)
U1_gg(T33, T34, le19_out_gg(T33, T34)) → le19_out_gg(s(T33), s(T34))

The set Q consists of the following terms:

le19_in_gg(x0, x1)
U1_gg(x0, x1, x2)

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

(21) 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(T19), .(s(T20), T10))) → U2_G(T19, T20, T10, le19_in_gg(T19, T20))


Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + x1 + x2   
POL(0) = 0   
POL(ORDERED1_IN_G(x1)) = 2·x1   
POL(U1_gg(x1, x2, x3)) = 2·x1 + 2·x2 + x3   
POL(U2_G(x1, x2, x3, x4)) = 2 + x1 + 2·x2 + 2·x3 + x4   
POL(le19_in_gg(x1, x2)) = 2·x1 + 2·x2   
POL(le19_out_gg(x1, x2)) = 2·x1 + 2·x2   
POL(s(x1)) = 2·x1   

(22) Obligation:

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

U2_G(T19, T20, T10, le19_out_gg(T19, T20)) → ORDERED1_IN_G(.(s(T20), T10))

The TRS R consists of the following rules:

le19_in_gg(s(T33), s(T34)) → U1_gg(T33, T34, le19_in_gg(T33, T34))
le19_in_gg(0, s(0)) → le19_out_gg(0, s(0))
le19_in_gg(0, 0) → le19_out_gg(0, 0)
U1_gg(T33, T34, le19_out_gg(T33, T34)) → le19_out_gg(s(T33), s(T34))

The set Q consists of the following terms:

le19_in_gg(x0, x1)
U1_gg(x0, x1, x2)

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

(23) DependencyGraphProof (EQUIVALENT transformation)

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

(24) TRUE

(25) Obligation:

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

ORDERED1_IN_G(.(0, .(0, T10))) → ORDERED1_IN_G(.(0, T10))

The TRS R consists of the following rules:

ordered1_in_g([]) → ordered1_out_g([])
ordered1_in_g(.(T3, [])) → ordered1_out_g(.(T3, []))
ordered1_in_g(.(s(T19), .(s(T20), T10))) → U2_g(T19, T20, T10, le19_in_gg(T19, T20))
le19_in_gg(s(T33), s(T34)) → U1_gg(T33, T34, le19_in_gg(T33, T34))
le19_in_gg(0, s(0)) → le19_out_gg(0, s(0))
le19_in_gg(0, 0) → le19_out_gg(0, 0)
U1_gg(T33, T34, le19_out_gg(T33, T34)) → le19_out_gg(s(T33), s(T34))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → ordered1_out_g(.(s(T19), .(s(T20), T10)))
U2_g(T19, T20, T10, le19_out_gg(T19, T20)) → U3_g(T19, T20, T10, ordered1_in_g(.(s(T20), T10)))
ordered1_in_g(.(0, .(s(0), T10))) → U4_g(T10, ordered1_in_g(.(s(0), T10)))
ordered1_in_g(.(0, .(0, T10))) → U5_g(T10, ordered1_in_g(.(0, T10)))
U5_g(T10, ordered1_out_g(.(0, T10))) → ordered1_out_g(.(0, .(0, T10)))
U4_g(T10, ordered1_out_g(.(s(0), T10))) → ordered1_out_g(.(0, .(s(0), T10)))
U3_g(T19, T20, T10, ordered1_out_g(.(s(T20), T10))) → ordered1_out_g(.(s(T19), .(s(T20), T10)))

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

(26) UsableRulesProof (EQUIVALENT transformation)

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

(27) Obligation:

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

ORDERED1_IN_G(.(0, .(0, T10))) → ORDERED1_IN_G(.(0, T10))

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

(28) PiDPToQDPProof (EQUIVALENT transformation)

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

(29) Obligation:

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

ORDERED1_IN_G(.(0, .(0, T10))) → ORDERED1_IN_G(.(0, T10))

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

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

  • ORDERED1_IN_G(.(0, .(0, T10))) → ORDERED1_IN_G(.(0, T10))
    The graph contains the following edges 1 > 1

(31) YES