(0) Obligation:

Clauses:

factor(cons(X, nil), X).
factor(cons(X, cons(Y, Xs)), T) :- ','(times(X, Y, Z), factor(cons(Z, Xs), T)).
times(0, X_, 0).
times(s(X), Y, Z) :- ','(times(X, Y, XY), plus(XY, Y, Z)).
plus(0, X, X).
plus(s(X), Y, s(Z)) :- plus(X, Y, Z).

Query: factor(g,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:

factorA_in_ga(cons(T4, nil), T4) → factorA_out_ga(cons(T4, nil), T4)
factorA_in_ga(cons(0, cons(T19, T12)), T14) → U1_ga(T19, T12, T14, factorA_in_ga(cons(0, T12), T14))
factorA_in_ga(cons(s(T24), cons(T25, T12)), T14) → U2_ga(T24, T25, T12, T14, pB_in_ggaaga(T24, T25, X35, X36, T12, T14))
pB_in_ggaaga(T24, T25, T28, X36, T12, T14) → U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
timesC_in_gga(0, T35, 0) → timesC_out_gga(0, T35, 0)
timesC_in_gga(s(T40), T41, X59) → U3_gga(T40, T41, X59, pD_in_ggaa(T40, T41, X58, X59))
pD_in_ggaa(T40, T41, T44, X59) → U9_ggaa(T40, T41, T44, X59, timesC_in_gga(T40, T41, T44))
U9_ggaa(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → U10_ggaa(T40, T41, T44, X59, plusE_in_gga(T44, T41, X59))
plusE_in_gga(0, T53, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59, s(X82)) → U4_gga(T58, T59, X82, plusE_in_gga(T58, T59, X82))
U4_gga(T58, T59, X82, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))
U10_ggaa(T40, T41, T44, X59, plusE_out_gga(T44, T41, X59)) → pD_out_ggaa(T40, T41, T44, X59)
U3_gga(T40, T41, X59, pD_out_ggaa(T40, T41, X58, X59)) → timesC_out_gga(s(T40), T41, X59)
U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_in_ggaga(T28, T25, X36, T12, T14))
pF_in_ggaga(T28, T25, T64, T12, T14) → U7_ggaga(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
U7_ggaga(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → U8_ggaga(T28, T25, T64, T12, T14, factorA_in_ga(cons(T64, T12), T14))
U8_ggaga(T28, T25, T64, T12, T14, factorA_out_ga(cons(T64, T12), T14)) → pF_out_ggaga(T28, T25, T64, T12, T14)
U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_out_ggaga(T28, T25, X36, T12, T14)) → pB_out_ggaaga(T24, T25, T28, X36, T12, T14)
U2_ga(T24, T25, T12, T14, pB_out_ggaaga(T24, T25, X35, X36, T12, T14)) → factorA_out_ga(cons(s(T24), cons(T25, T12)), T14)
U1_ga(T19, T12, T14, factorA_out_ga(cons(0, T12), T14)) → factorA_out_ga(cons(0, cons(T19, T12)), T14)

The argument filtering Pi contains the following mapping:
factorA_in_ga(x1, x2)  =  factorA_in_ga(x1)
cons(x1, x2)  =  cons(x1, x2)
nil  =  nil
factorA_out_ga(x1, x2)  =  factorA_out_ga(x1, x2)
0  =  0
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x2, x4)
s(x1)  =  s(x1)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x2, x3, x5)
pB_in_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_in_ggaaga(x1, x2, x5)
U5_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U5_ggaaga(x1, x2, x5, x7)
timesC_in_gga(x1, x2, x3)  =  timesC_in_gga(x1, x2)
timesC_out_gga(x1, x2, x3)  =  timesC_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U9_ggaa(x1, x2, x3, x4, x5)  =  U9_ggaa(x1, x2, x5)
U10_ggaa(x1, x2, x3, x4, x5)  =  U10_ggaa(x1, x2, x3, x5)
plusE_in_gga(x1, x2, x3)  =  plusE_in_gga(x1, x2)
plusE_out_gga(x1, x2, x3)  =  plusE_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
U6_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U6_ggaaga(x1, x2, x3, x5, x7)
pF_in_ggaga(x1, x2, x3, x4, x5)  =  pF_in_ggaga(x1, x2, x4)
U7_ggaga(x1, x2, x3, x4, x5, x6)  =  U7_ggaga(x1, x2, x4, x6)
U8_ggaga(x1, x2, x3, x4, x5, x6)  =  U8_ggaga(x1, x2, x3, x4, x6)
pF_out_ggaga(x1, x2, x3, x4, x5)  =  pF_out_ggaga(x1, x2, x3, x4, x5)
pB_out_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_out_ggaaga(x1, x2, x3, x4, x5, x6)

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

