(0) Obligation:

Clauses:

div(X, 0, Z) :- ','(!, fail).
div(0, Y, Z) :- ','(!, =(Z, 0)).
div(X, Y, s(Z)) :- ','(minus(X, Y, U), div(U, Y, Z)).
minus(0, Y, 0).
minus(X, 0, X).
minus(s(X), s(Y), Z) :- minus(X, Y, Z).
=(X, X).

Queries:

div(g,g,a).

(1) PredefinedPredicateTransformerProof (SOUND transformation)

Added definitions of predefined predicates [PROLOG].

(2) Obligation:

Clauses:

div(X, 0, Z) :- ','(!, fail).
div(0, Y, Z) :- ','(!, =1(Z, 0)).
div(X, Y, s(Z)) :- ','(minus(X, Y, U), div(U, Y, Z)).
minus(0, Y, 0).
minus(X, 0, X).
minus(s(X), s(Y), Z) :- minus(X, Y, Z).
=1(X, X).
fail :- fail(b).
fail(a).

Queries:

div(g,g,a).

(3) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(4) Obligation:

Clauses:

div1(0, T6, 0).
div1(T10, T11, s(T13)) :- minus16(T10, T11, X17).
div1(T10, T11, s(T13)) :- ','(minus16(T10, T11, T14), div1(T14, T11, T13)).
minus23(0, T17, 0).
minus23(T18, 0, T18).
minus23(s(T19), s(T20), X41) :- minus23(T19, T20, X41).
minus16(s(0), s(T17), 0).
minus16(s(T18), s(0), T18).
minus16(s(s(T19)), s(s(T20)), X41) :- minus23(T19, T20, X41).

Queries:

div1(g,g,a).

(5) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
div1_in: (b,b,f)
minus16_in: (b,b,f)
minus23_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

div1_in_gga(0, T6, 0) → div1_out_gga(0, T6, 0)
div1_in_gga(T10, T11, s(T13)) → U1_gga(T10, T11, T13, minus16_in_gga(T10, T11, X17))
minus16_in_gga(s(0), s(T17), 0) → minus16_out_gga(s(0), s(T17), 0)
minus16_in_gga(s(T18), s(0), T18) → minus16_out_gga(s(T18), s(0), T18)
minus16_in_gga(s(s(T19)), s(s(T20)), X41) → U5_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
minus23_in_gga(0, T17, 0) → minus23_out_gga(0, T17, 0)
minus23_in_gga(T18, 0, T18) → minus23_out_gga(T18, 0, T18)
minus23_in_gga(s(T19), s(T20), X41) → U4_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
U4_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus23_out_gga(s(T19), s(T20), X41)
U5_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus16_out_gga(s(s(T19)), s(s(T20)), X41)
U1_gga(T10, T11, T13, minus16_out_gga(T10, T11, X17)) → div1_out_gga(T10, T11, s(T13))
div1_in_gga(T10, T11, s(T13)) → U2_gga(T10, T11, T13, minus16_in_gga(T10, T11, T14))
U2_gga(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → U3_gga(T10, T11, T13, div1_in_gga(T14, T11, T13))
U3_gga(T10, T11, T13, div1_out_gga(T14, T11, T13)) → div1_out_gga(T10, T11, s(T13))

The argument filtering Pi contains the following mapping:
div1_in_gga(x1, x2, x3)  =  div1_in_gga(x1, x2)
0  =  0
div1_out_gga(x1, x2, x3)  =  div1_out_gga
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
minus16_in_gga(x1, x2, x3)  =  minus16_in_gga(x1, x2)
s(x1)  =  s(x1)
minus16_out_gga(x1, x2, x3)  =  minus16_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
minus23_in_gga(x1, x2, x3)  =  minus23_in_gga(x1, x2)
minus23_out_gga(x1, x2, x3)  =  minus23_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x2, x4)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(6) Obligation:

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

