MAYBE

Found an example we currently can't prove?
-> Consider contributing it to the benchmark set: https://mysolvertimesout.org/

proof of /hpcwork/ff862203/termcomp26/benchmarks/uMcoY.pl
# AProVE Commit ID: 23a904c96b029b0a549cde0d0d17dbccf967db59 jckassing 20260626 unpublished dirty


Left Termination of the query pattern

s2(g,a)

w.r.t. the given Prolog program could not be shown:

(0) Prolog
(1) PrologToPiTRSProof [SOUND, 0 ms]
(2) PiTRS
    (3) DependencyPairsProof [EQUIVALENT, 0 ms]
    (4) PiDP
    (5) DependencyGraphProof [EQUIVALENT, 0 ms]
    (6) AND
        (7) PiDP
            (8) UsableRulesProof [EQUIVALENT, 0 ms]
            (9) PiDP
            (10) PiDPToQDPProof [SOUND, 5 ms]
            (11) QDP
            (12) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (13) YES
        (14) PiDP
            (15) UsableRulesProof [EQUIVALENT, 0 ms]
            (16) PiDP
            (17) PiDPToQDPProof [EQUIVALENT, 0 ms]
            (18) QDP
            (19) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (20) YES
        (21) PiDP
            (22) PiDPToQDPProof [SOUND, 0 ms]
            (23) QDP
            (24) QDPOrderProof [EQUIVALENT, 27 ms]
            (25) QDP
            (26) QDPQMonotonicMRRProof [EQUIVALENT, 26 ms]
            (27) QDP
                (28) QDPQMonotonicMRRProof [EQUIVALENT, 15 ms]
                (29) QDP
                (30) UsableRulesReductionPairsProof [EQUIVALENT, 12 ms]
                (31) QDP
                (32) MRRProof [EQUIVALENT, 0 ms]
                (33) QDP
                (34) UsableRulesProof [EQUIVALENT, 0 ms]
                (35) QDP
                (36) QReductionProof [EQUIVALENT, 0 ms]
                (37) QDP
                (38) UsableRulesReductionPairsProof [EQUIVALENT, 5 ms]
                (39) QDP
                (40) UsableRulesProof [EQUIVALENT, 0 ms]
                (41) QDP
(42) PrologToPiTRSProof [SOUND, 0 ms]
(43) PiTRS
    (44) DependencyPairsProof [EQUIVALENT, 0 ms]
    (45) PiDP
    (46) DependencyGraphProof [EQUIVALENT, 0 ms]
    (47) AND
        (48) PiDP
            (49) UsableRulesProof [EQUIVALENT, 0 ms]
            (50) PiDP
            (51) PiDPToQDPProof [SOUND, 0 ms]
            (52) QDP
            (53) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (54) YES
        (55) PiDP
            (56) UsableRulesProof [EQUIVALENT, 0 ms]
            (57) PiDP
            (58) PiDPToQDPProof [EQUIVALENT, 0 ms]
            (59) QDP
            (60) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (61) YES
        (62) PiDP
            (63) PiDPToQDPProof [SOUND, 0 ms]
            (64) QDP
            (65) QDPOrderProof [EQUIVALENT, 32 ms]
            (66) QDP
            (67) QDPQMonotonicMRRProof [EQUIVALENT, 21 ms]
            (68) QDP
                (69) UsableRulesProof [EQUIVALENT, 0 ms]
                (70) QDP
                (71) QReductionProof [EQUIVALENT, 0 ms]
                (72) QDP
            (73) QDPOrderProof [EQUIVALENT, 17 ms]
            (74) QDP
(75) PrologToTRSTransformerProof [SOUND, 0 ms]
(76) QTRS
    (77) DependencyPairsProof [EQUIVALENT, 0 ms]
    (78) QDP
    (79) DependencyGraphProof [EQUIVALENT, 0 ms]
    (80) AND
        (81) QDP
            (82) UsableRulesProof [EQUIVALENT, 0 ms]
            (83) QDP
            (84) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (85) YES
        (86) QDP
            (87) UsableRulesProof [EQUIVALENT, 0 ms]
            (88) QDP
            (89) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (90) YES
        (91) QDP
            (92) NonLoopProof [COMPLETE, 2 ms]
            (93) NO
(94) PrologToIRSwTTransformerProof [SOUND, 0 ms]
(95) AND
    (96) IRSwT
        (97) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms]
        (98) TRUE
    (99) IRSwT
        (100) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms]
        (101) IRSwT
        (102) IntTRSCompressionProof [EQUIVALENT, 18 ms]
        (103) IRSwT
        (104) IRSFormatTransformerProof [EQUIVALENT, 0 ms]
        (105) IRSwT
        (106) IRSwTTerminationDigraphProof [EQUIVALENT, 3 ms]
        (107) IRSwT
        (108) TempFilterProof [SOUND, 2 ms]
        (109) IRSwT
        (110) IRSwTToQDPProof [SOUND, 0 ms]
        (111) QDP
        (112) QDPSizeChangeProof [EQUIVALENT, 0 ms]
        (113) YES
    (114) IRSwT
        (115) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms]
        (116) IRSwT
        (117) IntTRSCompressionProof [EQUIVALENT, 4 ms]
        (118) IRSwT
        (119) IRSFormatTransformerProof [EQUIVALENT, 0 ms]
        (120) IRSwT
        (121) IRSwTTerminationDigraphProof [EQUIVALENT, 10 ms]
        (122) IRSwT
(123) PrologToDTProblemTransformerProof [SOUND, 49 ms]
(124) TRIPLES
    (125) UndefinedPredicateInTriplesTransformerProof [SOUND, 0 ms]
    (126) TRIPLES
    (127) TriplesToPiDPProof [SOUND, 37 ms]
    (128) PiDP
    (129) DependencyGraphProof [EQUIVALENT, 0 ms]
    (130) AND
        (131) PiDP
            (132) UsableRulesProof [EQUIVALENT, 0 ms]
            (133) PiDP
            (134) PiDPToQDPProof [SOUND, 0 ms]
            (135) QDP
            (136) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (137) YES
        (138) PiDP
            (139) UsableRulesProof [EQUIVALENT, 0 ms]
            (140) PiDP
            (141) PiDPToQDPProof [EQUIVALENT, 0 ms]
            (142) QDP
            (143) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (144) YES
        (145) PiDP
            (146) PiDPToQDPProof [SOUND, 0 ms]
            (147) QDP
            (148) QDPOrderProof [EQUIVALENT, 467 ms]
            (149) QDP
            (150) DependencyGraphProof [EQUIVALENT, 0 ms]
            (151) QDP
            (152) UsableRulesProof [EQUIVALENT, 0 ms]
            (153) QDP
            (154) QReductionProof [EQUIVALENT, 0 ms]
            (155) QDP


----------------------------------------

(0)
Obligation:
Clauses:

s2(plus(A, plus(B, C)), D) :- s2(plus(plus(A, B), C), D).
s2(plus(A, B), C) :- s2(plus(B, A), C).
s2(plus(X, 0), X).
s2(plus(X, Y), Z) :- ','(s2(X, A), ','(s2(Y, B), s2(plus(A, B), Z))).
s2(plus(A, B), C) :- ','(isNat(A), ','(isNat(B), add(A, B, C))).
isNat(s(X)) :- isNat(X).
isNat(0).
add(s(X), Y, s(Z)) :- add(X, Y, Z).
add(0, X, X).


Query: s2(g,a)
----------------------------------------

(1) PrologToPiTRSProof (SOUND)
We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:

s2_in_2: (b,f)

isNat_in_1: (b)

add_in_3: (b,b,f)

Transforming Prolog into the following Term Rewriting System:

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

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x2)

isNat_out_g(x1)  =  isNat_out_g

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)





Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



----------------------------------------

(2)
Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x2)

isNat_out_g(x1)  =  isNat_out_g

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)



----------------------------------------

(3) DependencyPairsProof (EQUIVALENT)
Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, plus(B, C)), D) -> U1_GA(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   S2_IN_GA(plus(A, plus(B, C)), D) -> S2_IN_GA(plus(plus(A, B), C), D)
   S2_IN_GA(plus(A, B), C) -> U2_GA(A, B, C, s2_in_ga(plus(B, A), C))
   S2_IN_GA(plus(A, B), C) -> S2_IN_GA(plus(B, A), C)
   S2_IN_GA(plus(X, Y), Z) -> U3_GA(X, Y, Z, s2_in_ga(X, A))
   S2_IN_GA(plus(X, Y), Z) -> S2_IN_GA(X, A)
   S2_IN_GA(plus(A, B), C) -> U6_GA(A, B, C, isNat_in_g(A))
   S2_IN_GA(plus(A, B), C) -> ISNAT_IN_G(A)
   ISNAT_IN_G(s(X)) -> U9_G(X, isNat_in_g(X))
   ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)
   U6_GA(A, B, C, isNat_out_g(A)) -> U7_GA(A, B, C, isNat_in_g(B))
   U6_GA(A, B, C, isNat_out_g(A)) -> ISNAT_IN_G(B)
   U7_GA(A, B, C, isNat_out_g(B)) -> U8_GA(A, B, C, add_in_gga(A, B, C))
   U7_GA(A, B, C, isNat_out_g(B)) -> ADD_IN_GGA(A, B, C)
   ADD_IN_GGA(s(X), Y, s(Z)) -> U10_GGA(X, Y, Z, add_in_gga(X, Y, Z))
   ADD_IN_GGA(s(X), Y, s(Z)) -> ADD_IN_GGA(X, Y, Z)
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> U4_GA(X, Y, Z, A, s2_in_ga(Y, B))
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> S2_IN_GA(Y, B)
   U4_GA(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_GA(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U4_GA(X, Y, Z, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B), Z)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x2)

isNat_out_g(x1)  =  isNat_out_g

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)

S2_IN_GA(x1, x2)  =  S2_IN_GA(x1)

U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)

U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)

U3_GA(x1, x2, x3, x4)  =  U3_GA(x2, x4)

U6_GA(x1, x2, x3, x4)  =  U6_GA(x1, x2, x4)

ISNAT_IN_G(x1)  =  ISNAT_IN_G(x1)

U9_G(x1, x2)  =  U9_G(x2)

U7_GA(x1, x2, x3, x4)  =  U7_GA(x1, x2, x4)

U8_GA(x1, x2, x3, x4)  =  U8_GA(x4)

ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)

U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x4)

U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x4, x5)

U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)


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

(4)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, plus(B, C)), D) -> U1_GA(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   S2_IN_GA(plus(A, plus(B, C)), D) -> S2_IN_GA(plus(plus(A, B), C), D)
   S2_IN_GA(plus(A, B), C) -> U2_GA(A, B, C, s2_in_ga(plus(B, A), C))
   S2_IN_GA(plus(A, B), C) -> S2_IN_GA(plus(B, A), C)
   S2_IN_GA(plus(X, Y), Z) -> U3_GA(X, Y, Z, s2_in_ga(X, A))
   S2_IN_GA(plus(X, Y), Z) -> S2_IN_GA(X, A)
   S2_IN_GA(plus(A, B), C) -> U6_GA(A, B, C, isNat_in_g(A))
   S2_IN_GA(plus(A, B), C) -> ISNAT_IN_G(A)
   ISNAT_IN_G(s(X)) -> U9_G(X, isNat_in_g(X))
   ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)
   U6_GA(A, B, C, isNat_out_g(A)) -> U7_GA(A, B, C, isNat_in_g(B))
   U6_GA(A, B, C, isNat_out_g(A)) -> ISNAT_IN_G(B)
   U7_GA(A, B, C, isNat_out_g(B)) -> U8_GA(A, B, C, add_in_gga(A, B, C))
   U7_GA(A, B, C, isNat_out_g(B)) -> ADD_IN_GGA(A, B, C)
   ADD_IN_GGA(s(X), Y, s(Z)) -> U10_GGA(X, Y, Z, add_in_gga(X, Y, Z))
   ADD_IN_GGA(s(X), Y, s(Z)) -> ADD_IN_GGA(X, Y, Z)
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> U4_GA(X, Y, Z, A, s2_in_ga(Y, B))
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> S2_IN_GA(Y, B)
   U4_GA(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_GA(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U4_GA(X, Y, Z, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B), Z)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x2)

isNat_out_g(x1)  =  isNat_out_g

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)

S2_IN_GA(x1, x2)  =  S2_IN_GA(x1)

U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)

U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)

U3_GA(x1, x2, x3, x4)  =  U3_GA(x2, x4)

U6_GA(x1, x2, x3, x4)  =  U6_GA(x1, x2, x4)

ISNAT_IN_G(x1)  =  ISNAT_IN_G(x1)

U9_G(x1, x2)  =  U9_G(x2)

U7_GA(x1, x2, x3, x4)  =  U7_GA(x1, x2, x4)

U8_GA(x1, x2, x3, x4)  =  U8_GA(x4)

ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)

U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x4)

U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x4, x5)

U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)


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

(5) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 11 less nodes.
----------------------------------------

(6)
Complex Obligation (AND)

----------------------------------------

(7)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   ADD_IN_GGA(s(X), Y, s(Z)) -> ADD_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x2)

isNat_out_g(x1)  =  isNat_out_g

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)

ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)


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

(8) UsableRulesProof (EQUIVALENT)
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:

   ADD_IN_GGA(s(X), Y, s(Z)) -> ADD_IN_GGA(X, Y, Z)

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

ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)


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

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

   ADD_IN_GGA(s(X), Y) -> ADD_IN_GGA(X, Y)

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

(12) QDPSizeChangeProof (EQUIVALENT)
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:
*ADD_IN_GGA(s(X), Y) -> ADD_IN_GGA(X, Y)
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:

   ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x2)

isNat_out_g(x1)  =  isNat_out_g

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)

ISNAT_IN_G(x1)  =  ISNAT_IN_G(x1)


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

(15) UsableRulesProof (EQUIVALENT)
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:

   ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)

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

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

   ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)

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

(19) QDPSizeChangeProof (EQUIVALENT)
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:
*ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)
The graph contains the following edges 1 > 1


----------------------------------------

(20)
YES

----------------------------------------

(21)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B), C) -> S2_IN_GA(plus(B, A), C)
   S2_IN_GA(plus(A, plus(B, C)), D) -> S2_IN_GA(plus(plus(A, B), C), D)
   S2_IN_GA(plus(X, Y), Z) -> U3_GA(X, Y, Z, s2_in_ga(X, A))
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> U4_GA(X, Y, Z, A, s2_in_ga(Y, B))
   U4_GA(X, Y, Z, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B), Z)
   S2_IN_GA(plus(X, Y), Z) -> S2_IN_GA(X, A)
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> S2_IN_GA(Y, B)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x2)

isNat_out_g(x1)  =  isNat_out_g

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)

S2_IN_GA(x1, x2)  =  S2_IN_GA(x1)

U3_GA(x1, x2, x3, x4)  =  U3_GA(x2, x4)

U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x4, x5)


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

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

(23)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(Y, s2_in_ga(X))
   U3_GA(Y, s2_out_ga(A)) -> U4_GA(A, s2_in_ga(Y))
   U4_GA(A, s2_out_ga(B)) -> S2_IN_GA(plus(A, B))
   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(Y, s2_out_ga(A)) -> S2_IN_GA(Y)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, 0)) -> s2_out_ga(X)
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g
   U9_g(isNat_out_g) -> isNat_out_g
   U6_ga(A, B, isNat_out_g) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g) -> U8_ga(add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(X)
   U10_gga(add_out_gga(Z)) -> add_out_gga(s(Z))
   U8_ga(add_out_gga(C)) -> s2_out_ga(C)
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0)
   U8_ga(x0)
   U3_ga(x0, x1)
   U4_ga(x0, x1)
   U5_ga(x0)
   U2_ga(x0)
   U1_ga(x0)

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

(24) QDPOrderProof (EQUIVALENT)
We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.

   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(Y, s2_out_ga(A)) -> S2_IN_GA(Y)
The remaining pairs can at least be oriented weakly.
Used ordering:  Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( U3_GA_2(x_1, x_2) ) = 2x_1 + 2x_2 + 1
POL( U4_GA_2(x_1, x_2) ) = 2x_1 + 2x_2 + 1
POL( s2_in_ga_1(x_1) ) = max{0, x_1 - 1}
POL( plus_2(x_1, x_2) ) = x_1 + x_2 + 1
POL( U1_ga_1(x_1) ) = x_1
POL( U2_ga_1(x_1) ) = x_1
POL( 0 ) = 0
POL( s2_out_ga_1(x_1) ) = x_1
POL( U3_ga_2(x_1, x_2) ) = x_1 + x_2
POL( U6_ga_3(x_1, ..., x_3) ) = x_2
POL( isNat_in_g_1(x_1) ) = 0
POL( U4_ga_2(x_1, x_2) ) = x_1 + x_2
POL( U5_ga_1(x_1) ) = x_1
POL( U7_ga_3(x_1, ..., x_3) ) = x_2
POL( s_1(x_1) ) = 0
POL( U9_g_1(x_1) ) = max{0, -2}
POL( isNat_out_g ) = 0
POL( U8_ga_1(x_1) ) = x_1
POL( add_in_gga_2(x_1, x_2) ) = x_2
POL( U10_gga_1(x_1) ) = max{0, -2}
POL( add_out_gga_1(x_1) ) = x_1
POL( S2_IN_GA_1(x_1) ) = max{0, 2x_1 - 1}

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

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, 0)) -> s2_out_ga(X)
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U6_ga(A, B, isNat_out_g) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g) -> U8_ga(add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(X)
   U8_ga(add_out_gga(C)) -> s2_out_ga(C)
   U10_gga(add_out_gga(Z)) -> add_out_gga(s(Z))


----------------------------------------

(25)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(Y, s2_in_ga(X))
   U3_GA(Y, s2_out_ga(A)) -> U4_GA(A, s2_in_ga(Y))
   U4_GA(A, s2_out_ga(B)) -> S2_IN_GA(plus(A, B))

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, 0)) -> s2_out_ga(X)
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g
   U9_g(isNat_out_g) -> isNat_out_g
   U6_ga(A, B, isNat_out_g) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g) -> U8_ga(add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(X)
   U10_gga(add_out_gga(Z)) -> add_out_gga(s(Z))
   U8_ga(add_out_gga(C)) -> s2_out_ga(C)
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0)
   U8_ga(x0)
   U3_ga(x0, x1)
   U4_ga(x0, x1)
   U5_ga(x0)
   U2_ga(x0)
   U1_ga(x0)

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

(26) QDPQMonotonicMRRProof (EQUIVALENT)
By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain.


Strictly oriented rules of the TRS R:

   s2_in_ga(plus(X, 0)) -> s2_out_ga(X)

Used ordering: Polynomial interpretation [POLO]:

   POL(0) = 1
   POL(S2_IN_GA(x_1)) = 2*x_1
   POL(U10_gga(x_1)) = 0
   POL(U1_ga(x_1)) = x_1
   POL(U2_ga(x_1)) = x_1
   POL(U3_GA(x_1, x_2)) = 2*x_1 + x_2
   POL(U3_ga(x_1, x_2)) = 2*x_1 + x_2
   POL(U4_GA(x_1, x_2)) = 2*x_1 + x_2
   POL(U4_ga(x_1, x_2)) = 2*x_1 + x_2
   POL(U5_ga(x_1)) = x_1
   POL(U6_ga(x_1, x_2, x_3)) = 2*x_2
   POL(U7_ga(x_1, x_2, x_3)) = 2*x_2
   POL(U8_ga(x_1)) = 2*x_1
   POL(U9_g(x_1)) = 0
   POL(add_in_gga(x_1, x_2)) = x_2
   POL(add_out_gga(x_1)) = x_1
   POL(isNat_in_g(x_1)) = 0
   POL(isNat_out_g) = 0
   POL(plus(x_1, x_2)) = x_1 + x_2
   POL(s(x_1)) = 0
   POL(s2_in_ga(x_1)) = 2*x_1
   POL(s2_out_ga(x_1)) = 2*x_1


----------------------------------------

(27)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(Y, s2_in_ga(X))
   U3_GA(Y, s2_out_ga(A)) -> U4_GA(A, s2_in_ga(Y))
   U4_GA(A, s2_out_ga(B)) -> S2_IN_GA(plus(A, B))
   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(Y, s2_out_ga(A)) -> S2_IN_GA(Y)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g
   U9_g(isNat_out_g) -> isNat_out_g
   U6_ga(A, B, isNat_out_g) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g) -> U8_ga(add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(X)
   U10_gga(add_out_gga(Z)) -> add_out_gga(s(Z))
   U8_ga(add_out_gga(C)) -> s2_out_ga(C)
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0)
   U8_ga(x0)
   U3_ga(x0, x1)
   U4_ga(x0, x1)
   U5_ga(x0)
   U2_ga(x0)
   U1_ga(x0)

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

(28) QDPQMonotonicMRRProof (EQUIVALENT)
By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain.


Strictly oriented rules of the TRS R:

   U8_ga(add_out_gga(C)) -> s2_out_ga(C)

Used ordering: Polynomial interpretation [POLO]:

   POL(0) = 1
   POL(S2_IN_GA(x_1)) = 2*x_1
   POL(U10_gga(x_1)) = x_1
   POL(U1_ga(x_1)) = x_1
   POL(U2_ga(x_1)) = x_1
   POL(U3_GA(x_1, x_2)) = 2*x_1 + 2*x_2
   POL(U3_ga(x_1, x_2)) = x_1 + x_2
   POL(U4_GA(x_1, x_2)) = 2*x_1 + 2*x_2
   POL(U4_ga(x_1, x_2)) = x_1 + x_2
   POL(U5_ga(x_1)) = x_1
   POL(U6_ga(x_1, x_2, x_3)) = x_1 + x_2
   POL(U7_ga(x_1, x_2, x_3)) = x_1 + x_2
   POL(U8_ga(x_1)) = x_1
   POL(U9_g(x_1)) = 0
   POL(add_in_gga(x_1, x_2)) = x_1 + x_2
   POL(add_out_gga(x_1)) = 1 + x_1
   POL(isNat_in_g(x_1)) = 0
   POL(isNat_out_g) = 0
   POL(plus(x_1, x_2)) = x_1 + x_2
   POL(s(x_1)) = x_1
   POL(s2_in_ga(x_1)) = x_1
   POL(s2_out_ga(x_1)) = x_1


----------------------------------------

(29)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(Y, s2_in_ga(X))
   U3_GA(Y, s2_out_ga(A)) -> U4_GA(A, s2_in_ga(Y))
   U4_GA(A, s2_out_ga(B)) -> S2_IN_GA(plus(A, B))
   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(Y, s2_out_ga(A)) -> S2_IN_GA(Y)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g
   U9_g(isNat_out_g) -> isNat_out_g
   U6_ga(A, B, isNat_out_g) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g) -> U8_ga(add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(X)
   U10_gga(add_out_gga(Z)) -> add_out_gga(s(Z))
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0)
   U8_ga(x0)
   U3_ga(x0, x1)
   U4_ga(x0, x1)
   U5_ga(x0)
   U2_ga(x0)
   U1_ga(x0)

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

(30) UsableRulesReductionPairsProof (EQUIVALENT)
By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

   isNat_in_g(0) -> isNat_out_g
   add_in_gga(0, X) -> add_out_gga(X)
Used ordering: POLO with Polynomial interpretation [POLO]:

   POL(0) = 0
   POL(S2_IN_GA(x_1)) = 2*x_1
   POL(U10_gga(x_1)) = x_1
   POL(U1_ga(x_1)) = x_1
   POL(U2_ga(x_1)) = x_1
   POL(U3_GA(x_1, x_2)) = 2*x_1 + x_2
   POL(U3_ga(x_1, x_2)) = 2*x_1 + x_2
   POL(U4_GA(x_1, x_2)) = 2*x_1 + x_2
   POL(U4_ga(x_1, x_2)) = 2*x_1 + x_2
   POL(U5_ga(x_1)) = x_1
   POL(U6_ga(x_1, x_2, x_3)) = x_1 + 2*x_2 + x_3
   POL(U7_ga(x_1, x_2, x_3)) = x_1 + x_2 + x_3
   POL(U8_ga(x_1)) = x_1
   POL(U9_g(x_1)) = x_1
   POL(add_in_gga(x_1, x_2)) = x_1 + x_2
   POL(add_out_gga(x_1)) = x_1
   POL(isNat_in_g(x_1)) = x_1
   POL(isNat_out_g) = 0
   POL(plus(x_1, x_2)) = x_1 + x_2
   POL(s(x_1)) = x_1
   POL(s2_in_ga(x_1)) = 2*x_1
   POL(s2_out_ga(x_1)) = 2*x_1


----------------------------------------

(31)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(Y, s2_in_ga(X))
   U3_GA(Y, s2_out_ga(A)) -> U4_GA(A, s2_in_ga(Y))
   U4_GA(A, s2_out_ga(B)) -> S2_IN_GA(plus(A, B))
   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(Y, s2_out_ga(A)) -> S2_IN_GA(Y)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(isNat_in_g(X))
   U6_ga(A, B, isNat_out_g) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g) -> U8_ga(add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(add_in_gga(X, Y))
   U10_gga(add_out_gga(Z)) -> add_out_gga(s(Z))
   U9_g(isNat_out_g) -> isNat_out_g
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0)
   U8_ga(x0)
   U3_ga(x0, x1)
   U4_ga(x0, x1)
   U5_ga(x0)
   U2_ga(x0)
   U1_ga(x0)

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

(32) MRRProof (EQUIVALENT)
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 rules of the TRS R:

   U6_ga(A, B, isNat_out_g) -> U7_ga(A, B, isNat_in_g(B))

Used ordering: Polynomial interpretation [POLO]:

   POL(S2_IN_GA(x_1)) = 2*x_1
   POL(U10_gga(x_1)) = x_1
   POL(U1_ga(x_1)) = x_1
   POL(U2_ga(x_1)) = x_1
   POL(U3_GA(x_1, x_2)) = 2*x_1 + x_2
   POL(U3_ga(x_1, x_2)) = 2*x_1 + x_2
   POL(U4_GA(x_1, x_2)) = 2*x_1 + x_2
   POL(U4_ga(x_1, x_2)) = 2*x_1 + x_2
   POL(U5_ga(x_1)) = x_1
   POL(U6_ga(x_1, x_2, x_3)) = x_1 + 2*x_2 + x_3
   POL(U7_ga(x_1, x_2, x_3)) = x_1 + x_2 + x_3
   POL(U8_ga(x_1)) = 1 + x_1
   POL(U9_g(x_1)) = x_1
   POL(add_in_gga(x_1, x_2)) = x_1 + x_2
   POL(add_out_gga(x_1)) = 2*x_1
   POL(isNat_in_g(x_1)) = x_1
   POL(isNat_out_g) = 1
   POL(plus(x_1, x_2)) = x_1 + x_2
   POL(s(x_1)) = x_1
   POL(s2_in_ga(x_1)) = 2*x_1
   POL(s2_out_ga(x_1)) = 2*x_1


----------------------------------------

(33)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(Y, s2_in_ga(X))
   U3_GA(Y, s2_out_ga(A)) -> U4_GA(A, s2_in_ga(Y))
   U4_GA(A, s2_out_ga(B)) -> S2_IN_GA(plus(A, B))
   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(Y, s2_out_ga(A)) -> S2_IN_GA(Y)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(isNat_in_g(X))
   U7_ga(A, B, isNat_out_g) -> U8_ga(add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(add_in_gga(X, Y))
   U10_gga(add_out_gga(Z)) -> add_out_gga(s(Z))
   U9_g(isNat_out_g) -> isNat_out_g
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0)
   U8_ga(x0)
   U3_ga(x0, x1)
   U4_ga(x0, x1)
   U5_ga(x0)
   U2_ga(x0)
   U1_ga(x0)

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

(34) UsableRulesProof (EQUIVALENT)
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.
----------------------------------------

(35)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(Y, s2_in_ga(X))
   U3_GA(Y, s2_out_ga(A)) -> U4_GA(A, s2_in_ga(Y))
   U4_GA(A, s2_out_ga(B)) -> S2_IN_GA(plus(A, B))
   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(Y, s2_out_ga(A)) -> S2_IN_GA(Y)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(isNat_in_g(X))
   U9_g(isNat_out_g) -> isNat_out_g
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0)
   U8_ga(x0)
   U3_ga(x0, x1)
   U4_ga(x0, x1)
   U5_ga(x0)
   U2_ga(x0)
   U1_ga(x0)

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

(36) QReductionProof (EQUIVALENT)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0)
   U8_ga(x0)


----------------------------------------

(37)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(Y, s2_in_ga(X))
   U3_GA(Y, s2_out_ga(A)) -> U4_GA(A, s2_in_ga(Y))
   U4_GA(A, s2_out_ga(B)) -> S2_IN_GA(plus(A, B))
   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(Y, s2_out_ga(A)) -> S2_IN_GA(Y)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(isNat_in_g(X))
   U9_g(isNat_out_g) -> isNat_out_g
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0)
   U6_ga(x0, x1, x2)
   U3_ga(x0, x1)
   U4_ga(x0, x1)
   U5_ga(x0)
   U2_ga(x0)
   U1_ga(x0)

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

(38) UsableRulesReductionPairsProof (EQUIVALENT)
By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

   isNat_in_g(s(X)) -> U9_g(isNat_in_g(X))
Used ordering: POLO with Polynomial interpretation [POLO]:

   POL(S2_IN_GA(x_1)) = 2*x_1
   POL(U1_ga(x_1)) = x_1
   POL(U2_ga(x_1)) = x_1
   POL(U3_GA(x_1, x_2)) = 2*x_1 + x_2
   POL(U3_ga(x_1, x_2)) = 2*x_1 + x_2
   POL(U4_GA(x_1, x_2)) = 2*x_1 + x_2
   POL(U4_ga(x_1, x_2)) = 2*x_1 + x_2
   POL(U5_ga(x_1)) = x_1
   POL(U6_ga(x_1, x_2, x_3)) = x_1 + x_2 + x_3
   POL(U9_g(x_1)) = x_1
   POL(isNat_in_g(x_1)) = x_1
   POL(isNat_out_g) = 0
   POL(plus(x_1, x_2)) = x_1 + x_2
   POL(s(x_1)) = 2*x_1
   POL(s2_in_ga(x_1)) = 2*x_1
   POL(s2_out_ga(x_1)) = 2*x_1


----------------------------------------

(39)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(Y, s2_in_ga(X))
   U3_GA(Y, s2_out_ga(A)) -> U4_GA(A, s2_in_ga(Y))
   U4_GA(A, s2_out_ga(B)) -> S2_IN_GA(plus(A, B))
   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(Y, s2_out_ga(A)) -> S2_IN_GA(Y)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   U9_g(isNat_out_g) -> isNat_out_g
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0)
   U6_ga(x0, x1, x2)
   U3_ga(x0, x1)
   U4_ga(x0, x1)
   U5_ga(x0)
   U2_ga(x0)
   U1_ga(x0)

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

(40) UsableRulesProof (EQUIVALENT)
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.
----------------------------------------

(41)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(Y, s2_in_ga(X))
   U3_GA(Y, s2_out_ga(A)) -> U4_GA(A, s2_in_ga(Y))
   U4_GA(A, s2_out_ga(B)) -> S2_IN_GA(plus(A, B))
   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(Y, s2_out_ga(A)) -> S2_IN_GA(Y)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   U3_ga(Y, s2_out_ga(A)) -> U4_ga(A, s2_in_ga(Y))
   U4_ga(A, s2_out_ga(B)) -> U5_ga(s2_in_ga(plus(A, B)))
   U5_ga(s2_out_ga(Z)) -> s2_out_ga(Z)
   U2_ga(s2_out_ga(C)) -> s2_out_ga(C)
   U1_ga(s2_out_ga(D)) -> s2_out_ga(D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0)
   U6_ga(x0, x1, x2)
   U3_ga(x0, x1)
   U4_ga(x0, x1)
   U5_ga(x0)
   U2_ga(x0)
   U1_ga(x0)

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

(42) PrologToPiTRSProof (SOUND)
We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:

s2_in_2: (b,f)

isNat_in_1: (b)

add_in_3: (b,b,f)

Transforming Prolog into the following Term Rewriting System:

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

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x3, x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x2, x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x1, x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x1, x2)

isNat_out_g(x1)  =  isNat_out_g(x1)

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x1, x2, x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x1, x2, x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x2, x4)





Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



----------------------------------------

(43)
Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x3, x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x2, x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x1, x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x1, x2)

isNat_out_g(x1)  =  isNat_out_g(x1)

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x1, x2, x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x1, x2, x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x2, x4)



----------------------------------------

(44) DependencyPairsProof (EQUIVALENT)
Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, plus(B, C)), D) -> U1_GA(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   S2_IN_GA(plus(A, plus(B, C)), D) -> S2_IN_GA(plus(plus(A, B), C), D)
   S2_IN_GA(plus(A, B), C) -> U2_GA(A, B, C, s2_in_ga(plus(B, A), C))
   S2_IN_GA(plus(A, B), C) -> S2_IN_GA(plus(B, A), C)
   S2_IN_GA(plus(X, Y), Z) -> U3_GA(X, Y, Z, s2_in_ga(X, A))
   S2_IN_GA(plus(X, Y), Z) -> S2_IN_GA(X, A)
   S2_IN_GA(plus(A, B), C) -> U6_GA(A, B, C, isNat_in_g(A))
   S2_IN_GA(plus(A, B), C) -> ISNAT_IN_G(A)
   ISNAT_IN_G(s(X)) -> U9_G(X, isNat_in_g(X))
   ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)
   U6_GA(A, B, C, isNat_out_g(A)) -> U7_GA(A, B, C, isNat_in_g(B))
   U6_GA(A, B, C, isNat_out_g(A)) -> ISNAT_IN_G(B)
   U7_GA(A, B, C, isNat_out_g(B)) -> U8_GA(A, B, C, add_in_gga(A, B, C))
   U7_GA(A, B, C, isNat_out_g(B)) -> ADD_IN_GGA(A, B, C)
   ADD_IN_GGA(s(X), Y, s(Z)) -> U10_GGA(X, Y, Z, add_in_gga(X, Y, Z))
   ADD_IN_GGA(s(X), Y, s(Z)) -> ADD_IN_GGA(X, Y, Z)
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> U4_GA(X, Y, Z, A, s2_in_ga(Y, B))
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> S2_IN_GA(Y, B)
   U4_GA(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_GA(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U4_GA(X, Y, Z, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B), Z)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x3, x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x2, x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x1, x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x1, x2)

