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

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(.(s(T19), .(s(T20), T10))) → U1_g(T19, T20, T10, pB_in_ggg(T19, T20, T10))
pB_in_ggg(T19, T20, T10) → U5_ggg(T19, T20, T10, leC_in_gg(T19, T20))
leC_in_gg(s(T33), s(T34)) → U4_gg(T33, T34, leC_in_gg(T33, T34))
leC_in_gg(0, s(0)) → leC_out_gg(0, s(0))
leC_in_gg(0, 0) → leC_out_gg(0, 0)
U4_gg(T33, T34, leC_out_gg(T33, T34)) → leC_out_gg(s(T33), s(T34))
U5_ggg(T19, T20, T10, leC_out_gg(T19, T20)) → U6_ggg(T19, T20, T10, orderedA_in_g(.(s(T20), T10)))
orderedA_in_g(.(0, .(s(0), T10))) → U2_g(T10, orderedA_in_g(.(s(0), T10)))
orderedA_in_g(.(0, .(0, T10))) → U3_g(T10, orderedA_in_g(.(0, T10)))
U3_g(T10, orderedA_out_g(.(0, T10))) → orderedA_out_g(.(0, .(0, T10)))
U2_g(T10, orderedA_out_g(.(s(0), T10))) → orderedA_out_g(.(0, .(s(0), T10)))
U6_ggg(T19, T20, T10, orderedA_out_g(.(s(T20), T10))) → pB_out_ggg(T19, T20, T10)
U1_g(T19, T20, T10, pB_out_ggg(T19, T20, T10)) → orderedA_out_g(.(s(T19), .(s(T20), 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(.(s(T19), .(s(T20), T10))) → U1_G(T19, T20, T10, pB_in_ggg(T19, T20, T10))
ORDEREDA_IN_G(.(s(T19), .(s(T20), T10))) → PB_IN_GGG(T19, T20, T10)
PB_IN_GGG(T19, T20, T10) → U5_GGG(T19, T20, T10, leC_in_gg(T19, T20))
PB_IN_GGG(T19, T20, T10) → LEC_IN_GG(T19, T20)
LEC_IN_GG(s(T33), s(T34)) → U4_GG(T33, T34, leC_in_gg(T33, T34))
LEC_IN_GG(s(T33), s(T34)) → LEC_IN_GG(T33, T34)
U5_GGG(T19, T20, T10, leC_out_gg(T19, T20)) → U6_GGG(T19, T20, T10, orderedA_in_g(.(s(T20), T10)))
U5_GGG(T19, T20, T10, leC_out_gg(T19, T20)) → ORDEREDA_IN_G(.(s(T20), T10))
ORDEREDA_IN_G(.(0, .(s(0), T10))) → U2_G(T10, orderedA_in_g(.(s(0), T10)))
ORDEREDA_IN_G(.(0, .(s(0), T10))) → ORDEREDA_IN_G(.(s(0), T10))
ORDEREDA_IN_G(.(0, .(0, T10))) → U3_G(T10, orderedA_in_g(.(0, T10)))
ORDEREDA_IN_G(.(0, .(0, T10))) → ORDEREDA_IN_G(.(0, 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(.(s(T19), .(s(T20), T10))) → U1_g(T19, T20, T10, pB_in_ggg(T19, T20, T10))
pB_in_ggg(T19, T20, T10) → U5_ggg(T19, T20, T10, leC_in_gg(T19, T20))
leC_in_gg(s(T33), s(T34)) → U4_gg(T33, T34, leC_in_gg(T33, T34))
leC_in_gg(0, s(0)) → leC_out_gg(0, s(0))
leC_in_gg(0, 0) → leC_out_gg(0, 0)
U4_gg(T33, T34, leC_out_gg(T33, T34)) → leC_out_gg(s(T33), s(T34))
U5_ggg(T19, T20, T10, leC_out_gg(T19, T20)) → U6_ggg(T19, T20, T10, orderedA_in_g(.(s(T20), T10)))
orderedA_in_g(.(0, .(s(0), T10))) → U2_g(T10, orderedA_in_g(.(s(0), T10)))
orderedA_in_g(.(0, .(0, T10))) → U3_g(T10, orderedA_in_g(.(0, T10)))
U3_g(T10, orderedA_out_g(.(0, T10))) → orderedA_out_g(.(0, .(0, T10)))
U2_g(T10, orderedA_out_g(.(s(0), T10))) → orderedA_out_g(.(0, .(s(0), T10)))
U6_ggg(T19, T20, T10, orderedA_out_g(.(s(T20), T10))) → pB_out_ggg(T19, T20, T10)
U1_g(T19, T20, T10, pB_out_ggg(T19, T20, T10)) → orderedA_out_g(.(s(T19), .(s(T20), 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(.(s(T19), .(s(T20), T10))) → U1_G(T19, T20, T10, pB_in_ggg(T19, T20, T10))
ORDEREDA_IN_G(.(s(T19), .(s(T20), T10))) → PB_IN_GGG(T19, T20, T10)
PB_IN_GGG(T19, T20, T10) → U5_GGG(T19, T20, T10, leC_in_gg(T19, T20))
PB_IN_GGG(T19, T20, T10) → LEC_IN_GG(T19, T20)
LEC_IN_GG(s(T33), s(T34)) → U4_GG(T33, T34, leC_in_gg(T33, T34))
LEC_IN_GG(s(T33), s(T34)) → LEC_IN_GG(T33, T34)
U5_GGG(T19, T20, T10, leC_out_gg(T19, T20)) → U6_GGG(T19, T20, T10, orderedA_in_g(.(s(T20), T10)))
U5_GGG(T19, T20, T10, leC_out_gg(T19, T20)) → ORDEREDA_IN_G(.(s(T20), T10))
ORDEREDA_IN_G(.(0, .(s(0), T10))) → U2_G(T10, orderedA_in_g(.(s(0), T10)))
ORDEREDA_IN_G(.(0, .(s(0), T10))) → ORDEREDA_IN_G(.(s(0), T10))
ORDEREDA_IN_G(.(0, .(0, T10))) → U3_G(T10, orderedA_in_g(.(0, T10)))
ORDEREDA_IN_G(.(0, .(0, T10))) → ORDEREDA_IN_G(.(0, 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(.(s(T19), .(s(T20), T10))) → U1_g(T19, T20, T10, pB_in_ggg(T19, T20, T10))
pB_in_ggg(T19, T20, T10) → U5_ggg(T19, T20, T10, leC_in_gg(T19, T20))
leC_in_gg(s(T33), s(T34)) → U4_gg(T33, T34, leC_in_gg(T33, T34))
leC_in_gg(0, s(0)) → leC_out_gg(0, s(0))
leC_in_gg(0, 0) → leC_out_gg(0, 0)
U4_gg(T33, T34, leC_out_gg(T33, T34)) → leC_out_gg(s(T33), s(T34))
U5_ggg(T19, T20, T10, leC_out_gg(T19, T20)) → U6_ggg(T19, T20, T10, orderedA_in_g(.(s(T20), T10)))
orderedA_in_g(.(0, .(s(0), T10))) → U2_g(T10, orderedA_in_g(.(s(0), T10)))
orderedA_in_g(.(0, .(0, T10))) → U3_g(T10, orderedA_in_g(.(0, T10)))
U3_g(T10, orderedA_out_g(.(0, T10))) → orderedA_out_g(.(0, .(0, T10)))
U2_g(T10, orderedA_out_g(.(s(0), T10))) → orderedA_out_g(.(0, .(s(0), T10)))
U6_ggg(T19, T20, T10, orderedA_out_g(.(s(T20), T10))) → pB_out_ggg(T19, T20, T10)
U1_g(T19, T20, T10, pB_out_ggg(T19, T20, T10)) → orderedA_out_g(.(s(T19), .(s(T20), 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 3 SCCs with 7 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

LEC_IN_GG(s(T33), s(T34)) → LEC_IN_GG(T33, T34)

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(.(s(T19), .(s(T20), T10))) → U1_g(T19, T20, T10, pB_in_ggg(T19, T20, T10))
pB_in_ggg(T19, T20, T10) → U5_ggg(T19, T20, T10, leC_in_gg(T19, T20))
leC_in_gg(s(T33), s(T34)) → U4_gg(T33, T34, leC_in_gg(T33, T34))
leC_in_gg(0, s(0)) → leC_out_gg(0, s(0))
leC_in_gg(0, 0) → leC_out_gg(0, 0)
U4_gg(T33, T34, leC_out_gg(T33, T34)) → leC_out_gg(s(T33), s(T34))
U5_ggg(T19, T20, T10, leC_out_gg(T19, T20)) → U6_ggg(T19, T20, T10, orderedA_in_g(.(s(T20), T10)))
orderedA_in_g(.(0, .(s(0), T10))) → U2_g(T10, orderedA_in_g(.(s(0), T10)))
orderedA_in_g(.(0, .(0, T10))) → U3_g(T10, orderedA_in_g(.(0, T10)))
U3_g(T10, orderedA_out_g(.(0, T10))) → orderedA_out_g(.(0, .(0, T10)))
U2_g(T10, orderedA_out_g(.(s(0), T10))) → orderedA_out_g(.(0, .(s(0), T10)))
U6_ggg(T19, T20, T10, orderedA_out_g(.(s(T20), T10))) → pB_out_ggg(T19, T20, T10)
U1_g(T19, T20, T10, pB_out_ggg(T19, T20, T10)) → orderedA_out_g(.(s(T19), .(s(T20), 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:

LEC_IN_GG(s(T33), s(T34)) → LEC_IN_GG(T33, T34)

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:

LEC_IN_GG(s(T33), s(T34)) → LEC_IN_GG(T33, T34)

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:

  • LEC_IN_GG(s(T33), s(T34)) → LEC_IN_GG(T33, T34)
    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(T19), .(s(T20), T10))) → PB_IN_GGG(T19, T20, T10)
PB_IN_GGG(T19, T20, T10) → U5_GGG(T19, T20, T10, leC_in_gg(T19, T20))
U5_GGG(T19, T20, T10, leC_out_gg(T19, T20)) → ORDEREDA_IN_G(.(s(T20), 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(.(s(T19), .(s(T20), T10))) → U1_g(T19, T20, T10, pB_in_ggg(T19, T20, T10))
pB_in_ggg(T19, T20, T10) → U5_ggg(T19, T20, T10, leC_in_gg(T19, T20))
leC_in_gg(s(T33), s(T34)) → U4_gg(T33, T34, leC_in_gg(T33, T34))
leC_in_gg(0, s(0)) → leC_out_gg(0, s(0))
leC_in_gg(0, 0) → leC_out_gg(0, 0)
U4_gg(T33, T34, leC_out_gg(T33, T34)) → leC_out_gg(s(T33), s(T34))
U5_ggg(T19, T20, T10, leC_out_gg(T19, T20)) → U6_ggg(T19, T20, T10, orderedA_in_g(.(s(T20), T10)))
orderedA_in_g(.(0, .(s(0), T10))) → U2_g(T10, orderedA_in_g(.(s(0), T10)))
orderedA_in_g(.(0, .(0, T10))) → U3_g(T10, orderedA_in_g(.(0, T10)))
U3_g(T10, orderedA_out_g(.(0, T10))) → orderedA_out_g(.(0, .(0, T10)))
U2_g(T10, orderedA_out_g(.(s(0), T10))) → orderedA_out_g(.(0, .(s(0), T10)))
U6_ggg(T19, T20, T10, orderedA_out_g(.(s(T20), T10))) → pB_out_ggg(T19, T20, T10)
U1_g(T19, T20, T10, pB_out_ggg(T19, T20, T10)) → orderedA_out_g(.(s(T19), .(s(T20), 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(T19), .(s(T20), T10))) → PB_IN_GGG(T19, T20, T10)
PB_IN_GGG(T19, T20, T10) → U5_GGG(T19, T20, T10, leC_in_gg(T19, T20))
U5_GGG(T19, T20, T10, leC_out_gg(T19, T20)) → ORDEREDA_IN_G(.(s(T20), T10))

The TRS R consists of the following rules:

leC_in_gg(s(T33), s(T34)) → U4_gg(T33, T34, leC_in_gg(T33, T34))
leC_in_gg(0, s(0)) → leC_out_gg(0, s(0))
leC_in_gg(0, 0) → leC_out_gg(0, 0)
U4_gg(T33, T34, leC_out_gg(T33, T34)) → leC_out_gg(s(T33), s(T34))

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(T19), .(s(T20), T10))) → PB_IN_GGG(T19, T20, T10)
PB_IN_GGG(T19, T20, T10) → U5_GGG(T19, T20, T10, leC_in_gg(T19, T20))
U5_GGG(T19, T20, T10, leC_out_gg(T19, T20)) → ORDEREDA_IN_G(.(s(T20), T10))

The TRS R consists of the following rules:

leC_in_gg(s(T33), s(T34)) → U4_gg(T33, T34, leC_in_gg(T33, T34))
leC_in_gg(0, s(0)) → leC_out_gg(0, s(0))
leC_in_gg(0, 0) → leC_out_gg(0, 0)
U4_gg(T33, T34, leC_out_gg(T33, T34)) → leC_out_gg(s(T33), s(T34))

The set Q consists of the following terms:

leC_in_gg(x0, x1)
U4_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(T19), .(s(T20), T10))) → PB_IN_GGG(T19, T20, T10)

Strictly oriented rules of the TRS R:

leC_in_gg(0, s(0)) → leC_out_gg(0, s(0))
leC_in_gg(0, 0) → leC_out_gg(0, 0)

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + 2·x2   
POL(0) = 0   
POL(ORDEREDA_IN_G(x1)) = x1   
POL(PB_IN_GGG(x1, x2, x3)) = 2 + 2·x1 + 2·x2 + 2·x3   
POL(U4_gg(x1, x2, x3)) = 2 + x1 + x2 + x3   
POL(U5_GGG(x1, x2, x3, x4)) = 1 + x1 + x2 + 2·x3 + x4   
POL(leC_in_gg(x1, x2)) = 1 + x1 + x2   
POL(leC_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:

PB_IN_GGG(T19, T20, T10) → U5_GGG(T19, T20, T10, leC_in_gg(T19, T20))
U5_GGG(T19, T20, T10, leC_out_gg(T19, T20)) → ORDEREDA_IN_G(.(s(T20), T10))

The TRS R consists of the following rules:

leC_in_gg(s(T33), s(T34)) → U4_gg(T33, T34, leC_in_gg(T33, T34))
U4_gg(T33, T34, leC_out_gg(T33, T34)) → leC_out_gg(s(T33), s(T34))

The set Q consists of the following terms:

leC_in_gg(x0, x1)
U4_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 0 SCCs with 2 less nodes.

(22) TRUE

(23) Obligation:

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

ORDEREDA_IN_G(.(0, .(0, T10))) → ORDEREDA_IN_G(.(0, 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(.(s(T19), .(s(T20), T10))) → U1_g(T19, T20, T10, pB_in_ggg(T19, T20, T10))
pB_in_ggg(T19, T20, T10) → U5_ggg(T19, T20, T10, leC_in_gg(T19, T20))
leC_in_gg(s(T33), s(T34)) → U4_gg(T33, T34, leC_in_gg(T33, T34))
leC_in_gg(0, s(0)) → leC_out_gg(0, s(0))
leC_in_gg(0, 0) → leC_out_gg(0, 0)
U4_gg(T33, T34, leC_out_gg(T33, T34)) → leC_out_gg(s(T33), s(T34))
U5_ggg(T19, T20, T10, leC_out_gg(T19, T20)) → U6_ggg(T19, T20, T10, orderedA_in_g(.(s(T20), T10)))
orderedA_in_g(.(0, .(s(0), T10))) → U2_g(T10, orderedA_in_g(.(s(0), T10)))
orderedA_in_g(.(0, .(0, T10))) → U3_g(T10, orderedA_in_g(.(0, T10)))
U3_g(T10, orderedA_out_g(.(0, T10))) → orderedA_out_g(.(0, .(0, T10)))
U2_g(T10, orderedA_out_g(.(s(0), T10))) → orderedA_out_g(.(0, .(s(0), T10)))
U6_ggg(T19, T20, T10, orderedA_out_g(.(s(T20), T10))) → pB_out_ggg(T19, T20, T10)
U1_g(T19, T20, T10, pB_out_ggg(T19, T20, T10)) → orderedA_out_g(.(s(T19), .(s(T20), T10)))

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

(24) UsableRulesProof (EQUIVALENT transformation)

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

(25) Obligation:

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

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

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

(26) PiDPToQDPProof (EQUIVALENT transformation)

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

(27) Obligation:

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

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

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

(28) 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, .(0, T10))) → ORDEREDA_IN_G(.(0, T10))
    The graph contains the following edges 1 > 1

(29) YES