div1_in_gga(0, T6, 0) → div1_out_gga(0, T6, 0)
div1_in_gga(T10, T11, s(T13)) → U1_gga(T10, T11, T13, minus16_in_gga(T10, T11, X17))
minus16_in_gga(s(0), s(T17), 0) → minus16_out_gga(s(0), s(T17), 0)
minus16_in_gga(s(T18), s(0), T18) → minus16_out_gga(s(T18), s(0), T18)
minus16_in_gga(s(s(T19)), s(s(T20)), X41) → U5_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
minus23_in_gga(0, T17, 0) → minus23_out_gga(0, T17, 0)
minus23_in_gga(T18, 0, T18) → minus23_out_gga(T18, 0, T18)
minus23_in_gga(s(T19), s(T20), X41) → U4_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
U4_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus23_out_gga(s(T19), s(T20), X41)
U5_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus16_out_gga(s(s(T19)), s(s(T20)), X41)
U1_gga(T10, T11, T13, minus16_out_gga(T10, T11, X17)) → div1_out_gga(T10, T11, s(T13))
div1_in_gga(T10, T11, s(T13)) → U2_gga(T10, T11, T13, minus16_in_gga(T10, T11, T14))
U2_gga(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → U3_gga(T10, T11, T13, div1_in_gga(T14, T11, T13))
U3_gga(T10, T11, T13, div1_out_gga(T14, T11, T13)) → div1_out_gga(T10, T11, s(T13))

The argument filtering Pi contains the following mapping:
div1_in_gga(x1, x2, x3)  =  div1_in_gga(x1, x2)
0  =  0
div1_out_gga(x1, x2, x3)  =  div1_out_gga
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
minus16_in_gga(x1, x2, x3)  =  minus16_in_gga(x1, x2)
s(x1)  =  s(x1)
minus16_out_gga(x1, x2, x3)  =  minus16_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
minus23_in_gga(x1, x2, x3)  =  minus23_in_gga(x1, x2)
minus23_out_gga(x1, x2, x3)  =  minus23_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x2, x4)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)

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

DIV1_IN_GGA(T10, T11, s(T13)) → U1_GGA(T10, T11, T13, minus16_in_gga(T10, T11, X17))
DIV1_IN_GGA(T10, T11, s(T13)) → MINUS16_IN_GGA(T10, T11, X17)
MINUS16_IN_GGA(s(s(T19)), s(s(T20)), X41) → U5_GGA(T19, T20, X41, minus23_in_gga(T19, T20, X41))
MINUS16_IN_GGA(s(s(T19)), s(s(T20)), X41) → MINUS23_IN_GGA(T19, T20, X41)
MINUS23_IN_GGA(s(T19), s(T20), X41) → U4_GGA(T19, T20, X41, minus23_in_gga(T19, T20, X41))
MINUS23_IN_GGA(s(T19), s(T20), X41) → MINUS23_IN_GGA(T19, T20, X41)
DIV1_IN_GGA(T10, T11, s(T13)) → U2_GGA(T10, T11, T13, minus16_in_gga(T10, T11, T14))
U2_GGA(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → U3_GGA(T10, T11, T13, div1_in_gga(T14, T11, T13))
U2_GGA(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → DIV1_IN_GGA(T14, T11, T13)

The TRS R consists of the following rules:

div1_in_gga(0, T6, 0) → div1_out_gga(0, T6, 0)
div1_in_gga(T10, T11, s(T13)) → U1_gga(T10, T11, T13, minus16_in_gga(T10, T11, X17))
minus16_in_gga(s(0), s(T17), 0) → minus16_out_gga(s(0), s(T17), 0)
minus16_in_gga(s(T18), s(0), T18) → minus16_out_gga(s(T18), s(0), T18)
minus16_in_gga(s(s(T19)), s(s(T20)), X41) → U5_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
minus23_in_gga(0, T17, 0) → minus23_out_gga(0, T17, 0)
minus23_in_gga(T18, 0, T18) → minus23_out_gga(T18, 0, T18)
minus23_in_gga(s(T19), s(T20), X41) → U4_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
U4_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus23_out_gga(s(T19), s(T20), X41)
U5_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus16_out_gga(s(s(T19)), s(s(T20)), X41)
U1_gga(T10, T11, T13, minus16_out_gga(T10, T11, X17)) → div1_out_gga(T10, T11, s(T13))
div1_in_gga(T10, T11, s(T13)) → U2_gga(T10, T11, T13, minus16_in_gga(T10, T11, T14))
U2_gga(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → U3_gga(T10, T11, T13, div1_in_gga(T14, T11, T13))
U3_gga(T10, T11, T13, div1_out_gga(T14, T11, T13)) → div1_out_gga(T10, T11, s(T13))

The argument filtering Pi contains the following mapping:
div1_in_gga(x1, x2, x3)  =  div1_in_gga(x1, x2)
0  =  0
div1_out_gga(x1, x2, x3)  =  div1_out_gga
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
minus16_in_gga(x1, x2, x3)  =  minus16_in_gga(x1, x2)
s(x1)  =  s(x1)
minus16_out_gga(x1, x2, x3)  =  minus16_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
minus23_in_gga(x1, x2, x3)  =  minus23_in_gga(x1, x2)
minus23_out_gga(x1, x2, x3)  =  minus23_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x2, x4)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
DIV1_IN_GGA(x1, x2, x3)  =  DIV1_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x4)
MINUS16_IN_GGA(x1, x2, x3)  =  MINUS16_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x4)
MINUS23_IN_GGA(x1, x2, x3)  =  MINUS23_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x4)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x2, x4)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x4)

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

