(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).

Query: ordered(g)

(1) PrologToPiTRSViaGraphTransformerProof (SOUND transformation)

Transformed Prolog program to (Pi-)TRS.

(2) Obligation:

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

orderedA_in_g([]) → orderedA_out_g([])
orderedA_in_g(.(T3, [])) → orderedA_out_g(.(T3, []))
orderedA_in_g(.(0, .(T15, T10))) → U1_g(T15, T10, orderedA_in_g(.(T15, T10)))
orderedA_in_g(.(s(T20), .(T21, T10))) → U2_g(T20, T21, T10, pB_in_ggg(T20, T21, T10))
pB_in_ggg(T20, T21, T10) → U4_ggg(T20, T21, T10, lessC_in_gg(T20, T21))
lessC_in_gg(0, s(T30)) → lessC_out_gg(0, s(T30))
lessC_in_gg(s(T35), s(T36)) → U3_gg(T35, T36, lessC_in_gg(T35, T36))
U3_gg(T35, T36, lessC_out_gg(T35, T36)) → lessC_out_gg(s(T35), s(T36))
U4_ggg(T20, T21, T10, lessC_out_gg(T20, T21)) → U5_ggg(T20, T21, T10, orderedA_in_g(.(T21, T10)))
U5_ggg(T20, T21, T10, orderedA_out_g(.(T21, T10))) → pB_out_ggg(T20, T21, T10)
U2_g(T20, T21, T10, pB_out_ggg(T20, T21, T10)) → orderedA_out_g(.(s(T20), .(T21, T10)))
U1_g(T15, T10, orderedA_out_g(.(T15, T10))) → orderedA_out_g(.(0, .(T15, T10)))

Pi is empty.

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

ORDEREDA_IN_G(.(0, .(T15, T10))) → U1_G(T15, T10, orderedA_in_g(.(T15, T10)))
ORDEREDA_IN_G(.(0, .(T15, T10))) → ORDEREDA_IN_G(.(T15, T10))
ORDEREDA_IN_G(.(s(T20), .(T21, T10))) → U2_G(T20, T21, T10, pB_in_ggg(T20, T21, T10))
ORDEREDA_IN_G(.(s(T20), .(T21, T10))) → PB_IN_GGG(T20, T21, T10)
PB_IN_GGG(T20, T21, T10) → U4_GGG(T20, T21, T10, lessC_in_gg(T20, T21))
PB_IN_GGG(T20, T21, T10) → LESSC_IN_GG(T20, T21)
LESSC_IN_GG(s(T35), s(T36)) → U3_GG(T35, T36, lessC_in_gg(T35, T36))
LESSC_IN_GG(s(T35), s(T36)) → LESSC_IN_GG(T35, T36)
U4_GGG(T20, T21, T10, lessC_out_gg(T20, T21)) → U5_GGG(T20, T21, T10, orderedA_in_g(.(T21, T10)))
U4_GGG(T20, T21, T10, lessC_out_gg(T20, T21)) → ORDEREDA_IN_G(.(T21, T10))

The TRS R consists of the following rules:

orderedA_in_g([]) → orderedA_out_g([])
orderedA_in_g(.(T3, [])) → orderedA_out_g(.(T3, []))
orderedA_in_g(.(0, .(T15, T10))) → U1_g(T15, T10, orderedA_in_g(.(T15, T10)))
orderedA_in_g(.(s(T20), .(T21, T10))) → U2_g(T20, T21, T10, pB_in_ggg(T20, T21, T10))
pB_in_ggg(T20, T21, T10) → U4_ggg(T20, T21, T10, lessC_in_gg(T20, T21))
lessC_in_gg(0, s(T30)) → lessC_out_gg(0, s(T30))
lessC_in_gg(s(T35), s(T36)) → U3_gg(T35, T36, lessC_in_gg(T35, T36))
U3_gg(T35, T36, lessC_out_gg(T35, T36)) → lessC_out_gg(s(T35), s(T36))
U4_ggg(T20, T21, T10, lessC_out_gg(T20, T21)) → U5_ggg(T20, T21, T10, orderedA_in_g(.(T21, T10)))
U5_ggg(T20, T21, T10, orderedA_out_g(.(T21, T10))) → pB_out_ggg(T20, T21, T10)
U2_g(T20, T21, T10, pB_out_ggg(T20, T21, T10)) → orderedA_out_g(.(s(T20), .(T21, T10)))
U1_g(T15, T10, orderedA_out_g(.(T15, T10))) → orderedA_out_g(.(0, .(T15, T10)))

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

