310.94/291.55 WORST_CASE(Omega(n^2), ?) 310.94/291.56 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 310.94/291.56 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 310.94/291.56 310.94/291.56 310.94/291.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 310.94/291.56 310.94/291.56 (0) CpxTRS 310.94/291.56 (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 310.94/291.56 (2) CpxTRS 310.94/291.56 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 310.94/291.56 (4) typed CpxTrs 310.94/291.56 (5) OrderProof [LOWER BOUND(ID), 0 ms] 310.94/291.56 (6) typed CpxTrs 310.94/291.56 (7) RewriteLemmaProof [LOWER BOUND(ID), 291 ms] 310.94/291.56 (8) BEST 310.94/291.56 (9) proven lower bound 310.94/291.56 (10) LowerBoundPropagationProof [FINISHED, 0 ms] 310.94/291.56 (11) BOUNDS(n^1, INF) 310.94/291.56 (12) typed CpxTrs 310.94/291.56 (13) RewriteLemmaProof [LOWER BOUND(ID), 86 ms] 310.94/291.56 (14) typed CpxTrs 310.94/291.56 (15) RewriteLemmaProof [LOWER BOUND(ID), 16 ms] 310.94/291.56 (16) typed CpxTrs 310.94/291.56 (17) RewriteLemmaProof [LOWER BOUND(ID), 23 ms] 310.94/291.56 (18) typed CpxTrs 310.94/291.56 (19) RewriteLemmaProof [LOWER BOUND(ID), 88 ms] 310.94/291.56 (20) proven lower bound 310.94/291.56 (21) LowerBoundPropagationProof [FINISHED, 0 ms] 310.94/291.56 (22) BOUNDS(n^2, INF) 310.94/291.56 310.94/291.56 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (0) 310.94/291.56 Obligation: 310.94/291.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 310.94/291.56 310.94/291.56 310.94/291.56 The TRS R consists of the following rules: 310.94/291.56 310.94/291.56 le(0, Y) -> true 310.94/291.56 le(s(X), 0) -> false 310.94/291.56 le(s(X), s(Y)) -> le(X, Y) 310.94/291.56 app(nil, Y) -> Y 310.94/291.56 app(cons(N, L), Y) -> cons(N, app(L, Y)) 310.94/291.56 low(N, nil) -> nil 310.94/291.56 low(N, cons(M, L)) -> iflow(le(M, N), N, cons(M, L)) 310.94/291.56 iflow(true, N, cons(M, L)) -> cons(M, low(N, L)) 310.94/291.56 iflow(false, N, cons(M, L)) -> low(N, L) 310.94/291.56 high(N, nil) -> nil 310.94/291.56 high(N, cons(M, L)) -> ifhigh(le(M, N), N, cons(M, L)) 310.94/291.56 ifhigh(true, N, cons(M, L)) -> high(N, L) 310.94/291.56 ifhigh(false, N, cons(M, L)) -> cons(M, high(N, L)) 310.94/291.56 quicksort(nil) -> nil 310.94/291.56 quicksort(cons(N, L)) -> app(quicksort(low(N, L)), cons(N, quicksort(high(N, L)))) 310.94/291.56 310.94/291.56 S is empty. 310.94/291.56 Rewrite Strategy: FULL 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (1) RenamingProof (BOTH BOUNDS(ID, ID)) 310.94/291.56 Renamed function symbols to avoid clashes with predefined symbol. 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (2) 310.94/291.56 Obligation: 310.94/291.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 310.94/291.56 310.94/291.56 310.94/291.56 The TRS R consists of the following rules: 310.94/291.56 310.94/291.56 le(0', Y) -> true 310.94/291.56 le(s(X), 0') -> false 310.94/291.56 le(s(X), s(Y)) -> le(X, Y) 310.94/291.56 app(nil, Y) -> Y 310.94/291.56 app(cons(N, L), Y) -> cons(N, app(L, Y)) 310.94/291.56 low(N, nil) -> nil 310.94/291.56 low(N, cons(M, L)) -> iflow(le(M, N), N, cons(M, L)) 310.94/291.56 iflow(true, N, cons(M, L)) -> cons(M, low(N, L)) 310.94/291.56 iflow(false, N, cons(M, L)) -> low(N, L) 310.94/291.56 high(N, nil) -> nil 310.94/291.56 high(N, cons(M, L)) -> ifhigh(le(M, N), N, cons(M, L)) 310.94/291.56 ifhigh(true, N, cons(M, L)) -> high(N, L) 310.94/291.56 ifhigh(false, N, cons(M, L)) -> cons(M, high(N, L)) 310.94/291.56 quicksort(nil) -> nil 310.94/291.56 quicksort(cons(N, L)) -> app(quicksort(low(N, L)), cons(N, quicksort(high(N, L)))) 310.94/291.56 310.94/291.56 S is empty. 310.94/291.56 Rewrite Strategy: FULL 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 310.94/291.56 Infered types. 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (4) 310.94/291.56 Obligation: 310.94/291.56 TRS: 310.94/291.56 Rules: 310.94/291.56 le(0', Y) -> true 310.94/291.56 le(s(X), 0') -> false 310.94/291.56 le(s(X), s(Y)) -> le(X, Y) 310.94/291.56 app(nil, Y) -> Y 310.94/291.56 app(cons(N, L), Y) -> cons(N, app(L, Y)) 310.94/291.56 low(N, nil) -> nil 310.94/291.56 low(N, cons(M, L)) -> iflow(le(M, N), N, cons(M, L)) 310.94/291.56 iflow(true, N, cons(M, L)) -> cons(M, low(N, L)) 310.94/291.56 iflow(false, N, cons(M, L)) -> low(N, L) 310.94/291.56 high(N, nil) -> nil 310.94/291.56 high(N, cons(M, L)) -> ifhigh(le(M, N), N, cons(M, L)) 310.94/291.56 ifhigh(true, N, cons(M, L)) -> high(N, L) 310.94/291.56 ifhigh(false, N, cons(M, L)) -> cons(M, high(N, L)) 310.94/291.56 quicksort(nil) -> nil 310.94/291.56 quicksort(cons(N, L)) -> app(quicksort(low(N, L)), cons(N, quicksort(high(N, L)))) 310.94/291.56 310.94/291.56 Types: 310.94/291.56 le :: 0':s -> 0':s -> true:false 310.94/291.56 0' :: 0':s 310.94/291.56 true :: true:false 310.94/291.56 s :: 0':s -> 0':s 310.94/291.56 false :: true:false 310.94/291.56 app :: nil:cons -> nil:cons -> nil:cons 310.94/291.56 nil :: nil:cons 310.94/291.56 cons :: 0':s -> nil:cons -> nil:cons 310.94/291.56 low :: 0':s -> nil:cons -> nil:cons 310.94/291.56 iflow :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 high :: 0':s -> nil:cons -> nil:cons 310.94/291.56 ifhigh :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 quicksort :: nil:cons -> nil:cons 310.94/291.56 hole_true:false1_0 :: true:false 310.94/291.56 hole_0':s2_0 :: 0':s 310.94/291.56 hole_nil:cons3_0 :: nil:cons 310.94/291.56 gen_0':s4_0 :: Nat -> 0':s 310.94/291.56 gen_nil:cons5_0 :: Nat -> nil:cons 310.94/291.56 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (5) OrderProof (LOWER BOUND(ID)) 310.94/291.56 Heuristically decided to analyse the following defined symbols: 310.94/291.56 le, app, low, high, quicksort 310.94/291.56 310.94/291.56 They will be analysed ascendingly in the following order: 310.94/291.56 le < low 310.94/291.56 le < high 310.94/291.56 app < quicksort 310.94/291.56 low < quicksort 310.94/291.56 high < quicksort 310.94/291.56 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (6) 310.94/291.56 Obligation: 310.94/291.56 TRS: 310.94/291.56 Rules: 310.94/291.56 le(0', Y) -> true 310.94/291.56 le(s(X), 0') -> false 310.94/291.56 le(s(X), s(Y)) -> le(X, Y) 310.94/291.56 app(nil, Y) -> Y 310.94/291.56 app(cons(N, L), Y) -> cons(N, app(L, Y)) 310.94/291.56 low(N, nil) -> nil 310.94/291.56 low(N, cons(M, L)) -> iflow(le(M, N), N, cons(M, L)) 310.94/291.56 iflow(true, N, cons(M, L)) -> cons(M, low(N, L)) 310.94/291.56 iflow(false, N, cons(M, L)) -> low(N, L) 310.94/291.56 high(N, nil) -> nil 310.94/291.56 high(N, cons(M, L)) -> ifhigh(le(M, N), N, cons(M, L)) 310.94/291.56 ifhigh(true, N, cons(M, L)) -> high(N, L) 310.94/291.56 ifhigh(false, N, cons(M, L)) -> cons(M, high(N, L)) 310.94/291.56 quicksort(nil) -> nil 310.94/291.56 quicksort(cons(N, L)) -> app(quicksort(low(N, L)), cons(N, quicksort(high(N, L)))) 310.94/291.56 310.94/291.56 Types: 310.94/291.56 le :: 0':s -> 0':s -> true:false 310.94/291.56 0' :: 0':s 310.94/291.56 true :: true:false 310.94/291.56 s :: 0':s -> 0':s 310.94/291.56 false :: true:false 310.94/291.56 app :: nil:cons -> nil:cons -> nil:cons 310.94/291.56 nil :: nil:cons 310.94/291.56 cons :: 0':s -> nil:cons -> nil:cons 310.94/291.56 low :: 0':s -> nil:cons -> nil:cons 310.94/291.56 iflow :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 high :: 0':s -> nil:cons -> nil:cons 310.94/291.56 ifhigh :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 quicksort :: nil:cons -> nil:cons 310.94/291.56 hole_true:false1_0 :: true:false 310.94/291.56 hole_0':s2_0 :: 0':s 310.94/291.56 hole_nil:cons3_0 :: nil:cons 310.94/291.56 gen_0':s4_0 :: Nat -> 0':s 310.94/291.56 gen_nil:cons5_0 :: Nat -> nil:cons 310.94/291.56 310.94/291.56 310.94/291.56 Generator Equations: 310.94/291.56 gen_0':s4_0(0) <=> 0' 310.94/291.56 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 310.94/291.56 gen_nil:cons5_0(0) <=> nil 310.94/291.56 gen_nil:cons5_0(+(x, 1)) <=> cons(0', gen_nil:cons5_0(x)) 310.94/291.56 310.94/291.56 310.94/291.56 The following defined symbols remain to be analysed: 310.94/291.56 le, app, low, high, quicksort 310.94/291.56 310.94/291.56 They will be analysed ascendingly in the following order: 310.94/291.56 le < low 310.94/291.56 le < high 310.94/291.56 app < quicksort 310.94/291.56 low < quicksort 310.94/291.56 high < quicksort 310.94/291.56 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (7) RewriteLemmaProof (LOWER BOUND(ID)) 310.94/291.56 Proved the following rewrite lemma: 310.94/291.56 le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) -> true, rt in Omega(1 + n7_0) 310.94/291.56 310.94/291.56 Induction Base: 310.94/291.56 le(gen_0':s4_0(0), gen_0':s4_0(0)) ->_R^Omega(1) 310.94/291.56 true 310.94/291.56 310.94/291.56 Induction Step: 310.94/291.56 le(gen_0':s4_0(+(n7_0, 1)), gen_0':s4_0(+(n7_0, 1))) ->_R^Omega(1) 310.94/291.56 le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) ->_IH 310.94/291.56 true 310.94/291.56 310.94/291.56 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (8) 310.94/291.56 Complex Obligation (BEST) 310.94/291.56 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (9) 310.94/291.56 Obligation: 310.94/291.56 Proved the lower bound n^1 for the following obligation: 310.94/291.56 310.94/291.56 TRS: 310.94/291.56 Rules: 310.94/291.56 le(0', Y) -> true 310.94/291.56 le(s(X), 0') -> false 310.94/291.56 le(s(X), s(Y)) -> le(X, Y) 310.94/291.56 app(nil, Y) -> Y 310.94/291.56 app(cons(N, L), Y) -> cons(N, app(L, Y)) 310.94/291.56 low(N, nil) -> nil 310.94/291.56 low(N, cons(M, L)) -> iflow(le(M, N), N, cons(M, L)) 310.94/291.56 iflow(true, N, cons(M, L)) -> cons(M, low(N, L)) 310.94/291.56 iflow(false, N, cons(M, L)) -> low(N, L) 310.94/291.56 high(N, nil) -> nil 310.94/291.56 high(N, cons(M, L)) -> ifhigh(le(M, N), N, cons(M, L)) 310.94/291.56 ifhigh(true, N, cons(M, L)) -> high(N, L) 310.94/291.56 ifhigh(false, N, cons(M, L)) -> cons(M, high(N, L)) 310.94/291.56 quicksort(nil) -> nil 310.94/291.56 quicksort(cons(N, L)) -> app(quicksort(low(N, L)), cons(N, quicksort(high(N, L)))) 310.94/291.56 310.94/291.56 Types: 310.94/291.56 le :: 0':s -> 0':s -> true:false 310.94/291.56 0' :: 0':s 310.94/291.56 true :: true:false 310.94/291.56 s :: 0':s -> 0':s 310.94/291.56 false :: true:false 310.94/291.56 app :: nil:cons -> nil:cons -> nil:cons 310.94/291.56 nil :: nil:cons 310.94/291.56 cons :: 0':s -> nil:cons -> nil:cons 310.94/291.56 low :: 0':s -> nil:cons -> nil:cons 310.94/291.56 iflow :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 high :: 0':s -> nil:cons -> nil:cons 310.94/291.56 ifhigh :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 quicksort :: nil:cons -> nil:cons 310.94/291.56 hole_true:false1_0 :: true:false 310.94/291.56 hole_0':s2_0 :: 0':s 310.94/291.56 hole_nil:cons3_0 :: nil:cons 310.94/291.56 gen_0':s4_0 :: Nat -> 0':s 310.94/291.56 gen_nil:cons5_0 :: Nat -> nil:cons 310.94/291.56 310.94/291.56 310.94/291.56 Generator Equations: 310.94/291.56 gen_0':s4_0(0) <=> 0' 310.94/291.56 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 310.94/291.56 gen_nil:cons5_0(0) <=> nil 310.94/291.56 gen_nil:cons5_0(+(x, 1)) <=> cons(0', gen_nil:cons5_0(x)) 310.94/291.56 310.94/291.56 310.94/291.56 The following defined symbols remain to be analysed: 310.94/291.56 le, app, low, high, quicksort 310.94/291.56 310.94/291.56 They will be analysed ascendingly in the following order: 310.94/291.56 le < low 310.94/291.56 le < high 310.94/291.56 app < quicksort 310.94/291.56 low < quicksort 310.94/291.56 high < quicksort 310.94/291.56 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (10) LowerBoundPropagationProof (FINISHED) 310.94/291.56 Propagated lower bound. 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (11) 310.94/291.56 BOUNDS(n^1, INF) 310.94/291.56 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (12) 310.94/291.56 Obligation: 310.94/291.56 TRS: 310.94/291.56 Rules: 310.94/291.56 le(0', Y) -> true 310.94/291.56 le(s(X), 0') -> false 310.94/291.56 le(s(X), s(Y)) -> le(X, Y) 310.94/291.56 app(nil, Y) -> Y 310.94/291.56 app(cons(N, L), Y) -> cons(N, app(L, Y)) 310.94/291.56 low(N, nil) -> nil 310.94/291.56 low(N, cons(M, L)) -> iflow(le(M, N), N, cons(M, L)) 310.94/291.56 iflow(true, N, cons(M, L)) -> cons(M, low(N, L)) 310.94/291.56 iflow(false, N, cons(M, L)) -> low(N, L) 310.94/291.56 high(N, nil) -> nil 310.94/291.56 high(N, cons(M, L)) -> ifhigh(le(M, N), N, cons(M, L)) 310.94/291.56 ifhigh(true, N, cons(M, L)) -> high(N, L) 310.94/291.56 ifhigh(false, N, cons(M, L)) -> cons(M, high(N, L)) 310.94/291.56 quicksort(nil) -> nil 310.94/291.56 quicksort(cons(N, L)) -> app(quicksort(low(N, L)), cons(N, quicksort(high(N, L)))) 310.94/291.56 310.94/291.56 Types: 310.94/291.56 le :: 0':s -> 0':s -> true:false 310.94/291.56 0' :: 0':s 310.94/291.56 true :: true:false 310.94/291.56 s :: 0':s -> 0':s 310.94/291.56 false :: true:false 310.94/291.56 app :: nil:cons -> nil:cons -> nil:cons 310.94/291.56 nil :: nil:cons 310.94/291.56 cons :: 0':s -> nil:cons -> nil:cons 310.94/291.56 low :: 0':s -> nil:cons -> nil:cons 310.94/291.56 iflow :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 high :: 0':s -> nil:cons -> nil:cons 310.94/291.56 ifhigh :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 quicksort :: nil:cons -> nil:cons 310.94/291.56 hole_true:false1_0 :: true:false 310.94/291.56 hole_0':s2_0 :: 0':s 310.94/291.56 hole_nil:cons3_0 :: nil:cons 310.94/291.56 gen_0':s4_0 :: Nat -> 0':s 310.94/291.56 gen_nil:cons5_0 :: Nat -> nil:cons 310.94/291.56 310.94/291.56 310.94/291.56 Lemmas: 310.94/291.56 le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) -> true, rt in Omega(1 + n7_0) 310.94/291.56 310.94/291.56 310.94/291.56 Generator Equations: 310.94/291.56 gen_0':s4_0(0) <=> 0' 310.94/291.56 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 310.94/291.56 gen_nil:cons5_0(0) <=> nil 310.94/291.56 gen_nil:cons5_0(+(x, 1)) <=> cons(0', gen_nil:cons5_0(x)) 310.94/291.56 310.94/291.56 310.94/291.56 The following defined symbols remain to be analysed: 310.94/291.56 app, low, high, quicksort 310.94/291.56 310.94/291.56 They will be analysed ascendingly in the following order: 310.94/291.56 app < quicksort 310.94/291.56 low < quicksort 310.94/291.56 high < quicksort 310.94/291.56 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (13) RewriteLemmaProof (LOWER BOUND(ID)) 310.94/291.56 Proved the following rewrite lemma: 310.94/291.56 app(gen_nil:cons5_0(n288_0), gen_nil:cons5_0(b)) -> gen_nil:cons5_0(+(n288_0, b)), rt in Omega(1 + n288_0) 310.94/291.56 310.94/291.56 Induction Base: 310.94/291.56 app(gen_nil:cons5_0(0), gen_nil:cons5_0(b)) ->_R^Omega(1) 310.94/291.56 gen_nil:cons5_0(b) 310.94/291.56 310.94/291.56 Induction Step: 310.94/291.56 app(gen_nil:cons5_0(+(n288_0, 1)), gen_nil:cons5_0(b)) ->_R^Omega(1) 310.94/291.56 cons(0', app(gen_nil:cons5_0(n288_0), gen_nil:cons5_0(b))) ->_IH 310.94/291.56 cons(0', gen_nil:cons5_0(+(b, c289_0))) 310.94/291.56 310.94/291.56 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (14) 310.94/291.56 Obligation: 310.94/291.56 TRS: 310.94/291.56 Rules: 310.94/291.56 le(0', Y) -> true 310.94/291.56 le(s(X), 0') -> false 310.94/291.56 le(s(X), s(Y)) -> le(X, Y) 310.94/291.56 app(nil, Y) -> Y 310.94/291.56 app(cons(N, L), Y) -> cons(N, app(L, Y)) 310.94/291.56 low(N, nil) -> nil 310.94/291.56 low(N, cons(M, L)) -> iflow(le(M, N), N, cons(M, L)) 310.94/291.56 iflow(true, N, cons(M, L)) -> cons(M, low(N, L)) 310.94/291.56 iflow(false, N, cons(M, L)) -> low(N, L) 310.94/291.56 high(N, nil) -> nil 310.94/291.56 high(N, cons(M, L)) -> ifhigh(le(M, N), N, cons(M, L)) 310.94/291.56 ifhigh(true, N, cons(M, L)) -> high(N, L) 310.94/291.56 ifhigh(false, N, cons(M, L)) -> cons(M, high(N, L)) 310.94/291.56 quicksort(nil) -> nil 310.94/291.56 quicksort(cons(N, L)) -> app(quicksort(low(N, L)), cons(N, quicksort(high(N, L)))) 310.94/291.56 310.94/291.56 Types: 310.94/291.56 le :: 0':s -> 0':s -> true:false 310.94/291.56 0' :: 0':s 310.94/291.56 true :: true:false 310.94/291.56 s :: 0':s -> 0':s 310.94/291.56 false :: true:false 310.94/291.56 app :: nil:cons -> nil:cons -> nil:cons 310.94/291.56 nil :: nil:cons 310.94/291.56 cons :: 0':s -> nil:cons -> nil:cons 310.94/291.56 low :: 0':s -> nil:cons -> nil:cons 310.94/291.56 iflow :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 high :: 0':s -> nil:cons -> nil:cons 310.94/291.56 ifhigh :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 quicksort :: nil:cons -> nil:cons 310.94/291.56 hole_true:false1_0 :: true:false 310.94/291.56 hole_0':s2_0 :: 0':s 310.94/291.56 hole_nil:cons3_0 :: nil:cons 310.94/291.56 gen_0':s4_0 :: Nat -> 0':s 310.94/291.56 gen_nil:cons5_0 :: Nat -> nil:cons 310.94/291.56 310.94/291.56 310.94/291.56 Lemmas: 310.94/291.56 le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) -> true, rt in Omega(1 + n7_0) 310.94/291.56 app(gen_nil:cons5_0(n288_0), gen_nil:cons5_0(b)) -> gen_nil:cons5_0(+(n288_0, b)), rt in Omega(1 + n288_0) 310.94/291.56 310.94/291.56 310.94/291.56 Generator Equations: 310.94/291.56 gen_0':s4_0(0) <=> 0' 310.94/291.56 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 310.94/291.56 gen_nil:cons5_0(0) <=> nil 310.94/291.56 gen_nil:cons5_0(+(x, 1)) <=> cons(0', gen_nil:cons5_0(x)) 310.94/291.56 310.94/291.56 310.94/291.56 The following defined symbols remain to be analysed: 310.94/291.56 low, high, quicksort 310.94/291.56 310.94/291.56 They will be analysed ascendingly in the following order: 310.94/291.56 low < quicksort 310.94/291.56 high < quicksort 310.94/291.56 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (15) RewriteLemmaProof (LOWER BOUND(ID)) 310.94/291.56 Proved the following rewrite lemma: 310.94/291.56 low(gen_0':s4_0(0), gen_nil:cons5_0(n1123_0)) -> gen_nil:cons5_0(n1123_0), rt in Omega(1 + n1123_0) 310.94/291.56 310.94/291.56 Induction Base: 310.94/291.56 low(gen_0':s4_0(0), gen_nil:cons5_0(0)) ->_R^Omega(1) 310.94/291.56 nil 310.94/291.56 310.94/291.56 Induction Step: 310.94/291.56 low(gen_0':s4_0(0), gen_nil:cons5_0(+(n1123_0, 1))) ->_R^Omega(1) 310.94/291.56 iflow(le(0', gen_0':s4_0(0)), gen_0':s4_0(0), cons(0', gen_nil:cons5_0(n1123_0))) ->_L^Omega(1) 310.94/291.56 iflow(true, gen_0':s4_0(0), cons(0', gen_nil:cons5_0(n1123_0))) ->_R^Omega(1) 310.94/291.56 cons(0', low(gen_0':s4_0(0), gen_nil:cons5_0(n1123_0))) ->_IH 310.94/291.56 cons(0', gen_nil:cons5_0(c1124_0)) 310.94/291.56 310.94/291.56 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (16) 310.94/291.56 Obligation: 310.94/291.56 TRS: 310.94/291.56 Rules: 310.94/291.56 le(0', Y) -> true 310.94/291.56 le(s(X), 0') -> false 310.94/291.56 le(s(X), s(Y)) -> le(X, Y) 310.94/291.56 app(nil, Y) -> Y 310.94/291.56 app(cons(N, L), Y) -> cons(N, app(L, Y)) 310.94/291.56 low(N, nil) -> nil 310.94/291.56 low(N, cons(M, L)) -> iflow(le(M, N), N, cons(M, L)) 310.94/291.56 iflow(true, N, cons(M, L)) -> cons(M, low(N, L)) 310.94/291.56 iflow(false, N, cons(M, L)) -> low(N, L) 310.94/291.56 high(N, nil) -> nil 310.94/291.56 high(N, cons(M, L)) -> ifhigh(le(M, N), N, cons(M, L)) 310.94/291.56 ifhigh(true, N, cons(M, L)) -> high(N, L) 310.94/291.56 ifhigh(false, N, cons(M, L)) -> cons(M, high(N, L)) 310.94/291.56 quicksort(nil) -> nil 310.94/291.56 quicksort(cons(N, L)) -> app(quicksort(low(N, L)), cons(N, quicksort(high(N, L)))) 310.94/291.56 310.94/291.56 Types: 310.94/291.56 le :: 0':s -> 0':s -> true:false 310.94/291.56 0' :: 0':s 310.94/291.56 true :: true:false 310.94/291.56 s :: 0':s -> 0':s 310.94/291.56 false :: true:false 310.94/291.56 app :: nil:cons -> nil:cons -> nil:cons 310.94/291.56 nil :: nil:cons 310.94/291.56 cons :: 0':s -> nil:cons -> nil:cons 310.94/291.56 low :: 0':s -> nil:cons -> nil:cons 310.94/291.56 iflow :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 high :: 0':s -> nil:cons -> nil:cons 310.94/291.56 ifhigh :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 quicksort :: nil:cons -> nil:cons 310.94/291.56 hole_true:false1_0 :: true:false 310.94/291.56 hole_0':s2_0 :: 0':s 310.94/291.56 hole_nil:cons3_0 :: nil:cons 310.94/291.56 gen_0':s4_0 :: Nat -> 0':s 310.94/291.56 gen_nil:cons5_0 :: Nat -> nil:cons 310.94/291.56 310.94/291.56 310.94/291.56 Lemmas: 310.94/291.56 le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) -> true, rt in Omega(1 + n7_0) 310.94/291.56 app(gen_nil:cons5_0(n288_0), gen_nil:cons5_0(b)) -> gen_nil:cons5_0(+(n288_0, b)), rt in Omega(1 + n288_0) 310.94/291.56 low(gen_0':s4_0(0), gen_nil:cons5_0(n1123_0)) -> gen_nil:cons5_0(n1123_0), rt in Omega(1 + n1123_0) 310.94/291.56 310.94/291.56 310.94/291.56 Generator Equations: 310.94/291.56 gen_0':s4_0(0) <=> 0' 310.94/291.56 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 310.94/291.56 gen_nil:cons5_0(0) <=> nil 310.94/291.56 gen_nil:cons5_0(+(x, 1)) <=> cons(0', gen_nil:cons5_0(x)) 310.94/291.56 310.94/291.56 310.94/291.56 The following defined symbols remain to be analysed: 310.94/291.56 high, quicksort 310.94/291.56 310.94/291.56 They will be analysed ascendingly in the following order: 310.94/291.56 high < quicksort 310.94/291.56 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (17) RewriteLemmaProof (LOWER BOUND(ID)) 310.94/291.56 Proved the following rewrite lemma: 310.94/291.56 high(gen_0':s4_0(0), gen_nil:cons5_0(n1630_0)) -> gen_nil:cons5_0(0), rt in Omega(1 + n1630_0) 310.94/291.56 310.94/291.56 Induction Base: 310.94/291.56 high(gen_0':s4_0(0), gen_nil:cons5_0(0)) ->_R^Omega(1) 310.94/291.56 nil 310.94/291.56 310.94/291.56 Induction Step: 310.94/291.56 high(gen_0':s4_0(0), gen_nil:cons5_0(+(n1630_0, 1))) ->_R^Omega(1) 310.94/291.56 ifhigh(le(0', gen_0':s4_0(0)), gen_0':s4_0(0), cons(0', gen_nil:cons5_0(n1630_0))) ->_L^Omega(1) 310.94/291.56 ifhigh(true, gen_0':s4_0(0), cons(0', gen_nil:cons5_0(n1630_0))) ->_R^Omega(1) 310.94/291.56 high(gen_0':s4_0(0), gen_nil:cons5_0(n1630_0)) ->_IH 310.94/291.56 gen_nil:cons5_0(0) 310.94/291.56 310.94/291.56 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (18) 310.94/291.56 Obligation: 310.94/291.56 TRS: 310.94/291.56 Rules: 310.94/291.56 le(0', Y) -> true 310.94/291.56 le(s(X), 0') -> false 310.94/291.56 le(s(X), s(Y)) -> le(X, Y) 310.94/291.56 app(nil, Y) -> Y 310.94/291.56 app(cons(N, L), Y) -> cons(N, app(L, Y)) 310.94/291.56 low(N, nil) -> nil 310.94/291.56 low(N, cons(M, L)) -> iflow(le(M, N), N, cons(M, L)) 310.94/291.56 iflow(true, N, cons(M, L)) -> cons(M, low(N, L)) 310.94/291.56 iflow(false, N, cons(M, L)) -> low(N, L) 310.94/291.56 high(N, nil) -> nil 310.94/291.56 high(N, cons(M, L)) -> ifhigh(le(M, N), N, cons(M, L)) 310.94/291.56 ifhigh(true, N, cons(M, L)) -> high(N, L) 310.94/291.56 ifhigh(false, N, cons(M, L)) -> cons(M, high(N, L)) 310.94/291.56 quicksort(nil) -> nil 310.94/291.56 quicksort(cons(N, L)) -> app(quicksort(low(N, L)), cons(N, quicksort(high(N, L)))) 310.94/291.56 310.94/291.56 Types: 310.94/291.56 le :: 0':s -> 0':s -> true:false 310.94/291.56 0' :: 0':s 310.94/291.56 true :: true:false 310.94/291.56 s :: 0':s -> 0':s 310.94/291.56 false :: true:false 310.94/291.56 app :: nil:cons -> nil:cons -> nil:cons 310.94/291.56 nil :: nil:cons 310.94/291.56 cons :: 0':s -> nil:cons -> nil:cons 310.94/291.56 low :: 0':s -> nil:cons -> nil:cons 310.94/291.56 iflow :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 high :: 0':s -> nil:cons -> nil:cons 310.94/291.56 ifhigh :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 quicksort :: nil:cons -> nil:cons 310.94/291.56 hole_true:false1_0 :: true:false 310.94/291.56 hole_0':s2_0 :: 0':s 310.94/291.56 hole_nil:cons3_0 :: nil:cons 310.94/291.56 gen_0':s4_0 :: Nat -> 0':s 310.94/291.56 gen_nil:cons5_0 :: Nat -> nil:cons 310.94/291.56 310.94/291.56 310.94/291.56 Lemmas: 310.94/291.56 le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) -> true, rt in Omega(1 + n7_0) 310.94/291.56 app(gen_nil:cons5_0(n288_0), gen_nil:cons5_0(b)) -> gen_nil:cons5_0(+(n288_0, b)), rt in Omega(1 + n288_0) 310.94/291.56 low(gen_0':s4_0(0), gen_nil:cons5_0(n1123_0)) -> gen_nil:cons5_0(n1123_0), rt in Omega(1 + n1123_0) 310.94/291.56 high(gen_0':s4_0(0), gen_nil:cons5_0(n1630_0)) -> gen_nil:cons5_0(0), rt in Omega(1 + n1630_0) 310.94/291.56 310.94/291.56 310.94/291.56 Generator Equations: 310.94/291.56 gen_0':s4_0(0) <=> 0' 310.94/291.56 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 310.94/291.56 gen_nil:cons5_0(0) <=> nil 310.94/291.56 gen_nil:cons5_0(+(x, 1)) <=> cons(0', gen_nil:cons5_0(x)) 310.94/291.56 310.94/291.56 310.94/291.56 The following defined symbols remain to be analysed: 310.94/291.56 quicksort 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (19) RewriteLemmaProof (LOWER BOUND(ID)) 310.94/291.56 Proved the following rewrite lemma: 310.94/291.56 quicksort(gen_nil:cons5_0(n2133_0)) -> gen_nil:cons5_0(n2133_0), rt in Omega(1 + n2133_0 + n2133_0^2) 310.94/291.56 310.94/291.56 Induction Base: 310.94/291.56 quicksort(gen_nil:cons5_0(0)) ->_R^Omega(1) 310.94/291.56 nil 310.94/291.56 310.94/291.56 Induction Step: 310.94/291.56 quicksort(gen_nil:cons5_0(+(n2133_0, 1))) ->_R^Omega(1) 310.94/291.56 app(quicksort(low(0', gen_nil:cons5_0(n2133_0))), cons(0', quicksort(high(0', gen_nil:cons5_0(n2133_0))))) ->_L^Omega(1 + n2133_0) 310.94/291.56 app(quicksort(gen_nil:cons5_0(n2133_0)), cons(0', quicksort(high(0', gen_nil:cons5_0(n2133_0))))) ->_IH 310.94/291.56 app(gen_nil:cons5_0(c2134_0), cons(0', quicksort(high(0', gen_nil:cons5_0(n2133_0))))) ->_L^Omega(1 + n2133_0) 310.94/291.56 app(gen_nil:cons5_0(n2133_0), cons(0', quicksort(gen_nil:cons5_0(0)))) ->_R^Omega(1) 310.94/291.56 app(gen_nil:cons5_0(n2133_0), cons(0', nil)) ->_L^Omega(1 + n2133_0) 310.94/291.56 gen_nil:cons5_0(+(n2133_0, +(0, 1))) 310.94/291.56 310.94/291.56 We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (20) 310.94/291.56 Obligation: 310.94/291.56 Proved the lower bound n^2 for the following obligation: 310.94/291.56 310.94/291.56 TRS: 310.94/291.56 Rules: 310.94/291.56 le(0', Y) -> true 310.94/291.56 le(s(X), 0') -> false 310.94/291.56 le(s(X), s(Y)) -> le(X, Y) 310.94/291.56 app(nil, Y) -> Y 310.94/291.56 app(cons(N, L), Y) -> cons(N, app(L, Y)) 310.94/291.56 low(N, nil) -> nil 310.94/291.56 low(N, cons(M, L)) -> iflow(le(M, N), N, cons(M, L)) 310.94/291.56 iflow(true, N, cons(M, L)) -> cons(M, low(N, L)) 310.94/291.56 iflow(false, N, cons(M, L)) -> low(N, L) 310.94/291.56 high(N, nil) -> nil 310.94/291.56 high(N, cons(M, L)) -> ifhigh(le(M, N), N, cons(M, L)) 310.94/291.56 ifhigh(true, N, cons(M, L)) -> high(N, L) 310.94/291.56 ifhigh(false, N, cons(M, L)) -> cons(M, high(N, L)) 310.94/291.56 quicksort(nil) -> nil 310.94/291.56 quicksort(cons(N, L)) -> app(quicksort(low(N, L)), cons(N, quicksort(high(N, L)))) 310.94/291.56 310.94/291.56 Types: 310.94/291.56 le :: 0':s -> 0':s -> true:false 310.94/291.56 0' :: 0':s 310.94/291.56 true :: true:false 310.94/291.56 s :: 0':s -> 0':s 310.94/291.56 false :: true:false 310.94/291.56 app :: nil:cons -> nil:cons -> nil:cons 310.94/291.56 nil :: nil:cons 310.94/291.56 cons :: 0':s -> nil:cons -> nil:cons 310.94/291.56 low :: 0':s -> nil:cons -> nil:cons 310.94/291.56 iflow :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 high :: 0':s -> nil:cons -> nil:cons 310.94/291.56 ifhigh :: true:false -> 0':s -> nil:cons -> nil:cons 310.94/291.56 quicksort :: nil:cons -> nil:cons 310.94/291.56 hole_true:false1_0 :: true:false 310.94/291.56 hole_0':s2_0 :: 0':s 310.94/291.56 hole_nil:cons3_0 :: nil:cons 310.94/291.56 gen_0':s4_0 :: Nat -> 0':s 310.94/291.56 gen_nil:cons5_0 :: Nat -> nil:cons 310.94/291.56 310.94/291.56 310.94/291.56 Lemmas: 310.94/291.56 le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) -> true, rt in Omega(1 + n7_0) 310.94/291.56 app(gen_nil:cons5_0(n288_0), gen_nil:cons5_0(b)) -> gen_nil:cons5_0(+(n288_0, b)), rt in Omega(1 + n288_0) 310.94/291.56 low(gen_0':s4_0(0), gen_nil:cons5_0(n1123_0)) -> gen_nil:cons5_0(n1123_0), rt in Omega(1 + n1123_0) 310.94/291.56 high(gen_0':s4_0(0), gen_nil:cons5_0(n1630_0)) -> gen_nil:cons5_0(0), rt in Omega(1 + n1630_0) 310.94/291.56 310.94/291.56 310.94/291.56 Generator Equations: 310.94/291.56 gen_0':s4_0(0) <=> 0' 310.94/291.56 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 310.94/291.56 gen_nil:cons5_0(0) <=> nil 310.94/291.56 gen_nil:cons5_0(+(x, 1)) <=> cons(0', gen_nil:cons5_0(x)) 310.94/291.56 310.94/291.56 310.94/291.56 The following defined symbols remain to be analysed: 310.94/291.56 quicksort 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (21) LowerBoundPropagationProof (FINISHED) 310.94/291.56 Propagated lower bound. 310.94/291.56 ---------------------------------------- 310.94/291.56 310.94/291.56 (22) 310.94/291.56 BOUNDS(n^2, INF) 311.05/291.59 EOF