FACTORA_IN_GA(cons(0, cons(T19, T12)), T14) → U1_GA(T19, T12, T14, factorA_in_ga(cons(0, T12), T14))
FACTORA_IN_GA(cons(0, cons(T19, T12)), T14) → FACTORA_IN_GA(cons(0, T12), T14)
FACTORA_IN_GA(cons(s(T24), cons(T25, T12)), T14) → U2_GA(T24, T25, T12, T14, pB_in_ggaaga(T24, T25, X35, X36, T12, T14))
FACTORA_IN_GA(cons(s(T24), cons(T25, T12)), T14) → PB_IN_GGAAGA(T24, T25, X35, X36, T12, T14)
PB_IN_GGAAGA(T24, T25, T28, X36, T12, T14) → U5_GGAAGA(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
PB_IN_GGAAGA(T24, T25, T28, X36, T12, T14) → TIMESC_IN_GGA(T24, T25, T28)
TIMESC_IN_GGA(s(T40), T41, X59) → U3_GGA(T40, T41, X59, pD_in_ggaa(T40, T41, X58, X59))
TIMESC_IN_GGA(s(T40), T41, X59) → PD_IN_GGAA(T40, T41, X58, X59)
PD_IN_GGAA(T40, T41, T44, X59) → U9_GGAA(T40, T41, T44, X59, timesC_in_gga(T40, T41, T44))
PD_IN_GGAA(T40, T41, T44, X59) → TIMESC_IN_GGA(T40, T41, T44)
U9_GGAA(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → U10_GGAA(T40, T41, T44, X59, plusE_in_gga(T44, T41, X59))
U9_GGAA(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → PLUSE_IN_GGA(T44, T41, X59)
PLUSE_IN_GGA(s(T58), T59, s(X82)) → U4_GGA(T58, T59, X82, plusE_in_gga(T58, T59, X82))
PLUSE_IN_GGA(s(T58), T59, s(X82)) → PLUSE_IN_GGA(T58, T59, X82)
U5_GGAAGA(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → U6_GGAAGA(T24, T25, T28, X36, T12, T14, pF_in_ggaga(T28, T25, X36, T12, T14))
U5_GGAAGA(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → PF_IN_GGAGA(T28, T25, X36, T12, T14)
PF_IN_GGAGA(T28, T25, T64, T12, T14) → U7_GGAGA(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
PF_IN_GGAGA(T28, T25, T64, T12, T14) → PLUSE_IN_GGA(T28, T25, T64)
U7_GGAGA(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → U8_GGAGA(T28, T25, T64, T12, T14, factorA_in_ga(cons(T64, T12), T14))
U7_GGAGA(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → FACTORA_IN_GA(cons(T64, T12), T14)

The TRS R consists of the following rules:

factorA_in_ga(cons(T4, nil), T4) → factorA_out_ga(cons(T4, nil), T4)
factorA_in_ga(cons(0, cons(T19, T12)), T14) → U1_ga(T19, T12, T14, factorA_in_ga(cons(0, T12), T14))
factorA_in_ga(cons(s(T24), cons(T25, T12)), T14) → U2_ga(T24, T25, T12, T14, pB_in_ggaaga(T24, T25, X35, X36, T12, T14))
pB_in_ggaaga(T24, T25, T28, X36, T12, T14) → U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
timesC_in_gga(0, T35, 0) → timesC_out_gga(0, T35, 0)
timesC_in_gga(s(T40), T41, X59) → U3_gga(T40, T41, X59, pD_in_ggaa(T40, T41, X58, X59))
pD_in_ggaa(T40, T41, T44, X59) → U9_ggaa(T40, T41, T44, X59, timesC_in_gga(T40, T41, T44))
U9_ggaa(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → U10_ggaa(T40, T41, T44, X59, plusE_in_gga(T44, T41, X59))
plusE_in_gga(0, T53, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59, s(X82)) → U4_gga(T58, T59, X82, plusE_in_gga(T58, T59, X82))
U4_gga(T58, T59, X82, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))
U10_ggaa(T40, T41, T44, X59, plusE_out_gga(T44, T41, X59)) → pD_out_ggaa(T40, T41, T44, X59)
U3_gga(T40, T41, X59, pD_out_ggaa(T40, T41, X58, X59)) → timesC_out_gga(s(T40), T41, X59)
U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_in_ggaga(T28, T25, X36, T12, T14))
pF_in_ggaga(T28, T25, T64, T12, T14) → U7_ggaga(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
U7_ggaga(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → U8_ggaga(T28, T25, T64, T12, T14, factorA_in_ga(cons(T64, T12), T14))
U8_ggaga(T28, T25, T64, T12, T14, factorA_out_ga(cons(T64, T12), T14)) → pF_out_ggaga(T28, T25, T64, T12, T14)
U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_out_ggaga(T28, T25, X36, T12, T14)) → pB_out_ggaaga(T24, T25, T28, X36, T12, T14)
U2_ga(T24, T25, T12, T14, pB_out_ggaaga(T24, T25, X35, X36, T12, T14)) → factorA_out_ga(cons(s(T24), cons(T25, T12)), T14)
U1_ga(T19, T12, T14, factorA_out_ga(cons(0, T12), T14)) → factorA_out_ga(cons(0, cons(T19, T12)), T14)

The argument filtering Pi contains the following mapping:
factorA_in_ga(x1, x2)  =  factorA_in_ga(x1)
cons(x1, x2)  =  cons(x1, x2)
nil  =  nil
factorA_out_ga(x1, x2)  =  factorA_out_ga(x1, x2)
0  =  0
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x2, x4)
s(x1)  =  s(x1)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x2, x3, x5)
pB_in_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_in_ggaaga(x1, x2, x5)
U5_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U5_ggaaga(x1, x2, x5, x7)
timesC_in_gga(x1, x2, x3)  =  timesC_in_gga(x1, x2)
timesC_out_gga(x1, x2, x3)  =  timesC_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U9_ggaa(x1, x2, x3, x4, x5)  =  U9_ggaa(x1, x2, x5)
U10_ggaa(x1, x2, x3, x4, x5)  =  U10_ggaa(x1, x2, x3, x5)
plusE_in_gga(x1, x2, x3)  =  plusE_in_gga(x1, x2)
plusE_out_gga(x1, x2, x3)  =  plusE_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
U6_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U6_ggaaga(x1, x2, x3, x5, x7)
pF_in_ggaga(x1, x2, x3, x4, x5)  =  pF_in_ggaga(x1, x2, x4)
U7_ggaga(x1, x2, x3, x4, x5, x6)  =  U7_ggaga(x1, x2, x4, x6)
U8_ggaga(x1, x2, x3, x4, x5, x6)  =  U8_ggaga(x1, x2, x3, x4, x6)
pF_out_ggaga(x1, x2, x3, x4, x5)  =  pF_out_ggaga(x1, x2, x3, x4, x5)
pB_out_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_out_ggaaga(x1, x2, x3, x4, x5, x6)
FACTORA_IN_GA(x1, x2)  =  FACTORA_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x2, x4)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x2, x3, x5)
PB_IN_GGAAGA(x1, x2, x3, x4, x5, x6)  =  PB_IN_GGAAGA(x1, x2, x5)
U5_GGAAGA(x1, x2, x3, x4, x5, x6, x7)  =  U5_GGAAGA(x1, x2, x5, x7)
TIMESC_IN_GGA(x1, x2, x3)  =  TIMESC_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
PD_IN_GGAA(x1, x2, x3, x4)  =  PD_IN_GGAA(x1, x2)
U9_GGAA(x1, x2, x3, x4, x5)  =  U9_GGAA(x1, x2, x5)
U10_GGAA(x1, x2, x3, x4, x5)  =  U10_GGAA(x1, x2, x3, x5)
PLUSE_IN_GGA(x1, x2, x3)  =  PLUSE_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)
U6_GGAAGA(x1, x2, x3, x4, x5, x6, x7)  =  U6_GGAAGA(x1, x2, x3, x5, x7)
PF_IN_GGAGA(x1, x2, x3, x4, x5)  =  PF_IN_GGAGA(x1, x2, x4)
U7_GGAGA(x1, x2, x3, x4, x5, x6)  =  U7_GGAGA(x1, x2, x4, x6)
U8_GGAGA(x1, x2, x3, x4, x5, x6)  =  U8_GGAGA(x1, x2, x3, x4, x6)

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

(4) Obligation:

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

FACTORA_IN_GA(cons(0, cons(T19, T12)), T14) → U1_GA(T19, T12, T14, factorA_in_ga(cons(0, T12), T14))
FACTORA_IN_GA(cons(0, cons(T19, T12)), T14) → FACTORA_IN_GA(cons(0, T12), T14)
FACTORA_IN_GA(cons(s(T24), cons(T25, T12)), T14) → U2_GA(T24, T25, T12, T14, pB_in_ggaaga(T24, T25, X35, X36, T12, T14))
FACTORA_IN_GA(cons(s(T24), cons(T25, T12)), T14) → PB_IN_GGAAGA(T24, T25, X35, X36, T12, T14)
PB_IN_GGAAGA(T24, T25, T28, X36, T12, T14) → U5_GGAAGA(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
PB_IN_GGAAGA(T24, T25, T28, X36, T12, T14) → TIMESC_IN_GGA(T24, T25, T28)
TIMESC_IN_GGA(s(T40), T41, X59) → U3_GGA(T40, T41, X59, pD_in_ggaa(T40, T41, X58, X59))
TIMESC_IN_GGA(s(T40), T41, X59) → PD_IN_GGAA(T40, T41, X58, X59)
PD_IN_GGAA(T40, T41, T44, X59) → U9_GGAA(T40, T41, T44, X59, timesC_in_gga(T40, T41, T44))
PD_IN_GGAA(T40, T41, T44, X59) → TIMESC_IN_GGA(T40, T41, T44)
U9_GGAA(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → U10_GGAA(T40, T41, T44, X59, plusE_in_gga(T44, T41, X59))
U9_GGAA(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → PLUSE_IN_GGA(T44, T41, X59)
PLUSE_IN_GGA(s(T58), T59, s(X82)) → U4_GGA(T58, T59, X82, plusE_in_gga(T58, T59, X82))
PLUSE_IN_GGA(s(T58), T59, s(X82)) → PLUSE_IN_GGA(T58, T59, X82)
U5_GGAAGA(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → U6_GGAAGA(T24, T25, T28, X36, T12, T14, pF_in_ggaga(T28, T25, X36, T12, T14))
U5_GGAAGA(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → PF_IN_GGAGA(T28, T25, X36, T12, T14)
PF_IN_GGAGA(T28, T25, T64, T12, T14) → U7_GGAGA(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
PF_IN_GGAGA(T28, T25, T64, T12, T14) → PLUSE_IN_GGA(T28, T25, T64)
U7_GGAGA(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → U8_GGAGA(T28, T25, T64, T12, T14, factorA_in_ga(cons(T64, T12), T14))
U7_GGAGA(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → FACTORA_IN_GA(cons(T64, T12), T14)

The TRS R consists of the following rules:

factorA_in_ga(cons(T4, nil), T4) → factorA_out_ga(cons(T4, nil), T4)
factorA_in_ga(cons(0, cons(T19, T12)), T14) → U1_ga(T19, T12, T14, factorA_in_ga(cons(0, T12), T14))
factorA_in_ga(cons(s(T24), cons(T25, T12)), T14) → U2_ga(T24, T25, T12, T14, pB_in_ggaaga(T24, T25, X35, X36, T12, T14))
pB_in_ggaaga(T24, T25, T28, X36, T12, T14) → U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
timesC_in_gga(0, T35, 0) → timesC_out_gga(0, T35, 0)
timesC_in_gga(s(T40), T41, X59) → U3_gga(T40, T41, X59, pD_in_ggaa(T40, T41, X58, X59))
pD_in_ggaa(T40, T41, T44, X59) → U9_ggaa(T40, T41, T44, X59, timesC_in_gga(T40, T41, T44))
U9_ggaa(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → U10_ggaa(T40, T41, T44, X59, plusE_in_gga(T44, T41, X59))
plusE_in_gga(0, T53, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59, s(X82)) → U4_gga(T58, T59, X82, plusE_in_gga(T58, T59, X82))
U4_gga(T58, T59, X82, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))
U10_ggaa(T40, T41, T44, X59, plusE_out_gga(T44, T41, X59)) → pD_out_ggaa(T40, T41, T44, X59)
U3_gga(T40, T41, X59, pD_out_ggaa(T40, T41, X58, X59)) → timesC_out_gga(s(T40), T41, X59)
U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_in_ggaga(T28, T25, X36, T12, T14))
pF_in_ggaga(T28, T25, T64, T12, T14) → U7_ggaga(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
U7_ggaga(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → U8_ggaga(T28, T25, T64, T12, T14, factorA_in_ga(cons(T64, T12), T14))
U8_ggaga(T28, T25, T64, T12, T14, factorA_out_ga(cons(T64, T12), T14)) → pF_out_ggaga(T28, T25, T64, T12, T14)
U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_out_ggaga(T28, T25, X36, T12, T14)) → pB_out_ggaaga(T24, T25, T28, X36, T12, T14)
U2_ga(T24, T25, T12, T14, pB_out_ggaaga(T24, T25, X35, X36, T12, T14)) → factorA_out_ga(cons(s(T24), cons(T25, T12)), T14)
U1_ga(T19, T12, T14, factorA_out_ga(cons(0, T12), T14)) → factorA_out_ga(cons(0, cons(T19, T12)), T14)

The argument filtering Pi contains the following mapping:
factorA_in_ga(x1, x2)  =  factorA_in_ga(x1)
cons(x1, x2)  =  cons(x1, x2)
nil  =  nil
factorA_out_ga(x1, x2)  =  factorA_out_ga(x1, x2)
0  =  0
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x2, x4)
s(x1)  =  s(x1)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x2, x3, x5)
pB_in_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_in_ggaaga(x1, x2, x5)
U5_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U5_ggaaga(x1, x2, x5, x7)
timesC_in_gga(x1, x2, x3)  =  timesC_in_gga(x1, x2)
timesC_out_gga(x1, x2, x3)  =  timesC_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U9_ggaa(x1, x2, x3, x4, x5)  =  U9_ggaa(x1, x2, x5)
U10_ggaa(x1, x2, x3, x4, x5)  =  U10_ggaa(x1, x2, x3, x5)
plusE_in_gga(x1, x2, x3)  =  plusE_in_gga(x1, x2)
plusE_out_gga(x1, x2, x3)  =  plusE_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
U6_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U6_ggaaga(x1, x2, x3, x5, x7)
pF_in_ggaga(x1, x2, x3, x4, x5)  =  pF_in_ggaga(x1, x2, x4)
U7_ggaga(x1, x2, x3, x4, x5, x6)  =  U7_ggaga(x1, x2, x4, x6)
U8_ggaga(x1, x2, x3, x4, x5, x6)  =  U8_ggaga(x1, x2, x3, x4, x6)
pF_out_ggaga(x1, x2, x3, x4, x5)  =  pF_out_ggaga(x1, x2, x3, x4, x5)
pB_out_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_out_ggaaga(x1, x2, x3, x4, x5, x6)
FACTORA_IN_GA(x1, x2)  =  FACTORA_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x2, x4)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x2, x3, x5)
PB_IN_GGAAGA(x1, x2, x3, x4, x5, x6)  =  PB_IN_GGAAGA(x1, x2, x5)
U5_GGAAGA(x1, x2, x3, x4, x5, x6, x7)  =  U5_GGAAGA(x1, x2, x5, x7)
TIMESC_IN_GGA(x1, x2, x3)  =  TIMESC_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
PD_IN_GGAA(x1, x2, x3, x4)  =  PD_IN_GGAA(x1, x2)
U9_GGAA(x1, x2, x3, x4, x5)  =  U9_GGAA(x1, x2, x5)
U10_GGAA(x1, x2, x3, x4, x5)  =  U10_GGAA(x1, x2, x3, x5)
PLUSE_IN_GGA(x1, x2, x3)  =  PLUSE_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)
U6_GGAAGA(x1, x2, x3, x4, x5, x6, x7)  =  U6_GGAAGA(x1, x2, x3, x5, x7)
PF_IN_GGAGA(x1, x2, x3, x4, x5)  =  PF_IN_GGAGA(x1, x2, x4)
U7_GGAGA(x1, x2, x3, x4, x5, x6)  =  U7_GGAGA(x1, x2, x4, x6)
U8_GGAGA(x1, x2, x3, x4, x5, x6)  =  U8_GGAGA(x1, x2, x3, x4, x6)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 4 SCCs with 11 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

PLUSE_IN_GGA(s(T58), T59, s(X82)) → PLUSE_IN_GGA(T58, T59, X82)

The TRS R consists of the following rules:

factorA_in_ga(cons(T4, nil), T4) → factorA_out_ga(cons(T4, nil), T4)
factorA_in_ga(cons(0, cons(T19, T12)), T14) → U1_ga(T19, T12, T14, factorA_in_ga(cons(0, T12), T14))
factorA_in_ga(cons(s(T24), cons(T25, T12)), T14) → U2_ga(T24, T25, T12, T14, pB_in_ggaaga(T24, T25, X35, X36, T12, T14))
pB_in_ggaaga(T24, T25, T28, X36, T12, T14) → U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
timesC_in_gga(0, T35, 0) → timesC_out_gga(0, T35, 0)
timesC_in_gga(s(T40), T41, X59) → U3_gga(T40, T41, X59, pD_in_ggaa(T40, T41, X58, X59))
pD_in_ggaa(T40, T41, T44, X59) → U9_ggaa(T40, T41, T44, X59, timesC_in_gga(T40, T41, T44))
U9_ggaa(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → U10_ggaa(T40, T41, T44, X59, plusE_in_gga(T44, T41, X59))
plusE_in_gga(0, T53, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59, s(X82)) → U4_gga(T58, T59, X82, plusE_in_gga(T58, T59, X82))
U4_gga(T58, T59, X82, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))
U10_ggaa(T40, T41, T44, X59, plusE_out_gga(T44, T41, X59)) → pD_out_ggaa(T40, T41, T44, X59)
U3_gga(T40, T41, X59, pD_out_ggaa(T40, T41, X58, X59)) → timesC_out_gga(s(T40), T41, X59)
U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_in_ggaga(T28, T25, X36, T12, T14))
pF_in_ggaga(T28, T25, T64, T12, T14) → U7_ggaga(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
U7_ggaga(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → U8_ggaga(T28, T25, T64, T12, T14, factorA_in_ga(cons(T64, T12), T14))
U8_ggaga(T28, T25, T64, T12, T14, factorA_out_ga(cons(T64, T12), T14)) → pF_out_ggaga(T28, T25, T64, T12, T14)
U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_out_ggaga(T28, T25, X36, T12, T14)) → pB_out_ggaaga(T24, T25, T28, X36, T12, T14)
U2_ga(T24, T25, T12, T14, pB_out_ggaaga(T24, T25, X35, X36, T12, T14)) → factorA_out_ga(cons(s(T24), cons(T25, T12)), T14)
U1_ga(T19, T12, T14, factorA_out_ga(cons(0, T12), T14)) → factorA_out_ga(cons(0, cons(T19, T12)), T14)

The argument filtering Pi contains the following mapping:
factorA_in_ga(x1, x2)  =  factorA_in_ga(x1)
cons(x1, x2)  =  cons(x1, x2)
nil  =  nil
factorA_out_ga(x1, x2)  =  factorA_out_ga(x1, x2)
0  =  0
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x2, x4)
s(x1)  =  s(x1)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x2, x3, x5)
pB_in_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_in_ggaaga(x1, x2, x5)
U5_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U5_ggaaga(x1, x2, x5, x7)
timesC_in_gga(x1, x2, x3)  =  timesC_in_gga(x1, x2)
timesC_out_gga(x1, x2, x3)  =  timesC_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U9_ggaa(x1, x2, x3, x4, x5)  =  U9_ggaa(x1, x2, x5)
U10_ggaa(x1, x2, x3, x4, x5)  =  U10_ggaa(x1, x2, x3, x5)
plusE_in_gga(x1, x2, x3)  =  plusE_in_gga(x1, x2)
plusE_out_gga(x1, x2, x3)  =  plusE_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
U6_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U6_ggaaga(x1, x2, x3, x5, x7)
pF_in_ggaga(x1, x2, x3, x4, x5)  =  pF_in_ggaga(x1, x2, x4)
U7_ggaga(x1, x2, x3, x4, x5, x6)  =  U7_ggaga(x1, x2, x4, x6)
U8_ggaga(x1, x2, x3, x4, x5, x6)  =  U8_ggaga(x1, x2, x3, x4, x6)
pF_out_ggaga(x1, x2, x3, x4, x5)  =  pF_out_ggaga(x1, x2, x3, x4, x5)
pB_out_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_out_ggaaga(x1, x2, x3, x4, x5, x6)
PLUSE_IN_GGA(x1, x2, x3)  =  PLUSE_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:

PLUSE_IN_GGA(s(T58), T59, s(X82)) → PLUSE_IN_GGA(T58, T59, X82)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
PLUSE_IN_GGA(x1, x2, x3)  =  PLUSE_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:

PLUSE_IN_GGA(s(T58), T59) → PLUSE_IN_GGA(T58, T59)

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:

  • PLUSE_IN_GGA(s(T58), T59) → PLUSE_IN_GGA(T58, T59)
    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:

TIMESC_IN_GGA(s(T40), T41, X59) → PD_IN_GGAA(T40, T41, X58, X59)
PD_IN_GGAA(T40, T41, T44, X59) → TIMESC_IN_GGA(T40, T41, T44)

The TRS R consists of the following rules:

factorA_in_ga(cons(T4, nil), T4) → factorA_out_ga(cons(T4, nil), T4)
factorA_in_ga(cons(0, cons(T19, T12)), T14) → U1_ga(T19, T12, T14, factorA_in_ga(cons(0, T12), T14))
factorA_in_ga(cons(s(T24), cons(T25, T12)), T14) → U2_ga(T24, T25, T12, T14, pB_in_ggaaga(T24, T25, X35, X36, T12, T14))
pB_in_ggaaga(T24, T25, T28, X36, T12, T14) → U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
timesC_in_gga(0, T35, 0) → timesC_out_gga(0, T35, 0)
timesC_in_gga(s(T40), T41, X59) → U3_gga(T40, T41, X59, pD_in_ggaa(T40, T41, X58, X59))
pD_in_ggaa(T40, T41, T44, X59) → U9_ggaa(T40, T41, T44, X59, timesC_in_gga(T40, T41, T44))
U9_ggaa(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → U10_ggaa(T40, T41, T44, X59, plusE_in_gga(T44, T41, X59))
plusE_in_gga(0, T53, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59, s(X82)) → U4_gga(T58, T59, X82, plusE_in_gga(T58, T59, X82))
U4_gga(T58, T59, X82, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))
U10_ggaa(T40, T41, T44, X59, plusE_out_gga(T44, T41, X59)) → pD_out_ggaa(T40, T41, T44, X59)
U3_gga(T40, T41, X59, pD_out_ggaa(T40, T41, X58, X59)) → timesC_out_gga(s(T40), T41, X59)
U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_in_ggaga(T28, T25, X36, T12, T14))
pF_in_ggaga(T28, T25, T64, T12, T14) → U7_ggaga(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
U7_ggaga(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → U8_ggaga(T28, T25, T64, T12, T14, factorA_in_ga(cons(T64, T12), T14))
U8_ggaga(T28, T25, T64, T12, T14, factorA_out_ga(cons(T64, T12), T14)) → pF_out_ggaga(T28, T25, T64, T12, T14)
U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_out_ggaga(T28, T25, X36, T12, T14)) → pB_out_ggaaga(T24, T25, T28, X36, T12, T14)
U2_ga(T24, T25, T12, T14, pB_out_ggaaga(T24, T25, X35, X36, T12, T14)) → factorA_out_ga(cons(s(T24), cons(T25, T12)), T14)
U1_ga(T19, T12, T14, factorA_out_ga(cons(0, T12), T14)) → factorA_out_ga(cons(0, cons(T19, T12)), T14)

The argument filtering Pi contains the following mapping:
factorA_in_ga(x1, x2)  =  factorA_in_ga(x1)
cons(x1, x2)  =  cons(x1, x2)
nil  =  nil
factorA_out_ga(x1, x2)  =  factorA_out_ga(x1, x2)
0  =  0
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x2, x4)
s(x1)  =  s(x1)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x2, x3, x5)
pB_in_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_in_ggaaga(x1, x2, x5)
U5_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U5_ggaaga(x1, x2, x5, x7)
timesC_in_gga(x1, x2, x3)  =  timesC_in_gga(x1, x2)
timesC_out_gga(x1, x2, x3)  =  timesC_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U9_ggaa(x1, x2, x3, x4, x5)  =  U9_ggaa(x1, x2, x5)
U10_ggaa(x1, x2, x3, x4, x5)  =  U10_ggaa(x1, x2, x3, x5)
plusE_in_gga(x1, x2, x3)  =  plusE_in_gga(x1, x2)
plusE_out_gga(x1, x2, x3)  =  plusE_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
U6_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U6_ggaaga(x1, x2, x3, x5, x7)
pF_in_ggaga(x1, x2, x3, x4, x5)  =  pF_in_ggaga(x1, x2, x4)
U7_ggaga(x1, x2, x3, x4, x5, x6)  =  U7_ggaga(x1, x2, x4, x6)
U8_ggaga(x1, x2, x3, x4, x5, x6)  =  U8_ggaga(x1, x2, x3, x4, x6)
pF_out_ggaga(x1, x2, x3, x4, x5)  =  pF_out_ggaga(x1, x2, x3, x4, x5)
pB_out_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_out_ggaaga(x1, x2, x3, x4, x5, x6)
TIMESC_IN_GGA(x1, x2, x3)  =  TIMESC_IN_GGA(x1, x2)
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:

TIMESC_IN_GGA(s(T40), T41, X59) → PD_IN_GGAA(T40, T41, X58, X59)
PD_IN_GGAA(T40, T41, T44, X59) → TIMESC_IN_GGA(T40, T41, T44)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
TIMESC_IN_GGA(x1, x2, x3)  =  TIMESC_IN_GGA(x1, x2)
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:

TIMESC_IN_GGA(s(T40), T41) → PD_IN_GGAA(T40, T41)
PD_IN_GGAA(T40, T41) → TIMESC_IN_GGA(T40, T41)

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

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

  • PD_IN_GGAA(T40, T41) → TIMESC_IN_GGA(T40, T41)
    The graph contains the following edges 1 >= 1, 2 >= 2

  • TIMESC_IN_GGA(s(T40), T41) → PD_IN_GGAA(T40, T41)
    The graph contains the following edges 1 > 1, 2 >= 2

(20) YES

(21) Obligation:

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

FACTORA_IN_GA(cons(0, cons(T19, T12)), T14) → FACTORA_IN_GA(cons(0, T12), T14)

The TRS R consists of the following rules:

factorA_in_ga(cons(T4, nil), T4) → factorA_out_ga(cons(T4, nil), T4)
factorA_in_ga(cons(0, cons(T19, T12)), T14) → U1_ga(T19, T12, T14, factorA_in_ga(cons(0, T12), T14))
factorA_in_ga(cons(s(T24), cons(T25, T12)), T14) → U2_ga(T24, T25, T12, T14, pB_in_ggaaga(T24, T25, X35, X36, T12, T14))
pB_in_ggaaga(T24, T25, T28, X36, T12, T14) → U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
timesC_in_gga(0, T35, 0) → timesC_out_gga(0, T35, 0)
timesC_in_gga(s(T40), T41, X59) → U3_gga(T40, T41, X59, pD_in_ggaa(T40, T41, X58, X59))
pD_in_ggaa(T40, T41, T44, X59) → U9_ggaa(T40, T41, T44, X59, timesC_in_gga(T40, T41, T44))
U9_ggaa(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → U10_ggaa(T40, T41, T44, X59, plusE_in_gga(T44, T41, X59))
plusE_in_gga(0, T53, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59, s(X82)) → U4_gga(T58, T59, X82, plusE_in_gga(T58, T59, X82))
U4_gga(T58, T59, X82, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))
U10_ggaa(T40, T41, T44, X59, plusE_out_gga(T44, T41, X59)) → pD_out_ggaa(T40, T41, T44, X59)
U3_gga(T40, T41, X59, pD_out_ggaa(T40, T41, X58, X59)) → timesC_out_gga(s(T40), T41, X59)
U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_in_ggaga(T28, T25, X36, T12, T14))
pF_in_ggaga(T28, T25, T64, T12, T14) → U7_ggaga(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
U7_ggaga(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → U8_ggaga(T28, T25, T64, T12, T14, factorA_in_ga(cons(T64, T12), T14))
U8_ggaga(T28, T25, T64, T12, T14, factorA_out_ga(cons(T64, T12), T14)) → pF_out_ggaga(T28, T25, T64, T12, T14)
U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_out_ggaga(T28, T25, X36, T12, T14)) → pB_out_ggaaga(T24, T25, T28, X36, T12, T14)
U2_ga(T24, T25, T12, T14, pB_out_ggaaga(T24, T25, X35, X36, T12, T14)) → factorA_out_ga(cons(s(T24), cons(T25, T12)), T14)
U1_ga(T19, T12, T14, factorA_out_ga(cons(0, T12), T14)) → factorA_out_ga(cons(0, cons(T19, T12)), T14)

The argument filtering Pi contains the following mapping:
factorA_in_ga(x1, x2)  =  factorA_in_ga(x1)
cons(x1, x2)  =  cons(x1, x2)
nil  =  nil
factorA_out_ga(x1, x2)  =  factorA_out_ga(x1, x2)
0  =  0
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x2, x4)
s(x1)  =  s(x1)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x2, x3, x5)
pB_in_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_in_ggaaga(x1, x2, x5)
U5_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U5_ggaaga(x1, x2, x5, x7)
timesC_in_gga(x1, x2, x3)  =  timesC_in_gga(x1, x2)
timesC_out_gga(x1, x2, x3)  =  timesC_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U9_ggaa(x1, x2, x3, x4, x5)  =  U9_ggaa(x1, x2, x5)
U10_ggaa(x1, x2, x3, x4, x5)  =  U10_ggaa(x1, x2, x3, x5)
plusE_in_gga(x1, x2, x3)  =  plusE_in_gga(x1, x2)
plusE_out_gga(x1, x2, x3)  =  plusE_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
U6_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U6_ggaaga(x1, x2, x3, x5, x7)
pF_in_ggaga(x1, x2, x3, x4, x5)  =  pF_in_ggaga(x1, x2, x4)
U7_ggaga(x1, x2, x3, x4, x5, x6)  =  U7_ggaga(x1, x2, x4, x6)
U8_ggaga(x1, x2, x3, x4, x5, x6)  =  U8_ggaga(x1, x2, x3, x4, x6)
pF_out_ggaga(x1, x2, x3, x4, x5)  =  pF_out_ggaga(x1, x2, x3, x4, x5)
pB_out_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_out_ggaaga(x1, x2, x3, x4, x5, x6)
FACTORA_IN_GA(x1, x2)  =  FACTORA_IN_GA(x1)

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

