WORST_CASE(Omega(n^1),O(n^1)) proof of input_mBdmKsojOJ.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 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 [BOTH BOUNDS(ID, ID), 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) CpxRelTRS (11) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (12) CpxTRS (13) CpxTrsMatchBoundsTAProof [FINISHED, 10 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), 13 ms] (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 355 ms] (26) BEST (27) proven lower bound (28) LowerBoundPropagationProof [FINISHED, 0 ms] (29) BOUNDS(n^1, INF) (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 56 ms] (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: p(0) -> 0 p(s(x)) -> x le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(x, s(y)) -> if(le(x, s(y)), 0, p(minus(x, p(s(y))))) if(true, x, y) -> x if(false, x, y) -> y 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: p(0) -> 0 p(s(z0)) -> z0 le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0) -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Tuples: P(0) -> c P(s(z0)) -> c1 LE(0, z0) -> c2 LE(s(z0), 0) -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0) -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 S tuples: P(0) -> c P(s(z0)) -> c1 LE(0, z0) -> c2 LE(s(z0), 0) -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0) -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 K tuples:none Defined Rule Symbols: p_1, le_2, minus_2, if_3 Defined Pair Symbols: P_1, LE_2, MINUS_2, IF_3 Compound Symbols: c, c1, c2, c3, c4_1, c5, c6_2, c7_4, c8, c9 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 7 trailing nodes: P(s(z0)) -> c1 P(0) -> c IF(false, z0, z1) -> c9 IF(true, z0, z1) -> c8 MINUS(z0, 0) -> c5 LE(s(z0), 0) -> c3 LE(0, z0) -> c2 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: p(0) -> 0 p(s(z0)) -> z0 le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0) -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Tuples: LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) S tuples: LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) K tuples:none Defined Rule Symbols: p_1, le_2, minus_2, if_3 Defined Pair Symbols: LE_2, MINUS_2 Compound Symbols: c4_1, c6_2, c7_4 ---------------------------------------- (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 4 trailing tuple parts ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: p(0) -> 0 p(s(z0)) -> z0 le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0) -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Tuples: LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, s(z1)) -> c6(LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(MINUS(z0, p(s(z1)))) S tuples: LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, s(z1)) -> c6(LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(MINUS(z0, p(s(z1)))) K tuples:none Defined Rule Symbols: p_1, le_2, minus_2, if_3 Defined Pair Symbols: LE_2, MINUS_2 Compound Symbols: c4_1, c6_1, c7_1 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: p(0) -> 0 le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0) -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: p(s(z0)) -> z0 Tuples: LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, s(z1)) -> c6(LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(MINUS(z0, p(s(z1)))) S tuples: LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, s(z1)) -> c6(LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(MINUS(z0, p(s(z1)))) K tuples:none Defined Rule Symbols: p_1 Defined Pair Symbols: LE_2, MINUS_2 Compound Symbols: c4_1, c6_1, c7_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 CpxRelTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, s(z1)) -> c6(LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(MINUS(z0, p(s(z1)))) The (relative) TRS S consists of the following rules: p(s(z0)) -> z0 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: LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, s(z1)) -> c6(LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(MINUS(z0, p(s(z1)))) p(s(z0)) -> z0 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, 3] transitions: s0(0) -> 0 c40(0) -> 0 c60(0) -> 0 c70(0) -> 0 LE0(0, 0) -> 1 MINUS0(0, 0) -> 2 p0(0) -> 3 LE1(0, 0) -> 4 c41(4) -> 1 s1(0) -> 6 LE1(0, 6) -> 5 c61(5) -> 2 s1(0) -> 9 p1(9) -> 8 MINUS1(0, 8) -> 7 c71(7) -> 2 c41(4) -> 4 c41(4) -> 5 c61(5) -> 7 c71(7) -> 7 0 -> 3 0 -> 8 ---------------------------------------- (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: p(0) -> 0 p(s(z0)) -> z0 le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0) -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Tuples: P(0) -> c P(s(z0)) -> c1 LE(0, z0) -> c2 LE(s(z0), 0) -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0) -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 S tuples: P(0) -> c P(s(z0)) -> c1 LE(0, z0) -> c2 LE(s(z0), 0) -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0) -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 K tuples:none Defined Rule Symbols: p_1, le_2, minus_2, if_3 Defined Pair Symbols: P_1, LE_2, MINUS_2, IF_3 Compound Symbols: c, c1, c2, c3, c4_1, c5, c6_2, c7_4, c8, c9 ---------------------------------------- (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: P(0) -> c P(s(z0)) -> c1 LE(0, z0) -> c2 LE(s(z0), 0) -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0) -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 The (relative) TRS S consists of the following rules: p(0) -> 0 p(s(z0)) -> z0 le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0) -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0, p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 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: P(0') -> c P(s(z0)) -> c1 LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0') -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 The (relative) TRS S consists of the following rules: p(0') -> 0' p(s(z0)) -> z0 le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0') -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Rewrite Strategy: INNERMOST ---------------------------------------- (21) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (22) Obligation: Innermost TRS: Rules: P(0') -> c P(s(z0)) -> c1 LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0') -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 p(0') -> 0' p(s(z0)) -> z0 le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0') -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: P :: 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 MINUS :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 le :: 0':s -> 0':s -> true:false p :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c:c1 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_0':s7_10 :: Nat -> 0':s gen_c2:c3:c48_10 :: Nat -> c2:c3:c4 gen_c5:c6:c79_10 :: Nat -> c5:c6:c7 ---------------------------------------- (23) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: LE, MINUS, le, minus They will be analysed ascendingly in the following order: LE < MINUS le < MINUS minus < MINUS le < minus ---------------------------------------- (24) Obligation: Innermost TRS: Rules: P(0') -> c P(s(z0)) -> c1 LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0') -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 p(0') -> 0' p(s(z0)) -> z0 le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0') -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: P :: 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 MINUS :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 le :: 0':s -> 0':s -> true:false p :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c:c1 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_0':s7_10 :: Nat -> 0':s gen_c2:c3:c48_10 :: Nat -> c2:c3:c4 gen_c5:c6:c79_10 :: Nat -> c5:c6:c7 Generator Equations: gen_0':s7_10(0) <=> 0' gen_0':s7_10(+(x, 1)) <=> s(gen_0':s7_10(x)) gen_c2:c3:c48_10(0) <=> c2 gen_c2:c3:c48_10(+(x, 1)) <=> c4(gen_c2:c3:c48_10(x)) gen_c5:c6:c79_10(0) <=> c5 gen_c5:c6:c79_10(+(x, 1)) <=> c7(c8, c, gen_c5:c6:c79_10(x), c) The following defined symbols remain to be analysed: LE, MINUS, le, minus They will be analysed ascendingly in the following order: LE < MINUS le < MINUS minus < MINUS le < minus ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: LE(gen_0':s7_10(n11_10), gen_0':s7_10(n11_10)) -> gen_c2:c3:c48_10(n11_10), rt in Omega(1 + n11_10) Induction Base: LE(gen_0':s7_10(0), gen_0':s7_10(0)) ->_R^Omega(1) c2 Induction Step: LE(gen_0':s7_10(+(n11_10, 1)), gen_0':s7_10(+(n11_10, 1))) ->_R^Omega(1) c4(LE(gen_0':s7_10(n11_10), gen_0':s7_10(n11_10))) ->_IH c4(gen_c2:c3:c48_10(c12_10)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (26) Complex Obligation (BEST) ---------------------------------------- (27) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: P(0') -> c P(s(z0)) -> c1 LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0') -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 p(0') -> 0' p(s(z0)) -> z0 le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0') -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: P :: 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 MINUS :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 le :: 0':s -> 0':s -> true:false p :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c:c1 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_0':s7_10 :: Nat -> 0':s gen_c2:c3:c48_10 :: Nat -> c2:c3:c4 gen_c5:c6:c79_10 :: Nat -> c5:c6:c7 Generator Equations: gen_0':s7_10(0) <=> 0' gen_0':s7_10(+(x, 1)) <=> s(gen_0':s7_10(x)) gen_c2:c3:c48_10(0) <=> c2 gen_c2:c3:c48_10(+(x, 1)) <=> c4(gen_c2:c3:c48_10(x)) gen_c5:c6:c79_10(0) <=> c5 gen_c5:c6:c79_10(+(x, 1)) <=> c7(c8, c, gen_c5:c6:c79_10(x), c) The following defined symbols remain to be analysed: LE, MINUS, le, minus They will be analysed ascendingly in the following order: LE < MINUS le < MINUS minus < MINUS le < minus ---------------------------------------- (28) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (29) BOUNDS(n^1, INF) ---------------------------------------- (30) Obligation: Innermost TRS: Rules: P(0') -> c P(s(z0)) -> c1 LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0') -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 p(0') -> 0' p(s(z0)) -> z0 le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0') -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: P :: 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 MINUS :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 le :: 0':s -> 0':s -> true:false p :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c:c1 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_0':s7_10 :: Nat -> 0':s gen_c2:c3:c48_10 :: Nat -> c2:c3:c4 gen_c5:c6:c79_10 :: Nat -> c5:c6:c7 Lemmas: LE(gen_0':s7_10(n11_10), gen_0':s7_10(n11_10)) -> gen_c2:c3:c48_10(n11_10), rt in Omega(1 + n11_10) Generator Equations: gen_0':s7_10(0) <=> 0' gen_0':s7_10(+(x, 1)) <=> s(gen_0':s7_10(x)) gen_c2:c3:c48_10(0) <=> c2 gen_c2:c3:c48_10(+(x, 1)) <=> c4(gen_c2:c3:c48_10(x)) gen_c5:c6:c79_10(0) <=> c5 gen_c5:c6:c79_10(+(x, 1)) <=> c7(c8, c, gen_c5:c6:c79_10(x), c) The following defined symbols remain to be analysed: le, MINUS, minus They will be analysed ascendingly in the following order: le < MINUS minus < MINUS le < minus ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: le(gen_0':s7_10(n610_10), gen_0':s7_10(n610_10)) -> true, rt in Omega(0) Induction Base: le(gen_0':s7_10(0), gen_0':s7_10(0)) ->_R^Omega(0) true Induction Step: le(gen_0':s7_10(+(n610_10, 1)), gen_0':s7_10(+(n610_10, 1))) ->_R^Omega(0) le(gen_0':s7_10(n610_10), gen_0':s7_10(n610_10)) ->_IH true 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: P(0') -> c P(s(z0)) -> c1 LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) MINUS(z0, 0') -> c5 MINUS(z0, s(z1)) -> c6(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), LE(z0, s(z1))) MINUS(z0, s(z1)) -> c7(IF(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))), P(minus(z0, p(s(z1)))), MINUS(z0, p(s(z1))), P(s(z1))) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 p(0') -> 0' p(s(z0)) -> z0 le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) minus(z0, 0') -> z0 minus(z0, s(z1)) -> if(le(z0, s(z1)), 0', p(minus(z0, p(s(z1))))) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: P :: 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 MINUS :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 le :: 0':s -> 0':s -> true:false p :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c:c1 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_0':s7_10 :: Nat -> 0':s gen_c2:c3:c48_10 :: Nat -> c2:c3:c4 gen_c5:c6:c79_10 :: Nat -> c5:c6:c7 Lemmas: LE(gen_0':s7_10(n11_10), gen_0':s7_10(n11_10)) -> gen_c2:c3:c48_10(n11_10), rt in Omega(1 + n11_10) le(gen_0':s7_10(n610_10), gen_0':s7_10(n610_10)) -> true, rt in Omega(0) Generator Equations: gen_0':s7_10(0) <=> 0' gen_0':s7_10(+(x, 1)) <=> s(gen_0':s7_10(x)) gen_c2:c3:c48_10(0) <=> c2 gen_c2:c3:c48_10(+(x, 1)) <=> c4(gen_c2:c3:c48_10(x)) gen_c5:c6:c79_10(0) <=> c5 gen_c5:c6:c79_10(+(x, 1)) <=> c7(c8, c, gen_c5:c6:c79_10(x), c) The following defined symbols remain to be analysed: minus, MINUS They will be analysed ascendingly in the following order: minus < MINUS