(0) Obligation:
Clauses:
p(X, g(X)).
p(X, f(X)) :- p(X, g(Y)).
Queries:
p(g,a).
(1) PrologToPiTRSProof (SOUND transformation)
We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
p_in: (b,f) (b,b)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))
The argument filtering Pi contains the following mapping:
p_in_ga(
x1,
x2) =
p_in_ga(
x1)
p_out_ga(
x1,
x2) =
p_out_ga(
x2)
U1_ga(
x1,
x2) =
U1_ga(
x1,
x2)
p_in_gg(
x1,
x2) =
p_in_gg(
x1,
x2)
g(
x1) =
g
p_out_gg(
x1,
x2) =
p_out_gg
f(
x1) =
f(
x1)
U1_gg(
x1,
x2) =
U1_gg(
x2)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
(2) Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:
p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))
The argument filtering Pi contains the following mapping:
p_in_ga(
x1,
x2) =
p_in_ga(
x1)
p_out_ga(
x1,
x2) =
p_out_ga(
x2)
U1_ga(
x1,
x2) =
U1_ga(
x1,
x2)
p_in_gg(
x1,
x2) =
p_in_gg(
x1,
x2)
g(
x1) =
g
p_out_gg(
x1,
x2) =
p_out_gg
f(
x1) =
f(
x1)
U1_gg(
x1,
x2) =
U1_gg(
x2)
(3) 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:
P_IN_GA(X, f(X)) → U1_GA(X, p_in_gg(X, g(Y)))
P_IN_GA(X, f(X)) → P_IN_GG(X, g(Y))
P_IN_GG(X, f(X)) → U1_GG(X, p_in_gg(X, g(Y)))
P_IN_GG(X, f(X)) → P_IN_GG(X, g(Y))
The TRS R consists of the following rules:
p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))
The argument filtering Pi contains the following mapping:
p_in_ga(
x1,
x2) =
p_in_ga(
x1)
p_out_ga(
x1,
x2) =
p_out_ga(
x2)
U1_ga(
x1,
x2) =
U1_ga(
x1,
x2)
p_in_gg(
x1,
x2) =
p_in_gg(
x1,
x2)
g(
x1) =
g
p_out_gg(
x1,
x2) =
p_out_gg
f(
x1) =
f(
x1)
U1_gg(
x1,
x2) =
U1_gg(
x2)
P_IN_GA(
x1,
x2) =
P_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x1,
x2)
P_IN_GG(
x1,
x2) =
P_IN_GG(
x1,
x2)
U1_GG(
x1,
x2) =
U1_GG(
x2)
We have to consider all (P,R,Pi)-chains
(4) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
P_IN_GA(X, f(X)) → U1_GA(X, p_in_gg(X, g(Y)))
P_IN_GA(X, f(X)) → P_IN_GG(X, g(Y))
P_IN_GG(X, f(X)) → U1_GG(X, p_in_gg(X, g(Y)))
P_IN_GG(X, f(X)) → P_IN_GG(X, g(Y))
The TRS R consists of the following rules:
p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))
The argument filtering Pi contains the following mapping:
p_in_ga(
x1,
x2) =
p_in_ga(
x1)
p_out_ga(
x1,
x2) =
p_out_ga(
x2)
U1_ga(
x1,
x2) =
U1_ga(
x1,
x2)
p_in_gg(
x1,
x2) =
p_in_gg(
x1,
x2)
g(
x1) =
g
p_out_gg(
x1,
x2) =
p_out_gg
f(
x1) =
f(
x1)
U1_gg(
x1,
x2) =
U1_gg(
x2)
P_IN_GA(
x1,
x2) =
P_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x1,
x2)
P_IN_GG(
x1,
x2) =
P_IN_GG(
x1,
x2)
U1_GG(
x1,
x2) =
U1_GG(
x2)
We have to consider all (P,R,Pi)-chains
(5) PrologToPiTRSProof (SOUND transformation)
We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
p_in: (b,f) (b,b)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))
The argument filtering Pi contains the following mapping:
p_in_ga(
x1,
x2) =
p_in_ga(
x1)
p_out_ga(
x1,
x2) =
p_out_ga(
x1,
x2)
U1_ga(
x1,
x2) =
U1_ga(
x1,
x2)
p_in_gg(
x1,
x2) =
p_in_gg(
x1,
x2)
g(
x1) =
g
p_out_gg(
x1,
x2) =
p_out_gg(
x1,
x2)
f(
x1) =
f(
x1)
U1_gg(
x1,
x2) =
U1_gg(
x1,
x2)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
(6) Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:
p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))
The argument filtering Pi contains the following mapping:
p_in_ga(
x1,
x2) =
p_in_ga(
x1)
p_out_ga(
x1,
x2) =
p_out_ga(
x1,
x2)
U1_ga(
x1,
x2) =
U1_ga(
x1,
x2)
p_in_gg(
x1,
x2) =
p_in_gg(
x1,
x2)
g(
x1) =
g
p_out_gg(
x1,
x2) =
p_out_gg(
x1,
x2)
f(
x1) =
f(
x1)
U1_gg(
x1,
x2) =
U1_gg(
x1,
x2)
(7) 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:
P_IN_GA(X, f(X)) → U1_GA(X, p_in_gg(X, g(Y)))
P_IN_GA(X, f(X)) → P_IN_GG(X, g(Y))
P_IN_GG(X, f(X)) → U1_GG(X, p_in_gg(X, g(Y)))
P_IN_GG(X, f(X)) → P_IN_GG(X, g(Y))
The TRS R consists of the following rules:
p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))
The argument filtering Pi contains the following mapping:
p_in_ga(
x1,
x2) =
p_in_ga(
x1)
p_out_ga(
x1,
x2) =
p_out_ga(
x1,
x2)
U1_ga(
x1,
x2) =
U1_ga(
x1,
x2)
p_in_gg(
x1,
x2) =
p_in_gg(
x1,
x2)
g(
x1) =
g
p_out_gg(
x1,
x2) =
p_out_gg(
x1,
x2)
f(
x1) =
f(
x1)
U1_gg(
x1,
x2) =
U1_gg(
x1,
x2)
P_IN_GA(
x1,
x2) =
P_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x1,
x2)
P_IN_GG(
x1,
x2) =
P_IN_GG(
x1,
x2)
U1_GG(
x1,
x2) =
U1_GG(
x1,
x2)
We have to consider all (P,R,Pi)-chains
(8) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
P_IN_GA(X, f(X)) → U1_GA(X, p_in_gg(X, g(Y)))
P_IN_GA(X, f(X)) → P_IN_GG(X, g(Y))
P_IN_GG(X, f(X)) → U1_GG(X, p_in_gg(X, g(Y)))
P_IN_GG(X, f(X)) → P_IN_GG(X, g(Y))
The TRS R consists of the following rules:
p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))
The argument filtering Pi contains the following mapping:
p_in_ga(
x1,
x2) =
p_in_ga(
x1)
p_out_ga(
x1,
x2) =
p_out_ga(
x1,
x2)
U1_ga(
x1,
x2) =
U1_ga(
x1,
x2)
p_in_gg(
x1,
x2) =
p_in_gg(
x1,
x2)
g(
x1) =
g
p_out_gg(
x1,
x2) =
p_out_gg(
x1,
x2)
f(
x1) =
f(
x1)
U1_gg(
x1,
x2) =
U1_gg(
x1,
x2)
P_IN_GA(
x1,
x2) =
P_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x1,
x2)
P_IN_GG(
x1,
x2) =
P_IN_GG(
x1,
x2)
U1_GG(
x1,
x2) =
U1_GG(
x1,
x2)
We have to consider all (P,R,Pi)-chains
(9) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 0 SCCs with 4 less nodes.
(10) TRUE