(4) Obligation:

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

ORDEREDA_IN_G(.(0, .(T15, T10))) → U1_G(T15, T10, orderedA_in_g(.(T15, T10)))
ORDEREDA_IN_G(.(0, .(T15, T10))) → ORDEREDA_IN_G(.(T15, T10))
ORDEREDA_IN_G(.(s(T20), .(T21, T10))) → U2_G(T20, T21, T10, pB_in_ggg(T20, T21, T10))
ORDEREDA_IN_G(.(s(T20), .(T21, T10))) → PB_IN_GGG(T20, T21, T10)
PB_IN_GGG(T20, T21, T10) → U4_GGG(T20, T21, T10, lessC_in_gg(T20, T21))
PB_IN_GGG(T20, T21, T10) → LESSC_IN_GG(T20, T21)
LESSC_IN_GG(s(T35), s(T36)) → U3_GG(T35, T36, lessC_in_gg(T35, T36))
LESSC_IN_GG(s(T35), s(T36)) → LESSC_IN_GG(T35, T36)
U4_GGG(T20, T21, T10, lessC_out_gg(T20, T21)) → U5_GGG(T20, T21, T10, orderedA_in_g(.(T21, T10)))
U4_GGG(T20, T21, T10, lessC_out_gg(T20, T21)) → ORDEREDA_IN_G(.(T21, T10))

The TRS R consists of the following rules:

orderedA_in_g([]) → orderedA_out_g([])
orderedA_in_g(.(T3, [])) → orderedA_out_g(.(T3, []))
orderedA_in_g(.(0, .(T15, T10))) → U1_g(T15, T10, orderedA_in_g(.(T15, T10)))
orderedA_in_g(.(s(T20), .(T21, T10))) → U2_g(T20, T21, T10, pB_in_ggg(T20, T21, T10))
pB_in_ggg(T20, T21, T10) → U4_ggg(T20, T21, T10, lessC_in_gg(T20, T21))
lessC_in_gg(0, s(T30)) → lessC_out_gg(0, s(T30))
lessC_in_gg(s(T35), s(T36)) → U3_gg(T35, T36, lessC_in_gg(T35, T36))
U3_gg(T35, T36, lessC_out_gg(T35, T36)) → lessC_out_gg(s(T35), s(T36))
U4_ggg(T20, T21, T10, lessC_out_gg(T20, T21)) → U5_ggg(T20, T21, T10, orderedA_in_g(.(T21, T10)))
U5_ggg(T20, T21, T10, orderedA_out_g(.(T21, T10))) → pB_out_ggg(T20, T21, T10)
U2_g(T20, T21, T10, pB_out_ggg(T20, T21, T10)) → orderedA_out_g(.(s(T20), .(T21, T10)))
U1_g(T15, T10, orderedA_out_g(.(T15, T10))) → orderedA_out_g(.(0, .(T15, T10)))

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:

LESSC_IN_GG(s(T35), s(T36)) → LESSC_IN_GG(T35, T36)

The TRS R consists of the following rules:

orderedA_in_g([]) → orderedA_out_g([])
orderedA_in_g(.(T3, [])) → orderedA_out_g(.(T3, []))
orderedA_in_g(.(0, .(T15, T10))) → U1_g(T15, T10, orderedA_in_g(.(T15, T10)))
orderedA_in_g(.(s(T20), .(T21, T10))) → U2_g(T20, T21, T10, pB_in_ggg(T20, T21, T10))
pB_in_ggg(T20, T21, T10) → U4_ggg(T20, T21, T10, lessC_in_gg(T20, T21))
lessC_in_gg(0, s(T30)) → lessC_out_gg(0, s(T30))
lessC_in_gg(s(T35), s(T36)) → U3_gg(T35, T36, lessC_in_gg(T35, T36))
U3_gg(T35, T36, lessC_out_gg(T35, T36)) → lessC_out_gg(s(T35), s(T36))
U4_ggg(T20, T21, T10, lessC_out_gg(T20, T21)) → U5_ggg(T20, T21, T10, orderedA_in_g(.(T21, T10)))
U5_ggg(T20, T21, T10, orderedA_out_g(.(T21, T10))) → pB_out_ggg(T20, T21, T10)
U2_g(T20, T21, T10, pB_out_ggg(T20, T21, T10)) → orderedA_out_g(.(s(T20), .(T21, T10)))
U1_g(T15, T10, orderedA_out_g(.(T15, T10))) → orderedA_out_g(.(0, .(T15, T10)))

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:

LESSC_IN_GG(s(T35), s(T36)) → LESSC_IN_GG(T35, T36)

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:

LESSC_IN_GG(s(T35), s(T36)) → LESSC_IN_GG(T35, T36)

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:

  • LESSC_IN_GG(s(T35), s(T36)) → LESSC_IN_GG(T35, T36)
    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:

ORDEREDA_IN_G(.(s(T20), .(T21, T10))) → PB_IN_GGG(T20, T21, T10)
PB_IN_GGG(T20, T21, T10) → U4_GGG(T20, T21, T10, lessC_in_gg(T20, T21))
U4_GGG(T20, T21, T10, lessC_out_gg(T20, T21)) → ORDEREDA_IN_G(.(T21, T10))
ORDEREDA_IN_G(.(0, .(T15, T10))) → ORDEREDA_IN_G(.(T15, T10))

The TRS R consists of the following rules:

orderedA_in_g([]) → orderedA_out_g([])
orderedA_in_g(.(T3, [])) → orderedA_out_g(.(T3, []))
orderedA_in_g(.(0, .(T15, T10))) → U1_g(T15, T10, orderedA_in_g(.(T15, T10)))
orderedA_in_g(.(s(T20), .(T21, T10))) → U2_g(T20, T21, T10, pB_in_ggg(T20, T21, T10))
pB_in_ggg(T20, T21, T10) → U4_ggg(T20, T21, T10, lessC_in_gg(T20, T21))
lessC_in_gg(0, s(T30)) → lessC_out_gg(0, s(T30))
lessC_in_gg(s(T35), s(T36)) → U3_gg(T35, T36, lessC_in_gg(T35, T36))
U3_gg(T35, T36, lessC_out_gg(T35, T36)) → lessC_out_gg(s(T35), s(T36))
U4_ggg(T20, T21, T10, lessC_out_gg(T20, T21)) → U5_ggg(T20, T21, T10, orderedA_in_g(.(T21, T10)))
U5_ggg(T20, T21, T10, orderedA_out_g(.(T21, T10))) → pB_out_ggg(T20, T21, T10)
U2_g(T20, T21, T10, pB_out_ggg(T20, T21, T10)) → orderedA_out_g(.(s(T20), .(T21, T10)))
U1_g(T15, T10, orderedA_out_g(.(T15, T10))) → orderedA_out_g(.(0, .(T15, T10)))

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:

ORDEREDA_IN_G(.(s(T20), .(T21, T10))) → PB_IN_GGG(T20, T21, T10)
PB_IN_GGG(T20, T21, T10) → U4_GGG(T20, T21, T10, lessC_in_gg(T20, T21))
U4_GGG(T20, T21, T10, lessC_out_gg(T20, T21)) → ORDEREDA_IN_G(.(T21, T10))
ORDEREDA_IN_G(.(0, .(T15, T10))) → ORDEREDA_IN_G(.(T15, T10))

The TRS R consists of the following rules:

lessC_in_gg(0, s(T30)) → lessC_out_gg(0, s(T30))
lessC_in_gg(s(T35), s(T36)) → U3_gg(T35, T36, lessC_in_gg(T35, T36))
U3_gg(T35, T36, lessC_out_gg(T35, T36)) → lessC_out_gg(s(T35), s(T36))

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:

ORDEREDA_IN_G(.(s(T20), .(T21, T10))) → PB_IN_GGG(T20, T21, T10)
PB_IN_GGG(T20, T21, T10) → U4_GGG(T20, T21, T10, lessC_in_gg(T20, T21))
U4_GGG(T20, T21, T10, lessC_out_gg(T20, T21)) → ORDEREDA_IN_G(.(T21, T10))
ORDEREDA_IN_G(.(0, .(T15, T10))) → ORDEREDA_IN_G(.(T15, T10))

The TRS R consists of the following rules:

lessC_in_gg(0, s(T30)) → lessC_out_gg(0, s(T30))
lessC_in_gg(s(T35), s(T36)) → U3_gg(T35, T36, lessC_in_gg(T35, T36))
U3_gg(T35, T36, lessC_out_gg(T35, T36)) → lessC_out_gg(s(T35), s(T36))

The set Q consists of the following terms:

lessC_in_gg(x0, x1)
U3_gg(x0, x1, x2)

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

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

ORDEREDA_IN_G(.(s(T20), .(T21, T10))) → PB_IN_GGG(T20, T21, T10)
PB_IN_GGG(T20, T21, T10) → U4_GGG(T20, T21, T10, lessC_in_gg(T20, T21))


Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 2·x1 + x2   
POL(0) = 0   
POL(ORDEREDA_IN_G(x1)) = x1   
POL(PB_IN_GGG(x1, x2, x3)) = 1 + 2·x1 + 2·x2 + x3   
POL(U3_gg(x1, x2, x3)) = 2 + x1 + x2 + x3   
POL(U4_GGG(x1, x2, x3, x4)) = x1 + x2 + x3 + x4   
POL(lessC_in_gg(x1, x2)) = x1 + x2   
POL(lessC_out_gg(x1, x2)) = x1 + x2   
POL(s(x1)) = 1 + 2·x1   

(20) Obligation:

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

U4_GGG(T20, T21, T10, lessC_out_gg(T20, T21)) → ORDEREDA_IN_G(.(T21, T10))
ORDEREDA_IN_G(.(0, .(T15, T10))) → ORDEREDA_IN_G(.(T15, T10))

The TRS R consists of the following rules:

lessC_in_gg(0, s(T30)) → lessC_out_gg(0, s(T30))
lessC_in_gg(s(T35), s(T36)) → U3_gg(T35, T36, lessC_in_gg(T35, T36))
U3_gg(T35, T36, lessC_out_gg(T35, T36)) → lessC_out_gg(s(T35), s(T36))

The set Q consists of the following terms:

lessC_in_gg(x0, x1)
U3_gg(x0, x1, x2)

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

(21) DependencyGraphProof (EQUIVALENT transformation)

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

(22) Obligation:

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

ORDEREDA_IN_G(.(0, .(T15, T10))) → ORDEREDA_IN_G(.(T15, T10))

The TRS R consists of the following rules:

lessC_in_gg(0, s(T30)) → lessC_out_gg(0, s(T30))
lessC_in_gg(s(T35), s(T36)) → U3_gg(T35, T36, lessC_in_gg(T35, T36))
U3_gg(T35, T36, lessC_out_gg(T35, T36)) → lessC_out_gg(s(T35), s(T36))

The set Q consists of the following terms:

lessC_in_gg(x0, x1)
U3_gg(x0, x1, x2)

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

(23) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(24) Obligation:

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

ORDEREDA_IN_G(.(0, .(T15, T10))) → ORDEREDA_IN_G(.(T15, T10))

R is empty.
The set Q consists of the following terms:

lessC_in_gg(x0, x1)
U3_gg(x0, x1, x2)

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

(25) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

lessC_in_gg(x0, x1)
U3_gg(x0, x1, x2)

(26) Obligation:

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

ORDEREDA_IN_G(.(0, .(T15, T10))) → ORDEREDA_IN_G(.(T15, T10))

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

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

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

(28) YES