(8) Obligation:

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

DIV1_IN_GGA(T10, T11, s(T13)) → U1_GGA(T10, T11, T13, minus16_in_gga(T10, T11, X17))
DIV1_IN_GGA(T10, T11, s(T13)) → MINUS16_IN_GGA(T10, T11, X17)
MINUS16_IN_GGA(s(s(T19)), s(s(T20)), X41) → U5_GGA(T19, T20, X41, minus23_in_gga(T19, T20, X41))
MINUS16_IN_GGA(s(s(T19)), s(s(T20)), X41) → MINUS23_IN_GGA(T19, T20, X41)
MINUS23_IN_GGA(s(T19), s(T20), X41) → U4_GGA(T19, T20, X41, minus23_in_gga(T19, T20, X41))
MINUS23_IN_GGA(s(T19), s(T20), X41) → MINUS23_IN_GGA(T19, T20, X41)
DIV1_IN_GGA(T10, T11, s(T13)) → U2_GGA(T10, T11, T13, minus16_in_gga(T10, T11, T14))
U2_GGA(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → U3_GGA(T10, T11, T13, div1_in_gga(T14, T11, T13))
U2_GGA(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → DIV1_IN_GGA(T14, T11, T13)

The TRS R consists of the following rules:

div1_in_gga(0, T6, 0) → div1_out_gga(0, T6, 0)
div1_in_gga(T10, T11, s(T13)) → U1_gga(T10, T11, T13, minus16_in_gga(T10, T11, X17))
minus16_in_gga(s(0), s(T17), 0) → minus16_out_gga(s(0), s(T17), 0)
minus16_in_gga(s(T18), s(0), T18) → minus16_out_gga(s(T18), s(0), T18)
minus16_in_gga(s(s(T19)), s(s(T20)), X41) → U5_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
minus23_in_gga(0, T17, 0) → minus23_out_gga(0, T17, 0)
minus23_in_gga(T18, 0, T18) → minus23_out_gga(T18, 0, T18)
minus23_in_gga(s(T19), s(T20), X41) → U4_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
U4_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus23_out_gga(s(T19), s(T20), X41)
U5_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus16_out_gga(s(s(T19)), s(s(T20)), X41)
U1_gga(T10, T11, T13, minus16_out_gga(T10, T11, X17)) → div1_out_gga(T10, T11, s(T13))
div1_in_gga(T10, T11, s(T13)) → U2_gga(T10, T11, T13, minus16_in_gga(T10, T11, T14))
U2_gga(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → U3_gga(T10, T11, T13, div1_in_gga(T14, T11, T13))
U3_gga(T10, T11, T13, div1_out_gga(T14, T11, T13)) → div1_out_gga(T10, T11, s(T13))

The argument filtering Pi contains the following mapping:
div1_in_gga(x1, x2, x3)  =  div1_in_gga(x1, x2)
0  =  0
div1_out_gga(x1, x2, x3)  =  div1_out_gga
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
minus16_in_gga(x1, x2, x3)  =  minus16_in_gga(x1, x2)
s(x1)  =  s(x1)
minus16_out_gga(x1, x2, x3)  =  minus16_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
minus23_in_gga(x1, x2, x3)  =  minus23_in_gga(x1, x2)
minus23_out_gga(x1, x2, x3)  =  minus23_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x2, x4)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
DIV1_IN_GGA(x1, x2, x3)  =  DIV1_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x4)
MINUS16_IN_GGA(x1, x2, x3)  =  MINUS16_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x4)
MINUS23_IN_GGA(x1, x2, x3)  =  MINUS23_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x4)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x2, x4)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x4)

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

