/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Termination w.r.t. Q of the given QTRS could be proven: (0) QTRS (1) Overlay + Local Confluence [EQUIVALENT, 0 ms] (2) QTRS (3) DependencyPairsProof [EQUIVALENT, 0 ms] (4) QDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) AND (7) QDP (8) UsableRulesProof [EQUIVALENT, 0 ms] (9) QDP (10) QReductionProof [EQUIVALENT, 0 ms] (11) QDP (12) QDPSizeChangeProof [EQUIVALENT, 0 ms] (13) YES (14) QDP (15) UsableRulesProof [EQUIVALENT, 0 ms] (16) QDP (17) QReductionProof [EQUIVALENT, 0 ms] (18) QDP (19) QDPSizeChangeProof [EQUIVALENT, 0 ms] (20) YES (21) QDP (22) UsableRulesProof [EQUIVALENT, 0 ms] (23) QDP (24) QReductionProof [EQUIVALENT, 0 ms] (25) QDP (26) QDPSizeChangeProof [EQUIVALENT, 0 ms] (27) YES (28) QDP (29) UsableRulesProof [EQUIVALENT, 0 ms] (30) QDP (31) QReductionProof [EQUIVALENT, 0 ms] (32) QDP (33) Induction-Processor [SOUND, 59 ms] (34) AND (35) QDP (36) PisEmptyProof [EQUIVALENT, 0 ms] (37) YES (38) QTRS (39) QTRSRRRProof [EQUIVALENT, 64 ms] (40) QTRS (41) QTRSRRRProof [EQUIVALENT, 0 ms] (42) QTRS (43) RisEmptyProof [EQUIVALENT, 0 ms] (44) YES ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) del(x, nil) -> nil del(x, cons(y, xs)) -> if(eq(x, y), x, y, xs) if(true, x, y, xs) -> xs if(false, x, y, xs) -> cons(y, del(x, xs)) eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) reverse(nil) -> nil reverse(cons(x, xs)) -> cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs)))) Q is empty. ---------------------------------------- (1) Overlay + Local Confluence (EQUIVALENT) The TRS is overlay and locally confluent. By [NOC] we can switch to innermost. ---------------------------------------- (2) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) del(x, nil) -> nil del(x, cons(y, xs)) -> if(eq(x, y), x, y, xs) if(true, x, y, xs) -> xs if(false, x, y, xs) -> cons(y, del(x, xs)) eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) reverse(nil) -> nil reverse(cons(x, xs)) -> cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs)))) The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) ---------------------------------------- (3) DependencyPairsProof (EQUIVALENT) Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem. ---------------------------------------- (4) Obligation: Q DP problem: The TRS P consists of the following rules: LAST(cons(x, cons(y, xs))) -> LAST(cons(y, xs)) DEL(x, cons(y, xs)) -> IF(eq(x, y), x, y, xs) DEL(x, cons(y, xs)) -> EQ(x, y) IF(false, x, y, xs) -> DEL(x, xs) EQ(s(x), s(y)) -> EQ(x, y) REVERSE(cons(x, xs)) -> LAST(cons(x, xs)) REVERSE(cons(x, xs)) -> REVERSE(del(last(cons(x, xs)), cons(x, xs))) REVERSE(cons(x, xs)) -> DEL(last(cons(x, xs)), cons(x, xs)) The TRS R consists of the following rules: last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) del(x, nil) -> nil del(x, cons(y, xs)) -> if(eq(x, y), x, y, xs) if(true, x, y, xs) -> xs if(false, x, y, xs) -> cons(y, del(x, xs)) eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) reverse(nil) -> nil reverse(cons(x, xs)) -> cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs)))) The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 4 SCCs with 3 less nodes. ---------------------------------------- (6) Complex Obligation (AND) ---------------------------------------- (7) Obligation: Q DP problem: The TRS P consists of the following rules: EQ(s(x), s(y)) -> EQ(x, y) The TRS R consists of the following rules: last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) del(x, nil) -> nil del(x, cons(y, xs)) -> if(eq(x, y), x, y, xs) if(true, x, y, xs) -> xs if(false, x, y, xs) -> cons(y, del(x, xs)) eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) reverse(nil) -> nil reverse(cons(x, xs)) -> cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs)))) The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (8) 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. ---------------------------------------- (9) Obligation: Q DP problem: The TRS P consists of the following rules: EQ(s(x), s(y)) -> EQ(x, y) R is empty. The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (10) 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]. last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) ---------------------------------------- (11) Obligation: Q DP problem: The TRS P consists of the following rules: EQ(s(x), s(y)) -> EQ(x, y) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (12) QDPSizeChangeProof (EQUIVALENT) 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: *EQ(s(x), s(y)) -> EQ(x, y) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (13) YES ---------------------------------------- (14) Obligation: Q DP problem: The TRS P consists of the following rules: IF(false, x, y, xs) -> DEL(x, xs) DEL(x, cons(y, xs)) -> IF(eq(x, y), x, y, xs) The TRS R consists of the following rules: last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) del(x, nil) -> nil del(x, cons(y, xs)) -> if(eq(x, y), x, y, xs) if(true, x, y, xs) -> xs if(false, x, y, xs) -> cons(y, del(x, xs)) eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) reverse(nil) -> nil reverse(cons(x, xs)) -> cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs)))) The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) We have to consider all minimal (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: IF(false, x, y, xs) -> DEL(x, xs) DEL(x, cons(y, xs)) -> IF(eq(x, y), x, y, xs) The TRS R consists of the following rules: eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) We have to consider all minimal (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]. last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) reverse(nil) reverse(cons(x0, x1)) ---------------------------------------- (18) Obligation: Q DP problem: The TRS P consists of the following rules: IF(false, x, y, xs) -> DEL(x, xs) DEL(x, cons(y, xs)) -> IF(eq(x, y), x, y, xs) The TRS R consists of the following rules: eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) The set Q consists of the following terms: eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (19) QDPSizeChangeProof (EQUIVALENT) 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: *DEL(x, cons(y, xs)) -> IF(eq(x, y), x, y, xs) The graph contains the following edges 1 >= 2, 2 > 3, 2 > 4 *IF(false, x, y, xs) -> DEL(x, xs) The graph contains the following edges 2 >= 1, 4 >= 2 ---------------------------------------- (20) YES ---------------------------------------- (21) Obligation: Q DP problem: The TRS P consists of the following rules: LAST(cons(x, cons(y, xs))) -> LAST(cons(y, xs)) The TRS R consists of the following rules: last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) del(x, nil) -> nil del(x, cons(y, xs)) -> if(eq(x, y), x, y, xs) if(true, x, y, xs) -> xs if(false, x, y, xs) -> cons(y, del(x, xs)) eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) reverse(nil) -> nil reverse(cons(x, xs)) -> cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs)))) The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (22) 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. ---------------------------------------- (23) Obligation: Q DP problem: The TRS P consists of the following rules: LAST(cons(x, cons(y, xs))) -> LAST(cons(y, xs)) R is empty. The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (24) 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]. last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) ---------------------------------------- (25) Obligation: Q DP problem: The TRS P consists of the following rules: LAST(cons(x, cons(y, xs))) -> LAST(cons(y, xs)) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (26) QDPSizeChangeProof (EQUIVALENT) 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: *LAST(cons(x, cons(y, xs))) -> LAST(cons(y, xs)) The graph contains the following edges 1 > 1 ---------------------------------------- (27) YES ---------------------------------------- (28) Obligation: Q DP problem: The TRS P consists of the following rules: REVERSE(cons(x, xs)) -> REVERSE(del(last(cons(x, xs)), cons(x, xs))) The TRS R consists of the following rules: last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) del(x, nil) -> nil del(x, cons(y, xs)) -> if(eq(x, y), x, y, xs) if(true, x, y, xs) -> xs if(false, x, y, xs) -> cons(y, del(x, xs)) eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) reverse(nil) -> nil reverse(cons(x, xs)) -> cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs)))) The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (29) 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. ---------------------------------------- (30) Obligation: Q DP problem: The TRS P consists of the following rules: REVERSE(cons(x, xs)) -> REVERSE(del(last(cons(x, xs)), cons(x, xs))) The TRS R consists of the following rules: last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) del(x, cons(y, xs)) -> if(eq(x, y), x, y, xs) eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) if(true, x, y, xs) -> xs if(false, x, y, xs) -> cons(y, del(x, xs)) del(x, nil) -> nil The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) reverse(nil) reverse(cons(x0, x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (31) 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]. reverse(nil) reverse(cons(x0, x1)) ---------------------------------------- (32) Obligation: Q DP problem: The TRS P consists of the following rules: REVERSE(cons(x, xs)) -> REVERSE(del(last(cons(x, xs)), cons(x, xs))) The TRS R consists of the following rules: last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) del(x, cons(y, xs)) -> if(eq(x, y), x, y, xs) eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) if(true, x, y, xs) -> xs if(false, x, y, xs) -> cons(y, del(x, xs)) del(x, nil) -> nil The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (33) Induction-Processor (SOUND) This DP could be deleted by the Induction-Processor: REVERSE(cons(x, xs)) -> REVERSE(del(last(cons(x, xs)), cons(x, xs))) This order was computed: Polynomial interpretation [POLO]: POL(0) = 0 POL(REVERSE(x_1)) = x_1 POL(cons(x_1, x_2)) = 1 + 2*x_1 + 2*x_2 POL(del(x_1, x_2)) = x_2 POL(eq(x_1, x_2)) = 0 POL(false_renamed) = 0 POL(if(x_1, x_2, x_3, x_4)) = 1 + 2*x_3 + 2*x_4 POL(last(x_1)) = 2*x_1 POL(nil) = 0 POL(s(x_1)) = 3*x_1 POL(true_renamed) = 0 At least one of these decreasing rules is always used after the deleted DP: if(true_renamed, x4, y2, xs1) -> xs1 The following formula is valid: z0:sort[a25].(~(z0=nil)->del'(last(z0), z0)=true) The transformed set: del'(x1, cons(y', xs'')) -> if'(eq(x1, y'), x1, y', xs'') if'(true_renamed, x4, y2, xs1) -> true if'(false_renamed, x5, y3, xs2) -> del'(x5, xs2) del'(x6, nil) -> false last(cons(x', nil)) -> x' last(cons(x'', cons(y, xs'))) -> last(cons(y, xs')) del(x1, cons(y', xs'')) -> if(eq(x1, y'), x1, y', xs'') eq(0, 0) -> true_renamed eq(0, s(y'')) -> false_renamed eq(s(x2), 0) -> false_renamed eq(s(x3), s(y1)) -> eq(x3, y1) if(true_renamed, x4, y2, xs1) -> xs1 if(false_renamed, x5, y3, xs2) -> cons(y3, del(x5, xs2)) del(x6, nil) -> nil last(nil) -> 0 equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v18)) -> false equal_sort[a0](s(v19), 0) -> false equal_sort[a0](s(v19), s(v20)) -> equal_sort[a0](v19, v20) equal_sort[a25](cons(v21, v22), cons(v23, v24)) -> and(equal_sort[a0](v21, v23), equal_sort[a25](v22, v24)) equal_sort[a25](cons(v21, v22), nil) -> false equal_sort[a25](nil, cons(v25, v26)) -> false equal_sort[a25](nil, nil) -> true equal_sort[a36](true_renamed, true_renamed) -> true equal_sort[a36](true_renamed, false_renamed) -> false equal_sort[a36](false_renamed, true_renamed) -> false equal_sort[a36](false_renamed, false_renamed) -> true equal_sort[a43](witness_sort[a43], witness_sort[a43]) -> true The proof given by the theorem prover: The following output was given by the internal theorem prover:proof of internal # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Partial correctness of the following Program [x, v18, v19, v20, v21, v22, v23, v24, v25, v26, x4, y2, xs1, x5, y3, y', xs'', x6, x1, x', x'', y, xs', y'', x2, x3, y1] equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true true and x -> x false and x -> false true or x -> true false or x -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v18)) -> false equal_sort[a0](s(v19), 0) -> false equal_sort[a0](s(v19), s(v20)) -> equal_sort[a0](v19, v20) equal_sort[a25](cons(v21, v22), cons(v23, v24)) -> equal_sort[a0](v21, v23) and equal_sort[a25](v22, v24) equal_sort[a25](cons(v21, v22), nil) -> false equal_sort[a25](nil, cons(v25, v26)) -> false equal_sort[a25](nil, nil) -> true equal_sort[a36](true_renamed, true_renamed) -> true equal_sort[a36](true_renamed, false_renamed) -> false equal_sort[a36](false_renamed, true_renamed) -> false equal_sort[a36](false_renamed, false_renamed) -> true equal_sort[a43](witness_sort[a43], witness_sort[a43]) -> true if'(true_renamed, x4, y2, xs1) -> true if'(false_renamed, x5, y3, cons(y', xs'')) -> if'(eq(x5, y'), x5, y', xs'') if'(false_renamed, x5, y3, nil) -> false del'(x6, nil) -> false equal_sort[a36](eq(x1, y'), true_renamed) -> true | del'(x1, cons(y', xs'')) -> true equal_sort[a36](eq(x1, y'), true_renamed) -> false | del'(x1, cons(y', xs'')) -> del'(x1, xs'') last(cons(x', nil)) -> x' last(cons(x'', cons(y, xs'))) -> last(cons(y, xs')) last(nil) -> 0 eq(0, 0) -> true_renamed eq(0, s(y'')) -> false_renamed eq(s(x2), 0) -> false_renamed eq(s(x3), s(y1)) -> eq(x3, y1) if(true_renamed, x4, y2, xs1) -> xs1 if(false_renamed, x5, y3, cons(y', xs'')) -> cons(y3, if(eq(x5, y'), x5, y', xs'')) if(false_renamed, x5, y3, nil) -> cons(y3, nil) del(x6, nil) -> nil equal_sort[a36](eq(x1, y'), true_renamed) -> true | del(x1, cons(y', xs'')) -> xs'' equal_sort[a36](eq(x1, y'), true_renamed) -> false | del(x1, cons(y', xs'')) -> cons(y', del(x1, xs'')) using the following formula: z0:sort[a25].(~(z0=nil)->del'(last(z0), z0)=true) could be successfully shown: (0) Formula (1) Induction by algorithm [EQUIVALENT, 0 ms] (2) AND (3) Formula (4) Symbolic evaluation [EQUIVALENT, 0 ms] (5) Formula (6) Induction by data structure [EQUIVALENT, 0 ms] (7) AND (8) Formula (9) Symbolic evaluation [EQUIVALENT, 0 ms] (10) YES (11) Formula (12) Conditional Evaluation [EQUIVALENT, 0 ms] (13) AND (14) Formula (15) Symbolic evaluation [EQUIVALENT, 0 ms] (16) YES (17) Formula (18) Symbolic evaluation [EQUIVALENT, 0 ms] (19) Formula (20) Hypothesis Lifting [EQUIVALENT, 0 ms] (21) Formula (22) Symbolic evaluation under hypothesis [SOUND, 0 ms] (23) Formula (24) Hypothesis Lifting [EQUIVALENT, 0 ms] (25) Formula (26) Hypothesis Lifting [EQUIVALENT, 0 ms] (27) Formula (28) Conditional Evaluation [EQUIVALENT, 0 ms] (29) AND (30) Formula (31) Symbolic evaluation under hypothesis [EQUIVALENT, 0 ms] (32) YES (33) Formula (34) Symbolic evaluation [EQUIVALENT, 0 ms] (35) YES (36) Formula (37) Symbolic evaluation [EQUIVALENT, 0 ms] (38) YES (39) Formula (40) Symbolic evaluation [EQUIVALENT, 0 ms] (41) Formula (42) Conditional Evaluation [EQUIVALENT, 0 ms] (43) AND (44) Formula (45) Symbolic evaluation [EQUIVALENT, 0 ms] (46) YES (47) Formula (48) Symbolic evaluation under hypothesis [EQUIVALENT, 0 ms] (49) YES ---------------------------------------- (0) Obligation: Formula: z0:sort[a25].(~(z0=nil)->del'(last(z0), z0)=true) There are no hypotheses. ---------------------------------------- (1) Induction by algorithm (EQUIVALENT) Induction by algorithm last(z0) generates the following cases: 1. Base Case: Formula: x':sort[a0].(~(cons(x', nil)=nil)->del'(last(cons(x', nil)), cons(x', nil))=true) There are no hypotheses. 2. Base Case: Formula: (~(nil=nil)->del'(last(nil), nil)=true) There are no hypotheses. 1. Step Case: Formula: x'':sort[a0],y:sort[a0],xs':sort[a25].(~(cons(x'', cons(y, xs'))=nil)->del'(last(cons(x'', cons(y, xs'))), cons(x'', cons(y, xs')))=true) Hypotheses: y:sort[a0],xs':sort[a25].del'(last(cons(y, xs')), cons(y, xs'))=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: x':sort[a0].(~(cons(x', nil)=nil)->del'(last(cons(x', nil)), cons(x', nil))=true) There are no hypotheses. ---------------------------------------- (4) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (5) Obligation: Formula: x':sort[a0].del'(x', cons(x', nil))=true There are no hypotheses. ---------------------------------------- (6) Induction by data structure (EQUIVALENT) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: del'(0, cons(0, nil))=true There are no hypotheses. 1. Step Case: Formula: n:sort[a0].del'(s(n), cons(s(n), nil))=true Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true ---------------------------------------- (7) Complex Obligation (AND) ---------------------------------------- (8) Obligation: Formula: del'(0, cons(0, nil))=true There are no hypotheses. ---------------------------------------- (9) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (10) YES ---------------------------------------- (11) Obligation: Formula: n:sort[a0].del'(s(n), cons(s(n), nil))=true Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true ---------------------------------------- (12) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: true=true Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](eq(s(n), s(n)), true_renamed)=true Formula: n:sort[a0].del'(s(n), nil)=true Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](eq(s(n), s(n)), true_renamed)=false ---------------------------------------- (13) Complex Obligation (AND) ---------------------------------------- (14) Obligation: Formula: true=true Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](eq(s(n), s(n)), true_renamed)=true ---------------------------------------- (15) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (16) YES ---------------------------------------- (17) Obligation: Formula: n:sort[a0].del'(s(n), nil)=true Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](eq(s(n), s(n)), true_renamed)=false ---------------------------------------- (18) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (19) Obligation: Formula: False Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](eq(s(n), s(n)), true_renamed)=false ---------------------------------------- (20) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].((del'(n, cons(n, nil))=true/\equal_sort[a36](eq(s(n), s(n)), true_renamed)=false)->False) Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](eq(s(n), s(n)), true_renamed)=false ---------------------------------------- (21) Obligation: Formula: n:sort[a0].((del'(n, cons(n, nil))=true/\equal_sort[a36](eq(s(n), s(n)), true_renamed)=false)->False) Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](eq(s(n), s(n)), true_renamed)=false ---------------------------------------- (22) Symbolic evaluation under hypothesis (SOUND) Could be reduced by symbolic evaluation under hypothesis to: n:sort[a0].~(equal_sort[a36](eq(n, n), true_renamed)=false) By using the following hypotheses: n:sort[a0].del'(n, cons(n, nil))=true ---------------------------------------- (23) Obligation: Formula: n:sort[a0].~(equal_sort[a36](eq(n, n), true_renamed)=false) Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](eq(s(n), s(n)), true_renamed)=false ---------------------------------------- (24) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(equal_sort[a36](eq(n, n), true_renamed)=false->~(equal_sort[a36](eq(n, n), true_renamed)=false)) Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true ---------------------------------------- (25) Obligation: Formula: n:sort[a0].(equal_sort[a36](eq(n, n), true_renamed)=false->~(equal_sort[a36](eq(n, n), true_renamed)=false)) Hypotheses: n:sort[a0].del'(n, cons(n, nil))=true ---------------------------------------- (26) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(del'(n, cons(n, nil))=true->(equal_sort[a36](eq(n, n), true_renamed)=false->~(equal_sort[a36](eq(n, n), true_renamed)=false))) There are no hypotheses. ---------------------------------------- (27) Obligation: Formula: n:sort[a0].(del'(n, cons(n, nil))=true->(equal_sort[a36](eq(n, n), true_renamed)=false->~(equal_sort[a36](eq(n, n), true_renamed)=false))) There are no hypotheses. ---------------------------------------- (28) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: n:sort[a0].(true=true->(equal_sort[a36](eq(n, n), true_renamed)=false->~(equal_sort[a36](eq(n, n), true_renamed)=false))) Hypotheses: n:sort[a0].equal_sort[a36](eq(n, n), true_renamed)=true Formula: n:sort[a0].(del'(n, nil)=true->(equal_sort[a36](eq(n, n), true_renamed)=false->~(equal_sort[a36](eq(n, n), true_renamed)=false))) Hypotheses: n:sort[a0].equal_sort[a36](eq(n, n), true_renamed)=false ---------------------------------------- (29) Complex Obligation (AND) ---------------------------------------- (30) Obligation: Formula: n:sort[a0].(true=true->(equal_sort[a36](eq(n, n), true_renamed)=false->~(equal_sort[a36](eq(n, n), true_renamed)=false))) Hypotheses: n:sort[a0].equal_sort[a36](eq(n, n), true_renamed)=true ---------------------------------------- (31) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n:sort[a0].equal_sort[a36](eq(n, n), true_renamed)=true ---------------------------------------- (32) YES ---------------------------------------- (33) Obligation: Formula: n:sort[a0].(del'(n, nil)=true->(equal_sort[a36](eq(n, n), true_renamed)=false->~(equal_sort[a36](eq(n, n), true_renamed)=false))) Hypotheses: n:sort[a0].equal_sort[a36](eq(n, n), true_renamed)=false ---------------------------------------- (34) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (35) YES ---------------------------------------- (36) Obligation: Formula: (~(nil=nil)->del'(last(nil), nil)=true) There are no hypotheses. ---------------------------------------- (37) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (38) YES ---------------------------------------- (39) Obligation: Formula: x'':sort[a0],y:sort[a0],xs':sort[a25].(~(cons(x'', cons(y, xs'))=nil)->del'(last(cons(x'', cons(y, xs'))), cons(x'', cons(y, xs')))=true) Hypotheses: y:sort[a0],xs':sort[a25].del'(last(cons(y, xs')), cons(y, xs'))=true ---------------------------------------- (40) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (41) Obligation: Formula: y:sort[a0],xs':sort[a25],x'':sort[a0].del'(last(cons(y, xs')), cons(x'', cons(y, xs')))=true Hypotheses: y:sort[a0],xs':sort[a25].del'(last(cons(y, xs')), cons(y, xs'))=true ---------------------------------------- (42) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: true=true Hypotheses: y:sort[a0],xs':sort[a25].del'(last(cons(y, xs')), cons(y, xs'))=true y:sort[a0],xs':sort[a25],x'':sort[a0].equal_sort[a36](eq(last(cons(y, xs')), x''), true_renamed)=true Formula: y:sort[a0],xs':sort[a25].del'(last(cons(y, xs')), cons(y, xs'))=true Hypotheses: y:sort[a0],xs':sort[a25].del'(last(cons(y, xs')), cons(y, xs'))=true y:sort[a0],xs':sort[a25],x'':sort[a0].equal_sort[a36](eq(last(cons(y, xs')), x''), true_renamed)=false ---------------------------------------- (43) Complex Obligation (AND) ---------------------------------------- (44) Obligation: Formula: true=true Hypotheses: y:sort[a0],xs':sort[a25].del'(last(cons(y, xs')), cons(y, xs'))=true y:sort[a0],xs':sort[a25],x'':sort[a0].equal_sort[a36](eq(last(cons(y, xs')), x''), true_renamed)=true ---------------------------------------- (45) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (46) YES ---------------------------------------- (47) Obligation: Formula: y:sort[a0],xs':sort[a25].del'(last(cons(y, xs')), cons(y, xs'))=true Hypotheses: y:sort[a0],xs':sort[a25].del'(last(cons(y, xs')), cons(y, xs'))=true y:sort[a0],xs':sort[a25],x'':sort[a0].equal_sort[a36](eq(last(cons(y, xs')), x''), true_renamed)=false ---------------------------------------- (48) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: y:sort[a0],xs':sort[a25].del'(last(cons(y, xs')), cons(y, xs'))=true ---------------------------------------- (49) YES ---------------------------------------- (34) Complex Obligation (AND) ---------------------------------------- (35) Obligation: Q DP problem: P is empty. The TRS R consists of the following rules: last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) del(x, cons(y, xs)) -> if(eq(x, y), x, y, xs) eq(0, 0) -> true eq(0, s(y)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) if(true, x, y, xs) -> xs if(false, x, y, xs) -> cons(y, del(x, xs)) del(x, nil) -> nil The set Q consists of the following terms: last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) del(x0, nil) del(x0, cons(x1, x2)) if(true, x0, x1, x2) if(false, x0, x1, x2) eq(0, 0) eq(0, s(x0)) eq(s(x0), 0) eq(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (36) PisEmptyProof (EQUIVALENT) The TRS P is empty. Hence, there is no (P,Q,R) chain. ---------------------------------------- (37) YES ---------------------------------------- (38) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: del'(x1, cons(y', xs'')) -> if'(eq(x1, y'), x1, y', xs'') if'(true_renamed, x4, y2, xs1) -> true if'(false_renamed, x5, y3, xs2) -> del'(x5, xs2) del'(x6, nil) -> false last(cons(x', nil)) -> x' last(cons(x'', cons(y, xs'))) -> last(cons(y, xs')) del(x1, cons(y', xs'')) -> if(eq(x1, y'), x1, y', xs'') eq(0, 0) -> true_renamed eq(0, s(y'')) -> false_renamed eq(s(x2), 0) -> false_renamed eq(s(x3), s(y1)) -> eq(x3, y1) if(true_renamed, x4, y2, xs1) -> xs1 if(false_renamed, x5, y3, xs2) -> cons(y3, del(x5, xs2)) del(x6, nil) -> nil last(nil) -> 0 equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v18)) -> false equal_sort[a0](s(v19), 0) -> false equal_sort[a0](s(v19), s(v20)) -> equal_sort[a0](v19, v20) equal_sort[a25](cons(v21, v22), cons(v23, v24)) -> and(equal_sort[a0](v21, v23), equal_sort[a25](v22, v24)) equal_sort[a25](cons(v21, v22), nil) -> false equal_sort[a25](nil, cons(v25, v26)) -> false equal_sort[a25](nil, nil) -> true equal_sort[a36](true_renamed, true_renamed) -> true equal_sort[a36](true_renamed, false_renamed) -> false equal_sort[a36](false_renamed, true_renamed) -> false equal_sort[a36](false_renamed, false_renamed) -> true equal_sort[a43](witness_sort[a43], witness_sort[a43]) -> true Q is empty. ---------------------------------------- (39) QTRSRRRProof (EQUIVALENT) Used ordering: del'/2(YES,YES) cons/2(YES,YES) if'/4(YES,YES,YES,YES) eq/2(YES,YES) true_renamed/0) true/0) false_renamed/0) nil/0) false/0) last/1)YES( del/2(YES,YES) if/4(YES,YES,YES,YES) 0/0) s/1)YES( equal_bool/2(YES,YES) and/2(YES,YES) or/2(YES,YES) not/1(YES) isa_true/1(YES) isa_false/1(YES) equal_sort[a0]/2(YES,YES) equal_sort[a25]/2(YES,YES) equal_sort[a36]/2(YES,YES) equal_sort[a43]/2(YES,YES) witness_sort[a43]/0) Quasi precedence: [del'_2, if'_4, eq_2, false_renamed, nil, del_2, if_4, 0] > cons_2 [del'_2, if'_4, eq_2, false_renamed, nil, del_2, if_4, 0] > [true_renamed, false, not_1, isa_false_1, equal_sort[a0]_2] > true or_2 > true isa_true_1 > [true_renamed, false, not_1, isa_false_1, equal_sort[a0]_2] > true equal_sort[a25]_2 > and_2 > [true_renamed, false, not_1, isa_false_1, equal_sort[a0]_2] > true equal_sort[a43]_2 > true Status: del'_2: [1,2] cons_2: multiset status if'_4: [2,4,3,1] eq_2: [1,2] true_renamed: multiset status true: multiset status false_renamed: multiset status nil: multiset status false: multiset status del_2: [1,2] if_4: [2,4,1,3] 0: multiset status equal_bool_2: multiset status and_2: [2,1] or_2: [2,1] not_1: [1] isa_true_1: [1] isa_false_1: [1] equal_sort[a0]_2: multiset status equal_sort[a25]_2: multiset status equal_sort[a36]_2: [2,1] equal_sort[a43]_2: multiset status witness_sort[a43]: multiset status With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: del'(x1, cons(y', xs'')) -> if'(eq(x1, y'), x1, y', xs'') if'(true_renamed, x4, y2, xs1) -> true if'(false_renamed, x5, y3, xs2) -> del'(x5, xs2) del'(x6, nil) -> false last(cons(x', nil)) -> x' last(cons(x'', cons(y, xs'))) -> last(cons(y, xs')) del(x1, cons(y', xs'')) -> if(eq(x1, y'), x1, y', xs'') eq(0, 0) -> true_renamed eq(0, s(y'')) -> false_renamed eq(s(x2), 0) -> false_renamed if(true_renamed, x4, y2, xs1) -> xs1 if(false_renamed, x5, y3, xs2) -> cons(y3, del(x5, xs2)) del(x6, nil) -> nil equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v18)) -> false equal_sort[a0](s(v19), 0) -> false equal_sort[a25](cons(v21, v22), cons(v23, v24)) -> and(equal_sort[a0](v21, v23), equal_sort[a25](v22, v24)) equal_sort[a25](cons(v21, v22), nil) -> false equal_sort[a25](nil, cons(v25, v26)) -> false equal_sort[a25](nil, nil) -> true equal_sort[a36](true_renamed, true_renamed) -> true equal_sort[a36](true_renamed, false_renamed) -> false equal_sort[a36](false_renamed, true_renamed) -> false equal_sort[a36](false_renamed, false_renamed) -> true equal_sort[a43](witness_sort[a43], witness_sort[a43]) -> true ---------------------------------------- (40) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: eq(s(x3), s(y1)) -> eq(x3, y1) last(nil) -> 0 equal_sort[a0](s(v19), s(v20)) -> equal_sort[a0](v19, v20) Q is empty. ---------------------------------------- (41) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(0) = 2 POL(eq(x_1, x_2)) = 2*x_1 + 2*x_2 POL(equal_sort[a0](x_1, x_2)) = 2*x_1 + x_2 POL(last(x_1)) = 1 + 2*x_1 POL(nil) = 1 POL(s(x_1)) = 2 + x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: eq(s(x3), s(y1)) -> eq(x3, y1) last(nil) -> 0 equal_sort[a0](s(v19), s(v20)) -> equal_sort[a0](v19, v20) ---------------------------------------- (42) Obligation: Q restricted rewrite system: R is empty. Q is empty. ---------------------------------------- (43) RisEmptyProof (EQUIVALENT) The TRS R is empty. Hence, termination is trivially proven. ---------------------------------------- (44) YES