WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox/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^1). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (4) CdtProblem (5) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 8 ms] (8) CdtProblem (9) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (10) BOUNDS(1, 1) (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTRS (13) SlicingProof [LOWER BOUND(ID), 0 ms] (14) CpxTRS (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (16) typed CpxTrs (17) OrderProof [LOWER BOUND(ID), 0 ms] (18) typed CpxTrs (19) RewriteLemmaProof [LOWER BOUND(ID), 265 ms] (20) proven lower bound (21) LowerBoundPropagationProof [FINISHED, 0 ms] (22) BOUNDS(n^1, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: duplicate(Cons(x, xs)) -> Cons(x, Cons(x, duplicate(xs))) duplicate(Nil) -> Nil goal(x) -> duplicate(x) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: duplicate(Cons(z0, z1)) -> Cons(z0, Cons(z0, duplicate(z1))) duplicate(Nil) -> Nil goal(z0) -> duplicate(z0) Tuples: DUPLICATE(Cons(z0, z1)) -> c(DUPLICATE(z1)) DUPLICATE(Nil) -> c1 GOAL(z0) -> c2(DUPLICATE(z0)) S tuples: DUPLICATE(Cons(z0, z1)) -> c(DUPLICATE(z1)) DUPLICATE(Nil) -> c1 GOAL(z0) -> c2(DUPLICATE(z0)) K tuples:none Defined Rule Symbols: duplicate_1, goal_1 Defined Pair Symbols: DUPLICATE_1, GOAL_1 Compound Symbols: c_1, c1, c2_1 ---------------------------------------- (3) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: GOAL(z0) -> c2(DUPLICATE(z0)) Removed 1 trailing nodes: DUPLICATE(Nil) -> c1 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: duplicate(Cons(z0, z1)) -> Cons(z0, Cons(z0, duplicate(z1))) duplicate(Nil) -> Nil goal(z0) -> duplicate(z0) Tuples: DUPLICATE(Cons(z0, z1)) -> c(DUPLICATE(z1)) S tuples: DUPLICATE(Cons(z0, z1)) -> c(DUPLICATE(z1)) K tuples:none Defined Rule Symbols: duplicate_1, goal_1 Defined Pair Symbols: DUPLICATE_1 Compound Symbols: c_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: duplicate(Cons(z0, z1)) -> Cons(z0, Cons(z0, duplicate(z1))) duplicate(Nil) -> Nil goal(z0) -> duplicate(z0) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: DUPLICATE(Cons(z0, z1)) -> c(DUPLICATE(z1)) S tuples: DUPLICATE(Cons(z0, z1)) -> c(DUPLICATE(z1)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: DUPLICATE_1 Compound Symbols: c_1 ---------------------------------------- (7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. DUPLICATE(Cons(z0, z1)) -> c(DUPLICATE(z1)) We considered the (Usable) Rules:none And the Tuples: DUPLICATE(Cons(z0, z1)) -> c(DUPLICATE(z1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(Cons(x_1, x_2)) = [1] + x_2 POL(DUPLICATE(x_1)) = x_1 POL(c(x_1)) = x_1 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: DUPLICATE(Cons(z0, z1)) -> c(DUPLICATE(z1)) S tuples:none K tuples: DUPLICATE(Cons(z0, z1)) -> c(DUPLICATE(z1)) Defined Rule Symbols:none Defined Pair Symbols: DUPLICATE_1 Compound Symbols: c_1 ---------------------------------------- (9) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (10) BOUNDS(1, 1) ---------------------------------------- (11) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (12) 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: duplicate(Cons(x, xs)) -> Cons(x, Cons(x, duplicate(xs))) duplicate(Nil) -> Nil goal(x) -> duplicate(x) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) SlicingProof (LOWER BOUND(ID)) Sliced the following arguments: Cons/0 ---------------------------------------- (14) 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: duplicate(Cons(xs)) -> Cons(Cons(duplicate(xs))) duplicate(Nil) -> Nil goal(x) -> duplicate(x) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (16) Obligation: Innermost TRS: Rules: duplicate(Cons(xs)) -> Cons(Cons(duplicate(xs))) duplicate(Nil) -> Nil goal(x) -> duplicate(x) Types: duplicate :: Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil hole_Cons:Nil1_0 :: Cons:Nil gen_Cons:Nil2_0 :: Nat -> Cons:Nil ---------------------------------------- (17) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: duplicate ---------------------------------------- (18) Obligation: Innermost TRS: Rules: duplicate(Cons(xs)) -> Cons(Cons(duplicate(xs))) duplicate(Nil) -> Nil goal(x) -> duplicate(x) Types: duplicate :: Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil hole_Cons:Nil1_0 :: Cons:Nil gen_Cons:Nil2_0 :: Nat -> Cons:Nil Generator Equations: gen_Cons:Nil2_0(0) <=> Nil gen_Cons:Nil2_0(+(x, 1)) <=> Cons(gen_Cons:Nil2_0(x)) The following defined symbols remain to be analysed: duplicate ---------------------------------------- (19) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: duplicate(gen_Cons:Nil2_0(n4_0)) -> gen_Cons:Nil2_0(*(2, n4_0)), rt in Omega(1 + n4_0) Induction Base: duplicate(gen_Cons:Nil2_0(0)) ->_R^Omega(1) Nil Induction Step: duplicate(gen_Cons:Nil2_0(+(n4_0, 1))) ->_R^Omega(1) Cons(Cons(duplicate(gen_Cons:Nil2_0(n4_0)))) ->_IH Cons(Cons(gen_Cons:Nil2_0(*(2, c5_0)))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (20) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: duplicate(Cons(xs)) -> Cons(Cons(duplicate(xs))) duplicate(Nil) -> Nil goal(x) -> duplicate(x) Types: duplicate :: Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil hole_Cons:Nil1_0 :: Cons:Nil gen_Cons:Nil2_0 :: Nat -> Cons:Nil Generator Equations: gen_Cons:Nil2_0(0) <=> Nil gen_Cons:Nil2_0(+(x, 1)) <=> Cons(gen_Cons:Nil2_0(x)) The following defined symbols remain to be analysed: duplicate ---------------------------------------- (21) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (22) BOUNDS(n^1, INF)