(0) Obligation:
Clauses:
map([], L) :- ','(!, eq(L, [])).
map(X, .(Y, Ys)) :- ','(head(X, H), ','(tail(X, T), ','(p(H, Y), map(T, Ys)))).
head([], X1).
head(.(H, X2), H).
tail([], []).
tail(.(X3, T), T).
p(X, Y).
eq(X, X).
Queries:
map(g,a).
(1) CutEliminatorProof (SOUND transformation)
Eliminated all cuts by simply ignoring them[PROLOG].
(2) Obligation:
Clauses:
map([], L) :- eq(L, []).
map(X, .(Y, Ys)) :- ','(head(X, H), ','(tail(X, T), ','(p(H, Y), map(T, Ys)))).
head([], X1).
head(.(H, X2), H).
tail([], []).
tail(.(X3, T), T).
p(X, Y).
eq(X, X).
Queries:
map(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:
map_in: (b,f)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
map_in_ga([], L) → U1_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, [])) → map_out_ga([], L)
map_in_ga(X, .(Y, Ys)) → U2_ga(X, Y, Ys, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
U2_ga(X, Y, Ys, head_out_ga(X, H)) → U3_ga(X, Y, Ys, H, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
U3_ga(X, Y, Ys, H, tail_out_ga(X, T)) → U4_ga(X, Y, Ys, H, T, p_in_aa(H, Y))
p_in_aa(X, Y) → p_out_aa(X, Y)
U4_ga(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_ga(X, Y, Ys, map_in_ga(T, Ys))
U5_ga(X, Y, Ys, map_out_ga(T, Ys)) → map_out_ga(X, .(Y, Ys))
The argument filtering Pi contains the following mapping:
map_in_ga(
x1,
x2) =
map_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1)
map_out_ga(
x1,
x2) =
map_out_ga(
x2)
U2_ga(
x1,
x2,
x3,
x4) =
U2_ga(
x1,
x4)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x2)
U3_ga(
x1,
x2,
x3,
x4,
x5) =
U3_ga(
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
U4_ga(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_ga(
x5,
x6)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
U5_ga(
x1,
x2,
x3,
x4) =
U5_ga(
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:
map_in_ga([], L) → U1_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, [])) → map_out_ga([], L)
map_in_ga(X, .(Y, Ys)) → U2_ga(X, Y, Ys, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
U2_ga(X, Y, Ys, head_out_ga(X, H)) → U3_ga(X, Y, Ys, H, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
U3_ga(X, Y, Ys, H, tail_out_ga(X, T)) → U4_ga(X, Y, Ys, H, T, p_in_aa(H, Y))
p_in_aa(X, Y) → p_out_aa(X, Y)
U4_ga(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_ga(X, Y, Ys, map_in_ga(T, Ys))
U5_ga(X, Y, Ys, map_out_ga(T, Ys)) → map_out_ga(X, .(Y, Ys))
The argument filtering Pi contains the following mapping:
map_in_ga(
x1,
x2) =
map_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1)
map_out_ga(
x1,
x2) =
map_out_ga(
x2)
U2_ga(
x1,
x2,
x3,
x4) =
U2_ga(
x1,
x4)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x2)
U3_ga(
x1,
x2,
x3,
x4,
x5) =
U3_ga(
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
U4_ga(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_ga(
x5,
x6)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
U5_ga(
x1,
x2,
x3,
x4) =
U5_ga(
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:
MAP_IN_GA([], L) → U1_GA(L, eq_in_ag(L, []))
MAP_IN_GA([], L) → EQ_IN_AG(L, [])
MAP_IN_GA(X, .(Y, Ys)) → U2_GA(X, Y, Ys, head_in_ga(X, H))
MAP_IN_GA(X, .(Y, Ys)) → HEAD_IN_GA(X, H)
U2_GA(X, Y, Ys, head_out_ga(X, H)) → U3_GA(X, Y, Ys, H, tail_in_ga(X, T))
U2_GA(X, Y, Ys, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → U4_GA(X, Y, Ys, H, T, p_in_aa(H, Y))
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → P_IN_AA(H, Y)
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_GA(X, Y, Ys, map_in_ga(T, Ys))
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → MAP_IN_GA(T, Ys)
The TRS R consists of the following rules:
map_in_ga([], L) → U1_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, [])) → map_out_ga([], L)
map_in_ga(X, .(Y, Ys)) → U2_ga(X, Y, Ys, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
U2_ga(X, Y, Ys, head_out_ga(X, H)) → U3_ga(X, Y, Ys, H, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
U3_ga(X, Y, Ys, H, tail_out_ga(X, T)) → U4_ga(X, Y, Ys, H, T, p_in_aa(H, Y))
p_in_aa(X, Y) → p_out_aa(X, Y)
U4_ga(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_ga(X, Y, Ys, map_in_ga(T, Ys))
U5_ga(X, Y, Ys, map_out_ga(T, Ys)) → map_out_ga(X, .(Y, Ys))
The argument filtering Pi contains the following mapping:
map_in_ga(
x1,
x2) =
map_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1)
map_out_ga(
x1,
x2) =
map_out_ga(
x2)
U2_ga(
x1,
x2,
x3,
x4) =
U2_ga(
x1,
x4)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x2)
U3_ga(
x1,
x2,
x3,
x4,
x5) =
U3_ga(
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
U4_ga(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_ga(
x5,
x6)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
U5_ga(
x1,
x2,
x3,
x4) =
U5_ga(
x4)
MAP_IN_GA(
x1,
x2) =
MAP_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x2)
EQ_IN_AG(
x1,
x2) =
EQ_IN_AG(
x2)
U2_GA(
x1,
x2,
x3,
x4) =
U2_GA(
x1,
x4)
HEAD_IN_GA(
x1,
x2) =
HEAD_IN_GA(
x1)
U3_GA(
x1,
x2,
x3,
x4,
x5) =
U3_GA(
x5)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U4_GA(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_GA(
x5,
x6)
P_IN_AA(
x1,
x2) =
P_IN_AA
U5_GA(
x1,
x2,
x3,
x4) =
U5_GA(
x4)
We have to consider all (P,R,Pi)-chains
(6) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
MAP_IN_GA([], L) → U1_GA(L, eq_in_ag(L, []))
MAP_IN_GA([], L) → EQ_IN_AG(L, [])
MAP_IN_GA(X, .(Y, Ys)) → U2_GA(X, Y, Ys, head_in_ga(X, H))
MAP_IN_GA(X, .(Y, Ys)) → HEAD_IN_GA(X, H)
U2_GA(X, Y, Ys, head_out_ga(X, H)) → U3_GA(X, Y, Ys, H, tail_in_ga(X, T))
U2_GA(X, Y, Ys, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → U4_GA(X, Y, Ys, H, T, p_in_aa(H, Y))
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → P_IN_AA(H, Y)
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_GA(X, Y, Ys, map_in_ga(T, Ys))
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → MAP_IN_GA(T, Ys)
The TRS R consists of the following rules:
map_in_ga([], L) → U1_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, [])) → map_out_ga([], L)
map_in_ga(X, .(Y, Ys)) → U2_ga(X, Y, Ys, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
U2_ga(X, Y, Ys, head_out_ga(X, H)) → U3_ga(X, Y, Ys, H, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
U3_ga(X, Y, Ys, H, tail_out_ga(X, T)) → U4_ga(X, Y, Ys, H, T, p_in_aa(H, Y))
p_in_aa(X, Y) → p_out_aa(X, Y)
U4_ga(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_ga(X, Y, Ys, map_in_ga(T, Ys))
U5_ga(X, Y, Ys, map_out_ga(T, Ys)) → map_out_ga(X, .(Y, Ys))
The argument filtering Pi contains the following mapping:
map_in_ga(
x1,
x2) =
map_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1)
map_out_ga(
x1,
x2) =
map_out_ga(
x2)
U2_ga(
x1,
x2,
x3,
x4) =
U2_ga(
x1,
x4)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x2)
U3_ga(
x1,
x2,
x3,
x4,
x5) =
U3_ga(
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
U4_ga(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_ga(
x5,
x6)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
U5_ga(
x1,
x2,
x3,
x4) =
U5_ga(
x4)
MAP_IN_GA(
x1,
x2) =
MAP_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x2)
EQ_IN_AG(
x1,
x2) =
EQ_IN_AG(
x2)
U2_GA(
x1,
x2,
x3,
x4) =
U2_GA(
x1,
x4)
HEAD_IN_GA(
x1,
x2) =
HEAD_IN_GA(
x1)
U3_GA(
x1,
x2,
x3,
x4,
x5) =
U3_GA(
x5)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U4_GA(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_GA(
x5,
x6)
P_IN_AA(
x1,
x2) =
P_IN_AA
U5_GA(
x1,
x2,
x3,
x4) =
U5_GA(
x4)
We have to consider all (P,R,Pi)-chains
(7) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 6 less nodes.
(8) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X, .(Y, Ys)) → U2_GA(X, Y, Ys, head_in_ga(X, H))
U2_GA(X, Y, Ys, head_out_ga(X, H)) → U3_GA(X, Y, Ys, H, tail_in_ga(X, T))
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → U4_GA(X, Y, Ys, H, T, p_in_aa(H, Y))
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → MAP_IN_GA(T, Ys)
The TRS R consists of the following rules:
map_in_ga([], L) → U1_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, [])) → map_out_ga([], L)
map_in_ga(X, .(Y, Ys)) → U2_ga(X, Y, Ys, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
U2_ga(X, Y, Ys, head_out_ga(X, H)) → U3_ga(X, Y, Ys, H, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
U3_ga(X, Y, Ys, H, tail_out_ga(X, T)) → U4_ga(X, Y, Ys, H, T, p_in_aa(H, Y))
p_in_aa(X, Y) → p_out_aa(X, Y)
U4_ga(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_ga(X, Y, Ys, map_in_ga(T, Ys))
U5_ga(X, Y, Ys, map_out_ga(T, Ys)) → map_out_ga(X, .(Y, Ys))
The argument filtering Pi contains the following mapping:
map_in_ga(
x1,
x2) =
map_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1)
map_out_ga(
x1,
x2) =
map_out_ga(
x2)
U2_ga(
x1,
x2,
x3,
x4) =
U2_ga(
x1,
x4)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x2)
U3_ga(
x1,
x2,
x3,
x4,
x5) =
U3_ga(
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
U4_ga(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_ga(
x5,
x6)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
U5_ga(
x1,
x2,
x3,
x4) =
U5_ga(
x4)
MAP_IN_GA(
x1,
x2) =
MAP_IN_GA(
x1)
U2_GA(
x1,
x2,
x3,
x4) =
U2_GA(
x1,
x4)
U3_GA(
x1,
x2,
x3,
x4,
x5) =
U3_GA(
x5)
U4_GA(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_GA(
x5,
x6)
We have to consider all (P,R,Pi)-chains
(9) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(10) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X, .(Y, Ys)) → U2_GA(X, Y, Ys, head_in_ga(X, H))
U2_GA(X, Y, Ys, head_out_ga(X, H)) → U3_GA(X, Y, Ys, H, tail_in_ga(X, T))
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → U4_GA(X, Y, Ys, H, T, p_in_aa(H, Y))
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → MAP_IN_GA(T, Ys)
The TRS R consists of the following rules:
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
p_in_aa(X, Y) → p_out_aa(X, Y)
The argument filtering Pi contains the following mapping:
[] =
[]
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x2)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
MAP_IN_GA(
x1,
x2) =
MAP_IN_GA(
x1)
U2_GA(
x1,
x2,
x3,
x4) =
U2_GA(
x1,
x4)
U3_GA(
x1,
x2,
x3,
x4,
x5) =
U3_GA(
x5)
U4_GA(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_GA(
x5,
x6)
We have to consider all (P,R,Pi)-chains
(11) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(12) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X) → U2_GA(X, head_in_ga(X))
U2_GA(X, head_out_ga) → U3_GA(tail_in_ga(X))
U3_GA(tail_out_ga(T)) → U4_GA(T, p_in_aa)
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
The TRS R consists of the following rules:
head_in_ga([]) → head_out_ga
head_in_ga(.(X2)) → head_out_ga
tail_in_ga([]) → tail_out_ga([])
tail_in_ga(.(T)) → tail_out_ga(T)
p_in_aa → p_out_aa
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
p_in_aa
We have to consider all (P,Q,R)-chains.
(13) 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.
No dependency pairs are removed.
The following rules are removed from R:
tail_in_ga(.(T)) → tail_out_ga(T)
head_in_ga(.(X2)) → head_out_ga
Used ordering: POLO with Polynomial interpretation [POLO]:
POL(.(x1)) = 1 + 2·x1
POL(MAP_IN_GA(x1)) = 2·x1
POL(U2_GA(x1, x2)) = x1 + x2
POL(U3_GA(x1)) = x1
POL(U4_GA(x1, x2)) = 2·x1 + 2·x2
POL([]) = 0
POL(head_in_ga(x1)) = x1
POL(head_out_ga) = 0
POL(p_in_aa) = 0
POL(p_out_aa) = 0
POL(tail_in_ga(x1)) = x1
POL(tail_out_ga(x1)) = 2·x1
(14) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X) → U2_GA(X, head_in_ga(X))
U2_GA(X, head_out_ga) → U3_GA(tail_in_ga(X))
U3_GA(tail_out_ga(T)) → U4_GA(T, p_in_aa)
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
The TRS R consists of the following rules:
p_in_aa → p_out_aa
tail_in_ga([]) → tail_out_ga([])
head_in_ga([]) → head_out_ga
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
p_in_aa
We have to consider all (P,Q,R)-chains.
(15) Rewriting (EQUIVALENT transformation)
By rewriting [LPAR04] the rule
U3_GA(
tail_out_ga(
T)) →
U4_GA(
T,
p_in_aa) at position [1] we obtained the following new rules [LPAR04]:
U3_GA(tail_out_ga(T)) → U4_GA(T, p_out_aa)
(16) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X) → U2_GA(X, head_in_ga(X))
U2_GA(X, head_out_ga) → U3_GA(tail_in_ga(X))
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
U3_GA(tail_out_ga(T)) → U4_GA(T, p_out_aa)
The TRS R consists of the following rules:
p_in_aa → p_out_aa
tail_in_ga([]) → tail_out_ga([])
head_in_ga([]) → head_out_ga
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
p_in_aa
We have to consider all (P,Q,R)-chains.
(17) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(18) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X) → U2_GA(X, head_in_ga(X))
U2_GA(X, head_out_ga) → U3_GA(tail_in_ga(X))
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
U3_GA(tail_out_ga(T)) → U4_GA(T, p_out_aa)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
head_in_ga([]) → head_out_ga
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
p_in_aa
We have to consider all (P,Q,R)-chains.
(19) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
p_in_aa
(20) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X) → U2_GA(X, head_in_ga(X))
U2_GA(X, head_out_ga) → U3_GA(tail_in_ga(X))
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
U3_GA(tail_out_ga(T)) → U4_GA(T, p_out_aa)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
head_in_ga([]) → head_out_ga
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(21) Narrowing (SOUND transformation)
By narrowing [LPAR04] the rule
MAP_IN_GA(
X) →
U2_GA(
X,
head_in_ga(
X)) at position [1] we obtained the following new rules [LPAR04]:
MAP_IN_GA([]) → U2_GA([], head_out_ga)
(22) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(X, head_out_ga) → U3_GA(tail_in_ga(X))
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
U3_GA(tail_out_ga(T)) → U4_GA(T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
head_in_ga([]) → head_out_ga
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(23) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(24) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(X, head_out_ga) → U3_GA(tail_in_ga(X))
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
U3_GA(tail_out_ga(T)) → U4_GA(T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(25) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
head_in_ga(x0)
(26) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(X, head_out_ga) → U3_GA(tail_in_ga(X))
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
U3_GA(tail_out_ga(T)) → U4_GA(T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(27) Narrowing (SOUND transformation)
By narrowing [LPAR04] the rule
U2_GA(
X,
head_out_ga) →
U3_GA(
tail_in_ga(
X)) at position [0] we obtained the following new rules [LPAR04]:
U2_GA([], head_out_ga) → U3_GA(tail_out_ga([]))
(28) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
U3_GA(tail_out_ga(T)) → U4_GA(T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga)
U2_GA([], head_out_ga) → U3_GA(tail_out_ga([]))
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(29) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(30) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
U3_GA(tail_out_ga(T)) → U4_GA(T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga)
U2_GA([], head_out_ga) → U3_GA(tail_out_ga([]))
R is empty.
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(31) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
tail_in_ga(x0)
(32) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
U3_GA(tail_out_ga(T)) → U4_GA(T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga)
U2_GA([], head_out_ga) → U3_GA(tail_out_ga([]))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(33) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
U3_GA(
tail_out_ga(
T)) →
U4_GA(
T,
p_out_aa) we obtained the following new rules [LPAR04]:
U3_GA(tail_out_ga([])) → U4_GA([], p_out_aa)
(34) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U4_GA(T, p_out_aa) → MAP_IN_GA(T)
MAP_IN_GA([]) → U2_GA([], head_out_ga)
U2_GA([], head_out_ga) → U3_GA(tail_out_ga([]))
U3_GA(tail_out_ga([])) → U4_GA([], p_out_aa)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(35) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
U4_GA(
T,
p_out_aa) →
MAP_IN_GA(
T) we obtained the following new rules [LPAR04]:
U4_GA([], p_out_aa) → MAP_IN_GA([])
(36) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA([]) → U2_GA([], head_out_ga)
U2_GA([], head_out_ga) → U3_GA(tail_out_ga([]))
U3_GA(tail_out_ga([])) → U4_GA([], p_out_aa)
U4_GA([], p_out_aa) → MAP_IN_GA([])
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(37) NonTerminationProof (EQUIVALENT transformation)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:
s =
U2_GA(
[],
head_out_ga) evaluates to t =
U2_GA(
[],
head_out_ga)
Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Semiunifier: [ ]
- Matcher: [ ]
Rewriting sequenceU2_GA([], head_out_ga) →
U3_GA(
tail_out_ga(
[]))
with rule
U2_GA(
[],
head_out_ga) →
U3_GA(
tail_out_ga(
[])) at position [] and matcher [ ]
U3_GA(tail_out_ga([])) →
U4_GA(
[],
p_out_aa)
with rule
U3_GA(
tail_out_ga(
[])) →
U4_GA(
[],
p_out_aa) at position [] and matcher [ ]
U4_GA([], p_out_aa) →
MAP_IN_GA(
[])
with rule
U4_GA(
[],
p_out_aa) →
MAP_IN_GA(
[]) at position [] and matcher [ ]
MAP_IN_GA([]) →
U2_GA(
[],
head_out_ga)
with rule
MAP_IN_GA(
[]) →
U2_GA(
[],
head_out_ga)
Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence
All these steps are and every following step will be a correct step w.r.t to Q.
(38) FALSE
(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:
map_in: (b,f)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
map_in_ga([], L) → U1_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, [])) → map_out_ga([], L)
map_in_ga(X, .(Y, Ys)) → U2_ga(X, Y, Ys, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
U2_ga(X, Y, Ys, head_out_ga(X, H)) → U3_ga(X, Y, Ys, H, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
U3_ga(X, Y, Ys, H, tail_out_ga(X, T)) → U4_ga(X, Y, Ys, H, T, p_in_aa(H, Y))
p_in_aa(X, Y) → p_out_aa(X, Y)
U4_ga(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_ga(X, Y, Ys, map_in_ga(T, Ys))
U5_ga(X, Y, Ys, map_out_ga(T, Ys)) → map_out_ga(X, .(Y, Ys))
The argument filtering Pi contains the following mapping:
map_in_ga(
x1,
x2) =
map_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1,
x2)
map_out_ga(
x1,
x2) =
map_out_ga(
x1,
x2)
U2_ga(
x1,
x2,
x3,
x4) =
U2_ga(
x1,
x4)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x2)
U3_ga(
x1,
x2,
x3,
x4,
x5) =
U3_ga(
x1,
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_ga(
x1,
x5,
x6)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
U5_ga(
x1,
x2,
x3,
x4) =
U5_ga(
x1,
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:
map_in_ga([], L) → U1_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, [])) → map_out_ga([], L)
map_in_ga(X, .(Y, Ys)) → U2_ga(X, Y, Ys, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
U2_ga(X, Y, Ys, head_out_ga(X, H)) → U3_ga(X, Y, Ys, H, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
U3_ga(X, Y, Ys, H, tail_out_ga(X, T)) → U4_ga(X, Y, Ys, H, T, p_in_aa(H, Y))
p_in_aa(X, Y) → p_out_aa(X, Y)
U4_ga(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_ga(X, Y, Ys, map_in_ga(T, Ys))
U5_ga(X, Y, Ys, map_out_ga(T, Ys)) → map_out_ga(X, .(Y, Ys))
The argument filtering Pi contains the following mapping:
map_in_ga(
x1,
x2) =
map_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1,
x2)
map_out_ga(
x1,
x2) =
map_out_ga(
x1,
x2)
U2_ga(
x1,
x2,
x3,
x4) =
U2_ga(
x1,
x4)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x2)
U3_ga(
x1,
x2,
x3,
x4,
x5) =
U3_ga(
x1,
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_ga(
x1,
x5,
x6)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
U5_ga(
x1,
x2,
x3,
x4) =
U5_ga(
x1,
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:
MAP_IN_GA([], L) → U1_GA(L, eq_in_ag(L, []))
MAP_IN_GA([], L) → EQ_IN_AG(L, [])
MAP_IN_GA(X, .(Y, Ys)) → U2_GA(X, Y, Ys, head_in_ga(X, H))
MAP_IN_GA(X, .(Y, Ys)) → HEAD_IN_GA(X, H)
U2_GA(X, Y, Ys, head_out_ga(X, H)) → U3_GA(X, Y, Ys, H, tail_in_ga(X, T))
U2_GA(X, Y, Ys, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → U4_GA(X, Y, Ys, H, T, p_in_aa(H, Y))
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → P_IN_AA(H, Y)
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_GA(X, Y, Ys, map_in_ga(T, Ys))
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → MAP_IN_GA(T, Ys)
The TRS R consists of the following rules:
map_in_ga([], L) → U1_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, [])) → map_out_ga([], L)
map_in_ga(X, .(Y, Ys)) → U2_ga(X, Y, Ys, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
U2_ga(X, Y, Ys, head_out_ga(X, H)) → U3_ga(X, Y, Ys, H, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
U3_ga(X, Y, Ys, H, tail_out_ga(X, T)) → U4_ga(X, Y, Ys, H, T, p_in_aa(H, Y))
p_in_aa(X, Y) → p_out_aa(X, Y)
U4_ga(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_ga(X, Y, Ys, map_in_ga(T, Ys))
U5_ga(X, Y, Ys, map_out_ga(T, Ys)) → map_out_ga(X, .(Y, Ys))
The argument filtering Pi contains the following mapping:
map_in_ga(
x1,
x2) =
map_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1,
x2)
map_out_ga(
x1,
x2) =
map_out_ga(
x1,
x2)
U2_ga(
x1,
x2,
x3,
x4) =
U2_ga(
x1,
x4)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x2)
U3_ga(
x1,
x2,
x3,
x4,
x5) =
U3_ga(
x1,
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_ga(
x1,
x5,
x6)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
U5_ga(
x1,
x2,
x3,
x4) =
U5_ga(
x1,
x4)
MAP_IN_GA(
x1,
x2) =
MAP_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x2)
EQ_IN_AG(
x1,
x2) =
EQ_IN_AG(
x2)
U2_GA(
x1,
x2,
x3,
x4) =
U2_GA(
x1,
x4)
HEAD_IN_GA(
x1,
x2) =
HEAD_IN_GA(
x1)
U3_GA(
x1,
x2,
x3,
x4,
x5) =
U3_GA(
x1,
x5)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U4_GA(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_GA(
x1,
x5,
x6)
P_IN_AA(
x1,
x2) =
P_IN_AA
U5_GA(
x1,
x2,
x3,
x4) =
U5_GA(
x1,
x4)
We have to consider all (P,R,Pi)-chains
(42) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
MAP_IN_GA([], L) → U1_GA(L, eq_in_ag(L, []))
MAP_IN_GA([], L) → EQ_IN_AG(L, [])
MAP_IN_GA(X, .(Y, Ys)) → U2_GA(X, Y, Ys, head_in_ga(X, H))
MAP_IN_GA(X, .(Y, Ys)) → HEAD_IN_GA(X, H)
U2_GA(X, Y, Ys, head_out_ga(X, H)) → U3_GA(X, Y, Ys, H, tail_in_ga(X, T))
U2_GA(X, Y, Ys, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → U4_GA(X, Y, Ys, H, T, p_in_aa(H, Y))
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → P_IN_AA(H, Y)
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_GA(X, Y, Ys, map_in_ga(T, Ys))
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → MAP_IN_GA(T, Ys)
The TRS R consists of the following rules:
map_in_ga([], L) → U1_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, [])) → map_out_ga([], L)
map_in_ga(X, .(Y, Ys)) → U2_ga(X, Y, Ys, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
U2_ga(X, Y, Ys, head_out_ga(X, H)) → U3_ga(X, Y, Ys, H, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
U3_ga(X, Y, Ys, H, tail_out_ga(X, T)) → U4_ga(X, Y, Ys, H, T, p_in_aa(H, Y))
p_in_aa(X, Y) → p_out_aa(X, Y)
U4_ga(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_ga(X, Y, Ys, map_in_ga(T, Ys))
U5_ga(X, Y, Ys, map_out_ga(T, Ys)) → map_out_ga(X, .(Y, Ys))
The argument filtering Pi contains the following mapping:
map_in_ga(
x1,
x2) =
map_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1,
x2)
map_out_ga(
x1,
x2) =
map_out_ga(
x1,
x2)
U2_ga(
x1,
x2,
x3,
x4) =
U2_ga(
x1,
x4)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x2)
U3_ga(
x1,
x2,
x3,
x4,
x5) =
U3_ga(
x1,
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_ga(
x1,
x5,
x6)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
U5_ga(
x1,
x2,
x3,
x4) =
U5_ga(
x1,
x4)
MAP_IN_GA(
x1,
x2) =
MAP_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x2)
EQ_IN_AG(
x1,
x2) =
EQ_IN_AG(
x2)
U2_GA(
x1,
x2,
x3,
x4) =
U2_GA(
x1,
x4)
HEAD_IN_GA(
x1,
x2) =
HEAD_IN_GA(
x1)
U3_GA(
x1,
x2,
x3,
x4,
x5) =
U3_GA(
x1,
x5)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U4_GA(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_GA(
x1,
x5,
x6)
P_IN_AA(
x1,
x2) =
P_IN_AA
U5_GA(
x1,
x2,
x3,
x4) =
U5_GA(
x1,
x4)
We have to consider all (P,R,Pi)-chains
(43) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 6 less nodes.
(44) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X, .(Y, Ys)) → U2_GA(X, Y, Ys, head_in_ga(X, H))
U2_GA(X, Y, Ys, head_out_ga(X, H)) → U3_GA(X, Y, Ys, H, tail_in_ga(X, T))
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → U4_GA(X, Y, Ys, H, T, p_in_aa(H, Y))
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → MAP_IN_GA(T, Ys)
The TRS R consists of the following rules:
map_in_ga([], L) → U1_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, [])) → map_out_ga([], L)
map_in_ga(X, .(Y, Ys)) → U2_ga(X, Y, Ys, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
U2_ga(X, Y, Ys, head_out_ga(X, H)) → U3_ga(X, Y, Ys, H, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
U3_ga(X, Y, Ys, H, tail_out_ga(X, T)) → U4_ga(X, Y, Ys, H, T, p_in_aa(H, Y))
p_in_aa(X, Y) → p_out_aa(X, Y)
U4_ga(X, Y, Ys, H, T, p_out_aa(H, Y)) → U5_ga(X, Y, Ys, map_in_ga(T, Ys))
U5_ga(X, Y, Ys, map_out_ga(T, Ys)) → map_out_ga(X, .(Y, Ys))
The argument filtering Pi contains the following mapping:
map_in_ga(
x1,
x2) =
map_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1,
x2)
map_out_ga(
x1,
x2) =
map_out_ga(
x1,
x2)
U2_ga(
x1,
x2,
x3,
x4) =
U2_ga(
x1,
x4)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x2)
U3_ga(
x1,
x2,
x3,
x4,
x5) =
U3_ga(
x1,
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_ga(
x1,
x5,
x6)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
U5_ga(
x1,
x2,
x3,
x4) =
U5_ga(
x1,
x4)
MAP_IN_GA(
x1,
x2) =
MAP_IN_GA(
x1)
U2_GA(
x1,
x2,
x3,
x4) =
U2_GA(
x1,
x4)
U3_GA(
x1,
x2,
x3,
x4,
x5) =
U3_GA(
x1,
x5)
U4_GA(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_GA(
x1,
x5,
x6)
We have to consider all (P,R,Pi)-chains
(45) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(46) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X, .(Y, Ys)) → U2_GA(X, Y, Ys, head_in_ga(X, H))
U2_GA(X, Y, Ys, head_out_ga(X, H)) → U3_GA(X, Y, Ys, H, tail_in_ga(X, T))
U3_GA(X, Y, Ys, H, tail_out_ga(X, T)) → U4_GA(X, Y, Ys, H, T, p_in_aa(H, Y))
U4_GA(X, Y, Ys, H, T, p_out_aa(H, Y)) → MAP_IN_GA(T, Ys)
The TRS R consists of the following rules:
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(H, X2), H) → head_out_ga(.(H, X2), H)
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, T), T) → tail_out_ga(.(X3, T), T)
p_in_aa(X, Y) → p_out_aa(X, Y)
The argument filtering Pi contains the following mapping:
[] =
[]
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x2)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
p_in_aa(
x1,
x2) =
p_in_aa
p_out_aa(
x1,
x2) =
p_out_aa
MAP_IN_GA(
x1,
x2) =
MAP_IN_GA(
x1)
U2_GA(
x1,
x2,
x3,
x4) =
U2_GA(
x1,
x4)
U3_GA(
x1,
x2,
x3,
x4,
x5) =
U3_GA(
x1,
x5)
U4_GA(
x1,
x2,
x3,
x4,
x5,
x6) =
U4_GA(
x1,
x5,
x6)
We have to consider all (P,R,Pi)-chains
(47) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(48) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X) → U2_GA(X, head_in_ga(X))
U2_GA(X, head_out_ga(X)) → U3_GA(X, tail_in_ga(X))
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_in_aa)
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
The TRS R consists of the following rules:
head_in_ga([]) → head_out_ga([])
head_in_ga(.(X2)) → head_out_ga(.(X2))
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(T)) → tail_out_ga(.(T), T)
p_in_aa → p_out_aa
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
p_in_aa
We have to consider all (P,Q,R)-chains.
(49) Rewriting (EQUIVALENT transformation)
By rewriting [LPAR04] the rule
U3_GA(
X,
tail_out_ga(
X,
T)) →
U4_GA(
X,
T,
p_in_aa) at position [2] we obtained the following new rules [LPAR04]:
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_out_aa)
(50) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X) → U2_GA(X, head_in_ga(X))
U2_GA(X, head_out_ga(X)) → U3_GA(X, tail_in_ga(X))
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_out_aa)
The TRS R consists of the following rules:
head_in_ga([]) → head_out_ga([])
head_in_ga(.(X2)) → head_out_ga(.(X2))
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(T)) → tail_out_ga(.(T), T)
p_in_aa → p_out_aa
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
p_in_aa
We have to consider all (P,Q,R)-chains.
(51) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(52) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X) → U2_GA(X, head_in_ga(X))
U2_GA(X, head_out_ga(X)) → U3_GA(X, tail_in_ga(X))
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_out_aa)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(T)) → tail_out_ga(.(T), T)
head_in_ga([]) → head_out_ga([])
head_in_ga(.(X2)) → head_out_ga(.(X2))
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
p_in_aa
We have to consider all (P,Q,R)-chains.
(53) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
p_in_aa
(54) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(X) → U2_GA(X, head_in_ga(X))
U2_GA(X, head_out_ga(X)) → U3_GA(X, tail_in_ga(X))
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_out_aa)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(T)) → tail_out_ga(.(T), T)
head_in_ga([]) → head_out_ga([])
head_in_ga(.(X2)) → head_out_ga(.(X2))
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(55) Narrowing (SOUND transformation)
By narrowing [LPAR04] the rule
MAP_IN_GA(
X) →
U2_GA(
X,
head_in_ga(
X)) at position [1] we obtained the following new rules [LPAR04]:
MAP_IN_GA([]) → U2_GA([], head_out_ga([]))
MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
(56) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(X, head_out_ga(X)) → U3_GA(X, tail_in_ga(X))
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga([]))
MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(T)) → tail_out_ga(.(T), T)
head_in_ga([]) → head_out_ga([])
head_in_ga(.(X2)) → head_out_ga(.(X2))
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(57) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(58) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(X, head_out_ga(X)) → U3_GA(X, tail_in_ga(X))
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga([]))
MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(T)) → tail_out_ga(.(T), T)
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(59) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
head_in_ga(x0)
(60) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(X, head_out_ga(X)) → U3_GA(X, tail_in_ga(X))
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga([]))
MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(T)) → tail_out_ga(.(T), T)
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(61) Narrowing (SOUND transformation)
By narrowing [LPAR04] the rule
U2_GA(
X,
head_out_ga(
X)) →
U3_GA(
X,
tail_in_ga(
X)) at position [1] we obtained the following new rules [LPAR04]:
U2_GA([], head_out_ga([])) → U3_GA([], tail_out_ga([], []))
U2_GA(.(x0), head_out_ga(.(x0))) → U3_GA(.(x0), tail_out_ga(.(x0), x0))
(62) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga([]))
MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
U2_GA([], head_out_ga([])) → U3_GA([], tail_out_ga([], []))
U2_GA(.(x0), head_out_ga(.(x0))) → U3_GA(.(x0), tail_out_ga(.(x0), x0))
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(T)) → tail_out_ga(.(T), T)
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(63) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(64) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga([]))
MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
U2_GA([], head_out_ga([])) → U3_GA([], tail_out_ga([], []))
U2_GA(.(x0), head_out_ga(.(x0))) → U3_GA(.(x0), tail_out_ga(.(x0), x0))
R is empty.
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(65) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
tail_in_ga(x0)
(66) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
U3_GA(X, tail_out_ga(X, T)) → U4_GA(X, T, p_out_aa)
MAP_IN_GA([]) → U2_GA([], head_out_ga([]))
MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
U2_GA([], head_out_ga([])) → U3_GA([], tail_out_ga([], []))
U2_GA(.(x0), head_out_ga(.(x0))) → U3_GA(.(x0), tail_out_ga(.(x0), x0))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(67) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
U3_GA(
X,
tail_out_ga(
X,
T)) →
U4_GA(
X,
T,
p_out_aa) we obtained the following new rules [LPAR04]:
U3_GA([], tail_out_ga([], [])) → U4_GA([], [], p_out_aa)
U3_GA(.(z0), tail_out_ga(.(z0), z0)) → U4_GA(.(z0), z0, p_out_aa)
(68) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U4_GA(X, T, p_out_aa) → MAP_IN_GA(T)
MAP_IN_GA([]) → U2_GA([], head_out_ga([]))
MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
U2_GA([], head_out_ga([])) → U3_GA([], tail_out_ga([], []))
U2_GA(.(x0), head_out_ga(.(x0))) → U3_GA(.(x0), tail_out_ga(.(x0), x0))
U3_GA([], tail_out_ga([], [])) → U4_GA([], [], p_out_aa)
U3_GA(.(z0), tail_out_ga(.(z0), z0)) → U4_GA(.(z0), z0, p_out_aa)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(69) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
U4_GA(
X,
T,
p_out_aa) →
MAP_IN_GA(
T) we obtained the following new rules [LPAR04]:
U4_GA([], [], p_out_aa) → MAP_IN_GA([])
U4_GA(.(z0), z0, p_out_aa) → MAP_IN_GA(z0)
(70) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA([]) → U2_GA([], head_out_ga([]))
MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
U2_GA([], head_out_ga([])) → U3_GA([], tail_out_ga([], []))
U2_GA(.(x0), head_out_ga(.(x0))) → U3_GA(.(x0), tail_out_ga(.(x0), x0))
U3_GA([], tail_out_ga([], [])) → U4_GA([], [], p_out_aa)
U3_GA(.(z0), tail_out_ga(.(z0), z0)) → U4_GA(.(z0), z0, p_out_aa)
U4_GA([], [], p_out_aa) → MAP_IN_GA([])
U4_GA(.(z0), z0, p_out_aa) → MAP_IN_GA(z0)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(71) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.
(72) Complex Obligation (AND)
(73) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA([], head_out_ga([])) → U3_GA([], tail_out_ga([], []))
U3_GA([], tail_out_ga([], [])) → U4_GA([], [], p_out_aa)
U4_GA([], [], p_out_aa) → MAP_IN_GA([])
MAP_IN_GA([]) → U2_GA([], head_out_ga([]))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(74) NonTerminationProof (EQUIVALENT transformation)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:
s =
U3_GA(
[],
tail_out_ga(
[],
[])) evaluates to t =
U3_GA(
[],
tail_out_ga(
[],
[]))
Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Semiunifier: [ ]
- Matcher: [ ]
Rewriting sequenceU3_GA([], tail_out_ga([], [])) →
U4_GA(
[],
[],
p_out_aa)
with rule
U3_GA(
[],
tail_out_ga(
[],
[])) →
U4_GA(
[],
[],
p_out_aa) at position [] and matcher [ ]
U4_GA([], [], p_out_aa) →
MAP_IN_GA(
[])
with rule
U4_GA(
[],
[],
p_out_aa) →
MAP_IN_GA(
[]) at position [] and matcher [ ]
MAP_IN_GA([]) →
U2_GA(
[],
head_out_ga(
[]))
with rule
MAP_IN_GA(
[]) →
U2_GA(
[],
head_out_ga(
[])) at position [] and matcher [ ]
U2_GA([], head_out_ga([])) →
U3_GA(
[],
tail_out_ga(
[],
[]))
with rule
U2_GA(
[],
head_out_ga(
[])) →
U3_GA(
[],
tail_out_ga(
[],
[]))
Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence
All these steps are and every following step will be a correct step w.r.t to Q.
(75) FALSE
(76) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
U2_GA(.(x0), head_out_ga(.(x0))) → U3_GA(.(x0), tail_out_ga(.(x0), x0))
U3_GA(.(z0), tail_out_ga(.(z0), z0)) → U4_GA(.(z0), z0, p_out_aa)
U4_GA(.(z0), z0, p_out_aa) → MAP_IN_GA(z0)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(77) 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:
- U2_GA(.(x0), head_out_ga(.(x0))) → U3_GA(.(x0), tail_out_ga(.(x0), x0))
The graph contains the following edges 1 >= 1, 2 > 1
- U4_GA(.(z0), z0, p_out_aa) → MAP_IN_GA(z0)
The graph contains the following edges 1 > 1, 2 >= 1
- U3_GA(.(z0), tail_out_ga(.(z0), z0)) → U4_GA(.(z0), z0, p_out_aa)
The graph contains the following edges 1 >= 1, 2 > 1, 1 > 2, 2 > 2
- MAP_IN_GA(.(x0)) → U2_GA(.(x0), head_out_ga(.(x0)))
The graph contains the following edges 1 >= 1
(78) TRUE