(0) Obligation:

Clauses:

div(X, Y, Z) :- quot(X, Y, Y, Z).
quot(0, s(Y), s(Z), R) :- ','(!, eq(R, 0)).
quot(X, 0, Z, U) :- ','(!, ','(eq(Z, s(X1)), ','(p(U, P), quot(X, Z, Z, P)))).
quot(s(X), Y, Z, U) :- ','(p(Y, P), quot(X, P, Z, U)).
p(0, 0).
p(s(X), X).
eq(X, X).

Queries:

div(g,g,a).

(1) CutEliminatorProof (SOUND transformation)

Eliminated all cuts by simply ignoring them[PROLOG].

(2) Obligation:

Clauses:

div(X, Y, Z) :- quot(X, Y, Y, Z).
quot(0, s(Y), s(Z), R) :- eq(R, 0).
quot(X, 0, Z, U) :- ','(eq(Z, s(X1)), ','(p(U, P), quot(X, Z, Z, P))).
quot(s(X), Y, Z, U) :- ','(p(Y, P), quot(X, P, Z, U)).
p(0, 0).
p(s(X), X).
eq(X, X).

Queries:

div(g,g,a).

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

div_in_gga(X, Y, Z) → U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
quot_in_ggga(0, s(Y), s(Z), R) → U2_ggga(Y, Z, R, eq_in_ag(R, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U2_ggga(Y, Z, R, eq_out_ag(R, 0)) → quot_out_ggga(0, s(Y), s(Z), R)
quot_in_ggga(X, 0, Z, U) → U3_ggga(X, Z, U, eq_in_ga(Z, s(X1)))
eq_in_ga(X, X) → eq_out_ga(X, X)
U3_ggga(X, Z, U, eq_out_ga(Z, s(X1))) → U4_ggga(X, Z, U, p_in_aa(U, P))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U4_ggga(X, Z, U, p_out_aa(U, P)) → U5_ggga(X, Z, U, quot_in_ggga(X, Z, Z, P))
quot_in_ggga(s(X), Y, Z, U) → U6_ggga(X, Y, Z, U, p_in_ga(Y, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U6_ggga(X, Y, Z, U, p_out_ga(Y, P)) → U7_ggga(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U7_ggga(X, Y, Z, U, quot_out_ggga(X, P, Z, U)) → quot_out_ggga(s(X), Y, Z, U)
U5_ggga(X, Z, U, quot_out_ggga(X, Z, Z, P)) → quot_out_ggga(X, 0, Z, U)
U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) → div_out_gga(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
quot_in_ggga(x1, x2, x3, x4)  =  quot_in_ggga(x1, x2, x3)
0  =  0
s(x1)  =  s(x1)
U2_ggga(x1, x2, x3, x4)  =  U2_ggga(x1, x2, x4)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
quot_out_ggga(x1, x2, x3, x4)  =  quot_out_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4)  =  U3_ggga(x1, x2, x4)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
U4_ggga(x1, x2, x3, x4)  =  U4_ggga(x1, x2, x4)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x1, x2, x3, x5)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
U7_ggga(x1, x2, x3, x4, x5)  =  U7_ggga(x1, x2, x3, x5)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

div_in_gga(X, Y, Z) → U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
quot_in_ggga(0, s(Y), s(Z), R) → U2_ggga(Y, Z, R, eq_in_ag(R, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U2_ggga(Y, Z, R, eq_out_ag(R, 0)) → quot_out_ggga(0, s(Y), s(Z), R)
quot_in_ggga(X, 0, Z, U) → U3_ggga(X, Z, U, eq_in_ga(Z, s(X1)))
eq_in_ga(X, X) → eq_out_ga(X, X)
U3_ggga(X, Z, U, eq_out_ga(Z, s(X1))) → U4_ggga(X, Z, U, p_in_aa(U, P))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U4_ggga(X, Z, U, p_out_aa(U, P)) → U5_ggga(X, Z, U, quot_in_ggga(X, Z, Z, P))
quot_in_ggga(s(X), Y, Z, U) → U6_ggga(X, Y, Z, U, p_in_ga(Y, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U6_ggga(X, Y, Z, U, p_out_ga(Y, P)) → U7_ggga(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U7_ggga(X, Y, Z, U, quot_out_ggga(X, P, Z, U)) → quot_out_ggga(s(X), Y, Z, U)
U5_ggga(X, Z, U, quot_out_ggga(X, Z, Z, P)) → quot_out_ggga(X, 0, Z, U)
U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) → div_out_gga(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
quot_in_ggga(x1, x2, x3, x4)  =  quot_in_ggga(x1, x2, x3)
0  =  0
s(x1)  =  s(x1)
U2_ggga(x1, x2, x3, x4)  =  U2_ggga(x1, x2, x4)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
quot_out_ggga(x1, x2, x3, x4)  =  quot_out_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4)  =  U3_ggga(x1, x2, x4)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
U4_ggga(x1, x2, x3, x4)  =  U4_ggga(x1, x2, x4)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x1, x2, x3, x5)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
U7_ggga(x1, x2, x3, x4, x5)  =  U7_ggga(x1, x2, x3, x5)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2)

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

DIV_IN_GGA(X, Y, Z) → U1_GGA(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
DIV_IN_GGA(X, Y, Z) → QUOT_IN_GGGA(X, Y, Y, Z)
QUOT_IN_GGGA(0, s(Y), s(Z), R) → U2_GGGA(Y, Z, R, eq_in_ag(R, 0))
QUOT_IN_GGGA(0, s(Y), s(Z), R) → EQ_IN_AG(R, 0)
QUOT_IN_GGGA(X, 0, Z, U) → U3_GGGA(X, Z, U, eq_in_ga(Z, s(X1)))
QUOT_IN_GGGA(X, 0, Z, U) → EQ_IN_GA(Z, s(X1))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, U, p_in_aa(U, P))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → P_IN_AA(U, P)
U4_GGGA(X, Z, U, p_out_aa(U, P)) → U5_GGGA(X, Z, U, quot_in_ggga(X, Z, Z, P))
U4_GGGA(X, Z, U, p_out_aa(U, P)) → QUOT_IN_GGGA(X, Z, Z, P)
QUOT_IN_GGGA(s(X), Y, Z, U) → U6_GGGA(X, Y, Z, U, p_in_ga(Y, P))
QUOT_IN_GGGA(s(X), Y, Z, U) → P_IN_GA(Y, P)
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → U7_GGGA(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → QUOT_IN_GGGA(X, P, Z, U)

The TRS R consists of the following rules:

div_in_gga(X, Y, Z) → U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
quot_in_ggga(0, s(Y), s(Z), R) → U2_ggga(Y, Z, R, eq_in_ag(R, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U2_ggga(Y, Z, R, eq_out_ag(R, 0)) → quot_out_ggga(0, s(Y), s(Z), R)
quot_in_ggga(X, 0, Z, U) → U3_ggga(X, Z, U, eq_in_ga(Z, s(X1)))
eq_in_ga(X, X) → eq_out_ga(X, X)
U3_ggga(X, Z, U, eq_out_ga(Z, s(X1))) → U4_ggga(X, Z, U, p_in_aa(U, P))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U4_ggga(X, Z, U, p_out_aa(U, P)) → U5_ggga(X, Z, U, quot_in_ggga(X, Z, Z, P))
quot_in_ggga(s(X), Y, Z, U) → U6_ggga(X, Y, Z, U, p_in_ga(Y, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U6_ggga(X, Y, Z, U, p_out_ga(Y, P)) → U7_ggga(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U7_ggga(X, Y, Z, U, quot_out_ggga(X, P, Z, U)) → quot_out_ggga(s(X), Y, Z, U)
U5_ggga(X, Z, U, quot_out_ggga(X, Z, Z, P)) → quot_out_ggga(X, 0, Z, U)
U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) → div_out_gga(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
quot_in_ggga(x1, x2, x3, x4)  =  quot_in_ggga(x1, x2, x3)
0  =  0
s(x1)  =  s(x1)
U2_ggga(x1, x2, x3, x4)  =  U2_ggga(x1, x2, x4)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
quot_out_ggga(x1, x2, x3, x4)  =  quot_out_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4)  =  U3_ggga(x1, x2, x4)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
U4_ggga(x1, x2, x3, x4)  =  U4_ggga(x1, x2, x4)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x1, x2, x3, x5)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
U7_ggga(x1, x2, x3, x4, x5)  =  U7_ggga(x1, x2, x3, x5)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x1, x2, x4)
QUOT_IN_GGGA(x1, x2, x3, x4)  =  QUOT_IN_GGGA(x1, x2, x3)
U2_GGGA(x1, x2, x3, x4)  =  U2_GGGA(x1, x2, x4)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U3_GGGA(x1, x2, x3, x4)  =  U3_GGGA(x1, x2, x4)
EQ_IN_GA(x1, x2)  =  EQ_IN_GA(x1)
U4_GGGA(x1, x2, x3, x4)  =  U4_GGGA(x1, x2, x4)
P_IN_AA(x1, x2)  =  P_IN_AA
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x1, x2, x4)
U6_GGGA(x1, x2, x3, x4, x5)  =  U6_GGGA(x1, x2, x3, x5)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U7_GGGA(x1, x2, x3, x4, x5)  =  U7_GGGA(x1, x2, x3, x5)

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

(6) Obligation:

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

DIV_IN_GGA(X, Y, Z) → U1_GGA(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
DIV_IN_GGA(X, Y, Z) → QUOT_IN_GGGA(X, Y, Y, Z)
QUOT_IN_GGGA(0, s(Y), s(Z), R) → U2_GGGA(Y, Z, R, eq_in_ag(R, 0))
QUOT_IN_GGGA(0, s(Y), s(Z), R) → EQ_IN_AG(R, 0)
QUOT_IN_GGGA(X, 0, Z, U) → U3_GGGA(X, Z, U, eq_in_ga(Z, s(X1)))
QUOT_IN_GGGA(X, 0, Z, U) → EQ_IN_GA(Z, s(X1))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, U, p_in_aa(U, P))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → P_IN_AA(U, P)
U4_GGGA(X, Z, U, p_out_aa(U, P)) → U5_GGGA(X, Z, U, quot_in_ggga(X, Z, Z, P))
U4_GGGA(X, Z, U, p_out_aa(U, P)) → QUOT_IN_GGGA(X, Z, Z, P)
QUOT_IN_GGGA(s(X), Y, Z, U) → U6_GGGA(X, Y, Z, U, p_in_ga(Y, P))
QUOT_IN_GGGA(s(X), Y, Z, U) → P_IN_GA(Y, P)
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → U7_GGGA(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → QUOT_IN_GGGA(X, P, Z, U)

The TRS R consists of the following rules:

div_in_gga(X, Y, Z) → U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
quot_in_ggga(0, s(Y), s(Z), R) → U2_ggga(Y, Z, R, eq_in_ag(R, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U2_ggga(Y, Z, R, eq_out_ag(R, 0)) → quot_out_ggga(0, s(Y), s(Z), R)
quot_in_ggga(X, 0, Z, U) → U3_ggga(X, Z, U, eq_in_ga(Z, s(X1)))
eq_in_ga(X, X) → eq_out_ga(X, X)
U3_ggga(X, Z, U, eq_out_ga(Z, s(X1))) → U4_ggga(X, Z, U, p_in_aa(U, P))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U4_ggga(X, Z, U, p_out_aa(U, P)) → U5_ggga(X, Z, U, quot_in_ggga(X, Z, Z, P))
quot_in_ggga(s(X), Y, Z, U) → U6_ggga(X, Y, Z, U, p_in_ga(Y, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U6_ggga(X, Y, Z, U, p_out_ga(Y, P)) → U7_ggga(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U7_ggga(X, Y, Z, U, quot_out_ggga(X, P, Z, U)) → quot_out_ggga(s(X), Y, Z, U)
U5_ggga(X, Z, U, quot_out_ggga(X, Z, Z, P)) → quot_out_ggga(X, 0, Z, U)
U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) → div_out_gga(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
quot_in_ggga(x1, x2, x3, x4)  =  quot_in_ggga(x1, x2, x3)
0  =  0
s(x1)  =  s(x1)
U2_ggga(x1, x2, x3, x4)  =  U2_ggga(x1, x2, x4)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
quot_out_ggga(x1, x2, x3, x4)  =  quot_out_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4)  =  U3_ggga(x1, x2, x4)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
U4_ggga(x1, x2, x3, x4)  =  U4_ggga(x1, x2, x4)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x1, x2, x3, x5)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
U7_ggga(x1, x2, x3, x4, x5)  =  U7_ggga(x1, x2, x3, x5)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x1, x2, x4)
QUOT_IN_GGGA(x1, x2, x3, x4)  =  QUOT_IN_GGGA(x1, x2, x3)
U2_GGGA(x1, x2, x3, x4)  =  U2_GGGA(x1, x2, x4)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U3_GGGA(x1, x2, x3, x4)  =  U3_GGGA(x1, x2, x4)
EQ_IN_GA(x1, x2)  =  EQ_IN_GA(x1)
U4_GGGA(x1, x2, x3, x4)  =  U4_GGGA(x1, x2, x4)
P_IN_AA(x1, x2)  =  P_IN_AA
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x1, x2, x4)
U6_GGGA(x1, x2, x3, x4, x5)  =  U6_GGGA(x1, x2, x3, x5)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U7_GGGA(x1, x2, x3, x4, x5)  =  U7_GGGA(x1, x2, x3, x5)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 9 less nodes.

(8) Obligation:

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

QUOT_IN_GGGA(X, 0, Z, U) → U3_GGGA(X, Z, U, eq_in_ga(Z, s(X1)))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, U, p_in_aa(U, P))
U4_GGGA(X, Z, U, p_out_aa(U, P)) → QUOT_IN_GGGA(X, Z, Z, P)
QUOT_IN_GGGA(s(X), Y, Z, U) → U6_GGGA(X, Y, Z, U, p_in_ga(Y, P))
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → QUOT_IN_GGGA(X, P, Z, U)

The TRS R consists of the following rules:

div_in_gga(X, Y, Z) → U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
quot_in_ggga(0, s(Y), s(Z), R) → U2_ggga(Y, Z, R, eq_in_ag(R, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U2_ggga(Y, Z, R, eq_out_ag(R, 0)) → quot_out_ggga(0, s(Y), s(Z), R)
quot_in_ggga(X, 0, Z, U) → U3_ggga(X, Z, U, eq_in_ga(Z, s(X1)))
eq_in_ga(X, X) → eq_out_ga(X, X)
U3_ggga(X, Z, U, eq_out_ga(Z, s(X1))) → U4_ggga(X, Z, U, p_in_aa(U, P))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U4_ggga(X, Z, U, p_out_aa(U, P)) → U5_ggga(X, Z, U, quot_in_ggga(X, Z, Z, P))
quot_in_ggga(s(X), Y, Z, U) → U6_ggga(X, Y, Z, U, p_in_ga(Y, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U6_ggga(X, Y, Z, U, p_out_ga(Y, P)) → U7_ggga(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U7_ggga(X, Y, Z, U, quot_out_ggga(X, P, Z, U)) → quot_out_ggga(s(X), Y, Z, U)
U5_ggga(X, Z, U, quot_out_ggga(X, Z, Z, P)) → quot_out_ggga(X, 0, Z, U)
U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) → div_out_gga(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
quot_in_ggga(x1, x2, x3, x4)  =  quot_in_ggga(x1, x2, x3)
0  =  0
s(x1)  =  s(x1)
U2_ggga(x1, x2, x3, x4)  =  U2_ggga(x1, x2, x4)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
quot_out_ggga(x1, x2, x3, x4)  =  quot_out_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4)  =  U3_ggga(x1, x2, x4)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
U4_ggga(x1, x2, x3, x4)  =  U4_ggga(x1, x2, x4)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x1, x2, x3, x5)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
U7_ggga(x1, x2, x3, x4, x5)  =  U7_ggga(x1, x2, x3, x5)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2)
QUOT_IN_GGGA(x1, x2, x3, x4)  =  QUOT_IN_GGGA(x1, x2, x3)
U3_GGGA(x1, x2, x3, x4)  =  U3_GGGA(x1, x2, x4)
U4_GGGA(x1, x2, x3, x4)  =  U4_GGGA(x1, x2, x4)
U6_GGGA(x1, x2, x3, x4, x5)  =  U6_GGGA(x1, x2, x3, x5)

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

(9) UsableRulesProof (EQUIVALENT transformation)

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

(10) Obligation:

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

QUOT_IN_GGGA(X, 0, Z, U) → U3_GGGA(X, Z, U, eq_in_ga(Z, s(X1)))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, U, p_in_aa(U, P))
U4_GGGA(X, Z, U, p_out_aa(U, P)) → QUOT_IN_GGGA(X, Z, Z, P)
QUOT_IN_GGGA(s(X), Y, Z, U) → U6_GGGA(X, Y, Z, U, p_in_ga(Y, P))
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → QUOT_IN_GGGA(X, P, Z, U)

The TRS R consists of the following rules:

eq_in_ga(X, X) → eq_out_ga(X, X)
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)

The argument filtering Pi contains the following mapping:
0  =  0
s(x1)  =  s(x1)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
QUOT_IN_GGGA(x1, x2, x3, x4)  =  QUOT_IN_GGGA(x1, x2, x3)
U3_GGGA(x1, x2, x3, x4)  =  U3_GGGA(x1, x2, x4)
U4_GGGA(x1, x2, x3, x4)  =  U4_GGGA(x1, x2, x4)
U6_GGGA(x1, x2, x3, x4, x5)  =  U6_GGGA(x1, x2, x3, x5)

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

(11) PiDPToQDPProof (SOUND transformation)

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

(12) Obligation:

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

QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))
U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(s(X), Y, Z) → U6_GGGA(X, Y, Z, p_in_ga(Y))
U6_GGGA(X, Y, Z, p_out_ga(Y, P)) → QUOT_IN_GGGA(X, P, Z)

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X, X)
p_in_aap_out_aa
p_in_ga(0) → p_out_ga(0, 0)
p_in_ga(s(X)) → p_out_ga(s(X), X)

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa
p_in_ga(x0)

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

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


QUOT_IN_GGGA(s(X), Y, Z) → U6_GGGA(X, Y, Z, p_in_ga(Y))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(QUOT_IN_GGGA(x1, x2, x3)) = x1   
POL(U3_GGGA(x1, x2, x3)) = x1   
POL(U4_GGGA(x1, x2, x3)) = x1   
POL(U6_GGGA(x1, x2, x3, x4)) = x1   
POL(eq_in_ga(x1)) = 0   
POL(eq_out_ga(x1, x2)) = 0   
POL(p_in_aa) = 0   
POL(p_in_ga(x1)) = 0   
POL(p_out_aa) = 0   
POL(p_out_ga(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   

The following usable rules [FROCOS05] were oriented: none

(14) Obligation:

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

QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))
U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
U6_GGGA(X, Y, Z, p_out_ga(Y, P)) → QUOT_IN_GGGA(X, P, Z)

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X, X)
p_in_aap_out_aa
p_in_ga(0) → p_out_ga(0, 0)
p_in_ga(s(X)) → p_out_ga(s(X), X)

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa
p_in_ga(x0)

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

(15) DependencyGraphProof (EQUIVALENT transformation)

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

(16) Obligation:

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

U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X, X)
p_in_aap_out_aa
p_in_ga(0) → p_out_ga(0, 0)
p_in_ga(s(X)) → p_out_ga(s(X), X)

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa
p_in_ga(x0)

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

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

(18) Obligation:

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

U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X, X)
p_in_aap_out_aa

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa
p_in_ga(x0)

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

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

p_in_ga(x0)

(20) Obligation:

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

U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X, X)
p_in_aap_out_aa

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa

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

(21) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z)) we obtained the following new rules [LPAR04]:

