(0) Obligation:

Clauses:

nat(0).
nat(s(X)) :- nat(X).
plus(0, X, X) :- nat(X).
plus(s(X), Y, s(Z)) :- plus(X, Y, Z).
ways(0, X1, s(0)).
ways(X2, [], 0).
ways(Amount, .(s(C), Coins), N) :- ','(=(Amount, s(X3)), ','(plus(s(C), NewAmount, Amount), ','(ways(Amount, Coins, N1), ','(ways(NewAmount, .(s(C), Coins), N2), plus(N1, N2, N))))).
ways(Amount, .(s(C), Coins), N) :- ','(=(Amount, s(X4)), ','(plus(Amount, s(X5), s(C)), ways(Amount, Coins, N))).

Queries:

ways(g,g,a).

(1) PredefinedPredicateTransformerProof (SOUND transformation)

Added definitions of predefined predicates [PROLOG].

(2) Obligation:

Clauses:

nat(0).
nat(s(X)) :- nat(X).
plus(0, X, X) :- nat(X).
plus(s(X), Y, s(Z)) :- plus(X, Y, Z).
ways(0, X1, s(0)).
ways(X2, [], 0).
ways(Amount, .(s(C), Coins), N) :- ','(=(Amount, s(X3)), ','(plus(s(C), NewAmount, Amount), ','(ways(Amount, Coins, N1), ','(ways(NewAmount, .(s(C), Coins), N2), plus(N1, N2, N))))).
ways(Amount, .(s(C), Coins), N) :- ','(=(Amount, s(X4)), ','(plus(Amount, s(X5), s(C)), ways(Amount, Coins, N))).
=(X, X).

Queries:

ways(g,g,a).

(3) PrologToPiTRSProof (SOUND transformation)

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

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x1, x2, x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x1, x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x1, x2, x3)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x3, x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x1, x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x1, x2, x3, x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x2, x3, x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x1, x2, x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x1, x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x1, x2, x3)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x3, x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x1, x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x1, x2, x3, x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x2, x3, x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)

(5) DependencyPairsProof (EQUIVALENT transformation)

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

WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U4_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → =_IN_GA(Amount, s(X3))
U4_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_GGA(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
U4_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → PLUS_IN_GAG(s(C), NewAmount, Amount)
PLUS_IN_GAG(0, X, X) → U2_GAG(X, nat_in_g(X))
PLUS_IN_GAG(0, X, X) → NAT_IN_G(X)
NAT_IN_G(s(X)) → U1_G(X, nat_in_g(X))
NAT_IN_G(s(X)) → NAT_IN_G(X)
PLUS_IN_GAG(s(X), Y, s(Z)) → U3_GAG(X, Y, Z, plus_in_gag(X, Y, Z))
PLUS_IN_GAG(s(X), Y, s(Z)) → PLUS_IN_GAG(X, Y, Z)
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → WAYS_IN_GGA(Amount, Coins, N1)
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U9_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_GGA(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U9_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → PLUS_IN_GAG(Amount, s(X5), s(C))
U10_GGA(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_GGA(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U10_GGA(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → WAYS_IN_GGA(Amount, Coins, N)
U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins), N2)
U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_GGA(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → PLUS_IN_GGA(N1, N2, N)
PLUS_IN_GGA(0, X, X) → U2_GGA(X, nat_in_g(X))
PLUS_IN_GGA(0, X, X) → NAT_IN_G(X)
PLUS_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, plus_in_gga(X, Y, Z))
PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x1, x2, x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x1, x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x1, x2, x3)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x3, x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x1, x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x1, x2, x3, x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x2, x3, x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
WAYS_IN_GGA(x1, x2, x3)  =  WAYS_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x2, x3, x5)
=_IN_GA(x1, x2)  =  =_IN_GA(x1)
U5_GGA(x1, x2, x3, x4, x5, x6)  =  U5_GGA(x1, x2, x3, x6)
PLUS_IN_GAG(x1, x2, x3)  =  PLUS_IN_GAG(x1, x3)
U2_GAG(x1, x2)  =  U2_GAG(x1, x2)
NAT_IN_G(x1)  =  NAT_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
U3_GAG(x1, x2, x3, x4)  =  U3_GAG(x1, x3, x4)
U6_GGA(x1, x2, x3, x4, x5, x6, x7)  =  U6_GGA(x1, x2, x3, x6, x7)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x3, x5)
U10_GGA(x1, x2, x3, x4, x5, x6)  =  U10_GGA(x1, x2, x3, x6)
U11_GGA(x1, x2, x3, x4, x5)  =  U11_GGA(x1, x2, x3, x5)
U7_GGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GGA(x1, x2, x3, x7, x8)
U8_GGA(x1, x2, x3, x4, x5)  =  U8_GGA(x1, x2, x3, x5)
PLUS_IN_GGA(x1, x2, x3)  =  PLUS_IN_GGA(x1, x2)
U2_GGA(x1, x2)  =  U2_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)

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

(6) Obligation:

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

WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U4_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → =_IN_GA(Amount, s(X3))
U4_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_GGA(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
U4_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → PLUS_IN_GAG(s(C), NewAmount, Amount)
PLUS_IN_GAG(0, X, X) → U2_GAG(X, nat_in_g(X))
PLUS_IN_GAG(0, X, X) → NAT_IN_G(X)
NAT_IN_G(s(X)) → U1_G(X, nat_in_g(X))
NAT_IN_G(s(X)) → NAT_IN_G(X)
PLUS_IN_GAG(s(X), Y, s(Z)) → U3_GAG(X, Y, Z, plus_in_gag(X, Y, Z))
PLUS_IN_GAG(s(X), Y, s(Z)) → PLUS_IN_GAG(X, Y, Z)
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → WAYS_IN_GGA(Amount, Coins, N1)
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U9_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_GGA(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U9_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → PLUS_IN_GAG(Amount, s(X5), s(C))
U10_GGA(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_GGA(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U10_GGA(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → WAYS_IN_GGA(Amount, Coins, N)
U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins), N2)
U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_GGA(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → PLUS_IN_GGA(N1, N2, N)
PLUS_IN_GGA(0, X, X) → U2_GGA(X, nat_in_g(X))
PLUS_IN_GGA(0, X, X) → NAT_IN_G(X)
PLUS_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, plus_in_gga(X, Y, Z))
PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x1, x2, x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x1, x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x1, x2, x3)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x3, x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x1, x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x1, x2, x3, x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x2, x3, x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
WAYS_IN_GGA(x1, x2, x3)  =  WAYS_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x2, x3, x5)
=_IN_GA(x1, x2)  =  =_IN_GA(x1)
U5_GGA(x1, x2, x3, x4, x5, x6)  =  U5_GGA(x1, x2, x3, x6)
PLUS_IN_GAG(x1, x2, x3)  =  PLUS_IN_GAG(x1, x3)
U2_GAG(x1, x2)  =  U2_GAG(x1, x2)
NAT_IN_G(x1)  =  NAT_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
U3_GAG(x1, x2, x3, x4)  =  U3_GAG(x1, x3, x4)
U6_GGA(x1, x2, x3, x4, x5, x6, x7)  =  U6_GGA(x1, x2, x3, x6, x7)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x3, x5)
U10_GGA(x1, x2, x3, x4, x5, x6)  =  U10_GGA(x1, x2, x3, x6)
U11_GGA(x1, x2, x3, x4, x5)  =  U11_GGA(x1, x2, x3, x5)
U7_GGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GGA(x1, x2, x3, x7, x8)
U8_GGA(x1, x2, x3, x4, x5)  =  U8_GGA(x1, x2, x3, x5)
PLUS_IN_GGA(x1, x2, x3)  =  PLUS_IN_GGA(x1, x2)
U2_GGA(x1, x2)  =  U2_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

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

(8) Complex Obligation (AND)

(9) Obligation:

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

NAT_IN_G(s(X)) → NAT_IN_G(X)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x1, x2, x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x1, x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x1, x2, x3)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x3, x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x1, x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x1, x2, x3, x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x2, x3, x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
NAT_IN_G(x1)  =  NAT_IN_G(x1)

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

