(0) Obligation:

Clauses:

rev([], []).
rev(.(X, Xs), Ys) :- ','(rev(Xs, Zs), app(Zs, .(X, []), Ys)).
app([], X, X).
app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs).

Queries:

rev(g,a).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

rev23(.(T28, T29), X56) :- rev23(T29, X55).
rev23(.(T28, T29), X56) :- ','(revc23(T29, T30), app34(T30, T28, X56)).
app34(.(T44, T45), T46, .(T44, X82)) :- app34(T45, T46, X82).
app44(.(T69, T70), T71, .(T69, T73)) :- app44(T70, T71, T73).
rev1(.(T6, .(T21, T22)), T9) :- rev23(T22, X38).
rev1(.(T6, .(T21, T22)), T9) :- ','(revc23(T22, T23), app34(T23, T21, X39)).
rev1(.(T6, .(T21, T22)), T9) :- ','(revc23(T22, T23), ','(appc34(T23, T21, T51), app44(T51, T6, T9))).

Clauses:

revc23([], []).
revc23(.(T28, T29), X56) :- ','(revc23(T29, T30), appc34(T30, T28, X56)).
appc34([], T37, .(T37, [])).
appc34(.(T44, T45), T46, .(T44, X82)) :- appc34(T45, T46, X82).
appc44([], T60, .(T60, [])).
appc44(.(T69, T70), T71, .(T69, T73)) :- appc44(T70, T71, T73).

Afs:

rev1(x1, x2)  =  rev1(x1)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
rev1_in: (b,f)
rev23_in: (b,f)
revc23_in: (b,f)
appc34_in: (b,b,f)
app34_in: (b,b,f)
app44_in: (b,b,f)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

REV1_IN_GA(.(T6, .(T21, T22)), T9) → U6_GA(T6, T21, T22, T9, rev23_in_ga(T22, X38))
REV1_IN_GA(.(T6, .(T21, T22)), T9) → REV23_IN_GA(T22, X38)
REV23_IN_GA(.(T28, T29), X56) → U1_GA(T28, T29, X56, rev23_in_ga(T29, X55))
REV23_IN_GA(.(T28, T29), X56) → REV23_IN_GA(T29, X55)
REV23_IN_GA(.(T28, T29), X56) → U2_GA(T28, T29, X56, revc23_in_ga(T29, T30))
U2_GA(T28, T29, X56, revc23_out_ga(T29, T30)) → U3_GA(T28, T29, X56, app34_in_gga(T30, T28, X56))
U2_GA(T28, T29, X56, revc23_out_ga(T29, T30)) → APP34_IN_GGA(T30, T28, X56)
APP34_IN_GGA(.(T44, T45), T46, .(T44, X82)) → U4_GGA(T44, T45, T46, X82, app34_in_gga(T45, T46, X82))
APP34_IN_GGA(.(T44, T45), T46, .(T44, X82)) → APP34_IN_GGA(T45, T46, X82)
REV1_IN_GA(.(T6, .(T21, T22)), T9) → U7_GA(T6, T21, T22, T9, revc23_in_ga(T22, T23))
U7_GA(T6, T21, T22, T9, revc23_out_ga(T22, T23)) → U8_GA(T6, T21, T22, T9, app34_in_gga(T23, T21, X39))
U7_GA(T6, T21, T22, T9, revc23_out_ga(T22, T23)) → APP34_IN_GGA(T23, T21, X39)
U7_GA(T6, T21, T22, T9, revc23_out_ga(T22, T23)) → U9_GA(T6, T21, T22, T9, appc34_in_gga(T23, T21, T51))
U9_GA(T6, T21, T22, T9, appc34_out_gga(T23, T21, T51)) → U10_GA(T6, T21, T22, T9, app44_in_gga(T51, T6, T9))
U9_GA(T6, T21, T22, T9, appc34_out_gga(T23, T21, T51)) → APP44_IN_GGA(T51, T6, T9)
APP44_IN_GGA(.(T69, T70), T71, .(T69, T73)) → U5_GGA(T69, T70, T71, T73, app44_in_gga(T70, T71, T73))
APP44_IN_GGA(.(T69, T70), T71, .(T69, T73)) → APP44_IN_GGA(T70, T71, T73)

The TRS R consists of the following rules:

