WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Derivational Complexity (full) of the given DCpxTrs could be proven to be BOUNDS(n^1, n^1). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 46 ms] (4) CpxRelTRS (5) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (6) CpxTRS (7) CpxTrsMatchBoundsProof [FINISHED, 9 ms] (8) BOUNDS(1, n^1) (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), 217 ms] (16) BEST (17) proven lower bound (18) LowerBoundPropagationProof [FINISHED, 0 ms] (19) BOUNDS(n^1, INF) (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 41 ms] (22) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Derivational Complexity (full) of the given DCpxTrs could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: f(0) -> s(0) f(s(0)) -> s(0) f(s(s(x))) -> f(f(s(x))) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) DerivationalComplexityToRuntimeComplexityProof (BOTH BOUNDS(ID, ID)) The following rules have been added to S to convert the given derivational complexity problem to a runtime complexity problem: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1)) -> f(encArg(x_1)) encode_f(x_1) -> f(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: f(0) -> s(0) f(s(0)) -> s(0) f(s(s(x))) -> f(f(s(x))) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1)) -> f(encArg(x_1)) encode_f(x_1) -> f(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) Rewrite Strategy: FULL ---------------------------------------- (3) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (4) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: f(0) -> s(0) f(s(0)) -> s(0) f(s(s(x))) -> f(f(s(x))) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1)) -> f(encArg(x_1)) encode_f(x_1) -> f(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) Rewrite Strategy: FULL ---------------------------------------- (5) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (6) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: f(0) -> s(0) f(s(0)) -> s(0) f(s(s(x))) -> f(f(s(x))) encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1)) -> f(encArg(x_1)) encode_f(x_1) -> f(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (7) CpxTrsMatchBoundsProof (FINISHED) A linear upper bound on the runtime complexity of the TRS R could be shown with a Match Bound [MATCHBOUNDS1,MATCHBOUNDS2] of 4. The certificate found is represented by the following graph. "[5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] {(5,6,[f_1|0, encArg_1|0, encode_f_1|0, encode_0|0, encode_s_1|0, 0|1]), (5,7,[s_1|1, f_1|1]), (5,8,[f_1|1]), (5,10,[s_1|2]), (5,12,[s_1|2]), (5,13,[f_1|2]), (5,17,[s_1|3]), (6,6,[0|0, s_1|0, cons_f_1|0]), (7,6,[0|1, encArg_1|1]), (7,7,[s_1|1, f_1|1]), (7,10,[s_1|2]), (7,13,[f_1|2]), (7,12,[s_1|2]), (7,17,[s_1|3]), (8,9,[f_1|1]), (8,11,[s_1|1]), (8,8,[f_1|1]), (8,12,[s_1|2]), (9,6,[s_1|1]), (10,6,[0|2]), (11,6,[0|1]), (12,6,[0|2]), (13,14,[f_1|2]), (13,12,[s_1|2]), (13,13,[f_1|2]), (13,15,[f_1|3]), (13,17,[s_1|3]), (13,18,[s_1|4]), (14,7,[s_1|2]), (14,10,[s_1|2]), (14,12,[s_1|2]), (14,17,[s_1|2]), (15,16,[f_1|3]), (15,17,[s_1|3]), (15,18,[s_1|4]), (16,10,[s_1|3]), (16,12,[s_1|3]), (16,17,[s_1|3]), (17,6,[0|3]), (18,6,[0|4])}" ---------------------------------------- (8) BOUNDS(1, n^1) ---------------------------------------- (9) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (10) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: f(0') -> s(0') f(s(0')) -> s(0') f(s(s(x))) -> f(f(s(x))) The (relative) TRS S consists of the following rules: encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1)) -> f(encArg(x_1)) encode_f(x_1) -> f(encArg(x_1)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) Rewrite Strategy: FULL ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (12) Obligation: TRS: Rules: f(0') -> s(0') f(s(0')) -> s(0') f(s(s(x))) -> f(f(s(x))) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1)) -> f(encArg(x_1)) encode_f(x_1) -> f(encArg(x_1)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) Types: f :: 0':s:cons_f -> 0':s:cons_f 0' :: 0':s:cons_f s :: 0':s:cons_f -> 0':s:cons_f encArg :: 0':s:cons_f -> 0':s:cons_f cons_f :: 0':s:cons_f -> 0':s:cons_f encode_f :: 0':s:cons_f -> 0':s:cons_f encode_0 :: 0':s:cons_f encode_s :: 0':s:cons_f -> 0':s:cons_f hole_0':s:cons_f1_2 :: 0':s:cons_f gen_0':s:cons_f2_2 :: Nat -> 0':s:cons_f ---------------------------------------- (13) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: f, encArg They will be analysed ascendingly in the following order: f < encArg ---------------------------------------- (14) Obligation: TRS: Rules: f(0') -> s(0') f(s(0')) -> s(0') f(s(s(x))) -> f(f(s(x))) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1)) -> f(encArg(x_1)) encode_f(x_1) -> f(encArg(x_1)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) Types: f :: 0':s:cons_f -> 0':s:cons_f 0' :: 0':s:cons_f s :: 0':s:cons_f -> 0':s:cons_f encArg :: 0':s:cons_f -> 0':s:cons_f cons_f :: 0':s:cons_f -> 0':s:cons_f encode_f :: 0':s:cons_f -> 0':s:cons_f encode_0 :: 0':s:cons_f encode_s :: 0':s:cons_f -> 0':s:cons_f hole_0':s:cons_f1_2 :: 0':s:cons_f gen_0':s:cons_f2_2 :: Nat -> 0':s:cons_f Generator Equations: gen_0':s:cons_f2_2(0) <=> 0' gen_0':s:cons_f2_2(+(x, 1)) <=> s(gen_0':s:cons_f2_2(x)) The following defined symbols remain to be analysed: f, encArg They will be analysed ascendingly in the following order: f < encArg ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: f(gen_0':s:cons_f2_2(+(1, n4_2))) -> gen_0':s:cons_f2_2(1), rt in Omega(1 + n4_2) Induction Base: f(gen_0':s:cons_f2_2(+(1, 0))) ->_R^Omega(1) s(0') Induction Step: f(gen_0':s:cons_f2_2(+(1, +(n4_2, 1)))) ->_R^Omega(1) f(f(s(gen_0':s:cons_f2_2(n4_2)))) ->_IH f(gen_0':s:cons_f2_2(1)) ->_R^Omega(1) s(0') We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (16) Complex Obligation (BEST) ---------------------------------------- (17) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: f(0') -> s(0') f(s(0')) -> s(0') f(s(s(x))) -> f(f(s(x))) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1)) -> f(encArg(x_1)) encode_f(x_1) -> f(encArg(x_1)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) Types: f :: 0':s:cons_f -> 0':s:cons_f 0' :: 0':s:cons_f s :: 0':s:cons_f -> 0':s:cons_f encArg :: 0':s:cons_f -> 0':s:cons_f cons_f :: 0':s:cons_f -> 0':s:cons_f encode_f :: 0':s:cons_f -> 0':s:cons_f encode_0 :: 0':s:cons_f encode_s :: 0':s:cons_f -> 0':s:cons_f hole_0':s:cons_f1_2 :: 0':s:cons_f gen_0':s:cons_f2_2 :: Nat -> 0':s:cons_f Generator Equations: gen_0':s:cons_f2_2(0) <=> 0' gen_0':s:cons_f2_2(+(x, 1)) <=> s(gen_0':s:cons_f2_2(x)) The following defined symbols remain to be analysed: f, encArg They will be analysed ascendingly in the following order: f < encArg ---------------------------------------- (18) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (19) BOUNDS(n^1, INF) ---------------------------------------- (20) Obligation: TRS: Rules: f(0') -> s(0') f(s(0')) -> s(0') f(s(s(x))) -> f(f(s(x))) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1)) -> f(encArg(x_1)) encode_f(x_1) -> f(encArg(x_1)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) Types: f :: 0':s:cons_f -> 0':s:cons_f 0' :: 0':s:cons_f s :: 0':s:cons_f -> 0':s:cons_f encArg :: 0':s:cons_f -> 0':s:cons_f cons_f :: 0':s:cons_f -> 0':s:cons_f encode_f :: 0':s:cons_f -> 0':s:cons_f encode_0 :: 0':s:cons_f encode_s :: 0':s:cons_f -> 0':s:cons_f hole_0':s:cons_f1_2 :: 0':s:cons_f gen_0':s:cons_f2_2 :: Nat -> 0':s:cons_f Lemmas: f(gen_0':s:cons_f2_2(+(1, n4_2))) -> gen_0':s:cons_f2_2(1), rt in Omega(1 + n4_2) Generator Equations: gen_0':s:cons_f2_2(0) <=> 0' gen_0':s:cons_f2_2(+(x, 1)) <=> s(gen_0':s:cons_f2_2(x)) The following defined symbols remain to be analysed: encArg ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: encArg(gen_0':s:cons_f2_2(n244_2)) -> gen_0':s:cons_f2_2(n244_2), rt in Omega(0) Induction Base: encArg(gen_0':s:cons_f2_2(0)) ->_R^Omega(0) 0' Induction Step: encArg(gen_0':s:cons_f2_2(+(n244_2, 1))) ->_R^Omega(0) s(encArg(gen_0':s:cons_f2_2(n244_2))) ->_IH s(gen_0':s:cons_f2_2(c245_2)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (22) BOUNDS(1, INF)