isNat_out_g(x1)  =  isNat_out_g(x1)

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x1, x2, x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x1, x2, x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x2, x4)

S2_IN_GA(x1, x2)  =  S2_IN_GA(x1)

U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x3, x5)

U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x2, x4)

U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x2, x4)

U6_GA(x1, x2, x3, x4)  =  U6_GA(x1, x2, x4)

ISNAT_IN_G(x1)  =  ISNAT_IN_G(x1)

U9_G(x1, x2)  =  U9_G(x1, x2)

U7_GA(x1, x2, x3, x4)  =  U7_GA(x1, x2, x4)

U8_GA(x1, x2, x3, x4)  =  U8_GA(x1, x2, x4)

ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)

U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x1, x2, x4)

U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x1, x2, x4, x5)

U5_GA(x1, x2, x3, x4)  =  U5_GA(x1, x2, x4)


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

(45)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, plus(B, C)), D) -> U1_GA(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   S2_IN_GA(plus(A, plus(B, C)), D) -> S2_IN_GA(plus(plus(A, B), C), D)
   S2_IN_GA(plus(A, B), C) -> U2_GA(A, B, C, s2_in_ga(plus(B, A), C))
   S2_IN_GA(plus(A, B), C) -> S2_IN_GA(plus(B, A), C)
   S2_IN_GA(plus(X, Y), Z) -> U3_GA(X, Y, Z, s2_in_ga(X, A))
   S2_IN_GA(plus(X, Y), Z) -> S2_IN_GA(X, A)
   S2_IN_GA(plus(A, B), C) -> U6_GA(A, B, C, isNat_in_g(A))
   S2_IN_GA(plus(A, B), C) -> ISNAT_IN_G(A)
   ISNAT_IN_G(s(X)) -> U9_G(X, isNat_in_g(X))
   ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)
   U6_GA(A, B, C, isNat_out_g(A)) -> U7_GA(A, B, C, isNat_in_g(B))
   U6_GA(A, B, C, isNat_out_g(A)) -> ISNAT_IN_G(B)
   U7_GA(A, B, C, isNat_out_g(B)) -> U8_GA(A, B, C, add_in_gga(A, B, C))
   U7_GA(A, B, C, isNat_out_g(B)) -> ADD_IN_GGA(A, B, C)
   ADD_IN_GGA(s(X), Y, s(Z)) -> U10_GGA(X, Y, Z, add_in_gga(X, Y, Z))
   ADD_IN_GGA(s(X), Y, s(Z)) -> ADD_IN_GGA(X, Y, Z)
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> U4_GA(X, Y, Z, A, s2_in_ga(Y, B))
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> S2_IN_GA(Y, B)
   U4_GA(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_GA(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U4_GA(X, Y, Z, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B), Z)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x3, x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x2, x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x1, x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x1, x2)

isNat_out_g(x1)  =  isNat_out_g(x1)

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x1, x2, x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x1, x2, x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x2, x4)

S2_IN_GA(x1, x2)  =  S2_IN_GA(x1)

U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x3, x5)

U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x2, x4)

U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x2, x4)

U6_GA(x1, x2, x3, x4)  =  U6_GA(x1, x2, x4)

ISNAT_IN_G(x1)  =  ISNAT_IN_G(x1)

U9_G(x1, x2)  =  U9_G(x1, x2)

U7_GA(x1, x2, x3, x4)  =  U7_GA(x1, x2, x4)

U8_GA(x1, x2, x3, x4)  =  U8_GA(x1, x2, x4)

ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)

U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x1, x2, x4)

U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x1, x2, x4, x5)

U5_GA(x1, x2, x3, x4)  =  U5_GA(x1, x2, x4)


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

(46) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 11 less nodes.
----------------------------------------

(47)
Complex Obligation (AND)

----------------------------------------

(48)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   ADD_IN_GGA(s(X), Y, s(Z)) -> ADD_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x3, x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x2, x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x1, x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x1, x2)

isNat_out_g(x1)  =  isNat_out_g(x1)

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x1, x2, x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x1, x2, x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x2, x4)

ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)


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

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

(50)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   ADD_IN_GGA(s(X), Y, s(Z)) -> ADD_IN_GGA(X, Y, Z)

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

ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)


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

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

(52)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   ADD_IN_GGA(s(X), Y) -> ADD_IN_GGA(X, Y)

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

(53) QDPSizeChangeProof (EQUIVALENT)
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:
*ADD_IN_GGA(s(X), Y) -> ADD_IN_GGA(X, Y)
The graph contains the following edges 1 > 1, 2 >= 2


----------------------------------------

(54)
YES

----------------------------------------

(55)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x3, x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x2, x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x1, x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x1, x2)

isNat_out_g(x1)  =  isNat_out_g(x1)

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x1, x2, x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x1, x2, x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x2, x4)

ISNAT_IN_G(x1)  =  ISNAT_IN_G(x1)


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

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

(57)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)

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

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

(59)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)

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

(60) QDPSizeChangeProof (EQUIVALENT)
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:
*ISNAT_IN_G(s(X)) -> ISNAT_IN_G(X)
The graph contains the following edges 1 > 1


----------------------------------------

(61)
YES

----------------------------------------

(62)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B), C) -> S2_IN_GA(plus(B, A), C)
   S2_IN_GA(plus(A, plus(B, C)), D) -> S2_IN_GA(plus(plus(A, B), C), D)
   S2_IN_GA(plus(X, Y), Z) -> U3_GA(X, Y, Z, s2_in_ga(X, A))
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> U4_GA(X, Y, Z, A, s2_in_ga(Y, B))
   U4_GA(X, Y, Z, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B), Z)
   S2_IN_GA(plus(X, Y), Z) -> S2_IN_GA(X, A)
   U3_GA(X, Y, Z, s2_out_ga(X, A)) -> S2_IN_GA(Y, B)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C)), D) -> U1_ga(A, B, C, D, s2_in_ga(plus(plus(A, B), C), D))
   s2_in_ga(plus(A, B), C) -> U2_ga(A, B, C, s2_in_ga(plus(B, A), C))
   s2_in_ga(plus(X, 0), X) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y), Z) -> U3_ga(X, Y, Z, s2_in_ga(X, A))
   s2_in_ga(plus(A, B), C) -> U6_ga(A, B, C, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, C, isNat_out_g(A)) -> U7_ga(A, B, C, isNat_in_g(B))
   U7_ga(A, B, C, isNat_out_g(B)) -> U8_ga(A, B, C, add_in_gga(A, B, C))
   add_in_gga(s(X), Y, s(Z)) -> U10_gga(X, Y, Z, add_in_gga(X, Y, Z))
   add_in_gga(0, X, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, Z, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, C, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, Z, s2_out_ga(X, A)) -> U4_ga(X, Y, Z, A, s2_in_ga(Y, B))
   U4_ga(X, Y, Z, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, Z, s2_in_ga(plus(A, B), Z))
   U5_ga(X, Y, Z, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, C, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, D, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The argument filtering Pi contains the following mapping:
s2_in_ga(x1, x2)  =  s2_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x1, x2, x3, x5)

U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x2, x4)

0  =  0

s2_out_ga(x1, x2)  =  s2_out_ga(x1, x2)

U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x2, x4)

U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x2, x4)

isNat_in_g(x1)  =  isNat_in_g(x1)

s(x1)  =  s(x1)

U9_g(x1, x2)  =  U9_g(x1, x2)

isNat_out_g(x1)  =  isNat_out_g(x1)

U7_ga(x1, x2, x3, x4)  =  U7_ga(x1, x2, x4)

U8_ga(x1, x2, x3, x4)  =  U8_ga(x1, x2, x4)

add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)

U10_gga(x1, x2, x3, x4)  =  U10_gga(x1, x2, x4)

add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)

U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x4, x5)

U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x2, x4)

S2_IN_GA(x1, x2)  =  S2_IN_GA(x1)

U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x2, x4)

U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x1, x2, x4, x5)


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

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

(64)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(X, Y, s2_in_ga(X))
   U3_GA(X, Y, s2_out_ga(X, A)) -> U4_GA(X, Y, A, s2_in_ga(Y))
   U4_GA(X, Y, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B))
   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(X, Y, s2_out_ga(X, A)) -> S2_IN_GA(Y)

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(A, B, C, s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(A, B, s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, 0)) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y)) -> U3_ga(X, Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, isNat_out_g(A)) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g(B)) -> U8_ga(A, B, add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(X, Y, add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, s2_out_ga(X, A)) -> U4_ga(X, Y, A, s2_in_ga(Y))
   U4_ga(X, Y, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, s2_in_ga(plus(A, B)))
   U5_ga(X, Y, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0, x1)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0, x1, x2)
   U8_ga(x0, x1, x2)
   U3_ga(x0, x1, x2)
   U4_ga(x0, x1, x2, x3)
   U5_ga(x0, x1, x2)
   U2_ga(x0, x1, x2)
   U1_ga(x0, x1, x2, x3)

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

(65) QDPOrderProof (EQUIVALENT)
We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.

   S2_IN_GA(plus(X, Y)) -> S2_IN_GA(X)
   U3_GA(X, Y, s2_out_ga(X, A)) -> S2_IN_GA(Y)
The remaining pairs can at least be oriented weakly.
Used ordering:  Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( U3_GA_3(x_1, ..., x_3) ) = 2x_2 + 2x_3 + 2
POL( U4_GA_4(x_1, ..., x_4) ) = 2x_3 + 2x_4 + 2
POL( s2_in_ga_1(x_1) ) = x_1
POL( plus_2(x_1, x_2) ) = x_1 + x_2 + 2
POL( U1_ga_4(x_1, ..., x_4) ) = x_4
POL( U2_ga_3(x_1, ..., x_3) ) = x_3
POL( 0 ) = 0
POL( s2_out_ga_2(x_1, x_2) ) = x_2
POL( U3_ga_3(x_1, ..., x_3) ) = x_2 + x_3 + 2
POL( U6_ga_3(x_1, ..., x_3) ) = x_2
POL( isNat_in_g_1(x_1) ) = 0
POL( U4_ga_4(x_1, ..., x_4) ) = x_3 + x_4 + 2
POL( U5_ga_3(x_1, ..., x_3) ) = x_3
POL( U7_ga_3(x_1, ..., x_3) ) = x_2
POL( s_1(x_1) ) = 0
POL( U9_g_2(x_1, x_2) ) = max{0, 2x_2 - 2}
POL( isNat_out_g_1(x_1) ) = max{0, x_1 - 2}
POL( U8_ga_3(x_1, ..., x_3) ) = x_3
POL( add_in_gga_2(x_1, x_2) ) = x_2
POL( U10_gga_3(x_1, ..., x_3) ) = x_2
POL( add_out_gga_3(x_1, ..., x_3) ) = x_3
POL( S2_IN_GA_1(x_1) ) = max{0, 2x_1 - 2}

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

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(A, B, C, s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(A, B, s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, 0)) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y)) -> U3_ga(X, Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   U2_ga(A, B, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)
   U3_ga(X, Y, s2_out_ga(X, A)) -> U4_ga(X, Y, A, s2_in_ga(Y))
   U4_ga(X, Y, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, s2_in_ga(plus(A, B)))
   U5_ga(X, Y, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U6_ga(A, B, isNat_out_g(A)) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g(B)) -> U8_ga(A, B, add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(X, Y, add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(0, X, X)
   U8_ga(A, B, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U10_gga(X, Y, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))


----------------------------------------

(66)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(X, Y, s2_in_ga(X))
   U3_GA(X, Y, s2_out_ga(X, A)) -> U4_GA(X, Y, A, s2_in_ga(Y))
   U4_GA(X, Y, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B))

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(A, B, C, s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(A, B, s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, 0)) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y)) -> U3_ga(X, Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, isNat_out_g(A)) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g(B)) -> U8_ga(A, B, add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(X, Y, add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, s2_out_ga(X, A)) -> U4_ga(X, Y, A, s2_in_ga(Y))
   U4_ga(X, Y, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, s2_in_ga(plus(A, B)))
   U5_ga(X, Y, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0, x1)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0, x1, x2)
   U8_ga(x0, x1, x2)
   U3_ga(x0, x1, x2)
   U4_ga(x0, x1, x2, x3)
   U5_ga(x0, x1, x2)
   U2_ga(x0, x1, x2)
   U1_ga(x0, x1, x2, x3)

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

(67) QDPQMonotonicMRRProof (EQUIVALENT)
By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain.


Strictly oriented rules of the TRS R:

   s2_in_ga(plus(X, 0)) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))

Used ordering: Polynomial interpretation [POLO]:

   POL(0) = 0
   POL(S2_IN_GA(x_1)) = 2 + 2*x_1
   POL(U10_gga(x_1, x_2, x_3)) = 0
   POL(U1_ga(x_1, x_2, x_3, x_4)) = x_4
   POL(U2_ga(x_1, x_2, x_3)) = x_3
   POL(U3_GA(x_1, x_2, x_3)) = 2*x_2 + 2*x_3
   POL(U3_ga(x_1, x_2, x_3)) = 1 + x_2 + x_3
   POL(U4_GA(x_1, x_2, x_3, x_4)) = 2*x_3 + 2*x_4
   POL(U4_ga(x_1, x_2, x_3, x_4)) = 1 + x_3 + x_4
   POL(U5_ga(x_1, x_2, x_3)) = x_3
   POL(U6_ga(x_1, x_2, x_3)) = 2 + x_2
   POL(U7_ga(x_1, x_2, x_3)) = 2 + 2*x_3
   POL(U8_ga(x_1, x_2, x_3)) = 2 + 2*x_3
   POL(U9_g(x_1, x_2)) = 0
   POL(add_in_gga(x_1, x_2)) = 2*x_2
   POL(add_out_gga(x_1, x_2, x_3)) = 2*x_3
   POL(isNat_in_g(x_1)) = 0
   POL(isNat_out_g(x_1)) = 2*x_1
   POL(plus(x_1, x_2)) = 1 + x_1 + x_2
   POL(s(x_1)) = 0
   POL(s2_in_ga(x_1)) = 2 + x_1
   POL(s2_out_ga(x_1, x_2)) = 2 + x_2


----------------------------------------

(68)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(X, Y, s2_in_ga(X))
   U3_GA(X, Y, s2_out_ga(X, A)) -> U4_GA(X, Y, A, s2_in_ga(Y))
   U4_GA(X, Y, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B))

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(A, B, C, s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(A, B, s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(X, Y, s2_in_ga(X))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, isNat_out_g(A)) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g(B)) -> U8_ga(A, B, add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(X, Y, add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, s2_out_ga(X, A)) -> U4_ga(X, Y, A, s2_in_ga(Y))
   U4_ga(X, Y, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, s2_in_ga(plus(A, B)))
   U5_ga(X, Y, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0, x1)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0, x1, x2)
   U8_ga(x0, x1, x2)
   U3_ga(x0, x1, x2)
   U4_ga(x0, x1, x2, x3)
   U5_ga(x0, x1, x2)
   U2_ga(x0, x1, x2)
   U1_ga(x0, x1, x2, x3)

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

(69) UsableRulesProof (EQUIVALENT)
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.
----------------------------------------

(70)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(X, Y, s2_in_ga(X))
   U3_GA(X, Y, s2_out_ga(X, A)) -> U4_GA(X, Y, A, s2_in_ga(Y))
   U4_GA(X, Y, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B))

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(A, B, C, s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(A, B, s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(X, Y, s2_in_ga(X))
   U3_ga(X, Y, s2_out_ga(X, A)) -> U4_ga(X, Y, A, s2_in_ga(Y))
   U4_ga(X, Y, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, s2_in_ga(plus(A, B)))
   U5_ga(X, Y, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0, x1)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0, x1, x2)
   U8_ga(x0, x1, x2)
   U3_ga(x0, x1, x2)
   U4_ga(x0, x1, x2, x3)
   U5_ga(x0, x1, x2)
   U2_ga(x0, x1, x2)
   U1_ga(x0, x1, x2, x3)

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

(71) QReductionProof (EQUIVALENT)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

   isNat_in_g(x0)
   U9_g(x0, x1)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0, x1, x2)
   U8_ga(x0, x1, x2)


----------------------------------------