(9) DependencyGraphProof (EQUIVALENT transformation)

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

(10) Complex Obligation (AND)

(11) Obligation:

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

MINUS23_IN_GGA(s(T19), s(T20), X41) → MINUS23_IN_GGA(T19, T20, X41)

The TRS R consists of the following rules:

div1_in_gga(0, T6, 0) → div1_out_gga(0, T6, 0)
div1_in_gga(T10, T11, s(T13)) → U1_gga(T10, T11, T13, minus16_in_gga(T10, T11, X17))
minus16_in_gga(s(0), s(T17), 0) → minus16_out_gga(s(0), s(T17), 0)
minus16_in_gga(s(T18), s(0), T18) → minus16_out_gga(s(T18), s(0), T18)
minus16_in_gga(s(s(T19)), s(s(T20)), X41) → U5_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
minus23_in_gga(0, T17, 0) → minus23_out_gga(0, T17, 0)
minus23_in_gga(T18, 0, T18) → minus23_out_gga(T18, 0, T18)
minus23_in_gga(s(T19), s(T20), X41) → U4_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
U4_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus23_out_gga(s(T19), s(T20), X41)
U5_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus16_out_gga(s(s(T19)), s(s(T20)), X41)
U1_gga(T10, T11, T13, minus16_out_gga(T10, T11, X17)) → div1_out_gga(T10, T11, s(T13))
div1_in_gga(T10, T11, s(T13)) → U2_gga(T10, T11, T13, minus16_in_gga(T10, T11, T14))
U2_gga(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → U3_gga(T10, T11, T13, div1_in_gga(T14, T11, T13))
U3_gga(T10, T11, T13, div1_out_gga(T14, T11, T13)) → div1_out_gga(T10, T11, s(T13))

The argument filtering Pi contains the following mapping:
div1_in_gga(x1, x2, x3)  =  div1_in_gga(x1, x2)
0  =  0
div1_out_gga(x1, x2, x3)  =  div1_out_gga
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
minus16_in_gga(x1, x2, x3)  =  minus16_in_gga(x1, x2)
s(x1)  =  s(x1)
minus16_out_gga(x1, x2, x3)  =  minus16_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
minus23_in_gga(x1, x2, x3)  =  minus23_in_gga(x1, x2)
minus23_out_gga(x1, x2, x3)  =  minus23_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x2, x4)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
MINUS23_IN_GGA(x1, x2, x3)  =  MINUS23_IN_GGA(x1, x2)

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

(12) UsableRulesProof (EQUIVALENT transformation)

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

(13) Obligation:

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

MINUS23_IN_GGA(s(T19), s(T20), X41) → MINUS23_IN_GGA(T19, T20, X41)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
MINUS23_IN_GGA(x1, x2, x3)  =  MINUS23_IN_GGA(x1, x2)

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

(14) PiDPToQDPProof (SOUND transformation)

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

(15) Obligation:

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

MINUS23_IN_GGA(s(T19), s(T20)) → MINUS23_IN_GGA(T19, T20)

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

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

  • MINUS23_IN_GGA(s(T19), s(T20)) → MINUS23_IN_GGA(T19, T20)
    The graph contains the following edges 1 > 1, 2 > 2

