/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^1)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 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 [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)), 69 ms] (10) CdtProblem (11) CdtKnowledgeProof [FINISHED, 0 ms] (12) BOUNDS(1, 1) (13) RenamingProof [BOTH BOUNDS(ID, 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), 414 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: del(.(x, .(y, z))) -> f(=(x, y), x, y, z) f(true, x, y, z) -> del(.(y, z)) f(false, x, y, z) -> .(x, del(.(y, z))) =(nil, nil) -> true =(.(x, y), nil) -> false =(nil, .(y, z)) -> false =(.(x, y), .(u, v)) -> and(=(x, u), =(y, v)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: del(.(z0, .(z1, z2))) -> f(=(z0, z1), z0, z1, z2) f(true, z0, z1, z2) -> del(.(z1, z2)) f(false, z0, z1, z2) -> .(z0, del(.(z1, z2))) =(nil, nil) -> true =(.(z0, z1), nil) -> false =(nil, .(z0, z1)) -> false =(.(z0, z1), .(u, v)) -> and(=(z0, u), =(z1, v)) Tuples: DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2), ='(z0, z1)) F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) ='(nil, nil) -> c3 ='(.(z0, z1), nil) -> c4 ='(nil, .(z0, z1)) -> c5 ='(.(z0, z1), .(u, v)) -> c6(='(z0, u), ='(z1, v)) S tuples: DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2), ='(z0, z1)) F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) ='(nil, nil) -> c3 ='(.(z0, z1), nil) -> c4 ='(nil, .(z0, z1)) -> c5 ='(.(z0, z1), .(u, v)) -> c6(='(z0, u), ='(z1, v)) K tuples:none Defined Rule Symbols: del_1, f_4, =_2 Defined Pair Symbols: DEL_1, F_4, ='_2 Compound Symbols: c_2, c1_1, c2_1, c3, c4, c5, c6_2 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 4 trailing nodes: ='(.(z0, z1), .(u, v)) -> c6(='(z0, u), ='(z1, v)) ='(nil, .(z0, z1)) -> c5 ='(.(z0, z1), nil) -> c4 ='(nil, nil) -> c3 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: del(.(z0, .(z1, z2))) -> f(=(z0, z1), z0, z1, z2) f(true, z0, z1, z2) -> del(.(z1, z2)) f(false, z0, z1, z2) -> .(z0, del(.(z1, z2))) =(nil, nil) -> true =(.(z0, z1), nil) -> false =(nil, .(z0, z1)) -> false =(.(z0, z1), .(u, v)) -> and(=(z0, u), =(z1, v)) Tuples: DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2), ='(z0, z1)) F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) S tuples: DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2), ='(z0, z1)) F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) K tuples:none Defined Rule Symbols: del_1, f_4, =_2 Defined Pair Symbols: DEL_1, F_4 Compound Symbols: c_2, c1_1, c2_1 ---------------------------------------- (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: del(.(z0, .(z1, z2))) -> f(=(z0, z1), z0, z1, z2) f(true, z0, z1, z2) -> del(.(z1, z2)) f(false, z0, z1, z2) -> .(z0, del(.(z1, z2))) =(nil, nil) -> true =(.(z0, z1), nil) -> false =(nil, .(z0, z1)) -> false =(.(z0, z1), .(u, v)) -> and(=(z0, u), =(z1, v)) Tuples: F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2)) S tuples: F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2)) K tuples:none Defined Rule Symbols: del_1, f_4, =_2 Defined Pair Symbols: F_4, DEL_1 Compound Symbols: c1_1, c2_1, c_1 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: del(.(z0, .(z1, z2))) -> f(=(z0, z1), z0, z1, z2) f(true, z0, z1, z2) -> del(.(z1, z2)) f(false, z0, z1, z2) -> .(z0, del(.(z1, z2))) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: =(nil, nil) -> true =(.(z0, z1), nil) -> false =(nil, .(z0, z1)) -> false =(.(z0, z1), .(u, v)) -> and(=(z0, u), =(z1, v)) Tuples: F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2)) S tuples: F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2)) K tuples:none Defined Rule Symbols: =_2 Defined Pair Symbols: F_4, DEL_1 Compound Symbols: c1_1, c2_1, c_1 ---------------------------------------- (9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2)) We considered the (Usable) Rules:none And the Tuples: F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2)) The order we found is given by the following interpretation: Polynomial interpretation : POL(.(x_1, x_2)) = [3] + x_2 POL(=(x_1, x_2)) = [3] + x_1 + [2]x_2 POL(DEL(x_1)) = x_1 POL(F(x_1, x_2, x_3, x_4)) = [3] + x_4 POL(and(x_1, x_2)) = [3] + x_2 POL(c(x_1)) = x_1 POL(c1(x_1)) = x_1 POL(c2(x_1)) = x_1 POL(false) = 0 POL(nil) = 0 POL(true) = [2] POL(u) = [3] POL(v) = [3] ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules: =(nil, nil) -> true =(.(z0, z1), nil) -> false =(nil, .(z0, z1)) -> false =(.(z0, z1), .(u, v)) -> and(=(z0, u), =(z1, v)) Tuples: F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2)) S tuples: F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) K tuples: DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2)) Defined Rule Symbols: =_2 Defined Pair Symbols: F_4, DEL_1 Compound Symbols: c1_1, c2_1, c_1 ---------------------------------------- (11) CdtKnowledgeProof (FINISHED) The following tuples could be moved from S to K by knowledge propagation: F(true, z0, z1, z2) -> c1(DEL(.(z1, z2))) F(false, z0, z1, z2) -> c2(DEL(.(z1, z2))) DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2)) DEL(.(z0, .(z1, z2))) -> c(F(=(z0, z1), z0, z1, z2)) Now S is empty ---------------------------------------- (12) BOUNDS(1, 1) ---------------------------------------- (13) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (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: del(.(x, .(y, z))) -> f(='(x, y), x, y, z) f(true, x, y, z) -> del(.(y, z)) f(false, x, y, z) -> .(x, del(.(y, z))) ='(nil, nil) -> true ='(.(x, y), nil) -> false ='(nil, .(y, z)) -> false ='(.(x, y), .(u, v)) -> and(='(x, u), ='(y, v)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (16) Obligation: Innermost TRS: Rules: del(.(x, .(y, z))) -> f(='(x, y), x, y, z) f(true, x, y, z) -> del(.(y, z)) f(false, x, y, z) -> .(x, del(.(y, z))) ='(nil, nil) -> true ='(.(x, y), nil) -> false ='(nil, .(y, z)) -> false ='(.(x, y), .(u, v)) -> and(='(x, u), ='(y, v)) Types: del :: .:nil:u:v -> .:nil:u:v . :: .:nil:u:v -> .:nil:u:v -> .:nil:u:v f :: true:false:and -> .:nil:u:v -> .:nil:u:v -> .:nil:u:v -> .:nil:u:v =' :: .:nil:u:v -> .:nil:u:v -> true:false:and true :: true:false:and false :: true:false:and nil :: .:nil:u:v u :: .:nil:u:v v :: .:nil:u:v and :: true:false:and -> true:false:and -> true:false:and hole_.:nil:u:v1_0 :: .:nil:u:v hole_true:false:and2_0 :: true:false:and gen_.:nil:u:v3_0 :: Nat -> .:nil:u:v gen_true:false:and4_0 :: Nat -> true:false:and ---------------------------------------- (17) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: del, =' They will be analysed ascendingly in the following order: =' < del ---------------------------------------- (18) Obligation: Innermost TRS: Rules: del(.(x, .(y, z))) -> f(='(x, y), x, y, z) f(true, x, y, z) -> del(.(y, z)) f(false, x, y, z) -> .(x, del(.(y, z))) ='(nil, nil) -> true ='(.(x, y), nil) -> false ='(nil, .(y, z)) -> false ='(.(x, y), .(u, v)) -> and(='(x, u), ='(y, v)) Types: del :: .:nil:u:v -> .:nil:u:v . :: .:nil:u:v -> .:nil:u:v -> .:nil:u:v f :: true:false:and -> .:nil:u:v -> .:nil:u:v -> .:nil:u:v -> .:nil:u:v =' :: .:nil:u:v -> .:nil:u:v -> true:false:and true :: true:false:and false :: true:false:and nil :: .:nil:u:v u :: .:nil:u:v v :: .:nil:u:v and :: true:false:and -> true:false:and -> true:false:and hole_.:nil:u:v1_0 :: .:nil:u:v hole_true:false:and2_0 :: true:false:and gen_.:nil:u:v3_0 :: Nat -> .:nil:u:v gen_true:false:and4_0 :: Nat -> true:false:and Generator Equations: gen_.:nil:u:v3_0(0) <=> nil gen_.:nil:u:v3_0(+(x, 1)) <=> .(nil, gen_.:nil:u:v3_0(x)) gen_true:false:and4_0(0) <=> false gen_true:false:and4_0(+(x, 1)) <=> and(false, gen_true:false:and4_0(x)) The following defined symbols remain to be analysed: =', del They will be analysed ascendingly in the following order: =' < del ---------------------------------------- (19) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: del(gen_.:nil:u:v3_0(+(2, n56_0))) -> *5_0, rt in Omega(n56_0) Induction Base: del(gen_.:nil:u:v3_0(+(2, 0))) Induction Step: del(gen_.:nil:u:v3_0(+(2, +(n56_0, 1)))) ->_R^Omega(1) f(='(nil, nil), nil, nil, gen_.:nil:u:v3_0(+(1, n56_0))) ->_R^Omega(1) f(true, nil, nil, gen_.:nil:u:v3_0(+(1, n56_0))) ->_R^Omega(1) del(.(nil, gen_.:nil:u:v3_0(+(1, n56_0)))) ->_IH *5_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: del(.(x, .(y, z))) -> f(='(x, y), x, y, z) f(true, x, y, z) -> del(.(y, z)) f(false, x, y, z) -> .(x, del(.(y, z))) ='(nil, nil) -> true ='(.(x, y), nil) -> false ='(nil, .(y, z)) -> false ='(.(x, y), .(u, v)) -> and(='(x, u), ='(y, v)) Types: del :: .:nil:u:v -> .:nil:u:v . :: .:nil:u:v -> .:nil:u:v -> .:nil:u:v f :: true:false:and -> .:nil:u:v -> .:nil:u:v -> .:nil:u:v -> .:nil:u:v =' :: .:nil:u:v -> .:nil:u:v -> true:false:and true :: true:false:and false :: true:false:and nil :: .:nil:u:v u :: .:nil:u:v v :: .:nil:u:v and :: true:false:and -> true:false:and -> true:false:and hole_.:nil:u:v1_0 :: .:nil:u:v hole_true:false:and2_0 :: true:false:and gen_.:nil:u:v3_0 :: Nat -> .:nil:u:v gen_true:false:and4_0 :: Nat -> true:false:and Generator Equations: gen_.:nil:u:v3_0(0) <=> nil gen_.:nil:u:v3_0(+(x, 1)) <=> .(nil, gen_.:nil:u:v3_0(x)) gen_true:false:and4_0(0) <=> false gen_true:false:and4_0(+(x, 1)) <=> and(false, gen_true:false:and4_0(x)) The following defined symbols remain to be analysed: del ---------------------------------------- (21) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (22) BOUNDS(n^1, INF)