(72)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(X, Y, s2_in_ga(X))
   U3_GA(X, Y, s2_out_ga(X, A)) -> U4_GA(X, Y, A, s2_in_ga(Y))
   U4_GA(X, Y, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B))

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(A, B, C, s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(A, B, s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, Y)) -> U3_ga(X, Y, s2_in_ga(X))
   U3_ga(X, Y, s2_out_ga(X, A)) -> U4_ga(X, Y, A, s2_in_ga(Y))
   U4_ga(X, Y, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, s2_in_ga(plus(A, B)))
   U5_ga(X, Y, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   U3_ga(x0, x1, x2)
   U4_ga(x0, x1, x2, x3)
   U5_ga(x0, x1, x2)
   U2_ga(x0, x1, x2)
   U1_ga(x0, x1, x2, x3)

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

(73) QDPOrderProof (EQUIVALENT)
We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.

   U3_GA(X, Y, s2_out_ga(X, A)) -> U4_GA(X, Y, A, s2_in_ga(Y))
   U4_GA(X, Y, A, s2_out_ga(Y, B)) -> S2_IN_GA(plus(A, B))
The remaining pairs can at least be oriented weakly.
Used ordering:  Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( U3_GA_3(x_1, ..., x_3) ) = max{0, 2x_2 + 2x_3 - 1}
POL( U4_GA_4(x_1, ..., x_4) ) = max{0, 2x_3 + 2x_4 - 2}
POL( s2_in_ga_1(x_1) ) = x_1
POL( plus_2(x_1, x_2) ) = x_1 + x_2 + 1
POL( U1_ga_4(x_1, ..., x_4) ) = x_4
POL( U2_ga_3(x_1, ..., x_3) ) = x_3
POL( 0 ) = 2
POL( s2_out_ga_2(x_1, x_2) ) = x_2 + 2
POL( U3_ga_3(x_1, ..., x_3) ) = max{0, x_2 + x_3 - 2}
POL( U6_ga_3(x_1, ..., x_3) ) = x_2 + x_3 + 1
POL( isNat_in_g_1(x_1) ) = x_1
POL( U4_ga_4(x_1, ..., x_4) ) = x_3 + x_4
POL( U5_ga_3(x_1, ..., x_3) ) = x_3
POL( U7_ga_3(x_1, ..., x_3) ) = x_1 + x_2
POL( s_1(x_1) ) = x_1 + 1
POL( U9_g_2(x_1, x_2) ) = x_1 + 1
POL( isNat_out_g_1(x_1) ) = max{0, x_1 - 1}
POL( U8_ga_3(x_1, ..., x_3) ) = x_3
POL( add_in_gga_2(x_1, x_2) ) = x_1 + x_2
POL( U10_gga_3(x_1, ..., x_3) ) = x_3 + 1
POL( add_out_gga_3(x_1, ..., x_3) ) = x_3 + 2
POL( S2_IN_GA_1(x_1) ) = max{0, 2x_1 - 2}

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

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(A, B, C, s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(A, B, s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, 0)) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y)) -> U3_ga(X, Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   U2_ga(A, B, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)
   U3_ga(X, Y, s2_out_ga(X, A)) -> U4_ga(X, Y, A, s2_in_ga(Y))
   U4_ga(X, Y, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, s2_in_ga(plus(A, B)))
   U5_ga(X, Y, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U6_ga(A, B, isNat_out_g(A)) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g(B)) -> U8_ga(A, B, add_in_gga(A, B))
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   add_in_gga(s(X), Y) -> U10_gga(X, Y, add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(0, X, X)
   U8_ga(A, B, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U10_gga(X, Y, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))


----------------------------------------

(74)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2_IN_GA(plus(A, B)) -> S2_IN_GA(plus(B, A))
   S2_IN_GA(plus(A, plus(B, C))) -> S2_IN_GA(plus(plus(A, B), C))
   S2_IN_GA(plus(X, Y)) -> U3_GA(X, Y, s2_in_ga(X))

The TRS R consists of the following rules:

   s2_in_ga(plus(A, plus(B, C))) -> U1_ga(A, B, C, s2_in_ga(plus(plus(A, B), C)))
   s2_in_ga(plus(A, B)) -> U2_ga(A, B, s2_in_ga(plus(B, A)))
   s2_in_ga(plus(X, 0)) -> s2_out_ga(plus(X, 0), X)
   s2_in_ga(plus(X, Y)) -> U3_ga(X, Y, s2_in_ga(X))
   s2_in_ga(plus(A, B)) -> U6_ga(A, B, isNat_in_g(A))
   isNat_in_g(s(X)) -> U9_g(X, isNat_in_g(X))
   isNat_in_g(0) -> isNat_out_g(0)
   U9_g(X, isNat_out_g(X)) -> isNat_out_g(s(X))
   U6_ga(A, B, isNat_out_g(A)) -> U7_ga(A, B, isNat_in_g(B))
   U7_ga(A, B, isNat_out_g(B)) -> U8_ga(A, B, add_in_gga(A, B))
   add_in_gga(s(X), Y) -> U10_gga(X, Y, add_in_gga(X, Y))
   add_in_gga(0, X) -> add_out_gga(0, X, X)
   U10_gga(X, Y, add_out_gga(X, Y, Z)) -> add_out_gga(s(X), Y, s(Z))
   U8_ga(A, B, add_out_gga(A, B, C)) -> s2_out_ga(plus(A, B), C)
   U3_ga(X, Y, s2_out_ga(X, A)) -> U4_ga(X, Y, A, s2_in_ga(Y))
   U4_ga(X, Y, A, s2_out_ga(Y, B)) -> U5_ga(X, Y, s2_in_ga(plus(A, B)))
   U5_ga(X, Y, s2_out_ga(plus(A, B), Z)) -> s2_out_ga(plus(X, Y), Z)
   U2_ga(A, B, s2_out_ga(plus(B, A), C)) -> s2_out_ga(plus(A, B), C)
   U1_ga(A, B, C, s2_out_ga(plus(plus(A, B), C), D)) -> s2_out_ga(plus(A, plus(B, C)), D)

The set Q consists of the following terms:

   s2_in_ga(x0)
   isNat_in_g(x0)
   U9_g(x0, x1)
   U6_ga(x0, x1, x2)
   U7_ga(x0, x1, x2)
   add_in_gga(x0, x1)
   U10_gga(x0, x1, x2)
   U8_ga(x0, x1, x2)
   U3_ga(x0, x1, x2)
   U4_ga(x0, x1, x2, x3)
   U5_ga(x0, x1, x2)
   U2_ga(x0, x1, x2)
   U1_ga(x0, x1, x2, x3)

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

(75) PrologToTRSTransformerProof (SOUND)
Transformed Prolog program to TRS.

{
    "root": 2,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(s2 (plus A (plus B C)) D)",
                "(s2 (plus (plus A B) C) D)"
            ],
            [
                "(s2 (plus A B) C)",
                "(s2 (plus B A) C)"
            ],
            [
                "(s2 (plus X (0)) X)",
                null
            ],
            [
                "(s2 (plus X Y) Z)",
                "(',' (s2 X A) (',' (s2 Y B) (s2 (plus A B) Z)))"
            ],
            [
                "(s2 (plus A B) C)",
                "(',' (isNat A) (',' (isNat B) (add A B C)))"
            ],
            [
                "(isNat (s X))",
                "(isNat X)"
            ],
            [
                "(isNat (0))",
                null
            ],
            [
                "(add (s X) Y (s Z))",
                "(add X Y Z)"
            ],
            [
                "(add (0) X X)",
                null
            ]
        ]
    },
    "graph": {
        "nodes": {
            "27": {
                "goal": [{
                    "clause": 0,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "28": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "type": "Nodes",
            "492": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T95)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T95"],
                    "free": [],
                    "exprvars": []
                }
            },
            "471": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat T94) (',' (isNat T95) (add T94 T95 T97)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "493": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add T94 T95 T97)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "472": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "176": {
                "goal": [{
                    "clause": 1,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "177": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "474": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "475": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat T95) (add T94 T95 T97))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "477": {
                "goal": [
                    {
                        "clause": 5,
                        "scope": 2,
                        "term": "(isNat T94)"
                    },
                    {
                        "clause": 6,
                        "scope": 2,
                        "term": "(isNat T94)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "499": {
                "goal": [
                    {
                        "clause": 7,
                        "scope": 3,
                        "term": "(add T94 T95 T97)"
                    },
                    {
                        "clause": 8,
                        "scope": 3,
                        "term": "(add T94 T95 T97)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "478": {
                "goal": [{
                    "clause": 5,
                    "scope": 2,
                    "term": "(isNat T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "479": {
                "goal": [{
                    "clause": 6,
                    "scope": 2,
                    "term": "(isNat T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "55": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus (plus T19 T20) T21) T23)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T19",
                        "T20",
                        "T21"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "56": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "380": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "381": {
                "goal": [{
                    "clause": 3,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "382": {
                "goal": [{
                    "clause": 4,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "481": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T104)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T104"],
                    "free": [],
                    "exprvars": []
                }
            },
            "240": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus T42 T41) T44)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T41",
                        "T42"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "383": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 T66 X68) (',' (s2 T67 X69) (s2 (plus X68 X69) T69)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T66",
                        "T67"
                    ],
                    "free": [
                        "X68",
                        "X69"
                    ],
                    "exprvars": []
                }
            },
            "482": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "241": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "384": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "242": {
                "goal": [{
                    "clause": 2,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "462": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T66 X68)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T66"],
                    "free": ["X68"],
                    "exprvars": []
                }
            },
            "243": {
                "goal": [
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "463": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 T67 X69) (s2 (plus T73 X69) T69))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T67",
                        "T73"
                    ],
                    "free": ["X69"],
                    "exprvars": []
                }
            },
            "2": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "244": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "464": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T67 X69)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T67"],
                    "free": ["X69"],
                    "exprvars": []
                }
            },
            "245": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "465": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus T73 T80) T69)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T73",
                        "T80"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "487": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "4": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "488": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "489": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "500": {
                "goal": [{
                    "clause": 7,
                    "scope": 3,
                    "term": "(add T94 T95 T97)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "501": {
                "goal": [{
                    "clause": 8,
                    "scope": 3,
                    "term": "(add T94 T95 T97)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "504": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add T123 T124 T126)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T123",
                        "T124"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "505": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "506": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "507": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "508": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            }
        },
        "edges": [
            {
                "from": 2,
                "to": 4,
                "label": "CASE"
            },
            {
                "from": 4,
                "to": 27,
                "label": "PARALLEL"
            },
            {
                "from": 4,
                "to": 28,
                "label": "PARALLEL"
            },
            {
                "from": 27,
                "to": 55,
                "label": "EVAL with clause\ns2(plus(X17, plus(X18, X19)), X20) :- s2(plus(plus(X17, X18), X19), X20).\nand substitutionX17 -> T19,\nX18 -> T20,\nX19 -> T21,\nT1 -> plus(T19, plus(T20, T21)),\nT2 -> T23,\nX20 -> T23,\nT22 -> T23"
            },
            {
                "from": 27,
                "to": 56,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 28,
                "to": 176,
                "label": "PARALLEL"
            },
            {
                "from": 28,
                "to": 177,
                "label": "PARALLEL"
            },
            {
                "from": 55,
                "to": 2,
                "label": "INSTANCE with matching:\nT1 -> plus(plus(T19, T20), T21)\nT2 -> T23"
            },
            {
                "from": 176,
                "to": 240,
                "label": "EVAL with clause\ns2(plus(X37, X38), X39) :- s2(plus(X38, X37), X39).\nand substitutionX37 -> T41,\nX38 -> T42,\nT1 -> plus(T41, T42),\nT2 -> T44,\nX39 -> T44,\nT43 -> T44"
            },
            {
                "from": 176,
                "to": 241,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 177,
                "to": 242,
                "label": "PARALLEL"
            },
            {
                "from": 177,
                "to": 243,
                "label": "PARALLEL"
            },
            {
                "from": 240,
                "to": 2,
                "label": "INSTANCE with matching:\nT1 -> plus(T42, T41)\nT2 -> T44"
            },
            {
                "from": 242,
                "to": 244,
                "label": "EVAL with clause\ns2(plus(X48, 0), X48).\nand substitutionX48 -> T53,\nT1 -> plus(T53, 0),\nT2 -> T53"
            },
            {
                "from": 242,
                "to": 245,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 243,
                "to": 381,
                "label": "PARALLEL"
            },
            {
                "from": 243,
                "to": 382,
                "label": "PARALLEL"
            },
            {
                "from": 244,
                "to": 380,
                "label": "SUCCESS"
            },
            {
                "from": 381,
                "to": 383,
                "label": "EVAL with clause\ns2(plus(X65, X66), X67) :- ','(s2(X65, X68), ','(s2(X66, X69), s2(plus(X68, X69), X67))).\nand substitutionX65 -> T66,\nX66 -> T67,\nT1 -> plus(T66, T67),\nT2 -> T69,\nX67 -> T69,\nT68 -> T69"
            },
            {
                "from": 381,
                "to": 384,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 382,
                "to": 471,
                "label": "EVAL with clause\ns2(plus(X100, X101), X102) :- ','(isNat(X100), ','(isNat(X101), add(X100, X101, X102))).\nand substitutionX100 -> T94,\nX101 -> T95,\nT1 -> plus(T94, T95),\nT2 -> T97,\nX102 -> T97,\nT96 -> T97"
            },
            {
                "from": 382,
                "to": 472,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 383,
                "to": 462,
                "label": "SPLIT 1"
            },
            {
                "from": 383,
                "to": 463,
                "label": "SPLIT 2\nnew knowledge:\nT66 is ground\nT73 is ground\nreplacements:X68 -> T73"
            },
            {
                "from": 462,
                "to": 2,
                "label": "INSTANCE with matching:\nT1 -> T66\nT2 -> X68"
            },
            {
                "from": 463,
                "to": 464,
                "label": "SPLIT 1"
            },
            {
                "from": 463,
                "to": 465,
                "label": "SPLIT 2\nnew knowledge:\nT67 is ground\nT80 is ground\nreplacements:X69 -> T80"
            },
            {
                "from": 464,
                "to": 2,
                "label": "INSTANCE with matching:\nT1 -> T67\nT2 -> X69"
            },
            {
                "from": 465,
                "to": 2,
                "label": "INSTANCE with matching:\nT1 -> plus(T73, T80)\nT2 -> T69"
            },
            {
                "from": 471,
                "to": 474,
                "label": "SPLIT 1"
            },
            {
                "from": 471,
                "to": 475,
                "label": "SPLIT 2\nnew knowledge:\nT94 is ground"
            },
            {
                "from": 474,
                "to": 477,
                "label": "CASE"
            },
            {
                "from": 475,
                "to": 492,
                "label": "SPLIT 1"
            },
            {
                "from": 475,
                "to": 493,
                "label": "SPLIT 2\nnew knowledge:\nT95 is ground"
            },
            {
                "from": 477,
                "to": 478,
                "label": "PARALLEL"
            },
            {
                "from": 477,
                "to": 479,
                "label": "PARALLEL"
            },
            {
                "from": 478,
                "to": 481,
                "label": "EVAL with clause\nisNat(s(X109)) :- isNat(X109).\nand substitutionX109 -> T104,\nT94 -> s(T104)"
            },
            {
                "from": 478,
                "to": 482,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 479,
                "to": 487,
                "label": "EVAL with clause\nisNat(0).\nand substitutionT94 -> 0"
            },
            {
                "from": 479,
                "to": 488,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 481,
                "to": 474,
                "label": "INSTANCE with matching:\nT94 -> T104"
            },
            {
                "from": 487,
                "to": 489,
                "label": "SUCCESS"
            },
            {
                "from": 492,
                "to": 474,
                "label": "INSTANCE with matching:\nT94 -> T95"
            },
            {
                "from": 493,
                "to": 499,
                "label": "CASE"
            },
            {
                "from": 499,
                "to": 500,
                "label": "PARALLEL"
            },
            {
                "from": 499,
                "to": 501,
                "label": "PARALLEL"
            },
            {
                "from": 500,
                "to": 504,
                "label": "EVAL with clause\nadd(s(X128), X129, s(X130)) :- add(X128, X129, X130).\nand substitutionX128 -> T123,\nT94 -> s(T123),\nT95 -> T124,\nX129 -> T124,\nX130 -> T126,\nT97 -> s(T126),\nT125 -> T126"
            },
            {
                "from": 500,
                "to": 505,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 501,
                "to": 506,
                "label": "EVAL with clause\nadd(0, X136, X136).\nand substitutionT94 -> 0,\nT95 -> T132,\nX136 -> T132,\nT97 -> T132"
            },
            {
                "from": 501,
                "to": 507,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 504,
                "to": 493,
                "label": "INSTANCE with matching:\nT94 -> T123\nT95 -> T124\nT97 -> T126"
            },
            {
                "from": 506,
                "to": 508,
                "label": "SUCCESS"
            }
        ],
        "type": "Graph"
    }
}

----------------------------------------

(76)
Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:

   f2_in(plus(T19, plus(T20, T21))) -> U1(f2_in(plus(plus(T19, T20), T21)), plus(T19, plus(T20, T21)))
   U1(f2_out1(T23), plus(T19, plus(T20, T21))) -> f2_out1(T23)
   f2_in(plus(T41, T42)) -> U2(f2_in(plus(T42, T41)), plus(T41, T42))
   U2(f2_out1(T44), plus(T41, T42)) -> f2_out1(T44)
   f2_in(plus(T53, 0)) -> f2_out1(T53)
   f2_in(plus(T66, T67)) -> U3(f383_in(T66, T67), plus(T66, T67))
   U3(f383_out1(X68, X69, T69), plus(T66, T67)) -> f2_out1(T69)
   f2_in(plus(T94, T95)) -> U4(f471_in(T94, T95), plus(T94, T95))
   U4(f471_out1(T97), plus(T94, T95)) -> f2_out1(T97)
   f474_in(s(T104)) -> U5(f474_in(T104), s(T104))
   U5(f474_out1, s(T104)) -> f474_out1
   f474_in(0) -> f474_out1
   f493_in(s(T123), T124) -> U6(f493_in(T123, T124), s(T123), T124)
   U6(f493_out1(T126), s(T123), T124) -> f493_out1(s(T126))
   f493_in(0, T132) -> f493_out1(T132)
   f383_in(T66, T67) -> U7(f2_in(T66), T66, T67)
   U7(f2_out1(T73), T66, T67) -> U8(f463_in(T67, T73), T66, T67, T73)
   U8(f463_out1(X69, T69), T66, T67, T73) -> f383_out1(T73, X69, T69)
   f463_in(T67, T73) -> U9(f2_in(T67), T67, T73)
   U9(f2_out1(T80), T67, T73) -> U10(f2_in(plus(T73, T80)), T67, T73, T80)
   U10(f2_out1(T69), T67, T73, T80) -> f463_out1(T80, T69)
   f471_in(T94, T95) -> U11(f474_in(T94), T94, T95)
   U11(f474_out1, T94, T95) -> U12(f475_in(T95, T94), T94, T95)
   U12(f475_out1(T97), T94, T95) -> f471_out1(T97)
   f475_in(T95, T94) -> U13(f474_in(T95), T95, T94)
   U13(f474_out1, T95, T94) -> U14(f493_in(T94, T95), T95, T94)
   U14(f493_out1(T97), T95, T94) -> f475_out1(T97)

Q is empty.

----------------------------------------

(77) DependencyPairsProof (EQUIVALENT)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
----------------------------------------

(78)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F2_IN(plus(T19, plus(T20, T21))) -> U1^1(f2_in(plus(plus(T19, T20), T21)), plus(T19, plus(T20, T21)))
   F2_IN(plus(T19, plus(T20, T21))) -> F2_IN(plus(plus(T19, T20), T21))
   F2_IN(plus(T41, T42)) -> U2^1(f2_in(plus(T42, T41)), plus(T41, T42))
   F2_IN(plus(T41, T42)) -> F2_IN(plus(T42, T41))
   F2_IN(plus(T66, T67)) -> U3^1(f383_in(T66, T67), plus(T66, T67))
   F2_IN(plus(T66, T67)) -> F383_IN(T66, T67)
   F2_IN(plus(T94, T95)) -> U4^1(f471_in(T94, T95), plus(T94, T95))
   F2_IN(plus(T94, T95)) -> F471_IN(T94, T95)
   F474_IN(s(T104)) -> U5^1(f474_in(T104), s(T104))
   F474_IN(s(T104)) -> F474_IN(T104)
   F493_IN(s(T123), T124) -> U6^1(f493_in(T123, T124), s(T123), T124)
   F493_IN(s(T123), T124) -> F493_IN(T123, T124)
   F383_IN(T66, T67) -> U7^1(f2_in(T66), T66, T67)
   F383_IN(T66, T67) -> F2_IN(T66)
   U7^1(f2_out1(T73), T66, T67) -> U8^1(f463_in(T67, T73), T66, T67, T73)
   U7^1(f2_out1(T73), T66, T67) -> F463_IN(T67, T73)
   F463_IN(T67, T73) -> U9^1(f2_in(T67), T67, T73)
   F463_IN(T67, T73) -> F2_IN(T67)
   U9^1(f2_out1(T80), T67, T73) -> U10^1(f2_in(plus(T73, T80)), T67, T73, T80)
   U9^1(f2_out1(T80), T67, T73) -> F2_IN(plus(T73, T80))
   F471_IN(T94, T95) -> U11^1(f474_in(T94), T94, T95)
   F471_IN(T94, T95) -> F474_IN(T94)
   U11^1(f474_out1, T94, T95) -> U12^1(f475_in(T95, T94), T94, T95)
   U11^1(f474_out1, T94, T95) -> F475_IN(T95, T94)
   F475_IN(T95, T94) -> U13^1(f474_in(T95), T95, T94)
   F475_IN(T95, T94) -> F474_IN(T95)
   U13^1(f474_out1, T95, T94) -> U14^1(f493_in(T94, T95), T95, T94)
   U13^1(f474_out1, T95, T94) -> F493_IN(T94, T95)

The TRS R consists of the following rules:

   f2_in(plus(T19, plus(T20, T21))) -> U1(f2_in(plus(plus(T19, T20), T21)), plus(T19, plus(T20, T21)))
   U1(f2_out1(T23), plus(T19, plus(T20, T21))) -> f2_out1(T23)
   f2_in(plus(T41, T42)) -> U2(f2_in(plus(T42, T41)), plus(T41, T42))
   U2(f2_out1(T44), plus(T41, T42)) -> f2_out1(T44)
   f2_in(plus(T53, 0)) -> f2_out1(T53)
   f2_in(plus(T66, T67)) -> U3(f383_in(T66, T67), plus(T66, T67))
   U3(f383_out1(X68, X69, T69), plus(T66, T67)) -> f2_out1(T69)
   f2_in(plus(T94, T95)) -> U4(f471_in(T94, T95), plus(T94, T95))
   U4(f471_out1(T97), plus(T94, T95)) -> f2_out1(T97)
   f474_in(s(T104)) -> U5(f474_in(T104), s(T104))
   U5(f474_out1, s(T104)) -> f474_out1
   f474_in(0) -> f474_out1
   f493_in(s(T123), T124) -> U6(f493_in(T123, T124), s(T123), T124)
   U6(f493_out1(T126), s(T123), T124) -> f493_out1(s(T126))
   f493_in(0, T132) -> f493_out1(T132)
   f383_in(T66, T67) -> U7(f2_in(T66), T66, T67)
   U7(f2_out1(T73), T66, T67) -> U8(f463_in(T67, T73), T66, T67, T73)
   U8(f463_out1(X69, T69), T66, T67, T73) -> f383_out1(T73, X69, T69)
   f463_in(T67, T73) -> U9(f2_in(T67), T67, T73)
   U9(f2_out1(T80), T67, T73) -> U10(f2_in(plus(T73, T80)), T67, T73, T80)
   U10(f2_out1(T69), T67, T73, T80) -> f463_out1(T80, T69)
   f471_in(T94, T95) -> U11(f474_in(T94), T94, T95)
   U11(f474_out1, T94, T95) -> U12(f475_in(T95, T94), T94, T95)
   U12(f475_out1(T97), T94, T95) -> f471_out1(T97)
   f475_in(T95, T94) -> U13(f474_in(T95), T95, T94)
   U13(f474_out1, T95, T94) -> U14(f493_in(T94, T95), T95, T94)
   U14(f493_out1(T97), T95, T94) -> f475_out1(T97)

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

(79) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 3 SCCs with 17 less nodes.
----------------------------------------

(80)
Complex Obligation (AND)

----------------------------------------

(81)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F493_IN(s(T123), T124) -> F493_IN(T123, T124)

The TRS R consists of the following rules:

   f2_in(plus(T19, plus(T20, T21))) -> U1(f2_in(plus(plus(T19, T20), T21)), plus(T19, plus(T20, T21)))
   U1(f2_out1(T23), plus(T19, plus(T20, T21))) -> f2_out1(T23)
   f2_in(plus(T41, T42)) -> U2(f2_in(plus(T42, T41)), plus(T41, T42))
   U2(f2_out1(T44), plus(T41, T42)) -> f2_out1(T44)
   f2_in(plus(T53, 0)) -> f2_out1(T53)
   f2_in(plus(T66, T67)) -> U3(f383_in(T66, T67), plus(T66, T67))
   U3(f383_out1(X68, X69, T69), plus(T66, T67)) -> f2_out1(T69)
   f2_in(plus(T94, T95)) -> U4(f471_in(T94, T95), plus(T94, T95))
   U4(f471_out1(T97), plus(T94, T95)) -> f2_out1(T97)
   f474_in(s(T104)) -> U5(f474_in(T104), s(T104))
   U5(f474_out1, s(T104)) -> f474_out1
   f474_in(0) -> f474_out1
   f493_in(s(T123), T124) -> U6(f493_in(T123, T124), s(T123), T124)
   U6(f493_out1(T126), s(T123), T124) -> f493_out1(s(T126))
   f493_in(0, T132) -> f493_out1(T132)
   f383_in(T66, T67) -> U7(f2_in(T66), T66, T67)
   U7(f2_out1(T73), T66, T67) -> U8(f463_in(T67, T73), T66, T67, T73)
   U8(f463_out1(X69, T69), T66, T67, T73) -> f383_out1(T73, X69, T69)
   f463_in(T67, T73) -> U9(f2_in(T67), T67, T73)
   U9(f2_out1(T80), T67, T73) -> U10(f2_in(plus(T73, T80)), T67, T73, T80)
   U10(f2_out1(T69), T67, T73, T80) -> f463_out1(T80, T69)
   f471_in(T94, T95) -> U11(f474_in(T94), T94, T95)
   U11(f474_out1, T94, T95) -> U12(f475_in(T95, T94), T94, T95)
   U12(f475_out1(T97), T94, T95) -> f471_out1(T97)
   f475_in(T95, T94) -> U13(f474_in(T95), T95, T94)
   U13(f474_out1, T95, T94) -> U14(f493_in(T94, T95), T95, T94)
   U14(f493_out1(T97), T95, T94) -> f475_out1(T97)

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

(82) UsableRulesProof (EQUIVALENT)
We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.
----------------------------------------

(83)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F493_IN(s(T123), T124) -> F493_IN(T123, T124)

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

(84) QDPSizeChangeProof (EQUIVALENT)
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:
*F493_IN(s(T123), T124) -> F493_IN(T123, T124)
The graph contains the following edges 1 > 1, 2 >= 2


----------------------------------------

(85)
YES

----------------------------------------

(86)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F474_IN(s(T104)) -> F474_IN(T104)

The TRS R consists of the following rules:

   f2_in(plus(T19, plus(T20, T21))) -> U1(f2_in(plus(plus(T19, T20), T21)), plus(T19, plus(T20, T21)))
   U1(f2_out1(T23), plus(T19, plus(T20, T21))) -> f2_out1(T23)
   f2_in(plus(T41, T42)) -> U2(f2_in(plus(T42, T41)), plus(T41, T42))
   U2(f2_out1(T44), plus(T41, T42)) -> f2_out1(T44)
   f2_in(plus(T53, 0)) -> f2_out1(T53)
   f2_in(plus(T66, T67)) -> U3(f383_in(T66, T67), plus(T66, T67))
   U3(f383_out1(X68, X69, T69), plus(T66, T67)) -> f2_out1(T69)
   f2_in(plus(T94, T95)) -> U4(f471_in(T94, T95), plus(T94, T95))
   U4(f471_out1(T97), plus(T94, T95)) -> f2_out1(T97)
   f474_in(s(T104)) -> U5(f474_in(T104), s(T104))
   U5(f474_out1, s(T104)) -> f474_out1
   f474_in(0) -> f474_out1
   f493_in(s(T123), T124) -> U6(f493_in(T123, T124), s(T123), T124)
   U6(f493_out1(T126), s(T123), T124) -> f493_out1(s(T126))
   f493_in(0, T132) -> f493_out1(T132)
   f383_in(T66, T67) -> U7(f2_in(T66), T66, T67)
   U7(f2_out1(T73), T66, T67) -> U8(f463_in(T67, T73), T66, T67, T73)
   U8(f463_out1(X69, T69), T66, T67, T73) -> f383_out1(T73, X69, T69)
   f463_in(T67, T73) -> U9(f2_in(T67), T67, T73)
   U9(f2_out1(T80), T67, T73) -> U10(f2_in(plus(T73, T80)), T67, T73, T80)
   U10(f2_out1(T69), T67, T73, T80) -> f463_out1(T80, T69)
   f471_in(T94, T95) -> U11(f474_in(T94), T94, T95)
   U11(f474_out1, T94, T95) -> U12(f475_in(T95, T94), T94, T95)
   U12(f475_out1(T97), T94, T95) -> f471_out1(T97)
   f475_in(T95, T94) -> U13(f474_in(T95), T95, T94)
   U13(f474_out1, T95, T94) -> U14(f493_in(T94, T95), T95, T94)
   U14(f493_out1(T97), T95, T94) -> f475_out1(T97)

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

(87) UsableRulesProof (EQUIVALENT)
We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.
----------------------------------------

(88)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F474_IN(s(T104)) -> F474_IN(T104)

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

(89) QDPSizeChangeProof (EQUIVALENT)
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:
*F474_IN(s(T104)) -> F474_IN(T104)
The graph contains the following edges 1 > 1


----------------------------------------

(90)
YES

----------------------------------------

(91)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F2_IN(plus(T41, T42)) -> F2_IN(plus(T42, T41))
   F2_IN(plus(T19, plus(T20, T21))) -> F2_IN(plus(plus(T19, T20), T21))
   F2_IN(plus(T66, T67)) -> F383_IN(T66, T67)
   F383_IN(T66, T67) -> U7^1(f2_in(T66), T66, T67)
   U7^1(f2_out1(T73), T66, T67) -> F463_IN(T67, T73)
   F463_IN(T67, T73) -> U9^1(f2_in(T67), T67, T73)
   U9^1(f2_out1(T80), T67, T73) -> F2_IN(plus(T73, T80))
   F463_IN(T67, T73) -> F2_IN(T67)
   F383_IN(T66, T67) -> F2_IN(T66)

The TRS R consists of the following rules:

   f2_in(plus(T19, plus(T20, T21))) -> U1(f2_in(plus(plus(T19, T20), T21)), plus(T19, plus(T20, T21)))
   U1(f2_out1(T23), plus(T19, plus(T20, T21))) -> f2_out1(T23)
   f2_in(plus(T41, T42)) -> U2(f2_in(plus(T42, T41)), plus(T41, T42))
   U2(f2_out1(T44), plus(T41, T42)) -> f2_out1(T44)
   f2_in(plus(T53, 0)) -> f2_out1(T53)
   f2_in(plus(T66, T67)) -> U3(f383_in(T66, T67), plus(T66, T67))
   U3(f383_out1(X68, X69, T69), plus(T66, T67)) -> f2_out1(T69)
   f2_in(plus(T94, T95)) -> U4(f471_in(T94, T95), plus(T94, T95))
   U4(f471_out1(T97), plus(T94, T95)) -> f2_out1(T97)
   f474_in(s(T104)) -> U5(f474_in(T104), s(T104))
   U5(f474_out1, s(T104)) -> f474_out1
   f474_in(0) -> f474_out1
   f493_in(s(T123), T124) -> U6(f493_in(T123, T124), s(T123), T124)
   U6(f493_out1(T126), s(T123), T124) -> f493_out1(s(T126))
   f493_in(0, T132) -> f493_out1(T132)
   f383_in(T66, T67) -> U7(f2_in(T66), T66, T67)
   U7(f2_out1(T73), T66, T67) -> U8(f463_in(T67, T73), T66, T67, T73)
   U8(f463_out1(X69, T69), T66, T67, T73) -> f383_out1(T73, X69, T69)
   f463_in(T67, T73) -> U9(f2_in(T67), T67, T73)
   U9(f2_out1(T80), T67, T73) -> U10(f2_in(plus(T73, T80)), T67, T73, T80)
   U10(f2_out1(T69), T67, T73, T80) -> f463_out1(T80, T69)
   f471_in(T94, T95) -> U11(f474_in(T94), T94, T95)
   U11(f474_out1, T94, T95) -> U12(f475_in(T95, T94), T94, T95)
   U12(f475_out1(T97), T94, T95) -> f471_out1(T97)
   f475_in(T95, T94) -> U13(f474_in(T95), T95, T94)
   U13(f474_out1, T95, T94) -> U14(f493_in(T94, T95), T95, T94)
   U14(f493_out1(T97), T95, T94) -> f475_out1(T97)

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

(92) NonLoopProof (COMPLETE)
By Theorem 8 [NONLOOP] we deduce infiniteness of the QDP.
We apply the theorem with m = 1, b = 0, 
?' = [ ], and ?' = [x0 / x1, x1 / x0] on the rule
F2_IN(plus(x1, x0))[ ]^n[ ] -> F2_IN(plus(x1, x0))[ ]^n[x0 / x1, x1 / x0]
This rule is correct for the QDP as the following derivation shows:

F2_IN(plus(x1, x0))[ ]^n[ ] -> F2_IN(plus(x1, x0))[ ]^n[x0 / x1, x1 / x0]
    by Equivalency by Simplifying Mu with mu1: [x0 / x1, x1 / x0] mu2: [ ]
    intermediate steps: Instantiate mu - Instantiation
    F2_IN(plus(T41, T42))[ ]^n[ ] -> F2_IN(plus(T42, T41))[ ]^n[ ]
        by Rule from TRS P
----------------------------------------

(93)
NO

----------------------------------------

(94) PrologToIRSwTTransformerProof (SOUND)
Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert

{
    "root": 3,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(s2 (plus A (plus B C)) D)",
                "(s2 (plus (plus A B) C) D)"
            ],
            [
                "(s2 (plus A B) C)",
                "(s2 (plus B A) C)"
            ],
            [
                "(s2 (plus X (0)) X)",
                null
            ],
            [
                "(s2 (plus X Y) Z)",
                "(',' (s2 X A) (',' (s2 Y B) (s2 (plus A B) Z)))"
            ],
            [
                "(s2 (plus A B) C)",
                "(',' (isNat A) (',' (isNat B) (add A B C)))"
            ],
            [
                "(isNat (s X))",
                "(isNat X)"
            ],
            [
                "(isNat (0))",
                null
            ],
            [
                "(add (s X) Y (s Z))",
                "(add X Y Z)"
            ],
            [
                "(add (0) X X)",
                null
            ]
        ]
    },
    "graph": {
        "nodes": {
            "29": {
                "goal": [{
                    "clause": 0,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "191": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus (plus T19 T20) T21) T23)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T19",
                        "T20",
                        "T21"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "290": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "292": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "type": "Nodes",
            "293": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "371": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 T66 X68) (',' (s2 T67 X69) (s2 (plus X68 X69) T69)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T66",
                        "T67"
                    ],
                    "free": [
                        "X68",
                        "X69"
                    ],
                    "exprvars": []
                }
            },
            "374": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "410": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "257": {
                "goal": [{
                    "clause": 1,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "411": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "258": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "335": {
                "goal": [{
                    "clause": 3,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "412": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat T95) (add T94 T95 T97))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "413": {
                "goal": [
                    {
                        "clause": 5,
                        "scope": 2,
                        "term": "(isNat T94)"
                    },
                    {
                        "clause": 6,
                        "scope": 2,
                        "term": "(isNat T94)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "414": {
                "goal": [{
                    "clause": 5,
                    "scope": 2,
                    "term": "(isNat T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "338": {
                "goal": [{
                    "clause": 4,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "415": {
                "goal": [{
                    "clause": 6,
                    "scope": 2,
                    "term": "(isNat T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "417": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T104)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T104"],
                    "free": [],
                    "exprvars": []
                }
            },
            "418": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "30": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "519": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add T123 T124 T126)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T123",
                        "T124"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "285": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus T42 T41) T44)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T41",
                        "T42"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "286": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "287": {
                "goal": [{
                    "clause": 2,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "288": {
                "goal": [
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "3": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "201": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "421": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "520": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "422": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "521": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "423": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "522": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "6": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "424": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T95)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T95"],
                    "free": [],
                    "exprvars": []
                }
            },
            "523": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "425": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add T94 T95 T97)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "426": {
                "goal": [
                    {
                        "clause": 7,
                        "scope": 3,
                        "term": "(add T94 T95 T97)"
                    },
                    {
                        "clause": 8,
                        "scope": 3,
                        "term": "(add T94 T95 T97)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "405": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T66 X68)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T66"],
                    "free": ["X68"],
                    "exprvars": []
                }
            },
            "427": {
                "goal": [{
                    "clause": 7,
                    "scope": 3,
                    "term": "(add T94 T95 T97)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "406": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 T67 X69) (s2 (plus T73 X69) T69))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T67",
                        "T73"
                    ],
                    "free": ["X69"],
                    "exprvars": []
                }
            },
            "428": {
                "goal": [{
                    "clause": 8,
                    "scope": 3,
                    "term": "(add T94 T95 T97)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "407": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T67 X69)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T67"],
                    "free": ["X69"],
                    "exprvars": []
                }
            },
            "408": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus T73 T80) T69)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T73",
                        "T80"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "409": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat T94) (',' (isNat T95) (add T94 T95 T97)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T94",
                        "T95"
                    ],
                    "free": [],
                    "exprvars": []
                }
            }
        },
        "edges": [
            {
                "from": 3,
                "to": 6,
                "label": "CASE"
            },
            {
                "from": 6,
                "to": 29,
                "label": "PARALLEL"
            },
            {
                "from": 6,
                "to": 30,
                "label": "PARALLEL"
            },
            {
                "from": 29,
                "to": 191,
                "label": "EVAL with clause\ns2(plus(X17, plus(X18, X19)), X20) :- s2(plus(plus(X17, X18), X19), X20).\nand substitutionX17 -> T19,\nX18 -> T20,\nX19 -> T21,\nT1 -> plus(T19, plus(T20, T21)),\nT2 -> T23,\nX20 -> T23,\nT22 -> T23"
            },
            {
                "from": 29,
                "to": 201,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 30,
                "to": 257,
                "label": "PARALLEL"
            },
            {
                "from": 30,
                "to": 258,
                "label": "PARALLEL"
            },
            {
                "from": 191,
                "to": 3,
                "label": "INSTANCE with matching:\nT1 -> plus(plus(T19, T20), T21)\nT2 -> T23"
            },
            {
                "from": 257,
                "to": 285,
                "label": "EVAL with clause\ns2(plus(X37, X38), X39) :- s2(plus(X38, X37), X39).\nand substitutionX37 -> T41,\nX38 -> T42,\nT1 -> plus(T41, T42),\nT2 -> T44,\nX39 -> T44,\nT43 -> T44"
            },
            {
                "from": 257,
                "to": 286,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 258,
                "to": 287,
                "label": "PARALLEL"
            },
            {
                "from": 258,
                "to": 288,
                "label": "PARALLEL"
            },
            {
                "from": 285,
                "to": 3,
                "label": "INSTANCE with matching:\nT1 -> plus(T42, T41)\nT2 -> T44"
            },
            {
                "from": 287,
                "to": 290,
                "label": "EVAL with clause\ns2(plus(X48, 0), X48).\nand substitutionX48 -> T53,\nT1 -> plus(T53, 0),\nT2 -> T53"
            },
            {
                "from": 287,
                "to": 292,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 288,
                "to": 335,
                "label": "PARALLEL"
            },
            {
                "from": 288,
                "to": 338,
                "label": "PARALLEL"
            },
            {
                "from": 290,
                "to": 293,
                "label": "SUCCESS"
            },
            {
                "from": 335,
                "to": 371,
                "label": "EVAL with clause\ns2(plus(X65, X66), X67) :- ','(s2(X65, X68), ','(s2(X66, X69), s2(plus(X68, X69), X67))).\nand substitutionX65 -> T66,\nX66 -> T67,\nT1 -> plus(T66, T67),\nT2 -> T69,\nX67 -> T69,\nT68 -> T69"
            },
            {
                "from": 335,
                "to": 374,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 338,
                "to": 409,
                "label": "EVAL with clause\ns2(plus(X100, X101), X102) :- ','(isNat(X100), ','(isNat(X101), add(X100, X101, X102))).\nand substitutionX100 -> T94,\nX101 -> T95,\nT1 -> plus(T94, T95),\nT2 -> T97,\nX102 -> T97,\nT96 -> T97"
            },
            {
                "from": 338,
                "to": 410,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 371,
                "to": 405,
                "label": "SPLIT 1"
            },
            {
                "from": 371,
                "to": 406,
                "label": "SPLIT 2\nnew knowledge:\nT66 is ground\nT73 is ground\nreplacements:X68 -> T73"
            },
            {
                "from": 405,
                "to": 3,
                "label": "INSTANCE with matching:\nT1 -> T66\nT2 -> X68"
            },
            {
                "from": 406,
                "to": 407,
                "label": "SPLIT 1"
            },
            {
                "from": 406,
                "to": 408,
                "label": "SPLIT 2\nnew knowledge:\nT67 is ground\nT80 is ground\nreplacements:X69 -> T80"
            },
            {
                "from": 407,
                "to": 3,
                "label": "INSTANCE with matching:\nT1 -> T67\nT2 -> X69"
            },
            {
                "from": 408,
                "to": 3,
                "label": "INSTANCE with matching:\nT1 -> plus(T73, T80)\nT2 -> T69"
            },
            {
                "from": 409,
                "to": 411,
                "label": "SPLIT 1"
            },
            {
                "from": 409,
                "to": 412,
                "label": "SPLIT 2\nnew knowledge:\nT94 is ground"
            },
            {
                "from": 411,
                "to": 413,
                "label": "CASE"
            },
            {
                "from": 412,
                "to": 424,
                "label": "SPLIT 1"
            },
            {
                "from": 412,
                "to": 425,
                "label": "SPLIT 2\nnew knowledge:\nT95 is ground"
            },
            {
                "from": 413,
                "to": 414,
                "label": "PARALLEL"
            },
            {
                "from": 413,
                "to": 415,
                "label": "PARALLEL"
            },
            {
                "from": 414,
                "to": 417,
                "label": "EVAL with clause\nisNat(s(X109)) :- isNat(X109).\nand substitutionX109 -> T104,\nT94 -> s(T104)"
            },
            {
                "from": 414,
                "to": 418,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 415,
                "to": 421,
                "label": "EVAL with clause\nisNat(0).\nand substitutionT94 -> 0"
            },
            {
                "from": 415,
                "to": 422,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 417,
                "to": 411,
                "label": "INSTANCE with matching:\nT94 -> T104"
            },
            {
                "from": 421,
                "to": 423,
                "label": "SUCCESS"
            },
            {
                "from": 424,
                "to": 411,
                "label": "INSTANCE with matching:\nT94 -> T95"
            },
            {
                "from": 425,
                "to": 426,
                "label": "CASE"
            },
            {
                "from": 426,
                "to": 427,
                "label": "PARALLEL"
            },
            {
                "from": 426,
                "to": 428,
                "label": "PARALLEL"
            },
            {
                "from": 427,
                "to": 519,
                "label": "EVAL with clause\nadd(s(X128), X129, s(X130)) :- add(X128, X129, X130).\nand substitutionX128 -> T123,\nT94 -> s(T123),\nT95 -> T124,\nX129 -> T124,\nX130 -> T126,\nT97 -> s(T126),\nT125 -> T126"
            },
            {
                "from": 427,
                "to": 520,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 428,
                "to": 521,
                "label": "EVAL with clause\nadd(0, X136, X136).\nand substitutionT94 -> 0,\nT95 -> T132,\nX136 -> T132,\nT97 -> T132"
            },
            {
                "from": 428,
                "to": 522,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 519,
                "to": 425,
                "label": "INSTANCE with matching:\nT94 -> T123\nT95 -> T124\nT97 -> T126"
            },
            {
                "from": 521,
                "to": 523,
                "label": "SUCCESS"
            }
        ],
        "type": "Graph"
    }
}

----------------------------------------

(95)
Complex Obligation (AND)

----------------------------------------

(96)
Obligation:
Rules:
f427_in(s(T123), T124) -> f519_in(T123, T124) :|: TRUE
f427_in(T94, T95) -> f520_in :|: TRUE
f519_out(x, x1) -> f427_out(s(x), x1) :|: TRUE
f520_out -> f427_out(x2, x3) :|: TRUE
f425_in(x4, x5) -> f426_in(x4, x5) :|: TRUE
f426_out(x6, x7) -> f425_out(x6, x7) :|: TRUE
f426_in(x8, x9) -> f427_in(x8, x9) :|: TRUE
f428_out(x10, x11) -> f426_out(x10, x11) :|: TRUE
f426_in(x12, x13) -> f428_in(x12, x13) :|: TRUE
f427_out(x14, x15) -> f426_out(x14, x15) :|: TRUE
f425_out(x16, x17) -> f519_out(x16, x17) :|: TRUE
f519_in(x18, x19) -> f425_in(x18, x19) :|: TRUE
f6_out(T1) -> f3_out(T1) :|: TRUE
f3_in(x20) -> f6_in(x20) :|: TRUE
f29_out(x21) -> f6_out(x21) :|: TRUE
f6_in(x22) -> f30_in(x22) :|: TRUE
f30_out(x23) -> f6_out(x23) :|: TRUE
f6_in(x24) -> f29_in(x24) :|: TRUE
f30_in(x25) -> f257_in(x25) :|: TRUE
f30_in(x26) -> f258_in(x26) :|: TRUE
f257_out(x27) -> f30_out(x27) :|: TRUE
f258_out(x28) -> f30_out(x28) :|: TRUE
f288_out(x29) -> f258_out(x29) :|: TRUE
f287_out(x30) -> f258_out(x30) :|: TRUE
f258_in(x31) -> f287_in(x31) :|: TRUE
f258_in(x32) -> f288_in(x32) :|: TRUE
f335_out(x33) -> f288_out(x33) :|: TRUE
f288_in(x34) -> f335_in(x34) :|: TRUE
f288_in(x35) -> f338_in(x35) :|: TRUE
f338_out(x36) -> f288_out(x36) :|: TRUE
f338_in(x37) -> f410_in :|: TRUE
f338_in(plus(x38, x39)) -> f409_in(x38, x39) :|: TRUE
f410_out -> f338_out(x40) :|: TRUE
f409_out(x41, x42) -> f338_out(plus(x41, x42)) :|: TRUE
f411_out(x43) -> f412_in(x44, x43) :|: TRUE
f409_in(x45, x46) -> f411_in(x45) :|: TRUE
f412_out(x47, x48) -> f409_out(x48, x47) :|: TRUE
f424_out(x49) -> f425_in(x50, x49) :|: TRUE
f425_out(x51, x52) -> f412_out(x52, x51) :|: TRUE
f412_in(x53, x54) -> f424_in(x53) :|: TRUE
Start term: f3_in(T1)

----------------------------------------

(97) IRSwTSimpleDependencyGraphProof (EQUIVALENT)
Constructed simple dependency graph.

Simplified to the following IRSwTs:


----------------------------------------

(98)
TRUE

----------------------------------------

(99)
Obligation:
Rules:
f413_in(T94) -> f415_in(T94) :|: TRUE
f413_in(x) -> f414_in(x) :|: TRUE
f415_out(x1) -> f413_out(x1) :|: TRUE
f414_out(x2) -> f413_out(x2) :|: TRUE
f413_out(x3) -> f411_out(x3) :|: TRUE
f411_in(x4) -> f413_in(x4) :|: TRUE
f411_out(T104) -> f417_out(T104) :|: TRUE
f417_in(x5) -> f411_in(x5) :|: TRUE
f417_out(x6) -> f414_out(s(x6)) :|: TRUE
f414_in(s(x7)) -> f417_in(x7) :|: TRUE
f418_out -> f414_out(x8) :|: TRUE
f414_in(x9) -> f418_in :|: TRUE
f6_out(T1) -> f3_out(T1) :|: TRUE
f3_in(x10) -> f6_in(x10) :|: TRUE
f29_out(x11) -> f6_out(x11) :|: TRUE
f6_in(x12) -> f30_in(x12) :|: TRUE
f30_out(x13) -> f6_out(x13) :|: TRUE
f6_in(x14) -> f29_in(x14) :|: TRUE
f30_in(x15) -> f257_in(x15) :|: TRUE
f30_in(x16) -> f258_in(x16) :|: TRUE
f257_out(x17) -> f30_out(x17) :|: TRUE
f258_out(x18) -> f30_out(x18) :|: TRUE
f288_out(x19) -> f258_out(x19) :|: TRUE
f287_out(x20) -> f258_out(x20) :|: TRUE
f258_in(x21) -> f287_in(x21) :|: TRUE
f258_in(x22) -> f288_in(x22) :|: TRUE
f335_out(x23) -> f288_out(x23) :|: TRUE
f288_in(x24) -> f335_in(x24) :|: TRUE
f288_in(x25) -> f338_in(x25) :|: TRUE
f338_out(x26) -> f288_out(x26) :|: TRUE
f338_in(x27) -> f410_in :|: TRUE
f338_in(plus(x28, x29)) -> f409_in(x28, x29) :|: TRUE
f410_out -> f338_out(x30) :|: TRUE
f409_out(x31, x32) -> f338_out(plus(x31, x32)) :|: TRUE
f411_out(x33) -> f412_in(x34, x33) :|: TRUE
f409_in(x35, x36) -> f411_in(x35) :|: TRUE
f412_out(x37, x38) -> f409_out(x38, x37) :|: TRUE
f424_out(x39) -> f425_in(x40, x39) :|: TRUE
f425_out(x41, x42) -> f412_out(x42, x41) :|: TRUE
f412_in(x43, x44) -> f424_in(x43) :|: TRUE
f424_in(T95) -> f411_in(T95) :|: TRUE
f411_out(x45) -> f424_out(x45) :|: TRUE
Start term: f3_in(T1)

----------------------------------------

(100) IRSwTSimpleDependencyGraphProof (EQUIVALENT)
Constructed simple dependency graph.

Simplified to the following IRSwTs:

intTRSProblem:
f413_in(x) -> f414_in(x) :|: TRUE
f411_in(x4) -> f413_in(x4) :|: TRUE
f417_in(x5) -> f411_in(x5) :|: TRUE
f414_in(s(x7)) -> f417_in(x7) :|: TRUE


----------------------------------------

(101)
Obligation:
Rules:
f413_in(x) -> f414_in(x) :|: TRUE
f411_in(x4) -> f413_in(x4) :|: TRUE
f417_in(x5) -> f411_in(x5) :|: TRUE
f414_in(s(x7)) -> f417_in(x7) :|: TRUE

----------------------------------------

(102) IntTRSCompressionProof (EQUIVALENT)
Compressed rules.
----------------------------------------

(103)
Obligation:
Rules:
f417_in(s(x7:0)) -> f417_in(x7:0) :|: TRUE

----------------------------------------

(104) IRSFormatTransformerProof (EQUIVALENT)
Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %).
----------------------------------------

