/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (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) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 34 ms] (10) CdtProblem (11) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 16 ms] (12) CdtProblem (13) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (14) BOUNDS(1, 1) (15) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxTRS (17) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (18) typed CpxTrs (19) OrderProof [LOWER BOUND(ID), 0 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 206 ms] (22) BEST (23) proven lower bound (24) LowerBoundPropagationProof [FINISHED, 0 ms] (25) BOUNDS(n^1, INF) (26) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: f(0) -> true f(1) -> false f(s(x)) -> f(x) if(true, s(x), s(y)) -> s(x) if(false, s(x), s(y)) -> s(y) g(x, c(y)) -> c(g(x, y)) g(x, c(y)) -> g(x, if(f(x), c(g(s(x), y)), c(y))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: f(0) -> true f(1) -> false f(s(z0)) -> f(z0) if(true, s(z0), s(z1)) -> s(z0) if(false, s(z0), s(z1)) -> s(z1) g(z0, c(z1)) -> c(g(z0, z1)) g(z0, c(z1)) -> g(z0, if(f(z0), c(g(s(z0), z1)), c(z1))) Tuples: F(0) -> c1 F(1) -> c2 F(s(z0)) -> c3(F(z0)) IF(true, s(z0), s(z1)) -> c4 IF(false, s(z0), s(z1)) -> c5 G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(G(z0, if(f(z0), c(g(s(z0), z1)), c(z1))), IF(f(z0), c(g(s(z0), z1)), c(z1)), F(z0), G(s(z0), z1)) S tuples: F(0) -> c1 F(1) -> c2 F(s(z0)) -> c3(F(z0)) IF(true, s(z0), s(z1)) -> c4 IF(false, s(z0), s(z1)) -> c5 G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(G(z0, if(f(z0), c(g(s(z0), z1)), c(z1))), IF(f(z0), c(g(s(z0), z1)), c(z1)), F(z0), G(s(z0), z1)) K tuples:none Defined Rule Symbols: f_1, if_3, g_2 Defined Pair Symbols: F_1, IF_3, G_2 Compound Symbols: c1, c2, c3_1, c4, c5, c6_1, c7_4 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 4 trailing nodes: IF(false, s(z0), s(z1)) -> c5 F(1) -> c2 F(0) -> c1 IF(true, s(z0), s(z1)) -> c4 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: f(0) -> true f(1) -> false f(s(z0)) -> f(z0) if(true, s(z0), s(z1)) -> s(z0) if(false, s(z0), s(z1)) -> s(z1) g(z0, c(z1)) -> c(g(z0, z1)) g(z0, c(z1)) -> g(z0, if(f(z0), c(g(s(z0), z1)), c(z1))) Tuples: F(s(z0)) -> c3(F(z0)) G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(G(z0, if(f(z0), c(g(s(z0), z1)), c(z1))), IF(f(z0), c(g(s(z0), z1)), c(z1)), F(z0), G(s(z0), z1)) S tuples: F(s(z0)) -> c3(F(z0)) G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(G(z0, if(f(z0), c(g(s(z0), z1)), c(z1))), IF(f(z0), c(g(s(z0), z1)), c(z1)), F(z0), G(s(z0), z1)) K tuples:none Defined Rule Symbols: f_1, if_3, g_2 Defined Pair Symbols: F_1, G_2 Compound Symbols: c3_1, c6_1, c7_4 ---------------------------------------- (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing tuple parts ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: f(0) -> true f(1) -> false f(s(z0)) -> f(z0) if(true, s(z0), s(z1)) -> s(z0) if(false, s(z0), s(z1)) -> s(z1) g(z0, c(z1)) -> c(g(z0, z1)) g(z0, c(z1)) -> g(z0, if(f(z0), c(g(s(z0), z1)), c(z1))) Tuples: F(s(z0)) -> c3(F(z0)) G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) S tuples: F(s(z0)) -> c3(F(z0)) G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) K tuples:none Defined Rule Symbols: f_1, if_3, g_2 Defined Pair Symbols: F_1, G_2 Compound Symbols: c3_1, c6_1, c7_2 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: f(0) -> true f(1) -> false f(s(z0)) -> f(z0) if(true, s(z0), s(z1)) -> s(z0) if(false, s(z0), s(z1)) -> s(z1) g(z0, c(z1)) -> c(g(z0, z1)) g(z0, c(z1)) -> g(z0, if(f(z0), c(g(s(z0), z1)), c(z1))) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(s(z0)) -> c3(F(z0)) G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) S tuples: F(s(z0)) -> c3(F(z0)) G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: F_1, G_2 Compound Symbols: c3_1, c6_1, c7_2 ---------------------------------------- (9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) We considered the (Usable) Rules:none And the Tuples: F(s(z0)) -> c3(F(z0)) G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(F(x_1)) = 0 POL(G(x_1, x_2)) = [2]x_2 POL(c(x_1)) = [3] + x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = [3] + x_1 ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(s(z0)) -> c3(F(z0)) G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) S tuples: F(s(z0)) -> c3(F(z0)) K tuples: G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) Defined Rule Symbols:none Defined Pair Symbols: F_1, G_2 Compound Symbols: c3_1, c6_1, c7_2 ---------------------------------------- (11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. F(s(z0)) -> c3(F(z0)) We considered the (Usable) Rules:none And the Tuples: F(s(z0)) -> c3(F(z0)) G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(F(x_1)) = [2] + x_1 POL(G(x_1, x_2)) = [2]x_2^2 + x_1*x_2 POL(c(x_1)) = [2] + x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = [2] + x_1 ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(s(z0)) -> c3(F(z0)) G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) S tuples:none K tuples: G(z0, c(z1)) -> c6(G(z0, z1)) G(z0, c(z1)) -> c7(F(z0), G(s(z0), z1)) F(s(z0)) -> c3(F(z0)) Defined Rule Symbols:none Defined Pair Symbols: F_1, G_2 Compound Symbols: c3_1, c6_1, c7_2 ---------------------------------------- (13) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (14) BOUNDS(1, 1) ---------------------------------------- (15) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (16) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: f(0') -> true f(1') -> false f(s(x)) -> f(x) if(true, s(x), s(y)) -> s(x) if(false, s(x), s(y)) -> s(y) g(x, c(y)) -> c(g(x, y)) g(x, c(y)) -> g(x, if(f(x), c(g(s(x), y)), c(y))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (18) Obligation: Innermost TRS: Rules: f(0') -> true f(1') -> false f(s(x)) -> f(x) if(true, s(x), s(y)) -> s(x) if(false, s(x), s(y)) -> s(y) g(x, c(y)) -> c(g(x, y)) g(x, c(y)) -> g(x, if(f(x), c(g(s(x), y)), c(y))) Types: f :: 0':1':s:c -> true:false 0' :: 0':1':s:c true :: true:false 1' :: 0':1':s:c false :: true:false s :: 0':1':s:c -> 0':1':s:c if :: true:false -> 0':1':s:c -> 0':1':s:c -> 0':1':s:c g :: 0':1':s:c -> 0':1':s:c -> 0':1':s:c c :: 0':1':s:c -> 0':1':s:c hole_true:false1_0 :: true:false hole_0':1':s:c2_0 :: 0':1':s:c gen_0':1':s:c3_0 :: Nat -> 0':1':s:c ---------------------------------------- (19) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: f, g They will be analysed ascendingly in the following order: f < g ---------------------------------------- (20) Obligation: Innermost TRS: Rules: f(0') -> true f(1') -> false f(s(x)) -> f(x) if(true, s(x), s(y)) -> s(x) if(false, s(x), s(y)) -> s(y) g(x, c(y)) -> c(g(x, y)) g(x, c(y)) -> g(x, if(f(x), c(g(s(x), y)), c(y))) Types: f :: 0':1':s:c -> true:false 0' :: 0':1':s:c true :: true:false 1' :: 0':1':s:c false :: true:false s :: 0':1':s:c -> 0':1':s:c if :: true:false -> 0':1':s:c -> 0':1':s:c -> 0':1':s:c g :: 0':1':s:c -> 0':1':s:c -> 0':1':s:c c :: 0':1':s:c -> 0':1':s:c hole_true:false1_0 :: true:false hole_0':1':s:c2_0 :: 0':1':s:c gen_0':1':s:c3_0 :: Nat -> 0':1':s:c Generator Equations: gen_0':1':s:c3_0(0) <=> 0' gen_0':1':s:c3_0(+(x, 1)) <=> s(gen_0':1':s:c3_0(x)) The following defined symbols remain to be analysed: f, g They will be analysed ascendingly in the following order: f < g ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: f(gen_0':1':s:c3_0(n5_0)) -> true, rt in Omega(1 + n5_0) Induction Base: f(gen_0':1':s:c3_0(0)) ->_R^Omega(1) true Induction Step: f(gen_0':1':s:c3_0(+(n5_0, 1))) ->_R^Omega(1) f(gen_0':1':s:c3_0(n5_0)) ->_IH true We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (22) Complex Obligation (BEST) ---------------------------------------- (23) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: f(0') -> true f(1') -> false f(s(x)) -> f(x) if(true, s(x), s(y)) -> s(x) if(false, s(x), s(y)) -> s(y) g(x, c(y)) -> c(g(x, y)) g(x, c(y)) -> g(x, if(f(x), c(g(s(x), y)), c(y))) Types: f :: 0':1':s:c -> true:false 0' :: 0':1':s:c true :: true:false 1' :: 0':1':s:c false :: true:false s :: 0':1':s:c -> 0':1':s:c if :: true:false -> 0':1':s:c -> 0':1':s:c -> 0':1':s:c g :: 0':1':s:c -> 0':1':s:c -> 0':1':s:c c :: 0':1':s:c -> 0':1':s:c hole_true:false1_0 :: true:false hole_0':1':s:c2_0 :: 0':1':s:c gen_0':1':s:c3_0 :: Nat -> 0':1':s:c Generator Equations: gen_0':1':s:c3_0(0) <=> 0' gen_0':1':s:c3_0(+(x, 1)) <=> s(gen_0':1':s:c3_0(x)) The following defined symbols remain to be analysed: f, g They will be analysed ascendingly in the following order: f < g ---------------------------------------- (24) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (25) BOUNDS(n^1, INF) ---------------------------------------- (26) Obligation: Innermost TRS: Rules: f(0') -> true f(1') -> false f(s(x)) -> f(x) if(true, s(x), s(y)) -> s(x) if(false, s(x), s(y)) -> s(y) g(x, c(y)) -> c(g(x, y)) g(x, c(y)) -> g(x, if(f(x), c(g(s(x), y)), c(y))) Types: f :: 0':1':s:c -> true:false 0' :: 0':1':s:c true :: true:false 1' :: 0':1':s:c false :: true:false s :: 0':1':s:c -> 0':1':s:c if :: true:false -> 0':1':s:c -> 0':1':s:c -> 0':1':s:c g :: 0':1':s:c -> 0':1':s:c -> 0':1':s:c c :: 0':1':s:c -> 0':1':s:c hole_true:false1_0 :: true:false hole_0':1':s:c2_0 :: 0':1':s:c gen_0':1':s:c3_0 :: Nat -> 0':1':s:c Lemmas: f(gen_0':1':s:c3_0(n5_0)) -> true, rt in Omega(1 + n5_0) Generator Equations: gen_0':1':s:c3_0(0) <=> 0' gen_0':1':s:c3_0(+(x, 1)) <=> s(gen_0':1':s:c3_0(x)) The following defined symbols remain to be analysed: g