(10) UsableRulesProof (EQUIVALENT transformation)

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

(11) Obligation:

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

NAT_IN_G(s(X)) → NAT_IN_G(X)

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

(12) PiDPToQDPProof (EQUIVALENT transformation)

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

(13) Obligation:

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

NAT_IN_G(s(X)) → NAT_IN_G(X)

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

(14) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • NAT_IN_G(s(X)) → NAT_IN_G(X)
    The graph contains the following edges 1 > 1

(15) TRUE

(16) Obligation:

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

PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x1, x2, x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x1, x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x1, x2, x3)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x3, x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x1, x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x1, x2, x3, x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x2, x3, x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
PLUS_IN_GGA(x1, x2, x3)  =  PLUS_IN_GGA(x1, x2)

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

(17) UsableRulesProof (EQUIVALENT transformation)

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

(18) Obligation:

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

PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

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

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

(19) PiDPToQDPProof (SOUND transformation)

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

(20) Obligation:

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

PLUS_IN_GGA(s(X), Y) → PLUS_IN_GGA(X, Y)

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

(21) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • PLUS_IN_GGA(s(X), Y) → PLUS_IN_GGA(X, Y)
    The graph contains the following edges 1 > 1, 2 >= 2

(22) TRUE

(23) Obligation:

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

PLUS_IN_GAG(s(X), Y, s(Z)) → PLUS_IN_GAG(X, Y, Z)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x1, x2, x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x1, x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x1, x2, x3)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x3, x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x1, x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x1, x2, x3, x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x2, x3, x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
PLUS_IN_GAG(x1, x2, x3)  =  PLUS_IN_GAG(x1, x3)

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

(24) UsableRulesProof (EQUIVALENT transformation)

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

(25) Obligation:

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

PLUS_IN_GAG(s(X), Y, s(Z)) → PLUS_IN_GAG(X, Y, Z)

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

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

(26) PiDPToQDPProof (SOUND transformation)

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

(27) Obligation:

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

PLUS_IN_GAG(s(X), s(Z)) → PLUS_IN_GAG(X, Z)

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

(28) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • PLUS_IN_GAG(s(X), s(Z)) → PLUS_IN_GAG(X, Z)
    The graph contains the following edges 1 > 1, 2 > 2

(29) TRUE

(30) Obligation:

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

U4_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_GGA(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins), N2)
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U4_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U9_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_GGA(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_GGA(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → WAYS_IN_GGA(Amount, Coins, N)
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → WAYS_IN_GGA(Amount, Coins, N1)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x1, x2, x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x1, x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x1, x2, x3)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x3, x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x1, x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x1, x2, x3, x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x2, x3, x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
WAYS_IN_GGA(x1, x2, x3)  =  WAYS_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x2, x3, x5)
U5_GGA(x1, x2, x3, x4, x5, x6)  =  U5_GGA(x1, x2, x3, x6)
U6_GGA(x1, x2, x3, x4, x5, x6, x7)  =  U6_GGA(x1, x2, x3, x6, x7)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x3, x5)
U10_GGA(x1, x2, x3, x4, x5, x6)  =  U10_GGA(x1, x2, x3, x6)

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

(31) PiDPToQDPProof (SOUND transformation)

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

(32) Obligation:

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

U4_GGA(Amount, C, Coins, =_out_ga(Amount, s(X3))) → U5_GGA(Amount, C, Coins, plus_in_gag(s(C), Amount))
U5_GGA(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → U6_GGA(Amount, C, Coins, NewAmount, ways_in_gga(Amount, Coins))
U6_GGA(Amount, C, Coins, NewAmount, ways_out_gga(Amount, Coins, N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U4_GGA(Amount, C, Coins, =_in_ga(Amount))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U9_GGA(Amount, C, Coins, =_in_ga(Amount))
U9_GGA(Amount, C, Coins, =_out_ga(Amount, s(X4))) → U10_GGA(Amount, C, Coins, plus_in_gag(Amount, s(C)))
U10_GGA(Amount, C, Coins, plus_out_gag(Amount, s(X5), s(C))) → WAYS_IN_GGA(Amount, Coins)
U5_GGA(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → WAYS_IN_GGA(Amount, Coins)

The TRS R consists of the following rules:

ways_in_gga(0, X1) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, []) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins)) → U4_gga(Amount, C, Coins, =_in_ga(Amount))
=_in_ga(X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, plus_in_gag(s(C), Amount))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), s(Z)) → U3_gag(X, Z, plus_in_gag(X, Z))
U3_gag(X, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, NewAmount, ways_in_gga(Amount, Coins))
ways_in_gga(Amount, .(s(C), Coins)) → U9_gga(Amount, C, Coins, =_in_ga(Amount))
U9_gga(Amount, C, Coins, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, plus_in_gag(Amount, s(C)))
U10_gga(Amount, C, Coins, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, ways_in_gga(Amount, Coins))
U11_gga(Amount, C, Coins, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N1, ways_in_gga(NewAmount, .(s(C), Coins)))
U7_gga(Amount, C, Coins, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, plus_in_gga(N1, N2))
plus_in_gga(0, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y) → U3_gga(X, Y, plus_in_gga(X, Y))
U3_gga(X, Y, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The set Q consists of the following terms:

ways_in_gga(x0, x1)
=_in_ga(x0)
U4_gga(x0, x1, x2, x3)
plus_in_gag(x0, x1)
nat_in_g(x0)
U1_g(x0, x1)
U2_gag(x0, x1)
U3_gag(x0, x1, x2)
U5_gga(x0, x1, x2, x3)
U9_gga(x0, x1, x2, x3)
U10_gga(x0, x1, x2, x3)
U11_gga(x0, x1, x2, x3)
U6_gga(x0, x1, x2, x3, x4)
U7_gga(x0, x1, x2, x3, x4)
plus_in_gga(x0, x1)
U2_gga(x0, x1)
U3_gga(x0, x1, x2)
U8_gga(x0, x1, x2, x3)

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

(33) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U10_GGA(Amount, C, Coins, plus_out_gag(Amount, s(X5), s(C))) → WAYS_IN_GGA(Amount, Coins)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + x2   
POL(0) = 1   
POL(=_in_ga(x1)) = 0   
POL(=_out_ga(x1, x2)) = 0   
POL(U10_GGA(x1, x2, x3, x4)) = x3 + x4   
POL(U10_gga(x1, x2, x3, x4)) = 0   
POL(U11_gga(x1, x2, x3, x4)) = 0   
POL(U1_g(x1, x2)) = x2   
POL(U2_gag(x1, x2)) = x2   
POL(U2_gga(x1, x2)) = 0   
POL(U3_gag(x1, x2, x3)) = x3   
POL(U3_gga(x1, x2, x3)) = 0   
POL(U4_GGA(x1, x2, x3, x4)) = x2 + x3   
POL(U4_gga(x1, x2, x3, x4)) = 0   
POL(U5_GGA(x1, x2, x3, x4)) = x2 + x3   
POL(U5_gga(x1, x2, x3, x4)) = 0   
POL(U6_GGA(x1, x2, x3, x4, x5)) = x2 + x3   
POL(U6_gga(x1, x2, x3, x4, x5)) = 0   
POL(U7_gga(x1, x2, x3, x4, x5)) = 0   
POL(U8_gga(x1, x2, x3, x4)) = 0   
POL(U9_GGA(x1, x2, x3, x4)) = x2 + x3   
POL(U9_gga(x1, x2, x3, x4)) = 0   
POL(WAYS_IN_GGA(x1, x2)) = x2   
POL([]) = 0   
POL(nat_in_g(x1)) = x1   
POL(nat_out_g(x1)) = 1   
POL(plus_in_gag(x1, x2)) = x2   
POL(plus_in_gga(x1, x2)) = 0   
POL(plus_out_gag(x1, x2, x3)) = 1   
POL(plus_out_gga(x1, x2, x3)) = 0   
POL(s(x1)) = x1   
POL(ways_in_gga(x1, x2)) = 0   
POL(ways_out_gga(x1, x2, x3)) = 0   

The following usable rules [FROCOS05] were oriented:

plus_in_gag(s(X), s(Z)) → U3_gag(X, Z, plus_in_gag(X, Z))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
U3_gag(X, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))

