WORST_CASE(Omega(n^1),O(n^1)) proof of input_6IGR1DOioS.trs # AProVE Commit ID: 5b976082cb74a395683ed8cc7acf94bd611ab29f fuhs 20230524 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (4) CdtProblem (5) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxTRS (11) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (12) CpxTRS (13) CpxTrsMatchBoundsTAProof [FINISHED, 2 ms] (14) BOUNDS(1, n^1) (15) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CdtProblem (17) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRelTRS (19) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CpxRelTRS (21) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (22) typed CpxTrs (23) OrderProof [LOWER BOUND(ID), 9 ms] (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 271 ms] (26) typed CpxTrs (27) RewriteLemmaProof [LOWER BOUND(ID), 0 ms] (28) BEST (29) proven lower bound (30) LowerBoundPropagationProof [FINISHED, 0 ms] (31) BOUNDS(n^1, INF) (32) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: foldl(x, Cons(S(0), xs)) -> foldl(S(x), xs) foldl(S(0), Cons(x, xs)) -> foldl(S(x), xs) foldr(a, Cons(x, xs)) -> op(x, foldr(a, xs)) foldr(a, Nil) -> a foldl(a, Nil) -> a notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False op(x, S(0)) -> S(x) op(S(0), y) -> S(y) fold(a, xs) -> Cons(foldl(a, xs), Cons(foldr(a, xs), Nil)) 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: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Tuples: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) S tuples: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) K tuples:none Defined Rule Symbols: foldl_2, foldr_2, notEmpty_1, op_2, fold_2 Defined Pair Symbols: FOLDL_2, FOLDR_2, NOTEMPTY_1, OP_2, FOLD_2 Compound Symbols: c_1, c1_1, c2, c3_2, c4, c5, c6, c7, c8, c9_1, c10_1 ---------------------------------------- (3) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 2 leading nodes: FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) Removed 6 trailing nodes: FOLDR(z0, Nil) -> c4 FOLDL(z0, Nil) -> c2 OP(S(0), z0) -> c8 OP(z0, S(0)) -> c7 NOTEMPTY(Nil) -> c6 NOTEMPTY(Cons(z0, z1)) -> c5 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Tuples: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) S tuples: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) K tuples:none Defined Rule Symbols: foldl_2, foldr_2, notEmpty_1, op_2, fold_2 Defined Pair Symbols: FOLDL_2, FOLDR_2 Compound Symbols: c_1, c1_1, c3_2 ---------------------------------------- (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Tuples: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDR(z0, Cons(z1, z2)) -> c3(FOLDR(z0, z2)) S tuples: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDR(z0, Cons(z1, z2)) -> c3(FOLDR(z0, z2)) K tuples:none Defined Rule Symbols: foldl_2, foldr_2, notEmpty_1, op_2, fold_2 Defined Pair Symbols: FOLDL_2, FOLDR_2 Compound Symbols: c_1, c1_1, c3_1 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDR(z0, Cons(z1, z2)) -> c3(FOLDR(z0, z2)) S tuples: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDR(z0, Cons(z1, z2)) -> c3(FOLDR(z0, z2)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: FOLDL_2, FOLDR_2 Compound Symbols: c_1, c1_1, c3_1 ---------------------------------------- (9) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDR(z0, Cons(z1, z2)) -> c3(FOLDR(z0, z2)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (11) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (12) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDR(z0, Cons(z1, z2)) -> c3(FOLDR(z0, z2)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) CpxTrsMatchBoundsTAProof (FINISHED) A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 1. The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by: final states : [1, 2] transitions: Cons0(0, 0) -> 0 S0(0) -> 0 00() -> 0 c0(0) -> 0 c10(0) -> 0 c30(0) -> 0 FOLDL0(0, 0) -> 1 FOLDR0(0, 0) -> 2 S1(0) -> 4 FOLDL1(4, 0) -> 3 c1(3) -> 1 FOLDL1(4, 0) -> 5 c11(5) -> 1 FOLDR1(0, 0) -> 6 c31(6) -> 2 S1(4) -> 4 c1(3) -> 3 c1(3) -> 5 c11(5) -> 3 c11(5) -> 5 c31(6) -> 6 ---------------------------------------- (14) BOUNDS(1, n^1) ---------------------------------------- (15) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (16) Obligation: Complexity Dependency Tuples Problem Rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Tuples: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) S tuples: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) K tuples:none Defined Rule Symbols: foldl_2, foldr_2, notEmpty_1, op_2, fold_2 Defined Pair Symbols: FOLDL_2, FOLDR_2, NOTEMPTY_1, OP_2, FOLD_2 Compound Symbols: c_1, c1_1, c2, c3_2, c4, c5, c6, c7, c8, c9_1, c10_1 ---------------------------------------- (17) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (18) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) The (relative) TRS S consists of the following rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Rewrite Strategy: INNERMOST ---------------------------------------- (19) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (20) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: FOLDL(z0, Cons(S(0'), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0'), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0')) -> c7 OP(S(0'), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) The (relative) TRS S consists of the following rules: foldl(z0, Cons(S(0'), z1)) -> foldl(S(z0), z1) foldl(S(0'), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0')) -> S(z0) op(S(0'), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Rewrite Strategy: INNERMOST ---------------------------------------- (21) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (22) Obligation: Innermost TRS: Rules: FOLDL(z0, Cons(S(0'), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0'), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0')) -> c7 OP(S(0'), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) foldl(z0, Cons(S(0'), z1)) -> foldl(S(z0), z1) foldl(S(0'), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0')) -> S(z0) op(S(0'), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Types: FOLDL :: 0':S -> Cons:Nil -> c:c1:c2 Cons :: 0':S -> Cons:Nil -> Cons:Nil S :: 0':S -> 0':S 0' :: 0':S c :: c:c1:c2 -> c:c1:c2 c1 :: c:c1:c2 -> c:c1:c2 Nil :: Cons:Nil c2 :: c:c1:c2 FOLDR :: 0':S -> Cons:Nil -> c3:c4 c3 :: c7:c8 -> c3:c4 -> c3:c4 OP :: 0':S -> 0':S -> c7:c8 foldr :: 0':S -> Cons:Nil -> 0':S c4 :: c3:c4 NOTEMPTY :: Cons:Nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 c7 :: c7:c8 c8 :: c7:c8 FOLD :: 0':S -> Cons:Nil -> c9:c10 c9 :: c:c1:c2 -> c9:c10 c10 :: c3:c4 -> c9:c10 foldl :: 0':S -> Cons:Nil -> 0':S op :: 0':S -> 0':S -> 0':S notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False fold :: 0':S -> Cons:Nil -> Cons:Nil hole_c:c1:c21_11 :: c:c1:c2 hole_0':S2_11 :: 0':S hole_Cons:Nil3_11 :: Cons:Nil hole_c3:c44_11 :: c3:c4 hole_c7:c85_11 :: c7:c8 hole_c5:c66_11 :: c5:c6 hole_c9:c107_11 :: c9:c10 hole_True:False8_11 :: True:False gen_c:c1:c29_11 :: Nat -> c:c1:c2 gen_0':S10_11 :: Nat -> 0':S gen_Cons:Nil11_11 :: Nat -> Cons:Nil gen_c3:c412_11 :: Nat -> c3:c4 ---------------------------------------- (23) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: FOLDL, FOLDR, foldr, foldl They will be analysed ascendingly in the following order: foldr < FOLDR ---------------------------------------- (24) Obligation: Innermost TRS: Rules: FOLDL(z0, Cons(S(0'), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0'), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0')) -> c7 OP(S(0'), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) foldl(z0, Cons(S(0'), z1)) -> foldl(S(z0), z1) foldl(S(0'), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0')) -> S(z0) op(S(0'), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Types: FOLDL :: 0':S -> Cons:Nil -> c:c1:c2 Cons :: 0':S -> Cons:Nil -> Cons:Nil S :: 0':S -> 0':S 0' :: 0':S c :: c:c1:c2 -> c:c1:c2 c1 :: c:c1:c2 -> c:c1:c2 Nil :: Cons:Nil c2 :: c:c1:c2 FOLDR :: 0':S -> Cons:Nil -> c3:c4 c3 :: c7:c8 -> c3:c4 -> c3:c4 OP :: 0':S -> 0':S -> c7:c8 foldr :: 0':S -> Cons:Nil -> 0':S c4 :: c3:c4 NOTEMPTY :: Cons:Nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 c7 :: c7:c8 c8 :: c7:c8 FOLD :: 0':S -> Cons:Nil -> c9:c10 c9 :: c:c1:c2 -> c9:c10 c10 :: c3:c4 -> c9:c10 foldl :: 0':S -> Cons:Nil -> 0':S op :: 0':S -> 0':S -> 0':S notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False fold :: 0':S -> Cons:Nil -> Cons:Nil hole_c:c1:c21_11 :: c:c1:c2 hole_0':S2_11 :: 0':S hole_Cons:Nil3_11 :: Cons:Nil hole_c3:c44_11 :: c3:c4 hole_c7:c85_11 :: c7:c8 hole_c5:c66_11 :: c5:c6 hole_c9:c107_11 :: c9:c10 hole_True:False8_11 :: True:False gen_c:c1:c29_11 :: Nat -> c:c1:c2 gen_0':S10_11 :: Nat -> 0':S gen_Cons:Nil11_11 :: Nat -> Cons:Nil gen_c3:c412_11 :: Nat -> c3:c4 Generator Equations: gen_c:c1:c29_11(0) <=> c2 gen_c:c1:c29_11(+(x, 1)) <=> c(gen_c:c1:c29_11(x)) gen_0':S10_11(0) <=> 0' gen_0':S10_11(+(x, 1)) <=> S(gen_0':S10_11(x)) gen_Cons:Nil11_11(0) <=> Nil gen_Cons:Nil11_11(+(x, 1)) <=> Cons(0', gen_Cons:Nil11_11(x)) gen_c3:c412_11(0) <=> c4 gen_c3:c412_11(+(x, 1)) <=> c3(c7, gen_c3:c412_11(x)) The following defined symbols remain to be analysed: FOLDL, FOLDR, foldr, foldl They will be analysed ascendingly in the following order: foldr < FOLDR ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: foldr(gen_0':S10_11(1), gen_Cons:Nil11_11(n25_11)) -> gen_0':S10_11(1), rt in Omega(0) Induction Base: foldr(gen_0':S10_11(1), gen_Cons:Nil11_11(0)) ->_R^Omega(0) gen_0':S10_11(1) Induction Step: foldr(gen_0':S10_11(1), gen_Cons:Nil11_11(+(n25_11, 1))) ->_R^Omega(0) op(0', foldr(gen_0':S10_11(1), gen_Cons:Nil11_11(n25_11))) ->_IH op(0', gen_0':S10_11(1)) ->_R^Omega(0) S(0') We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (26) Obligation: Innermost TRS: Rules: FOLDL(z0, Cons(S(0'), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0'), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0')) -> c7 OP(S(0'), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) foldl(z0, Cons(S(0'), z1)) -> foldl(S(z0), z1) foldl(S(0'), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0')) -> S(z0) op(S(0'), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Types: FOLDL :: 0':S -> Cons:Nil -> c:c1:c2 Cons :: 0':S -> Cons:Nil -> Cons:Nil S :: 0':S -> 0':S 0' :: 0':S c :: c:c1:c2 -> c:c1:c2 c1 :: c:c1:c2 -> c:c1:c2 Nil :: Cons:Nil c2 :: c:c1:c2 FOLDR :: 0':S -> Cons:Nil -> c3:c4 c3 :: c7:c8 -> c3:c4 -> c3:c4 OP :: 0':S -> 0':S -> c7:c8 foldr :: 0':S -> Cons:Nil -> 0':S c4 :: c3:c4 NOTEMPTY :: Cons:Nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 c7 :: c7:c8 c8 :: c7:c8 FOLD :: 0':S -> Cons:Nil -> c9:c10 c9 :: c:c1:c2 -> c9:c10 c10 :: c3:c4 -> c9:c10 foldl :: 0':S -> Cons:Nil -> 0':S op :: 0':S -> 0':S -> 0':S notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False fold :: 0':S -> Cons:Nil -> Cons:Nil hole_c:c1:c21_11 :: c:c1:c2 hole_0':S2_11 :: 0':S hole_Cons:Nil3_11 :: Cons:Nil hole_c3:c44_11 :: c3:c4 hole_c7:c85_11 :: c7:c8 hole_c5:c66_11 :: c5:c6 hole_c9:c107_11 :: c9:c10 hole_True:False8_11 :: True:False gen_c:c1:c29_11 :: Nat -> c:c1:c2 gen_0':S10_11 :: Nat -> 0':S gen_Cons:Nil11_11 :: Nat -> Cons:Nil gen_c3:c412_11 :: Nat -> c3:c4 Lemmas: foldr(gen_0':S10_11(1), gen_Cons:Nil11_11(n25_11)) -> gen_0':S10_11(1), rt in Omega(0) Generator Equations: gen_c:c1:c29_11(0) <=> c2 gen_c:c1:c29_11(+(x, 1)) <=> c(gen_c:c1:c29_11(x)) gen_0':S10_11(0) <=> 0' gen_0':S10_11(+(x, 1)) <=> S(gen_0':S10_11(x)) gen_Cons:Nil11_11(0) <=> Nil gen_Cons:Nil11_11(+(x, 1)) <=> Cons(0', gen_Cons:Nil11_11(x)) gen_c3:c412_11(0) <=> c4 gen_c3:c412_11(+(x, 1)) <=> c3(c7, gen_c3:c412_11(x)) The following defined symbols remain to be analysed: FOLDR, foldl ---------------------------------------- (27) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: FOLDR(gen_0':S10_11(1), gen_Cons:Nil11_11(n423_11)) -> gen_c3:c412_11(n423_11), rt in Omega(1 + n423_11) Induction Base: FOLDR(gen_0':S10_11(1), gen_Cons:Nil11_11(0)) ->_R^Omega(1) c4 Induction Step: FOLDR(gen_0':S10_11(1), gen_Cons:Nil11_11(+(n423_11, 1))) ->_R^Omega(1) c3(OP(0', foldr(gen_0':S10_11(1), gen_Cons:Nil11_11(n423_11))), FOLDR(gen_0':S10_11(1), gen_Cons:Nil11_11(n423_11))) ->_L^Omega(0) c3(OP(0', gen_0':S10_11(1)), FOLDR(gen_0':S10_11(1), gen_Cons:Nil11_11(n423_11))) ->_R^Omega(1) c3(c7, FOLDR(gen_0':S10_11(1), gen_Cons:Nil11_11(n423_11))) ->_IH c3(c7, gen_c3:c412_11(c424_11)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (28) Complex Obligation (BEST) ---------------------------------------- (29) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: FOLDL(z0, Cons(S(0'), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0'), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0')) -> c7 OP(S(0'), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) foldl(z0, Cons(S(0'), z1)) -> foldl(S(z0), z1) foldl(S(0'), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0')) -> S(z0) op(S(0'), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Types: FOLDL :: 0':S -> Cons:Nil -> c:c1:c2 Cons :: 0':S -> Cons:Nil -> Cons:Nil S :: 0':S -> 0':S 0' :: 0':S c :: c:c1:c2 -> c:c1:c2 c1 :: c:c1:c2 -> c:c1:c2 Nil :: Cons:Nil c2 :: c:c1:c2 FOLDR :: 0':S -> Cons:Nil -> c3:c4 c3 :: c7:c8 -> c3:c4 -> c3:c4 OP :: 0':S -> 0':S -> c7:c8 foldr :: 0':S -> Cons:Nil -> 0':S c4 :: c3:c4 NOTEMPTY :: Cons:Nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 c7 :: c7:c8 c8 :: c7:c8 FOLD :: 0':S -> Cons:Nil -> c9:c10 c9 :: c:c1:c2 -> c9:c10 c10 :: c3:c4 -> c9:c10 foldl :: 0':S -> Cons:Nil -> 0':S op :: 0':S -> 0':S -> 0':S notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False fold :: 0':S -> Cons:Nil -> Cons:Nil hole_c:c1:c21_11 :: c:c1:c2 hole_0':S2_11 :: 0':S hole_Cons:Nil3_11 :: Cons:Nil hole_c3:c44_11 :: c3:c4 hole_c7:c85_11 :: c7:c8 hole_c5:c66_11 :: c5:c6 hole_c9:c107_11 :: c9:c10 hole_True:False8_11 :: True:False gen_c:c1:c29_11 :: Nat -> c:c1:c2 gen_0':S10_11 :: Nat -> 0':S gen_Cons:Nil11_11 :: Nat -> Cons:Nil gen_c3:c412_11 :: Nat -> c3:c4 Lemmas: foldr(gen_0':S10_11(1), gen_Cons:Nil11_11(n25_11)) -> gen_0':S10_11(1), rt in Omega(0) Generator Equations: gen_c:c1:c29_11(0) <=> c2 gen_c:c1:c29_11(+(x, 1)) <=> c(gen_c:c1:c29_11(x)) gen_0':S10_11(0) <=> 0' gen_0':S10_11(+(x, 1)) <=> S(gen_0':S10_11(x)) gen_Cons:Nil11_11(0) <=> Nil gen_Cons:Nil11_11(+(x, 1)) <=> Cons(0', gen_Cons:Nil11_11(x)) gen_c3:c412_11(0) <=> c4 gen_c3:c412_11(+(x, 1)) <=> c3(c7, gen_c3:c412_11(x)) The following defined symbols remain to be analysed: FOLDR, foldl ---------------------------------------- (30) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (31) BOUNDS(n^1, INF) ---------------------------------------- (32) Obligation: Innermost TRS: Rules: FOLDL(z0, Cons(S(0'), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0'), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0')) -> c7 OP(S(0'), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) foldl(z0, Cons(S(0'), z1)) -> foldl(S(z0), z1) foldl(S(0'), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0')) -> S(z0) op(S(0'), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Types: FOLDL :: 0':S -> Cons:Nil -> c:c1:c2 Cons :: 0':S -> Cons:Nil -> Cons:Nil S :: 0':S -> 0':S 0' :: 0':S c :: c:c1:c2 -> c:c1:c2 c1 :: c:c1:c2 -> c:c1:c2 Nil :: Cons:Nil c2 :: c:c1:c2 FOLDR :: 0':S -> Cons:Nil -> c3:c4 c3 :: c7:c8 -> c3:c4 -> c3:c4 OP :: 0':S -> 0':S -> c7:c8 foldr :: 0':S -> Cons:Nil -> 0':S c4 :: c3:c4 NOTEMPTY :: Cons:Nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 c7 :: c7:c8 c8 :: c7:c8 FOLD :: 0':S -> Cons:Nil -> c9:c10 c9 :: c:c1:c2 -> c9:c10 c10 :: c3:c4 -> c9:c10 foldl :: 0':S -> Cons:Nil -> 0':S op :: 0':S -> 0':S -> 0':S notEmpty :: Cons:Nil -> True:False True :: True:False False :: True:False fold :: 0':S -> Cons:Nil -> Cons:Nil hole_c:c1:c21_11 :: c:c1:c2 hole_0':S2_11 :: 0':S hole_Cons:Nil3_11 :: Cons:Nil hole_c3:c44_11 :: c3:c4 hole_c7:c85_11 :: c7:c8 hole_c5:c66_11 :: c5:c6 hole_c9:c107_11 :: c9:c10 hole_True:False8_11 :: True:False gen_c:c1:c29_11 :: Nat -> c:c1:c2 gen_0':S10_11 :: Nat -> 0':S gen_Cons:Nil11_11 :: Nat -> Cons:Nil gen_c3:c412_11 :: Nat -> c3:c4 Lemmas: foldr(gen_0':S10_11(1), gen_Cons:Nil11_11(n25_11)) -> gen_0':S10_11(1), rt in Omega(0) FOLDR(gen_0':S10_11(1), gen_Cons:Nil11_11(n423_11)) -> gen_c3:c412_11(n423_11), rt in Omega(1 + n423_11) Generator Equations: gen_c:c1:c29_11(0) <=> c2 gen_c:c1:c29_11(+(x, 1)) <=> c(gen_c:c1:c29_11(x)) gen_0':S10_11(0) <=> 0' gen_0':S10_11(+(x, 1)) <=> S(gen_0':S10_11(x)) gen_Cons:Nil11_11(0) <=> Nil gen_Cons:Nil11_11(+(x, 1)) <=> Cons(0', gen_Cons:Nil11_11(x)) gen_c3:c412_11(0) <=> c4 gen_c3:c412_11(+(x, 1)) <=> c3(c7, gen_c3:c412_11(x)) The following defined symbols remain to be analysed: foldl