(22) UsableRulesProof (EQUIVALENT transformation)

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

(23) Obligation:

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

FACTORA_IN_GA(cons(0, cons(T19, T12)), T14) → FACTORA_IN_GA(cons(0, T12), T14)

R is empty.
The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
0  =  0
FACTORA_IN_GA(x1, x2)  =  FACTORA_IN_GA(x1)

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

(24) PiDPToQDPProof (SOUND transformation)

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

(25) Obligation:

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

FACTORA_IN_GA(cons(0, cons(T19, T12))) → FACTORA_IN_GA(cons(0, T12))

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

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

FACTORA_IN_GA(cons(0, cons(T19, T12))) → FACTORA_IN_GA(cons(0, T12))


Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(FACTORA_IN_GA(x1)) = 2·x1   
POL(cons(x1, x2)) = 1 + x1 + 2·x2   

(27) Obligation:

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

(28) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(29) YES

(30) Obligation:

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

FACTORA_IN_GA(cons(s(T24), cons(T25, T12)), T14) → PB_IN_GGAAGA(T24, T25, X35, X36, T12, T14)
PB_IN_GGAAGA(T24, T25, T28, X36, T12, T14) → U5_GGAAGA(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
U5_GGAAGA(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → PF_IN_GGAGA(T28, T25, X36, T12, T14)
PF_IN_GGAGA(T28, T25, T64, T12, T14) → U7_GGAGA(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
U7_GGAGA(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → FACTORA_IN_GA(cons(T64, T12), T14)

The TRS R consists of the following rules:

factorA_in_ga(cons(T4, nil), T4) → factorA_out_ga(cons(T4, nil), T4)
factorA_in_ga(cons(0, cons(T19, T12)), T14) → U1_ga(T19, T12, T14, factorA_in_ga(cons(0, T12), T14))
factorA_in_ga(cons(s(T24), cons(T25, T12)), T14) → U2_ga(T24, T25, T12, T14, pB_in_ggaaga(T24, T25, X35, X36, T12, T14))
pB_in_ggaaga(T24, T25, T28, X36, T12, T14) → U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
timesC_in_gga(0, T35, 0) → timesC_out_gga(0, T35, 0)
timesC_in_gga(s(T40), T41, X59) → U3_gga(T40, T41, X59, pD_in_ggaa(T40, T41, X58, X59))
pD_in_ggaa(T40, T41, T44, X59) → U9_ggaa(T40, T41, T44, X59, timesC_in_gga(T40, T41, T44))
U9_ggaa(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → U10_ggaa(T40, T41, T44, X59, plusE_in_gga(T44, T41, X59))
plusE_in_gga(0, T53, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59, s(X82)) → U4_gga(T58, T59, X82, plusE_in_gga(T58, T59, X82))
U4_gga(T58, T59, X82, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))
U10_ggaa(T40, T41, T44, X59, plusE_out_gga(T44, T41, X59)) → pD_out_ggaa(T40, T41, T44, X59)
U3_gga(T40, T41, X59, pD_out_ggaa(T40, T41, X58, X59)) → timesC_out_gga(s(T40), T41, X59)
U5_ggaaga(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_in_ggaga(T28, T25, X36, T12, T14))
pF_in_ggaga(T28, T25, T64, T12, T14) → U7_ggaga(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
U7_ggaga(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → U8_ggaga(T28, T25, T64, T12, T14, factorA_in_ga(cons(T64, T12), T14))
U8_ggaga(T28, T25, T64, T12, T14, factorA_out_ga(cons(T64, T12), T14)) → pF_out_ggaga(T28, T25, T64, T12, T14)
U6_ggaaga(T24, T25, T28, X36, T12, T14, pF_out_ggaga(T28, T25, X36, T12, T14)) → pB_out_ggaaga(T24, T25, T28, X36, T12, T14)
U2_ga(T24, T25, T12, T14, pB_out_ggaaga(T24, T25, X35, X36, T12, T14)) → factorA_out_ga(cons(s(T24), cons(T25, T12)), T14)
U1_ga(T19, T12, T14, factorA_out_ga(cons(0, T12), T14)) → factorA_out_ga(cons(0, cons(T19, T12)), T14)

The argument filtering Pi contains the following mapping:
factorA_in_ga(x1, x2)  =  factorA_in_ga(x1)
cons(x1, x2)  =  cons(x1, x2)
nil  =  nil
factorA_out_ga(x1, x2)  =  factorA_out_ga(x1, x2)
0  =  0
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x2, x4)
s(x1)  =  s(x1)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x2, x3, x5)
pB_in_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_in_ggaaga(x1, x2, x5)
U5_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U5_ggaaga(x1, x2, x5, x7)
timesC_in_gga(x1, x2, x3)  =  timesC_in_gga(x1, x2)
timesC_out_gga(x1, x2, x3)  =  timesC_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U9_ggaa(x1, x2, x3, x4, x5)  =  U9_ggaa(x1, x2, x5)
U10_ggaa(x1, x2, x3, x4, x5)  =  U10_ggaa(x1, x2, x3, x5)
plusE_in_gga(x1, x2, x3)  =  plusE_in_gga(x1, x2)
plusE_out_gga(x1, x2, x3)  =  plusE_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
U6_ggaaga(x1, x2, x3, x4, x5, x6, x7)  =  U6_ggaaga(x1, x2, x3, x5, x7)
pF_in_ggaga(x1, x2, x3, x4, x5)  =  pF_in_ggaga(x1, x2, x4)
U7_ggaga(x1, x2, x3, x4, x5, x6)  =  U7_ggaga(x1, x2, x4, x6)
U8_ggaga(x1, x2, x3, x4, x5, x6)  =  U8_ggaga(x1, x2, x3, x4, x6)
pF_out_ggaga(x1, x2, x3, x4, x5)  =  pF_out_ggaga(x1, x2, x3, x4, x5)
pB_out_ggaaga(x1, x2, x3, x4, x5, x6)  =  pB_out_ggaaga(x1, x2, x3, x4, x5, x6)
FACTORA_IN_GA(x1, x2)  =  FACTORA_IN_GA(x1)
PB_IN_GGAAGA(x1, x2, x3, x4, x5, x6)  =  PB_IN_GGAAGA(x1, x2, x5)
U5_GGAAGA(x1, x2, x3, x4, x5, x6, x7)  =  U5_GGAAGA(x1, x2, x5, x7)
PF_IN_GGAGA(x1, x2, x3, x4, x5)  =  PF_IN_GGAGA(x1, x2, x4)
U7_GGAGA(x1, x2, x3, x4, x5, x6)  =  U7_GGAGA(x1, x2, x4, x6)

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

(31) UsableRulesProof (EQUIVALENT transformation)

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

(32) Obligation:

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

FACTORA_IN_GA(cons(s(T24), cons(T25, T12)), T14) → PB_IN_GGAAGA(T24, T25, X35, X36, T12, T14)
PB_IN_GGAAGA(T24, T25, T28, X36, T12, T14) → U5_GGAAGA(T24, T25, T28, X36, T12, T14, timesC_in_gga(T24, T25, T28))
U5_GGAAGA(T24, T25, T28, X36, T12, T14, timesC_out_gga(T24, T25, T28)) → PF_IN_GGAGA(T28, T25, X36, T12, T14)
PF_IN_GGAGA(T28, T25, T64, T12, T14) → U7_GGAGA(T28, T25, T64, T12, T14, plusE_in_gga(T28, T25, T64))
U7_GGAGA(T28, T25, T64, T12, T14, plusE_out_gga(T28, T25, T64)) → FACTORA_IN_GA(cons(T64, T12), T14)

The TRS R consists of the following rules:

timesC_in_gga(0, T35, 0) → timesC_out_gga(0, T35, 0)
timesC_in_gga(s(T40), T41, X59) → U3_gga(T40, T41, X59, pD_in_ggaa(T40, T41, X58, X59))
plusE_in_gga(0, T53, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59, s(X82)) → U4_gga(T58, T59, X82, plusE_in_gga(T58, T59, X82))
U3_gga(T40, T41, X59, pD_out_ggaa(T40, T41, X58, X59)) → timesC_out_gga(s(T40), T41, X59)
U4_gga(T58, T59, X82, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))
pD_in_ggaa(T40, T41, T44, X59) → U9_ggaa(T40, T41, T44, X59, timesC_in_gga(T40, T41, T44))
U9_ggaa(T40, T41, T44, X59, timesC_out_gga(T40, T41, T44)) → U10_ggaa(T40, T41, T44, X59, plusE_in_gga(T44, T41, X59))
U10_ggaa(T40, T41, T44, X59, plusE_out_gga(T44, T41, X59)) → pD_out_ggaa(T40, T41, T44, X59)

The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
0  =  0
s(x1)  =  s(x1)
timesC_in_gga(x1, x2, x3)  =  timesC_in_gga(x1, x2)
timesC_out_gga(x1, x2, x3)  =  timesC_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
pD_in_ggaa(x1, x2, x3, x4)  =  pD_in_ggaa(x1, x2)
U9_ggaa(x1, x2, x3, x4, x5)  =  U9_ggaa(x1, x2, x5)
U10_ggaa(x1, x2, x3, x4, x5)  =  U10_ggaa(x1, x2, x3, x5)
plusE_in_gga(x1, x2, x3)  =  plusE_in_gga(x1, x2)
plusE_out_gga(x1, x2, x3)  =  plusE_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
pD_out_ggaa(x1, x2, x3, x4)  =  pD_out_ggaa(x1, x2, x3, x4)
FACTORA_IN_GA(x1, x2)  =  FACTORA_IN_GA(x1)
PB_IN_GGAAGA(x1, x2, x3, x4, x5, x6)  =  PB_IN_GGAAGA(x1, x2, x5)
U5_GGAAGA(x1, x2, x3, x4, x5, x6, x7)  =  U5_GGAAGA(x1, x2, x5, x7)
PF_IN_GGAGA(x1, x2, x3, x4, x5)  =  PF_IN_GGAGA(x1, x2, x4)
U7_GGAGA(x1, x2, x3, x4, x5, x6)  =  U7_GGAGA(x1, x2, x4, x6)

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

(33) PiDPToQDPProof (SOUND transformation)

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

(34) Obligation:

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

FACTORA_IN_GA(cons(s(T24), cons(T25, T12))) → PB_IN_GGAAGA(T24, T25, T12)
PB_IN_GGAAGA(T24, T25, T12) → U5_GGAAGA(T24, T25, T12, timesC_in_gga(T24, T25))
U5_GGAAGA(T24, T25, T12, timesC_out_gga(T24, T25, T28)) → PF_IN_GGAGA(T28, T25, T12)
PF_IN_GGAGA(T28, T25, T12) → U7_GGAGA(T28, T25, T12, plusE_in_gga(T28, T25))
U7_GGAGA(T28, T25, T12, plusE_out_gga(T28, T25, T64)) → FACTORA_IN_GA(cons(T64, T12))

The TRS R consists of the following rules:

timesC_in_gga(0, T35) → timesC_out_gga(0, T35, 0)
timesC_in_gga(s(T40), T41) → U3_gga(T40, T41, pD_in_ggaa(T40, T41))
plusE_in_gga(0, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59) → U4_gga(T58, T59, plusE_in_gga(T58, T59))
U3_gga(T40, T41, pD_out_ggaa(T40, T41, X58, X59)) → timesC_out_gga(s(T40), T41, X59)
U4_gga(T58, T59, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))
pD_in_ggaa(T40, T41) → U9_ggaa(T40, T41, timesC_in_gga(T40, T41))
U9_ggaa(T40, T41, timesC_out_gga(T40, T41, T44)) → U10_ggaa(T40, T41, T44, plusE_in_gga(T44, T41))
U10_ggaa(T40, T41, T44, plusE_out_gga(T44, T41, X59)) → pD_out_ggaa(T40, T41, T44, X59)

The set Q consists of the following terms:

timesC_in_gga(x0, x1)
plusE_in_gga(x0, x1)
U3_gga(x0, x1, x2)
U4_gga(x0, x1, x2)
pD_in_ggaa(x0, x1)
U9_ggaa(x0, x1, x2)
U10_ggaa(x0, x1, x2, x3)

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

(35) QDPOrderProof (EQUIVALENT transformation)

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


The following pairs can be oriented strictly and are deleted.


FACTORA_IN_GA(cons(s(T24), cons(T25, T12))) → PB_IN_GGAAGA(T24, T25, T12)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(FACTORA_IN_GA(x1)) = x1   
POL(PB_IN_GGAAGA(x1, x2, x3)) = 1 + x3   
POL(PF_IN_GGAGA(x1, x2, x3)) = 1 + x3   
POL(U10_ggaa(x1, x2, x3, x4)) = 0   
POL(U3_gga(x1, x2, x3)) = 0   
POL(U4_gga(x1, x2, x3)) = 1   
POL(U5_GGAAGA(x1, x2, x3, x4)) = 1 + x3   
POL(U7_GGAGA(x1, x2, x3, x4)) = x3 + x4   
POL(U9_ggaa(x1, x2, x3)) = 0   
POL(cons(x1, x2)) = 1 + x2   
POL(pD_in_ggaa(x1, x2)) = 0   
POL(pD_out_ggaa(x1, x2, x3, x4)) = 0   
POL(plusE_in_gga(x1, x2)) = 1   
POL(plusE_out_gga(x1, x2, x3)) = 1   
POL(s(x1)) = 0   
POL(timesC_in_gga(x1, x2)) = 0   
POL(timesC_out_gga(x1, x2, x3)) = 0   

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

plusE_in_gga(0, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59) → U4_gga(T58, T59, plusE_in_gga(T58, T59))
U4_gga(T58, T59, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))

(36) Obligation:

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

PB_IN_GGAAGA(T24, T25, T12) → U5_GGAAGA(T24, T25, T12, timesC_in_gga(T24, T25))
U5_GGAAGA(T24, T25, T12, timesC_out_gga(T24, T25, T28)) → PF_IN_GGAGA(T28, T25, T12)
PF_IN_GGAGA(T28, T25, T12) → U7_GGAGA(T28, T25, T12, plusE_in_gga(T28, T25))
U7_GGAGA(T28, T25, T12, plusE_out_gga(T28, T25, T64)) → FACTORA_IN_GA(cons(T64, T12))

The TRS R consists of the following rules:

timesC_in_gga(0, T35) → timesC_out_gga(0, T35, 0)
timesC_in_gga(s(T40), T41) → U3_gga(T40, T41, pD_in_ggaa(T40, T41))
plusE_in_gga(0, T53) → plusE_out_gga(0, T53, T53)
plusE_in_gga(s(T58), T59) → U4_gga(T58, T59, plusE_in_gga(T58, T59))
U3_gga(T40, T41, pD_out_ggaa(T40, T41, X58, X59)) → timesC_out_gga(s(T40), T41, X59)
U4_gga(T58, T59, plusE_out_gga(T58, T59, X82)) → plusE_out_gga(s(T58), T59, s(X82))
pD_in_ggaa(T40, T41) → U9_ggaa(T40, T41, timesC_in_gga(T40, T41))
U9_ggaa(T40, T41, timesC_out_gga(T40, T41, T44)) → U10_ggaa(T40, T41, T44, plusE_in_gga(T44, T41))
U10_ggaa(T40, T41, T44, plusE_out_gga(T44, T41, X59)) → pD_out_ggaa(T40, T41, T44, X59)

The set Q consists of the following terms:

timesC_in_gga(x0, x1)
plusE_in_gga(x0, x1)
U3_gga(x0, x1, x2)
U4_gga(x0, x1, x2)
pD_in_ggaa(x0, x1)
U9_ggaa(x0, x1, x2)
U10_ggaa(x0, x1, x2, x3)

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

(37) DependencyGraphProof (EQUIVALENT transformation)

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

(38) TRUE