(34) Obligation:

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

U4_GGA(Amount, C, Coins, =_out_ga(Amount, s(X3))) → U5_GGA(Amount, C, Coins, plus_in_gag(s(C), Amount))
U5_GGA(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → U6_GGA(Amount, C, Coins, NewAmount, ways_in_gga(Amount, Coins))
U6_GGA(Amount, C, Coins, NewAmount, ways_out_gga(Amount, Coins, N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U4_GGA(Amount, C, Coins, =_in_ga(Amount))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U9_GGA(Amount, C, Coins, =_in_ga(Amount))
U9_GGA(Amount, C, Coins, =_out_ga(Amount, s(X4))) → U10_GGA(Amount, C, Coins, plus_in_gag(Amount, s(C)))
U5_GGA(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → WAYS_IN_GGA(Amount, Coins)

The TRS R consists of the following rules:

ways_in_gga(0, X1) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, []) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins)) → U4_gga(Amount, C, Coins, =_in_ga(Amount))
=_in_ga(X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, plus_in_gag(s(C), Amount))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), s(Z)) → U3_gag(X, Z, plus_in_gag(X, Z))
U3_gag(X, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, NewAmount, ways_in_gga(Amount, Coins))
ways_in_gga(Amount, .(s(C), Coins)) → U9_gga(Amount, C, Coins, =_in_ga(Amount))
U9_gga(Amount, C, Coins, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, plus_in_gag(Amount, s(C)))
U10_gga(Amount, C, Coins, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, ways_in_gga(Amount, Coins))
U11_gga(Amount, C, Coins, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N1, ways_in_gga(NewAmount, .(s(C), Coins)))
U7_gga(Amount, C, Coins, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, plus_in_gga(N1, N2))
plus_in_gga(0, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y) → U3_gga(X, Y, plus_in_gga(X, Y))
U3_gga(X, Y, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The set Q consists of the following terms:

ways_in_gga(x0, x1)
=_in_ga(x0)
U4_gga(x0, x1, x2, x3)
plus_in_gag(x0, x1)
nat_in_g(x0)
U1_g(x0, x1)
U2_gag(x0, x1)
U3_gag(x0, x1, x2)
U5_gga(x0, x1, x2, x3)
U9_gga(x0, x1, x2, x3)
U10_gga(x0, x1, x2, x3)
U11_gga(x0, x1, x2, x3)
U6_gga(x0, x1, x2, x3, x4)
U7_gga(x0, x1, x2, x3, x4)
plus_in_gga(x0, x1)
U2_gga(x0, x1)
U3_gga(x0, x1, x2)
U8_gga(x0, x1, x2, x3)

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

(35) DependencyGraphProof (EQUIVALENT transformation)

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

(36) Obligation:

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

U5_GGA(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → U6_GGA(Amount, C, Coins, NewAmount, ways_in_gga(Amount, Coins))
U6_GGA(Amount, C, Coins, NewAmount, ways_out_gga(Amount, Coins, N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U4_GGA(Amount, C, Coins, =_in_ga(Amount))
U4_GGA(Amount, C, Coins, =_out_ga(Amount, s(X3))) → U5_GGA(Amount, C, Coins, plus_in_gag(s(C), Amount))
U5_GGA(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → WAYS_IN_GGA(Amount, Coins)

The TRS R consists of the following rules:

ways_in_gga(0, X1) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, []) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins)) → U4_gga(Amount, C, Coins, =_in_ga(Amount))
=_in_ga(X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, plus_in_gag(s(C), Amount))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), s(Z)) → U3_gag(X, Z, plus_in_gag(X, Z))
U3_gag(X, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, NewAmount, ways_in_gga(Amount, Coins))
ways_in_gga(Amount, .(s(C), Coins)) → U9_gga(Amount, C, Coins, =_in_ga(Amount))
U9_gga(Amount, C, Coins, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, plus_in_gag(Amount, s(C)))
U10_gga(Amount, C, Coins, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, ways_in_gga(Amount, Coins))
U11_gga(Amount, C, Coins, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N1, ways_in_gga(NewAmount, .(s(C), Coins)))
U7_gga(Amount, C, Coins, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, plus_in_gga(N1, N2))
plus_in_gga(0, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y) → U3_gga(X, Y, plus_in_gga(X, Y))
U3_gga(X, Y, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The set Q consists of the following terms:

ways_in_gga(x0, x1)
=_in_ga(x0)
U4_gga(x0, x1, x2, x3)
plus_in_gag(x0, x1)
nat_in_g(x0)
U1_g(x0, x1)
U2_gag(x0, x1)
U3_gag(x0, x1, x2)
U5_gga(x0, x1, x2, x3)
U9_gga(x0, x1, x2, x3)
U10_gga(x0, x1, x2, x3)
U11_gga(x0, x1, x2, x3)
U6_gga(x0, x1, x2, x3, x4)
U7_gga(x0, x1, x2, x3, x4)
plus_in_gga(x0, x1)
U2_gga(x0, x1)
U3_gga(x0, x1, x2)
U8_gga(x0, x1, x2, x3)

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

(37) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U5_GGA(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → WAYS_IN_GGA(Amount, Coins)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + x2   
POL(0) = 0   
POL(=_in_ga(x1)) = 0   
POL(=_out_ga(x1, x2)) = 0   
POL(U10_gga(x1, x2, x3, x4)) = 0   
POL(U11_gga(x1, x2, x3, x4)) = 0   
POL(U1_g(x1, x2)) = 0   
POL(U2_gag(x1, x2)) = 0   
POL(U2_gga(x1, x2)) = 0   
POL(U3_gag(x1, x2, x3)) = 0   
POL(U3_gga(x1, x2, x3)) = 0   
POL(U4_GGA(x1, x2, x3, x4)) = 1 + x3   
POL(U4_gga(x1, x2, x3, x4)) = 0   
POL(U5_GGA(x1, x2, x3, x4)) = 1 + x3   
POL(U5_gga(x1, x2, x3, x4)) = 0   
POL(U6_GGA(x1, x2, x3, x4, x5)) = 1 + x3   
POL(U6_gga(x1, x2, x3, x4, x5)) = 0   
POL(U7_gga(x1, x2, x3, x4, x5)) = 0   
POL(U8_gga(x1, x2, x3, x4)) = 0   
POL(U9_gga(x1, x2, x3, x4)) = 0   
POL(WAYS_IN_GGA(x1, x2)) = x2   
POL([]) = 0   
POL(nat_in_g(x1)) = 0   
POL(nat_out_g(x1)) = 0   
POL(plus_in_gag(x1, x2)) = 0   
POL(plus_in_gga(x1, x2)) = 0   
POL(plus_out_gag(x1, x2, x3)) = 0   
POL(plus_out_gga(x1, x2, x3)) = 0   
POL(s(x1)) = 1   
POL(ways_in_gga(x1, x2)) = 0   
POL(ways_out_gga(x1, x2, x3)) = 0   

The following usable rules [FROCOS05] were oriented: none

(38) Obligation:

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

U5_GGA(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → U6_GGA(Amount, C, Coins, NewAmount, ways_in_gga(Amount, Coins))
U6_GGA(Amount, C, Coins, NewAmount, ways_out_gga(Amount, Coins, N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U4_GGA(Amount, C, Coins, =_in_ga(Amount))
U4_GGA(Amount, C, Coins, =_out_ga(Amount, s(X3))) → U5_GGA(Amount, C, Coins, plus_in_gag(s(C), Amount))

The TRS R consists of the following rules:

ways_in_gga(0, X1) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, []) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins)) → U4_gga(Amount, C, Coins, =_in_ga(Amount))
=_in_ga(X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, plus_in_gag(s(C), Amount))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), s(Z)) → U3_gag(X, Z, plus_in_gag(X, Z))
U3_gag(X, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, NewAmount, ways_in_gga(Amount, Coins))
ways_in_gga(Amount, .(s(C), Coins)) → U9_gga(Amount, C, Coins, =_in_ga(Amount))
U9_gga(Amount, C, Coins, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, plus_in_gag(Amount, s(C)))
U10_gga(Amount, C, Coins, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, ways_in_gga(Amount, Coins))
U11_gga(Amount, C, Coins, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N1, ways_in_gga(NewAmount, .(s(C), Coins)))
U7_gga(Amount, C, Coins, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, plus_in_gga(N1, N2))
plus_in_gga(0, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y) → U3_gga(X, Y, plus_in_gga(X, Y))
U3_gga(X, Y, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The set Q consists of the following terms:

ways_in_gga(x0, x1)
=_in_ga(x0)
U4_gga(x0, x1, x2, x3)
plus_in_gag(x0, x1)
nat_in_g(x0)
U1_g(x0, x1)
U2_gag(x0, x1)
U3_gag(x0, x1, x2)
U5_gga(x0, x1, x2, x3)
U9_gga(x0, x1, x2, x3)
U10_gga(x0, x1, x2, x3)
U11_gga(x0, x1, x2, x3)
U6_gga(x0, x1, x2, x3, x4)
U7_gga(x0, x1, x2, x3, x4)
plus_in_gga(x0, x1)
U2_gga(x0, x1)
U3_gga(x0, x1, x2)
U8_gga(x0, x1, x2, x3)

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

(39) PrologToPiTRSProof (SOUND transformation)

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

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g
U1_g(x1, x2)  =  U1_g(x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x2)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(40) Obligation:

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

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g
U1_g(x1, x2)  =  U1_g(x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x2)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)

