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