revc23_in_ga([], []) → revc23_out_ga([], [])
revc23_in_ga(.(T28, T29), X56) → U12_ga(T28, T29, X56, revc23_in_ga(T29, T30))
U12_ga(T28, T29, X56, revc23_out_ga(T29, T30)) → U13_ga(T28, T29, X56, appc34_in_gga(T30, T28, X56))
appc34_in_gga([], T37, .(T37, [])) → appc34_out_gga([], T37, .(T37, []))
appc34_in_gga(.(T44, T45), T46, .(T44, X82)) → U14_gga(T44, T45, T46, X82, appc34_in_gga(T45, T46, X82))
U14_gga(T44, T45, T46, X82, appc34_out_gga(T45, T46, X82)) → appc34_out_gga(.(T44, T45), T46, .(T44, X82))
U13_ga(T28, T29, X56, appc34_out_gga(T30, T28, X56)) → revc23_out_ga(.(T28, T29), X56)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
rev23_in_ga(x1, x2)  =  rev23_in_ga(x1)
revc23_in_ga(x1, x2)  =  revc23_in_ga(x1)
[]  =  []
revc23_out_ga(x1, x2)  =  revc23_out_ga(x1, x2)
U12_ga(x1, x2, x3, x4)  =  U12_ga(x1, x2, x4)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x2, x4)
appc34_in_gga(x1, x2, x3)  =  appc34_in_gga(x1, x2)
appc34_out_gga(x1, x2, x3)  =  appc34_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4, x5)  =  U14_gga(x1, x2, x3, x5)
app34_in_gga(x1, x2, x3)  =  app34_in_gga(x1, x2)
app44_in_gga(x1, x2, x3)  =  app44_in_gga(x1, x2)
REV1_IN_GA(x1, x2)  =  REV1_IN_GA(x1)
U6_GA(x1, x2, x3, x4, x5)  =  U6_GA(x1, x2, x3, x5)
REV23_IN_GA(x1, x2)  =  REV23_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x2, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x2, x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x2, x4)
APP34_IN_GGA(x1, x2, x3)  =  APP34_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x2, x3, x5)
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x1, x2, x3, x5)
U8_GA(x1, x2, x3, x4, x5)  =  U8_GA(x1, x2, x3, x5)
U9_GA(x1, x2, x3, x4, x5)  =  U9_GA(x1, x2, x3, x5)
U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x1, x2, x3, x5)
APP44_IN_GGA(x1, x2, x3)  =  APP44_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4, x5)  =  U5_GGA(x1, x2, x3, x5)

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

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

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

REV1_IN_GA(.(T6, .(T21, T22)), T9) → U6_GA(T6, T21, T22, T9, rev23_in_ga(T22, X38))
REV1_IN_GA(.(T6, .(T21, T22)), T9) → REV23_IN_GA(T22, X38)
REV23_IN_GA(.(T28, T29), X56) → U1_GA(T28, T29, X56, rev23_in_ga(T29, X55))
REV23_IN_GA(.(T28, T29), X56) → REV23_IN_GA(T29, X55)
REV23_IN_GA(.(T28, T29), X56) → U2_GA(T28, T29, X56, revc23_in_ga(T29, T30))
U2_GA(T28, T29, X56, revc23_out_ga(T29, T30)) → U3_GA(T28, T29, X56, app34_in_gga(T30, T28, X56))
U2_GA(T28, T29, X56, revc23_out_ga(T29, T30)) → APP34_IN_GGA(T30, T28, X56)
APP34_IN_GGA(.(T44, T45), T46, .(T44, X82)) → U4_GGA(T44, T45, T46, X82, app34_in_gga(T45, T46, X82))
APP34_IN_GGA(.(T44, T45), T46, .(T44, X82)) → APP34_IN_GGA(T45, T46, X82)
REV1_IN_GA(.(T6, .(T21, T22)), T9) → U7_GA(T6, T21, T22, T9, revc23_in_ga(T22, T23))
U7_GA(T6, T21, T22, T9, revc23_out_ga(T22, T23)) → U8_GA(T6, T21, T22, T9, app34_in_gga(T23, T21, X39))
U7_GA(T6, T21, T22, T9, revc23_out_ga(T22, T23)) → APP34_IN_GGA(T23, T21, X39)
U7_GA(T6, T21, T22, T9, revc23_out_ga(T22, T23)) → U9_GA(T6, T21, T22, T9, appc34_in_gga(T23, T21, T51))
U9_GA(T6, T21, T22, T9, appc34_out_gga(T23, T21, T51)) → U10_GA(T6, T21, T22, T9, app44_in_gga(T51, T6, T9))
U9_GA(T6, T21, T22, T9, appc34_out_gga(T23, T21, T51)) → APP44_IN_GGA(T51, T6, T9)
APP44_IN_GGA(.(T69, T70), T71, .(T69, T73)) → U5_GGA(T69, T70, T71, T73, app44_in_gga(T70, T71, T73))
APP44_IN_GGA(.(T69, T70), T71, .(T69, T73)) → APP44_IN_GGA(T70, T71, T73)

The TRS R consists of the following rules:

revc23_in_ga([], []) → revc23_out_ga([], [])
revc23_in_ga(.(T28, T29), X56) → U12_ga(T28, T29, X56, revc23_in_ga(T29, T30))
U12_ga(T28, T29, X56, revc23_out_ga(T29, T30)) → U13_ga(T28, T29, X56, appc34_in_gga(T30, T28, X56))
appc34_in_gga([], T37, .(T37, [])) → appc34_out_gga([], T37, .(T37, []))
appc34_in_gga(.(T44, T45), T46, .(T44, X82)) → U14_gga(T44, T45, T46, X82, appc34_in_gga(T45, T46, X82))
U14_gga(T44, T45, T46, X82, appc34_out_gga(T45, T46, X82)) → appc34_out_gga(.(T44, T45), T46, .(T44, X82))
U13_ga(T28, T29, X56, appc34_out_gga(T30, T28, X56)) → revc23_out_ga(.(T28, T29), X56)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
rev23_in_ga(x1, x2)  =  rev23_in_ga(x1)
revc23_in_ga(x1, x2)  =  revc23_in_ga(x1)
[]  =  []
revc23_out_ga(x1, x2)  =  revc23_out_ga(x1, x2)
U12_ga(x1, x2, x3, x4)  =  U12_ga(x1, x2, x4)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x2, x4)
appc34_in_gga(x1, x2, x3)  =  appc34_in_gga(x1, x2)
appc34_out_gga(x1, x2, x3)  =  appc34_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4, x5)  =  U14_gga(x1, x2, x3, x5)
app34_in_gga(x1, x2, x3)  =  app34_in_gga(x1, x2)
app44_in_gga(x1, x2, x3)  =  app44_in_gga(x1, x2)
REV1_IN_GA(x1, x2)  =  REV1_IN_GA(x1)
U6_GA(x1, x2, x3, x4, x5)  =  U6_GA(x1, x2, x3, x5)
REV23_IN_GA(x1, x2)  =  REV23_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x2, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x2, x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x2, x4)
APP34_IN_GGA(x1, x2, x3)  =  APP34_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x2, x3, x5)
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x1, x2, x3, x5)
U8_GA(x1, x2, x3, x4, x5)  =  U8_GA(x1, x2, x3, x5)
U9_GA(x1, x2, x3, x4, x5)  =  U9_GA(x1, x2, x3, x5)
U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x1, x2, x3, x5)
APP44_IN_GGA(x1, x2, x3)  =  APP44_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4, x5)  =  U5_GGA(x1, x2, x3, x5)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

APP44_IN_GGA(.(T69, T70), T71, .(T69, T73)) → APP44_IN_GGA(T70, T71, T73)

The TRS R consists of the following rules:

revc23_in_ga([], []) → revc23_out_ga([], [])
revc23_in_ga(.(T28, T29), X56) → U12_ga(T28, T29, X56, revc23_in_ga(T29, T30))
U12_ga(T28, T29, X56, revc23_out_ga(T29, T30)) → U13_ga(T28, T29, X56, appc34_in_gga(T30, T28, X56))
appc34_in_gga([], T37, .(T37, [])) → appc34_out_gga([], T37, .(T37, []))
appc34_in_gga(.(T44, T45), T46, .(T44, X82)) → U14_gga(T44, T45, T46, X82, appc34_in_gga(T45, T46, X82))
U14_gga(T44, T45, T46, X82, appc34_out_gga(T45, T46, X82)) → appc34_out_gga(.(T44, T45), T46, .(T44, X82))
U13_ga(T28, T29, X56, appc34_out_gga(T30, T28, X56)) → revc23_out_ga(.(T28, T29), X56)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
revc23_in_ga(x1, x2)  =  revc23_in_ga(x1)
[]  =  []
revc23_out_ga(x1, x2)  =  revc23_out_ga(x1, x2)
U12_ga(x1, x2, x3, x4)  =  U12_ga(x1, x2, x4)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x2, x4)
appc34_in_gga(x1, x2, x3)  =  appc34_in_gga(x1, x2)
appc34_out_gga(x1, x2, x3)  =  appc34_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4, x5)  =  U14_gga(x1, x2, x3, x5)
APP44_IN_GGA(x1, x2, x3)  =  APP44_IN_GGA(x1, x2)

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

(8) UsableRulesProof (EQUIVALENT transformation)

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

(9) Obligation:

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

APP44_IN_GGA(.(T69, T70), T71, .(T69, T73)) → APP44_IN_GGA(T70, T71, T73)

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

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

(10) PiDPToQDPProof (SOUND transformation)

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

(11) Obligation:

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

APP44_IN_GGA(.(T69, T70), T71) → APP44_IN_GGA(T70, T71)

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

(12) QDPSizeChangeProof (EQUIVALENT transformation)

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

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

  • APP44_IN_GGA(.(T69, T70), T71) → APP44_IN_GGA(T70, T71)
    The graph contains the following edges 1 > 1, 2 >= 2