(41) DependencyPairsProof (EQUIVALENT transformation)

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

WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U4_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → =_IN_GA(Amount, s(X3))
U4_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_GGA(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
U4_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → PLUS_IN_GAG(s(C), NewAmount, Amount)
PLUS_IN_GAG(0, X, X) → U2_GAG(X, nat_in_g(X))
PLUS_IN_GAG(0, X, X) → NAT_IN_G(X)
NAT_IN_G(s(X)) → U1_G(X, nat_in_g(X))
NAT_IN_G(s(X)) → NAT_IN_G(X)
PLUS_IN_GAG(s(X), Y, s(Z)) → U3_GAG(X, Y, Z, plus_in_gag(X, Y, Z))
PLUS_IN_GAG(s(X), Y, s(Z)) → PLUS_IN_GAG(X, Y, Z)
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → WAYS_IN_GGA(Amount, Coins, N1)
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U9_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_GGA(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U9_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → PLUS_IN_GAG(Amount, s(X5), s(C))
U10_GGA(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_GGA(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U10_GGA(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → WAYS_IN_GGA(Amount, Coins, N)
U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins), N2)
U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_GGA(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → PLUS_IN_GGA(N1, N2, N)
PLUS_IN_GGA(0, X, X) → U2_GGA(X, nat_in_g(X))
PLUS_IN_GGA(0, X, X) → NAT_IN_G(X)
PLUS_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, plus_in_gga(X, Y, Z))
PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g
U1_g(x1, x2)  =  U1_g(x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x2)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
WAYS_IN_GGA(x1, x2, x3)  =  WAYS_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x2, x3, x5)
=_IN_GA(x1, x2)  =  =_IN_GA(x1)
U5_GGA(x1, x2, x3, x4, x5, x6)  =  U5_GGA(x1, x2, x3, x6)
PLUS_IN_GAG(x1, x2, x3)  =  PLUS_IN_GAG(x1, x3)
U2_GAG(x1, x2)  =  U2_GAG(x1, x2)
NAT_IN_G(x1)  =  NAT_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x2)
U3_GAG(x1, x2, x3, x4)  =  U3_GAG(x4)
U6_GGA(x1, x2, x3, x4, x5, x6, x7)  =  U6_GGA(x2, x3, x6, x7)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x3, x5)
U10_GGA(x1, x2, x3, x4, x5, x6)  =  U10_GGA(x1, x3, x6)
U11_GGA(x1, x2, x3, x4, x5)  =  U11_GGA(x5)
U7_GGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GGA(x7, x8)
U8_GGA(x1, x2, x3, x4, x5)  =  U8_GGA(x5)
PLUS_IN_GGA(x1, x2, x3)  =  PLUS_IN_GGA(x1, x2)
U2_GGA(x1, x2)  =  U2_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x4)

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

(42) Obligation:

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

WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U4_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → =_IN_GA(Amount, s(X3))
U4_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_GGA(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
U4_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → PLUS_IN_GAG(s(C), NewAmount, Amount)
PLUS_IN_GAG(0, X, X) → U2_GAG(X, nat_in_g(X))
PLUS_IN_GAG(0, X, X) → NAT_IN_G(X)
NAT_IN_G(s(X)) → U1_G(X, nat_in_g(X))
NAT_IN_G(s(X)) → NAT_IN_G(X)
PLUS_IN_GAG(s(X), Y, s(Z)) → U3_GAG(X, Y, Z, plus_in_gag(X, Y, Z))
PLUS_IN_GAG(s(X), Y, s(Z)) → PLUS_IN_GAG(X, Y, Z)
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → WAYS_IN_GGA(Amount, Coins, N1)
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U9_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_GGA(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U9_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → PLUS_IN_GAG(Amount, s(X5), s(C))
U10_GGA(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_GGA(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U10_GGA(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → WAYS_IN_GGA(Amount, Coins, N)
U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins), N2)
U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_GGA(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
U7_GGA(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → PLUS_IN_GGA(N1, N2, N)
PLUS_IN_GGA(0, X, X) → U2_GGA(X, nat_in_g(X))
PLUS_IN_GGA(0, X, X) → NAT_IN_G(X)
PLUS_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, plus_in_gga(X, Y, Z))
PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g
U1_g(x1, x2)  =  U1_g(x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x2)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
WAYS_IN_GGA(x1, x2, x3)  =  WAYS_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x2, x3, x5)
=_IN_GA(x1, x2)  =  =_IN_GA(x1)
U5_GGA(x1, x2, x3, x4, x5, x6)  =  U5_GGA(x1, x2, x3, x6)
PLUS_IN_GAG(x1, x2, x3)  =  PLUS_IN_GAG(x1, x3)
U2_GAG(x1, x2)  =  U2_GAG(x1, x2)
NAT_IN_G(x1)  =  NAT_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x2)
U3_GAG(x1, x2, x3, x4)  =  U3_GAG(x4)
U6_GGA(x1, x2, x3, x4, x5, x6, x7)  =  U6_GGA(x2, x3, x6, x7)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x3, x5)
U10_GGA(x1, x2, x3, x4, x5, x6)  =  U10_GGA(x1, x3, x6)
U11_GGA(x1, x2, x3, x4, x5)  =  U11_GGA(x5)
U7_GGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GGA(x7, x8)
U8_GGA(x1, x2, x3, x4, x5)  =  U8_GGA(x5)
PLUS_IN_GGA(x1, x2, x3)  =  PLUS_IN_GGA(x1, x2)
U2_GGA(x1, x2)  =  U2_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x4)

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

(43) DependencyGraphProof (EQUIVALENT transformation)

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

(44) Complex Obligation (AND)

(45) Obligation:

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

NAT_IN_G(s(X)) → NAT_IN_G(X)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g
U1_g(x1, x2)  =  U1_g(x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x2)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
NAT_IN_G(x1)  =  NAT_IN_G(x1)

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

(46) UsableRulesProof (EQUIVALENT transformation)

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

(47) Obligation:

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

NAT_IN_G(s(X)) → NAT_IN_G(X)

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

(48) PiDPToQDPProof (EQUIVALENT transformation)

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

(49) Obligation:

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

NAT_IN_G(s(X)) → NAT_IN_G(X)

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

(50) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • NAT_IN_G(s(X)) → NAT_IN_G(X)
    The graph contains the following edges 1 > 1

(51) TRUE

(52) Obligation:

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

PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g
U1_g(x1, x2)  =  U1_g(x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x2)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
PLUS_IN_GGA(x1, x2, x3)  =  PLUS_IN_GGA(x1, x2)

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

(53) UsableRulesProof (EQUIVALENT transformation)

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

(54) Obligation:

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

PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

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

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

