/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.pl /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern p(g) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToPiTRSProof [SOUND, 0 ms] (2) PiTRS (3) DependencyPairsProof [EQUIVALENT, 4 ms] (4) PiDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) PiDP (7) PiDPToQDPProof [SOUND, 24 ms] (8) QDP (9) QDPQMonotonicMRRProof [EQUIVALENT, 37 ms] (10) QDP (11) QDPQMonotonicMRRProof [EQUIVALENT, 35 ms] (12) QDP (13) DependencyGraphProof [EQUIVALENT, 0 ms] (14) QDP (15) UsableRulesProof [EQUIVALENT, 0 ms] (16) QDP (17) QReductionProof [EQUIVALENT, 0 ms] (18) QDP (19) UsableRulesReductionPairsProof [EQUIVALENT, 2 ms] (20) QDP (21) PisEmptyProof [EQUIVALENT, 0 ms] (22) YES ---------------------------------------- (0) Obligation: Clauses: p(cons(X, nil)). p(cons(s(s(X)), cons(Y, Xs))) :- ','(p(cons(X, cons(Y, Xs))), p(cons(s(s(s(s(Y)))), Xs))). p(cons(0, Xs)) :- p(Xs). Query: p(g) ---------------------------------------- (1) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: p_in_1: (b) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: p_in_g(cons(X, nil)) -> p_out_g(cons(X, nil)) p_in_g(cons(s(s(X)), cons(Y, Xs))) -> U1_g(X, Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) p_in_g(cons(0, Xs)) -> U3_g(Xs, p_in_g(Xs)) U3_g(Xs, p_out_g(Xs)) -> p_out_g(cons(0, Xs)) U1_g(X, Y, Xs, p_out_g(cons(X, cons(Y, Xs)))) -> U2_g(X, Y, Xs, p_in_g(cons(s(s(s(s(Y)))), Xs))) U2_g(X, Y, Xs, p_out_g(cons(s(s(s(s(Y)))), Xs))) -> p_out_g(cons(s(s(X)), cons(Y, Xs))) The argument filtering Pi contains the following mapping: p_in_g(x1) = p_in_g(x1) cons(x1, x2) = cons(x1, x2) nil = nil p_out_g(x1) = p_out_g s(x1) = s(x1) U1_g(x1, x2, x3, x4) = U1_g(x2, x3, x4) 0 = 0 U3_g(x1, x2) = U3_g(x2) U2_g(x1, x2, x3, x4) = U2_g(x4) 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_g(cons(X, nil)) -> p_out_g(cons(X, nil)) p_in_g(cons(s(s(X)), cons(Y, Xs))) -> U1_g(X, Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) p_in_g(cons(0, Xs)) -> U3_g(Xs, p_in_g(Xs)) U3_g(Xs, p_out_g(Xs)) -> p_out_g(cons(0, Xs)) U1_g(X, Y, Xs, p_out_g(cons(X, cons(Y, Xs)))) -> U2_g(X, Y, Xs, p_in_g(cons(s(s(s(s(Y)))), Xs))) U2_g(X, Y, Xs, p_out_g(cons(s(s(s(s(Y)))), Xs))) -> p_out_g(cons(s(s(X)), cons(Y, Xs))) The argument filtering Pi contains the following mapping: p_in_g(x1) = p_in_g(x1) cons(x1, x2) = cons(x1, x2) nil = nil p_out_g(x1) = p_out_g s(x1) = s(x1) U1_g(x1, x2, x3, x4) = U1_g(x2, x3, x4) 0 = 0 U3_g(x1, x2) = U3_g(x2) U2_g(x1, x2, x3, x4) = U2_g(x4) ---------------------------------------- (3) DependencyPairsProof (EQUIVALENT) 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_G(cons(s(s(X)), cons(Y, Xs))) -> U1_G(X, Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> P_IN_G(cons(X, cons(Y, Xs))) P_IN_G(cons(0, Xs)) -> U3_G(Xs, p_in_g(Xs)) P_IN_G(cons(0, Xs)) -> P_IN_G(Xs) U1_G(X, Y, Xs, p_out_g(cons(X, cons(Y, Xs)))) -> U2_G(X, Y, Xs, p_in_g(cons(s(s(s(s(Y)))), Xs))) U1_G(X, Y, Xs, p_out_g(cons(X, cons(Y, Xs)))) -> P_IN_G(cons(s(s(s(s(Y)))), Xs)) The TRS R consists of the following rules: p_in_g(cons(X, nil)) -> p_out_g(cons(X, nil)) p_in_g(cons(s(s(X)), cons(Y, Xs))) -> U1_g(X, Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) p_in_g(cons(0, Xs)) -> U3_g(Xs, p_in_g(Xs)) U3_g(Xs, p_out_g(Xs)) -> p_out_g(cons(0, Xs)) U1_g(X, Y, Xs, p_out_g(cons(X, cons(Y, Xs)))) -> U2_g(X, Y, Xs, p_in_g(cons(s(s(s(s(Y)))), Xs))) U2_g(X, Y, Xs, p_out_g(cons(s(s(s(s(Y)))), Xs))) -> p_out_g(cons(s(s(X)), cons(Y, Xs))) The argument filtering Pi contains the following mapping: p_in_g(x1) = p_in_g(x1) cons(x1, x2) = cons(x1, x2) nil = nil p_out_g(x1) = p_out_g s(x1) = s(x1) U1_g(x1, x2, x3, x4) = U1_g(x2, x3, x4) 0 = 0 U3_g(x1, x2) = U3_g(x2) U2_g(x1, x2, x3, x4) = U2_g(x4) P_IN_G(x1) = P_IN_G(x1) U1_G(x1, x2, x3, x4) = U1_G(x2, x3, x4) U3_G(x1, x2) = U3_G(x2) U2_G(x1, x2, x3, x4) = U2_G(x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (4) Obligation: Pi DP problem: The TRS P consists of the following rules: P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> U1_G(X, Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> P_IN_G(cons(X, cons(Y, Xs))) P_IN_G(cons(0, Xs)) -> U3_G(Xs, p_in_g(Xs)) P_IN_G(cons(0, Xs)) -> P_IN_G(Xs) U1_G(X, Y, Xs, p_out_g(cons(X, cons(Y, Xs)))) -> U2_G(X, Y, Xs, p_in_g(cons(s(s(s(s(Y)))), Xs))) U1_G(X, Y, Xs, p_out_g(cons(X, cons(Y, Xs)))) -> P_IN_G(cons(s(s(s(s(Y)))), Xs)) The TRS R consists of the following rules: p_in_g(cons(X, nil)) -> p_out_g(cons(X, nil)) p_in_g(cons(s(s(X)), cons(Y, Xs))) -> U1_g(X, Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) p_in_g(cons(0, Xs)) -> U3_g(Xs, p_in_g(Xs)) U3_g(Xs, p_out_g(Xs)) -> p_out_g(cons(0, Xs)) U1_g(X, Y, Xs, p_out_g(cons(X, cons(Y, Xs)))) -> U2_g(X, Y, Xs, p_in_g(cons(s(s(s(s(Y)))), Xs))) U2_g(X, Y, Xs, p_out_g(cons(s(s(s(s(Y)))), Xs))) -> p_out_g(cons(s(s(X)), cons(Y, Xs))) The argument filtering Pi contains the following mapping: p_in_g(x1) = p_in_g(x1) cons(x1, x2) = cons(x1, x2) nil = nil p_out_g(x1) = p_out_g s(x1) = s(x1) U1_g(x1, x2, x3, x4) = U1_g(x2, x3, x4) 0 = 0 U3_g(x1, x2) = U3_g(x2) U2_g(x1, x2, x3, x4) = U2_g(x4) P_IN_G(x1) = P_IN_G(x1) U1_G(x1, x2, x3, x4) = U1_G(x2, x3, x4) U3_G(x1, x2) = U3_G(x2) U2_G(x1, x2, x3, x4) = U2_G(x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 2 less nodes. ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: U1_G(X, Y, Xs, p_out_g(cons(X, cons(Y, Xs)))) -> P_IN_G(cons(s(s(s(s(Y)))), Xs)) P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> U1_G(X, Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> P_IN_G(cons(X, cons(Y, Xs))) P_IN_G(cons(0, Xs)) -> P_IN_G(Xs) The TRS R consists of the following rules: p_in_g(cons(X, nil)) -> p_out_g(cons(X, nil)) p_in_g(cons(s(s(X)), cons(Y, Xs))) -> U1_g(X, Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) p_in_g(cons(0, Xs)) -> U3_g(Xs, p_in_g(Xs)) U3_g(Xs, p_out_g(Xs)) -> p_out_g(cons(0, Xs)) U1_g(X, Y, Xs, p_out_g(cons(X, cons(Y, Xs)))) -> U2_g(X, Y, Xs, p_in_g(cons(s(s(s(s(Y)))), Xs))) U2_g(X, Y, Xs, p_out_g(cons(s(s(s(s(Y)))), Xs))) -> p_out_g(cons(s(s(X)), cons(Y, Xs))) The argument filtering Pi contains the following mapping: p_in_g(x1) = p_in_g(x1) cons(x1, x2) = cons(x1, x2) nil = nil p_out_g(x1) = p_out_g s(x1) = s(x1) U1_g(x1, x2, x3, x4) = U1_g(x2, x3, x4) 0 = 0 U3_g(x1, x2) = U3_g(x2) U2_g(x1, x2, x3, x4) = U2_g(x4) P_IN_G(x1) = P_IN_G(x1) U1_G(x1, x2, x3, x4) = U1_G(x2, x3, x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (7) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (8) Obligation: Q DP problem: The TRS P consists of the following rules: U1_G(Y, Xs, p_out_g) -> P_IN_G(cons(s(s(s(s(Y)))), Xs)) P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> U1_G(Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> P_IN_G(cons(X, cons(Y, Xs))) P_IN_G(cons(0, Xs)) -> P_IN_G(Xs) The TRS R consists of the following rules: p_in_g(cons(X, nil)) -> p_out_g p_in_g(cons(s(s(X)), cons(Y, Xs))) -> U1_g(Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) p_in_g(cons(0, Xs)) -> U3_g(p_in_g(Xs)) U3_g(p_out_g) -> p_out_g U1_g(Y, Xs, p_out_g) -> U2_g(p_in_g(cons(s(s(s(s(Y)))), Xs))) U2_g(p_out_g) -> p_out_g The set Q consists of the following terms: p_in_g(x0) U3_g(x0) U1_g(x0, x1, x2) U2_g(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (9) QDPQMonotonicMRRProof (EQUIVALENT) By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain. Strictly oriented dependency pairs: P_IN_G(cons(0, Xs)) -> P_IN_G(Xs) Used ordering: Polynomial interpretation [POLO]: POL(0) = 1 POL(P_IN_G(x_1)) = 2*x_1 POL(U1_G(x_1, x_2, x_3)) = 2*x_1 + 2*x_2 POL(U1_g(x_1, x_2, x_3)) = 0 POL(U2_g(x_1)) = 0 POL(U3_g(x_1)) = 0 POL(cons(x_1, x_2)) = x_1 + x_2 POL(nil) = 0 POL(p_in_g(x_1)) = 0 POL(p_out_g) = 0 POL(s(x_1)) = x_1 ---------------------------------------- (10) Obligation: Q DP problem: The TRS P consists of the following rules: U1_G(Y, Xs, p_out_g) -> P_IN_G(cons(s(s(s(s(Y)))), Xs)) P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> U1_G(Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> P_IN_G(cons(X, cons(Y, Xs))) The TRS R consists of the following rules: p_in_g(cons(X, nil)) -> p_out_g p_in_g(cons(s(s(X)), cons(Y, Xs))) -> U1_g(Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) p_in_g(cons(0, Xs)) -> U3_g(p_in_g(Xs)) U3_g(p_out_g) -> p_out_g U1_g(Y, Xs, p_out_g) -> U2_g(p_in_g(cons(s(s(s(s(Y)))), Xs))) U2_g(p_out_g) -> p_out_g The set Q consists of the following terms: p_in_g(x0) U3_g(x0) U1_g(x0, x1, x2) U2_g(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (11) QDPQMonotonicMRRProof (EQUIVALENT) By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain. Strictly oriented dependency pairs: P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> U1_G(Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) Used ordering: Polynomial interpretation [POLO]: POL(0) = 2 POL(P_IN_G(x_1)) = 2 + x_1 POL(U1_G(x_1, x_2, x_3)) = 2*x_2 + 2*x_3 POL(U1_g(x_1, x_2, x_3)) = 2 POL(U2_g(x_1)) = x_1 POL(U3_g(x_1)) = 2 POL(cons(x_1, x_2)) = 2 + 2*x_2 POL(nil) = 0 POL(p_in_g(x_1)) = 2 POL(p_out_g) = 2 POL(s(x_1)) = 0 ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: U1_G(Y, Xs, p_out_g) -> P_IN_G(cons(s(s(s(s(Y)))), Xs)) P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> P_IN_G(cons(X, cons(Y, Xs))) The TRS R consists of the following rules: p_in_g(cons(X, nil)) -> p_out_g p_in_g(cons(s(s(X)), cons(Y, Xs))) -> U1_g(Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) p_in_g(cons(0, Xs)) -> U3_g(p_in_g(Xs)) U3_g(p_out_g) -> p_out_g U1_g(Y, Xs, p_out_g) -> U2_g(p_in_g(cons(s(s(s(s(Y)))), Xs))) U2_g(p_out_g) -> p_out_g The set Q consists of the following terms: p_in_g(x0) U3_g(x0) U1_g(x0, x1, x2) U2_g(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (13) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (14) Obligation: Q DP problem: The TRS P consists of the following rules: P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> P_IN_G(cons(X, cons(Y, Xs))) The TRS R consists of the following rules: p_in_g(cons(X, nil)) -> p_out_g p_in_g(cons(s(s(X)), cons(Y, Xs))) -> U1_g(Y, Xs, p_in_g(cons(X, cons(Y, Xs)))) p_in_g(cons(0, Xs)) -> U3_g(p_in_g(Xs)) U3_g(p_out_g) -> p_out_g U1_g(Y, Xs, p_out_g) -> U2_g(p_in_g(cons(s(s(s(s(Y)))), Xs))) U2_g(p_out_g) -> p_out_g The set Q consists of the following terms: p_in_g(x0) U3_g(x0) U1_g(x0, x1, x2) U2_g(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (15) UsableRulesProof (EQUIVALENT) 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. ---------------------------------------- (16) Obligation: Q DP problem: The TRS P consists of the following rules: P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> P_IN_G(cons(X, cons(Y, Xs))) R is empty. The set Q consists of the following terms: p_in_g(x0) U3_g(x0) U1_g(x0, x1, x2) U2_g(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (17) QReductionProof (EQUIVALENT) 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_g(x0) U3_g(x0) U1_g(x0, x1, x2) U2_g(x0) ---------------------------------------- (18) Obligation: Q DP problem: The TRS P consists of the following rules: P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> P_IN_G(cons(X, cons(Y, Xs))) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (19) UsableRulesReductionPairsProof (EQUIVALENT) 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: P_IN_G(cons(s(s(X)), cons(Y, Xs))) -> P_IN_G(cons(X, cons(Y, Xs))) No rules are removed from R. Used ordering: POLO with Polynomial interpretation [POLO]: POL(P_IN_G(x_1)) = x_1 POL(cons(x_1, x_2)) = 2*x_1 + x_2 POL(s(x_1)) = 2*x_1 ---------------------------------------- (20) Obligation: Q DP problem: P is empty. R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (21) PisEmptyProof (EQUIVALENT) The TRS P is empty. Hence, there is no (P,Q,R) chain. ---------------------------------------- (22) YES