(17) TRUE

(18) Obligation:

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

DIV1_IN_GGA(T10, T11, s(T13)) → U2_GGA(T10, T11, T13, minus16_in_gga(T10, T11, T14))
U2_GGA(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → DIV1_IN_GGA(T14, T11, T13)

The TRS R consists of the following rules:

div1_in_gga(0, T6, 0) → div1_out_gga(0, T6, 0)
div1_in_gga(T10, T11, s(T13)) → U1_gga(T10, T11, T13, minus16_in_gga(T10, T11, X17))
minus16_in_gga(s(0), s(T17), 0) → minus16_out_gga(s(0), s(T17), 0)
minus16_in_gga(s(T18), s(0), T18) → minus16_out_gga(s(T18), s(0), T18)
minus16_in_gga(s(s(T19)), s(s(T20)), X41) → U5_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
minus23_in_gga(0, T17, 0) → minus23_out_gga(0, T17, 0)
minus23_in_gga(T18, 0, T18) → minus23_out_gga(T18, 0, T18)
minus23_in_gga(s(T19), s(T20), X41) → U4_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
U4_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus23_out_gga(s(T19), s(T20), X41)
U5_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus16_out_gga(s(s(T19)), s(s(T20)), X41)
U1_gga(T10, T11, T13, minus16_out_gga(T10, T11, X17)) → div1_out_gga(T10, T11, s(T13))
div1_in_gga(T10, T11, s(T13)) → U2_gga(T10, T11, T13, minus16_in_gga(T10, T11, T14))
U2_gga(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → U3_gga(T10, T11, T13, div1_in_gga(T14, T11, T13))
U3_gga(T10, T11, T13, div1_out_gga(T14, T11, T13)) → div1_out_gga(T10, T11, s(T13))

The argument filtering Pi contains the following mapping:
div1_in_gga(x1, x2, x3)  =  div1_in_gga(x1, x2)
0  =  0
div1_out_gga(x1, x2, x3)  =  div1_out_gga
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
minus16_in_gga(x1, x2, x3)  =  minus16_in_gga(x1, x2)
s(x1)  =  s(x1)
minus16_out_gga(x1, x2, x3)  =  minus16_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
minus23_in_gga(x1, x2, x3)  =  minus23_in_gga(x1, x2)
minus23_out_gga(x1, x2, x3)  =  minus23_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x2, x4)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
DIV1_IN_GGA(x1, x2, x3)  =  DIV1_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x2, x4)

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

(19) UsableRulesProof (EQUIVALENT transformation)

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

(20) Obligation:

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

DIV1_IN_GGA(T10, T11, s(T13)) → U2_GGA(T10, T11, T13, minus16_in_gga(T10, T11, T14))
U2_GGA(T10, T11, T13, minus16_out_gga(T10, T11, T14)) → DIV1_IN_GGA(T14, T11, T13)

The TRS R consists of the following rules:

minus16_in_gga(s(0), s(T17), 0) → minus16_out_gga(s(0), s(T17), 0)
minus16_in_gga(s(T18), s(0), T18) → minus16_out_gga(s(T18), s(0), T18)
minus16_in_gga(s(s(T19)), s(s(T20)), X41) → U5_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
U5_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus16_out_gga(s(s(T19)), s(s(T20)), X41)
minus23_in_gga(0, T17, 0) → minus23_out_gga(0, T17, 0)
minus23_in_gga(T18, 0, T18) → minus23_out_gga(T18, 0, T18)
minus23_in_gga(s(T19), s(T20), X41) → U4_gga(T19, T20, X41, minus23_in_gga(T19, T20, X41))
U4_gga(T19, T20, X41, minus23_out_gga(T19, T20, X41)) → minus23_out_gga(s(T19), s(T20), X41)