(55) PiDPToQDPProof (SOUND transformation)

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

(56) Obligation:

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

PLUS_IN_GGA(s(X), Y) → PLUS_IN_GGA(X, Y)

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

(57) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • PLUS_IN_GGA(s(X), Y) → PLUS_IN_GGA(X, Y)
    The graph contains the following edges 1 > 1, 2 >= 2

(58) TRUE

(59) Obligation:

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

PLUS_IN_GAG(s(X), Y, s(Z)) → PLUS_IN_GAG(X, Y, Z)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g
U1_g(x1, x2)  =  U1_g(x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x2)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
PLUS_IN_GAG(x1, x2, x3)  =  PLUS_IN_GAG(x1, x3)

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

(60) UsableRulesProof (EQUIVALENT transformation)

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

(61) Obligation:

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

PLUS_IN_GAG(s(X), Y, s(Z)) → PLUS_IN_GAG(X, Y, Z)

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

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

(62) PiDPToQDPProof (SOUND transformation)

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

(63) Obligation:

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

PLUS_IN_GAG(s(X), s(Z)) → PLUS_IN_GAG(X, Z)

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

(64) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • PLUS_IN_GAG(s(X), s(Z)) → PLUS_IN_GAG(X, Z)
    The graph contains the following edges 1 > 1, 2 > 2

(65) TRUE

(66) Obligation:

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

U4_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_GGA(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
U6_GGA(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins), N2)
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U4_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
WAYS_IN_GGA(Amount, .(s(C), Coins), N) → U9_GGA(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_GGA(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_GGA(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_GGA(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → WAYS_IN_GGA(Amount, Coins, N)
U5_GGA(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → WAYS_IN_GGA(Amount, Coins, N1)

The TRS R consists of the following rules:

ways_in_gga(0, X1, s(0)) → ways_out_gga(0, X1, s(0))
ways_in_gga(X2, [], 0) → ways_out_gga(X2, [], 0)
ways_in_gga(Amount, .(s(C), Coins), N) → U4_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X3)))
=_in_ga(X, X) → =_out_ga(X, X)
U4_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X3))) → U5_gga(Amount, C, Coins, N, X3, plus_in_gag(s(C), NewAmount, Amount))
plus_in_gag(0, X, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g(0)
nat_in_g(s(X)) → U1_g(X, nat_in_g(X))
U1_g(X, nat_out_g(X)) → nat_out_g(s(X))
U2_gag(X, nat_out_g(X)) → plus_out_gag(0, X, X)
plus_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, plus_in_gag(X, Y, Z))
U3_gag(X, Y, Z, plus_out_gag(X, Y, Z)) → plus_out_gag(s(X), Y, s(Z))
U5_gga(Amount, C, Coins, N, X3, plus_out_gag(s(C), NewAmount, Amount)) → U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_in_gga(Amount, Coins, N1))
ways_in_gga(Amount, .(s(C), Coins), N) → U9_gga(Amount, C, Coins, N, =_in_ga(Amount, s(X4)))
U9_gga(Amount, C, Coins, N, =_out_ga(Amount, s(X4))) → U10_gga(Amount, C, Coins, N, X4, plus_in_gag(Amount, s(X5), s(C)))
U10_gga(Amount, C, Coins, N, X4, plus_out_gag(Amount, s(X5), s(C))) → U11_gga(Amount, C, Coins, N, ways_in_gga(Amount, Coins, N))
U11_gga(Amount, C, Coins, N, ways_out_gga(Amount, Coins, N)) → ways_out_gga(Amount, .(s(C), Coins), N)
U6_gga(Amount, C, Coins, N, X3, NewAmount, ways_out_gga(Amount, Coins, N1)) → U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_in_gga(NewAmount, .(s(C), Coins), N2))
U7_gga(Amount, C, Coins, N, X3, NewAmount, N1, ways_out_gga(NewAmount, .(s(C), Coins), N2)) → U8_gga(Amount, C, Coins, N, plus_in_gga(N1, N2, N))
plus_in_gga(0, X, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g(X)) → plus_out_gga(0, X, X)
plus_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U3_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U8_gga(Amount, C, Coins, N, plus_out_gga(N1, N2, N)) → ways_out_gga(Amount, .(s(C), Coins), N)

The argument filtering Pi contains the following mapping:
ways_in_gga(x1, x2, x3)  =  ways_in_gga(x1, x2)
0  =  0
ways_out_gga(x1, x2, x3)  =  ways_out_gga(x3)
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x2, x3, x5)
=_in_ga(x1, x2)  =  =_in_ga(x1)
=_out_ga(x1, x2)  =  =_out_ga(x2)
U5_gga(x1, x2, x3, x4, x5, x6)  =  U5_gga(x1, x2, x3, x6)
plus_in_gag(x1, x2, x3)  =  plus_in_gag(x1, x3)
U2_gag(x1, x2)  =  U2_gag(x1, x2)
nat_in_g(x1)  =  nat_in_g(x1)
nat_out_g(x1)  =  nat_out_g
U1_g(x1, x2)  =  U1_g(x2)
plus_out_gag(x1, x2, x3)  =  plus_out_gag(x2)
U3_gag(x1, x2, x3, x4)  =  U3_gag(x4)
U6_gga(x1, x2, x3, x4, x5, x6, x7)  =  U6_gga(x2, x3, x6, x7)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x3, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U7_gga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gga(x7, x8)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x5)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
U2_gga(x1, x2)  =  U2_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
WAYS_IN_GGA(x1, x2, x3)  =  WAYS_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x2, x3, x5)
U5_GGA(x1, x2, x3, x4, x5, x6)  =  U5_GGA(x1, x2, x3, x6)
U6_GGA(x1, x2, x3, x4, x5, x6, x7)  =  U6_GGA(x2, x3, x6, x7)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x3, x5)
U10_GGA(x1, x2, x3, x4, x5, x6)  =  U10_GGA(x1, x3, x6)

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

(67) PiDPToQDPProof (SOUND transformation)

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

(68) Obligation:

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