(105)
Obligation:
Rules:
f417_in(s(x7:0)) -> f417_in(x7:0) :|: TRUE

----------------------------------------

(106) IRSwTTerminationDigraphProof (EQUIVALENT)
Constructed termination digraph!
Nodes:
(1) f417_in(s(x7:0)) -> f417_in(x7:0) :|: TRUE

Arcs:
(1) -> (1)

This digraph is fully evaluated!
----------------------------------------

(107)
Obligation:

Termination digraph:
Nodes:
(1) f417_in(s(x7:0)) -> f417_in(x7:0) :|: TRUE

Arcs:
(1) -> (1)

This digraph is fully evaluated!

----------------------------------------

(108) TempFilterProof (SOUND)
Used the following sort dictionary for filtering: 
f417_in(VARIABLE)
s(VARIABLE)
Removed predefined arithmetic.
----------------------------------------

(109)
Obligation:
Rules:
f417_in(s(x7:0)) -> f417_in(x7:0)

----------------------------------------

(110) IRSwTToQDPProof (SOUND)
Removed the integers and created a QDP-Problem.
----------------------------------------

(111)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   f417_in(s(x7:0)) -> f417_in(x7:0)

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

(112) QDPSizeChangeProof (EQUIVALENT)
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:
*f417_in(s(x7:0)) -> f417_in(x7:0)
The graph contains the following edges 1 > 1


----------------------------------------

(113)
YES

----------------------------------------

(114)
Obligation:
Rules:
f29_in(plus(T19, plus(T20, T21))) -> f191_in(T19, T20, T21) :|: TRUE
f201_out -> f29_out(T1) :|: TRUE
f191_out(x, x1, x2) -> f29_out(plus(x, plus(x1, x2))) :|: TRUE
f29_in(x3) -> f201_in :|: TRUE
f335_in(x4) -> f374_in :|: TRUE
f371_out(T66, T67) -> f335_out(plus(T66, T67)) :|: TRUE
f374_out -> f335_out(x5) :|: TRUE
f335_in(plus(x6, x7)) -> f371_in(x6, x7) :|: TRUE
f407_in(x8) -> f3_in(x8) :|: TRUE
f3_out(x9) -> f407_out(x9) :|: TRUE
f29_out(x10) -> f6_out(x10) :|: TRUE
f6_in(x11) -> f30_in(x11) :|: TRUE
f30_out(x12) -> f6_out(x12) :|: TRUE
f6_in(x13) -> f29_in(x13) :|: TRUE
f6_out(x14) -> f3_out(x14) :|: TRUE
f3_in(x15) -> f6_in(x15) :|: TRUE
f335_out(x16) -> f288_out(x16) :|: TRUE
f288_in(x17) -> f335_in(x17) :|: TRUE
f288_in(x18) -> f338_in(x18) :|: TRUE
f338_out(x19) -> f288_out(x19) :|: TRUE
f406_out(x20, x21) -> f371_out(x22, x20) :|: TRUE
f405_out(x23) -> f406_in(x24, x25) :|: TRUE
f371_in(x26, x27) -> f405_in(x26) :|: TRUE
f405_in(x28) -> f3_in(x28) :|: TRUE
f3_out(x29) -> f405_out(x29) :|: TRUE
f257_in(plus(T41, T42)) -> f285_in(T42, T41) :|: TRUE
f257_in(x30) -> f286_in :|: TRUE
f285_out(x31, x32) -> f257_out(plus(x32, x31)) :|: TRUE
f286_out -> f257_out(x33) :|: TRUE
f288_out(x34) -> f258_out(x34) :|: TRUE
f287_out(x35) -> f258_out(x35) :|: TRUE
f258_in(x36) -> f287_in(x36) :|: TRUE
f258_in(x37) -> f288_in(x37) :|: TRUE
f30_in(x38) -> f257_in(x38) :|: TRUE
f30_in(x39) -> f258_in(x39) :|: TRUE
f257_out(x40) -> f30_out(x40) :|: TRUE
f258_out(x41) -> f30_out(x41) :|: TRUE
f285_in(x42, x43) -> f3_in(plus(x42, x43)) :|: TRUE
f3_out(plus(x44, x45)) -> f285_out(x44, x45) :|: TRUE
f408_in(T73, T80) -> f3_in(plus(T73, T80)) :|: TRUE
f3_out(plus(x46, x47)) -> f408_out(x46, x47) :|: TRUE
f408_out(x48, x49) -> f406_out(x50, x48) :|: TRUE
f406_in(x51, x52) -> f407_in(x51) :|: TRUE
f407_out(x53) -> f408_in(x54, x55) :|: TRUE
f3_out(plus(plus(x56, x57), x58)) -> f191_out(x56, x57, x58) :|: TRUE
f191_in(x59, x60, x61) -> f3_in(plus(plus(x59, x60), x61)) :|: TRUE
Start term: f3_in(T1)

----------------------------------------

(115) IRSwTSimpleDependencyGraphProof (EQUIVALENT)
Constructed simple dependency graph.

Simplified to the following IRSwTs:

intTRSProblem:
f29_in(plus(T19, plus(T20, T21))) -> f191_in(T19, T20, T21) :|: TRUE
f335_in(plus(x6, x7)) -> f371_in(x6, x7) :|: TRUE
f6_in(x11) -> f30_in(x11) :|: TRUE
f6_in(x13) -> f29_in(x13) :|: TRUE
f3_in(x15) -> f6_in(x15) :|: TRUE
f288_in(x17) -> f335_in(x17) :|: TRUE
f371_in(x26, x27) -> f405_in(x26) :|: TRUE
f405_in(x28) -> f3_in(x28) :|: TRUE
f257_in(plus(T41, T42)) -> f285_in(T42, T41) :|: TRUE
f258_in(x37) -> f288_in(x37) :|: TRUE
f30_in(x38) -> f257_in(x38) :|: TRUE
f30_in(x39) -> f258_in(x39) :|: TRUE
f285_in(x42, x43) -> f3_in(plus(x42, x43)) :|: TRUE
f191_in(x59, x60, x61) -> f3_in(plus(plus(x59, x60), x61)) :|: TRUE


----------------------------------------

(116)
Obligation:
Rules:
f29_in(plus(T19, plus(T20, T21))) -> f191_in(T19, T20, T21) :|: TRUE
f335_in(plus(x6, x7)) -> f371_in(x6, x7) :|: TRUE
f6_in(x11) -> f30_in(x11) :|: TRUE
f6_in(x13) -> f29_in(x13) :|: TRUE
f3_in(x15) -> f6_in(x15) :|: TRUE
f288_in(x17) -> f335_in(x17) :|: TRUE
f371_in(x26, x27) -> f405_in(x26) :|: TRUE
f405_in(x28) -> f3_in(x28) :|: TRUE
f257_in(plus(T41, T42)) -> f285_in(T42, T41) :|: TRUE
f258_in(x37) -> f288_in(x37) :|: TRUE
f30_in(x38) -> f257_in(x38) :|: TRUE
f30_in(x39) -> f258_in(x39) :|: TRUE
f285_in(x42, x43) -> f3_in(plus(x42, x43)) :|: TRUE
f191_in(x59, x60, x61) -> f3_in(plus(plus(x59, x60), x61)) :|: TRUE

----------------------------------------

(117) IntTRSCompressionProof (EQUIVALENT)
Compressed rules.
----------------------------------------

(118)
Obligation:
Rules:
f3_in(plus(T41:0, T42:0)) -> f3_in(plus(T42:0, T41:0)) :|: TRUE
f3_in(plus(T19:0, plus(T20:0, T21:0))) -> f3_in(plus(plus(T19:0, T20:0), T21:0)) :|: TRUE
f3_in(plus(x6:0, x7:0)) -> f3_in(x6:0) :|: TRUE

----------------------------------------

(119) IRSFormatTransformerProof (EQUIVALENT)
Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %).
----------------------------------------

(120)
Obligation:
Rules:
f3_in(plus(T41:0, T42:0)) -> f3_in(plus(T42:0, T41:0)) :|: TRUE
f3_in(plus(T19:0, plus(T20:0, T21:0))) -> f3_in(plus(plus(T19:0, T20:0), T21:0)) :|: TRUE
f3_in(plus(x6:0, x7:0)) -> f3_in(x6:0) :|: TRUE

----------------------------------------

(121) IRSwTTerminationDigraphProof (EQUIVALENT)
Constructed termination digraph!
Nodes:
(1) f3_in(plus(T41:0, T42:0)) -> f3_in(plus(T42:0, T41:0)) :|: TRUE
(2) f3_in(plus(T19:0, plus(T20:0, T21:0))) -> f3_in(plus(plus(T19:0, T20:0), T21:0)) :|: TRUE
(3) f3_in(plus(x6:0, x7:0)) -> f3_in(x6:0) :|: TRUE

Arcs:
(1) -> (1), (2), (3)
(2) -> (1), (2), (3)
(3) -> (1), (2), (3)

This digraph is fully evaluated!
----------------------------------------

(122)
Obligation:

Termination digraph:
Nodes:
(1) f3_in(plus(T41:0, T42:0)) -> f3_in(plus(T42:0, T41:0)) :|: TRUE
(2) f3_in(plus(T19:0, plus(T20:0, T21:0))) -> f3_in(plus(plus(T19:0, T20:0), T21:0)) :|: TRUE
(3) f3_in(plus(x6:0, x7:0)) -> f3_in(x6:0) :|: TRUE

Arcs:
(1) -> (1), (2), (3)
(2) -> (1), (2), (3)
(3) -> (1), (2), (3)

This digraph is fully evaluated!

----------------------------------------

(123) PrologToDTProblemTransformerProof (SOUND)
Built DT problem from termination graph DT10.

