(0) Obligation:
Clauses:
flat([], []).
flat(.([], T), R) :- flat(T, R).
flat(.(.(H, T), TT), .(H, R)) :- flat(.(T, TT), R).
Queries:
flat(a,g).
(1) PrologToDTProblemTransformerProof (SOUND transformation)
Built DT problem from termination graph.
(2) Obligation:
Triples:
flat16(.([], T17)) :- flat16(T17).
flat1(.([], .([], T11)), []) :- flat16(T11).
flat1(.([], .([], T45)), T44) :- flat1(T45, T44).
flat1(.([], .(.(T62, T66), T67)), .(T62, T65)) :- flat1(.(T66, T67), T65).
flat1(.(.(T78, T82), T83), .(T78, T81)) :- flat1(.(T82, T83), T81).
flat1(.(.(T90, []), T106), .(T90, T105)) :- flat1(T106, T105).
flat1(.(.(T90, .(T115, T119)), T120), .(T90, .(T115, T118))) :- flat1(.(T119, T120), T118).
Clauses:
flatc16([]).
flatc16(.([], T17)) :- flatc16(T17).
flatc1([], []).
flatc1(.([], []), []).
flatc1(.([], .([], T11)), []) :- flatc16(T11).
flatc1(.([], []), []).
flatc1(.([], .([], T45)), T44) :- flatc1(T45, T44).
flatc1(.([], .(.(T62, T66), T67)), .(T62, T65)) :- flatc1(.(T66, T67), T65).
flatc1(.(.(T78, T82), T83), .(T78, T81)) :- flatc1(.(T82, T83), T81).
flatc1(.(.(T90, []), T106), .(T90, T105)) :- flatc1(T106, T105).
flatc1(.(.(T90, .(T115, T119)), T120), .(T90, .(T115, T118))) :- flatc1(.(T119, T120), T118).
Afs:
flat1(x1, x2) = flat1(x2)
(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:
flat1_in: (f,b)
flat16_in: (f)
Transforming
TRIPLES into the following
Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:
FLAT1_IN_AG(.([], .([], T11)), []) → U2_AG(T11, flat16_in_a(T11))
FLAT1_IN_AG(.([], .([], T11)), []) → FLAT16_IN_A(T11)
FLAT16_IN_A(.([], T17)) → U1_A(T17, flat16_in_a(T17))
FLAT16_IN_A(.([], T17)) → FLAT16_IN_A(T17)
FLAT1_IN_AG(.([], .([], T45)), T44) → U3_AG(T45, T44, flat1_in_ag(T45, T44))
FLAT1_IN_AG(.([], .([], T45)), T44) → FLAT1_IN_AG(T45, T44)
FLAT1_IN_AG(.([], .(.(T62, T66), T67)), .(T62, T65)) → U4_AG(T62, T66, T67, T65, flat1_in_ag(.(T66, T67), T65))
FLAT1_IN_AG(.([], .(.(T62, T66), T67)), .(T62, T65)) → FLAT1_IN_AG(.(T66, T67), T65)
FLAT1_IN_AG(.(.(T78, T82), T83), .(T78, T81)) → U5_AG(T78, T82, T83, T81, flat1_in_ag(.(T82, T83), T81))
FLAT1_IN_AG(.(.(T78, T82), T83), .(T78, T81)) → FLAT1_IN_AG(.(T82, T83), T81)
FLAT1_IN_AG(.(.(T90, []), T106), .(T90, T105)) → U6_AG(T90, T106, T105, flat1_in_ag(T106, T105))
FLAT1_IN_AG(.(.(T90, []), T106), .(T90, T105)) → FLAT1_IN_AG(T106, T105)
FLAT1_IN_AG(.(.(T90, .(T115, T119)), T120), .(T90, .(T115, T118))) → U7_AG(T90, T115, T119, T120, T118, flat1_in_ag(.(T119, T120), T118))
FLAT1_IN_AG(.(.(T90, .(T115, T119)), T120), .(T90, .(T115, T118))) → FLAT1_IN_AG(.(T119, T120), T118)
R is empty.
The argument filtering Pi contains the following mapping:
flat1_in_ag(
x1,
x2) =
flat1_in_ag(
x2)
[] =
[]
flat16_in_a(
x1) =
flat16_in_a
.(
x1,
x2) =
.(
x1,
x2)
FLAT1_IN_AG(
x1,
x2) =
FLAT1_IN_AG(
x2)
U2_AG(
x1,
x2) =
U2_AG(
x2)
FLAT16_IN_A(
x1) =
FLAT16_IN_A
U1_A(
x1,
x2) =
U1_A(
x2)
U3_AG(
x1,
x2,
x3) =
U3_AG(
x2,
x3)
U4_AG(
x1,
x2,
x3,
x4,
x5) =
U4_AG(
x1,
x4,
x5)
U5_AG(
x1,
x2,
x3,
x4,
x5) =
U5_AG(
x1,
x4,
x5)
U6_AG(
x1,
x2,
x3,
x4) =
U6_AG(
x1,
x3,
x4)
U7_AG(
x1,
x2,
x3,
x4,
x5,
x6) =
U7_AG(
x1,
x2,
x5,
x6)
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:
FLAT1_IN_AG(.([], .([], T11)), []) → U2_AG(T11, flat16_in_a(T11))
FLAT1_IN_AG(.([], .([], T11)), []) → FLAT16_IN_A(T11)
FLAT16_IN_A(.([], T17)) → U1_A(T17, flat16_in_a(T17))
FLAT16_IN_A(.([], T17)) → FLAT16_IN_A(T17)
FLAT1_IN_AG(.([], .([], T45)), T44) → U3_AG(T45, T44, flat1_in_ag(T45, T44))
FLAT1_IN_AG(.([], .([], T45)), T44) → FLAT1_IN_AG(T45, T44)
FLAT1_IN_AG(.([], .(.(T62, T66), T67)), .(T62, T65)) → U4_AG(T62, T66, T67, T65, flat1_in_ag(.(T66, T67), T65))
FLAT1_IN_AG(.([], .(.(T62, T66), T67)), .(T62, T65)) → FLAT1_IN_AG(.(T66, T67), T65)
FLAT1_IN_AG(.(.(T78, T82), T83), .(T78, T81)) → U5_AG(T78, T82, T83, T81, flat1_in_ag(.(T82, T83), T81))
FLAT1_IN_AG(.(.(T78, T82), T83), .(T78, T81)) → FLAT1_IN_AG(.(T82, T83), T81)
FLAT1_IN_AG(.(.(T90, []), T106), .(T90, T105)) → U6_AG(T90, T106, T105, flat1_in_ag(T106, T105))
FLAT1_IN_AG(.(.(T90, []), T106), .(T90, T105)) → FLAT1_IN_AG(T106, T105)
FLAT1_IN_AG(.(.(T90, .(T115, T119)), T120), .(T90, .(T115, T118))) → U7_AG(T90, T115, T119, T120, T118, flat1_in_ag(.(T119, T120), T118))
FLAT1_IN_AG(.(.(T90, .(T115, T119)), T120), .(T90, .(T115, T118))) → FLAT1_IN_AG(.(T119, T120), T118)
R is empty.
The argument filtering Pi contains the following mapping:
flat1_in_ag(
x1,
x2) =
flat1_in_ag(
x2)
[] =
[]
flat16_in_a(
x1) =
flat16_in_a
.(
x1,
x2) =
.(
x1,
x2)
FLAT1_IN_AG(
x1,
x2) =
FLAT1_IN_AG(
x2)
U2_AG(
x1,
x2) =
U2_AG(
x2)
FLAT16_IN_A(
x1) =
FLAT16_IN_A
U1_A(
x1,
x2) =
U1_A(
x2)
U3_AG(
x1,
x2,
x3) =
U3_AG(
x2,
x3)
U4_AG(
x1,
x2,
x3,
x4,
x5) =
U4_AG(
x1,
x4,
x5)
U5_AG(
x1,
x2,
x3,
x4,
x5) =
U5_AG(
x1,
x4,
x5)
U6_AG(
x1,
x2,
x3,
x4) =
U6_AG(
x1,
x3,
x4)
U7_AG(
x1,
x2,
x3,
x4,
x5,
x6) =
U7_AG(
x1,
x2,
x5,
x6)
We have to consider all (P,R,Pi)-chains
(5) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 8 less nodes.
(6) Complex Obligation (AND)
(7) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
FLAT16_IN_A(.([], T17)) → FLAT16_IN_A(T17)
R is empty.
The argument filtering Pi contains the following mapping:
[] =
[]
.(
x1,
x2) =
.(
x1,
x2)
FLAT16_IN_A(
x1) =
FLAT16_IN_A
We have to consider all (P,R,Pi)-chains
(8) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(9) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FLAT16_IN_A → FLAT16_IN_A
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(10) NonTerminationProof (EQUIVALENT transformation)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.
s =
FLAT16_IN_A evaluates to t =
FLAT16_IN_AThus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Matcher: [ ]
- Semiunifier: [ ]
Rewriting sequenceThe DP semiunifies directly so there is only one rewrite step from FLAT16_IN_A to FLAT16_IN_A.
(11) NO
(12) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
FLAT1_IN_AG(.([], .(.(T62, T66), T67)), .(T62, T65)) → FLAT1_IN_AG(.(T66, T67), T65)
FLAT1_IN_AG(.([], .([], T45)), T44) → FLAT1_IN_AG(T45, T44)
FLAT1_IN_AG(.(.(T78, T82), T83), .(T78, T81)) → FLAT1_IN_AG(.(T82, T83), T81)
FLAT1_IN_AG(.(.(T90, []), T106), .(T90, T105)) → FLAT1_IN_AG(T106, T105)
FLAT1_IN_AG(.(.(T90, .(T115, T119)), T120), .(T90, .(T115, T118))) → FLAT1_IN_AG(.(T119, T120), T118)
R is empty.
The argument filtering Pi contains the following mapping:
[] =
[]
.(
x1,
x2) =
.(
x1,
x2)
FLAT1_IN_AG(
x1,
x2) =
FLAT1_IN_AG(
x2)
We have to consider all (P,R,Pi)-chains
(13) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(14) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FLAT1_IN_AG(.(T62, T65)) → FLAT1_IN_AG(T65)
FLAT1_IN_AG(T44) → FLAT1_IN_AG(T44)
FLAT1_IN_AG(.(T90, .(T115, T118))) → FLAT1_IN_AG(T118)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(15) UsableRulesReductionPairsProof (EQUIVALENT transformation)
By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.
The following dependency pairs can be deleted:
FLAT1_IN_AG(.(T62, T65)) → FLAT1_IN_AG(T65)
FLAT1_IN_AG(.(T90, .(T115, T118))) → FLAT1_IN_AG(T118)
No rules are removed from R.
Used ordering: POLO with Polynomial interpretation [POLO]:
POL(.(x1, x2)) = x1 + 2·x2
POL(FLAT1_IN_AG(x1)) = 2·x1
(16) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FLAT1_IN_AG(T44) → FLAT1_IN_AG(T44)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(17) NonTerminationProof (EQUIVALENT transformation)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.
s =
FLAT1_IN_AG(
T44) evaluates to t =
FLAT1_IN_AG(
T44)
Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Semiunifier: [ ]
- Matcher: [ ]
Rewriting sequenceThe DP semiunifies directly so there is only one rewrite step from FLAT1_IN_AG(T44) to FLAT1_IN_AG(T44).
(18) NO