U4_GGA(Amount, C, Coins, =_out_ga(s(X3))) → U5_GGA(Amount, C, Coins, plus_in_gag(s(C), Amount))
U5_GGA(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_GGA(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
U6_GGA(C, Coins, NewAmount, ways_out_gga(N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U4_GGA(Amount, C, Coins, =_in_ga(Amount))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U9_GGA(Amount, C, Coins, =_in_ga(Amount))
U9_GGA(Amount, C, Coins, =_out_ga(s(X4))) → U10_GGA(Amount, Coins, plus_in_gag(Amount, s(C)))
U10_GGA(Amount, Coins, plus_out_gag(s(X5))) → WAYS_IN_GGA(Amount, Coins)
U5_GGA(Amount, C, Coins, plus_out_gag(NewAmount)) → WAYS_IN_GGA(Amount, Coins)

The TRS R consists of the following rules:

ways_in_gga(0, X1) → ways_out_gga(s(0))
ways_in_gga(X2, []) → ways_out_gga(0)
ways_in_gga(Amount, .(s(C), Coins)) → U4_gga(Amount, C, Coins, =_in_ga(Amount))
=_in_ga(X) → =_out_ga(X)
U4_gga(Amount, C, Coins, =_out_ga(s(X3))) → U5_gga(Amount, C, Coins, plus_in_gag(s(C), Amount))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g
nat_in_g(s(X)) → U1_g(nat_in_g(X))
U1_g(nat_out_g) → nat_out_g
U2_gag(X, nat_out_g) → plus_out_gag(X)
plus_in_gag(s(X), s(Z)) → U3_gag(plus_in_gag(X, Z))
U3_gag(plus_out_gag(Y)) → plus_out_gag(Y)
U5_gga(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_gga(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
ways_in_gga(Amount, .(s(C), Coins)) → U9_gga(Amount, C, Coins, =_in_ga(Amount))
U9_gga(Amount, C, Coins, =_out_ga(s(X4))) → U10_gga(Amount, Coins, plus_in_gag(Amount, s(C)))
U10_gga(Amount, Coins, plus_out_gag(s(X5))) → U11_gga(ways_in_gga(Amount, Coins))
U11_gga(ways_out_gga(N)) → ways_out_gga(N)
U6_gga(C, Coins, NewAmount, ways_out_gga(N1)) → U7_gga(N1, ways_in_gga(NewAmount, .(s(C), Coins)))
U7_gga(N1, ways_out_gga(N2)) → U8_gga(plus_in_gga(N1, N2))
plus_in_gga(0, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g) → plus_out_gga(X)
plus_in_gga(s(X), Y) → U3_gga(plus_in_gga(X, Y))
U3_gga(plus_out_gga(Z)) → plus_out_gga(s(Z))
U8_gga(plus_out_gga(N)) → ways_out_gga(N)

The set Q consists of the following terms:

ways_in_gga(x0, x1)
=_in_ga(x0)
U4_gga(x0, x1, x2, x3)
plus_in_gag(x0, x1)
nat_in_g(x0)
U1_g(x0)
U2_gag(x0, x1)
U3_gag(x0)
U5_gga(x0, x1, x2, x3)
U9_gga(x0, x1, x2, x3)
U10_gga(x0, x1, x2)
U11_gga(x0)
U6_gga(x0, x1, x2, x3)
U7_gga(x0, x1)
plus_in_gga(x0, x1)
U2_gga(x0, x1)
U3_gga(x0)
U8_gga(x0)

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

(69) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U10_GGA(Amount, Coins, plus_out_gag(s(X5))) → WAYS_IN_GGA(Amount, Coins)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + x2   
POL(0) = 1   
POL(=_in_ga(x1)) = 0   
POL(=_out_ga(x1)) = 0   
POL(U10_GGA(x1, x2, x3)) = x2 + x3   
POL(U10_gga(x1, x2, x3)) = 0   
POL(U11_gga(x1)) = 0   
POL(U1_g(x1)) = x1   
POL(U2_gag(x1, x2)) = x2   
POL(U2_gga(x1, x2)) = 1 + x1   
POL(U3_gag(x1)) = x1   
POL(U3_gga(x1)) = 0   
POL(U4_GGA(x1, x2, x3, x4)) = x2 + x3   
POL(U4_gga(x1, x2, x3, x4)) = 0   
POL(U5_GGA(x1, x2, x3, x4)) = x2 + x3   
POL(U5_gga(x1, x2, x3, x4)) = 0   
POL(U6_GGA(x1, x2, x3, x4)) = x1 + x2   
POL(U6_gga(x1, x2, x3, x4)) = 0   
POL(U7_gga(x1, x2)) = 0   
POL(U8_gga(x1)) = 0   
POL(U9_GGA(x1, x2, x3, x4)) = x2 + x3   
POL(U9_gga(x1, x2, x3, x4)) = 0   
POL(WAYS_IN_GGA(x1, x2)) = x2   
POL([]) = 0   
POL(nat_in_g(x1)) = x1   
POL(nat_out_g) = 1   
POL(plus_in_gag(x1, x2)) = x2   
POL(plus_in_gga(x1, x2)) = 1 + x1 + x2   
POL(plus_out_gag(x1)) = 1   
POL(plus_out_gga(x1)) = 0   
POL(s(x1)) = x1   
POL(ways_in_gga(x1, x2)) = 0   
POL(ways_out_gga(x1)) = 0   

The following usable rules [FROCOS05] were oriented:

plus_in_gag(s(X), s(Z)) → U3_gag(plus_in_gag(X, Z))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
U3_gag(plus_out_gag(Y)) → plus_out_gag(Y)
nat_in_g(0) → nat_out_g
nat_in_g(s(X)) → U1_g(nat_in_g(X))
U2_gag(X, nat_out_g) → plus_out_gag(X)
U1_g(nat_out_g) → nat_out_g

(70) Obligation:

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

U4_GGA(Amount, C, Coins, =_out_ga(s(X3))) → U5_GGA(Amount, C, Coins, plus_in_gag(s(C), Amount))
U5_GGA(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_GGA(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
U6_GGA(C, Coins, NewAmount, ways_out_gga(N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U4_GGA(Amount, C, Coins, =_in_ga(Amount))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U9_GGA(Amount, C, Coins, =_in_ga(Amount))
U9_GGA(Amount, C, Coins, =_out_ga(s(X4))) → U10_GGA(Amount, Coins, plus_in_gag(Amount, s(C)))
U5_GGA(Amount, C, Coins, plus_out_gag(NewAmount)) → WAYS_IN_GGA(Amount, Coins)

The TRS R consists of the following rules:

ways_in_gga(0, X1) → ways_out_gga(s(0))
ways_in_gga(X2, []) → ways_out_gga(0)
ways_in_gga(Amount, .(s(C), Coins)) → U4_gga(Amount, C, Coins, =_in_ga(Amount))
=_in_ga(X) → =_out_ga(X)
U4_gga(Amount, C, Coins, =_out_ga(s(X3))) → U5_gga(Amount, C, Coins, plus_in_gag(s(C), Amount))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g
nat_in_g(s(X)) → U1_g(nat_in_g(X))
U1_g(nat_out_g) → nat_out_g
U2_gag(X, nat_out_g) → plus_out_gag(X)
plus_in_gag(s(X), s(Z)) → U3_gag(plus_in_gag(X, Z))
U3_gag(plus_out_gag(Y)) → plus_out_gag(Y)
U5_gga(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_gga(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
ways_in_gga(Amount, .(s(C), Coins)) → U9_gga(Amount, C, Coins, =_in_ga(Amount))
U9_gga(Amount, C, Coins, =_out_ga(s(X4))) → U10_gga(Amount, Coins, plus_in_gag(Amount, s(C)))
U10_gga(Amount, Coins, plus_out_gag(s(X5))) → U11_gga(ways_in_gga(Amount, Coins))
U11_gga(ways_out_gga(N)) → ways_out_gga(N)
U6_gga(C, Coins, NewAmount, ways_out_gga(N1)) → U7_gga(N1, ways_in_gga(NewAmount, .(s(C), Coins)))
U7_gga(N1, ways_out_gga(N2)) → U8_gga(plus_in_gga(N1, N2))
plus_in_gga(0, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g) → plus_out_gga(X)
plus_in_gga(s(X), Y) → U3_gga(plus_in_gga(X, Y))
U3_gga(plus_out_gga(Z)) → plus_out_gga(s(Z))
U8_gga(plus_out_gga(N)) → ways_out_gga(N)

The set Q consists of the following terms:

ways_in_gga(x0, x1)
=_in_ga(x0)
U4_gga(x0, x1, x2, x3)
plus_in_gag(x0, x1)
nat_in_g(x0)
U1_g(x0)
U2_gag(x0, x1)
U3_gag(x0)
U5_gga(x0, x1, x2, x3)
U9_gga(x0, x1, x2, x3)
U10_gga(x0, x1, x2)
U11_gga(x0)
U6_gga(x0, x1, x2, x3)
U7_gga(x0, x1)
plus_in_gga(x0, x1)
U2_gga(x0, x1)
U3_gga(x0)
U8_gga(x0)

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

(71) DependencyGraphProof (EQUIVALENT transformation)

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

(72) Obligation:

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

U5_GGA(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_GGA(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
U6_GGA(C, Coins, NewAmount, ways_out_gga(N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U4_GGA(Amount, C, Coins, =_in_ga(Amount))
U4_GGA(Amount, C, Coins, =_out_ga(s(X3))) → U5_GGA(Amount, C, Coins, plus_in_gag(s(C), Amount))
U5_GGA(Amount, C, Coins, plus_out_gag(NewAmount)) → WAYS_IN_GGA(Amount, Coins)

The TRS R consists of the following rules:

ways_in_gga(0, X1) → ways_out_gga(s(0))
ways_in_gga(X2, []) → ways_out_gga(0)
ways_in_gga(Amount, .(s(C), Coins)) → U4_gga(Amount, C, Coins, =_in_ga(Amount))
=_in_ga(X) → =_out_ga(X)
U4_gga(Amount, C, Coins, =_out_ga(s(X3))) → U5_gga(Amount, C, Coins, plus_in_gag(s(C), Amount))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g
nat_in_g(s(X)) → U1_g(nat_in_g(X))
U1_g(nat_out_g) → nat_out_g
U2_gag(X, nat_out_g) → plus_out_gag(X)
plus_in_gag(s(X), s(Z)) → U3_gag(plus_in_gag(X, Z))
U3_gag(plus_out_gag(Y)) → plus_out_gag(Y)
U5_gga(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_gga(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
ways_in_gga(Amount, .(s(C), Coins)) → U9_gga(Amount, C, Coins, =_in_ga(Amount))
U9_gga(Amount, C, Coins, =_out_ga(s(X4))) → U10_gga(Amount, Coins, plus_in_gag(Amount, s(C)))
U10_gga(Amount, Coins, plus_out_gag(s(X5))) → U11_gga(ways_in_gga(Amount, Coins))
U11_gga(ways_out_gga(N)) → ways_out_gga(N)
U6_gga(C, Coins, NewAmount, ways_out_gga(N1)) → U7_gga(N1, ways_in_gga(NewAmount, .(s(C), Coins)))
U7_gga(N1, ways_out_gga(N2)) → U8_gga(plus_in_gga(N1, N2))
plus_in_gga(0, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g) → plus_out_gga(X)
plus_in_gga(s(X), Y) → U3_gga(plus_in_gga(X, Y))
U3_gga(plus_out_gga(Z)) → plus_out_gga(s(Z))
U8_gga(plus_out_gga(N)) → ways_out_gga(N)

The set Q consists of the following terms:

ways_in_gga(x0, x1)
=_in_ga(x0)
U4_gga(x0, x1, x2, x3)
plus_in_gag(x0, x1)
nat_in_g(x0)
U1_g(x0)
U2_gag(x0, x1)
U3_gag(x0)
U5_gga(x0, x1, x2, x3)
U9_gga(x0, x1, x2, x3)
U10_gga(x0, x1, x2)
U11_gga(x0)
U6_gga(x0, x1, x2, x3)
U7_gga(x0, x1)
plus_in_gga(x0, x1)
U2_gga(x0, x1)
U3_gga(x0)
U8_gga(x0)

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

(73) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U5_GGA(Amount, C, Coins, plus_out_gag(NewAmount)) → WAYS_IN_GGA(Amount, Coins)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + x2   
POL(0) = 0   
POL(=_in_ga(x1)) = 1   
POL(=_out_ga(x1)) = 1   
POL(U10_gga(x1, x2, x3)) = 1   
POL(U11_gga(x1)) = 1   
POL(U1_g(x1)) = 0   
POL(U2_gag(x1, x2)) = 0   
POL(U2_gga(x1, x2)) = 0   
POL(U3_gag(x1)) = 1   
POL(U3_gga(x1)) = 0   
POL(U4_GGA(x1, x2, x3, x4)) = 1 + x3 + x4   
POL(U4_gga(x1, x2, x3, x4)) = 1   
POL(U5_GGA(x1, x2, x3, x4)) = 1 + x3 + x4   
POL(U5_gga(x1, x2, x3, x4)) = x4   
POL(U6_GGA(x1, x2, x3, x4)) = 1 + x2 + x4   
POL(U6_gga(x1, x2, x3, x4)) = 1   
POL(U7_gga(x1, x2)) = x2   
POL(U8_gga(x1)) = 1   
POL(U9_gga(x1, x2, x3, x4)) = 1   
POL(WAYS_IN_GGA(x1, x2)) = 1 + x2   
POL([]) = 0   
POL(nat_in_g(x1)) = 0   
POL(nat_out_g) = 0   
POL(plus_in_gag(x1, x2)) = 1   
POL(plus_in_gga(x1, x2)) = 0   
POL(plus_out_gag(x1)) = 1   
POL(plus_out_gga(x1)) = 0   
POL(s(x1)) = 0   
POL(ways_in_gga(x1, x2)) = 1   
POL(ways_out_gga(x1)) = 1   

The following usable rules [FROCOS05] were oriented:

ways_in_gga(0, X1) → ways_out_gga(s(0))
ways_in_gga(X2, []) → ways_out_gga(0)
ways_in_gga(Amount, .(s(C), Coins)) → U4_gga(Amount, C, Coins, =_in_ga(Amount))
ways_in_gga(Amount, .(s(C), Coins)) → U9_gga(Amount, C, Coins, =_in_ga(Amount))
=_in_ga(X) → =_out_ga(X)
plus_in_gag(s(X), s(Z)) → U3_gag(plus_in_gag(X, Z))
U4_gga(Amount, C, Coins, =_out_ga(s(X3))) → U5_gga(Amount, C, Coins, plus_in_gag(s(C), Amount))
U5_gga(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_gga(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
U9_gga(Amount, C, Coins, =_out_ga(s(X4))) → U10_gga(Amount, Coins, plus_in_gag(Amount, s(C)))
U10_gga(Amount, Coins, plus_out_gag(s(X5))) → U11_gga(ways_in_gga(Amount, Coins))
U11_gga(ways_out_gga(N)) → ways_out_gga(N)
U6_gga(C, Coins, NewAmount, ways_out_gga(N1)) → U7_gga(N1, ways_in_gga(NewAmount, .(s(C), Coins)))
U7_gga(N1, ways_out_gga(N2)) → U8_gga(plus_in_gga(N1, N2))
U3_gag(plus_out_gag(Y)) → plus_out_gag(Y)
U8_gga(plus_out_gga(N)) → ways_out_gga(N)

(74) Obligation:

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

U5_GGA(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_GGA(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
U6_GGA(C, Coins, NewAmount, ways_out_gga(N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U4_GGA(Amount, C, Coins, =_in_ga(Amount))
U4_GGA(Amount, C, Coins, =_out_ga(s(X3))) → U5_GGA(Amount, C, Coins, plus_in_gag(s(C), Amount))

The TRS R consists of the following rules:

ways_in_gga(0, X1) → ways_out_gga(s(0))
ways_in_gga(X2, []) → ways_out_gga(0)
ways_in_gga(Amount, .(s(C), Coins)) → U4_gga(Amount, C, Coins, =_in_ga(Amount))
=_in_ga(X) → =_out_ga(X)
U4_gga(Amount, C, Coins, =_out_ga(s(X3))) → U5_gga(Amount, C, Coins, plus_in_gag(s(C), Amount))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g
nat_in_g(s(X)) → U1_g(nat_in_g(X))
U1_g(nat_out_g) → nat_out_g
U2_gag(X, nat_out_g) → plus_out_gag(X)
plus_in_gag(s(X), s(Z)) → U3_gag(plus_in_gag(X, Z))
U3_gag(plus_out_gag(Y)) → plus_out_gag(Y)
U5_gga(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_gga(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
ways_in_gga(Amount, .(s(C), Coins)) → U9_gga(Amount, C, Coins, =_in_ga(Amount))
U9_gga(Amount, C, Coins, =_out_ga(s(X4))) → U10_gga(Amount, Coins, plus_in_gag(Amount, s(C)))
U10_gga(Amount, Coins, plus_out_gag(s(X5))) → U11_gga(ways_in_gga(Amount, Coins))
U11_gga(ways_out_gga(N)) → ways_out_gga(N)
U6_gga(C, Coins, NewAmount, ways_out_gga(N1)) → U7_gga(N1, ways_in_gga(NewAmount, .(s(C), Coins)))
U7_gga(N1, ways_out_gga(N2)) → U8_gga(plus_in_gga(N1, N2))
plus_in_gga(0, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g) → plus_out_gga(X)
plus_in_gga(s(X), Y) → U3_gga(plus_in_gga(X, Y))
U3_gga(plus_out_gga(Z)) → plus_out_gga(s(Z))
U8_gga(plus_out_gga(N)) → ways_out_gga(N)

The set Q consists of the following terms:

ways_in_gga(x0, x1)
=_in_ga(x0)
U4_gga(x0, x1, x2, x3)
plus_in_gag(x0, x1)
nat_in_g(x0)
U1_g(x0)
U2_gag(x0, x1)
U3_gag(x0)
U5_gga(x0, x1, x2, x3)
U9_gga(x0, x1, x2, x3)
U10_gga(x0, x1, x2)
U11_gga(x0)
U6_gga(x0, x1, x2, x3)
U7_gga(x0, x1)
plus_in_gga(x0, x1)
U2_gga(x0, x1)
U3_gga(x0)
U8_gga(x0)

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

(75) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U6_GGA(C, Coins, NewAmount, ways_out_gga(N1)) → WAYS_IN_GGA(NewAmount, .(s(C), Coins))
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:

POL(U5_GGA(x1, x2, x3, x4)) = 0 +
[0,0]
·x1 +
[0,0]
·x2 +
[0,0]
·x3 +
[1,0]
·x4

POL(plus_out_gag(x1)) =
/1\
\0/
+
/10\
\10/
·x1

POL(U6_GGA(x1, x2, x3, x4)) = 1 +
[0,0]
·x1 +
[0,0]
·x2 +
[1,0]
·x3 +
[0,0]
·x4

POL(ways_in_gga(x1, x2)) =
/0\
\0/
+
/00\
\00/
·x1 +
/11\
\10/
·x2

POL(ways_out_gga(x1)) =
/0\
\0/
+
/10\
\10/
·x1

POL(WAYS_IN_GGA(x1, x2)) = 0 +
[1,0]
·x1 +
[0,0]
·x2

POL(.(x1, x2)) =
/0\
\0/
+
/00\
\00/
·x1 +
/00\
\00/
·x2

POL(s(x1)) =
/1\
\0/
+
/10\
\00/
·x1

POL(U4_GGA(x1, x2, x3, x4)) = 0 +
[1,0]
·x1 +
[0,0]
·x2 +
[0,0]
·x3 +
[0,0]
·x4

POL(=_in_ga(x1)) =
/0\
\1/
+
/00\
\11/
·x1

POL(=_out_ga(x1)) =
/0\
\0/
+
/10\
\00/
·x1

POL(plus_in_gag(x1, x2)) =
/0\
\0/
+
/01\
\00/
·x1 +
/10\
\10/
·x2

POL(0) =
/0\
\1/

POL([]) =
/0\
\0/

POL(U4_gga(x1, x2, x3, x4)) =
/1\
\1/
+
/10\
\00/
·x1 +
/11\
\10/
·x2 +
/01\
\11/
·x3 +
/00\
\00/
·x4

POL(U9_gga(x1, x2, x3, x4)) =
/0\
\0/
+
/00\
\00/
·x1 +
/01\
\11/
·x2 +
/11\
\10/
·x3 +
/00\
\00/
·x4

POL(U3_gag(x1)) =
/1\
\0/
+
/01\
\01/
·x1

POL(U5_gga(x1, x2, x3, x4)) =
/0\
\0/
+
/11\
\10/
·x1 +
/00\
\00/
·x2 +
/10\
\01/
·x3 +
/01\
\00/
·x4

POL(U6_gga(x1, x2, x3, x4)) =
/0\
\0/
+
/10\
\11/
·x1 +
/00\
\11/
·x2 +
/01\
\10/
·x3 +
/00\
\00/
·x4

POL(U10_gga(x1, x2, x3)) =
/0\
\0/
+
/00\
\10/
·x1 +
/10\
\01/
·x2 +
/00\
\00/
·x3

POL(U2_gag(x1, x2)) =
/0\
\0/
+
/10\
\10/
·x1 +
/10\
\00/
·x2

POL(nat_in_g(x1)) =
/1\
\0/
+
/00\
\00/
·x1

POL(U11_gga(x1)) =
/0\
\0/
+
/00\
\11/
·x1

POL(U7_gga(x1, x2)) =
/1\
\1/
+
/01\
\10/
·x1 +
/00\
\11/
·x2

POL(U8_gga(x1)) =
/1\
\0/
+
/10\
\10/
·x1

POL(plus_in_gga(x1, x2)) =
/1\
\0/
+
/10\
\10/
·x1 +
/10\
\10/
·x2

POL(nat_out_g) =
/1\
\0/

POL(U1_g(x1)) =
/1\
\0/
+
/00\
\00/
·x1

POL(U2_gga(x1, x2)) =
/0\
\1/
+
/01\
\01/
·x1 +
/00\
\10/
·x2

POL(U3_gga(x1)) =
/1\
\1/
+
/00\
\11/
·x1

POL(plus_out_gga(x1)) =
/0\
\0/
+
/01\
\10/
·x1

The following usable rules [FROCOS05] were oriented:

plus_in_gag(s(X), s(Z)) → U3_gag(plus_in_gag(X, Z))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
U3_gag(plus_out_gag(Y)) → plus_out_gag(Y)
nat_in_g(0) → nat_out_g
nat_in_g(s(X)) → U1_g(nat_in_g(X))
U2_gag(X, nat_out_g) → plus_out_gag(X)
U1_g(nat_out_g) → nat_out_g

(76) Obligation:

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

U5_GGA(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_GGA(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
WAYS_IN_GGA(Amount, .(s(C), Coins)) → U4_GGA(Amount, C, Coins, =_in_ga(Amount))
U4_GGA(Amount, C, Coins, =_out_ga(s(X3))) → U5_GGA(Amount, C, Coins, plus_in_gag(s(C), Amount))

The TRS R consists of the following rules:

ways_in_gga(0, X1) → ways_out_gga(s(0))
ways_in_gga(X2, []) → ways_out_gga(0)
ways_in_gga(Amount, .(s(C), Coins)) → U4_gga(Amount, C, Coins, =_in_ga(Amount))
=_in_ga(X) → =_out_ga(X)
U4_gga(Amount, C, Coins, =_out_ga(s(X3))) → U5_gga(Amount, C, Coins, plus_in_gag(s(C), Amount))
plus_in_gag(0, X) → U2_gag(X, nat_in_g(X))
nat_in_g(0) → nat_out_g
nat_in_g(s(X)) → U1_g(nat_in_g(X))
U1_g(nat_out_g) → nat_out_g
U2_gag(X, nat_out_g) → plus_out_gag(X)
plus_in_gag(s(X), s(Z)) → U3_gag(plus_in_gag(X, Z))
U3_gag(plus_out_gag(Y)) → plus_out_gag(Y)
U5_gga(Amount, C, Coins, plus_out_gag(NewAmount)) → U6_gga(C, Coins, NewAmount, ways_in_gga(Amount, Coins))
ways_in_gga(Amount, .(s(C), Coins)) → U9_gga(Amount, C, Coins, =_in_ga(Amount))
U9_gga(Amount, C, Coins, =_out_ga(s(X4))) → U10_gga(Amount, Coins, plus_in_gag(Amount, s(C)))
U10_gga(Amount, Coins, plus_out_gag(s(X5))) → U11_gga(ways_in_gga(Amount, Coins))
U11_gga(ways_out_gga(N)) → ways_out_gga(N)
U6_gga(C, Coins, NewAmount, ways_out_gga(N1)) → U7_gga(N1, ways_in_gga(NewAmount, .(s(C), Coins)))
U7_gga(N1, ways_out_gga(N2)) → U8_gga(plus_in_gga(N1, N2))
plus_in_gga(0, X) → U2_gga(X, nat_in_g(X))
U2_gga(X, nat_out_g) → plus_out_gga(X)
plus_in_gga(s(X), Y) → U3_gga(plus_in_gga(X, Y))
U3_gga(plus_out_gga(Z)) → plus_out_gga(s(Z))
U8_gga(plus_out_gga(N)) → ways_out_gga(N)

The set Q consists of the following terms:

ways_in_gga(x0, x1)
=_in_ga(x0)
U4_gga(x0, x1, x2, x3)
plus_in_gag(x0, x1)
nat_in_g(x0)
U1_g(x0)
U2_gag(x0, x1)
U3_gag(x0)
U5_gga(x0, x1, x2, x3)
U9_gga(x0, x1, x2, x3)
U10_gga(x0, x1, x2)
U11_gga(x0)
U6_gga(x0, x1, x2, x3)
U7_gga(x0, x1)
plus_in_gga(x0, x1)
U2_gga(x0, x1)
U3_gga(x0)
U8_gga(x0)

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

(77) DependencyGraphProof (EQUIVALENT transformation)

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

(78) TRUE