(0) Obligation:

Clauses:

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

Query: div(g,g,a,a)

(1) PrologToPiTRSViaGraphTransformerProof (SOUND transformation)

Transformed Prolog program to (Pi-)TRS.

(2) Obligation:

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

divA_in_ggaa(0, T14, 0, 0) → divA_out_ggaa(0, T14, 0, 0)
divA_in_ggaa(s(T39), s(T40), s(T28), T29) → U1_ggaa(T39, T40, T28, T29, pB_in_ggaaa(T39, T40, X42, T28, T29))
pB_in_ggaaa(T39, T40, T43, T28, T29) → U4_ggaaa(T39, T40, T43, T28, T29, minusC_in_gga(T39, T40, T43))
minusC_in_gga(T50, 0, T50) → minusC_out_gga(T50, 0, T50)
minusC_in_gga(s(T55), s(T56), X63) → U2_gga(T55, T56, X63, minusC_in_gga(T55, T56, X63))
U2_gga(T55, T56, X63, minusC_out_gga(T55, T56, X63)) → minusC_out_gga(s(T55), s(T56), X63)
U4_ggaaa(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → U5_ggaaa(T39, T40, T43, T28, T29, pD_in_ggaa(T43, T40, T28, T29))
pD_in_ggaa(T43, T40, T28, T29) → U3_ggaa(T43, T40, T28, T29, divA_in_ggaa(T43, s(T40), T28, T29))
divA_in_ggaa(T64, T65, 0, T64) → divA_out_ggaa(T64, T65, 0, T64)
U3_ggaa(T43, T40, T28, T29, divA_out_ggaa(T43, s(T40), T28, T29)) → pD_out_ggaa(T43, T40, T28, T29)
U5_ggaaa(T39, T40, T43, T28, T29, pD_out_ggaa(T43, T40, T28, T29)) → pB_out_ggaaa(T39, T40, T43, T28, T29)
U1_ggaa(T39, T40, T28, T29, pB_out_ggaaa(T39, T40, X42, T28, T29)) → divA_out_ggaa(s(T39), s(T40), s(T28), T29)

The argument filtering Pi contains the following mapping:
divA_in_ggaa(x1, x2, x3, x4)  =  divA_in_ggaa(x1, x2)
0  =  0
divA_out_ggaa(x1, x2, x3, x4)  =  divA_out_ggaa(x1, x2, x3, x4)
s(x1)  =  s(x1)
U1_ggaa(x1, x2, x3, x4, x5)  =  U1_ggaa(x1, x2, x5)
pB_in_ggaaa(x1, x2, x3, x4, x5)  =  pB_in_ggaaa(x1, x2)
U4_ggaaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaa(x1, x2, x6)
minusC_in_gga(x1, x2, x3)  =  minusC_in_gga(x1, x2)
minusC_out_gga(x1, x2, x3)  =  minusC_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U5_ggaaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaaa(x1, x2, x3, x6)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U3_ggaa(x1, x2, x3, x4, x5)  =  U3_ggaa(x1, x2, x5)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
pB_out_ggaaa(x1, x2, x3, x4, x5)  =  pB_out_ggaaa(x1, x2, x3, x4, x5)

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

DIVA_IN_GGAA(s(T39), s(T40), s(T28), T29) → U1_GGAA(T39, T40, T28, T29, pB_in_ggaaa(T39, T40, X42, T28, T29))
DIVA_IN_GGAA(s(T39), s(T40), s(T28), T29) → PB_IN_GGAAA(T39, T40, X42, T28, T29)
PB_IN_GGAAA(T39, T40, T43, T28, T29) → U4_GGAAA(T39, T40, T43, T28, T29, minusC_in_gga(T39, T40, T43))
PB_IN_GGAAA(T39, T40, T43, T28, T29) → MINUSC_IN_GGA(T39, T40, T43)
MINUSC_IN_GGA(s(T55), s(T56), X63) → U2_GGA(T55, T56, X63, minusC_in_gga(T55, T56, X63))
MINUSC_IN_GGA(s(T55), s(T56), X63) → MINUSC_IN_GGA(T55, T56, X63)
U4_GGAAA(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → U5_GGAAA(T39, T40, T43, T28, T29, pD_in_ggaa(T43, T40, T28, T29))
U4_GGAAA(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → PD_IN_GGAA(T43, T40, T28, T29)
PD_IN_GGAA(T43, T40, T28, T29) → U3_GGAA(T43, T40, T28, T29, divA_in_ggaa(T43, s(T40), T28, T29))
PD_IN_GGAA(T43, T40, T28, T29) → DIVA_IN_GGAA(T43, s(T40), T28, T29)

The TRS R consists of the following rules:

divA_in_ggaa(0, T14, 0, 0) → divA_out_ggaa(0, T14, 0, 0)
divA_in_ggaa(s(T39), s(T40), s(T28), T29) → U1_ggaa(T39, T40, T28, T29, pB_in_ggaaa(T39, T40, X42, T28, T29))
pB_in_ggaaa(T39, T40, T43, T28, T29) → U4_ggaaa(T39, T40, T43, T28, T29, minusC_in_gga(T39, T40, T43))
minusC_in_gga(T50, 0, T50) → minusC_out_gga(T50, 0, T50)
minusC_in_gga(s(T55), s(T56), X63) → U2_gga(T55, T56, X63, minusC_in_gga(T55, T56, X63))
U2_gga(T55, T56, X63, minusC_out_gga(T55, T56, X63)) → minusC_out_gga(s(T55), s(T56), X63)
U4_ggaaa(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → U5_ggaaa(T39, T40, T43, T28, T29, pD_in_ggaa(T43, T40, T28, T29))
pD_in_ggaa(T43, T40, T28, T29) → U3_ggaa(T43, T40, T28, T29, divA_in_ggaa(T43, s(T40), T28, T29))
divA_in_ggaa(T64, T65, 0, T64) → divA_out_ggaa(T64, T65, 0, T64)
U3_ggaa(T43, T40, T28, T29, divA_out_ggaa(T43, s(T40), T28, T29)) → pD_out_ggaa(T43, T40, T28, T29)
U5_ggaaa(T39, T40, T43, T28, T29, pD_out_ggaa(T43, T40, T28, T29)) → pB_out_ggaaa(T39, T40, T43, T28, T29)
U1_ggaa(T39, T40, T28, T29, pB_out_ggaaa(T39, T40, X42, T28, T29)) → divA_out_ggaa(s(T39), s(T40), s(T28), T29)

The argument filtering Pi contains the following mapping:
divA_in_ggaa(x1, x2, x3, x4)  =  divA_in_ggaa(x1, x2)
0  =  0
divA_out_ggaa(x1, x2, x3, x4)  =  divA_out_ggaa(x1, x2, x3, x4)
s(x1)  =  s(x1)
U1_ggaa(x1, x2, x3, x4, x5)  =  U1_ggaa(x1, x2, x5)
pB_in_ggaaa(x1, x2, x3, x4, x5)  =  pB_in_ggaaa(x1, x2)
U4_ggaaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaa(x1, x2, x6)
minusC_in_gga(x1, x2, x3)  =  minusC_in_gga(x1, x2)
minusC_out_gga(x1, x2, x3)  =  minusC_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U5_ggaaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaaa(x1, x2, x3, x6)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U3_ggaa(x1, x2, x3, x4, x5)  =  U3_ggaa(x1, x2, x5)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
pB_out_ggaaa(x1, x2, x3, x4, x5)  =  pB_out_ggaaa(x1, x2, x3, x4, x5)
DIVA_IN_GGAA(x1, x2, x3, x4)  =  DIVA_IN_GGAA(x1, x2)
U1_GGAA(x1, x2, x3, x4, x5)  =  U1_GGAA(x1, x2, x5)
PB_IN_GGAAA(x1, x2, x3, x4, x5)  =  PB_IN_GGAAA(x1, x2)
U4_GGAAA(x1, x2, x3, x4, x5, x6)  =  U4_GGAAA(x1, x2, x6)
MINUSC_IN_GGA(x1, x2, x3)  =  MINUSC_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x1, x2, x4)
U5_GGAAA(x1, x2, x3, x4, x5, x6)  =  U5_GGAAA(x1, x2, x3, x6)
PD_IN_GGAA(x1, x2, x3, x4)  =  PD_IN_GGAA(x1, x2)
U3_GGAA(x1, x2, x3, x4, x5)  =  U3_GGAA(x1, x2, x5)

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

(4) Obligation:

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

DIVA_IN_GGAA(s(T39), s(T40), s(T28), T29) → U1_GGAA(T39, T40, T28, T29, pB_in_ggaaa(T39, T40, X42, T28, T29))
DIVA_IN_GGAA(s(T39), s(T40), s(T28), T29) → PB_IN_GGAAA(T39, T40, X42, T28, T29)
PB_IN_GGAAA(T39, T40, T43, T28, T29) → U4_GGAAA(T39, T40, T43, T28, T29, minusC_in_gga(T39, T40, T43))
PB_IN_GGAAA(T39, T40, T43, T28, T29) → MINUSC_IN_GGA(T39, T40, T43)
MINUSC_IN_GGA(s(T55), s(T56), X63) → U2_GGA(T55, T56, X63, minusC_in_gga(T55, T56, X63))
MINUSC_IN_GGA(s(T55), s(T56), X63) → MINUSC_IN_GGA(T55, T56, X63)
U4_GGAAA(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → U5_GGAAA(T39, T40, T43, T28, T29, pD_in_ggaa(T43, T40, T28, T29))
U4_GGAAA(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → PD_IN_GGAA(T43, T40, T28, T29)
PD_IN_GGAA(T43, T40, T28, T29) → U3_GGAA(T43, T40, T28, T29, divA_in_ggaa(T43, s(T40), T28, T29))
PD_IN_GGAA(T43, T40, T28, T29) → DIVA_IN_GGAA(T43, s(T40), T28, T29)

The TRS R consists of the following rules:

divA_in_ggaa(0, T14, 0, 0) → divA_out_ggaa(0, T14, 0, 0)
divA_in_ggaa(s(T39), s(T40), s(T28), T29) → U1_ggaa(T39, T40, T28, T29, pB_in_ggaaa(T39, T40, X42, T28, T29))
pB_in_ggaaa(T39, T40, T43, T28, T29) → U4_ggaaa(T39, T40, T43, T28, T29, minusC_in_gga(T39, T40, T43))
minusC_in_gga(T50, 0, T50) → minusC_out_gga(T50, 0, T50)
minusC_in_gga(s(T55), s(T56), X63) → U2_gga(T55, T56, X63, minusC_in_gga(T55, T56, X63))
U2_gga(T55, T56, X63, minusC_out_gga(T55, T56, X63)) → minusC_out_gga(s(T55), s(T56), X63)
U4_ggaaa(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → U5_ggaaa(T39, T40, T43, T28, T29, pD_in_ggaa(T43, T40, T28, T29))
pD_in_ggaa(T43, T40, T28, T29) → U3_ggaa(T43, T40, T28, T29, divA_in_ggaa(T43, s(T40), T28, T29))
divA_in_ggaa(T64, T65, 0, T64) → divA_out_ggaa(T64, T65, 0, T64)
U3_ggaa(T43, T40, T28, T29, divA_out_ggaa(T43, s(T40), T28, T29)) → pD_out_ggaa(T43, T40, T28, T29)
U5_ggaaa(T39, T40, T43, T28, T29, pD_out_ggaa(T43, T40, T28, T29)) → pB_out_ggaaa(T39, T40, T43, T28, T29)
U1_ggaa(T39, T40, T28, T29, pB_out_ggaaa(T39, T40, X42, T28, T29)) → divA_out_ggaa(s(T39), s(T40), s(T28), T29)

The argument filtering Pi contains the following mapping:
divA_in_ggaa(x1, x2, x3, x4)  =  divA_in_ggaa(x1, x2)
0  =  0
divA_out_ggaa(x1, x2, x3, x4)  =  divA_out_ggaa(x1, x2, x3, x4)
s(x1)  =  s(x1)
U1_ggaa(x1, x2, x3, x4, x5)  =  U1_ggaa(x1, x2, x5)
pB_in_ggaaa(x1, x2, x3, x4, x5)  =  pB_in_ggaaa(x1, x2)
U4_ggaaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaa(x1, x2, x6)
minusC_in_gga(x1, x2, x3)  =  minusC_in_gga(x1, x2)
minusC_out_gga(x1, x2, x3)  =  minusC_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U5_ggaaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaaa(x1, x2, x3, x6)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U3_ggaa(x1, x2, x3, x4, x5)  =  U3_ggaa(x1, x2, x5)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
pB_out_ggaaa(x1, x2, x3, x4, x5)  =  pB_out_ggaaa(x1, x2, x3, x4, x5)
DIVA_IN_GGAA(x1, x2, x3, x4)  =  DIVA_IN_GGAA(x1, x2)
U1_GGAA(x1, x2, x3, x4, x5)  =  U1_GGAA(x1, x2, x5)
PB_IN_GGAAA(x1, x2, x3, x4, x5)  =  PB_IN_GGAAA(x1, x2)
U4_GGAAA(x1, x2, x3, x4, x5, x6)  =  U4_GGAAA(x1, x2, x6)
MINUSC_IN_GGA(x1, x2, x3)  =  MINUSC_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x1, x2, x4)
U5_GGAAA(x1, x2, x3, x4, x5, x6)  =  U5_GGAAA(x1, x2, x3, x6)
PD_IN_GGAA(x1, x2, x3, x4)  =  PD_IN_GGAA(x1, x2)
U3_GGAA(x1, x2, x3, x4, x5)  =  U3_GGAA(x1, x2, x5)

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:

MINUSC_IN_GGA(s(T55), s(T56), X63) → MINUSC_IN_GGA(T55, T56, X63)

The TRS R consists of the following rules:

divA_in_ggaa(0, T14, 0, 0) → divA_out_ggaa(0, T14, 0, 0)
divA_in_ggaa(s(T39), s(T40), s(T28), T29) → U1_ggaa(T39, T40, T28, T29, pB_in_ggaaa(T39, T40, X42, T28, T29))
pB_in_ggaaa(T39, T40, T43, T28, T29) → U4_ggaaa(T39, T40, T43, T28, T29, minusC_in_gga(T39, T40, T43))
minusC_in_gga(T50, 0, T50) → minusC_out_gga(T50, 0, T50)
minusC_in_gga(s(T55), s(T56), X63) → U2_gga(T55, T56, X63, minusC_in_gga(T55, T56, X63))
U2_gga(T55, T56, X63, minusC_out_gga(T55, T56, X63)) → minusC_out_gga(s(T55), s(T56), X63)
U4_ggaaa(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → U5_ggaaa(T39, T40, T43, T28, T29, pD_in_ggaa(T43, T40, T28, T29))
pD_in_ggaa(T43, T40, T28, T29) → U3_ggaa(T43, T40, T28, T29, divA_in_ggaa(T43, s(T40), T28, T29))
divA_in_ggaa(T64, T65, 0, T64) → divA_out_ggaa(T64, T65, 0, T64)
U3_ggaa(T43, T40, T28, T29, divA_out_ggaa(T43, s(T40), T28, T29)) → pD_out_ggaa(T43, T40, T28, T29)
U5_ggaaa(T39, T40, T43, T28, T29, pD_out_ggaa(T43, T40, T28, T29)) → pB_out_ggaaa(T39, T40, T43, T28, T29)
U1_ggaa(T39, T40, T28, T29, pB_out_ggaaa(T39, T40, X42, T28, T29)) → divA_out_ggaa(s(T39), s(T40), s(T28), T29)

The argument filtering Pi contains the following mapping:
divA_in_ggaa(x1, x2, x3, x4)  =  divA_in_ggaa(x1, x2)
0  =  0
divA_out_ggaa(x1, x2, x3, x4)  =  divA_out_ggaa(x1, x2, x3, x4)
s(x1)  =  s(x1)
U1_ggaa(x1, x2, x3, x4, x5)  =  U1_ggaa(x1, x2, x5)
pB_in_ggaaa(x1, x2, x3, x4, x5)  =  pB_in_ggaaa(x1, x2)
U4_ggaaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaa(x1, x2, x6)
minusC_in_gga(x1, x2, x3)  =  minusC_in_gga(x1, x2)
minusC_out_gga(x1, x2, x3)  =  minusC_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U5_ggaaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaaa(x1, x2, x3, x6)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U3_ggaa(x1, x2, x3, x4, x5)  =  U3_ggaa(x1, x2, x5)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
pB_out_ggaaa(x1, x2, x3, x4, x5)  =  pB_out_ggaaa(x1, x2, x3, x4, x5)
MINUSC_IN_GGA(x1, x2, x3)  =  MINUSC_IN_GGA(x1, x2)

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:

MINUSC_IN_GGA(s(T55), s(T56), X63) → MINUSC_IN_GGA(T55, T56, X63)

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

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

(10) PiDPToQDPProof (SOUND 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:

MINUSC_IN_GGA(s(T55), s(T56)) → MINUSC_IN_GGA(T55, T56)

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:

  • MINUSC_IN_GGA(s(T55), s(T56)) → MINUSC_IN_GGA(T55, T56)
    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:

DIVA_IN_GGAA(s(T39), s(T40), s(T28), T29) → PB_IN_GGAAA(T39, T40, X42, T28, T29)
PB_IN_GGAAA(T39, T40, T43, T28, T29) → U4_GGAAA(T39, T40, T43, T28, T29, minusC_in_gga(T39, T40, T43))
U4_GGAAA(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → PD_IN_GGAA(T43, T40, T28, T29)
PD_IN_GGAA(T43, T40, T28, T29) → DIVA_IN_GGAA(T43, s(T40), T28, T29)

The TRS R consists of the following rules:

divA_in_ggaa(0, T14, 0, 0) → divA_out_ggaa(0, T14, 0, 0)
divA_in_ggaa(s(T39), s(T40), s(T28), T29) → U1_ggaa(T39, T40, T28, T29, pB_in_ggaaa(T39, T40, X42, T28, T29))
pB_in_ggaaa(T39, T40, T43, T28, T29) → U4_ggaaa(T39, T40, T43, T28, T29, minusC_in_gga(T39, T40, T43))
minusC_in_gga(T50, 0, T50) → minusC_out_gga(T50, 0, T50)
minusC_in_gga(s(T55), s(T56), X63) → U2_gga(T55, T56, X63, minusC_in_gga(T55, T56, X63))
U2_gga(T55, T56, X63, minusC_out_gga(T55, T56, X63)) → minusC_out_gga(s(T55), s(T56), X63)
U4_ggaaa(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → U5_ggaaa(T39, T40, T43, T28, T29, pD_in_ggaa(T43, T40, T28, T29))
pD_in_ggaa(T43, T40, T28, T29) → U3_ggaa(T43, T40, T28, T29, divA_in_ggaa(T43, s(T40), T28, T29))
divA_in_ggaa(T64, T65, 0, T64) → divA_out_ggaa(T64, T65, 0, T64)
U3_ggaa(T43, T40, T28, T29, divA_out_ggaa(T43, s(T40), T28, T29)) → pD_out_ggaa(T43, T40, T28, T29)
U5_ggaaa(T39, T40, T43, T28, T29, pD_out_ggaa(T43, T40, T28, T29)) → pB_out_ggaaa(T39, T40, T43, T28, T29)
U1_ggaa(T39, T40, T28, T29, pB_out_ggaaa(T39, T40, X42, T28, T29)) → divA_out_ggaa(s(T39), s(T40), s(T28), T29)

The argument filtering Pi contains the following mapping:
divA_in_ggaa(x1, x2, x3, x4)  =  divA_in_ggaa(x1, x2)
0  =  0
divA_out_ggaa(x1, x2, x3, x4)  =  divA_out_ggaa(x1, x2, x3, x4)
s(x1)  =  s(x1)
U1_ggaa(x1, x2, x3, x4, x5)  =  U1_ggaa(x1, x2, x5)
pB_in_ggaaa(x1, x2, x3, x4, x5)  =  pB_in_ggaaa(x1, x2)
U4_ggaaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaa(x1, x2, x6)
minusC_in_gga(x1, x2, x3)  =  minusC_in_gga(x1, x2)
minusC_out_gga(x1, x2, x3)  =  minusC_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U5_ggaaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaaa(x1, x2, x3, x6)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U3_ggaa(x1, x2, x3, x4, x5)  =  U3_ggaa(x1, x2, x5)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
pB_out_ggaaa(x1, x2, x3, x4, x5)  =  pB_out_ggaaa(x1, x2, x3, x4, x5)
DIVA_IN_GGAA(x1, x2, x3, x4)  =  DIVA_IN_GGAA(x1, x2)
PB_IN_GGAAA(x1, x2, x3, x4, x5)  =  PB_IN_GGAAA(x1, x2)
U4_GGAAA(x1, x2, x3, x4, x5, x6)  =  U4_GGAAA(x1, x2, x6)
PD_IN_GGAA(x1, x2, x3, x4)  =  PD_IN_GGAA(x1, x2)

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:

DIVA_IN_GGAA(s(T39), s(T40), s(T28), T29) → PB_IN_GGAAA(T39, T40, X42, T28, T29)
PB_IN_GGAAA(T39, T40, T43, T28, T29) → U4_GGAAA(T39, T40, T43, T28, T29, minusC_in_gga(T39, T40, T43))
U4_GGAAA(T39, T40, T43, T28, T29, minusC_out_gga(T39, T40, T43)) → PD_IN_GGAA(T43, T40, T28, T29)
PD_IN_GGAA(T43, T40, T28, T29) → DIVA_IN_GGAA(T43, s(T40), T28, T29)

The TRS R consists of the following rules:

minusC_in_gga(T50, 0, T50) → minusC_out_gga(T50, 0, T50)
minusC_in_gga(s(T55), s(T56), X63) → U2_gga(T55, T56, X63, minusC_in_gga(T55, T56, X63))
U2_gga(T55, T56, X63, minusC_out_gga(T55, T56, X63)) → minusC_out_gga(s(T55), s(T56), X63)

The argument filtering Pi contains the following mapping:
0  =  0
s(x1)  =  s(x1)
minusC_in_gga(x1, x2, x3)  =  minusC_in_gga(x1, x2)
minusC_out_gga(x1, x2, x3)  =  minusC_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
DIVA_IN_GGAA(x1, x2, x3, x4)  =  DIVA_IN_GGAA(x1, x2)
PB_IN_GGAAA(x1, x2, x3, x4, x5)  =  PB_IN_GGAAA(x1, x2)
U4_GGAAA(x1, x2, x3, x4, x5, x6)  =  U4_GGAAA(x1, x2, x6)
PD_IN_GGAA(x1, x2, x3, x4)  =  PD_IN_GGAA(x1, x2)

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

(17) PiDPToQDPProof (SOUND 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:

DIVA_IN_GGAA(s(T39), s(T40)) → PB_IN_GGAAA(T39, T40)
PB_IN_GGAAA(T39, T40) → U4_GGAAA(T39, T40, minusC_in_gga(T39, T40))
U4_GGAAA(T39, T40, minusC_out_gga(T39, T40, T43)) → PD_IN_GGAA(T43, T40)
PD_IN_GGAA(T43, T40) → DIVA_IN_GGAA(T43, s(T40))

The TRS R consists of the following rules:

minusC_in_gga(T50, 0) → minusC_out_gga(T50, 0, T50)
minusC_in_gga(s(T55), s(T56)) → U2_gga(T55, T56, minusC_in_gga(T55, T56))
U2_gga(T55, T56, minusC_out_gga(T55, T56, X63)) → minusC_out_gga(s(T55), s(T56), X63)

The set Q consists of the following terms:

minusC_in_gga(x0, x1)
U2_gga(x0, x1, x2)

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

(19) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


DIVA_IN_GGAA(s(T39), s(T40)) → PB_IN_GGAAA(T39, T40)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(DIVA_IN_GGAA(x1, x2)) = 1 + x1   
POL(PB_IN_GGAAA(x1, x2)) = 1 + x1   
POL(PD_IN_GGAA(x1, x2)) = 1 + x1   
POL(U2_gga(x1, x2, x3)) = x3   
POL(U4_GGAAA(x1, x2, x3)) = x3   
POL(minusC_in_gga(x1, x2)) = 1 + x1   
POL(minusC_out_gga(x1, x2, x3)) = 1 + x3   
POL(s(x1)) = 1 + x1   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

minusC_in_gga(T50, 0) → minusC_out_gga(T50, 0, T50)
minusC_in_gga(s(T55), s(T56)) → U2_gga(T55, T56, minusC_in_gga(T55, T56))
U2_gga(T55, T56, minusC_out_gga(T55, T56, X63)) → minusC_out_gga(s(T55), s(T56), X63)

(20) Obligation:

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

PB_IN_GGAAA(T39, T40) → U4_GGAAA(T39, T40, minusC_in_gga(T39, T40))
U4_GGAAA(T39, T40, minusC_out_gga(T39, T40, T43)) → PD_IN_GGAA(T43, T40)
PD_IN_GGAA(T43, T40) → DIVA_IN_GGAA(T43, s(T40))

The TRS R consists of the following rules:

minusC_in_gga(T50, 0) → minusC_out_gga(T50, 0, T50)
minusC_in_gga(s(T55), s(T56)) → U2_gga(T55, T56, minusC_in_gga(T55, T56))
U2_gga(T55, T56, minusC_out_gga(T55, T56, X63)) → minusC_out_gga(s(T55), s(T56), X63)

The set Q consists of the following terms:

minusC_in_gga(x0, x1)
U2_gga(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 3 less nodes.

(22) TRUE