The argument filtering Pi contains the following mapping:
0  =  0
minus16_in_gga(x1, x2, x3)  =  minus16_in_gga(x1, x2)
s(x1)  =  s(x1)
minus16_out_gga(x1, x2, x3)  =  minus16_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
minus23_in_gga(x1, x2, x3)  =  minus23_in_gga(x1, x2)
minus23_out_gga(x1, x2, x3)  =  minus23_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
DIV1_IN_GGA(x1, x2, x3)  =  DIV1_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x2, x4)

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

(21) PiDPToQDPProof (SOUND transformation)

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

(22) Obligation:

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

DIV1_IN_GGA(T10, T11) → U2_GGA(T11, minus16_in_gga(T10, T11))
U2_GGA(T11, minus16_out_gga(T14)) → DIV1_IN_GGA(T14, T11)

The TRS R consists of the following rules:

minus16_in_gga(s(0), s(T17)) → minus16_out_gga(0)
minus16_in_gga(s(T18), s(0)) → minus16_out_gga(T18)
minus16_in_gga(s(s(T19)), s(s(T20))) → U5_gga(minus23_in_gga(T19, T20))
U5_gga(minus23_out_gga(X41)) → minus16_out_gga(X41)
minus23_in_gga(0, T17) → minus23_out_gga(0)
minus23_in_gga(T18, 0) → minus23_out_gga(T18)
minus23_in_gga(s(T19), s(T20)) → U4_gga(minus23_in_gga(T19, T20))
U4_gga(minus23_out_gga(X41)) → minus23_out_gga(X41)

The set Q consists of the following terms:

minus16_in_gga(x0, x1)
U5_gga(x0)
minus23_in_gga(x0, x1)
U4_gga(x0)

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

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U2_GGA(T11, minus16_out_gga(T14)) → DIV1_IN_GGA(T14, T11)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(DIV1_IN_GGA(x1, x2)) = x1   
POL(U2_GGA(x1, x2)) = x2   
POL(U4_gga(x1)) = 1 + x1   
POL(U5_gga(x1)) = x1   
POL(minus16_in_gga(x1, x2)) = x1   
POL(minus16_out_gga(x1)) = 1 + x1   
POL(minus23_in_gga(x1, x2)) = 1 + x1   
POL(minus23_out_gga(x1)) = 1 + x1   
POL(s(x1)) = 1 + x1   

The following usable rules [FROCOS05] were oriented:

minus16_in_gga(s(0), s(T17)) → minus16_out_gga(0)
minus16_in_gga(s(T18), s(0)) → minus16_out_gga(T18)
minus16_in_gga(s(s(T19)), s(s(T20))) → U5_gga(minus23_in_gga(T19, T20))
minus23_in_gga(0, T17) → minus23_out_gga(0)
minus23_in_gga(T18, 0) → minus23_out_gga(T18)
minus23_in_gga(s(T19), s(T20)) → U4_gga(minus23_in_gga(T19, T20))
U5_gga(minus23_out_gga(X41)) → minus16_out_gga(X41)
U4_gga(minus23_out_gga(X41)) → minus23_out_gga(X41)

(24) Obligation:

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

DIV1_IN_GGA(T10, T11) → U2_GGA(T11, minus16_in_gga(T10, T11))

The TRS R consists of the following rules:

minus16_in_gga(s(0), s(T17)) → minus16_out_gga(0)
minus16_in_gga(s(T18), s(0)) → minus16_out_gga(T18)
minus16_in_gga(s(s(T19)), s(s(T20))) → U5_gga(minus23_in_gga(T19, T20))
U5_gga(minus23_out_gga(X41)) → minus16_out_gga(X41)
minus23_in_gga(0, T17) → minus23_out_gga(0)
minus23_in_gga(T18, 0) → minus23_out_gga(T18)
minus23_in_gga(s(T19), s(T20)) → U4_gga(minus23_in_gga(T19, T20))
U4_gga(minus23_out_gga(X41)) → minus23_out_gga(X41)

The set Q consists of the following terms:

minus16_in_gga(x0, x1)
U5_gga(x0)
minus23_in_gga(x0, x1)
U4_gga(x0)

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

(25) DependencyGraphProof (EQUIVALENT transformation)

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

(26) TRUE