QUOT_IN_GGGA(z0, 0, 0) → U3_GGGA(z0, 0, eq_in_ga(0))

(22) Obligation:

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

U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(z0, 0, 0) → U3_GGGA(z0, 0, eq_in_ga(0))

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X, X)
p_in_aap_out_aa

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa

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

(23) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_in_aa) at position [2] we obtained the following new rules [LPAR04]:

U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_out_aa)

(24) Obligation:

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

U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))
U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_out_aa)

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X, X)
p_in_aap_out_aa

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa

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

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

(26) Obligation:

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

U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))
U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_out_aa)

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X, X)

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa

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

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

p_in_aa

(28) Obligation:

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

U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))
U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_out_aa)

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X, X)

The set Q consists of the following terms:

eq_in_ga(x0)

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

(29) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z)) at position [2] we obtained the following new rules [LPAR04]:

QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_out_ga(Z, Z))

(30) Obligation:

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

U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_out_aa)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_out_ga(Z, Z))

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X, X)

The set Q consists of the following terms:

eq_in_ga(x0)

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

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

(32) Obligation:

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

U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_out_aa)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_out_ga(Z, Z))

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

eq_in_ga(x0)

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

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

eq_in_ga(x0)

(34) Obligation:

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

U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_out_aa)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_out_ga(Z, Z))

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

