WORST_CASE(Omega(n^1),O(n^1)) proof of input_AMeysv58RM.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) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (2) CpxTRS (3) CpxTrsMatchBoundsProof [FINISHED, 10 ms] (4) BOUNDS(1, n^1) (5) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxRelTRS (9) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxRelTRS (11) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (12) typed CpxTrs (13) OrderProof [LOWER BOUND(ID), 0 ms] (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 215 ms] (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 1391 ms] (18) BEST (19) proven lower bound (20) LowerBoundPropagationProof [FINISHED, 0 ms] (21) BOUNDS(n^1, INF) (22) 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: odd(S(x)) -> even(x) even(S(x)) -> odd(x) odd(0) -> 0 even(0) -> S(0) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: odd(S(x)) -> even(x) even(S(x)) -> odd(x) odd(0) -> 0 even(0) -> S(0) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (3) CpxTrsMatchBoundsProof (FINISHED) A linear upper bound on the runtime complexity of the TRS R could be shown with a Match Bound [MATCHBOUNDS1,MATCHBOUNDS2] of 1. The certificate found is represented by the following graph. "[5, 6, 7] {(5,6,[odd_1|0, even_1|0, even_1|1, 0|1, odd_1|1]), (5,7,[S_1|1]), (6,6,[S_1|0, 0|0]), (7,6,[0|1])}" ---------------------------------------- (4) BOUNDS(1, n^1) ---------------------------------------- (5) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: odd(S(z0)) -> even(z0) odd(0) -> 0 even(S(z0)) -> odd(z0) even(0) -> S(0) Tuples: ODD(S(z0)) -> c(EVEN(z0)) ODD(0) -> c1 EVEN(S(z0)) -> c2(ODD(z0)) EVEN(0) -> c3 S tuples: ODD(S(z0)) -> c(EVEN(z0)) ODD(0) -> c1 EVEN(S(z0)) -> c2(ODD(z0)) EVEN(0) -> c3 K tuples:none Defined Rule Symbols: odd_1, even_1 Defined Pair Symbols: ODD_1, EVEN_1 Compound Symbols: c_1, c1, c2_1, c3 ---------------------------------------- (7) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (8) 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: ODD(S(z0)) -> c(EVEN(z0)) ODD(0) -> c1 EVEN(S(z0)) -> c2(ODD(z0)) EVEN(0) -> c3 The (relative) TRS S consists of the following rules: odd(S(z0)) -> even(z0) odd(0) -> 0 even(S(z0)) -> odd(z0) even(0) -> S(0) Rewrite Strategy: INNERMOST ---------------------------------------- (9) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (10) 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: ODD(S(z0)) -> c(EVEN(z0)) ODD(0') -> c1 EVEN(S(z0)) -> c2(ODD(z0)) EVEN(0') -> c3 The (relative) TRS S consists of the following rules: odd(S(z0)) -> even(z0) odd(0') -> 0' even(S(z0)) -> odd(z0) even(0') -> S(0') Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (12) Obligation: Innermost TRS: Rules: ODD(S(z0)) -> c(EVEN(z0)) ODD(0') -> c1 EVEN(S(z0)) -> c2(ODD(z0)) EVEN(0') -> c3 odd(S(z0)) -> even(z0) odd(0') -> 0' even(S(z0)) -> odd(z0) even(0') -> S(0') Types: ODD :: S:0' -> c:c1 S :: S:0' -> S:0' c :: c2:c3 -> c:c1 EVEN :: S:0' -> c2:c3 0' :: S:0' c1 :: c:c1 c2 :: c:c1 -> c2:c3 c3 :: c2:c3 odd :: S:0' -> S:0' even :: S:0' -> S:0' hole_c:c11_4 :: c:c1 hole_S:0'2_4 :: S:0' hole_c2:c33_4 :: c2:c3 gen_S:0'4_4 :: Nat -> S:0' ---------------------------------------- (13) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: ODD, EVEN, odd, even They will be analysed ascendingly in the following order: ODD = EVEN odd = even ---------------------------------------- (14) Obligation: Innermost TRS: Rules: ODD(S(z0)) -> c(EVEN(z0)) ODD(0') -> c1 EVEN(S(z0)) -> c2(ODD(z0)) EVEN(0') -> c3 odd(S(z0)) -> even(z0) odd(0') -> 0' even(S(z0)) -> odd(z0) even(0') -> S(0') Types: ODD :: S:0' -> c:c1 S :: S:0' -> S:0' c :: c2:c3 -> c:c1 EVEN :: S:0' -> c2:c3 0' :: S:0' c1 :: c:c1 c2 :: c:c1 -> c2:c3 c3 :: c2:c3 odd :: S:0' -> S:0' even :: S:0' -> S:0' hole_c:c11_4 :: c:c1 hole_S:0'2_4 :: S:0' hole_c2:c33_4 :: c2:c3 gen_S:0'4_4 :: Nat -> S:0' Generator Equations: gen_S:0'4_4(0) <=> 0' gen_S:0'4_4(+(x, 1)) <=> S(gen_S:0'4_4(x)) The following defined symbols remain to be analysed: even, ODD, EVEN, odd They will be analysed ascendingly in the following order: ODD = EVEN odd = even ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: even(gen_S:0'4_4(*(2, n6_4))) -> gen_S:0'4_4(1), rt in Omega(0) Induction Base: even(gen_S:0'4_4(*(2, 0))) ->_R^Omega(0) S(0') Induction Step: even(gen_S:0'4_4(*(2, +(n6_4, 1)))) ->_R^Omega(0) odd(gen_S:0'4_4(+(1, *(2, n6_4)))) ->_R^Omega(0) even(gen_S:0'4_4(*(2, n6_4))) ->_IH gen_S:0'4_4(1) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (16) Obligation: Innermost TRS: Rules: ODD(S(z0)) -> c(EVEN(z0)) ODD(0') -> c1 EVEN(S(z0)) -> c2(ODD(z0)) EVEN(0') -> c3 odd(S(z0)) -> even(z0) odd(0') -> 0' even(S(z0)) -> odd(z0) even(0') -> S(0') Types: ODD :: S:0' -> c:c1 S :: S:0' -> S:0' c :: c2:c3 -> c:c1 EVEN :: S:0' -> c2:c3 0' :: S:0' c1 :: c:c1 c2 :: c:c1 -> c2:c3 c3 :: c2:c3 odd :: S:0' -> S:0' even :: S:0' -> S:0' hole_c:c11_4 :: c:c1 hole_S:0'2_4 :: S:0' hole_c2:c33_4 :: c2:c3 gen_S:0'4_4 :: Nat -> S:0' Lemmas: even(gen_S:0'4_4(*(2, n6_4))) -> gen_S:0'4_4(1), rt in Omega(0) Generator Equations: gen_S:0'4_4(0) <=> 0' gen_S:0'4_4(+(x, 1)) <=> S(gen_S:0'4_4(x)) The following defined symbols remain to be analysed: odd, ODD, EVEN They will be analysed ascendingly in the following order: ODD = EVEN odd = even ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: EVEN(gen_S:0'4_4(+(1, *(2, n169_4)))) -> *5_4, rt in Omega(n169_4) Induction Base: EVEN(gen_S:0'4_4(+(1, *(2, 0)))) Induction Step: EVEN(gen_S:0'4_4(+(1, *(2, +(n169_4, 1))))) ->_R^Omega(1) c2(ODD(gen_S:0'4_4(+(2, *(2, n169_4))))) ->_R^Omega(1) c2(c(EVEN(gen_S:0'4_4(+(1, *(2, n169_4)))))) ->_IH c2(c(*5_4)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (18) Complex Obligation (BEST) ---------------------------------------- (19) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: ODD(S(z0)) -> c(EVEN(z0)) ODD(0') -> c1 EVEN(S(z0)) -> c2(ODD(z0)) EVEN(0') -> c3 odd(S(z0)) -> even(z0) odd(0') -> 0' even(S(z0)) -> odd(z0) even(0') -> S(0') Types: ODD :: S:0' -> c:c1 S :: S:0' -> S:0' c :: c2:c3 -> c:c1 EVEN :: S:0' -> c2:c3 0' :: S:0' c1 :: c:c1 c2 :: c:c1 -> c2:c3 c3 :: c2:c3 odd :: S:0' -> S:0' even :: S:0' -> S:0' hole_c:c11_4 :: c:c1 hole_S:0'2_4 :: S:0' hole_c2:c33_4 :: c2:c3 gen_S:0'4_4 :: Nat -> S:0' Lemmas: even(gen_S:0'4_4(*(2, n6_4))) -> gen_S:0'4_4(1), rt in Omega(0) Generator Equations: gen_S:0'4_4(0) <=> 0' gen_S:0'4_4(+(x, 1)) <=> S(gen_S:0'4_4(x)) The following defined symbols remain to be analysed: EVEN, ODD They will be analysed ascendingly in the following order: ODD = EVEN ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) Obligation: Innermost TRS: Rules: ODD(S(z0)) -> c(EVEN(z0)) ODD(0') -> c1 EVEN(S(z0)) -> c2(ODD(z0)) EVEN(0') -> c3 odd(S(z0)) -> even(z0) odd(0') -> 0' even(S(z0)) -> odd(z0) even(0') -> S(0') Types: ODD :: S:0' -> c:c1 S :: S:0' -> S:0' c :: c2:c3 -> c:c1 EVEN :: S:0' -> c2:c3 0' :: S:0' c1 :: c:c1 c2 :: c:c1 -> c2:c3 c3 :: c2:c3 odd :: S:0' -> S:0' even :: S:0' -> S:0' hole_c:c11_4 :: c:c1 hole_S:0'2_4 :: S:0' hole_c2:c33_4 :: c2:c3 gen_S:0'4_4 :: Nat -> S:0' Lemmas: even(gen_S:0'4_4(*(2, n6_4))) -> gen_S:0'4_4(1), rt in Omega(0) EVEN(gen_S:0'4_4(+(1, *(2, n169_4)))) -> *5_4, rt in Omega(n169_4) Generator Equations: gen_S:0'4_4(0) <=> 0' gen_S:0'4_4(+(x, 1)) <=> S(gen_S:0'4_4(x)) The following defined symbols remain to be analysed: ODD They will be analysed ascendingly in the following order: ODD = EVEN