(13) YES

(14) Obligation:

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

APP34_IN_GGA(.(T44, T45), T46, .(T44, X82)) → APP34_IN_GGA(T45, T46, X82)

The TRS R consists of the following rules:

revc23_in_ga([], []) → revc23_out_ga([], [])
revc23_in_ga(.(T28, T29), X56) → U12_ga(T28, T29, X56, revc23_in_ga(T29, T30))
U12_ga(T28, T29, X56, revc23_out_ga(T29, T30)) → U13_ga(T28, T29, X56, appc34_in_gga(T30, T28, X56))
appc34_in_gga([], T37, .(T37, [])) → appc34_out_gga([], T37, .(T37, []))
appc34_in_gga(.(T44, T45), T46, .(T44, X82)) → U14_gga(T44, T45, T46, X82, appc34_in_gga(T45, T46, X82))
U14_gga(T44, T45, T46, X82, appc34_out_gga(T45, T46, X82)) → appc34_out_gga(.(T44, T45), T46, .(T44, X82))
U13_ga(T28, T29, X56, appc34_out_gga(T30, T28, X56)) → revc23_out_ga(.(T28, T29), X56)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
revc23_in_ga(x1, x2)  =  revc23_in_ga(x1)
[]  =  []
revc23_out_ga(x1, x2)  =  revc23_out_ga(x1, x2)
U12_ga(x1, x2, x3, x4)  =  U12_ga(x1, x2, x4)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x2, x4)
appc34_in_gga(x1, x2, x3)  =  appc34_in_gga(x1, x2)
appc34_out_gga(x1, x2, x3)  =  appc34_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4, x5)  =  U14_gga(x1, x2, x3, x5)
APP34_IN_GGA(x1, x2, x3)  =  APP34_IN_GGA(x1, x2)

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

(15) UsableRulesProof (EQUIVALENT transformation)

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

(16) Obligation:

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

APP34_IN_GGA(.(T44, T45), T46, .(T44, X82)) → APP34_IN_GGA(T45, T46, X82)

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

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

(17) PiDPToQDPProof (SOUND transformation)

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

(18) Obligation:

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

APP34_IN_GGA(.(T44, T45), T46) → APP34_IN_GGA(T45, T46)

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

(19) QDPSizeChangeProof (EQUIVALENT transformation)

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

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

  • APP34_IN_GGA(.(T44, T45), T46) → APP34_IN_GGA(T45, T46)
    The graph contains the following edges 1 > 1, 2 >= 2

(20) YES

(21) Obligation:

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

REV23_IN_GA(.(T28, T29), X56) → REV23_IN_GA(T29, X55)

The TRS R consists of the following rules:

revc23_in_ga([], []) → revc23_out_ga([], [])
revc23_in_ga(.(T28, T29), X56) → U12_ga(T28, T29, X56, revc23_in_ga(T29, T30))
U12_ga(T28, T29, X56, revc23_out_ga(T29, T30)) → U13_ga(T28, T29, X56, appc34_in_gga(T30, T28, X56))
appc34_in_gga([], T37, .(T37, [])) → appc34_out_gga([], T37, .(T37, []))
appc34_in_gga(.(T44, T45), T46, .(T44, X82)) → U14_gga(T44, T45, T46, X82, appc34_in_gga(T45, T46, X82))
U14_gga(T44, T45, T46, X82, appc34_out_gga(T45, T46, X82)) → appc34_out_gga(.(T44, T45), T46, .(T44, X82))
U13_ga(T28, T29, X56, appc34_out_gga(T30, T28, X56)) → revc23_out_ga(.(T28, T29), X56)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
revc23_in_ga(x1, x2)  =  revc23_in_ga(x1)
[]  =  []
revc23_out_ga(x1, x2)  =  revc23_out_ga(x1, x2)
U12_ga(x1, x2, x3, x4)  =  U12_ga(x1, x2, x4)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x2, x4)
appc34_in_gga(x1, x2, x3)  =  appc34_in_gga(x1, x2)
appc34_out_gga(x1, x2, x3)  =  appc34_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4, x5)  =  U14_gga(x1, x2, x3, x5)
REV23_IN_GA(x1, x2)  =  REV23_IN_GA(x1)

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

(22) UsableRulesProof (EQUIVALENT transformation)

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

(23) Obligation:

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

REV23_IN_GA(.(T28, T29), X56) → REV23_IN_GA(T29, X55)

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

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

(24) PiDPToQDPProof (SOUND transformation)

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

(25) Obligation:

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

REV23_IN_GA(.(T28, T29)) → REV23_IN_GA(T29)

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

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

  • REV23_IN_GA(.(T28, T29)) → REV23_IN_GA(T29)
    The graph contains the following edges 1 > 1

(27) YES