WORST_CASE(Omega(n^2),O(n^2)) proof of input_s6WwmpsyUB.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^2). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (4) CdtProblem (5) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 63 ms] (8) CdtProblem (9) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 33 ms] (10) CdtProblem (11) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (12) BOUNDS(1, 1) (13) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CdtProblem (15) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRelTRS (17) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRelTRS (19) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (20) typed CpxTrs (21) OrderProof [LOWER BOUND(ID), 6 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 293 ms] (24) BEST (25) proven lower bound (26) LowerBoundPropagationProof [FINISHED, 0 ms] (27) BOUNDS(n^1, INF) (28) typed CpxTrs (29) RewriteLemmaProof [LOWER BOUND(ID), 63 ms] (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 10 ms] (32) typed CpxTrs (33) RewriteLemmaProof [LOWER BOUND(ID), 733 ms] (34) proven lower bound (35) LowerBoundPropagationProof [FINISHED, 0 ms] (36) BOUNDS(n^2, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^2). The TRS R consists of the following rules: naiverev(Cons(x, xs)) -> app(naiverev(xs), Cons(x, Nil)) app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False naiverev(Nil) -> Nil app(Nil, ys) -> ys goal(xs) -> naiverev(xs) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) S tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) K tuples:none Defined Rule Symbols: naiverev_1, app_2, notEmpty_1, goal_1 Defined Pair Symbols: NAIVEREV_1, APP_2, NOTEMPTY_1, GOAL_1 Compound Symbols: c_2, c1, c2_1, c3, c4, c5, c6_1 ---------------------------------------- (3) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: GOAL(z0) -> c6(NAIVEREV(z0)) Removed 4 trailing nodes: NAIVEREV(Nil) -> c1 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 APP(Nil, z0) -> c3 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) S tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) K tuples:none Defined Rule Symbols: naiverev_1, app_2, notEmpty_1, goal_1 Defined Pair Symbols: NAIVEREV_1, APP_2 Compound Symbols: c_2, c2_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 Tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) S tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) K tuples:none Defined Rule Symbols: naiverev_1, app_2 Defined Pair Symbols: NAIVEREV_1, APP_2 Compound Symbols: c_2, c2_1 ---------------------------------------- (7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) We considered the (Usable) Rules:none And the Tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) The order we found is given by the following interpretation: Polynomial interpretation : POL(APP(x_1, x_2)) = x_2 POL(Cons(x_1, x_2)) = [1] + x_1 + x_2 POL(NAIVEREV(x_1)) = [2]x_1 POL(Nil) = 0 POL(app(x_1, x_2)) = [3] POL(c(x_1, x_2)) = x_1 + x_2 POL(c2(x_1)) = x_1 POL(naiverev(x_1)) = [3] ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 Tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) S tuples: APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) K tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) Defined Rule Symbols: naiverev_1, app_2 Defined Pair Symbols: NAIVEREV_1, APP_2 Compound Symbols: c_2, c2_1 ---------------------------------------- (9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) We considered the (Usable) Rules: naiverev(Nil) -> Nil naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) app(Nil, z0) -> z0 app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) And the Tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) The order we found is given by the following interpretation: Polynomial interpretation : POL(APP(x_1, x_2)) = x_1 POL(Cons(x_1, x_2)) = [2] + x_2 POL(NAIVEREV(x_1)) = x_1^2 POL(Nil) = 0 POL(app(x_1, x_2)) = x_1 + x_2 POL(c(x_1, x_2)) = x_1 + x_2 POL(c2(x_1)) = x_1 POL(naiverev(x_1)) = x_1 ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules: naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 Tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) S tuples:none K tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) Defined Rule Symbols: naiverev_1, app_2 Defined Pair Symbols: NAIVEREV_1, APP_2 Compound Symbols: c_2, c2_1 ---------------------------------------- (11) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (12) BOUNDS(1, 1) ---------------------------------------- (13) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules: naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) S tuples: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) K tuples:none Defined Rule Symbols: naiverev_1, app_2, notEmpty_1, goal_1 Defined Pair Symbols: NAIVEREV_1, APP_2, NOTEMPTY_1, GOAL_1 Compound Symbols: c_2, c1, c2_1, c3, c4, c5, c6_1 ---------------------------------------- (15) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (16) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) The (relative) TRS S consists of the following rules: naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Rewrite Strategy: INNERMOST ---------------------------------------- (17) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (18) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) The (relative) TRS S consists of the following rules: naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Rewrite Strategy: INNERMOST ---------------------------------------- (19) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (20) Obligation: Innermost TRS: Rules: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Types: NAIVEREV :: Cons:Nil -> c:c1 Cons :: a -> Cons:Nil -> Cons:Nil c :: c2:c3 -> c:c1 -> c:c1 APP :: Cons:Nil -> Cons:Nil -> c2:c3 naiverev :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil c1 :: c:c1 c2 :: c2:c3 -> c2:c3 c3 :: c2:c3 NOTEMPTY :: Cons:Nil -> c4:c5 c4 :: c4:c5 c5 :: c4:c5 GOAL :: Cons:Nil -> c6 c6 :: c:c1 -> c6 app :: Cons:Nil -> Cons:Nil -> Cons:Nil notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False goal :: Cons:Nil -> Cons:Nil hole_c:c11_7 :: c:c1 hole_Cons:Nil2_7 :: Cons:Nil hole_a3_7 :: a hole_c2:c34_7 :: c2:c3 hole_c4:c55_7 :: c4:c5 hole_c66_7 :: c6 hole_True:False7_7 :: True:False gen_c:c18_7 :: Nat -> c:c1 gen_Cons:Nil9_7 :: Nat -> Cons:Nil gen_c2:c310_7 :: Nat -> c2:c3 ---------------------------------------- (21) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: NAIVEREV, APP, naiverev, app They will be analysed ascendingly in the following order: APP < NAIVEREV naiverev < NAIVEREV app < naiverev ---------------------------------------- (22) Obligation: Innermost TRS: Rules: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Types: NAIVEREV :: Cons:Nil -> c:c1 Cons :: a -> Cons:Nil -> Cons:Nil c :: c2:c3 -> c:c1 -> c:c1 APP :: Cons:Nil -> Cons:Nil -> c2:c3 naiverev :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil c1 :: c:c1 c2 :: c2:c3 -> c2:c3 c3 :: c2:c3 NOTEMPTY :: Cons:Nil -> c4:c5 c4 :: c4:c5 c5 :: c4:c5 GOAL :: Cons:Nil -> c6 c6 :: c:c1 -> c6 app :: Cons:Nil -> Cons:Nil -> Cons:Nil notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False goal :: Cons:Nil -> Cons:Nil hole_c:c11_7 :: c:c1 hole_Cons:Nil2_7 :: Cons:Nil hole_a3_7 :: a hole_c2:c34_7 :: c2:c3 hole_c4:c55_7 :: c4:c5 hole_c66_7 :: c6 hole_True:False7_7 :: True:False gen_c:c18_7 :: Nat -> c:c1 gen_Cons:Nil9_7 :: Nat -> Cons:Nil gen_c2:c310_7 :: Nat -> c2:c3 Generator Equations: gen_c:c18_7(0) <=> c1 gen_c:c18_7(+(x, 1)) <=> c(c3, gen_c:c18_7(x)) gen_Cons:Nil9_7(0) <=> Nil gen_Cons:Nil9_7(+(x, 1)) <=> Cons(hole_a3_7, gen_Cons:Nil9_7(x)) gen_c2:c310_7(0) <=> c3 gen_c2:c310_7(+(x, 1)) <=> c2(gen_c2:c310_7(x)) The following defined symbols remain to be analysed: APP, NAIVEREV, naiverev, app They will be analysed ascendingly in the following order: APP < NAIVEREV naiverev < NAIVEREV app < naiverev ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: APP(gen_Cons:Nil9_7(n12_7), gen_Cons:Nil9_7(b)) -> gen_c2:c310_7(n12_7), rt in Omega(1 + n12_7) Induction Base: APP(gen_Cons:Nil9_7(0), gen_Cons:Nil9_7(b)) ->_R^Omega(1) c3 Induction Step: APP(gen_Cons:Nil9_7(+(n12_7, 1)), gen_Cons:Nil9_7(b)) ->_R^Omega(1) c2(APP(gen_Cons:Nil9_7(n12_7), gen_Cons:Nil9_7(b))) ->_IH c2(gen_c2:c310_7(c13_7)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Complex Obligation (BEST) ---------------------------------------- (25) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Types: NAIVEREV :: Cons:Nil -> c:c1 Cons :: a -> Cons:Nil -> Cons:Nil c :: c2:c3 -> c:c1 -> c:c1 APP :: Cons:Nil -> Cons:Nil -> c2:c3 naiverev :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil c1 :: c:c1 c2 :: c2:c3 -> c2:c3 c3 :: c2:c3 NOTEMPTY :: Cons:Nil -> c4:c5 c4 :: c4:c5 c5 :: c4:c5 GOAL :: Cons:Nil -> c6 c6 :: c:c1 -> c6 app :: Cons:Nil -> Cons:Nil -> Cons:Nil notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False goal :: Cons:Nil -> Cons:Nil hole_c:c11_7 :: c:c1 hole_Cons:Nil2_7 :: Cons:Nil hole_a3_7 :: a hole_c2:c34_7 :: c2:c3 hole_c4:c55_7 :: c4:c5 hole_c66_7 :: c6 hole_True:False7_7 :: True:False gen_c:c18_7 :: Nat -> c:c1 gen_Cons:Nil9_7 :: Nat -> Cons:Nil gen_c2:c310_7 :: Nat -> c2:c3 Generator Equations: gen_c:c18_7(0) <=> c1 gen_c:c18_7(+(x, 1)) <=> c(c3, gen_c:c18_7(x)) gen_Cons:Nil9_7(0) <=> Nil gen_Cons:Nil9_7(+(x, 1)) <=> Cons(hole_a3_7, gen_Cons:Nil9_7(x)) gen_c2:c310_7(0) <=> c3 gen_c2:c310_7(+(x, 1)) <=> c2(gen_c2:c310_7(x)) The following defined symbols remain to be analysed: APP, NAIVEREV, naiverev, app They will be analysed ascendingly in the following order: APP < NAIVEREV naiverev < NAIVEREV app < naiverev ---------------------------------------- (26) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (27) BOUNDS(n^1, INF) ---------------------------------------- (28) Obligation: Innermost TRS: Rules: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Types: NAIVEREV :: Cons:Nil -> c:c1 Cons :: a -> Cons:Nil -> Cons:Nil c :: c2:c3 -> c:c1 -> c:c1 APP :: Cons:Nil -> Cons:Nil -> c2:c3 naiverev :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil c1 :: c:c1 c2 :: c2:c3 -> c2:c3 c3 :: c2:c3 NOTEMPTY :: Cons:Nil -> c4:c5 c4 :: c4:c5 c5 :: c4:c5 GOAL :: Cons:Nil -> c6 c6 :: c:c1 -> c6 app :: Cons:Nil -> Cons:Nil -> Cons:Nil notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False goal :: Cons:Nil -> Cons:Nil hole_c:c11_7 :: c:c1 hole_Cons:Nil2_7 :: Cons:Nil hole_a3_7 :: a hole_c2:c34_7 :: c2:c3 hole_c4:c55_7 :: c4:c5 hole_c66_7 :: c6 hole_True:False7_7 :: True:False gen_c:c18_7 :: Nat -> c:c1 gen_Cons:Nil9_7 :: Nat -> Cons:Nil gen_c2:c310_7 :: Nat -> c2:c3 Lemmas: APP(gen_Cons:Nil9_7(n12_7), gen_Cons:Nil9_7(b)) -> gen_c2:c310_7(n12_7), rt in Omega(1 + n12_7) Generator Equations: gen_c:c18_7(0) <=> c1 gen_c:c18_7(+(x, 1)) <=> c(c3, gen_c:c18_7(x)) gen_Cons:Nil9_7(0) <=> Nil gen_Cons:Nil9_7(+(x, 1)) <=> Cons(hole_a3_7, gen_Cons:Nil9_7(x)) gen_c2:c310_7(0) <=> c3 gen_c2:c310_7(+(x, 1)) <=> c2(gen_c2:c310_7(x)) The following defined symbols remain to be analysed: app, NAIVEREV, naiverev They will be analysed ascendingly in the following order: naiverev < NAIVEREV app < naiverev ---------------------------------------- (29) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: app(gen_Cons:Nil9_7(n513_7), gen_Cons:Nil9_7(b)) -> gen_Cons:Nil9_7(+(n513_7, b)), rt in Omega(0) Induction Base: app(gen_Cons:Nil9_7(0), gen_Cons:Nil9_7(b)) ->_R^Omega(0) gen_Cons:Nil9_7(b) Induction Step: app(gen_Cons:Nil9_7(+(n513_7, 1)), gen_Cons:Nil9_7(b)) ->_R^Omega(0) Cons(hole_a3_7, app(gen_Cons:Nil9_7(n513_7), gen_Cons:Nil9_7(b))) ->_IH Cons(hole_a3_7, gen_Cons:Nil9_7(+(b, c514_7))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (30) Obligation: Innermost TRS: Rules: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Types: NAIVEREV :: Cons:Nil -> c:c1 Cons :: a -> Cons:Nil -> Cons:Nil c :: c2:c3 -> c:c1 -> c:c1 APP :: Cons:Nil -> Cons:Nil -> c2:c3 naiverev :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil c1 :: c:c1 c2 :: c2:c3 -> c2:c3 c3 :: c2:c3 NOTEMPTY :: Cons:Nil -> c4:c5 c4 :: c4:c5 c5 :: c4:c5 GOAL :: Cons:Nil -> c6 c6 :: c:c1 -> c6 app :: Cons:Nil -> Cons:Nil -> Cons:Nil notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False goal :: Cons:Nil -> Cons:Nil hole_c:c11_7 :: c:c1 hole_Cons:Nil2_7 :: Cons:Nil hole_a3_7 :: a hole_c2:c34_7 :: c2:c3 hole_c4:c55_7 :: c4:c5 hole_c66_7 :: c6 hole_True:False7_7 :: True:False gen_c:c18_7 :: Nat -> c:c1 gen_Cons:Nil9_7 :: Nat -> Cons:Nil gen_c2:c310_7 :: Nat -> c2:c3 Lemmas: APP(gen_Cons:Nil9_7(n12_7), gen_Cons:Nil9_7(b)) -> gen_c2:c310_7(n12_7), rt in Omega(1 + n12_7) app(gen_Cons:Nil9_7(n513_7), gen_Cons:Nil9_7(b)) -> gen_Cons:Nil9_7(+(n513_7, b)), rt in Omega(0) Generator Equations: gen_c:c18_7(0) <=> c1 gen_c:c18_7(+(x, 1)) <=> c(c3, gen_c:c18_7(x)) gen_Cons:Nil9_7(0) <=> Nil gen_Cons:Nil9_7(+(x, 1)) <=> Cons(hole_a3_7, gen_Cons:Nil9_7(x)) gen_c2:c310_7(0) <=> c3 gen_c2:c310_7(+(x, 1)) <=> c2(gen_c2:c310_7(x)) The following defined symbols remain to be analysed: naiverev, NAIVEREV They will be analysed ascendingly in the following order: naiverev < NAIVEREV ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: naiverev(gen_Cons:Nil9_7(n1454_7)) -> gen_Cons:Nil9_7(n1454_7), rt in Omega(0) Induction Base: naiverev(gen_Cons:Nil9_7(0)) ->_R^Omega(0) Nil Induction Step: naiverev(gen_Cons:Nil9_7(+(n1454_7, 1))) ->_R^Omega(0) app(naiverev(gen_Cons:Nil9_7(n1454_7)), Cons(hole_a3_7, Nil)) ->_IH app(gen_Cons:Nil9_7(c1455_7), Cons(hole_a3_7, Nil)) ->_L^Omega(0) gen_Cons:Nil9_7(+(n1454_7, +(0, 1))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (32) Obligation: Innermost TRS: Rules: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Types: NAIVEREV :: Cons:Nil -> c:c1 Cons :: a -> Cons:Nil -> Cons:Nil c :: c2:c3 -> c:c1 -> c:c1 APP :: Cons:Nil -> Cons:Nil -> c2:c3 naiverev :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil c1 :: c:c1 c2 :: c2:c3 -> c2:c3 c3 :: c2:c3 NOTEMPTY :: Cons:Nil -> c4:c5 c4 :: c4:c5 c5 :: c4:c5 GOAL :: Cons:Nil -> c6 c6 :: c:c1 -> c6 app :: Cons:Nil -> Cons:Nil -> Cons:Nil notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False goal :: Cons:Nil -> Cons:Nil hole_c:c11_7 :: c:c1 hole_Cons:Nil2_7 :: Cons:Nil hole_a3_7 :: a hole_c2:c34_7 :: c2:c3 hole_c4:c55_7 :: c4:c5 hole_c66_7 :: c6 hole_True:False7_7 :: True:False gen_c:c18_7 :: Nat -> c:c1 gen_Cons:Nil9_7 :: Nat -> Cons:Nil gen_c2:c310_7 :: Nat -> c2:c3 Lemmas: APP(gen_Cons:Nil9_7(n12_7), gen_Cons:Nil9_7(b)) -> gen_c2:c310_7(n12_7), rt in Omega(1 + n12_7) app(gen_Cons:Nil9_7(n513_7), gen_Cons:Nil9_7(b)) -> gen_Cons:Nil9_7(+(n513_7, b)), rt in Omega(0) naiverev(gen_Cons:Nil9_7(n1454_7)) -> gen_Cons:Nil9_7(n1454_7), rt in Omega(0) Generator Equations: gen_c:c18_7(0) <=> c1 gen_c:c18_7(+(x, 1)) <=> c(c3, gen_c:c18_7(x)) gen_Cons:Nil9_7(0) <=> Nil gen_Cons:Nil9_7(+(x, 1)) <=> Cons(hole_a3_7, gen_Cons:Nil9_7(x)) gen_c2:c310_7(0) <=> c3 gen_c2:c310_7(+(x, 1)) <=> c2(gen_c2:c310_7(x)) The following defined symbols remain to be analysed: NAIVEREV ---------------------------------------- (33) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: NAIVEREV(gen_Cons:Nil9_7(+(1, n1742_7))) -> *11_7, rt in Omega(n1742_7 + n1742_7^2) Induction Base: NAIVEREV(gen_Cons:Nil9_7(+(1, 0))) Induction Step: NAIVEREV(gen_Cons:Nil9_7(+(1, +(n1742_7, 1)))) ->_R^Omega(1) c(APP(naiverev(gen_Cons:Nil9_7(+(1, n1742_7))), Cons(hole_a3_7, Nil)), NAIVEREV(gen_Cons:Nil9_7(+(1, n1742_7)))) ->_L^Omega(0) c(APP(gen_Cons:Nil9_7(+(1, n1742_7)), Cons(hole_a3_7, Nil)), NAIVEREV(gen_Cons:Nil9_7(+(1, n1742_7)))) ->_L^Omega(2 + n1742_7) c(gen_c2:c310_7(+(1, n1742_7)), NAIVEREV(gen_Cons:Nil9_7(+(1, n1742_7)))) ->_IH c(gen_c2:c310_7(+(1, n1742_7)), *11_7) We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). ---------------------------------------- (34) Obligation: Proved the lower bound n^2 for the following obligation: Innermost TRS: Rules: NAIVEREV(Cons(z0, z1)) -> c(APP(naiverev(z1), Cons(z0, Nil)), NAIVEREV(z1)) NAIVEREV(Nil) -> c1 APP(Cons(z0, z1), z2) -> c2(APP(z1, z2)) APP(Nil, z0) -> c3 NOTEMPTY(Cons(z0, z1)) -> c4 NOTEMPTY(Nil) -> c5 GOAL(z0) -> c6(NAIVEREV(z0)) naiverev(Cons(z0, z1)) -> app(naiverev(z1), Cons(z0, Nil)) naiverev(Nil) -> Nil app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> naiverev(z0) Types: NAIVEREV :: Cons:Nil -> c:c1 Cons :: a -> Cons:Nil -> Cons:Nil c :: c2:c3 -> c:c1 -> c:c1 APP :: Cons:Nil -> Cons:Nil -> c2:c3 naiverev :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil c1 :: c:c1 c2 :: c2:c3 -> c2:c3 c3 :: c2:c3 NOTEMPTY :: Cons:Nil -> c4:c5 c4 :: c4:c5 c5 :: c4:c5 GOAL :: Cons:Nil -> c6 c6 :: c:c1 -> c6 app :: Cons:Nil -> Cons:Nil -> Cons:Nil notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False goal :: Cons:Nil -> Cons:Nil hole_c:c11_7 :: c:c1 hole_Cons:Nil2_7 :: Cons:Nil hole_a3_7 :: a hole_c2:c34_7 :: c2:c3 hole_c4:c55_7 :: c4:c5 hole_c66_7 :: c6 hole_True:False7_7 :: True:False gen_c:c18_7 :: Nat -> c:c1 gen_Cons:Nil9_7 :: Nat -> Cons:Nil gen_c2:c310_7 :: Nat -> c2:c3 Lemmas: APP(gen_Cons:Nil9_7(n12_7), gen_Cons:Nil9_7(b)) -> gen_c2:c310_7(n12_7), rt in Omega(1 + n12_7) app(gen_Cons:Nil9_7(n513_7), gen_Cons:Nil9_7(b)) -> gen_Cons:Nil9_7(+(n513_7, b)), rt in Omega(0) naiverev(gen_Cons:Nil9_7(n1454_7)) -> gen_Cons:Nil9_7(n1454_7), rt in Omega(0) Generator Equations: gen_c:c18_7(0) <=> c1 gen_c:c18_7(+(x, 1)) <=> c(c3, gen_c:c18_7(x)) gen_Cons:Nil9_7(0) <=> Nil gen_Cons:Nil9_7(+(x, 1)) <=> Cons(hole_a3_7, gen_Cons:Nil9_7(x)) gen_c2:c310_7(0) <=> c3 gen_c2:c310_7(+(x, 1)) <=> c2(gen_c2:c310_7(x)) The following defined symbols remain to be analysed: NAIVEREV ---------------------------------------- (35) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (36) BOUNDS(n^2, INF)