(35) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U3_GGGA(X, Z, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, p_out_aa) we obtained the following new rules [LPAR04]:

U3_GGGA(z0, s(x2), eq_out_ga(s(x2), s(x2))) → U4_GGGA(z0, s(x2), p_out_aa)

(36) Obligation:

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

U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_out_ga(Z, Z))
U3_GGGA(z0, s(x2), eq_out_ga(s(x2), s(x2))) → U4_GGGA(z0, s(x2), p_out_aa)

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

(37) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z) we obtained the following new rules [LPAR04]:

U4_GGGA(z0, s(z1), p_out_aa) → QUOT_IN_GGGA(z0, s(z1), s(z1))

(38) Obligation:

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

QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_out_ga(Z, Z))
U3_GGGA(z0, s(x2), eq_out_ga(s(x2), s(x2))) → U4_GGGA(z0, s(x2), p_out_aa)
U4_GGGA(z0, s(z1), p_out_aa) → QUOT_IN_GGGA(z0, s(z1), s(z1))

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

(39) DependencyGraphProof (EQUIVALENT transformation)

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

(40) TRUE

(41) PrologToPiTRSProof (SOUND transformation)

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

div_in_gga(X, Y, Z) → U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
quot_in_ggga(0, s(Y), s(Z), R) → U2_ggga(Y, Z, R, eq_in_ag(R, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U2_ggga(Y, Z, R, eq_out_ag(R, 0)) → quot_out_ggga(0, s(Y), s(Z), R)
quot_in_ggga(X, 0, Z, U) → U3_ggga(X, Z, U, eq_in_ga(Z, s(X1)))
eq_in_ga(X, X) → eq_out_ga(X, X)
U3_ggga(X, Z, U, eq_out_ga(Z, s(X1))) → U4_ggga(X, Z, U, p_in_aa(U, P))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U4_ggga(X, Z, U, p_out_aa(U, P)) → U5_ggga(X, Z, U, quot_in_ggga(X, Z, Z, P))
quot_in_ggga(s(X), Y, Z, U) → U6_ggga(X, Y, Z, U, p_in_ga(Y, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U6_ggga(X, Y, Z, U, p_out_ga(Y, P)) → U7_ggga(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U7_ggga(X, Y, Z, U, quot_out_ggga(X, P, Z, U)) → quot_out_ggga(s(X), Y, Z, U)
U5_ggga(X, Z, U, quot_out_ggga(X, Z, Z, P)) → quot_out_ggga(X, 0, Z, U)
U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) → div_out_gga(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
quot_in_ggga(x1, x2, x3, x4)  =  quot_in_ggga(x1, x2, x3)
0  =  0
s(x1)  =  s(x1)
U2_ggga(x1, x2, x3, x4)  =  U2_ggga(x4)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
quot_out_ggga(x1, x2, x3, x4)  =  quot_out_ggga
U3_ggga(x1, x2, x3, x4)  =  U3_ggga(x1, x2, x4)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
U4_ggga(x1, x2, x3, x4)  =  U4_ggga(x1, x2, x4)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x4)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x1, x3, x5)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
U7_ggga(x1, x2, x3, x4, x5)  =  U7_ggga(x5)
div_out_gga(x1, x2, x3)  =  div_out_gga

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(42) Obligation:

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

div_in_gga(X, Y, Z) → U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
quot_in_ggga(0, s(Y), s(Z), R) → U2_ggga(Y, Z, R, eq_in_ag(R, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U2_ggga(Y, Z, R, eq_out_ag(R, 0)) → quot_out_ggga(0, s(Y), s(Z), R)
quot_in_ggga(X, 0, Z, U) → U3_ggga(X, Z, U, eq_in_ga(Z, s(X1)))
eq_in_ga(X, X) → eq_out_ga(X, X)
U3_ggga(X, Z, U, eq_out_ga(Z, s(X1))) → U4_ggga(X, Z, U, p_in_aa(U, P))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U4_ggga(X, Z, U, p_out_aa(U, P)) → U5_ggga(X, Z, U, quot_in_ggga(X, Z, Z, P))
quot_in_ggga(s(X), Y, Z, U) → U6_ggga(X, Y, Z, U, p_in_ga(Y, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U6_ggga(X, Y, Z, U, p_out_ga(Y, P)) → U7_ggga(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U7_ggga(X, Y, Z, U, quot_out_ggga(X, P, Z, U)) → quot_out_ggga(s(X), Y, Z, U)
U5_ggga(X, Z, U, quot_out_ggga(X, Z, Z, P)) → quot_out_ggga(X, 0, Z, U)
U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) → div_out_gga(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
quot_in_ggga(x1, x2, x3, x4)  =  quot_in_ggga(x1, x2, x3)
0  =  0
s(x1)  =  s(x1)
U2_ggga(x1, x2, x3, x4)  =  U2_ggga(x4)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
quot_out_ggga(x1, x2, x3, x4)  =  quot_out_ggga
U3_ggga(x1, x2, x3, x4)  =  U3_ggga(x1, x2, x4)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
U4_ggga(x1, x2, x3, x4)  =  U4_ggga(x1, x2, x4)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x4)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x1, x3, x5)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
U7_ggga(x1, x2, x3, x4, x5)  =  U7_ggga(x5)
div_out_gga(x1, x2, x3)  =  div_out_gga

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

DIV_IN_GGA(X, Y, Z) → U1_GGA(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
DIV_IN_GGA(X, Y, Z) → QUOT_IN_GGGA(X, Y, Y, Z)
QUOT_IN_GGGA(0, s(Y), s(Z), R) → U2_GGGA(Y, Z, R, eq_in_ag(R, 0))
QUOT_IN_GGGA(0, s(Y), s(Z), R) → EQ_IN_AG(R, 0)
QUOT_IN_GGGA(X, 0, Z, U) → U3_GGGA(X, Z, U, eq_in_ga(Z, s(X1)))
QUOT_IN_GGGA(X, 0, Z, U) → EQ_IN_GA(Z, s(X1))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, U, p_in_aa(U, P))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → P_IN_AA(U, P)
U4_GGGA(X, Z, U, p_out_aa(U, P)) → U5_GGGA(X, Z, U, quot_in_ggga(X, Z, Z, P))
U4_GGGA(X, Z, U, p_out_aa(U, P)) → QUOT_IN_GGGA(X, Z, Z, P)
QUOT_IN_GGGA(s(X), Y, Z, U) → U6_GGGA(X, Y, Z, U, p_in_ga(Y, P))
QUOT_IN_GGGA(s(X), Y, Z, U) → P_IN_GA(Y, P)
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → U7_GGGA(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → QUOT_IN_GGGA(X, P, Z, U)

The TRS R consists of the following rules:

div_in_gga(X, Y, Z) → U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
quot_in_ggga(0, s(Y), s(Z), R) → U2_ggga(Y, Z, R, eq_in_ag(R, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U2_ggga(Y, Z, R, eq_out_ag(R, 0)) → quot_out_ggga(0, s(Y), s(Z), R)
quot_in_ggga(X, 0, Z, U) → U3_ggga(X, Z, U, eq_in_ga(Z, s(X1)))
eq_in_ga(X, X) → eq_out_ga(X, X)
U3_ggga(X, Z, U, eq_out_ga(Z, s(X1))) → U4_ggga(X, Z, U, p_in_aa(U, P))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U4_ggga(X, Z, U, p_out_aa(U, P)) → U5_ggga(X, Z, U, quot_in_ggga(X, Z, Z, P))
quot_in_ggga(s(X), Y, Z, U) → U6_ggga(X, Y, Z, U, p_in_ga(Y, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U6_ggga(X, Y, Z, U, p_out_ga(Y, P)) → U7_ggga(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U7_ggga(X, Y, Z, U, quot_out_ggga(X, P, Z, U)) → quot_out_ggga(s(X), Y, Z, U)
U5_ggga(X, Z, U, quot_out_ggga(X, Z, Z, P)) → quot_out_ggga(X, 0, Z, U)
U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) → div_out_gga(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
quot_in_ggga(x1, x2, x3, x4)  =  quot_in_ggga(x1, x2, x3)
0  =  0
s(x1)  =  s(x1)
U2_ggga(x1, x2, x3, x4)  =  U2_ggga(x4)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
quot_out_ggga(x1, x2, x3, x4)  =  quot_out_ggga
U3_ggga(x1, x2, x3, x4)  =  U3_ggga(x1, x2, x4)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
U4_ggga(x1, x2, x3, x4)  =  U4_ggga(x1, x2, x4)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x4)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x1, x3, x5)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
U7_ggga(x1, x2, x3, x4, x5)  =  U7_ggga(x5)
div_out_gga(x1, x2, x3)  =  div_out_gga
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x4)
QUOT_IN_GGGA(x1, x2, x3, x4)  =  QUOT_IN_GGGA(x1, x2, x3)
U2_GGGA(x1, x2, x3, x4)  =  U2_GGGA(x4)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U3_GGGA(x1, x2, x3, x4)  =  U3_GGGA(x1, x2, x4)
EQ_IN_GA(x1, x2)  =  EQ_IN_GA(x1)
U4_GGGA(x1, x2, x3, x4)  =  U4_GGGA(x1, x2, x4)
P_IN_AA(x1, x2)  =  P_IN_AA
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x4)
U6_GGGA(x1, x2, x3, x4, x5)  =  U6_GGGA(x1, x3, x5)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U7_GGGA(x1, x2, x3, x4, x5)  =  U7_GGGA(x5)

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

(44) Obligation:

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

DIV_IN_GGA(X, Y, Z) → U1_GGA(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
DIV_IN_GGA(X, Y, Z) → QUOT_IN_GGGA(X, Y, Y, Z)
QUOT_IN_GGGA(0, s(Y), s(Z), R) → U2_GGGA(Y, Z, R, eq_in_ag(R, 0))
QUOT_IN_GGGA(0, s(Y), s(Z), R) → EQ_IN_AG(R, 0)
QUOT_IN_GGGA(X, 0, Z, U) → U3_GGGA(X, Z, U, eq_in_ga(Z, s(X1)))
QUOT_IN_GGGA(X, 0, Z, U) → EQ_IN_GA(Z, s(X1))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, U, p_in_aa(U, P))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → P_IN_AA(U, P)
U4_GGGA(X, Z, U, p_out_aa(U, P)) → U5_GGGA(X, Z, U, quot_in_ggga(X, Z, Z, P))
U4_GGGA(X, Z, U, p_out_aa(U, P)) → QUOT_IN_GGGA(X, Z, Z, P)
QUOT_IN_GGGA(s(X), Y, Z, U) → U6_GGGA(X, Y, Z, U, p_in_ga(Y, P))
QUOT_IN_GGGA(s(X), Y, Z, U) → P_IN_GA(Y, P)
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → U7_GGGA(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → QUOT_IN_GGGA(X, P, Z, U)

The TRS R consists of the following rules:

div_in_gga(X, Y, Z) → U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
quot_in_ggga(0, s(Y), s(Z), R) → U2_ggga(Y, Z, R, eq_in_ag(R, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U2_ggga(Y, Z, R, eq_out_ag(R, 0)) → quot_out_ggga(0, s(Y), s(Z), R)
quot_in_ggga(X, 0, Z, U) → U3_ggga(X, Z, U, eq_in_ga(Z, s(X1)))
eq_in_ga(X, X) → eq_out_ga(X, X)
U3_ggga(X, Z, U, eq_out_ga(Z, s(X1))) → U4_ggga(X, Z, U, p_in_aa(U, P))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U4_ggga(X, Z, U, p_out_aa(U, P)) → U5_ggga(X, Z, U, quot_in_ggga(X, Z, Z, P))
quot_in_ggga(s(X), Y, Z, U) → U6_ggga(X, Y, Z, U, p_in_ga(Y, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U6_ggga(X, Y, Z, U, p_out_ga(Y, P)) → U7_ggga(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U7_ggga(X, Y, Z, U, quot_out_ggga(X, P, Z, U)) → quot_out_ggga(s(X), Y, Z, U)
U5_ggga(X, Z, U, quot_out_ggga(X, Z, Z, P)) → quot_out_ggga(X, 0, Z, U)
U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) → div_out_gga(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
quot_in_ggga(x1, x2, x3, x4)  =  quot_in_ggga(x1, x2, x3)
0  =  0
s(x1)  =  s(x1)
U2_ggga(x1, x2, x3, x4)  =  U2_ggga(x4)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
quot_out_ggga(x1, x2, x3, x4)  =  quot_out_ggga
U3_ggga(x1, x2, x3, x4)  =  U3_ggga(x1, x2, x4)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
U4_ggga(x1, x2, x3, x4)  =  U4_ggga(x1, x2, x4)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x4)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x1, x3, x5)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
U7_ggga(x1, x2, x3, x4, x5)  =  U7_ggga(x5)
div_out_gga(x1, x2, x3)  =  div_out_gga
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x4)
QUOT_IN_GGGA(x1, x2, x3, x4)  =  QUOT_IN_GGGA(x1, x2, x3)
U2_GGGA(x1, x2, x3, x4)  =  U2_GGGA(x4)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U3_GGGA(x1, x2, x3, x4)  =  U3_GGGA(x1, x2, x4)
EQ_IN_GA(x1, x2)  =  EQ_IN_GA(x1)
U4_GGGA(x1, x2, x3, x4)  =  U4_GGGA(x1, x2, x4)
P_IN_AA(x1, x2)  =  P_IN_AA
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x4)
U6_GGGA(x1, x2, x3, x4, x5)  =  U6_GGGA(x1, x3, x5)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U7_GGGA(x1, x2, x3, x4, x5)  =  U7_GGGA(x5)

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

(45) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 9 less nodes.

(46) Obligation:

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

QUOT_IN_GGGA(X, 0, Z, U) → U3_GGGA(X, Z, U, eq_in_ga(Z, s(X1)))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, U, p_in_aa(U, P))
U4_GGGA(X, Z, U, p_out_aa(U, P)) → QUOT_IN_GGGA(X, Z, Z, P)
QUOT_IN_GGGA(s(X), Y, Z, U) → U6_GGGA(X, Y, Z, U, p_in_ga(Y, P))
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → QUOT_IN_GGGA(X, P, Z, U)

The TRS R consists of the following rules:

div_in_gga(X, Y, Z) → U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z))
quot_in_ggga(0, s(Y), s(Z), R) → U2_ggga(Y, Z, R, eq_in_ag(R, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U2_ggga(Y, Z, R, eq_out_ag(R, 0)) → quot_out_ggga(0, s(Y), s(Z), R)
quot_in_ggga(X, 0, Z, U) → U3_ggga(X, Z, U, eq_in_ga(Z, s(X1)))
eq_in_ga(X, X) → eq_out_ga(X, X)
U3_ggga(X, Z, U, eq_out_ga(Z, s(X1))) → U4_ggga(X, Z, U, p_in_aa(U, P))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U4_ggga(X, Z, U, p_out_aa(U, P)) → U5_ggga(X, Z, U, quot_in_ggga(X, Z, Z, P))
quot_in_ggga(s(X), Y, Z, U) → U6_ggga(X, Y, Z, U, p_in_ga(Y, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U6_ggga(X, Y, Z, U, p_out_ga(Y, P)) → U7_ggga(X, Y, Z, U, quot_in_ggga(X, P, Z, U))
U7_ggga(X, Y, Z, U, quot_out_ggga(X, P, Z, U)) → quot_out_ggga(s(X), Y, Z, U)
U5_ggga(X, Z, U, quot_out_ggga(X, Z, Z, P)) → quot_out_ggga(X, 0, Z, U)
U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) → div_out_gga(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
quot_in_ggga(x1, x2, x3, x4)  =  quot_in_ggga(x1, x2, x3)
0  =  0
s(x1)  =  s(x1)
U2_ggga(x1, x2, x3, x4)  =  U2_ggga(x4)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
quot_out_ggga(x1, x2, x3, x4)  =  quot_out_ggga
U3_ggga(x1, x2, x3, x4)  =  U3_ggga(x1, x2, x4)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
U4_ggga(x1, x2, x3, x4)  =  U4_ggga(x1, x2, x4)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x4)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x1, x3, x5)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
U7_ggga(x1, x2, x3, x4, x5)  =  U7_ggga(x5)
div_out_gga(x1, x2, x3)  =  div_out_gga
QUOT_IN_GGGA(x1, x2, x3, x4)  =  QUOT_IN_GGGA(x1, x2, x3)
U3_GGGA(x1, x2, x3, x4)  =  U3_GGGA(x1, x2, x4)
U4_GGGA(x1, x2, x3, x4)  =  U4_GGGA(x1, x2, x4)
U6_GGGA(x1, x2, x3, x4, x5)  =  U6_GGGA(x1, x3, x5)

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

(47) UsableRulesProof (EQUIVALENT transformation)

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

(48) Obligation:

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

QUOT_IN_GGGA(X, 0, Z, U) → U3_GGGA(X, Z, U, eq_in_ga(Z, s(X1)))
U3_GGGA(X, Z, U, eq_out_ga(Z, s(X1))) → U4_GGGA(X, Z, U, p_in_aa(U, P))
U4_GGGA(X, Z, U, p_out_aa(U, P)) → QUOT_IN_GGGA(X, Z, Z, P)
QUOT_IN_GGGA(s(X), Y, Z, U) → U6_GGGA(X, Y, Z, U, p_in_ga(Y, P))
U6_GGGA(X, Y, Z, U, p_out_ga(Y, P)) → QUOT_IN_GGGA(X, P, Z, U)

The TRS R consists of the following rules:

eq_in_ga(X, X) → eq_out_ga(X, X)
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)

The argument filtering Pi contains the following mapping:
0  =  0
s(x1)  =  s(x1)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
p_in_aa(x1, x2)  =  p_in_aa
p_out_aa(x1, x2)  =  p_out_aa
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
QUOT_IN_GGGA(x1, x2, x3, x4)  =  QUOT_IN_GGGA(x1, x2, x3)
U3_GGGA(x1, x2, x3, x4)  =  U3_GGGA(x1, x2, x4)
U4_GGGA(x1, x2, x3, x4)  =  U4_GGGA(x1, x2, x4)
U6_GGGA(x1, x2, x3, x4, x5)  =  U6_GGGA(x1, x3, x5)

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

(49) PiDPToQDPProof (SOUND transformation)

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

(50) Obligation:

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

QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))
U3_GGGA(X, Z, eq_out_ga(s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(s(X), Y, Z) → U6_GGGA(X, Z, p_in_ga(Y))
U6_GGGA(X, Z, p_out_ga(P)) → QUOT_IN_GGGA(X, P, Z)

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X)
p_in_aap_out_aa
p_in_ga(0) → p_out_ga(0)
p_in_ga(s(X)) → p_out_ga(X)

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa
p_in_ga(x0)

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

(51) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


QUOT_IN_GGGA(s(X), Y, Z) → U6_GGGA(X, Z, p_in_ga(Y))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(QUOT_IN_GGGA(x1, x2, x3)) = x1   
POL(U3_GGGA(x1, x2, x3)) = x1   
POL(U4_GGGA(x1, x2, x3)) = x1   
POL(U6_GGGA(x1, x2, x3)) = x1   
POL(eq_in_ga(x1)) = 0   
POL(eq_out_ga(x1)) = 0   
POL(p_in_aa) = 0   
POL(p_in_ga(x1)) = 0   
POL(p_out_aa) = 0   
POL(p_out_ga(x1)) = 0   
POL(s(x1)) = 1 + x1   

The following usable rules [FROCOS05] were oriented: none

(52) Obligation:

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

QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))
U3_GGGA(X, Z, eq_out_ga(s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
U6_GGGA(X, Z, p_out_ga(P)) → QUOT_IN_GGGA(X, P, Z)

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X)
p_in_aap_out_aa
p_in_ga(0) → p_out_ga(0)
p_in_ga(s(X)) → p_out_ga(X)

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa
p_in_ga(x0)

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

(53) DependencyGraphProof (EQUIVALENT transformation)

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

(54) Obligation:

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

U3_GGGA(X, Z, eq_out_ga(s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X)
p_in_aap_out_aa
p_in_ga(0) → p_out_ga(0)
p_in_ga(s(X)) → p_out_ga(X)

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa
p_in_ga(x0)

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

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

(56) Obligation:

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

U3_GGGA(X, Z, eq_out_ga(s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X)
p_in_aap_out_aa

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa
p_in_ga(x0)

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

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

p_in_ga(x0)

(58) Obligation:

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

U3_GGGA(X, Z, eq_out_ga(s(X1))) → U4_GGGA(X, Z, p_in_aa)
U4_GGGA(X, Z, p_out_aa) → QUOT_IN_GGGA(X, Z, Z)
QUOT_IN_GGGA(X, 0, Z) → U3_GGGA(X, Z, eq_in_ga(Z))

The TRS R consists of the following rules:

eq_in_ga(X) → eq_out_ga(X)
p_in_aap_out_aa

The set Q consists of the following terms:

eq_in_ga(x0)
p_in_aa

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