{
    "root": 1,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(s2 (plus A (plus B C)) D)",
                "(s2 (plus (plus A B) C) D)"
            ],
            [
                "(s2 (plus A B) C)",
                "(s2 (plus B A) C)"
            ],
            [
                "(s2 (plus X (0)) X)",
                null
            ],
            [
                "(s2 (plus X Y) Z)",
                "(',' (s2 X A) (',' (s2 Y B) (s2 (plus A B) Z)))"
            ],
            [
                "(s2 (plus A B) C)",
                "(',' (isNat A) (',' (isNat B) (add A B C)))"
            ],
            [
                "(isNat (s X))",
                "(isNat X)"
            ],
            [
                "(isNat (0))",
                null
            ],
            [
                "(add (s X) Y (s Z))",
                "(add X Y Z)"
            ],
            [
                "(add (0) X X)",
                null
            ]
        ]
    },
    "graph": {
        "nodes": {
            "type": "Nodes",
            "470": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "473": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T156)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T156"],
                    "free": [],
                    "exprvars": []
                }
            },
            "476": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add (plus T154 T155) T156 T158)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T154",
                        "T155",
                        "T156"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "510": {
                "goal": [
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "511": {
                "goal": [{
                    "clause": 3,
                    "scope": 1,
                    "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "512": {
                "goal": [{
                    "clause": 4,
                    "scope": 1,
                    "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "513": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 T230 X212) (',' (s2 (plus T231 T232) X213) (s2 (plus X212 X213) T234)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T230",
                        "T231",
                        "T232"
                    ],
                    "free": [
                        "X212",
                        "X213"
                    ],
                    "exprvars": []
                }
            },
            "514": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T230 X212)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T230"],
                    "free": ["X212"],
                    "exprvars": []
                }
            },
            "515": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 (plus T231 T232) X213) (s2 (plus T238 X213) T234))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T231",
                        "T232",
                        "T238"
                    ],
                    "free": ["X213"],
                    "exprvars": []
                }
            },
            "516": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat T255) (',' (isNat (plus T256 T257)) (add T255 (plus T256 T257) T259)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T255",
                        "T256",
                        "T257"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "517": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T255)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T255"],
                    "free": [],
                    "exprvars": []
                }
            },
            "518": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat (plus T256 T257)) (add T255 (plus T256 T257) T259))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T255",
                        "T256",
                        "T257"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "480": {
                "goal": [
                    {
                        "clause": 5,
                        "scope": 4,
                        "term": "(isNat T156)"
                    },
                    {
                        "clause": 6,
                        "scope": 4,
                        "term": "(isNat T156)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T156"],
                    "free": [],
                    "exprvars": []
                }
            },
            "483": {
                "goal": [{
                    "clause": 5,
                    "scope": 4,
                    "term": "(isNat T156)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T156"],
                    "free": [],
                    "exprvars": []
                }
            },
            "484": {
                "goal": [{
                    "clause": 6,
                    "scope": 4,
                    "term": "(isNat T156)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T156"],
                    "free": [],
                    "exprvars": []
                }
            },
            "1": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "485": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T165)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T165"],
                    "free": [],
                    "exprvars": []
                }
            },
            "486": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "246": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 2,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 3,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 4,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": -1,
                        "scope": 2,
                        "term": null
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "524": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat (plus T256 T257))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T256",
                        "T257"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "525": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add T255 (plus T256 T257) T259)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T255",
                        "T256",
                        "T257"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "9": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "526": {
                "goal": [
                    {
                        "clause": 7,
                        "scope": 6,
                        "term": "(add T255 (plus T256 T257) T259)"
                    },
                    {
                        "clause": 8,
                        "scope": 6,
                        "term": "(add T255 (plus T256 T257) T259)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T255",
                        "T256",
                        "T257"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "527": {
                "goal": [{
                    "clause": 7,
                    "scope": 6,
                    "term": "(add T255 (plus T256 T257) T259)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T255",
                        "T256",
                        "T257"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "528": {
                "goal": [{
                    "clause": 8,
                    "scope": 6,
                    "term": "(add T255 (plus T256 T257) T259)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T255",
                        "T256",
                        "T257"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "529": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add T282 (plus T283 T284) T286)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T282",
                        "T283",
                        "T284"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "490": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "491": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "494": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "495": {
                "goal": [
                    {
                        "clause": 7,
                        "scope": 5,
                        "term": "(add (plus T154 T155) T156 T158)"
                    },
                    {
                        "clause": 8,
                        "scope": 5,
                        "term": "(add (plus T154 T155) T156 T158)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T154",
                        "T155",
                        "T156"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "496": {
                "goal": [{
                    "clause": 8,
                    "scope": 5,
                    "term": "(add (plus T154 T155) T156 T158)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T154",
                        "T155",
                        "T156"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "497": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "530": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "498": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "531": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "652": {
                "goal": [{
                    "clause": 3,
                    "scope": 1,
                    "term": "(s2 (plus T300 T301) T2)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "532": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "653": {
                "goal": [{
                    "clause": 4,
                    "scope": 1,
                    "term": "(s2 (plus T300 T301) T2)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "533": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "654": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 T536 X548) (',' (s2 T537 X549) (s2 (plus X548 X549) T539)))"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T536 T537) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T536",
                        "T537"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8",
                        "X548",
                        "X549"
                    ],
                    "exprvars": []
                }
            },
            "534": {
                "goal": [
                    {
                        "clause": -1,
                        "scope": -1,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "655": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T536 X548)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T536 T537) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T536",
                        "T537"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8",
                        "X548"
                    ],
                    "exprvars": []
                }
            },
            "535": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [
                        [
                            "(s2 T1 T2)",
                            "(s2 (plus X5 (plus X6 X7)) X8)"
                        ],
                        [
                            "(s2 T1 T2)",
                            "(s2 (plus X270 X271) X272)"
                        ]
                    ],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8",
                        "X270",
                        "X271",
                        "X272"
                    ],
                    "exprvars": []
                }
            },
            "656": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 T537 X549) (s2 (plus T543 X549) T539))"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T536 T537) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T536",
                        "T537",
                        "T543"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8",
                        "X549"
                    ],
                    "exprvars": []
                }
            },
            "536": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 1,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 2,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 3,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 4,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": -1,
                        "scope": 7,
                        "term": null
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "416": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus T72 (plus T70 T71)) T74)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T70",
                        "T71",
                        "T72"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "537": {
                "goal": [{
                    "clause": 0,
                    "scope": 7,
                    "term": "(s2 (plus T301 T300) T303)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "658": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat T566) (',' (isNat T567) (add T566 T567 T569)))"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T566 T567) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T566",
                        "T567"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "538": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 2,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 3,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 4,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": -1,
                        "scope": 7,
                        "term": null
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "539": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus (plus T320 T321) T322) T324)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus (plus T321 T322) T320) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T320",
                        "T321",
                        "T322"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "419": {
                "goal": [{
                    "clause": 2,
                    "scope": 2,
                    "term": "(s2 (plus (plus T7 T8) T9) T11)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "540": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "420": {
                "goal": [
                    {
                        "clause": 3,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 4,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": -1,
                        "scope": 2,
                        "term": null
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "541": {
                "goal": [{
                    "clause": 1,
                    "scope": 7,
                    "term": "(s2 (plus T301 T300) T303)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "662": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T566)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T566 T567) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T566",
                        "T567"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "542": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 3,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 4,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": -1,
                        "scope": 7,
                        "term": null
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "663": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat T567) (add T566 T567 T569))"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T566 T567) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T566",
                        "T567"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "543": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus T359 T358) T361)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T359 T358) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T358",
                        "T359"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "664": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T567)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T566 T567) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T566",
                        "T567"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "544": {
                "goal": [{
                    "clause": 2,
                    "scope": 7,
                    "term": "(s2 (plus T301 T300) T303)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "665": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add T566 T567 T569)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T566 T567) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T566",
                        "T567"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "545": {
                "goal": [
                    {
                        "clause": 3,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": 4,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": -1,
                        "scope": 7,
                        "term": null
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "546": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "547": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "548": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "549": {
                "goal": [{
                    "clause": 3,
                    "scope": 7,
                    "term": "(s2 (plus T301 T300) T303)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "429": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "705": {
                "goal": [{
                    "clause": 4,
                    "scope": 1,
                    "term": "(s2 T1 T2)"
                }],
                "kb": {
                    "nonunifying": [
                        [
                            "(s2 T1 T2)",
                            "(s2 (plus X5 (plus X6 X7)) X8)"
                        ],
                        [
                            "(s2 T1 T2)",
                            "(s2 (plus X270 X271) X272)"
                        ]
                    ],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8",
                        "X270",
                        "X271",
                        "X272"
                    ],
                    "exprvars": []
                }
            },
            "706": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "550": {
                "goal": [
                    {
                        "clause": 4,
                        "scope": 7,
                        "term": "(s2 (plus T301 T300) T303)"
                    },
                    {
                        "clause": -1,
                        "scope": 7,
                        "term": null
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "430": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "551": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 T410 X399) (',' (s2 T411 X400) (s2 (plus X399 X400) T413)))"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T411 T410) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T410",
                        "T411"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8",
                        "X399",
                        "X400"
                    ],
                    "exprvars": []
                }
            },
            "431": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "552": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T410 X399)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T411 T410) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T410",
                        "T411"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8",
                        "X399"
                    ],
                    "exprvars": []
                }
            },
            "553": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 T411 X400) (s2 (plus T425 X400) T413))"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T411 T410) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T410",
                        "T411",
                        "T425"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8",
                        "X400"
                    ],
                    "exprvars": []
                }
            },
            "279": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus (plus (plus T32 T33) T34) T35) T37)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T32",
                        "T33",
                        "T34",
                        "T35"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "554": {
                "goal": [{
                    "clause": 4,
                    "scope": 7,
                    "term": "(s2 (plus T301 T300) T303)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "555": {
                "goal": [
                    {
                        "clause": -1,
                        "scope": 7,
                        "term": null
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "556": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat T456) (',' (isNat T457) (add T456 T457 T459)))"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T457 T456) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T456",
                        "T457"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "557": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T456)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T457 T456) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T456",
                        "T457"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "558": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat T457) (add T456 T457 T459))"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T457 T456) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T456",
                        "T457"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "559": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat T457)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T457 T456) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T456",
                        "T457"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "51": {
                "goal": [
                    {
                        "clause": -1,
                        "scope": -1,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "52": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 T1 T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "53": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 1,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 2,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 3,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 4,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": -1,
                        "scope": 2,
                        "term": null
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "54": {
                "goal": [{
                    "clause": 0,
                    "scope": 2,
                    "term": "(s2 (plus (plus T7 T8) T9) T11)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "282": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "560": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add T456 T457 T459)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T457 T456) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T456",
                        "T457"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "561": {
                "goal": [
                    {
                        "clause": 7,
                        "scope": 8,
                        "term": "(add T456 T457 T459)"
                    },
                    {
                        "clause": 8,
                        "scope": 8,
                        "term": "(add T456 T457 T459)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T457 T456) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T456",
                        "T457"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "562": {
                "goal": [{
                    "clause": 7,
                    "scope": 8,
                    "term": "(add T456 T457 T459)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T457 T456) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T456",
                        "T457"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "563": {
                "goal": [{
                    "clause": 8,
                    "scope": 8,
                    "term": "(add T456 T457 T459)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T457 T456) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T456",
                        "T457"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "289": {
                "goal": [{
                    "clause": 1,
                    "scope": 2,
                    "term": "(s2 (plus (plus T7 T8) T9) T11)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "564": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add T479 T480 T482)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T479",
                        "T480"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "685": {
                "goal": [
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [
                        [
                            "(s2 T1 T2)",
                            "(s2 (plus X5 (plus X6 X7)) X8)"
                        ],
                        [
                            "(s2 T1 T2)",
                            "(s2 (plus X270 X271) X272)"
                        ]
                    ],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8",
                        "X270",
                        "X271",
                        "X272"
                    ],
                    "exprvars": []
                }
            },
            "565": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "566": {
                "goal": [
                    {
                        "clause": 7,
                        "scope": 9,
                        "term": "(add T479 T480 T482)"
                    },
                    {
                        "clause": 8,
                        "scope": 9,
                        "term": "(add T479 T480 T482)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T479",
                        "T480"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "567": {
                "goal": [{
                    "clause": 7,
                    "scope": 9,
                    "term": "(add T479 T480 T482)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T479",
                        "T480"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "568": {
                "goal": [{
                    "clause": 8,
                    "scope": 9,
                    "term": "(add T479 T480 T482)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T479",
                        "T480"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "569": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(add T498 T499 T501)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T498",
                        "T499"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "608": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "609": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "291": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 3,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": 4,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": -1,
                        "scope": 2,
                        "term": null
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "570": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "571": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "452": {
                "goal": [{
                    "clause": 3,
                    "scope": 2,
                    "term": "(s2 (plus (plus T7 T8) T9) T11)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "453": {
                "goal": [
                    {
                        "clause": 4,
                        "scope": 2,
                        "term": "(s2 (plus (plus T7 T8) T9) T11)"
                    },
                    {
                        "clause": -1,
                        "scope": 2,
                        "term": null
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "454": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 (plus T113 T114) X94) (',' (s2 T115 X95) (s2 (plus X94 X95) T117)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T113",
                        "T114",
                        "T115"
                    ],
                    "free": [
                        "X94",
                        "X95"
                    ],
                    "exprvars": []
                }
            },
            "455": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus T113 T114) X94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T113",
                        "T114"
                    ],
                    "free": ["X94"],
                    "exprvars": []
                }
            },
            "456": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (s2 T115 X95) (s2 (plus T121 X95) T117))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T115",
                        "T121"
                    ],
                    "free": ["X95"],
                    "exprvars": []
                }
            },
            "610": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "457": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 T115 X95)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T115"],
                    "free": ["X95"],
                    "exprvars": []
                }
            },
            "611": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "458": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus T121 T128) T117)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T121",
                        "T128"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "612": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "459": {
                "goal": [{
                    "clause": 4,
                    "scope": 2,
                    "term": "(s2 (plus (plus T7 T8) T9) T11)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "613": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "614": {
                "goal": [{
                    "clause": 2,
                    "scope": 1,
                    "term": "(s2 (plus T300 T301) T2)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "615": {
                "goal": [
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T300 T301) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [[
                        "(s2 (plus T300 T301) T2)",
                        "(s2 (plus X5 (plus X6 X7)) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T300",
                        "T301"
                    ],
                    "free": [
                        "X5",
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "616": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "617": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "618": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "460": {
                "goal": [
                    {
                        "clause": -1,
                        "scope": 2,
                        "term": null
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "461": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat (plus T154 T155)) (',' (isNat T156) (add (plus T154 T155) T156 T158)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T154",
                        "T155",
                        "T156"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "466": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(isNat (plus T154 T155))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T154",
                        "T155"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "467": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (isNat T156) (add (plus T154 T155) T156 T158))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T154",
                        "T155",
                        "T156"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "468": {
                "goal": [
                    {
                        "clause": 5,
                        "scope": 3,
                        "term": "(isNat (plus T154 T155))"
                    },
                    {
                        "clause": 6,
                        "scope": 3,
                        "term": "(isNat (plus T154 T155))"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T154",
                        "T155"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "469": {
                "goal": [{
                    "clause": 6,
                    "scope": 3,
                    "term": "(isNat (plus T154 T155))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T154",
                        "T155"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "502": {
                "goal": [{
                    "clause": 1,
                    "scope": 1,
                    "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "503": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 3,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    },
                    {
                        "clause": 4,
                        "scope": 1,
                        "term": "(s2 (plus T7 (plus T8 T9)) T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T7",
                        "T8",
                        "T9"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "509": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(s2 (plus (plus T196 T197) T195) T199)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T195",
                        "T196",
                        "T197"
                    ],
                    "free": [],
                    "exprvars": []
                }
            }
        },
        "edges": [
            {
                "from": 1,
                "to": 9,
                "label": "CASE"
            },
            {
                "from": 9,
                "to": 51,
                "label": "EVAL with clause\ns2(plus(X5, plus(X6, X7)), X8) :- s2(plus(plus(X5, X6), X7), X8).\nand substitutionX5 -> T7,\nX6 -> T8,\nX7 -> T9,\nT1 -> plus(T7, plus(T8, T9)),\nT2 -> T11,\nX8 -> T11,\nT10 -> T11"
            },
            {
                "from": 9,
                "to": 52,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 51,
                "to": 53,
                "label": "CASE"
            },
            {
                "from": 52,
                "to": 534,
                "label": "EVAL with clause\ns2(plus(X270, X271), X272) :- s2(plus(X271, X270), X272).\nand substitutionX270 -> T300,\nX271 -> T301,\nT1 -> plus(T300, T301),\nT2 -> T303,\nX272 -> T303,\nT302 -> T303"
            },
            {
                "from": 52,
                "to": 535,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 53,
                "to": 54,
                "label": "PARALLEL"
            },
            {
                "from": 53,
                "to": 246,
                "label": "PARALLEL"
            },
            {
                "from": 54,
                "to": 279,
                "label": "EVAL with clause\ns2(plus(X25, plus(X26, X27)), X28) :- s2(plus(plus(X25, X26), X27), X28).\nand substitutionT7 -> T32,\nT8 -> T33,\nX25 -> plus(T32, T33),\nX26 -> T34,\nX27 -> T35,\nT9 -> plus(T34, T35),\nT11 -> T37,\nX28 -> T37,\nT36 -> T37"
            },
            {
                "from": 54,
                "to": 282,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 246,
                "to": 289,
                "label": "PARALLEL"
            },
            {
                "from": 246,
                "to": 291,
                "label": "PARALLEL"
            },
            {
                "from": 279,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> plus(plus(plus(T32, T33), T34), T35)\nT2 -> T37"
            },
            {
                "from": 289,
                "to": 416,
                "label": "ONLY EVAL with clause\ns2(plus(X53, X54), X55) :- s2(plus(X54, X53), X55).\nand substitutionT7 -> T70,\nT8 -> T71,\nX53 -> plus(T70, T71),\nT9 -> T72,\nX54 -> T72,\nT11 -> T74,\nX55 -> T74,\nT73 -> T74"
            },
            {
                "from": 291,
                "to": 419,
                "label": "PARALLEL"
            },
            {
                "from": 291,
                "to": 420,
                "label": "PARALLEL"
            },
            {
                "from": 416,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> plus(T72, plus(T70, T71))\nT2 -> T74"
            },
            {
                "from": 419,
                "to": 429,
                "label": "EVAL with clause\ns2(plus(X64, 0), X64).\nand substitutionT7 -> T87,\nT8 -> T88,\nX64 -> plus(T87, T88),\nT9 -> 0,\nT11 -> plus(T87, T88)"
            },
            {
                "from": 419,
                "to": 430,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 420,
                "to": 452,
                "label": "PARALLEL"
            },
            {
                "from": 420,
                "to": 453,
                "label": "PARALLEL"
            },
            {
                "from": 429,
                "to": 431,
                "label": "SUCCESS"
            },
            {
                "from": 452,
                "to": 454,
                "label": "ONLY EVAL with clause\ns2(plus(X91, X92), X93) :- ','(s2(X91, X94), ','(s2(X92, X95), s2(plus(X94, X95), X93))).\nand substitutionT7 -> T113,\nT8 -> T114,\nX91 -> plus(T113, T114),\nT9 -> T115,\nX92 -> T115,\nT11 -> T117,\nX93 -> T117,\nT116 -> T117"
            },
            {
                "from": 453,
                "to": 459,
                "label": "PARALLEL"
            },
            {
                "from": 453,
                "to": 460,
                "label": "PARALLEL"
            },
            {
                "from": 454,
                "to": 455,
                "label": "SPLIT 1"
            },
            {
                "from": 454,
                "to": 456,
                "label": "SPLIT 2\nnew knowledge:\nT113 is ground\nT114 is ground\nT121 is ground\nreplacements:X94 -> T121"
            },
            {
                "from": 455,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> plus(T113, T114)\nT2 -> X94"
            },
            {
                "from": 456,
                "to": 457,
                "label": "SPLIT 1"
            },
            {
                "from": 456,
                "to": 458,
                "label": "SPLIT 2\nnew knowledge:\nT115 is ground\nT128 is ground\nreplacements:X95 -> T128"
            },
            {
                "from": 457,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> T115\nT2 -> X95"
            },
            {
                "from": 458,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> plus(T121, T128)\nT2 -> T117"
            },
            {
                "from": 459,
                "to": 461,
                "label": "ONLY EVAL with clause\ns2(plus(X134, X135), X136) :- ','(isNat(X134), ','(isNat(X135), add(X134, X135, X136))).\nand substitutionT7 -> T154,\nT8 -> T155,\nX134 -> plus(T154, T155),\nT9 -> T156,\nX135 -> T156,\nT11 -> T158,\nX136 -> T158,\nT157 -> T158"
            },
            {
                "from": 460,
                "to": 498,
                "label": "FAILURE"
            },
            {
                "from": 461,
                "to": 466,
                "label": "SPLIT 1"
            },
            {
                "from": 461,
                "to": 467,
                "label": "SPLIT 2\nnew knowledge:\nT154 is ground\nT155 is ground"
            },
            {
                "from": 466,
                "to": 468,
                "label": "CASE"
            },
            {
                "from": 467,
                "to": 473,
                "label": "SPLIT 1"
            },
            {
                "from": 467,
                "to": 476,
                "label": "SPLIT 2\nnew knowledge:\nT156 is ground"
            },
            {
                "from": 468,
                "to": 469,
                "label": "BACKTRACK\nfor clause: isNat(s(X)) :- isNat(X)because of non-unification"
            },
            {
                "from": 469,
                "to": 470,
                "label": "BACKTRACK\nfor clause: isNat(0)because of non-unification"
            },
            {
                "from": 473,
                "to": 480,
                "label": "CASE"
            },
            {
                "from": 476,
                "to": 495,
                "label": "CASE"
            },
            {
                "from": 480,
                "to": 483,
                "label": "PARALLEL"
            },
            {
                "from": 480,
                "to": 484,
                "label": "PARALLEL"
            },
            {
                "from": 483,
                "to": 485,
                "label": "EVAL with clause\nisNat(s(X146)) :- isNat(X146).\nand substitutionX146 -> T165,\nT156 -> s(T165)"
            },
            {
                "from": 483,
                "to": 486,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 484,
                "to": 490,
                "label": "EVAL with clause\nisNat(0).\nand substitutionT156 -> 0"
            },
            {
                "from": 484,
                "to": 491,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 485,
                "to": 473,
                "label": "INSTANCE with matching:\nT156 -> T165"
            },
            {
                "from": 490,
                "to": 494,
                "label": "SUCCESS"
            },
            {
                "from": 495,
                "to": 496,
                "label": "BACKTRACK\nfor clause: add(s(X), Y, s(Z)) :- add(X, Y, Z)because of non-unification"
            },
            {
                "from": 496,
                "to": 497,
                "label": "BACKTRACK\nfor clause: add(0, X, X)because of non-unification"
            },
            {
                "from": 498,
                "to": 502,
                "label": "PARALLEL"
            },
            {
                "from": 498,
                "to": 503,
                "label": "PARALLEL"
            },
            {
                "from": 502,
                "to": 509,
                "label": "ONLY EVAL with clause\ns2(plus(X175, X176), X177) :- s2(plus(X176, X175), X177).\nand substitutionT7 -> T195,\nX175 -> T195,\nT8 -> T196,\nT9 -> T197,\nX176 -> plus(T196, T197),\nT2 -> T199,\nX177 -> T199,\nT198 -> T199"
            },
            {
                "from": 503,
                "to": 510,
                "label": "BACKTRACK\nfor clause: s2(plus(X, 0), X)because of non-unification"
            },
            {
                "from": 509,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> plus(plus(T196, T197), T195)\nT2 -> T199"
            },
            {
                "from": 510,
                "to": 511,
                "label": "PARALLEL"
            },
            {
                "from": 510,
                "to": 512,
                "label": "PARALLEL"
            },
            {
                "from": 511,
                "to": 513,
                "label": "ONLY EVAL with clause\ns2(plus(X209, X210), X211) :- ','(s2(X209, X212), ','(s2(X210, X213), s2(plus(X212, X213), X211))).\nand substitutionT7 -> T230,\nX209 -> T230,\nT8 -> T231,\nT9 -> T232,\nX210 -> plus(T231, T232),\nT2 -> T234,\nX211 -> T234,\nT233 -> T234"
            },
            {
                "from": 512,
                "to": 516,
                "label": "ONLY EVAL with clause\ns2(plus(X236, X237), X238) :- ','(isNat(X236), ','(isNat(X237), add(X236, X237, X238))).\nand substitutionT7 -> T255,\nX236 -> T255,\nT8 -> T256,\nT9 -> T257,\nX237 -> plus(T256, T257),\nT2 -> T259,\nX238 -> T259,\nT258 -> T259"
            },
            {
                "from": 513,
                "to": 514,
                "label": "SPLIT 1"
            },
            {
                "from": 513,
                "to": 515,
                "label": "SPLIT 2\nnew knowledge:\nT230 is ground\nT238 is ground\nreplacements:X212 -> T238"
            },
            {
                "from": 514,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> T230\nT2 -> X212"
            },
            {
                "from": 515,
                "to": 456,
                "label": "INSTANCE with matching:\nT115 -> plus(T231, T232)\nX95 -> X213\nT121 -> T238\nT117 -> T234"
            },
            {
                "from": 516,
                "to": 517,
                "label": "SPLIT 1"
            },
            {
                "from": 516,
                "to": 518,
                "label": "SPLIT 2\nnew knowledge:\nT255 is ground"
            },
            {
                "from": 517,
                "to": 473,
                "label": "INSTANCE with matching:\nT156 -> T255"
            },
            {
                "from": 518,
                "to": 524,
                "label": "SPLIT 1"
            },
            {
                "from": 518,
                "to": 525,
                "label": "SPLIT 2\nnew knowledge:\nT256 is ground\nT257 is ground"
            },
            {
                "from": 524,
                "to": 466,
                "label": "INSTANCE with matching:\nT154 -> T256\nT155 -> T257"
            },
            {
                "from": 525,
                "to": 526,
                "label": "CASE"
            },
            {
                "from": 526,
                "to": 527,
                "label": "PARALLEL"
            },
            {
                "from": 526,
                "to": 528,
                "label": "PARALLEL"
            },
            {
                "from": 527,
                "to": 529,
                "label": "EVAL with clause\nadd(s(X258), X259, s(X260)) :- add(X258, X259, X260).\nand substitutionX258 -> T282,\nT255 -> s(T282),\nT256 -> T283,\nT257 -> T284,\nX259 -> plus(T283, T284),\nX260 -> T286,\nT259 -> s(T286),\nT285 -> T286"
            },
            {
                "from": 527,
                "to": 530,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 528,
                "to": 531,
                "label": "EVAL with clause\nadd(0, X266, X266).\nand substitutionT255 -> 0,\nT256 -> T295,\nT257 -> T296,\nX266 -> plus(T295, T296),\nT259 -> plus(T295, T296)"
            },
            {
                "from": 528,
                "to": 532,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 529,
                "to": 525,
                "label": "INSTANCE with matching:\nT255 -> T282\nT256 -> T283\nT257 -> T284\nT259 -> T286"
            },
            {
                "from": 531,
                "to": 533,
                "label": "SUCCESS"
            },
            {
                "from": 534,
                "to": 536,
                "label": "CASE"
            },
            {
                "from": 535,
                "to": 685,
                "label": "BACKTRACK\nfor clause: s2(plus(X, 0), X)\nwith clash: (s2(T1, T2), s2(plus(X270, X271), X272))"
            },
            {
                "from": 536,
                "to": 537,
                "label": "PARALLEL"
            },
            {
                "from": 536,
                "to": 538,
                "label": "PARALLEL"
            },
            {
                "from": 537,
                "to": 539,
                "label": "EVAL with clause\ns2(plus(X289, plus(X290, X291)), X292) :- s2(plus(plus(X289, X290), X291), X292).\nand substitutionT301 -> T320,\nX289 -> T320,\nX290 -> T321,\nX291 -> T322,\nT300 -> plus(T321, T322),\nT303 -> T324,\nX292 -> T324,\nT323 -> T324"
            },
            {
                "from": 537,
                "to": 540,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 538,
                "to": 541,
                "label": "PARALLEL"
            },
            {
                "from": 538,
                "to": 542,
                "label": "PARALLEL"
            },
            {
                "from": 539,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> plus(plus(T320, T321), T322)\nT2 -> T324"
            },
            {
                "from": 541,
                "to": 543,
                "label": "ONLY EVAL with clause\ns2(plus(X323, X324), X325) :- s2(plus(X324, X323), X325).\nand substitutionT301 -> T358,\nX323 -> T358,\nT300 -> T359,\nX324 -> T359,\nT303 -> T361,\nX325 -> T361,\nT360 -> T361"
            },
            {
                "from": 542,
                "to": 544,
                "label": "PARALLEL"
            },
            {
                "from": 542,
                "to": 545,
                "label": "PARALLEL"
            },
            {
                "from": 543,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> plus(T359, T358)\nT2 -> T361"
            },
            {
                "from": 544,
                "to": 546,
                "label": "EVAL with clause\ns2(plus(X337, 0), X337).\nand substitutionT301 -> T373,\nX337 -> T373,\nT300 -> 0,\nT303 -> T373"
            },
            {
                "from": 544,
                "to": 547,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 545,
                "to": 549,
                "label": "PARALLEL"
            },
            {
                "from": 545,
                "to": 550,
                "label": "PARALLEL"
            },
            {
                "from": 546,
                "to": 548,
                "label": "SUCCESS"
            },
            {
                "from": 549,
                "to": 551,
                "label": "ONLY EVAL with clause\ns2(plus(X396, X397), X398) :- ','(s2(X396, X399), ','(s2(X397, X400), s2(plus(X399, X400), X398))).\nand substitutionT301 -> T410,\nX396 -> T410,\nT300 -> T411,\nX397 -> T411,\nT303 -> T413,\nX398 -> T413,\nT412 -> T413"
            },
            {
                "from": 550,
                "to": 554,
                "label": "PARALLEL"
            },
            {
                "from": 550,
                "to": 555,
                "label": "PARALLEL"
            },
            {
                "from": 551,
                "to": 552,
                "label": "SPLIT 1"
            },
            {
                "from": 551,
                "to": 553,
                "label": "SPLIT 2\nnew knowledge:\nT410 is ground\nT425 is ground\nreplacements:X399 -> T425"
            },
            {
                "from": 552,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> T410\nT2 -> X399"
            },
            {
                "from": 553,
                "to": 456,
                "label": "INSTANCE with matching:\nT115 -> T411\nX95 -> X400\nT121 -> T425\nT117 -> T413"
            },
            {
                "from": 554,
                "to": 556,
                "label": "ONLY EVAL with clause\ns2(plus(X462, X463), X464) :- ','(isNat(X462), ','(isNat(X463), add(X462, X463, X464))).\nand substitutionT301 -> T456,\nX462 -> T456,\nT300 -> T457,\nX463 -> T457,\nT303 -> T459,\nX464 -> T459,\nT458 -> T459"
            },
            {
                "from": 555,
                "to": 613,
                "label": "FAILURE"
            },
            {
                "from": 556,
                "to": 557,
                "label": "SPLIT 1"
            },
            {
                "from": 556,
                "to": 558,
                "label": "SPLIT 2\nnew knowledge:\nT456 is ground"
            },
            {
                "from": 557,
                "to": 473,
                "label": "INSTANCE with matching:\nT156 -> T456"
            },
            {
                "from": 558,
                "to": 559,
                "label": "SPLIT 1"
            },
            {
                "from": 558,
                "to": 560,
                "label": "SPLIT 2\nnew knowledge:\nT457 is ground"
            },
            {
                "from": 559,
                "to": 473,
                "label": "INSTANCE with matching:\nT156 -> T457"
            },
            {
                "from": 560,
                "to": 561,
                "label": "CASE"
            },
            {
                "from": 561,
                "to": 562,
                "label": "PARALLEL"
            },
            {
                "from": 561,
                "to": 563,
                "label": "PARALLEL"
            },
            {
                "from": 562,
                "to": 564,
                "label": "EVAL with clause\nadd(s(X484), X485, s(X486)) :- add(X484, X485, X486).\nand substitutionX484 -> T479,\nT456 -> s(T479),\nT457 -> T480,\nX485 -> T480,\nX486 -> T482,\nT459 -> s(T482),\nT481 -> T482"
            },
            {
                "from": 562,
                "to": 565,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 563,
                "to": 610,
                "label": "EVAL with clause\nadd(0, X513, X513).\nand substitutionT456 -> 0,\nT457 -> T510,\nX513 -> T510,\nT459 -> T510"
            },
            {
                "from": 563,
                "to": 611,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 564,
                "to": 566,
                "label": "CASE"
            },
            {
                "from": 566,
                "to": 567,
                "label": "PARALLEL"
            },
            {
                "from": 566,
                "to": 568,
                "label": "PARALLEL"
            },
            {
                "from": 567,
                "to": 569,
                "label": "EVAL with clause\nadd(s(X502), X503, s(X504)) :- add(X502, X503, X504).\nand substitutionX502 -> T498,\nT479 -> s(T498),\nT480 -> T499,\nX503 -> T499,\nX504 -> T501,\nT482 -> s(T501),\nT500 -> T501"
            },
            {
                "from": 567,
                "to": 570,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 568,
                "to": 571,
                "label": "EVAL with clause\nadd(0, X510, X510).\nand substitutionT479 -> 0,\nT480 -> T507,\nX510 -> T507,\nT482 -> T507"
            },
            {
                "from": 568,
                "to": 608,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 569,
                "to": 564,
                "label": "INSTANCE with matching:\nT479 -> T498\nT480 -> T499\nT482 -> T501"
            },
            {
                "from": 571,
                "to": 609,
                "label": "SUCCESS"
            },
            {
                "from": 610,
                "to": 612,
                "label": "SUCCESS"
            },
            {
                "from": 613,
                "to": 614,
                "label": "PARALLEL"
            },
            {
                "from": 613,
                "to": 615,
                "label": "PARALLEL"
            },
            {
                "from": 614,
                "to": 616,
                "label": "EVAL with clause\ns2(plus(X518, 0), X518).\nand substitutionT300 -> T515,\nX518 -> T515,\nT301 -> 0,\nT2 -> T515"
            },
            {
                "from": 614,
                "to": 617,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 615,
                "to": 652,
                "label": "PARALLEL"
            },
            {
                "from": 615,
                "to": 653,
                "label": "PARALLEL"
            },
            {
                "from": 616,
                "to": 618,
                "label": "SUCCESS"
            },
            {
                "from": 652,
                "to": 654,
                "label": "ONLY EVAL with clause\ns2(plus(X545, X546), X547) :- ','(s2(X545, X548), ','(s2(X546, X549), s2(plus(X548, X549), X547))).\nand substitutionT300 -> T536,\nX545 -> T536,\nT301 -> T537,\nX546 -> T537,\nT2 -> T539,\nX547 -> T539,\nT538 -> T539"
            },
            {
                "from": 653,
                "to": 658,
                "label": "ONLY EVAL with clause\ns2(plus(X588, X589), X590) :- ','(isNat(X588), ','(isNat(X589), add(X588, X589, X590))).\nand substitutionT300 -> T566,\nX588 -> T566,\nT301 -> T567,\nX589 -> T567,\nT2 -> T569,\nX590 -> T569,\nT568 -> T569"
            },
            {
                "from": 654,
                "to": 655,
                "label": "SPLIT 1"
            },
            {
                "from": 654,
                "to": 656,
                "label": "SPLIT 2\nnew knowledge:\nT536 is ground\nT543 is ground\nreplacements:X548 -> T543"
            },
            {
                "from": 655,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> T536\nT2 -> X548"
            },
            {
                "from": 656,
                "to": 456,
                "label": "INSTANCE with matching:\nT115 -> T537\nX95 -> X549\nT121 -> T543\nT117 -> T539"
            },
            {
                "from": 658,
                "to": 662,
                "label": "SPLIT 1"
            },
            {
                "from": 658,
                "to": 663,
                "label": "SPLIT 2\nnew knowledge:\nT566 is ground"
            },
            {
                "from": 662,
                "to": 473,
                "label": "INSTANCE with matching:\nT156 -> T566"
            },
            {
                "from": 663,
                "to": 664,
                "label": "SPLIT 1"
            },
            {
                "from": 663,
                "to": 665,
                "label": "SPLIT 2\nnew knowledge:\nT567 is ground"
            },
            {
                "from": 664,
                "to": 473,
                "label": "INSTANCE with matching:\nT156 -> T567"
            },
            {
                "from": 665,
                "to": 564,
                "label": "INSTANCE with matching:\nT479 -> T566\nT480 -> T567\nT482 -> T569"
            },
            {
                "from": 685,
                "to": 705,
                "label": "BACKTRACK\nfor clause: s2(plus(X, Y), Z) :- ','(s2(X, A), ','(s2(Y, B), s2(plus(A, B), Z)))\nwith clash: (s2(T1, T2), s2(plus(X270, X271), X272))"
            },
            {
                "from": 705,
                "to": 706,
                "label": "BACKTRACK\nfor clause: s2(plus(A, B), C) :- ','(isNat(A), ','(isNat(B), add(A, B, C)))\nwith clash: (s2(T1, T2), s2(plus(X270, X271), X272))"
            }
        ],
        "type": "Graph"
    }
}

----------------------------------------

(124)
Obligation:
Triples:

isNatD(s(X1)) :- isNatD(X1).
pB(X1, X2, X3, X4) :- s2A(X1, X2).
pB(X1, X2, X3, X4) :- ','(s2cA(X1, X2), s2A(plus(X3, X2), X4)).
addC(s(X1), X2, X3, s(X4)) :- addC(X1, X2, X3, X4).
addF(s(X1), X2, s(X3)) :- addF(X1, X2, X3).
s2A(plus(X1, plus(X2, plus(X3, X4))), X5) :- s2A(plus(plus(plus(X1, X2), X3), X4), X5).
s2A(plus(X1, plus(X2, X3)), X4) :- s2A(plus(X3, plus(X1, X2)), X4).
s2A(plus(X1, plus(X2, X3)), X4) :- s2A(plus(X1, X2), X5).
s2A(plus(X1, plus(X2, X3)), X4) :- ','(s2cA(plus(X1, X2), X5), pB(X3, X6, X5, X4)).
s2A(plus(X1, plus(X2, X3)), X4) :- isNatE(X1, X2).
s2A(plus(X1, plus(X2, X3)), X4) :- ','(isNatcE(X1, X2), isNatD(X3)).
s2A(plus(X1, plus(X2, X3)), X4) :- s2A(plus(plus(X2, X3), X1), X4).
s2A(plus(X1, plus(X2, X3)), X4) :- s2A(X1, X5).
s2A(plus(X1, plus(X2, X3)), X4) :- ','(s2cA(X1, X5), pB(plus(X2, X3), X6, X5, X4)).
s2A(plus(X1, plus(X2, X3)), X4) :- isNatD(X1).
s2A(plus(X1, plus(X2, X3)), X4) :- ','(isNatcD(X1), isNatE(X2, X3)).
s2A(plus(X1, plus(X2, X3)), X4) :- ','(isNatcD(X1), ','(isNatcE(X2, X3), addC(X1, X2, X3, X4))).
s2A(plus(plus(X1, X2), X3), X4) :- s2A(plus(plus(X3, X1), X2), X4).
s2A(plus(X1, X2), X3) :- s2A(plus(X1, X2), X3).
s2A(plus(X1, X2), X3) :- s2A(X2, X4).
s2A(plus(X1, X2), X3) :- ','(s2cA(X2, X4), pB(X1, X5, X4, X3)).
s2A(plus(X1, X2), X3) :- isNatD(X2).
s2A(plus(X1, X2), X3) :- ','(isNatcD(X2), isNatD(X1)).
s2A(plus(X1, s(X2)), s(X3)) :- ','(isNatcD(s(X2)), ','(isNatcD(X1), addF(X2, X1, X3))).
s2A(plus(X1, X2), X3) :- s2A(X1, X4).
s2A(plus(X1, X2), X3) :- ','(s2cA(X1, X4), pB(X2, X5, X4, X3)).
s2A(plus(X1, X2), X3) :- isNatD(X1).
s2A(plus(X1, X2), X3) :- ','(isNatcD(X1), isNatD(X2)).
s2A(plus(X1, X2), X3) :- ','(isNatcD(X1), ','(isNatcD(X2), addF(X1, X2, X3))).

Clauses:

s2cA(plus(X1, plus(X2, plus(X3, X4))), X5) :- s2cA(plus(plus(plus(X1, X2), X3), X4), X5).
s2cA(plus(X1, plus(X2, X3)), X4) :- s2cA(plus(X3, plus(X1, X2)), X4).
s2cA(plus(X1, plus(X2, 0)), plus(X1, X2)).
s2cA(plus(X1, plus(X2, X3)), X4) :- ','(s2cA(plus(X1, X2), X5), qcB(X3, X6, X5, X4)).
s2cA(plus(X1, plus(X2, X3)), X4) :- s2cA(plus(plus(X2, X3), X1), X4).
s2cA(plus(X1, plus(X2, X3)), X4) :- ','(s2cA(X1, X5), qcB(plus(X2, X3), X6, X5, X4)).
s2cA(plus(X1, plus(X2, X3)), X4) :- ','(isNatcD(X1), ','(isNatcE(X2, X3), addcC(X1, X2, X3, X4))).
s2cA(plus(plus(X1, X2), X3), X4) :- s2cA(plus(plus(X3, X1), X2), X4).
s2cA(plus(X1, X2), X3) :- s2cA(plus(X1, X2), X3).
s2cA(plus(0, X1), X1).
s2cA(plus(X1, X2), X3) :- ','(s2cA(X2, X4), qcB(X1, X5, X4, X3)).
s2cA(plus(X1, s(X2)), s(X3)) :- ','(isNatcD(s(X2)), ','(isNatcD(X1), addcF(X2, X1, X3))).
s2cA(plus(X1, 0), X1) :- ','(isNatcD(0), isNatcD(X1)).
s2cA(plus(X1, 0), X1).
s2cA(plus(X1, X2), X3) :- ','(s2cA(X1, X4), qcB(X2, X5, X4, X3)).
s2cA(plus(X1, X2), X3) :- ','(isNatcD(X1), ','(isNatcD(X2), addcF(X1, X2, X3))).
isNatcD(s(X1)) :- isNatcD(X1).
isNatcD(0).
qcB(X1, X2, X3, X4) :- ','(s2cA(X1, X2), s2cA(plus(X3, X2), X4)).
addcC(s(X1), X2, X3, s(X4)) :- addcC(X1, X2, X3, X4).
addcC(0, X1, X2, plus(X1, X2)).
addcF(s(X1), X2, s(X3)) :- addcF(X1, X2, X3).
addcF(0, X1, X1).

Afs:

s2A(x1, x2)  =  s2A(x1)


----------------------------------------

(125) UndefinedPredicateInTriplesTransformerProof (SOUND)
Deleted triples and predicates having undefined goals [DT09].
----------------------------------------

(126)
Obligation:
Triples:

isNatD(s(X1)) :- isNatD(X1).
pB(X1, X2, X3, X4) :- s2A(X1, X2).
pB(X1, X2, X3, X4) :- ','(s2cA(X1, X2), s2A(plus(X3, X2), X4)).
addC(s(X1), X2, X3, s(X4)) :- addC(X1, X2, X3, X4).
addF(s(X1), X2, s(X3)) :- addF(X1, X2, X3).
s2A(plus(X1, plus(X2, plus(X3, X4))), X5) :- s2A(plus(plus(plus(X1, X2), X3), X4), X5).
s2A(plus(X1, plus(X2, X3)), X4) :- s2A(plus(X3, plus(X1, X2)), X4).
s2A(plus(X1, plus(X2, X3)), X4) :- s2A(plus(X1, X2), X5).
s2A(plus(X1, plus(X2, X3)), X4) :- ','(s2cA(plus(X1, X2), X5), pB(X3, X6, X5, X4)).
s2A(plus(X1, plus(X2, X3)), X4) :- s2A(plus(plus(X2, X3), X1), X4).
s2A(plus(X1, plus(X2, X3)), X4) :- s2A(X1, X5).
s2A(plus(X1, plus(X2, X3)), X4) :- ','(s2cA(X1, X5), pB(plus(X2, X3), X6, X5, X4)).
s2A(plus(X1, plus(X2, X3)), X4) :- isNatD(X1).
s2A(plus(plus(X1, X2), X3), X4) :- s2A(plus(plus(X3, X1), X2), X4).
s2A(plus(X1, X2), X3) :- s2A(plus(X1, X2), X3).
s2A(plus(X1, X2), X3) :- s2A(X2, X4).
s2A(plus(X1, X2), X3) :- ','(s2cA(X2, X4), pB(X1, X5, X4, X3)).
s2A(plus(X1, X2), X3) :- isNatD(X2).
s2A(plus(X1, X2), X3) :- ','(isNatcD(X2), isNatD(X1)).
s2A(plus(X1, s(X2)), s(X3)) :- ','(isNatcD(s(X2)), ','(isNatcD(X1), addF(X2, X1, X3))).
s2A(plus(X1, X2), X3) :- s2A(X1, X4).
s2A(plus(X1, X2), X3) :- ','(s2cA(X1, X4), pB(X2, X5, X4, X3)).
s2A(plus(X1, X2), X3) :- isNatD(X1).
s2A(plus(X1, X2), X3) :- ','(isNatcD(X1), isNatD(X2)).
s2A(plus(X1, X2), X3) :- ','(isNatcD(X1), ','(isNatcD(X2), addF(X1, X2, X3))).

Clauses:

s2cA(plus(X1, plus(X2, plus(X3, X4))), X5) :- s2cA(plus(plus(plus(X1, X2), X3), X4), X5).
s2cA(plus(X1, plus(X2, X3)), X4) :- s2cA(plus(X3, plus(X1, X2)), X4).
s2cA(plus(X1, plus(X2, 0)), plus(X1, X2)).
s2cA(plus(X1, plus(X2, X3)), X4) :- ','(s2cA(plus(X1, X2), X5), qcB(X3, X6, X5, X4)).
s2cA(plus(X1, plus(X2, X3)), X4) :- s2cA(plus(plus(X2, X3), X1), X4).
s2cA(plus(X1, plus(X2, X3)), X4) :- ','(s2cA(X1, X5), qcB(plus(X2, X3), X6, X5, X4)).
s2cA(plus(plus(X1, X2), X3), X4) :- s2cA(plus(plus(X3, X1), X2), X4).
s2cA(plus(X1, X2), X3) :- s2cA(plus(X1, X2), X3).
s2cA(plus(0, X1), X1).
s2cA(plus(X1, X2), X3) :- ','(s2cA(X2, X4), qcB(X1, X5, X4, X3)).
s2cA(plus(X1, s(X2)), s(X3)) :- ','(isNatcD(s(X2)), ','(isNatcD(X1), addcF(X2, X1, X3))).
s2cA(plus(X1, 0), X1) :- ','(isNatcD(0), isNatcD(X1)).
s2cA(plus(X1, 0), X1).
s2cA(plus(X1, X2), X3) :- ','(s2cA(X1, X4), qcB(X2, X5, X4, X3)).
s2cA(plus(X1, X2), X3) :- ','(isNatcD(X1), ','(isNatcD(X2), addcF(X1, X2, X3))).
isNatcD(s(X1)) :- isNatcD(X1).
isNatcD(0).
qcB(X1, X2, X3, X4) :- ','(s2cA(X1, X2), s2cA(plus(X3, X2), X4)).
addcC(s(X1), X2, X3, s(X4)) :- addcC(X1, X2, X3, X4).
addcC(0, X1, X2, plus(X1, X2)).
addcF(s(X1), X2, s(X3)) :- addcF(X1, X2, X3).
addcF(0, X1, X1).

Afs:

s2A(x1, x2)  =  s2A(x1)


----------------------------------------

(127) TriplesToPiDPProof (SOUND)
We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:

s2A_in_2: (b,f)

s2cA_in_2: (b,f)

isNatcD_in_1: (b)

addcF_in_3: (b,b,f)

qcB_in_4: (b,f,b,f)

pB_in_4: (b,f,b,f)

isNatD_in_1: (b)

addF_in_3: (b,b,f)

Transforming TRIPLES into the following Term Rewriting System:

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

   S2A_IN_GA(plus(X1, plus(X2, plus(X3, X4))), X5) -> U7_GA(X1, X2, X3, X4, X5, s2A_in_ga(plus(plus(plus(X1, X2), X3), X4), X5))
   S2A_IN_GA(plus(X1, plus(X2, plus(X3, X4))), X5) -> S2A_IN_GA(plus(plus(plus(X1, X2), X3), X4), X5)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U8_GA(X1, X2, X3, X4, s2A_in_ga(plus(X3, plus(X1, X2)), X4))
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(plus(X3, plus(X1, X2)), X4)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U9_GA(X1, X2, X3, X4, s2A_in_ga(plus(X1, X2), X5))
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(plus(X1, X2), X5)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U10_GA(X1, X2, X3, X4, s2cA_in_ga(plus(X1, X2), X5))
   U10_GA(X1, X2, X3, X4, s2cA_out_ga(plus(X1, X2), X5)) -> U11_GA(X1, X2, X3, X4, pB_in_gaga(X3, X6, X5, X4))
   U10_GA(X1, X2, X3, X4, s2cA_out_ga(plus(X1, X2), X5)) -> PB_IN_GAGA(X3, X6, X5, X4)
   PB_IN_GAGA(X1, X2, X3, X4) -> U2_GAGA(X1, X2, X3, X4, s2A_in_ga(X1, X2))
   PB_IN_GAGA(X1, X2, X3, X4) -> S2A_IN_GA(X1, X2)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U12_GA(X1, X2, X3, X4, s2A_in_ga(plus(plus(X2, X3), X1), X4))
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(plus(plus(X2, X3), X1), X4)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U13_GA(X1, X2, X3, X4, s2A_in_ga(X1, X5))
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(X1, X5)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U14_GA(X1, X2, X3, X4, s2cA_in_ga(X1, X5))
   U14_GA(X1, X2, X3, X4, s2cA_out_ga(X1, X5)) -> U15_GA(X1, X2, X3, X4, pB_in_gaga(plus(X2, X3), X6, X5, X4))
   U14_GA(X1, X2, X3, X4, s2cA_out_ga(X1, X5)) -> PB_IN_GAGA(plus(X2, X3), X6, X5, X4)
   PB_IN_GAGA(X1, X2, X3, X4) -> U3_GAGA(X1, X2, X3, X4, s2cA_in_ga(X1, X2))
   U3_GAGA(X1, X2, X3, X4, s2cA_out_ga(X1, X2)) -> U4_GAGA(X1, X2, X3, X4, s2A_in_ga(plus(X3, X2), X4))
   U3_GAGA(X1, X2, X3, X4, s2cA_out_ga(X1, X2)) -> S2A_IN_GA(plus(X3, X2), X4)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U16_GA(X1, X2, X3, X4, isNatD_in_g(X1))
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> ISNATD_IN_G(X1)
   ISNATD_IN_G(s(X1)) -> U1_G(X1, isNatD_in_g(X1))
   ISNATD_IN_G(s(X1)) -> ISNATD_IN_G(X1)
   S2A_IN_GA(plus(plus(X1, X2), X3), X4) -> U17_GA(X1, X2, X3, X4, s2A_in_ga(plus(plus(X3, X1), X2), X4))
   S2A_IN_GA(plus(plus(X1, X2), X3), X4) -> S2A_IN_GA(plus(plus(X3, X1), X2), X4)
   S2A_IN_GA(plus(X1, X2), X3) -> U18_GA(X1, X2, X3, s2A_in_ga(plus(X1, X2), X3))
   S2A_IN_GA(plus(X1, X2), X3) -> S2A_IN_GA(plus(X1, X2), X3)
   S2A_IN_GA(plus(X1, X2), X3) -> U19_GA(X1, X2, X3, s2A_in_ga(X2, X4))
   S2A_IN_GA(plus(X1, X2), X3) -> S2A_IN_GA(X2, X4)
   S2A_IN_GA(plus(X1, X2), X3) -> U20_GA(X1, X2, X3, s2cA_in_ga(X2, X4))
   U20_GA(X1, X2, X3, s2cA_out_ga(X2, X4)) -> U21_GA(X1, X2, X3, pB_in_gaga(X1, X5, X4, X3))
   U20_GA(X1, X2, X3, s2cA_out_ga(X2, X4)) -> PB_IN_GAGA(X1, X5, X4, X3)
   S2A_IN_GA(plus(X1, X2), X3) -> U22_GA(X1, X2, X3, isNatD_in_g(X2))
   S2A_IN_GA(plus(X1, X2), X3) -> ISNATD_IN_G(X2)
   S2A_IN_GA(plus(X1, X2), X3) -> U23_GA(X1, X2, X3, isNatcD_in_g(X2))
   U23_GA(X1, X2, X3, isNatcD_out_g(X2)) -> U24_GA(X1, X2, X3, isNatD_in_g(X1))
   U23_GA(X1, X2, X3, isNatcD_out_g(X2)) -> ISNATD_IN_G(X1)
   S2A_IN_GA(plus(X1, s(X2)), s(X3)) -> U25_GA(X1, X2, X3, isNatcD_in_g(s(X2)))
   U25_GA(X1, X2, X3, isNatcD_out_g(s(X2))) -> U26_GA(X1, X2, X3, isNatcD_in_g(X1))
   U26_GA(X1, X2, X3, isNatcD_out_g(X1)) -> U27_GA(X1, X2, X3, addF_in_gga(X2, X1, X3))
   U26_GA(X1, X2, X3, isNatcD_out_g(X1)) -> ADDF_IN_GGA(X2, X1, X3)
   ADDF_IN_GGA(s(X1), X2, s(X3)) -> U6_GGA(X1, X2, X3, addF_in_gga(X1, X2, X3))
   ADDF_IN_GGA(s(X1), X2, s(X3)) -> ADDF_IN_GGA(X1, X2, X3)
   S2A_IN_GA(plus(X1, X2), X3) -> U28_GA(X1, X2, X3, s2A_in_ga(X1, X4))
   S2A_IN_GA(plus(X1, X2), X3) -> S2A_IN_GA(X1, X4)
   S2A_IN_GA(plus(X1, X2), X3) -> U29_GA(X1, X2, X3, s2cA_in_ga(X1, X4))
   U29_GA(X1, X2, X3, s2cA_out_ga(X1, X4)) -> U30_GA(X1, X2, X3, pB_in_gaga(X2, X5, X4, X3))
   U29_GA(X1, X2, X3, s2cA_out_ga(X1, X4)) -> PB_IN_GAGA(X2, X5, X4, X3)
   S2A_IN_GA(plus(X1, X2), X3) -> U31_GA(X1, X2, X3, isNatD_in_g(X1))
   S2A_IN_GA(plus(X1, X2), X3) -> ISNATD_IN_G(X1)
   S2A_IN_GA(plus(X1, X2), X3) -> U32_GA(X1, X2, X3, isNatcD_in_g(X1))
   U32_GA(X1, X2, X3, isNatcD_out_g(X1)) -> U33_GA(X1, X2, X3, isNatD_in_g(X2))
   U32_GA(X1, X2, X3, isNatcD_out_g(X1)) -> ISNATD_IN_G(X2)
   U32_GA(X1, X2, X3, isNatcD_out_g(X1)) -> U34_GA(X1, X2, X3, isNatcD_in_g(X2))
   U34_GA(X1, X2, X3, isNatcD_out_g(X2)) -> U35_GA(X1, X2, X3, addF_in_gga(X1, X2, X3))
   U34_GA(X1, X2, X3, isNatcD_out_g(X2)) -> ADDF_IN_GGA(X1, X2, X3)

The TRS R consists of the following rules:

   s2cA_in_ga(plus(X1, plus(X2, plus(X3, X4))), X5) -> U37_ga(X1, X2, X3, X4, X5, s2cA_in_ga(plus(plus(plus(X1, X2), X3), X4), X5))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U38_ga(X1, X2, X3, X4, s2cA_in_ga(plus(X3, plus(X1, X2)), X4))
   s2cA_in_ga(plus(X1, plus(X2, 0)), plus(X1, X2)) -> s2cA_out_ga(plus(X1, plus(X2, 0)), plus(X1, X2))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U39_ga(X1, X2, X3, X4, s2cA_in_ga(plus(X1, X2), X5))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U41_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(X2, X3), X1), X4))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U42_ga(X1, X2, X3, X4, s2cA_in_ga(X1, X5))
   s2cA_in_ga(plus(plus(X1, X2), X3), X4) -> U44_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(X3, X1), X2), X4))
   s2cA_in_ga(plus(X1, X2), X3) -> U45_ga(X1, X2, X3, s2cA_in_ga(plus(X1, X2), X3))
   s2cA_in_ga(plus(0, X1), X1) -> s2cA_out_ga(plus(0, X1), X1)
   s2cA_in_ga(plus(X1, X2), X3) -> U46_ga(X1, X2, X3, s2cA_in_ga(X2, X4))
   s2cA_in_ga(plus(X1, s(X2)), s(X3)) -> U48_ga(X1, X2, X3, isNatcD_in_g(s(X2)))
   isNatcD_in_g(s(X1)) -> U58_g(X1, isNatcD_in_g(X1))
   isNatcD_in_g(0) -> isNatcD_out_g(0)
   U58_g(X1, isNatcD_out_g(X1)) -> isNatcD_out_g(s(X1))
   U48_ga(X1, X2, X3, isNatcD_out_g(s(X2))) -> U49_ga(X1, X2, X3, isNatcD_in_g(X1))
   U49_ga(X1, X2, X3, isNatcD_out_g(X1)) -> U50_ga(X1, X2, X3, addcF_in_gga(X2, X1, X3))
   addcF_in_gga(s(X1), X2, s(X3)) -> U62_gga(X1, X2, X3, addcF_in_gga(X1, X2, X3))
   addcF_in_gga(0, X1, X1) -> addcF_out_gga(0, X1, X1)
   U62_gga(X1, X2, X3, addcF_out_gga(X1, X2, X3)) -> addcF_out_gga(s(X1), X2, s(X3))
   U50_ga(X1, X2, X3, addcF_out_gga(X2, X1, X3)) -> s2cA_out_ga(plus(X1, s(X2)), s(X3))
   s2cA_in_ga(plus(X1, 0), X1) -> U51_ga(X1, isNatcD_in_g(0))
   U51_ga(X1, isNatcD_out_g(0)) -> U52_ga(X1, isNatcD_in_g(X1))
   U52_ga(X1, isNatcD_out_g(X1)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, 0), X1) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, X2), X3) -> U53_ga(X1, X2, X3, s2cA_in_ga(X1, X4))
   s2cA_in_ga(plus(X1, X2), X3) -> U55_ga(X1, X2, X3, isNatcD_in_g(X1))
   U55_ga(X1, X2, X3, isNatcD_out_g(X1)) -> U56_ga(X1, X2, X3, isNatcD_in_g(X2))
   U56_ga(X1, X2, X3, isNatcD_out_g(X2)) -> U57_ga(X1, X2, X3, addcF_in_gga(X1, X2, X3))
   U57_ga(X1, X2, X3, addcF_out_gga(X1, X2, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U53_ga(X1, X2, X3, s2cA_out_ga(X1, X4)) -> U54_ga(X1, X2, X3, qcB_in_gaga(X2, X5, X4, X3))
   qcB_in_gaga(X1, X2, X3, X4) -> U59_gaga(X1, X2, X3, X4, s2cA_in_ga(X1, X2))
   U59_gaga(X1, X2, X3, X4, s2cA_out_ga(X1, X2)) -> U60_gaga(X1, X2, X3, X4, s2cA_in_ga(plus(X3, X2), X4))
   U60_gaga(X1, X2, X3, X4, s2cA_out_ga(plus(X3, X2), X4)) -> qcB_out_gaga(X1, X2, X3, X4)
   U54_ga(X1, X2, X3, qcB_out_gaga(X2, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U46_ga(X1, X2, X3, s2cA_out_ga(X2, X4)) -> U47_ga(X1, X2, X3, qcB_in_gaga(X1, X5, X4, X3))
   U47_ga(X1, X2, X3, qcB_out_gaga(X1, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U45_ga(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U44_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(X3, X1), X2), X4)) -> s2cA_out_ga(plus(plus(X1, X2), X3), X4)
   U42_ga(X1, X2, X3, X4, s2cA_out_ga(X1, X5)) -> U43_ga(X1, X2, X3, X4, qcB_in_gaga(plus(X2, X3), X6, X5, X4))
   U43_ga(X1, X2, X3, X4, qcB_out_gaga(plus(X2, X3), X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U41_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(X2, X3), X1), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U39_ga(X1, X2, X3, X4, s2cA_out_ga(plus(X1, X2), X5)) -> U40_ga(X1, X2, X3, X4, qcB_in_gaga(X3, X6, X5, X4))
   U40_ga(X1, X2, X3, X4, qcB_out_gaga(X3, X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U38_ga(X1, X2, X3, X4, s2cA_out_ga(plus(X3, plus(X1, X2)), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U37_ga(X1, X2, X3, X4, X5, s2cA_out_ga(plus(plus(plus(X1, X2), X3), X4), X5)) -> s2cA_out_ga(plus(X1, plus(X2, plus(X3, X4))), X5)

The argument filtering Pi contains the following mapping:
s2A_in_ga(x1, x2)  =  s2A_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

s2cA_in_ga(x1, x2)  =  s2cA_in_ga(x1)

U37_ga(x1, x2, x3, x4, x5, x6)  =  U37_ga(x1, x2, x3, x4, x6)

U38_ga(x1, x2, x3, x4, x5)  =  U38_ga(x1, x2, x3, x5)

0  =  0

s2cA_out_ga(x1, x2)  =  s2cA_out_ga(x1, x2)

U39_ga(x1, x2, x3, x4, x5)  =  U39_ga(x1, x2, x3, x5)

U41_ga(x1, x2, x3, x4, x5)  =  U41_ga(x1, x2, x3, x5)

U42_ga(x1, x2, x3, x4, x5)  =  U42_ga(x1, x2, x3, x5)

U44_ga(x1, x2, x3, x4, x5)  =  U44_ga(x1, x2, x3, x5)

U45_ga(x1, x2, x3, x4)  =  U45_ga(x1, x2, x4)

U46_ga(x1, x2, x3, x4)  =  U46_ga(x1, x2, x4)

s(x1)  =  s(x1)

U48_ga(x1, x2, x3, x4)  =  U48_ga(x1, x2, x4)

isNatcD_in_g(x1)  =  isNatcD_in_g(x1)

U58_g(x1, x2)  =  U58_g(x1, x2)

isNatcD_out_g(x1)  =  isNatcD_out_g(x1)

U49_ga(x1, x2, x3, x4)  =  U49_ga(x1, x2, x4)

U50_ga(x1, x2, x3, x4)  =  U50_ga(x1, x2, x4)

addcF_in_gga(x1, x2, x3)  =  addcF_in_gga(x1, x2)

U62_gga(x1, x2, x3, x4)  =  U62_gga(x1, x2, x4)

addcF_out_gga(x1, x2, x3)  =  addcF_out_gga(x1, x2, x3)

U51_ga(x1, x2)  =  U51_ga(x1, x2)

U52_ga(x1, x2)  =  U52_ga(x1, x2)

U53_ga(x1, x2, x3, x4)  =  U53_ga(x1, x2, x4)

U55_ga(x1, x2, x3, x4)  =  U55_ga(x1, x2, x4)

U56_ga(x1, x2, x3, x4)  =  U56_ga(x1, x2, x4)

U57_ga(x1, x2, x3, x4)  =  U57_ga(x1, x2, x4)

U54_ga(x1, x2, x3, x4)  =  U54_ga(x1, x2, x4)

qcB_in_gaga(x1, x2, x3, x4)  =  qcB_in_gaga(x1, x3)

U59_gaga(x1, x2, x3, x4, x5)  =  U59_gaga(x1, x3, x5)

U60_gaga(x1, x2, x3, x4, x5)  =  U60_gaga(x1, x2, x3, x5)

qcB_out_gaga(x1, x2, x3, x4)  =  qcB_out_gaga(x1, x2, x3, x4)

U47_ga(x1, x2, x3, x4)  =  U47_ga(x1, x2, x4)

U43_ga(x1, x2, x3, x4, x5)  =  U43_ga(x1, x2, x3, x5)

U40_ga(x1, x2, x3, x4, x5)  =  U40_ga(x1, x2, x3, x5)

pB_in_gaga(x1, x2, x3, x4)  =  pB_in_gaga(x1, x3)

isNatD_in_g(x1)  =  isNatD_in_g(x1)

addF_in_gga(x1, x2, x3)  =  addF_in_gga(x1, x2)

S2A_IN_GA(x1, x2)  =  S2A_IN_GA(x1)

U7_GA(x1, x2, x3, x4, x5, x6)  =  U7_GA(x1, x2, x3, x4, x6)

U8_GA(x1, x2, x3, x4, x5)  =  U8_GA(x1, x2, x3, x5)

U9_GA(x1, x2, x3, x4, x5)  =  U9_GA(x1, x2, x3, x5)

U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x1, x2, x3, x5)

U11_GA(x1, x2, x3, x4, x5)  =  U11_GA(x1, x2, x3, x5)

PB_IN_GAGA(x1, x2, x3, x4)  =  PB_IN_GAGA(x1, x3)

U2_GAGA(x1, x2, x3, x4, x5)  =  U2_GAGA(x1, x3, x5)

U12_GA(x1, x2, x3, x4, x5)  =  U12_GA(x1, x2, x3, x5)

U13_GA(x1, x2, x3, x4, x5)  =  U13_GA(x1, x2, x3, x5)

U14_GA(x1, x2, x3, x4, x5)  =  U14_GA(x1, x2, x3, x5)

U15_GA(x1, x2, x3, x4, x5)  =  U15_GA(x1, x2, x3, x5)

U3_GAGA(x1, x2, x3, x4, x5)  =  U3_GAGA(x1, x3, x5)

U4_GAGA(x1, x2, x3, x4, x5)  =  U4_GAGA(x1, x3, x5)

U16_GA(x1, x2, x3, x4, x5)  =  U16_GA(x1, x2, x3, x5)

ISNATD_IN_G(x1)  =  ISNATD_IN_G(x1)

U1_G(x1, x2)  =  U1_G(x1, x2)

U17_GA(x1, x2, x3, x4, x5)  =  U17_GA(x1, x2, x3, x5)

U18_GA(x1, x2, x3, x4)  =  U18_GA(x1, x2, x4)

U19_GA(x1, x2, x3, x4)  =  U19_GA(x1, x2, x4)

U20_GA(x1, x2, x3, x4)  =  U20_GA(x1, x2, x4)

U21_GA(x1, x2, x3, x4)  =  U21_GA(x1, x2, x4)

U22_GA(x1, x2, x3, x4)  =  U22_GA(x1, x2, x4)

U23_GA(x1, x2, x3, x4)  =  U23_GA(x1, x2, x4)

U24_GA(x1, x2, x3, x4)  =  U24_GA(x1, x2, x4)

U25_GA(x1, x2, x3, x4)  =  U25_GA(x1, x2, x4)

U26_GA(x1, x2, x3, x4)  =  U26_GA(x1, x2, x4)

U27_GA(x1, x2, x3, x4)  =  U27_GA(x1, x2, x4)

ADDF_IN_GGA(x1, x2, x3)  =  ADDF_IN_GGA(x1, x2)

U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)

U28_GA(x1, x2, x3, x4)  =  U28_GA(x1, x2, x4)

U29_GA(x1, x2, x3, x4)  =  U29_GA(x1, x2, x4)

U30_GA(x1, x2, x3, x4)  =  U30_GA(x1, x2, x4)

U31_GA(x1, x2, x3, x4)  =  U31_GA(x1, x2, x4)

U32_GA(x1, x2, x3, x4)  =  U32_GA(x1, x2, x4)

U33_GA(x1, x2, x3, x4)  =  U33_GA(x1, x2, x4)

U34_GA(x1, x2, x3, x4)  =  U34_GA(x1, x2, x4)

U35_GA(x1, x2, x3, x4)  =  U35_GA(x1, x2, x4)


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


Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES



----------------------------------------

(128)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   S2A_IN_GA(plus(X1, plus(X2, plus(X3, X4))), X5) -> U7_GA(X1, X2, X3, X4, X5, s2A_in_ga(plus(plus(plus(X1, X2), X3), X4), X5))
   S2A_IN_GA(plus(X1, plus(X2, plus(X3, X4))), X5) -> S2A_IN_GA(plus(plus(plus(X1, X2), X3), X4), X5)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U8_GA(X1, X2, X3, X4, s2A_in_ga(plus(X3, plus(X1, X2)), X4))
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(plus(X3, plus(X1, X2)), X4)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U9_GA(X1, X2, X3, X4, s2A_in_ga(plus(X1, X2), X5))
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(plus(X1, X2), X5)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U10_GA(X1, X2, X3, X4, s2cA_in_ga(plus(X1, X2), X5))
   U10_GA(X1, X2, X3, X4, s2cA_out_ga(plus(X1, X2), X5)) -> U11_GA(X1, X2, X3, X4, pB_in_gaga(X3, X6, X5, X4))
   U10_GA(X1, X2, X3, X4, s2cA_out_ga(plus(X1, X2), X5)) -> PB_IN_GAGA(X3, X6, X5, X4)
   PB_IN_GAGA(X1, X2, X3, X4) -> U2_GAGA(X1, X2, X3, X4, s2A_in_ga(X1, X2))
   PB_IN_GAGA(X1, X2, X3, X4) -> S2A_IN_GA(X1, X2)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U12_GA(X1, X2, X3, X4, s2A_in_ga(plus(plus(X2, X3), X1), X4))
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(plus(plus(X2, X3), X1), X4)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U13_GA(X1, X2, X3, X4, s2A_in_ga(X1, X5))
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(X1, X5)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U14_GA(X1, X2, X3, X4, s2cA_in_ga(X1, X5))
   U14_GA(X1, X2, X3, X4, s2cA_out_ga(X1, X5)) -> U15_GA(X1, X2, X3, X4, pB_in_gaga(plus(X2, X3), X6, X5, X4))
   U14_GA(X1, X2, X3, X4, s2cA_out_ga(X1, X5)) -> PB_IN_GAGA(plus(X2, X3), X6, X5, X4)
   PB_IN_GAGA(X1, X2, X3, X4) -> U3_GAGA(X1, X2, X3, X4, s2cA_in_ga(X1, X2))
   U3_GAGA(X1, X2, X3, X4, s2cA_out_ga(X1, X2)) -> U4_GAGA(X1, X2, X3, X4, s2A_in_ga(plus(X3, X2), X4))
   U3_GAGA(X1, X2, X3, X4, s2cA_out_ga(X1, X2)) -> S2A_IN_GA(plus(X3, X2), X4)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U16_GA(X1, X2, X3, X4, isNatD_in_g(X1))
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> ISNATD_IN_G(X1)
   ISNATD_IN_G(s(X1)) -> U1_G(X1, isNatD_in_g(X1))
   ISNATD_IN_G(s(X1)) -> ISNATD_IN_G(X1)
   S2A_IN_GA(plus(plus(X1, X2), X3), X4) -> U17_GA(X1, X2, X3, X4, s2A_in_ga(plus(plus(X3, X1), X2), X4))
   S2A_IN_GA(plus(plus(X1, X2), X3), X4) -> S2A_IN_GA(plus(plus(X3, X1), X2), X4)
   S2A_IN_GA(plus(X1, X2), X3) -> U18_GA(X1, X2, X3, s2A_in_ga(plus(X1, X2), X3))
   S2A_IN_GA(plus(X1, X2), X3) -> S2A_IN_GA(plus(X1, X2), X3)
   S2A_IN_GA(plus(X1, X2), X3) -> U19_GA(X1, X2, X3, s2A_in_ga(X2, X4))
   S2A_IN_GA(plus(X1, X2), X3) -> S2A_IN_GA(X2, X4)
   S2A_IN_GA(plus(X1, X2), X3) -> U20_GA(X1, X2, X3, s2cA_in_ga(X2, X4))
   U20_GA(X1, X2, X3, s2cA_out_ga(X2, X4)) -> U21_GA(X1, X2, X3, pB_in_gaga(X1, X5, X4, X3))
   U20_GA(X1, X2, X3, s2cA_out_ga(X2, X4)) -> PB_IN_GAGA(X1, X5, X4, X3)
   S2A_IN_GA(plus(X1, X2), X3) -> U22_GA(X1, X2, X3, isNatD_in_g(X2))
   S2A_IN_GA(plus(X1, X2), X3) -> ISNATD_IN_G(X2)
   S2A_IN_GA(plus(X1, X2), X3) -> U23_GA(X1, X2, X3, isNatcD_in_g(X2))
   U23_GA(X1, X2, X3, isNatcD_out_g(X2)) -> U24_GA(X1, X2, X3, isNatD_in_g(X1))
   U23_GA(X1, X2, X3, isNatcD_out_g(X2)) -> ISNATD_IN_G(X1)
   S2A_IN_GA(plus(X1, s(X2)), s(X3)) -> U25_GA(X1, X2, X3, isNatcD_in_g(s(X2)))
   U25_GA(X1, X2, X3, isNatcD_out_g(s(X2))) -> U26_GA(X1, X2, X3, isNatcD_in_g(X1))
   U26_GA(X1, X2, X3, isNatcD_out_g(X1)) -> U27_GA(X1, X2, X3, addF_in_gga(X2, X1, X3))
   U26_GA(X1, X2, X3, isNatcD_out_g(X1)) -> ADDF_IN_GGA(X2, X1, X3)
   ADDF_IN_GGA(s(X1), X2, s(X3)) -> U6_GGA(X1, X2, X3, addF_in_gga(X1, X2, X3))
   ADDF_IN_GGA(s(X1), X2, s(X3)) -> ADDF_IN_GGA(X1, X2, X3)
   S2A_IN_GA(plus(X1, X2), X3) -> U28_GA(X1, X2, X3, s2A_in_ga(X1, X4))
   S2A_IN_GA(plus(X1, X2), X3) -> S2A_IN_GA(X1, X4)
   S2A_IN_GA(plus(X1, X2), X3) -> U29_GA(X1, X2, X3, s2cA_in_ga(X1, X4))
   U29_GA(X1, X2, X3, s2cA_out_ga(X1, X4)) -> U30_GA(X1, X2, X3, pB_in_gaga(X2, X5, X4, X3))
   U29_GA(X1, X2, X3, s2cA_out_ga(X1, X4)) -> PB_IN_GAGA(X2, X5, X4, X3)
   S2A_IN_GA(plus(X1, X2), X3) -> U31_GA(X1, X2, X3, isNatD_in_g(X1))
   S2A_IN_GA(plus(X1, X2), X3) -> ISNATD_IN_G(X1)
   S2A_IN_GA(plus(X1, X2), X3) -> U32_GA(X1, X2, X3, isNatcD_in_g(X1))
   U32_GA(X1, X2, X3, isNatcD_out_g(X1)) -> U33_GA(X1, X2, X3, isNatD_in_g(X2))
   U32_GA(X1, X2, X3, isNatcD_out_g(X1)) -> ISNATD_IN_G(X2)
   U32_GA(X1, X2, X3, isNatcD_out_g(X1)) -> U34_GA(X1, X2, X3, isNatcD_in_g(X2))
   U34_GA(X1, X2, X3, isNatcD_out_g(X2)) -> U35_GA(X1, X2, X3, addF_in_gga(X1, X2, X3))
   U34_GA(X1, X2, X3, isNatcD_out_g(X2)) -> ADDF_IN_GGA(X1, X2, X3)

The TRS R consists of the following rules:

   s2cA_in_ga(plus(X1, plus(X2, plus(X3, X4))), X5) -> U37_ga(X1, X2, X3, X4, X5, s2cA_in_ga(plus(plus(plus(X1, X2), X3), X4), X5))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U38_ga(X1, X2, X3, X4, s2cA_in_ga(plus(X3, plus(X1, X2)), X4))
   s2cA_in_ga(plus(X1, plus(X2, 0)), plus(X1, X2)) -> s2cA_out_ga(plus(X1, plus(X2, 0)), plus(X1, X2))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U39_ga(X1, X2, X3, X4, s2cA_in_ga(plus(X1, X2), X5))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U41_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(X2, X3), X1), X4))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U42_ga(X1, X2, X3, X4, s2cA_in_ga(X1, X5))
   s2cA_in_ga(plus(plus(X1, X2), X3), X4) -> U44_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(X3, X1), X2), X4))
   s2cA_in_ga(plus(X1, X2), X3) -> U45_ga(X1, X2, X3, s2cA_in_ga(plus(X1, X2), X3))
   s2cA_in_ga(plus(0, X1), X1) -> s2cA_out_ga(plus(0, X1), X1)
   s2cA_in_ga(plus(X1, X2), X3) -> U46_ga(X1, X2, X3, s2cA_in_ga(X2, X4))
   s2cA_in_ga(plus(X1, s(X2)), s(X3)) -> U48_ga(X1, X2, X3, isNatcD_in_g(s(X2)))
   isNatcD_in_g(s(X1)) -> U58_g(X1, isNatcD_in_g(X1))
   isNatcD_in_g(0) -> isNatcD_out_g(0)
   U58_g(X1, isNatcD_out_g(X1)) -> isNatcD_out_g(s(X1))
   U48_ga(X1, X2, X3, isNatcD_out_g(s(X2))) -> U49_ga(X1, X2, X3, isNatcD_in_g(X1))
   U49_ga(X1, X2, X3, isNatcD_out_g(X1)) -> U50_ga(X1, X2, X3, addcF_in_gga(X2, X1, X3))
   addcF_in_gga(s(X1), X2, s(X3)) -> U62_gga(X1, X2, X3, addcF_in_gga(X1, X2, X3))
   addcF_in_gga(0, X1, X1) -> addcF_out_gga(0, X1, X1)
   U62_gga(X1, X2, X3, addcF_out_gga(X1, X2, X3)) -> addcF_out_gga(s(X1), X2, s(X3))
   U50_ga(X1, X2, X3, addcF_out_gga(X2, X1, X3)) -> s2cA_out_ga(plus(X1, s(X2)), s(X3))
   s2cA_in_ga(plus(X1, 0), X1) -> U51_ga(X1, isNatcD_in_g(0))
   U51_ga(X1, isNatcD_out_g(0)) -> U52_ga(X1, isNatcD_in_g(X1))
   U52_ga(X1, isNatcD_out_g(X1)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, 0), X1) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, X2), X3) -> U53_ga(X1, X2, X3, s2cA_in_ga(X1, X4))
   s2cA_in_ga(plus(X1, X2), X3) -> U55_ga(X1, X2, X3, isNatcD_in_g(X1))
   U55_ga(X1, X2, X3, isNatcD_out_g(X1)) -> U56_ga(X1, X2, X3, isNatcD_in_g(X2))
   U56_ga(X1, X2, X3, isNatcD_out_g(X2)) -> U57_ga(X1, X2, X3, addcF_in_gga(X1, X2, X3))
   U57_ga(X1, X2, X3, addcF_out_gga(X1, X2, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U53_ga(X1, X2, X3, s2cA_out_ga(X1, X4)) -> U54_ga(X1, X2, X3, qcB_in_gaga(X2, X5, X4, X3))
   qcB_in_gaga(X1, X2, X3, X4) -> U59_gaga(X1, X2, X3, X4, s2cA_in_ga(X1, X2))
   U59_gaga(X1, X2, X3, X4, s2cA_out_ga(X1, X2)) -> U60_gaga(X1, X2, X3, X4, s2cA_in_ga(plus(X3, X2), X4))
   U60_gaga(X1, X2, X3, X4, s2cA_out_ga(plus(X3, X2), X4)) -> qcB_out_gaga(X1, X2, X3, X4)
   U54_ga(X1, X2, X3, qcB_out_gaga(X2, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U46_ga(X1, X2, X3, s2cA_out_ga(X2, X4)) -> U47_ga(X1, X2, X3, qcB_in_gaga(X1, X5, X4, X3))
   U47_ga(X1, X2, X3, qcB_out_gaga(X1, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U45_ga(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U44_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(X3, X1), X2), X4)) -> s2cA_out_ga(plus(plus(X1, X2), X3), X4)
   U42_ga(X1, X2, X3, X4, s2cA_out_ga(X1, X5)) -> U43_ga(X1, X2, X3, X4, qcB_in_gaga(plus(X2, X3), X6, X5, X4))
   U43_ga(X1, X2, X3, X4, qcB_out_gaga(plus(X2, X3), X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U41_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(X2, X3), X1), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U39_ga(X1, X2, X3, X4, s2cA_out_ga(plus(X1, X2), X5)) -> U40_ga(X1, X2, X3, X4, qcB_in_gaga(X3, X6, X5, X4))
   U40_ga(X1, X2, X3, X4, qcB_out_gaga(X3, X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U38_ga(X1, X2, X3, X4, s2cA_out_ga(plus(X3, plus(X1, X2)), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U37_ga(X1, X2, X3, X4, X5, s2cA_out_ga(plus(plus(plus(X1, X2), X3), X4), X5)) -> s2cA_out_ga(plus(X1, plus(X2, plus(X3, X4))), X5)

The argument filtering Pi contains the following mapping:
s2A_in_ga(x1, x2)  =  s2A_in_ga(x1)

plus(x1, x2)  =  plus(x1, x2)

s2cA_in_ga(x1, x2)  =  s2cA_in_ga(x1)

U37_ga(x1, x2, x3, x4, x5, x6)  =  U37_ga(x1, x2, x3, x4, x6)

U38_ga(x1, x2, x3, x4, x5)  =  U38_ga(x1, x2, x3, x5)

0  =  0

s2cA_out_ga(x1, x2)  =  s2cA_out_ga(x1, x2)

U39_ga(x1, x2, x3, x4, x5)  =  U39_ga(x1, x2, x3, x5)

U41_ga(x1, x2, x3, x4, x5)  =  U41_ga(x1, x2, x3, x5)

U42_ga(x1, x2, x3, x4, x5)  =  U42_ga(x1, x2, x3, x5)

U44_ga(x1, x2, x3, x4, x5)  =  U44_ga(x1, x2, x3, x5)

U45_ga(x1, x2, x3, x4)  =  U45_ga(x1, x2, x4)

U46_ga(x1, x2, x3, x4)  =  U46_ga(x1, x2, x4)

s(x1)  =  s(x1)

U48_ga(x1, x2, x3, x4)  =  U48_ga(x1, x2, x4)

isNatcD_in_g(x1)  =  isNatcD_in_g(x1)

U58_g(x1, x2)  =  U58_g(x1, x2)

isNatcD_out_g(x1)  =  isNatcD_out_g(x1)

U49_ga(x1, x2, x3, x4)  =  U49_ga(x1, x2, x4)

U50_ga(x1, x2, x3, x4)  =  U50_ga(x1, x2, x4)

addcF_in_gga(x1, x2, x3)  =  addcF_in_gga(x1, x2)

U62_gga(x1, x2, x3, x4)  =  U62_gga(x1, x2, x4)

addcF_out_gga(x1, x2, x3)  =  addcF_out_gga(x1, x2, x3)

U51_ga(x1, x2)  =  U51_ga(x1, x2)

U52_ga(x1, x2)  =  U52_ga(x1, x2)

U53_ga(x1, x2, x3, x4)  =  U53_ga(x1, x2, x4)

U55_ga(x1, x2, x3, x4)  =  U55_ga(x1, x2, x4)

U56_ga(x1, x2, x3, x4)  =  U56_ga(x1, x2, x4)

U57_ga(x1, x2, x3, x4)  =  U57_ga(x1, x2, x4)

U54_ga(x1, x2, x3, x4)  =  U54_ga(x1, x2, x4)

qcB_in_gaga(x1, x2, x3, x4)  =  qcB_in_gaga(x1, x3)

U59_gaga(x1, x2, x3, x4, x5)  =  U59_gaga(x1, x3, x5)

U60_gaga(x1, x2, x3, x4, x5)  =  U60_gaga(x1, x2, x3, x5)

qcB_out_gaga(x1, x2, x3, x4)  =  qcB_out_gaga(x1, x2, x3, x4)

U47_ga(x1, x2, x3, x4)  =  U47_ga(x1, x2, x4)

U43_ga(x1, x2, x3, x4, x5)  =  U43_ga(x1, x2, x3, x5)

U40_ga(x1, x2, x3, x4, x5)  =  U40_ga(x1, x2, x3, x5)

pB_in_gaga(x1, x2, x3, x4)  =  pB_in_gaga(x1, x3)

isNatD_in_g(x1)  =  isNatD_in_g(x1)

addF_in_gga(x1, x2, x3)  =  addF_in_gga(x1, x2)

S2A_IN_GA(x1, x2)  =  S2A_IN_GA(x1)

U7_GA(x1, x2, x3, x4, x5, x6)  =  U7_GA(x1, x2, x3, x4, x6)

U8_GA(x1, x2, x3, x4, x5)  =  U8_GA(x1, x2, x3, x5)

U9_GA(x1, x2, x3, x4, x5)  =  U9_GA(x1, x2, x3, x5)

U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x1, x2, x3, x5)

U11_GA(x1, x2, x3, x4, x5)  =  U11_GA(x1, x2, x3, x5)

PB_IN_GAGA(x1, x2, x3, x4)  =  PB_IN_GAGA(x1, x3)

U2_GAGA(x1, x2, x3, x4, x5)  =  U2_GAGA(x1, x3, x5)

U12_GA(x1, x2, x3, x4, x5)  =  U12_GA(x1, x2, x3, x5)

U13_GA(x1, x2, x3, x4, x5)  =  U13_GA(x1, x2, x3, x5)

U14_GA(x1, x2, x3, x4, x5)  =  U14_GA(x1, x2, x3, x5)

U15_GA(x1, x2, x3, x4, x5)  =  U15_GA(x1, x2, x3, x5)

U3_GAGA(x1, x2, x3, x4, x5)  =  U3_GAGA(x1, x3, x5)

U4_GAGA(x1, x2, x3, x4, x5)  =  U4_GAGA(x1, x3, x5)

U16_GA(x1, x2, x3, x4, x5)  =  U16_GA(x1, x2, x3, x5)

ISNATD_IN_G(x1)  =  ISNATD_IN_G(x1)

U1_G(x1, x2)  =  U1_G(x1, x2)

U17_GA(x1, x2, x3, x4, x5)  =  U17_GA(x1, x2, x3, x5)

U18_GA(x1, x2, x3, x4)  =  U18_GA(x1, x2, x4)

U19_GA(x1, x2, x3, x4)  =  U19_GA(x1, x2, x4)

U20_GA(x1, x2, x3, x4)  =  U20_GA(x1, x2, x4)

U21_GA(x1, x2, x3, x4)  =  U21_GA(x1, x2, x4)

U22_GA(x1, x2, x3, x4)  =  U22_GA(x1, x2, x4)

U23_GA(x1, x2, x3, x4)  =  U23_GA(x1, x2, x4)

U24_GA(x1, x2, x3, x4)  =  U24_GA(x1, x2, x4)

U25_GA(x1, x2, x3, x4)  =  U25_GA(x1, x2, x4)

U26_GA(x1, x2, x3, x4)  =  U26_GA(x1, x2, x4)

U27_GA(x1, x2, x3, x4)  =  U27_GA(x1, x2, x4)

ADDF_IN_GGA(x1, x2, x3)  =  ADDF_IN_GGA(x1, x2)

U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)

U28_GA(x1, x2, x3, x4)  =  U28_GA(x1, x2, x4)

U29_GA(x1, x2, x3, x4)  =  U29_GA(x1, x2, x4)

U30_GA(x1, x2, x3, x4)  =  U30_GA(x1, x2, x4)

U31_GA(x1, x2, x3, x4)  =  U31_GA(x1, x2, x4)

U32_GA(x1, x2, x3, x4)  =  U32_GA(x1, x2, x4)

U33_GA(x1, x2, x3, x4)  =  U33_GA(x1, x2, x4)

U34_GA(x1, x2, x3, x4)  =  U34_GA(x1, x2, x4)

U35_GA(x1, x2, x3, x4)  =  U35_GA(x1, x2, x4)


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

(129) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 36 less nodes.
----------------------------------------

(130)
Complex Obligation (AND)

----------------------------------------

(131)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   ADDF_IN_GGA(s(X1), X2, s(X3)) -> ADDF_IN_GGA(X1, X2, X3)

The TRS R consists of the following rules:

   s2cA_in_ga(plus(X1, plus(X2, plus(X3, X4))), X5) -> U37_ga(X1, X2, X3, X4, X5, s2cA_in_ga(plus(plus(plus(X1, X2), X3), X4), X5))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U38_ga(X1, X2, X3, X4, s2cA_in_ga(plus(X3, plus(X1, X2)), X4))
   s2cA_in_ga(plus(X1, plus(X2, 0)), plus(X1, X2)) -> s2cA_out_ga(plus(X1, plus(X2, 0)), plus(X1, X2))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U39_ga(X1, X2, X3, X4, s2cA_in_ga(plus(X1, X2), X5))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U41_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(X2, X3), X1), X4))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U42_ga(X1, X2, X3, X4, s2cA_in_ga(X1, X5))
   s2cA_in_ga(plus(plus(X1, X2), X3), X4) -> U44_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(X3, X1), X2), X4))
   s2cA_in_ga(plus(X1, X2), X3) -> U45_ga(X1, X2, X3, s2cA_in_ga(plus(X1, X2), X3))
   s2cA_in_ga(plus(0, X1), X1) -> s2cA_out_ga(plus(0, X1), X1)
   s2cA_in_ga(plus(X1, X2), X3) -> U46_ga(X1, X2, X3, s2cA_in_ga(X2, X4))
   s2cA_in_ga(plus(X1, s(X2)), s(X3)) -> U48_ga(X1, X2, X3, isNatcD_in_g(s(X2)))
   isNatcD_in_g(s(X1)) -> U58_g(X1, isNatcD_in_g(X1))
   isNatcD_in_g(0) -> isNatcD_out_g(0)
   U58_g(X1, isNatcD_out_g(X1)) -> isNatcD_out_g(s(X1))
   U48_ga(X1, X2, X3, isNatcD_out_g(s(X2))) -> U49_ga(X1, X2, X3, isNatcD_in_g(X1))
   U49_ga(X1, X2, X3, isNatcD_out_g(X1)) -> U50_ga(X1, X2, X3, addcF_in_gga(X2, X1, X3))
   addcF_in_gga(s(X1), X2, s(X3)) -> U62_gga(X1, X2, X3, addcF_in_gga(X1, X2, X3))
   addcF_in_gga(0, X1, X1) -> addcF_out_gga(0, X1, X1)
   U62_gga(X1, X2, X3, addcF_out_gga(X1, X2, X3)) -> addcF_out_gga(s(X1), X2, s(X3))
   U50_ga(X1, X2, X3, addcF_out_gga(X2, X1, X3)) -> s2cA_out_ga(plus(X1, s(X2)), s(X3))
   s2cA_in_ga(plus(X1, 0), X1) -> U51_ga(X1, isNatcD_in_g(0))
   U51_ga(X1, isNatcD_out_g(0)) -> U52_ga(X1, isNatcD_in_g(X1))
   U52_ga(X1, isNatcD_out_g(X1)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, 0), X1) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, X2), X3) -> U53_ga(X1, X2, X3, s2cA_in_ga(X1, X4))
   s2cA_in_ga(plus(X1, X2), X3) -> U55_ga(X1, X2, X3, isNatcD_in_g(X1))
   U55_ga(X1, X2, X3, isNatcD_out_g(X1)) -> U56_ga(X1, X2, X3, isNatcD_in_g(X2))
   U56_ga(X1, X2, X3, isNatcD_out_g(X2)) -> U57_ga(X1, X2, X3, addcF_in_gga(X1, X2, X3))
   U57_ga(X1, X2, X3, addcF_out_gga(X1, X2, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U53_ga(X1, X2, X3, s2cA_out_ga(X1, X4)) -> U54_ga(X1, X2, X3, qcB_in_gaga(X2, X5, X4, X3))
   qcB_in_gaga(X1, X2, X3, X4) -> U59_gaga(X1, X2, X3, X4, s2cA_in_ga(X1, X2))
   U59_gaga(X1, X2, X3, X4, s2cA_out_ga(X1, X2)) -> U60_gaga(X1, X2, X3, X4, s2cA_in_ga(plus(X3, X2), X4))
   U60_gaga(X1, X2, X3, X4, s2cA_out_ga(plus(X3, X2), X4)) -> qcB_out_gaga(X1, X2, X3, X4)
   U54_ga(X1, X2, X3, qcB_out_gaga(X2, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U46_ga(X1, X2, X3, s2cA_out_ga(X2, X4)) -> U47_ga(X1, X2, X3, qcB_in_gaga(X1, X5, X4, X3))
   U47_ga(X1, X2, X3, qcB_out_gaga(X1, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U45_ga(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U44_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(X3, X1), X2), X4)) -> s2cA_out_ga(plus(plus(X1, X2), X3), X4)
   U42_ga(X1, X2, X3, X4, s2cA_out_ga(X1, X5)) -> U43_ga(X1, X2, X3, X4, qcB_in_gaga(plus(X2, X3), X6, X5, X4))
   U43_ga(X1, X2, X3, X4, qcB_out_gaga(plus(X2, X3), X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U41_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(X2, X3), X1), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U39_ga(X1, X2, X3, X4, s2cA_out_ga(plus(X1, X2), X5)) -> U40_ga(X1, X2, X3, X4, qcB_in_gaga(X3, X6, X5, X4))
   U40_ga(X1, X2, X3, X4, qcB_out_gaga(X3, X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U38_ga(X1, X2, X3, X4, s2cA_out_ga(plus(X3, plus(X1, X2)), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U37_ga(X1, X2, X3, X4, X5, s2cA_out_ga(plus(plus(plus(X1, X2), X3), X4), X5)) -> s2cA_out_ga(plus(X1, plus(X2, plus(X3, X4))), X5)

The argument filtering Pi contains the following mapping:
plus(x1, x2)  =  plus(x1, x2)

s2cA_in_ga(x1, x2)  =  s2cA_in_ga(x1)

U37_ga(x1, x2, x3, x4, x5, x6)  =  U37_ga(x1, x2, x3, x4, x6)

U38_ga(x1, x2, x3, x4, x5)  =  U38_ga(x1, x2, x3, x5)

0  =  0

s2cA_out_ga(x1, x2)  =  s2cA_out_ga(x1, x2)

U39_ga(x1, x2, x3, x4, x5)  =  U39_ga(x1, x2, x3, x5)

U41_ga(x1, x2, x3, x4, x5)  =  U41_ga(x1, x2, x3, x5)

U42_ga(x1, x2, x3, x4, x5)  =  U42_ga(x1, x2, x3, x5)

U44_ga(x1, x2, x3, x4, x5)  =  U44_ga(x1, x2, x3, x5)

U45_ga(x1, x2, x3, x4)  =  U45_ga(x1, x2, x4)

U46_ga(x1, x2, x3, x4)  =  U46_ga(x1, x2, x4)

s(x1)  =  s(x1)

U48_ga(x1, x2, x3, x4)  =  U48_ga(x1, x2, x4)

isNatcD_in_g(x1)  =  isNatcD_in_g(x1)

U58_g(x1, x2)  =  U58_g(x1, x2)

isNatcD_out_g(x1)  =  isNatcD_out_g(x1)

U49_ga(x1, x2, x3, x4)  =  U49_ga(x1, x2, x4)

U50_ga(x1, x2, x3, x4)  =  U50_ga(x1, x2, x4)

addcF_in_gga(x1, x2, x3)  =  addcF_in_gga(x1, x2)

U62_gga(x1, x2, x3, x4)  =  U62_gga(x1, x2, x4)

addcF_out_gga(x1, x2, x3)  =  addcF_out_gga(x1, x2, x3)

U51_ga(x1, x2)  =  U51_ga(x1, x2)

U52_ga(x1, x2)  =  U52_ga(x1, x2)

U53_ga(x1, x2, x3, x4)  =  U53_ga(x1, x2, x4)

U55_ga(x1, x2, x3, x4)  =  U55_ga(x1, x2, x4)

U56_ga(x1, x2, x3, x4)  =  U56_ga(x1, x2, x4)

U57_ga(x1, x2, x3, x4)  =  U57_ga(x1, x2, x4)

U54_ga(x1, x2, x3, x4)  =  U54_ga(x1, x2, x4)

qcB_in_gaga(x1, x2, x3, x4)  =  qcB_in_gaga(x1, x3)

U59_gaga(x1, x2, x3, x4, x5)  =  U59_gaga(x1, x3, x5)

U60_gaga(x1, x2, x3, x4, x5)  =  U60_gaga(x1, x2, x3, x5)

qcB_out_gaga(x1, x2, x3, x4)  =  qcB_out_gaga(x1, x2, x3, x4)

U47_ga(x1, x2, x3, x4)  =  U47_ga(x1, x2, x4)

U43_ga(x1, x2, x3, x4, x5)  =  U43_ga(x1, x2, x3, x5)

U40_ga(x1, x2, x3, x4, x5)  =  U40_ga(x1, x2, x3, x5)

ADDF_IN_GGA(x1, x2, x3)  =  ADDF_IN_GGA(x1, x2)


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

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

(133)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   ADDF_IN_GGA(s(X1), X2, s(X3)) -> ADDF_IN_GGA(X1, X2, X3)

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

ADDF_IN_GGA(x1, x2, x3)  =  ADDF_IN_GGA(x1, x2)


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

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

(135)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   ADDF_IN_GGA(s(X1), X2) -> ADDF_IN_GGA(X1, X2)

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

(136) QDPSizeChangeProof (EQUIVALENT)
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:
*ADDF_IN_GGA(s(X1), X2) -> ADDF_IN_GGA(X1, X2)
The graph contains the following edges 1 > 1, 2 >= 2


----------------------------------------

(137)
YES

----------------------------------------

(138)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   ISNATD_IN_G(s(X1)) -> ISNATD_IN_G(X1)

The TRS R consists of the following rules:

   s2cA_in_ga(plus(X1, plus(X2, plus(X3, X4))), X5) -> U37_ga(X1, X2, X3, X4, X5, s2cA_in_ga(plus(plus(plus(X1, X2), X3), X4), X5))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U38_ga(X1, X2, X3, X4, s2cA_in_ga(plus(X3, plus(X1, X2)), X4))
   s2cA_in_ga(plus(X1, plus(X2, 0)), plus(X1, X2)) -> s2cA_out_ga(plus(X1, plus(X2, 0)), plus(X1, X2))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U39_ga(X1, X2, X3, X4, s2cA_in_ga(plus(X1, X2), X5))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U41_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(X2, X3), X1), X4))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U42_ga(X1, X2, X3, X4, s2cA_in_ga(X1, X5))
   s2cA_in_ga(plus(plus(X1, X2), X3), X4) -> U44_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(X3, X1), X2), X4))
   s2cA_in_ga(plus(X1, X2), X3) -> U45_ga(X1, X2, X3, s2cA_in_ga(plus(X1, X2), X3))
   s2cA_in_ga(plus(0, X1), X1) -> s2cA_out_ga(plus(0, X1), X1)
   s2cA_in_ga(plus(X1, X2), X3) -> U46_ga(X1, X2, X3, s2cA_in_ga(X2, X4))
   s2cA_in_ga(plus(X1, s(X2)), s(X3)) -> U48_ga(X1, X2, X3, isNatcD_in_g(s(X2)))
   isNatcD_in_g(s(X1)) -> U58_g(X1, isNatcD_in_g(X1))
   isNatcD_in_g(0) -> isNatcD_out_g(0)
   U58_g(X1, isNatcD_out_g(X1)) -> isNatcD_out_g(s(X1))
   U48_ga(X1, X2, X3, isNatcD_out_g(s(X2))) -> U49_ga(X1, X2, X3, isNatcD_in_g(X1))
   U49_ga(X1, X2, X3, isNatcD_out_g(X1)) -> U50_ga(X1, X2, X3, addcF_in_gga(X2, X1, X3))
   addcF_in_gga(s(X1), X2, s(X3)) -> U62_gga(X1, X2, X3, addcF_in_gga(X1, X2, X3))
   addcF_in_gga(0, X1, X1) -> addcF_out_gga(0, X1, X1)
   U62_gga(X1, X2, X3, addcF_out_gga(X1, X2, X3)) -> addcF_out_gga(s(X1), X2, s(X3))
   U50_ga(X1, X2, X3, addcF_out_gga(X2, X1, X3)) -> s2cA_out_ga(plus(X1, s(X2)), s(X3))
   s2cA_in_ga(plus(X1, 0), X1) -> U51_ga(X1, isNatcD_in_g(0))
   U51_ga(X1, isNatcD_out_g(0)) -> U52_ga(X1, isNatcD_in_g(X1))
   U52_ga(X1, isNatcD_out_g(X1)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, 0), X1) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, X2), X3) -> U53_ga(X1, X2, X3, s2cA_in_ga(X1, X4))
   s2cA_in_ga(plus(X1, X2), X3) -> U55_ga(X1, X2, X3, isNatcD_in_g(X1))
   U55_ga(X1, X2, X3, isNatcD_out_g(X1)) -> U56_ga(X1, X2, X3, isNatcD_in_g(X2))
   U56_ga(X1, X2, X3, isNatcD_out_g(X2)) -> U57_ga(X1, X2, X3, addcF_in_gga(X1, X2, X3))
   U57_ga(X1, X2, X3, addcF_out_gga(X1, X2, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U53_ga(X1, X2, X3, s2cA_out_ga(X1, X4)) -> U54_ga(X1, X2, X3, qcB_in_gaga(X2, X5, X4, X3))
   qcB_in_gaga(X1, X2, X3, X4) -> U59_gaga(X1, X2, X3, X4, s2cA_in_ga(X1, X2))
   U59_gaga(X1, X2, X3, X4, s2cA_out_ga(X1, X2)) -> U60_gaga(X1, X2, X3, X4, s2cA_in_ga(plus(X3, X2), X4))
   U60_gaga(X1, X2, X3, X4, s2cA_out_ga(plus(X3, X2), X4)) -> qcB_out_gaga(X1, X2, X3, X4)
   U54_ga(X1, X2, X3, qcB_out_gaga(X2, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U46_ga(X1, X2, X3, s2cA_out_ga(X2, X4)) -> U47_ga(X1, X2, X3, qcB_in_gaga(X1, X5, X4, X3))
   U47_ga(X1, X2, X3, qcB_out_gaga(X1, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U45_ga(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U44_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(X3, X1), X2), X4)) -> s2cA_out_ga(plus(plus(X1, X2), X3), X4)
   U42_ga(X1, X2, X3, X4, s2cA_out_ga(X1, X5)) -> U43_ga(X1, X2, X3, X4, qcB_in_gaga(plus(X2, X3), X6, X5, X4))
   U43_ga(X1, X2, X3, X4, qcB_out_gaga(plus(X2, X3), X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U41_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(X2, X3), X1), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U39_ga(X1, X2, X3, X4, s2cA_out_ga(plus(X1, X2), X5)) -> U40_ga(X1, X2, X3, X4, qcB_in_gaga(X3, X6, X5, X4))
   U40_ga(X1, X2, X3, X4, qcB_out_gaga(X3, X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U38_ga(X1, X2, X3, X4, s2cA_out_ga(plus(X3, plus(X1, X2)), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U37_ga(X1, X2, X3, X4, X5, s2cA_out_ga(plus(plus(plus(X1, X2), X3), X4), X5)) -> s2cA_out_ga(plus(X1, plus(X2, plus(X3, X4))), X5)

The argument filtering Pi contains the following mapping:
plus(x1, x2)  =  plus(x1, x2)

s2cA_in_ga(x1, x2)  =  s2cA_in_ga(x1)

U37_ga(x1, x2, x3, x4, x5, x6)  =  U37_ga(x1, x2, x3, x4, x6)

U38_ga(x1, x2, x3, x4, x5)  =  U38_ga(x1, x2, x3, x5)

0  =  0

s2cA_out_ga(x1, x2)  =  s2cA_out_ga(x1, x2)

U39_ga(x1, x2, x3, x4, x5)  =  U39_ga(x1, x2, x3, x5)

U41_ga(x1, x2, x3, x4, x5)  =  U41_ga(x1, x2, x3, x5)

U42_ga(x1, x2, x3, x4, x5)  =  U42_ga(x1, x2, x3, x5)

U44_ga(x1, x2, x3, x4, x5)  =  U44_ga(x1, x2, x3, x5)

U45_ga(x1, x2, x3, x4)  =  U45_ga(x1, x2, x4)

U46_ga(x1, x2, x3, x4)  =  U46_ga(x1, x2, x4)

s(x1)  =  s(x1)

U48_ga(x1, x2, x3, x4)  =  U48_ga(x1, x2, x4)

isNatcD_in_g(x1)  =  isNatcD_in_g(x1)

U58_g(x1, x2)  =  U58_g(x1, x2)

isNatcD_out_g(x1)  =  isNatcD_out_g(x1)

U49_ga(x1, x2, x3, x4)  =  U49_ga(x1, x2, x4)

U50_ga(x1, x2, x3, x4)  =  U50_ga(x1, x2, x4)

addcF_in_gga(x1, x2, x3)  =  addcF_in_gga(x1, x2)

U62_gga(x1, x2, x3, x4)  =  U62_gga(x1, x2, x4)

addcF_out_gga(x1, x2, x3)  =  addcF_out_gga(x1, x2, x3)

U51_ga(x1, x2)  =  U51_ga(x1, x2)

U52_ga(x1, x2)  =  U52_ga(x1, x2)

U53_ga(x1, x2, x3, x4)  =  U53_ga(x1, x2, x4)

U55_ga(x1, x2, x3, x4)  =  U55_ga(x1, x2, x4)

U56_ga(x1, x2, x3, x4)  =  U56_ga(x1, x2, x4)

U57_ga(x1, x2, x3, x4)  =  U57_ga(x1, x2, x4)

U54_ga(x1, x2, x3, x4)  =  U54_ga(x1, x2, x4)

qcB_in_gaga(x1, x2, x3, x4)  =  qcB_in_gaga(x1, x3)

U59_gaga(x1, x2, x3, x4, x5)  =  U59_gaga(x1, x3, x5)

U60_gaga(x1, x2, x3, x4, x5)  =  U60_gaga(x1, x2, x3, x5)

qcB_out_gaga(x1, x2, x3, x4)  =  qcB_out_gaga(x1, x2, x3, x4)

U47_ga(x1, x2, x3, x4)  =  U47_ga(x1, x2, x4)

U43_ga(x1, x2, x3, x4, x5)  =  U43_ga(x1, x2, x3, x5)

U40_ga(x1, x2, x3, x4, x5)  =  U40_ga(x1, x2, x3, x5)

ISNATD_IN_G(x1)  =  ISNATD_IN_G(x1)


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

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

(140)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   ISNATD_IN_G(s(X1)) -> ISNATD_IN_G(X1)

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

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

(142)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   ISNATD_IN_G(s(X1)) -> ISNATD_IN_G(X1)

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

(143) QDPSizeChangeProof (EQUIVALENT)
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:
*ISNATD_IN_G(s(X1)) -> ISNATD_IN_G(X1)
The graph contains the following edges 1 > 1


----------------------------------------

(144)
YES

----------------------------------------

(145)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(plus(X3, plus(X1, X2)), X4)
   S2A_IN_GA(plus(X1, plus(X2, plus(X3, X4))), X5) -> S2A_IN_GA(plus(plus(plus(X1, X2), X3), X4), X5)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(plus(X1, X2), X5)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U10_GA(X1, X2, X3, X4, s2cA_in_ga(plus(X1, X2), X5))
   U10_GA(X1, X2, X3, X4, s2cA_out_ga(plus(X1, X2), X5)) -> PB_IN_GAGA(X3, X6, X5, X4)
   PB_IN_GAGA(X1, X2, X3, X4) -> S2A_IN_GA(X1, X2)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(plus(plus(X2, X3), X1), X4)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> S2A_IN_GA(X1, X5)
   S2A_IN_GA(plus(X1, plus(X2, X3)), X4) -> U14_GA(X1, X2, X3, X4, s2cA_in_ga(X1, X5))
   U14_GA(X1, X2, X3, X4, s2cA_out_ga(X1, X5)) -> PB_IN_GAGA(plus(X2, X3), X6, X5, X4)
   PB_IN_GAGA(X1, X2, X3, X4) -> U3_GAGA(X1, X2, X3, X4, s2cA_in_ga(X1, X2))
   U3_GAGA(X1, X2, X3, X4, s2cA_out_ga(X1, X2)) -> S2A_IN_GA(plus(X3, X2), X4)
   S2A_IN_GA(plus(plus(X1, X2), X3), X4) -> S2A_IN_GA(plus(plus(X3, X1), X2), X4)
   S2A_IN_GA(plus(X1, X2), X3) -> S2A_IN_GA(plus(X1, X2), X3)
   S2A_IN_GA(plus(X1, X2), X3) -> S2A_IN_GA(X2, X4)
   S2A_IN_GA(plus(X1, X2), X3) -> U20_GA(X1, X2, X3, s2cA_in_ga(X2, X4))
   U20_GA(X1, X2, X3, s2cA_out_ga(X2, X4)) -> PB_IN_GAGA(X1, X5, X4, X3)
   S2A_IN_GA(plus(X1, X2), X3) -> S2A_IN_GA(X1, X4)
   S2A_IN_GA(plus(X1, X2), X3) -> U29_GA(X1, X2, X3, s2cA_in_ga(X1, X4))
   U29_GA(X1, X2, X3, s2cA_out_ga(X1, X4)) -> PB_IN_GAGA(X2, X5, X4, X3)

The TRS R consists of the following rules:

   s2cA_in_ga(plus(X1, plus(X2, plus(X3, X4))), X5) -> U37_ga(X1, X2, X3, X4, X5, s2cA_in_ga(plus(plus(plus(X1, X2), X3), X4), X5))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U38_ga(X1, X2, X3, X4, s2cA_in_ga(plus(X3, plus(X1, X2)), X4))
   s2cA_in_ga(plus(X1, plus(X2, 0)), plus(X1, X2)) -> s2cA_out_ga(plus(X1, plus(X2, 0)), plus(X1, X2))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U39_ga(X1, X2, X3, X4, s2cA_in_ga(plus(X1, X2), X5))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U41_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(X2, X3), X1), X4))
   s2cA_in_ga(plus(X1, plus(X2, X3)), X4) -> U42_ga(X1, X2, X3, X4, s2cA_in_ga(X1, X5))
   s2cA_in_ga(plus(plus(X1, X2), X3), X4) -> U44_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(X3, X1), X2), X4))
   s2cA_in_ga(plus(X1, X2), X3) -> U45_ga(X1, X2, X3, s2cA_in_ga(plus(X1, X2), X3))
   s2cA_in_ga(plus(0, X1), X1) -> s2cA_out_ga(plus(0, X1), X1)
   s2cA_in_ga(plus(X1, X2), X3) -> U46_ga(X1, X2, X3, s2cA_in_ga(X2, X4))
   s2cA_in_ga(plus(X1, s(X2)), s(X3)) -> U48_ga(X1, X2, X3, isNatcD_in_g(s(X2)))
   isNatcD_in_g(s(X1)) -> U58_g(X1, isNatcD_in_g(X1))
   isNatcD_in_g(0) -> isNatcD_out_g(0)
   U58_g(X1, isNatcD_out_g(X1)) -> isNatcD_out_g(s(X1))
   U48_ga(X1, X2, X3, isNatcD_out_g(s(X2))) -> U49_ga(X1, X2, X3, isNatcD_in_g(X1))
   U49_ga(X1, X2, X3, isNatcD_out_g(X1)) -> U50_ga(X1, X2, X3, addcF_in_gga(X2, X1, X3))
   addcF_in_gga(s(X1), X2, s(X3)) -> U62_gga(X1, X2, X3, addcF_in_gga(X1, X2, X3))
   addcF_in_gga(0, X1, X1) -> addcF_out_gga(0, X1, X1)
   U62_gga(X1, X2, X3, addcF_out_gga(X1, X2, X3)) -> addcF_out_gga(s(X1), X2, s(X3))
   U50_ga(X1, X2, X3, addcF_out_gga(X2, X1, X3)) -> s2cA_out_ga(plus(X1, s(X2)), s(X3))
   s2cA_in_ga(plus(X1, 0), X1) -> U51_ga(X1, isNatcD_in_g(0))
   U51_ga(X1, isNatcD_out_g(0)) -> U52_ga(X1, isNatcD_in_g(X1))
   U52_ga(X1, isNatcD_out_g(X1)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, 0), X1) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, X2), X3) -> U53_ga(X1, X2, X3, s2cA_in_ga(X1, X4))
   s2cA_in_ga(plus(X1, X2), X3) -> U55_ga(X1, X2, X3, isNatcD_in_g(X1))
   U55_ga(X1, X2, X3, isNatcD_out_g(X1)) -> U56_ga(X1, X2, X3, isNatcD_in_g(X2))
   U56_ga(X1, X2, X3, isNatcD_out_g(X2)) -> U57_ga(X1, X2, X3, addcF_in_gga(X1, X2, X3))
   U57_ga(X1, X2, X3, addcF_out_gga(X1, X2, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U53_ga(X1, X2, X3, s2cA_out_ga(X1, X4)) -> U54_ga(X1, X2, X3, qcB_in_gaga(X2, X5, X4, X3))
   qcB_in_gaga(X1, X2, X3, X4) -> U59_gaga(X1, X2, X3, X4, s2cA_in_ga(X1, X2))
   U59_gaga(X1, X2, X3, X4, s2cA_out_ga(X1, X2)) -> U60_gaga(X1, X2, X3, X4, s2cA_in_ga(plus(X3, X2), X4))
   U60_gaga(X1, X2, X3, X4, s2cA_out_ga(plus(X3, X2), X4)) -> qcB_out_gaga(X1, X2, X3, X4)
   U54_ga(X1, X2, X3, qcB_out_gaga(X2, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U46_ga(X1, X2, X3, s2cA_out_ga(X2, X4)) -> U47_ga(X1, X2, X3, qcB_in_gaga(X1, X5, X4, X3))
   U47_ga(X1, X2, X3, qcB_out_gaga(X1, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U45_ga(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U44_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(X3, X1), X2), X4)) -> s2cA_out_ga(plus(plus(X1, X2), X3), X4)
   U42_ga(X1, X2, X3, X4, s2cA_out_ga(X1, X5)) -> U43_ga(X1, X2, X3, X4, qcB_in_gaga(plus(X2, X3), X6, X5, X4))
   U43_ga(X1, X2, X3, X4, qcB_out_gaga(plus(X2, X3), X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U41_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(X2, X3), X1), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U39_ga(X1, X2, X3, X4, s2cA_out_ga(plus(X1, X2), X5)) -> U40_ga(X1, X2, X3, X4, qcB_in_gaga(X3, X6, X5, X4))
   U40_ga(X1, X2, X3, X4, qcB_out_gaga(X3, X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U38_ga(X1, X2, X3, X4, s2cA_out_ga(plus(X3, plus(X1, X2)), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U37_ga(X1, X2, X3, X4, X5, s2cA_out_ga(plus(plus(plus(X1, X2), X3), X4), X5)) -> s2cA_out_ga(plus(X1, plus(X2, plus(X3, X4))), X5)

The argument filtering Pi contains the following mapping:
plus(x1, x2)  =  plus(x1, x2)

s2cA_in_ga(x1, x2)  =  s2cA_in_ga(x1)

U37_ga(x1, x2, x3, x4, x5, x6)  =  U37_ga(x1, x2, x3, x4, x6)

U38_ga(x1, x2, x3, x4, x5)  =  U38_ga(x1, x2, x3, x5)

0  =  0

s2cA_out_ga(x1, x2)  =  s2cA_out_ga(x1, x2)

U39_ga(x1, x2, x3, x4, x5)  =  U39_ga(x1, x2, x3, x5)

U41_ga(x1, x2, x3, x4, x5)  =  U41_ga(x1, x2, x3, x5)

U42_ga(x1, x2, x3, x4, x5)  =  U42_ga(x1, x2, x3, x5)

U44_ga(x1, x2, x3, x4, x5)  =  U44_ga(x1, x2, x3, x5)

U45_ga(x1, x2, x3, x4)  =  U45_ga(x1, x2, x4)

U46_ga(x1, x2, x3, x4)  =  U46_ga(x1, x2, x4)

s(x1)  =  s(x1)

U48_ga(x1, x2, x3, x4)  =  U48_ga(x1, x2, x4)

isNatcD_in_g(x1)  =  isNatcD_in_g(x1)

U58_g(x1, x2)  =  U58_g(x1, x2)

isNatcD_out_g(x1)  =  isNatcD_out_g(x1)

U49_ga(x1, x2, x3, x4)  =  U49_ga(x1, x2, x4)

U50_ga(x1, x2, x3, x4)  =  U50_ga(x1, x2, x4)

addcF_in_gga(x1, x2, x3)  =  addcF_in_gga(x1, x2)

U62_gga(x1, x2, x3, x4)  =  U62_gga(x1, x2, x4)

addcF_out_gga(x1, x2, x3)  =  addcF_out_gga(x1, x2, x3)

U51_ga(x1, x2)  =  U51_ga(x1, x2)

U52_ga(x1, x2)  =  U52_ga(x1, x2)

U53_ga(x1, x2, x3, x4)  =  U53_ga(x1, x2, x4)

U55_ga(x1, x2, x3, x4)  =  U55_ga(x1, x2, x4)

U56_ga(x1, x2, x3, x4)  =  U56_ga(x1, x2, x4)

U57_ga(x1, x2, x3, x4)  =  U57_ga(x1, x2, x4)

U54_ga(x1, x2, x3, x4)  =  U54_ga(x1, x2, x4)

qcB_in_gaga(x1, x2, x3, x4)  =  qcB_in_gaga(x1, x3)

U59_gaga(x1, x2, x3, x4, x5)  =  U59_gaga(x1, x3, x5)

U60_gaga(x1, x2, x3, x4, x5)  =  U60_gaga(x1, x2, x3, x5)

qcB_out_gaga(x1, x2, x3, x4)  =  qcB_out_gaga(x1, x2, x3, x4)

U47_ga(x1, x2, x3, x4)  =  U47_ga(x1, x2, x4)

U43_ga(x1, x2, x3, x4, x5)  =  U43_ga(x1, x2, x3, x5)

U40_ga(x1, x2, x3, x4, x5)  =  U40_ga(x1, x2, x3, x5)

S2A_IN_GA(x1, x2)  =  S2A_IN_GA(x1)

U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x1, x2, x3, x5)

PB_IN_GAGA(x1, x2, x3, x4)  =  PB_IN_GAGA(x1, x3)

U14_GA(x1, x2, x3, x4, x5)  =  U14_GA(x1, x2, x3, x5)

U3_GAGA(x1, x2, x3, x4, x5)  =  U3_GAGA(x1, x3, x5)

U20_GA(x1, x2, x3, x4)  =  U20_GA(x1, x2, x4)

U29_GA(x1, x2, x3, x4)  =  U29_GA(x1, x2, x4)


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

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

(147)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(X3, plus(X1, X2)))
   S2A_IN_GA(plus(X1, plus(X2, plus(X3, X4)))) -> S2A_IN_GA(plus(plus(plus(X1, X2), X3), X4))
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(X1, X2))
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> U10_GA(X1, X2, X3, s2cA_in_ga(plus(X1, X2)))
   U10_GA(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X5)) -> PB_IN_GAGA(X3, X5)
   PB_IN_GAGA(X1, X3) -> S2A_IN_GA(X1)
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(plus(X2, X3), X1))
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(X1)
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> U14_GA(X1, X2, X3, s2cA_in_ga(X1))
   U14_GA(X1, X2, X3, s2cA_out_ga(X1, X5)) -> PB_IN_GAGA(plus(X2, X3), X5)
   PB_IN_GAGA(X1, X3) -> U3_GAGA(X1, X3, s2cA_in_ga(X1))
   U3_GAGA(X1, X3, s2cA_out_ga(X1, X2)) -> S2A_IN_GA(plus(X3, X2))
   S2A_IN_GA(plus(plus(X1, X2), X3)) -> S2A_IN_GA(plus(plus(X3, X1), X2))
   S2A_IN_GA(plus(X1, X2)) -> S2A_IN_GA(plus(X1, X2))
   S2A_IN_GA(plus(X1, X2)) -> S2A_IN_GA(X2)
   S2A_IN_GA(plus(X1, X2)) -> U20_GA(X1, X2, s2cA_in_ga(X2))
   U20_GA(X1, X2, s2cA_out_ga(X2, X4)) -> PB_IN_GAGA(X1, X4)
   S2A_IN_GA(plus(X1, X2)) -> S2A_IN_GA(X1)
   S2A_IN_GA(plus(X1, X2)) -> U29_GA(X1, X2, s2cA_in_ga(X1))
   U29_GA(X1, X2, s2cA_out_ga(X1, X4)) -> PB_IN_GAGA(X2, X4)

The TRS R consists of the following rules:

   s2cA_in_ga(plus(X1, plus(X2, plus(X3, X4)))) -> U37_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(plus(X1, X2), X3), X4)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U38_ga(X1, X2, X3, s2cA_in_ga(plus(X3, plus(X1, X2))))
   s2cA_in_ga(plus(X1, plus(X2, 0))) -> s2cA_out_ga(plus(X1, plus(X2, 0)), plus(X1, X2))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U39_ga(X1, X2, X3, s2cA_in_ga(plus(X1, X2)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U41_ga(X1, X2, X3, s2cA_in_ga(plus(plus(X2, X3), X1)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U42_ga(X1, X2, X3, s2cA_in_ga(X1))
   s2cA_in_ga(plus(plus(X1, X2), X3)) -> U44_ga(X1, X2, X3, s2cA_in_ga(plus(plus(X3, X1), X2)))
   s2cA_in_ga(plus(X1, X2)) -> U45_ga(X1, X2, s2cA_in_ga(plus(X1, X2)))
   s2cA_in_ga(plus(0, X1)) -> s2cA_out_ga(plus(0, X1), X1)
   s2cA_in_ga(plus(X1, X2)) -> U46_ga(X1, X2, s2cA_in_ga(X2))
   s2cA_in_ga(plus(X1, s(X2))) -> U48_ga(X1, X2, isNatcD_in_g(s(X2)))
   isNatcD_in_g(s(X1)) -> U58_g(X1, isNatcD_in_g(X1))
   isNatcD_in_g(0) -> isNatcD_out_g(0)
   U58_g(X1, isNatcD_out_g(X1)) -> isNatcD_out_g(s(X1))
   U48_ga(X1, X2, isNatcD_out_g(s(X2))) -> U49_ga(X1, X2, isNatcD_in_g(X1))
   U49_ga(X1, X2, isNatcD_out_g(X1)) -> U50_ga(X1, X2, addcF_in_gga(X2, X1))
   addcF_in_gga(s(X1), X2) -> U62_gga(X1, X2, addcF_in_gga(X1, X2))
   addcF_in_gga(0, X1) -> addcF_out_gga(0, X1, X1)
   U62_gga(X1, X2, addcF_out_gga(X1, X2, X3)) -> addcF_out_gga(s(X1), X2, s(X3))
   U50_ga(X1, X2, addcF_out_gga(X2, X1, X3)) -> s2cA_out_ga(plus(X1, s(X2)), s(X3))
   s2cA_in_ga(plus(X1, 0)) -> U51_ga(X1, isNatcD_in_g(0))
   U51_ga(X1, isNatcD_out_g(0)) -> U52_ga(X1, isNatcD_in_g(X1))
   U52_ga(X1, isNatcD_out_g(X1)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, 0)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, X2)) -> U53_ga(X1, X2, s2cA_in_ga(X1))
   s2cA_in_ga(plus(X1, X2)) -> U55_ga(X1, X2, isNatcD_in_g(X1))
   U55_ga(X1, X2, isNatcD_out_g(X1)) -> U56_ga(X1, X2, isNatcD_in_g(X2))
   U56_ga(X1, X2, isNatcD_out_g(X2)) -> U57_ga(X1, X2, addcF_in_gga(X1, X2))
   U57_ga(X1, X2, addcF_out_gga(X1, X2, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U53_ga(X1, X2, s2cA_out_ga(X1, X4)) -> U54_ga(X1, X2, qcB_in_gaga(X2, X4))
   qcB_in_gaga(X1, X3) -> U59_gaga(X1, X3, s2cA_in_ga(X1))
   U59_gaga(X1, X3, s2cA_out_ga(X1, X2)) -> U60_gaga(X1, X2, X3, s2cA_in_ga(plus(X3, X2)))
   U60_gaga(X1, X2, X3, s2cA_out_ga(plus(X3, X2), X4)) -> qcB_out_gaga(X1, X2, X3, X4)
   U54_ga(X1, X2, qcB_out_gaga(X2, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U46_ga(X1, X2, s2cA_out_ga(X2, X4)) -> U47_ga(X1, X2, qcB_in_gaga(X1, X4))
   U47_ga(X1, X2, qcB_out_gaga(X1, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U45_ga(X1, X2, s2cA_out_ga(plus(X1, X2), X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U44_ga(X1, X2, X3, s2cA_out_ga(plus(plus(X3, X1), X2), X4)) -> s2cA_out_ga(plus(plus(X1, X2), X3), X4)
   U42_ga(X1, X2, X3, s2cA_out_ga(X1, X5)) -> U43_ga(X1, X2, X3, qcB_in_gaga(plus(X2, X3), X5))
   U43_ga(X1, X2, X3, qcB_out_gaga(plus(X2, X3), X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U41_ga(X1, X2, X3, s2cA_out_ga(plus(plus(X2, X3), X1), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U39_ga(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X5)) -> U40_ga(X1, X2, X3, qcB_in_gaga(X3, X5))
   U40_ga(X1, X2, X3, qcB_out_gaga(X3, X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U38_ga(X1, X2, X3, s2cA_out_ga(plus(X3, plus(X1, X2)), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U37_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(plus(X1, X2), X3), X4), X5)) -> s2cA_out_ga(plus(X1, plus(X2, plus(X3, X4))), X5)

The set Q consists of the following terms:

   s2cA_in_ga(x0)
   isNatcD_in_g(x0)
   U58_g(x0, x1)
   U48_ga(x0, x1, x2)
   U49_ga(x0, x1, x2)
   addcF_in_gga(x0, x1)
   U62_gga(x0, x1, x2)
   U50_ga(x0, x1, x2)
   U51_ga(x0, x1)
   U52_ga(x0, x1)
   U55_ga(x0, x1, x2)
   U56_ga(x0, x1, x2)
   U57_ga(x0, x1, x2)
   U53_ga(x0, x1, x2)
   qcB_in_gaga(x0, x1)
   U59_gaga(x0, x1, x2)
   U60_gaga(x0, x1, x2, x3)
   U54_ga(x0, x1, x2)
   U46_ga(x0, x1, x2)
   U47_ga(x0, x1, x2)
   U45_ga(x0, x1, x2)
   U44_ga(x0, x1, x2, x3)
   U42_ga(x0, x1, x2, x3)
   U43_ga(x0, x1, x2, x3)
   U41_ga(x0, x1, x2, x3)
   U39_ga(x0, x1, x2, x3)
   U40_ga(x0, x1, x2, x3)
   U38_ga(x0, x1, x2, x3)
   U37_ga(x0, x1, x2, x3, x4)

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

(148) QDPOrderProof (EQUIVALENT)
We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.

   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(X1, X2))
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> U10_GA(X1, X2, X3, s2cA_in_ga(plus(X1, X2)))
   U10_GA(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X5)) -> PB_IN_GAGA(X3, X5)
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(X1)
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> U14_GA(X1, X2, X3, s2cA_in_ga(X1))
   U3_GAGA(X1, X3, s2cA_out_ga(X1, X2)) -> S2A_IN_GA(plus(X3, X2))
   S2A_IN_GA(plus(X1, X2)) -> S2A_IN_GA(X2)
   S2A_IN_GA(plus(X1, X2)) -> U20_GA(X1, X2, s2cA_in_ga(X2))
   U20_GA(X1, X2, s2cA_out_ga(X2, X4)) -> PB_IN_GAGA(X1, X4)
   S2A_IN_GA(plus(X1, X2)) -> S2A_IN_GA(X1)
   S2A_IN_GA(plus(X1, X2)) -> U29_GA(X1, X2, s2cA_in_ga(X1))
   U29_GA(X1, X2, s2cA_out_ga(X1, X4)) -> PB_IN_GAGA(X2, X4)
The remaining pairs can at least be oriented weakly.
Used ordering:  Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( U10_GA_4(x_1, ..., x_4) ) = 2x_3 + 2x_4 + 2
POL( U14_GA_4(x_1, ..., x_4) ) = 2x_2 + 2x_3 + 2x_4
POL( U20_GA_3(x_1, ..., x_3) ) = 2x_1 + 2x_3 + 1
POL( U29_GA_3(x_1, ..., x_3) ) = 2x_2 + 2x_3
POL( U3_GAGA_3(x_1, ..., x_3) ) = 2x_2 + 2x_3 + 2
POL( s2cA_in_ga_1(x_1) ) = max{0, x_1 - 1}
POL( plus_2(x_1, x_2) ) = x_1 + x_2 + 1
POL( U37_ga_5(x_1, ..., x_5) ) = x_5
POL( U38_ga_4(x_1, ..., x_4) ) = x_4
POL( 0 ) = 2
POL( s2cA_out_ga_2(x_1, x_2) ) = x_2 + 2
POL( U39_ga_4(x_1, ..., x_4) ) = x_3 + x_4
POL( U41_ga_4(x_1, ..., x_4) ) = x_4
POL( U42_ga_4(x_1, ..., x_4) ) = x_2 + x_3 + x_4
POL( U44_ga_4(x_1, ..., x_4) ) = x_4
POL( U45_ga_3(x_1, ..., x_3) ) = x_3
POL( U46_ga_3(x_1, ..., x_3) ) = max{0, x_1 + x_3 - 1}
POL( s_1(x_1) ) = x_1 + 2
POL( U48_ga_3(x_1, ..., x_3) ) = x_1 + x_2 + 2
POL( isNatcD_in_g_1(x_1) ) = max{0, -2}
POL( U51_ga_2(x_1, x_2) ) = x_1 + 2
POL( U53_ga_3(x_1, ..., x_3) ) = x_2 + x_3
POL( U55_ga_3(x_1, ..., x_3) ) = x_1 + x_2
POL( U54_ga_3(x_1, ..., x_3) ) = x_3 + 1
POL( qcB_in_gaga_2(x_1, x_2) ) = x_1 + x_2
POL( qcB_out_gaga_4(x_1, ..., x_4) ) = x_4 + 1
POL( U59_gaga_3(x_1, ..., x_3) ) = max{0, x_2 + x_3 - 2}
POL( U60_gaga_4(x_1, ..., x_4) ) = max{0, x_4 - 1}
POL( U47_ga_3(x_1, ..., x_3) ) = x_3 + 1
POL( U43_ga_4(x_1, ..., x_4) ) = x_4 + 1
POL( U40_ga_4(x_1, ..., x_4) ) = x_4 + 2
POL( U49_ga_3(x_1, ..., x_3) ) = x_1 + x_2 + 2
POL( U52_ga_2(x_1, x_2) ) = x_1 + 2
POL( U56_ga_3(x_1, ..., x_3) ) = x_1 + x_2
POL( U58_g_2(x_1, x_2) ) = 0
POL( isNatcD_out_g_1(x_1) ) = max{0, -2}
POL( U50_ga_3(x_1, ..., x_3) ) = x_3 + 2
POL( addcF_in_gga_2(x_1, x_2) ) = x_1 + x_2
POL( U57_ga_3(x_1, ..., x_3) ) = x_3
POL( U62_gga_3(x_1, ..., x_3) ) = x_3 + 2
POL( addcF_out_gga_3(x_1, ..., x_3) ) = x_3 + 2
POL( S2A_IN_GA_1(x_1) ) = 2x_1 + 2
POL( PB_IN_GAGA_2(x_1, x_2) ) = 2x_1 + 2x_2 + 2

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

   s2cA_in_ga(plus(X1, plus(X2, plus(X3, X4)))) -> U37_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(plus(X1, X2), X3), X4)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U38_ga(X1, X2, X3, s2cA_in_ga(plus(X3, plus(X1, X2))))
   s2cA_in_ga(plus(X1, plus(X2, 0))) -> s2cA_out_ga(plus(X1, plus(X2, 0)), plus(X1, X2))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U39_ga(X1, X2, X3, s2cA_in_ga(plus(X1, X2)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U41_ga(X1, X2, X3, s2cA_in_ga(plus(plus(X2, X3), X1)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U42_ga(X1, X2, X3, s2cA_in_ga(X1))
   s2cA_in_ga(plus(plus(X1, X2), X3)) -> U44_ga(X1, X2, X3, s2cA_in_ga(plus(plus(X3, X1), X2)))
   s2cA_in_ga(plus(X1, X2)) -> U45_ga(X1, X2, s2cA_in_ga(plus(X1, X2)))
   s2cA_in_ga(plus(0, X1)) -> s2cA_out_ga(plus(0, X1), X1)
   s2cA_in_ga(plus(X1, X2)) -> U46_ga(X1, X2, s2cA_in_ga(X2))
   s2cA_in_ga(plus(X1, s(X2))) -> U48_ga(X1, X2, isNatcD_in_g(s(X2)))
   s2cA_in_ga(plus(X1, 0)) -> U51_ga(X1, isNatcD_in_g(0))
   s2cA_in_ga(plus(X1, 0)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, X2)) -> U53_ga(X1, X2, s2cA_in_ga(X1))
   s2cA_in_ga(plus(X1, X2)) -> U55_ga(X1, X2, isNatcD_in_g(X1))
   U38_ga(X1, X2, X3, s2cA_out_ga(plus(X3, plus(X1, X2)), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U37_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(plus(X1, X2), X3), X4), X5)) -> s2cA_out_ga(plus(X1, plus(X2, plus(X3, X4))), X5)
   U41_ga(X1, X2, X3, s2cA_out_ga(plus(plus(X2, X3), X1), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U44_ga(X1, X2, X3, s2cA_out_ga(plus(plus(X3, X1), X2), X4)) -> s2cA_out_ga(plus(plus(X1, X2), X3), X4)
   U45_ga(X1, X2, s2cA_out_ga(plus(X1, X2), X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U53_ga(X1, X2, s2cA_out_ga(X1, X4)) -> U54_ga(X1, X2, qcB_in_gaga(X2, X4))
   U54_ga(X1, X2, qcB_out_gaga(X2, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   qcB_in_gaga(X1, X3) -> U59_gaga(X1, X3, s2cA_in_ga(X1))
   U59_gaga(X1, X3, s2cA_out_ga(X1, X2)) -> U60_gaga(X1, X2, X3, s2cA_in_ga(plus(X3, X2)))
   U60_gaga(X1, X2, X3, s2cA_out_ga(plus(X3, X2), X4)) -> qcB_out_gaga(X1, X2, X3, X4)
   U46_ga(X1, X2, s2cA_out_ga(X2, X4)) -> U47_ga(X1, X2, qcB_in_gaga(X1, X4))
   U47_ga(X1, X2, qcB_out_gaga(X1, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U42_ga(X1, X2, X3, s2cA_out_ga(X1, X5)) -> U43_ga(X1, X2, X3, qcB_in_gaga(plus(X2, X3), X5))
   U43_ga(X1, X2, X3, qcB_out_gaga(plus(X2, X3), X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U39_ga(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X5)) -> U40_ga(X1, X2, X3, qcB_in_gaga(X3, X5))
   U40_ga(X1, X2, X3, qcB_out_gaga(X3, X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U48_ga(X1, X2, isNatcD_out_g(s(X2))) -> U49_ga(X1, X2, isNatcD_in_g(X1))
   U49_ga(X1, X2, isNatcD_out_g(X1)) -> U50_ga(X1, X2, addcF_in_gga(X2, X1))
   U51_ga(X1, isNatcD_out_g(0)) -> U52_ga(X1, isNatcD_in_g(X1))
   U52_ga(X1, isNatcD_out_g(X1)) -> s2cA_out_ga(plus(X1, 0), X1)
   U55_ga(X1, X2, isNatcD_out_g(X1)) -> U56_ga(X1, X2, isNatcD_in_g(X2))
   U56_ga(X1, X2, isNatcD_out_g(X2)) -> U57_ga(X1, X2, addcF_in_gga(X1, X2))
   addcF_in_gga(s(X1), X2) -> U62_gga(X1, X2, addcF_in_gga(X1, X2))
   addcF_in_gga(0, X1) -> addcF_out_gga(0, X1, X1)
   U50_ga(X1, X2, addcF_out_gga(X2, X1, X3)) -> s2cA_out_ga(plus(X1, s(X2)), s(X3))
   U57_ga(X1, X2, addcF_out_gga(X1, X2, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U62_gga(X1, X2, addcF_out_gga(X1, X2, X3)) -> addcF_out_gga(s(X1), X2, s(X3))


----------------------------------------

(149)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(X3, plus(X1, X2)))
   S2A_IN_GA(plus(X1, plus(X2, plus(X3, X4)))) -> S2A_IN_GA(plus(plus(plus(X1, X2), X3), X4))
   PB_IN_GAGA(X1, X3) -> S2A_IN_GA(X1)
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(plus(X2, X3), X1))
   U14_GA(X1, X2, X3, s2cA_out_ga(X1, X5)) -> PB_IN_GAGA(plus(X2, X3), X5)
   PB_IN_GAGA(X1, X3) -> U3_GAGA(X1, X3, s2cA_in_ga(X1))
   S2A_IN_GA(plus(plus(X1, X2), X3)) -> S2A_IN_GA(plus(plus(X3, X1), X2))
   S2A_IN_GA(plus(X1, X2)) -> S2A_IN_GA(plus(X1, X2))

The TRS R consists of the following rules:

   s2cA_in_ga(plus(X1, plus(X2, plus(X3, X4)))) -> U37_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(plus(X1, X2), X3), X4)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U38_ga(X1, X2, X3, s2cA_in_ga(plus(X3, plus(X1, X2))))
   s2cA_in_ga(plus(X1, plus(X2, 0))) -> s2cA_out_ga(plus(X1, plus(X2, 0)), plus(X1, X2))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U39_ga(X1, X2, X3, s2cA_in_ga(plus(X1, X2)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U41_ga(X1, X2, X3, s2cA_in_ga(plus(plus(X2, X3), X1)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U42_ga(X1, X2, X3, s2cA_in_ga(X1))
   s2cA_in_ga(plus(plus(X1, X2), X3)) -> U44_ga(X1, X2, X3, s2cA_in_ga(plus(plus(X3, X1), X2)))
   s2cA_in_ga(plus(X1, X2)) -> U45_ga(X1, X2, s2cA_in_ga(plus(X1, X2)))
   s2cA_in_ga(plus(0, X1)) -> s2cA_out_ga(plus(0, X1), X1)
   s2cA_in_ga(plus(X1, X2)) -> U46_ga(X1, X2, s2cA_in_ga(X2))
   s2cA_in_ga(plus(X1, s(X2))) -> U48_ga(X1, X2, isNatcD_in_g(s(X2)))
   isNatcD_in_g(s(X1)) -> U58_g(X1, isNatcD_in_g(X1))
   isNatcD_in_g(0) -> isNatcD_out_g(0)
   U58_g(X1, isNatcD_out_g(X1)) -> isNatcD_out_g(s(X1))
   U48_ga(X1, X2, isNatcD_out_g(s(X2))) -> U49_ga(X1, X2, isNatcD_in_g(X1))
   U49_ga(X1, X2, isNatcD_out_g(X1)) -> U50_ga(X1, X2, addcF_in_gga(X2, X1))
   addcF_in_gga(s(X1), X2) -> U62_gga(X1, X2, addcF_in_gga(X1, X2))
   addcF_in_gga(0, X1) -> addcF_out_gga(0, X1, X1)
   U62_gga(X1, X2, addcF_out_gga(X1, X2, X3)) -> addcF_out_gga(s(X1), X2, s(X3))
   U50_ga(X1, X2, addcF_out_gga(X2, X1, X3)) -> s2cA_out_ga(plus(X1, s(X2)), s(X3))
   s2cA_in_ga(plus(X1, 0)) -> U51_ga(X1, isNatcD_in_g(0))
   U51_ga(X1, isNatcD_out_g(0)) -> U52_ga(X1, isNatcD_in_g(X1))
   U52_ga(X1, isNatcD_out_g(X1)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, 0)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, X2)) -> U53_ga(X1, X2, s2cA_in_ga(X1))
   s2cA_in_ga(plus(X1, X2)) -> U55_ga(X1, X2, isNatcD_in_g(X1))
   U55_ga(X1, X2, isNatcD_out_g(X1)) -> U56_ga(X1, X2, isNatcD_in_g(X2))
   U56_ga(X1, X2, isNatcD_out_g(X2)) -> U57_ga(X1, X2, addcF_in_gga(X1, X2))
   U57_ga(X1, X2, addcF_out_gga(X1, X2, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U53_ga(X1, X2, s2cA_out_ga(X1, X4)) -> U54_ga(X1, X2, qcB_in_gaga(X2, X4))
   qcB_in_gaga(X1, X3) -> U59_gaga(X1, X3, s2cA_in_ga(X1))
   U59_gaga(X1, X3, s2cA_out_ga(X1, X2)) -> U60_gaga(X1, X2, X3, s2cA_in_ga(plus(X3, X2)))
   U60_gaga(X1, X2, X3, s2cA_out_ga(plus(X3, X2), X4)) -> qcB_out_gaga(X1, X2, X3, X4)
   U54_ga(X1, X2, qcB_out_gaga(X2, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U46_ga(X1, X2, s2cA_out_ga(X2, X4)) -> U47_ga(X1, X2, qcB_in_gaga(X1, X4))
   U47_ga(X1, X2, qcB_out_gaga(X1, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U45_ga(X1, X2, s2cA_out_ga(plus(X1, X2), X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U44_ga(X1, X2, X3, s2cA_out_ga(plus(plus(X3, X1), X2), X4)) -> s2cA_out_ga(plus(plus(X1, X2), X3), X4)
   U42_ga(X1, X2, X3, s2cA_out_ga(X1, X5)) -> U43_ga(X1, X2, X3, qcB_in_gaga(plus(X2, X3), X5))
   U43_ga(X1, X2, X3, qcB_out_gaga(plus(X2, X3), X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U41_ga(X1, X2, X3, s2cA_out_ga(plus(plus(X2, X3), X1), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U39_ga(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X5)) -> U40_ga(X1, X2, X3, qcB_in_gaga(X3, X5))
   U40_ga(X1, X2, X3, qcB_out_gaga(X3, X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U38_ga(X1, X2, X3, s2cA_out_ga(plus(X3, plus(X1, X2)), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U37_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(plus(X1, X2), X3), X4), X5)) -> s2cA_out_ga(plus(X1, plus(X2, plus(X3, X4))), X5)

The set Q consists of the following terms:

   s2cA_in_ga(x0)
   isNatcD_in_g(x0)
   U58_g(x0, x1)
   U48_ga(x0, x1, x2)
   U49_ga(x0, x1, x2)
   addcF_in_gga(x0, x1)
   U62_gga(x0, x1, x2)
   U50_ga(x0, x1, x2)
   U51_ga(x0, x1)
   U52_ga(x0, x1)
   U55_ga(x0, x1, x2)
   U56_ga(x0, x1, x2)
   U57_ga(x0, x1, x2)
   U53_ga(x0, x1, x2)
   qcB_in_gaga(x0, x1)
   U59_gaga(x0, x1, x2)
   U60_gaga(x0, x1, x2, x3)
   U54_ga(x0, x1, x2)
   U46_ga(x0, x1, x2)
   U47_ga(x0, x1, x2)
   U45_ga(x0, x1, x2)
   U44_ga(x0, x1, x2, x3)
   U42_ga(x0, x1, x2, x3)
   U43_ga(x0, x1, x2, x3)
   U41_ga(x0, x1, x2, x3)
   U39_ga(x0, x1, x2, x3)
   U40_ga(x0, x1, x2, x3)
   U38_ga(x0, x1, x2, x3)
   U37_ga(x0, x1, x2, x3, x4)

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

(150) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 3 less nodes.
----------------------------------------

(151)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2A_IN_GA(plus(X1, plus(X2, plus(X3, X4)))) -> S2A_IN_GA(plus(plus(plus(X1, X2), X3), X4))
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(X3, plus(X1, X2)))
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(plus(X2, X3), X1))
   S2A_IN_GA(plus(plus(X1, X2), X3)) -> S2A_IN_GA(plus(plus(X3, X1), X2))
   S2A_IN_GA(plus(X1, X2)) -> S2A_IN_GA(plus(X1, X2))

The TRS R consists of the following rules:

   s2cA_in_ga(plus(X1, plus(X2, plus(X3, X4)))) -> U37_ga(X1, X2, X3, X4, s2cA_in_ga(plus(plus(plus(X1, X2), X3), X4)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U38_ga(X1, X2, X3, s2cA_in_ga(plus(X3, plus(X1, X2))))
   s2cA_in_ga(plus(X1, plus(X2, 0))) -> s2cA_out_ga(plus(X1, plus(X2, 0)), plus(X1, X2))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U39_ga(X1, X2, X3, s2cA_in_ga(plus(X1, X2)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U41_ga(X1, X2, X3, s2cA_in_ga(plus(plus(X2, X3), X1)))
   s2cA_in_ga(plus(X1, plus(X2, X3))) -> U42_ga(X1, X2, X3, s2cA_in_ga(X1))
   s2cA_in_ga(plus(plus(X1, X2), X3)) -> U44_ga(X1, X2, X3, s2cA_in_ga(plus(plus(X3, X1), X2)))
   s2cA_in_ga(plus(X1, X2)) -> U45_ga(X1, X2, s2cA_in_ga(plus(X1, X2)))
   s2cA_in_ga(plus(0, X1)) -> s2cA_out_ga(plus(0, X1), X1)
   s2cA_in_ga(plus(X1, X2)) -> U46_ga(X1, X2, s2cA_in_ga(X2))
   s2cA_in_ga(plus(X1, s(X2))) -> U48_ga(X1, X2, isNatcD_in_g(s(X2)))
   isNatcD_in_g(s(X1)) -> U58_g(X1, isNatcD_in_g(X1))
   isNatcD_in_g(0) -> isNatcD_out_g(0)
   U58_g(X1, isNatcD_out_g(X1)) -> isNatcD_out_g(s(X1))
   U48_ga(X1, X2, isNatcD_out_g(s(X2))) -> U49_ga(X1, X2, isNatcD_in_g(X1))
   U49_ga(X1, X2, isNatcD_out_g(X1)) -> U50_ga(X1, X2, addcF_in_gga(X2, X1))
   addcF_in_gga(s(X1), X2) -> U62_gga(X1, X2, addcF_in_gga(X1, X2))
   addcF_in_gga(0, X1) -> addcF_out_gga(0, X1, X1)
   U62_gga(X1, X2, addcF_out_gga(X1, X2, X3)) -> addcF_out_gga(s(X1), X2, s(X3))
   U50_ga(X1, X2, addcF_out_gga(X2, X1, X3)) -> s2cA_out_ga(plus(X1, s(X2)), s(X3))
   s2cA_in_ga(plus(X1, 0)) -> U51_ga(X1, isNatcD_in_g(0))
   U51_ga(X1, isNatcD_out_g(0)) -> U52_ga(X1, isNatcD_in_g(X1))
   U52_ga(X1, isNatcD_out_g(X1)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, 0)) -> s2cA_out_ga(plus(X1, 0), X1)
   s2cA_in_ga(plus(X1, X2)) -> U53_ga(X1, X2, s2cA_in_ga(X1))
   s2cA_in_ga(plus(X1, X2)) -> U55_ga(X1, X2, isNatcD_in_g(X1))
   U55_ga(X1, X2, isNatcD_out_g(X1)) -> U56_ga(X1, X2, isNatcD_in_g(X2))
   U56_ga(X1, X2, isNatcD_out_g(X2)) -> U57_ga(X1, X2, addcF_in_gga(X1, X2))
   U57_ga(X1, X2, addcF_out_gga(X1, X2, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U53_ga(X1, X2, s2cA_out_ga(X1, X4)) -> U54_ga(X1, X2, qcB_in_gaga(X2, X4))
   qcB_in_gaga(X1, X3) -> U59_gaga(X1, X3, s2cA_in_ga(X1))
   U59_gaga(X1, X3, s2cA_out_ga(X1, X2)) -> U60_gaga(X1, X2, X3, s2cA_in_ga(plus(X3, X2)))
   U60_gaga(X1, X2, X3, s2cA_out_ga(plus(X3, X2), X4)) -> qcB_out_gaga(X1, X2, X3, X4)
   U54_ga(X1, X2, qcB_out_gaga(X2, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U46_ga(X1, X2, s2cA_out_ga(X2, X4)) -> U47_ga(X1, X2, qcB_in_gaga(X1, X4))
   U47_ga(X1, X2, qcB_out_gaga(X1, X5, X4, X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U45_ga(X1, X2, s2cA_out_ga(plus(X1, X2), X3)) -> s2cA_out_ga(plus(X1, X2), X3)
   U44_ga(X1, X2, X3, s2cA_out_ga(plus(plus(X3, X1), X2), X4)) -> s2cA_out_ga(plus(plus(X1, X2), X3), X4)
   U42_ga(X1, X2, X3, s2cA_out_ga(X1, X5)) -> U43_ga(X1, X2, X3, qcB_in_gaga(plus(X2, X3), X5))
   U43_ga(X1, X2, X3, qcB_out_gaga(plus(X2, X3), X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U41_ga(X1, X2, X3, s2cA_out_ga(plus(plus(X2, X3), X1), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U39_ga(X1, X2, X3, s2cA_out_ga(plus(X1, X2), X5)) -> U40_ga(X1, X2, X3, qcB_in_gaga(X3, X5))
   U40_ga(X1, X2, X3, qcB_out_gaga(X3, X6, X5, X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U38_ga(X1, X2, X3, s2cA_out_ga(plus(X3, plus(X1, X2)), X4)) -> s2cA_out_ga(plus(X1, plus(X2, X3)), X4)
   U37_ga(X1, X2, X3, X4, s2cA_out_ga(plus(plus(plus(X1, X2), X3), X4), X5)) -> s2cA_out_ga(plus(X1, plus(X2, plus(X3, X4))), X5)

The set Q consists of the following terms:

   s2cA_in_ga(x0)
   isNatcD_in_g(x0)
   U58_g(x0, x1)
   U48_ga(x0, x1, x2)
   U49_ga(x0, x1, x2)
   addcF_in_gga(x0, x1)
   U62_gga(x0, x1, x2)
   U50_ga(x0, x1, x2)
   U51_ga(x0, x1)
   U52_ga(x0, x1)
   U55_ga(x0, x1, x2)
   U56_ga(x0, x1, x2)
   U57_ga(x0, x1, x2)
   U53_ga(x0, x1, x2)
   qcB_in_gaga(x0, x1)
   U59_gaga(x0, x1, x2)
   U60_gaga(x0, x1, x2, x3)
   U54_ga(x0, x1, x2)
   U46_ga(x0, x1, x2)
   U47_ga(x0, x1, x2)
   U45_ga(x0, x1, x2)
   U44_ga(x0, x1, x2, x3)
   U42_ga(x0, x1, x2, x3)
   U43_ga(x0, x1, x2, x3)
   U41_ga(x0, x1, x2, x3)
   U39_ga(x0, x1, x2, x3)
   U40_ga(x0, x1, x2, x3)
   U38_ga(x0, x1, x2, x3)
   U37_ga(x0, x1, x2, x3, x4)

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

(152) UsableRulesProof (EQUIVALENT)
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.
----------------------------------------

(153)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2A_IN_GA(plus(X1, plus(X2, plus(X3, X4)))) -> S2A_IN_GA(plus(plus(plus(X1, X2), X3), X4))
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(X3, plus(X1, X2)))
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(plus(X2, X3), X1))
   S2A_IN_GA(plus(plus(X1, X2), X3)) -> S2A_IN_GA(plus(plus(X3, X1), X2))
   S2A_IN_GA(plus(X1, X2)) -> S2A_IN_GA(plus(X1, X2))

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

   s2cA_in_ga(x0)
   isNatcD_in_g(x0)
   U58_g(x0, x1)
   U48_ga(x0, x1, x2)
   U49_ga(x0, x1, x2)
   addcF_in_gga(x0, x1)
   U62_gga(x0, x1, x2)
   U50_ga(x0, x1, x2)
   U51_ga(x0, x1)
   U52_ga(x0, x1)
   U55_ga(x0, x1, x2)
   U56_ga(x0, x1, x2)
   U57_ga(x0, x1, x2)
   U53_ga(x0, x1, x2)
   qcB_in_gaga(x0, x1)
   U59_gaga(x0, x1, x2)
   U60_gaga(x0, x1, x2, x3)
   U54_ga(x0, x1, x2)
   U46_ga(x0, x1, x2)
   U47_ga(x0, x1, x2)
   U45_ga(x0, x1, x2)
   U44_ga(x0, x1, x2, x3)
   U42_ga(x0, x1, x2, x3)
   U43_ga(x0, x1, x2, x3)
   U41_ga(x0, x1, x2, x3)
   U39_ga(x0, x1, x2, x3)
   U40_ga(x0, x1, x2, x3)
   U38_ga(x0, x1, x2, x3)
   U37_ga(x0, x1, x2, x3, x4)

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

(154) QReductionProof (EQUIVALENT)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

   s2cA_in_ga(x0)
   isNatcD_in_g(x0)
   U58_g(x0, x1)
   U48_ga(x0, x1, x2)
   U49_ga(x0, x1, x2)
   addcF_in_gga(x0, x1)
   U62_gga(x0, x1, x2)
   U50_ga(x0, x1, x2)
   U51_ga(x0, x1)
   U52_ga(x0, x1)
   U55_ga(x0, x1, x2)
   U56_ga(x0, x1, x2)
   U57_ga(x0, x1, x2)
   U53_ga(x0, x1, x2)
   qcB_in_gaga(x0, x1)
   U59_gaga(x0, x1, x2)
   U60_gaga(x0, x1, x2, x3)
   U54_ga(x0, x1, x2)
   U46_ga(x0, x1, x2)
   U47_ga(x0, x1, x2)
   U45_ga(x0, x1, x2)
   U44_ga(x0, x1, x2, x3)
   U42_ga(x0, x1, x2, x3)
   U43_ga(x0, x1, x2, x3)
   U41_ga(x0, x1, x2, x3)
   U39_ga(x0, x1, x2, x3)
   U40_ga(x0, x1, x2, x3)
   U38_ga(x0, x1, x2, x3)
   U37_ga(x0, x1, x2, x3, x4)


----------------------------------------

(155)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   S2A_IN_GA(plus(X1, plus(X2, plus(X3, X4)))) -> S2A_IN_GA(plus(plus(plus(X1, X2), X3), X4))
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(X3, plus(X1, X2)))
   S2A_IN_GA(plus(X1, plus(X2, X3))) -> S2A_IN_GA(plus(plus(X2, X3), X1))
   S2A_IN_GA(plus(plus(X1, X2), X3)) -> S2A_IN_GA(plus(plus(X3, X1), X2))
   S2A_IN_GA(plus(X1, X2)) -> S2A_IN_GA(plus(X1, X2))

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