5.75/2.36 YES 5.75/2.37 proof of /export/starexec/sandbox/benchmark/theBenchmark.pl 5.75/2.37 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 5.75/2.37 5.75/2.37 5.75/2.37 Left Termination of the query pattern 5.75/2.37 5.75/2.37 count(g,a) 5.75/2.37 5.75/2.37 w.r.t. the given Prolog program could successfully be proven: 5.75/2.37 5.75/2.37 (0) Prolog 5.75/2.37 (1) PrologToPiTRSProof [SOUND, 0 ms] 5.75/2.37 (2) PiTRS 5.75/2.37 (3) DependencyPairsProof [EQUIVALENT, 3 ms] 5.75/2.37 (4) PiDP 5.75/2.37 (5) DependencyGraphProof [EQUIVALENT, 0 ms] 5.75/2.37 (6) AND 5.75/2.37 (7) PiDP 5.75/2.37 (8) UsableRulesProof [EQUIVALENT, 0 ms] 5.75/2.37 (9) PiDP 5.75/2.37 (10) PiDPToQDPProof [SOUND, 0 ms] 5.75/2.37 (11) QDP 5.75/2.37 (12) UsableRulesReductionPairsProof [EQUIVALENT, 23 ms] 5.75/2.37 (13) QDP 5.75/2.37 (14) PisEmptyProof [EQUIVALENT, 0 ms] 5.75/2.37 (15) YES 5.75/2.37 (16) PiDP 5.75/2.37 (17) UsableRulesProof [EQUIVALENT, 0 ms] 5.75/2.37 (18) PiDP 5.75/2.37 (19) PiDPToQDPProof [SOUND, 0 ms] 5.75/2.37 (20) QDP 5.75/2.37 (21) UsableRulesReductionPairsProof [EQUIVALENT, 19 ms] 5.75/2.37 (22) QDP 5.75/2.37 (23) DependencyGraphProof [EQUIVALENT, 0 ms] 5.75/2.37 (24) TRUE 5.75/2.37 5.75/2.37 5.75/2.37 ---------------------------------------- 5.75/2.37 5.75/2.37 (0) 5.75/2.37 Obligation: 5.75/2.37 Clauses: 5.75/2.37 5.75/2.37 flatten(atom(X), .(X, [])). 5.75/2.37 flatten(cons(atom(X), U), .(X, Y)) :- flatten(U, Y). 5.75/2.37 flatten(cons(cons(U, V), W), X) :- flatten(cons(U, cons(V, W)), X). 5.75/2.37 count(atom(X), s(0)). 5.75/2.37 count(cons(atom(X), Y), s(Z)) :- count(Y, Z). 5.75/2.37 count(cons(cons(U, V), W), Z) :- ','(flatten(cons(cons(U, V), W), X), count(X, Z)). 5.75/2.37 5.75/2.37 5.75/2.37 Query: count(g,a) 5.75/2.37 ---------------------------------------- 5.75/2.37 5.75/2.37 (1) PrologToPiTRSProof (SOUND) 5.75/2.37 We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: 5.75/2.37 5.75/2.37 count_in_2: (b,f) 5.75/2.37 5.75/2.37 flatten_in_2: (b,f) 5.75/2.37 5.75/2.37 Transforming Prolog into the following Term Rewriting System: 5.75/2.37 5.75/2.37 Pi-finite rewrite system: 5.75/2.37 The TRS R consists of the following rules: 5.75/2.37 5.75/2.37 count_in_ga(atom(X), s(0)) -> count_out_ga(atom(X), s(0)) 5.75/2.37 count_in_ga(cons(atom(X), Y), s(Z)) -> U3_ga(X, Y, Z, count_in_ga(Y, Z)) 5.75/2.37 count_in_ga(cons(cons(U, V), W), Z) -> U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X)) 5.75/2.37 flatten_in_ga(atom(X), .(X, [])) -> flatten_out_ga(atom(X), .(X, [])) 5.75/2.37 flatten_in_ga(cons(atom(X), U), .(X, Y)) -> U1_ga(X, U, Y, flatten_in_ga(U, Y)) 5.75/2.37 flatten_in_ga(cons(cons(U, V), W), X) -> U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X)) 5.75/2.37 U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) -> flatten_out_ga(cons(cons(U, V), W), X) 5.75/2.37 U1_ga(X, U, Y, flatten_out_ga(U, Y)) -> flatten_out_ga(cons(atom(X), U), .(X, Y)) 5.75/2.37 U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> U5_ga(U, V, W, Z, count_in_ga(X, Z)) 5.75/2.37 U5_ga(U, V, W, Z, count_out_ga(X, Z)) -> count_out_ga(cons(cons(U, V), W), Z) 5.75/2.37 U3_ga(X, Y, Z, count_out_ga(Y, Z)) -> count_out_ga(cons(atom(X), Y), s(Z)) 5.75/2.37 5.75/2.37 The argument filtering Pi contains the following mapping: 5.75/2.37 count_in_ga(x1, x2) = count_in_ga(x1) 5.75/2.37 5.75/2.37 atom(x1) = atom(x1) 5.75/2.37 5.75/2.37 count_out_ga(x1, x2) = count_out_ga(x2) 5.75/2.37 5.75/2.37 cons(x1, x2) = cons(x1, x2) 5.75/2.37 5.75/2.37 U3_ga(x1, x2, x3, x4) = U3_ga(x4) 5.75/2.37 5.75/2.37 U4_ga(x1, x2, x3, x4, x5) = U4_ga(x5) 5.75/2.37 5.75/2.37 flatten_in_ga(x1, x2) = flatten_in_ga(x1) 5.75/2.37 5.75/2.37 flatten_out_ga(x1, x2) = flatten_out_ga(x2) 5.75/2.37 5.75/2.37 U1_ga(x1, x2, x3, x4) = U1_ga(x1, x4) 5.75/2.37 5.75/2.37 U2_ga(x1, x2, x3, x4, x5) = U2_ga(x5) 5.75/2.37 5.75/2.37 U5_ga(x1, x2, x3, x4, x5) = U5_ga(x5) 5.75/2.37 5.75/2.37 .(x1, x2) = .(x1, x2) 5.75/2.37 5.75/2.37 s(x1) = s(x1) 5.75/2.37 5.75/2.37 5.75/2.37 5.75/2.37 5.75/2.37 5.75/2.37 Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog 5.75/2.37 5.75/2.37 5.75/2.37 5.75/2.37 ---------------------------------------- 5.75/2.37 5.75/2.37 (2) 5.75/2.37 Obligation: 5.75/2.37 Pi-finite rewrite system: 5.75/2.37 The TRS R consists of the following rules: 5.75/2.37 5.75/2.37 count_in_ga(atom(X), s(0)) -> count_out_ga(atom(X), s(0)) 5.75/2.37 count_in_ga(cons(atom(X), Y), s(Z)) -> U3_ga(X, Y, Z, count_in_ga(Y, Z)) 5.75/2.37 count_in_ga(cons(cons(U, V), W), Z) -> U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X)) 5.75/2.37 flatten_in_ga(atom(X), .(X, [])) -> flatten_out_ga(atom(X), .(X, [])) 5.75/2.37 flatten_in_ga(cons(atom(X), U), .(X, Y)) -> U1_ga(X, U, Y, flatten_in_ga(U, Y)) 5.75/2.37 flatten_in_ga(cons(cons(U, V), W), X) -> U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X)) 5.75/2.37 U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) -> flatten_out_ga(cons(cons(U, V), W), X) 5.75/2.37 U1_ga(X, U, Y, flatten_out_ga(U, Y)) -> flatten_out_ga(cons(atom(X), U), .(X, Y)) 5.75/2.37 U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> U5_ga(U, V, W, Z, count_in_ga(X, Z)) 5.75/2.37 U5_ga(U, V, W, Z, count_out_ga(X, Z)) -> count_out_ga(cons(cons(U, V), W), Z) 5.75/2.37 U3_ga(X, Y, Z, count_out_ga(Y, Z)) -> count_out_ga(cons(atom(X), Y), s(Z)) 5.75/2.37 5.75/2.37 The argument filtering Pi contains the following mapping: 5.75/2.37 count_in_ga(x1, x2) = count_in_ga(x1) 5.75/2.37 5.75/2.37 atom(x1) = atom(x1) 5.75/2.37 5.75/2.37 count_out_ga(x1, x2) = count_out_ga(x2) 5.75/2.37 5.75/2.37 cons(x1, x2) = cons(x1, x2) 5.75/2.37 5.75/2.37 U3_ga(x1, x2, x3, x4) = U3_ga(x4) 5.75/2.37 5.75/2.37 U4_ga(x1, x2, x3, x4, x5) = U4_ga(x5) 5.75/2.37 5.75/2.37 flatten_in_ga(x1, x2) = flatten_in_ga(x1) 5.75/2.37 5.75/2.37 flatten_out_ga(x1, x2) = flatten_out_ga(x2) 5.75/2.37 5.75/2.37 U1_ga(x1, x2, x3, x4) = U1_ga(x1, x4) 5.75/2.37 5.75/2.37 U2_ga(x1, x2, x3, x4, x5) = U2_ga(x5) 5.75/2.37 5.75/2.37 U5_ga(x1, x2, x3, x4, x5) = U5_ga(x5) 5.75/2.37 5.75/2.37 .(x1, x2) = .(x1, x2) 5.75/2.37 5.75/2.37 s(x1) = s(x1) 5.75/2.37 5.75/2.37 5.75/2.37 5.75/2.37 ---------------------------------------- 5.75/2.37 5.75/2.37 (3) DependencyPairsProof (EQUIVALENT) 5.75/2.37 Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem: 5.75/2.37 Pi DP problem: 5.75/2.37 The TRS P consists of the following rules: 5.75/2.37 5.75/2.37 COUNT_IN_GA(cons(atom(X), Y), s(Z)) -> U3_GA(X, Y, Z, count_in_ga(Y, Z)) 5.75/2.37 COUNT_IN_GA(cons(atom(X), Y), s(Z)) -> COUNT_IN_GA(Y, Z) 5.75/2.37 COUNT_IN_GA(cons(cons(U, V), W), Z) -> U4_GA(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X)) 5.75/2.37 COUNT_IN_GA(cons(cons(U, V), W), Z) -> FLATTEN_IN_GA(cons(cons(U, V), W), X) 5.75/2.37 FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) -> U1_GA(X, U, Y, flatten_in_ga(U, Y)) 5.75/2.37 FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) -> FLATTEN_IN_GA(U, Y) 5.75/2.37 FLATTEN_IN_GA(cons(cons(U, V), W), X) -> U2_GA(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X)) 5.75/2.37 FLATTEN_IN_GA(cons(cons(U, V), W), X) -> FLATTEN_IN_GA(cons(U, cons(V, W)), X) 5.75/2.37 U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> U5_GA(U, V, W, Z, count_in_ga(X, Z)) 5.75/2.37 U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> COUNT_IN_GA(X, Z) 5.75/2.37 5.75/2.37 The TRS R consists of the following rules: 5.75/2.37 5.75/2.37 count_in_ga(atom(X), s(0)) -> count_out_ga(atom(X), s(0)) 5.75/2.37 count_in_ga(cons(atom(X), Y), s(Z)) -> U3_ga(X, Y, Z, count_in_ga(Y, Z)) 5.75/2.37 count_in_ga(cons(cons(U, V), W), Z) -> U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X)) 5.75/2.37 flatten_in_ga(atom(X), .(X, [])) -> flatten_out_ga(atom(X), .(X, [])) 5.75/2.37 flatten_in_ga(cons(atom(X), U), .(X, Y)) -> U1_ga(X, U, Y, flatten_in_ga(U, Y)) 5.75/2.37 flatten_in_ga(cons(cons(U, V), W), X) -> U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X)) 5.75/2.37 U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) -> flatten_out_ga(cons(cons(U, V), W), X) 5.75/2.37 U1_ga(X, U, Y, flatten_out_ga(U, Y)) -> flatten_out_ga(cons(atom(X), U), .(X, Y)) 5.75/2.37 U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> U5_ga(U, V, W, Z, count_in_ga(X, Z)) 5.75/2.37 U5_ga(U, V, W, Z, count_out_ga(X, Z)) -> count_out_ga(cons(cons(U, V), W), Z) 5.75/2.37 U3_ga(X, Y, Z, count_out_ga(Y, Z)) -> count_out_ga(cons(atom(X), Y), s(Z)) 5.75/2.37 5.75/2.37 The argument filtering Pi contains the following mapping: 5.75/2.37 count_in_ga(x1, x2) = count_in_ga(x1) 5.75/2.37 5.75/2.37 atom(x1) = atom(x1) 5.75/2.37 5.75/2.37 count_out_ga(x1, x2) = count_out_ga(x2) 5.75/2.37 5.75/2.37 cons(x1, x2) = cons(x1, x2) 5.75/2.37 5.75/2.37 U3_ga(x1, x2, x3, x4) = U3_ga(x4) 5.75/2.37 5.75/2.37 U4_ga(x1, x2, x3, x4, x5) = U4_ga(x5) 5.75/2.37 5.75/2.37 flatten_in_ga(x1, x2) = flatten_in_ga(x1) 5.75/2.37 5.75/2.37 flatten_out_ga(x1, x2) = flatten_out_ga(x2) 5.75/2.37 5.75/2.37 U1_ga(x1, x2, x3, x4) = U1_ga(x1, x4) 5.75/2.37 5.75/2.37 U2_ga(x1, x2, x3, x4, x5) = U2_ga(x5) 5.75/2.37 5.75/2.37 U5_ga(x1, x2, x3, x4, x5) = U5_ga(x5) 5.75/2.37 5.75/2.37 .(x1, x2) = .(x1, x2) 5.75/2.37 5.75/2.37 s(x1) = s(x1) 5.75/2.37 5.75/2.37 COUNT_IN_GA(x1, x2) = COUNT_IN_GA(x1) 5.75/2.37 5.75/2.37 U3_GA(x1, x2, x3, x4) = U3_GA(x4) 5.75/2.37 5.75/2.37 U4_GA(x1, x2, x3, x4, x5) = U4_GA(x5) 5.75/2.37 5.75/2.37 FLATTEN_IN_GA(x1, x2) = FLATTEN_IN_GA(x1) 5.75/2.37 5.75/2.37 U1_GA(x1, x2, x3, x4) = U1_GA(x1, x4) 5.75/2.37 5.75/2.37 U2_GA(x1, x2, x3, x4, x5) = U2_GA(x5) 5.75/2.37 5.75/2.37 U5_GA(x1, x2, x3, x4, x5) = U5_GA(x5) 5.75/2.37 5.75/2.37 5.75/2.37 We have to consider all (P,R,Pi)-chains 5.75/2.37 ---------------------------------------- 5.75/2.37 5.75/2.37 (4) 5.75/2.37 Obligation: 5.75/2.37 Pi DP problem: 5.75/2.37 The TRS P consists of the following rules: 5.75/2.37 5.75/2.37 COUNT_IN_GA(cons(atom(X), Y), s(Z)) -> U3_GA(X, Y, Z, count_in_ga(Y, Z)) 5.75/2.37 COUNT_IN_GA(cons(atom(X), Y), s(Z)) -> COUNT_IN_GA(Y, Z) 5.75/2.37 COUNT_IN_GA(cons(cons(U, V), W), Z) -> U4_GA(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X)) 5.75/2.37 COUNT_IN_GA(cons(cons(U, V), W), Z) -> FLATTEN_IN_GA(cons(cons(U, V), W), X) 5.75/2.37 FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) -> U1_GA(X, U, Y, flatten_in_ga(U, Y)) 5.75/2.37 FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) -> FLATTEN_IN_GA(U, Y) 5.75/2.37 FLATTEN_IN_GA(cons(cons(U, V), W), X) -> U2_GA(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X)) 5.75/2.37 FLATTEN_IN_GA(cons(cons(U, V), W), X) -> FLATTEN_IN_GA(cons(U, cons(V, W)), X) 5.75/2.37 U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> U5_GA(U, V, W, Z, count_in_ga(X, Z)) 5.75/2.37 U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> COUNT_IN_GA(X, Z) 5.75/2.37 5.75/2.37 The TRS R consists of the following rules: 5.75/2.37 5.75/2.37 count_in_ga(atom(X), s(0)) -> count_out_ga(atom(X), s(0)) 5.75/2.37 count_in_ga(cons(atom(X), Y), s(Z)) -> U3_ga(X, Y, Z, count_in_ga(Y, Z)) 5.75/2.37 count_in_ga(cons(cons(U, V), W), Z) -> U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X)) 5.75/2.37 flatten_in_ga(atom(X), .(X, [])) -> flatten_out_ga(atom(X), .(X, [])) 5.75/2.37 flatten_in_ga(cons(atom(X), U), .(X, Y)) -> U1_ga(X, U, Y, flatten_in_ga(U, Y)) 5.75/2.37 flatten_in_ga(cons(cons(U, V), W), X) -> U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X)) 5.75/2.37 U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) -> flatten_out_ga(cons(cons(U, V), W), X) 5.75/2.37 U1_ga(X, U, Y, flatten_out_ga(U, Y)) -> flatten_out_ga(cons(atom(X), U), .(X, Y)) 5.75/2.37 U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> U5_ga(U, V, W, Z, count_in_ga(X, Z)) 5.75/2.37 U5_ga(U, V, W, Z, count_out_ga(X, Z)) -> count_out_ga(cons(cons(U, V), W), Z) 5.75/2.37 U3_ga(X, Y, Z, count_out_ga(Y, Z)) -> count_out_ga(cons(atom(X), Y), s(Z)) 5.75/2.37 5.75/2.37 The argument filtering Pi contains the following mapping: 5.75/2.37 count_in_ga(x1, x2) = count_in_ga(x1) 5.75/2.37 5.75/2.37 atom(x1) = atom(x1) 5.75/2.37 5.75/2.37 count_out_ga(x1, x2) = count_out_ga(x2) 5.75/2.37 5.75/2.37 cons(x1, x2) = cons(x1, x2) 5.75/2.37 5.75/2.37 U3_ga(x1, x2, x3, x4) = U3_ga(x4) 5.75/2.37 5.75/2.37 U4_ga(x1, x2, x3, x4, x5) = U4_ga(x5) 5.75/2.37 5.75/2.37 flatten_in_ga(x1, x2) = flatten_in_ga(x1) 5.75/2.37 5.75/2.37 flatten_out_ga(x1, x2) = flatten_out_ga(x2) 5.75/2.37 5.75/2.37 U1_ga(x1, x2, x3, x4) = U1_ga(x1, x4) 5.75/2.37 5.75/2.37 U2_ga(x1, x2, x3, x4, x5) = U2_ga(x5) 5.75/2.37 5.75/2.37 U5_ga(x1, x2, x3, x4, x5) = U5_ga(x5) 5.75/2.38 5.75/2.38 .(x1, x2) = .(x1, x2) 5.75/2.38 5.75/2.38 s(x1) = s(x1) 5.75/2.38 5.75/2.38 COUNT_IN_GA(x1, x2) = COUNT_IN_GA(x1) 5.75/2.38 5.75/2.38 U3_GA(x1, x2, x3, x4) = U3_GA(x4) 5.75/2.38 5.75/2.38 U4_GA(x1, x2, x3, x4, x5) = U4_GA(x5) 5.75/2.38 5.75/2.38 FLATTEN_IN_GA(x1, x2) = FLATTEN_IN_GA(x1) 5.75/2.38 5.75/2.38 U1_GA(x1, x2, x3, x4) = U1_GA(x1, x4) 5.75/2.38 5.75/2.38 U2_GA(x1, x2, x3, x4, x5) = U2_GA(x5) 5.75/2.38 5.75/2.38 U5_GA(x1, x2, x3, x4, x5) = U5_GA(x5) 5.75/2.38 5.75/2.38 5.75/2.38 We have to consider all (P,R,Pi)-chains 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (5) DependencyGraphProof (EQUIVALENT) 5.75/2.38 The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 5 less nodes. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (6) 5.75/2.38 Complex Obligation (AND) 5.75/2.38 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (7) 5.75/2.38 Obligation: 5.75/2.38 Pi DP problem: 5.75/2.38 The TRS P consists of the following rules: 5.75/2.38 5.75/2.38 FLATTEN_IN_GA(cons(cons(U, V), W), X) -> FLATTEN_IN_GA(cons(U, cons(V, W)), X) 5.75/2.38 FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) -> FLATTEN_IN_GA(U, Y) 5.75/2.38 5.75/2.38 The TRS R consists of the following rules: 5.75/2.38 5.75/2.38 count_in_ga(atom(X), s(0)) -> count_out_ga(atom(X), s(0)) 5.75/2.38 count_in_ga(cons(atom(X), Y), s(Z)) -> U3_ga(X, Y, Z, count_in_ga(Y, Z)) 5.75/2.38 count_in_ga(cons(cons(U, V), W), Z) -> U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X)) 5.75/2.38 flatten_in_ga(atom(X), .(X, [])) -> flatten_out_ga(atom(X), .(X, [])) 5.75/2.38 flatten_in_ga(cons(atom(X), U), .(X, Y)) -> U1_ga(X, U, Y, flatten_in_ga(U, Y)) 5.75/2.38 flatten_in_ga(cons(cons(U, V), W), X) -> U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X)) 5.75/2.38 U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) -> flatten_out_ga(cons(cons(U, V), W), X) 5.75/2.38 U1_ga(X, U, Y, flatten_out_ga(U, Y)) -> flatten_out_ga(cons(atom(X), U), .(X, Y)) 5.75/2.38 U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> U5_ga(U, V, W, Z, count_in_ga(X, Z)) 5.75/2.38 U5_ga(U, V, W, Z, count_out_ga(X, Z)) -> count_out_ga(cons(cons(U, V), W), Z) 5.75/2.38 U3_ga(X, Y, Z, count_out_ga(Y, Z)) -> count_out_ga(cons(atom(X), Y), s(Z)) 5.75/2.38 5.75/2.38 The argument filtering Pi contains the following mapping: 5.75/2.38 count_in_ga(x1, x2) = count_in_ga(x1) 5.75/2.38 5.75/2.38 atom(x1) = atom(x1) 5.75/2.38 5.75/2.38 count_out_ga(x1, x2) = count_out_ga(x2) 5.75/2.38 5.75/2.38 cons(x1, x2) = cons(x1, x2) 5.75/2.38 5.75/2.38 U3_ga(x1, x2, x3, x4) = U3_ga(x4) 5.75/2.38 5.75/2.38 U4_ga(x1, x2, x3, x4, x5) = U4_ga(x5) 5.75/2.38 5.75/2.38 flatten_in_ga(x1, x2) = flatten_in_ga(x1) 5.75/2.38 5.75/2.38 flatten_out_ga(x1, x2) = flatten_out_ga(x2) 5.75/2.38 5.75/2.38 U1_ga(x1, x2, x3, x4) = U1_ga(x1, x4) 5.75/2.38 5.75/2.38 U2_ga(x1, x2, x3, x4, x5) = U2_ga(x5) 5.75/2.38 5.75/2.38 U5_ga(x1, x2, x3, x4, x5) = U5_ga(x5) 5.75/2.38 5.75/2.38 .(x1, x2) = .(x1, x2) 5.75/2.38 5.75/2.38 s(x1) = s(x1) 5.75/2.38 5.75/2.38 FLATTEN_IN_GA(x1, x2) = FLATTEN_IN_GA(x1) 5.75/2.38 5.75/2.38 5.75/2.38 We have to consider all (P,R,Pi)-chains 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (8) UsableRulesProof (EQUIVALENT) 5.75/2.38 For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (9) 5.75/2.38 Obligation: 5.75/2.38 Pi DP problem: 5.75/2.38 The TRS P consists of the following rules: 5.75/2.38 5.75/2.38 FLATTEN_IN_GA(cons(cons(U, V), W), X) -> FLATTEN_IN_GA(cons(U, cons(V, W)), X) 5.75/2.38 FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) -> FLATTEN_IN_GA(U, Y) 5.75/2.38 5.75/2.38 R is empty. 5.75/2.38 The argument filtering Pi contains the following mapping: 5.75/2.38 atom(x1) = atom(x1) 5.75/2.38 5.75/2.38 cons(x1, x2) = cons(x1, x2) 5.75/2.38 5.75/2.38 .(x1, x2) = .(x1, x2) 5.75/2.38 5.75/2.38 FLATTEN_IN_GA(x1, x2) = FLATTEN_IN_GA(x1) 5.75/2.38 5.75/2.38 5.75/2.38 We have to consider all (P,R,Pi)-chains 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (10) PiDPToQDPProof (SOUND) 5.75/2.38 Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (11) 5.75/2.38 Obligation: 5.75/2.38 Q DP problem: 5.75/2.38 The TRS P consists of the following rules: 5.75/2.38 5.75/2.38 FLATTEN_IN_GA(cons(cons(U, V), W)) -> FLATTEN_IN_GA(cons(U, cons(V, W))) 5.75/2.38 FLATTEN_IN_GA(cons(atom(X), U)) -> FLATTEN_IN_GA(U) 5.75/2.38 5.75/2.38 R is empty. 5.75/2.38 Q is empty. 5.75/2.38 We have to consider all (P,Q,R)-chains. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (12) UsableRulesReductionPairsProof (EQUIVALENT) 5.75/2.38 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. 5.75/2.38 5.75/2.38 The following dependency pairs can be deleted: 5.75/2.38 5.75/2.38 FLATTEN_IN_GA(cons(cons(U, V), W)) -> FLATTEN_IN_GA(cons(U, cons(V, W))) 5.75/2.38 FLATTEN_IN_GA(cons(atom(X), U)) -> FLATTEN_IN_GA(U) 5.75/2.38 No rules are removed from R. 5.75/2.38 5.75/2.38 Used ordering: POLO with Polynomial interpretation [POLO]: 5.75/2.38 5.75/2.38 POL(FLATTEN_IN_GA(x_1)) = 2*x_1 5.75/2.38 POL(atom(x_1)) = x_1 5.75/2.38 POL(cons(x_1, x_2)) = 1 + 2*x_1 + x_2 5.75/2.38 5.75/2.38 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (13) 5.75/2.38 Obligation: 5.75/2.38 Q DP problem: 5.75/2.38 P is empty. 5.75/2.38 R is empty. 5.75/2.38 Q is empty. 5.75/2.38 We have to consider all (P,Q,R)-chains. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (14) PisEmptyProof (EQUIVALENT) 5.75/2.38 The TRS P is empty. Hence, there is no (P,Q,R) chain. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (15) 5.75/2.38 YES 5.75/2.38 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (16) 5.75/2.38 Obligation: 5.75/2.38 Pi DP problem: 5.75/2.38 The TRS P consists of the following rules: 5.75/2.38 5.75/2.38 COUNT_IN_GA(cons(cons(U, V), W), Z) -> U4_GA(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X)) 5.75/2.38 U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> COUNT_IN_GA(X, Z) 5.75/2.38 COUNT_IN_GA(cons(atom(X), Y), s(Z)) -> COUNT_IN_GA(Y, Z) 5.75/2.38 5.75/2.38 The TRS R consists of the following rules: 5.75/2.38 5.75/2.38 count_in_ga(atom(X), s(0)) -> count_out_ga(atom(X), s(0)) 5.75/2.38 count_in_ga(cons(atom(X), Y), s(Z)) -> U3_ga(X, Y, Z, count_in_ga(Y, Z)) 5.75/2.38 count_in_ga(cons(cons(U, V), W), Z) -> U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X)) 5.75/2.38 flatten_in_ga(atom(X), .(X, [])) -> flatten_out_ga(atom(X), .(X, [])) 5.75/2.38 flatten_in_ga(cons(atom(X), U), .(X, Y)) -> U1_ga(X, U, Y, flatten_in_ga(U, Y)) 5.75/2.38 flatten_in_ga(cons(cons(U, V), W), X) -> U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X)) 5.75/2.38 U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) -> flatten_out_ga(cons(cons(U, V), W), X) 5.75/2.38 U1_ga(X, U, Y, flatten_out_ga(U, Y)) -> flatten_out_ga(cons(atom(X), U), .(X, Y)) 5.75/2.38 U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> U5_ga(U, V, W, Z, count_in_ga(X, Z)) 5.75/2.38 U5_ga(U, V, W, Z, count_out_ga(X, Z)) -> count_out_ga(cons(cons(U, V), W), Z) 5.75/2.38 U3_ga(X, Y, Z, count_out_ga(Y, Z)) -> count_out_ga(cons(atom(X), Y), s(Z)) 5.75/2.38 5.75/2.38 The argument filtering Pi contains the following mapping: 5.75/2.38 count_in_ga(x1, x2) = count_in_ga(x1) 5.75/2.38 5.75/2.38 atom(x1) = atom(x1) 5.75/2.38 5.75/2.38 count_out_ga(x1, x2) = count_out_ga(x2) 5.75/2.38 5.75/2.38 cons(x1, x2) = cons(x1, x2) 5.75/2.38 5.75/2.38 U3_ga(x1, x2, x3, x4) = U3_ga(x4) 5.75/2.38 5.75/2.38 U4_ga(x1, x2, x3, x4, x5) = U4_ga(x5) 5.75/2.38 5.75/2.38 flatten_in_ga(x1, x2) = flatten_in_ga(x1) 5.75/2.38 5.75/2.38 flatten_out_ga(x1, x2) = flatten_out_ga(x2) 5.75/2.38 5.75/2.38 U1_ga(x1, x2, x3, x4) = U1_ga(x1, x4) 5.75/2.38 5.75/2.38 U2_ga(x1, x2, x3, x4, x5) = U2_ga(x5) 5.75/2.38 5.75/2.38 U5_ga(x1, x2, x3, x4, x5) = U5_ga(x5) 5.75/2.38 5.75/2.38 .(x1, x2) = .(x1, x2) 5.75/2.38 5.75/2.38 s(x1) = s(x1) 5.75/2.38 5.75/2.38 COUNT_IN_GA(x1, x2) = COUNT_IN_GA(x1) 5.75/2.38 5.75/2.38 U4_GA(x1, x2, x3, x4, x5) = U4_GA(x5) 5.75/2.38 5.75/2.38 5.75/2.38 We have to consider all (P,R,Pi)-chains 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (17) UsableRulesProof (EQUIVALENT) 5.75/2.38 For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (18) 5.75/2.38 Obligation: 5.75/2.38 Pi DP problem: 5.75/2.38 The TRS P consists of the following rules: 5.75/2.38 5.75/2.38 COUNT_IN_GA(cons(cons(U, V), W), Z) -> U4_GA(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X)) 5.75/2.38 U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) -> COUNT_IN_GA(X, Z) 5.75/2.38 COUNT_IN_GA(cons(atom(X), Y), s(Z)) -> COUNT_IN_GA(Y, Z) 5.75/2.38 5.75/2.38 The TRS R consists of the following rules: 5.75/2.38 5.75/2.38 flatten_in_ga(cons(cons(U, V), W), X) -> U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X)) 5.75/2.38 U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) -> flatten_out_ga(cons(cons(U, V), W), X) 5.75/2.38 flatten_in_ga(cons(atom(X), U), .(X, Y)) -> U1_ga(X, U, Y, flatten_in_ga(U, Y)) 5.75/2.38 U1_ga(X, U, Y, flatten_out_ga(U, Y)) -> flatten_out_ga(cons(atom(X), U), .(X, Y)) 5.75/2.38 flatten_in_ga(atom(X), .(X, [])) -> flatten_out_ga(atom(X), .(X, [])) 5.75/2.38 5.75/2.38 The argument filtering Pi contains the following mapping: 5.75/2.38 atom(x1) = atom(x1) 5.75/2.38 5.75/2.38 cons(x1, x2) = cons(x1, x2) 5.75/2.38 5.75/2.38 flatten_in_ga(x1, x2) = flatten_in_ga(x1) 5.75/2.38 5.75/2.38 flatten_out_ga(x1, x2) = flatten_out_ga(x2) 5.75/2.38 5.75/2.38 U1_ga(x1, x2, x3, x4) = U1_ga(x1, x4) 5.75/2.38 5.75/2.38 U2_ga(x1, x2, x3, x4, x5) = U2_ga(x5) 5.75/2.38 5.75/2.38 .(x1, x2) = .(x1, x2) 5.75/2.38 5.75/2.38 s(x1) = s(x1) 5.75/2.38 5.75/2.38 COUNT_IN_GA(x1, x2) = COUNT_IN_GA(x1) 5.75/2.38 5.75/2.38 U4_GA(x1, x2, x3, x4, x5) = U4_GA(x5) 5.75/2.38 5.75/2.38 5.75/2.38 We have to consider all (P,R,Pi)-chains 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (19) PiDPToQDPProof (SOUND) 5.75/2.38 Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (20) 5.75/2.38 Obligation: 5.75/2.38 Q DP problem: 5.75/2.38 The TRS P consists of the following rules: 5.75/2.38 5.75/2.38 COUNT_IN_GA(cons(cons(U, V), W)) -> U4_GA(flatten_in_ga(cons(cons(U, V), W))) 5.75/2.38 U4_GA(flatten_out_ga(X)) -> COUNT_IN_GA(X) 5.75/2.38 COUNT_IN_GA(cons(atom(X), Y)) -> COUNT_IN_GA(Y) 5.75/2.38 5.75/2.38 The TRS R consists of the following rules: 5.75/2.38 5.75/2.38 flatten_in_ga(cons(cons(U, V), W)) -> U2_ga(flatten_in_ga(cons(U, cons(V, W)))) 5.75/2.38 U2_ga(flatten_out_ga(X)) -> flatten_out_ga(X) 5.75/2.38 flatten_in_ga(cons(atom(X), U)) -> U1_ga(X, flatten_in_ga(U)) 5.75/2.38 U1_ga(X, flatten_out_ga(Y)) -> flatten_out_ga(.(X, Y)) 5.75/2.38 flatten_in_ga(atom(X)) -> flatten_out_ga(.(X, [])) 5.75/2.38 5.75/2.38 The set Q consists of the following terms: 5.75/2.38 5.75/2.38 flatten_in_ga(x0) 5.75/2.38 U2_ga(x0) 5.75/2.38 U1_ga(x0, x1) 5.75/2.38 5.75/2.38 We have to consider all (P,Q,R)-chains. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (21) UsableRulesReductionPairsProof (EQUIVALENT) 5.75/2.38 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. 5.75/2.38 5.75/2.38 The following dependency pairs can be deleted: 5.75/2.38 5.75/2.38 COUNT_IN_GA(cons(cons(U, V), W)) -> U4_GA(flatten_in_ga(cons(cons(U, V), W))) 5.75/2.38 COUNT_IN_GA(cons(atom(X), Y)) -> COUNT_IN_GA(Y) 5.75/2.38 The following rules are removed from R: 5.75/2.38 5.75/2.38 flatten_in_ga(cons(atom(X), U)) -> U1_ga(X, flatten_in_ga(U)) 5.75/2.38 flatten_in_ga(atom(X)) -> flatten_out_ga(.(X, [])) 5.75/2.38 Used ordering: POLO with Polynomial interpretation [POLO]: 5.75/2.38 5.75/2.38 POL(.(x_1, x_2)) = 1 + x_1 + x_2 5.75/2.38 POL(COUNT_IN_GA(x_1)) = 1 + x_1 5.75/2.38 POL(U1_ga(x_1, x_2)) = 1 + x_1 + x_2 5.75/2.38 POL(U2_ga(x_1)) = x_1 5.75/2.38 POL(U4_GA(x_1)) = x_1 5.75/2.38 POL([]) = 0 5.75/2.38 POL(atom(x_1)) = 2 + x_1 5.75/2.38 POL(cons(x_1, x_2)) = x_1 + x_2 5.75/2.38 POL(flatten_in_ga(x_1)) = x_1 5.75/2.38 POL(flatten_out_ga(x_1)) = 1 + x_1 5.75/2.38 5.75/2.38 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (22) 5.75/2.38 Obligation: 5.75/2.38 Q DP problem: 5.75/2.38 The TRS P consists of the following rules: 5.75/2.38 5.75/2.38 U4_GA(flatten_out_ga(X)) -> COUNT_IN_GA(X) 5.75/2.38 5.75/2.38 The TRS R consists of the following rules: 5.75/2.38 5.75/2.38 flatten_in_ga(cons(cons(U, V), W)) -> U2_ga(flatten_in_ga(cons(U, cons(V, W)))) 5.75/2.38 U2_ga(flatten_out_ga(X)) -> flatten_out_ga(X) 5.75/2.38 U1_ga(X, flatten_out_ga(Y)) -> flatten_out_ga(.(X, Y)) 5.75/2.38 5.75/2.38 The set Q consists of the following terms: 5.75/2.38 5.75/2.38 flatten_in_ga(x0) 5.75/2.38 U2_ga(x0) 5.75/2.38 U1_ga(x0, x1) 5.75/2.38 5.75/2.38 We have to consider all (P,Q,R)-chains. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (23) DependencyGraphProof (EQUIVALENT) 5.75/2.38 The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node. 5.75/2.38 ---------------------------------------- 5.75/2.38 5.75/2.38 (24) 5.75/2.38 TRUE 6.08/2.47 EOF