1116.46/291.55 WORST_CASE(Omega(n^1), ?) 1129.25/294.78 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 1129.25/294.78 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 1129.25/294.78 1129.25/294.78 1129.25/294.78 The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). 1129.25/294.78 1129.25/294.78 (0) CpxRelTRS 1129.25/294.78 (1) STerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 235 ms] 1129.25/294.78 (2) CpxRelTRS 1129.25/294.78 (3) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 1129.25/294.78 (4) CpxRelTRS 1129.25/294.78 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1129.25/294.78 (6) typed CpxTrs 1129.25/294.78 (7) OrderProof [LOWER BOUND(ID), 0 ms] 1129.25/294.78 (8) typed CpxTrs 1129.25/294.78 (9) RewriteLemmaProof [LOWER BOUND(ID), 290 ms] 1129.25/294.78 (10) typed CpxTrs 1129.25/294.78 (11) RewriteLemmaProof [LOWER BOUND(ID), 48 ms] 1129.25/294.78 (12) BEST 1129.25/294.78 (13) proven lower bound 1129.25/294.78 (14) LowerBoundPropagationProof [FINISHED, 0 ms] 1129.25/294.78 (15) BOUNDS(n^1, INF) 1129.25/294.78 (16) typed CpxTrs 1129.25/294.78 (17) RewriteLemmaProof [LOWER BOUND(ID), 48 ms] 1129.25/294.78 (18) typed CpxTrs 1129.25/294.78 (19) RewriteLemmaProof [LOWER BOUND(ID), 0 ms] 1129.25/294.78 (20) typed CpxTrs 1129.25/294.78 (21) RewriteLemmaProof [LOWER BOUND(ID), 2 ms] 1129.25/294.78 (22) typed CpxTrs 1129.25/294.78 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (0) 1129.25/294.78 Obligation: 1129.25/294.78 The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). 1129.25/294.78 1129.25/294.78 1129.25/294.78 The TRS R consists of the following rules: 1129.25/294.78 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 1129.25/294.78 The (relative) TRS S consists of the following rules: 1129.25/294.78 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0, S(y)) -> True 1129.25/294.78 <(x, 0) -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0, y) -> False 1129.25/294.78 >(S(x), 0) -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Rewrite Strategy: INNERMOST 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (1) STerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) 1129.25/294.78 proved termination of relative rules 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (2) 1129.25/294.78 Obligation: 1129.25/294.78 The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). 1129.25/294.78 1129.25/294.78 1129.25/294.78 The TRS R consists of the following rules: 1129.25/294.78 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 1129.25/294.78 The (relative) TRS S consists of the following rules: 1129.25/294.78 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0, S(y)) -> True 1129.25/294.78 <(x, 0) -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0, y) -> False 1129.25/294.78 >(S(x), 0) -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Rewrite Strategy: INNERMOST 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (3) RenamingProof (BOTH BOUNDS(ID, ID)) 1129.25/294.78 Renamed function symbols to avoid clashes with predefined symbol. 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (4) 1129.25/294.78 Obligation: 1129.25/294.78 The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). 1129.25/294.78 1129.25/294.78 1129.25/294.78 The TRS R consists of the following rules: 1129.25/294.78 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 1129.25/294.78 The (relative) TRS S consists of the following rules: 1129.25/294.78 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0', S(y)) -> True 1129.25/294.78 <(x, 0') -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0', y) -> False 1129.25/294.78 >(S(x), 0') -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Rewrite Strategy: INNERMOST 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1129.25/294.78 Infered types. 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (6) 1129.25/294.78 Obligation: 1129.25/294.78 Innermost TRS: 1129.25/294.78 Rules: 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0', S(y)) -> True 1129.25/294.78 <(x, 0') -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0', y) -> False 1129.25/294.78 >(S(x), 0') -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Types: 1129.25/294.78 quicksort :: Cons:Nil -> Cons:Nil 1129.25/294.78 Cons :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 part :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 Nil :: Cons:Nil 1129.25/294.78 partLt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partLt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 < :: S:0' -> S:0' -> True:False 1129.25/294.78 partGt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partGt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 > :: S:0' -> S:0' -> True:False 1129.25/294.78 app :: Cons:Nil -> Cons:Nil -> Cons:Nil 1129.25/294.78 notEmpty :: Cons:Nil -> True:False 1129.25/294.78 True :: True:False 1129.25/294.78 False :: True:False 1129.25/294.78 goal :: Cons:Nil -> Cons:Nil 1129.25/294.78 S :: S:0' -> S:0' 1129.25/294.78 0' :: S:0' 1129.25/294.78 hole_Cons:Nil1_0 :: Cons:Nil 1129.25/294.78 hole_S:0'2_0 :: S:0' 1129.25/294.78 hole_True:False3_0 :: True:False 1129.25/294.78 gen_Cons:Nil4_0 :: Nat -> Cons:Nil 1129.25/294.78 gen_S:0'5_0 :: Nat -> S:0' 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (7) OrderProof (LOWER BOUND(ID)) 1129.25/294.78 Heuristically decided to analyse the following defined symbols: 1129.25/294.78 quicksort, partLt, <, partGt, >, app 1129.25/294.78 1129.25/294.78 They will be analysed ascendingly in the following order: 1129.25/294.78 partLt < quicksort 1129.25/294.78 partGt < quicksort 1129.25/294.78 app < quicksort 1129.25/294.78 < < partLt 1129.25/294.78 > < partGt 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (8) 1129.25/294.78 Obligation: 1129.25/294.78 Innermost TRS: 1129.25/294.78 Rules: 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0', S(y)) -> True 1129.25/294.78 <(x, 0') -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0', y) -> False 1129.25/294.78 >(S(x), 0') -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Types: 1129.25/294.78 quicksort :: Cons:Nil -> Cons:Nil 1129.25/294.78 Cons :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 part :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 Nil :: Cons:Nil 1129.25/294.78 partLt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partLt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 < :: S:0' -> S:0' -> True:False 1129.25/294.78 partGt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partGt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 > :: S:0' -> S:0' -> True:False 1129.25/294.78 app :: Cons:Nil -> Cons:Nil -> Cons:Nil 1129.25/294.78 notEmpty :: Cons:Nil -> True:False 1129.25/294.78 True :: True:False 1129.25/294.78 False :: True:False 1129.25/294.78 goal :: Cons:Nil -> Cons:Nil 1129.25/294.78 S :: S:0' -> S:0' 1129.25/294.78 0' :: S:0' 1129.25/294.78 hole_Cons:Nil1_0 :: Cons:Nil 1129.25/294.78 hole_S:0'2_0 :: S:0' 1129.25/294.78 hole_True:False3_0 :: True:False 1129.25/294.78 gen_Cons:Nil4_0 :: Nat -> Cons:Nil 1129.25/294.78 gen_S:0'5_0 :: Nat -> S:0' 1129.25/294.78 1129.25/294.78 1129.25/294.78 Generator Equations: 1129.25/294.78 gen_Cons:Nil4_0(0) <=> Nil 1129.25/294.78 gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) 1129.25/294.78 gen_S:0'5_0(0) <=> 0' 1129.25/294.78 gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) 1129.25/294.78 1129.25/294.78 1129.25/294.78 The following defined symbols remain to be analysed: 1129.25/294.78 <, quicksort, partLt, partGt, >, app 1129.25/294.78 1129.25/294.78 They will be analysed ascendingly in the following order: 1129.25/294.78 partLt < quicksort 1129.25/294.78 partGt < quicksort 1129.25/294.78 app < quicksort 1129.25/294.78 < < partLt 1129.25/294.78 > < partGt 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (9) RewriteLemmaProof (LOWER BOUND(ID)) 1129.25/294.78 Proved the following rewrite lemma: 1129.25/294.78 <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) 1129.25/294.78 1129.25/294.78 Induction Base: 1129.25/294.78 <(gen_S:0'5_0(0), gen_S:0'5_0(+(1, 0))) ->_R^Omega(0) 1129.25/294.78 True 1129.25/294.78 1129.25/294.78 Induction Step: 1129.25/294.78 <(gen_S:0'5_0(+(n7_0, 1)), gen_S:0'5_0(+(1, +(n7_0, 1)))) ->_R^Omega(0) 1129.25/294.78 <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) ->_IH 1129.25/294.78 True 1129.25/294.78 1129.25/294.78 We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (10) 1129.25/294.78 Obligation: 1129.25/294.78 Innermost TRS: 1129.25/294.78 Rules: 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0', S(y)) -> True 1129.25/294.78 <(x, 0') -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0', y) -> False 1129.25/294.78 >(S(x), 0') -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Types: 1129.25/294.78 quicksort :: Cons:Nil -> Cons:Nil 1129.25/294.78 Cons :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 part :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 Nil :: Cons:Nil 1129.25/294.78 partLt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partLt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 < :: S:0' -> S:0' -> True:False 1129.25/294.78 partGt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partGt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 > :: S:0' -> S:0' -> True:False 1129.25/294.78 app :: Cons:Nil -> Cons:Nil -> Cons:Nil 1129.25/294.78 notEmpty :: Cons:Nil -> True:False 1129.25/294.78 True :: True:False 1129.25/294.78 False :: True:False 1129.25/294.78 goal :: Cons:Nil -> Cons:Nil 1129.25/294.78 S :: S:0' -> S:0' 1129.25/294.78 0' :: S:0' 1129.25/294.78 hole_Cons:Nil1_0 :: Cons:Nil 1129.25/294.78 hole_S:0'2_0 :: S:0' 1129.25/294.78 hole_True:False3_0 :: True:False 1129.25/294.78 gen_Cons:Nil4_0 :: Nat -> Cons:Nil 1129.25/294.78 gen_S:0'5_0 :: Nat -> S:0' 1129.25/294.78 1129.25/294.78 1129.25/294.78 Lemmas: 1129.25/294.78 <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) 1129.25/294.78 1129.25/294.78 1129.25/294.78 Generator Equations: 1129.25/294.78 gen_Cons:Nil4_0(0) <=> Nil 1129.25/294.78 gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) 1129.25/294.78 gen_S:0'5_0(0) <=> 0' 1129.25/294.78 gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) 1129.25/294.78 1129.25/294.78 1129.25/294.78 The following defined symbols remain to be analysed: 1129.25/294.78 partLt, quicksort, partGt, >, app 1129.25/294.78 1129.25/294.78 They will be analysed ascendingly in the following order: 1129.25/294.78 partLt < quicksort 1129.25/294.78 partGt < quicksort 1129.25/294.78 app < quicksort 1129.25/294.78 > < partGt 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (11) RewriteLemmaProof (LOWER BOUND(ID)) 1129.25/294.78 Proved the following rewrite lemma: 1129.25/294.78 partLt(gen_S:0'5_0(1), gen_Cons:Nil4_0(n299_0)) -> gen_Cons:Nil4_0(n299_0), rt in Omega(1 + n299_0) 1129.25/294.78 1129.25/294.78 Induction Base: 1129.25/294.78 partLt(gen_S:0'5_0(1), gen_Cons:Nil4_0(0)) ->_R^Omega(1) 1129.25/294.78 Nil 1129.25/294.78 1129.25/294.78 Induction Step: 1129.25/294.78 partLt(gen_S:0'5_0(1), gen_Cons:Nil4_0(+(n299_0, 1))) ->_R^Omega(1) 1129.25/294.78 partLt[Ite][True][Ite](<(0', gen_S:0'5_0(1)), gen_S:0'5_0(1), Cons(0', gen_Cons:Nil4_0(n299_0))) ->_L^Omega(0) 1129.25/294.78 partLt[Ite][True][Ite](True, gen_S:0'5_0(1), Cons(0', gen_Cons:Nil4_0(n299_0))) ->_R^Omega(0) 1129.25/294.78 Cons(0', partLt(gen_S:0'5_0(1), gen_Cons:Nil4_0(n299_0))) ->_IH 1129.25/294.78 Cons(0', gen_Cons:Nil4_0(c300_0)) 1129.25/294.78 1129.25/294.78 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (12) 1129.25/294.78 Complex Obligation (BEST) 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (13) 1129.25/294.78 Obligation: 1129.25/294.78 Proved the lower bound n^1 for the following obligation: 1129.25/294.78 1129.25/294.78 Innermost TRS: 1129.25/294.78 Rules: 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0', S(y)) -> True 1129.25/294.78 <(x, 0') -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0', y) -> False 1129.25/294.78 >(S(x), 0') -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Types: 1129.25/294.78 quicksort :: Cons:Nil -> Cons:Nil 1129.25/294.78 Cons :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 part :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 Nil :: Cons:Nil 1129.25/294.78 partLt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partLt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 < :: S:0' -> S:0' -> True:False 1129.25/294.78 partGt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partGt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 > :: S:0' -> S:0' -> True:False 1129.25/294.78 app :: Cons:Nil -> Cons:Nil -> Cons:Nil 1129.25/294.78 notEmpty :: Cons:Nil -> True:False 1129.25/294.78 True :: True:False 1129.25/294.78 False :: True:False 1129.25/294.78 goal :: Cons:Nil -> Cons:Nil 1129.25/294.78 S :: S:0' -> S:0' 1129.25/294.78 0' :: S:0' 1129.25/294.78 hole_Cons:Nil1_0 :: Cons:Nil 1129.25/294.78 hole_S:0'2_0 :: S:0' 1129.25/294.78 hole_True:False3_0 :: True:False 1129.25/294.78 gen_Cons:Nil4_0 :: Nat -> Cons:Nil 1129.25/294.78 gen_S:0'5_0 :: Nat -> S:0' 1129.25/294.78 1129.25/294.78 1129.25/294.78 Lemmas: 1129.25/294.78 <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) 1129.25/294.78 1129.25/294.78 1129.25/294.78 Generator Equations: 1129.25/294.78 gen_Cons:Nil4_0(0) <=> Nil 1129.25/294.78 gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) 1129.25/294.78 gen_S:0'5_0(0) <=> 0' 1129.25/294.78 gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) 1129.25/294.78 1129.25/294.78 1129.25/294.78 The following defined symbols remain to be analysed: 1129.25/294.78 partLt, quicksort, partGt, >, app 1129.25/294.78 1129.25/294.78 They will be analysed ascendingly in the following order: 1129.25/294.78 partLt < quicksort 1129.25/294.78 partGt < quicksort 1129.25/294.78 app < quicksort 1129.25/294.78 > < partGt 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (14) LowerBoundPropagationProof (FINISHED) 1129.25/294.78 Propagated lower bound. 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (15) 1129.25/294.78 BOUNDS(n^1, INF) 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (16) 1129.25/294.78 Obligation: 1129.25/294.78 Innermost TRS: 1129.25/294.78 Rules: 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0', S(y)) -> True 1129.25/294.78 <(x, 0') -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0', y) -> False 1129.25/294.78 >(S(x), 0') -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Types: 1129.25/294.78 quicksort :: Cons:Nil -> Cons:Nil 1129.25/294.78 Cons :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 part :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 Nil :: Cons:Nil 1129.25/294.78 partLt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partLt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 < :: S:0' -> S:0' -> True:False 1129.25/294.78 partGt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partGt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 > :: S:0' -> S:0' -> True:False 1129.25/294.78 app :: Cons:Nil -> Cons:Nil -> Cons:Nil 1129.25/294.78 notEmpty :: Cons:Nil -> True:False 1129.25/294.78 True :: True:False 1129.25/294.78 False :: True:False 1129.25/294.78 goal :: Cons:Nil -> Cons:Nil 1129.25/294.78 S :: S:0' -> S:0' 1129.25/294.78 0' :: S:0' 1129.25/294.78 hole_Cons:Nil1_0 :: Cons:Nil 1129.25/294.78 hole_S:0'2_0 :: S:0' 1129.25/294.78 hole_True:False3_0 :: True:False 1129.25/294.78 gen_Cons:Nil4_0 :: Nat -> Cons:Nil 1129.25/294.78 gen_S:0'5_0 :: Nat -> S:0' 1129.25/294.78 1129.25/294.78 1129.25/294.78 Lemmas: 1129.25/294.78 <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) 1129.25/294.78 partLt(gen_S:0'5_0(1), gen_Cons:Nil4_0(n299_0)) -> gen_Cons:Nil4_0(n299_0), rt in Omega(1 + n299_0) 1129.25/294.78 1129.25/294.78 1129.25/294.78 Generator Equations: 1129.25/294.78 gen_Cons:Nil4_0(0) <=> Nil 1129.25/294.78 gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) 1129.25/294.78 gen_S:0'5_0(0) <=> 0' 1129.25/294.78 gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) 1129.25/294.78 1129.25/294.78 1129.25/294.78 The following defined symbols remain to be analysed: 1129.25/294.78 >, quicksort, partGt, app 1129.25/294.78 1129.25/294.78 They will be analysed ascendingly in the following order: 1129.25/294.78 partGt < quicksort 1129.25/294.78 app < quicksort 1129.25/294.78 > < partGt 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (17) RewriteLemmaProof (LOWER BOUND(ID)) 1129.25/294.78 Proved the following rewrite lemma: 1129.25/294.78 >(gen_S:0'5_0(n1026_0), gen_S:0'5_0(n1026_0)) -> False, rt in Omega(0) 1129.25/294.78 1129.25/294.78 Induction Base: 1129.25/294.78 >(gen_S:0'5_0(0), gen_S:0'5_0(0)) ->_R^Omega(0) 1129.25/294.78 False 1129.25/294.78 1129.25/294.78 Induction Step: 1129.25/294.78 >(gen_S:0'5_0(+(n1026_0, 1)), gen_S:0'5_0(+(n1026_0, 1))) ->_R^Omega(0) 1129.25/294.78 >(gen_S:0'5_0(n1026_0), gen_S:0'5_0(n1026_0)) ->_IH 1129.25/294.78 False 1129.25/294.78 1129.25/294.78 We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (18) 1129.25/294.78 Obligation: 1129.25/294.78 Innermost TRS: 1129.25/294.78 Rules: 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0', S(y)) -> True 1129.25/294.78 <(x, 0') -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0', y) -> False 1129.25/294.78 >(S(x), 0') -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Types: 1129.25/294.78 quicksort :: Cons:Nil -> Cons:Nil 1129.25/294.78 Cons :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 part :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 Nil :: Cons:Nil 1129.25/294.78 partLt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partLt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 < :: S:0' -> S:0' -> True:False 1129.25/294.78 partGt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partGt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 > :: S:0' -> S:0' -> True:False 1129.25/294.78 app :: Cons:Nil -> Cons:Nil -> Cons:Nil 1129.25/294.78 notEmpty :: Cons:Nil -> True:False 1129.25/294.78 True :: True:False 1129.25/294.78 False :: True:False 1129.25/294.78 goal :: Cons:Nil -> Cons:Nil 1129.25/294.78 S :: S:0' -> S:0' 1129.25/294.78 0' :: S:0' 1129.25/294.78 hole_Cons:Nil1_0 :: Cons:Nil 1129.25/294.78 hole_S:0'2_0 :: S:0' 1129.25/294.78 hole_True:False3_0 :: True:False 1129.25/294.78 gen_Cons:Nil4_0 :: Nat -> Cons:Nil 1129.25/294.78 gen_S:0'5_0 :: Nat -> S:0' 1129.25/294.78 1129.25/294.78 1129.25/294.78 Lemmas: 1129.25/294.78 <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) 1129.25/294.78 partLt(gen_S:0'5_0(1), gen_Cons:Nil4_0(n299_0)) -> gen_Cons:Nil4_0(n299_0), rt in Omega(1 + n299_0) 1129.25/294.78 >(gen_S:0'5_0(n1026_0), gen_S:0'5_0(n1026_0)) -> False, rt in Omega(0) 1129.25/294.78 1129.25/294.78 1129.25/294.78 Generator Equations: 1129.25/294.78 gen_Cons:Nil4_0(0) <=> Nil 1129.25/294.78 gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) 1129.25/294.78 gen_S:0'5_0(0) <=> 0' 1129.25/294.78 gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) 1129.25/294.78 1129.25/294.78 1129.25/294.78 The following defined symbols remain to be analysed: 1129.25/294.78 partGt, quicksort, app 1129.25/294.78 1129.25/294.78 They will be analysed ascendingly in the following order: 1129.25/294.78 partGt < quicksort 1129.25/294.78 app < quicksort 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (19) RewriteLemmaProof (LOWER BOUND(ID)) 1129.25/294.78 Proved the following rewrite lemma: 1129.25/294.78 partGt(gen_S:0'5_0(0), gen_Cons:Nil4_0(n1331_0)) -> gen_Cons:Nil4_0(0), rt in Omega(1 + n1331_0) 1129.25/294.78 1129.25/294.78 Induction Base: 1129.25/294.78 partGt(gen_S:0'5_0(0), gen_Cons:Nil4_0(0)) ->_R^Omega(1) 1129.25/294.78 Nil 1129.25/294.78 1129.25/294.78 Induction Step: 1129.25/294.78 partGt(gen_S:0'5_0(0), gen_Cons:Nil4_0(+(n1331_0, 1))) ->_R^Omega(1) 1129.25/294.78 partGt[Ite][True][Ite](>(0', gen_S:0'5_0(0)), gen_S:0'5_0(0), Cons(0', gen_Cons:Nil4_0(n1331_0))) ->_L^Omega(0) 1129.25/294.78 partGt[Ite][True][Ite](False, gen_S:0'5_0(0), Cons(0', gen_Cons:Nil4_0(n1331_0))) ->_R^Omega(0) 1129.25/294.78 partGt(gen_S:0'5_0(0), gen_Cons:Nil4_0(n1331_0)) ->_IH 1129.25/294.78 gen_Cons:Nil4_0(0) 1129.25/294.78 1129.25/294.78 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (20) 1129.25/294.78 Obligation: 1129.25/294.78 Innermost TRS: 1129.25/294.78 Rules: 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0', S(y)) -> True 1129.25/294.78 <(x, 0') -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0', y) -> False 1129.25/294.78 >(S(x), 0') -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Types: 1129.25/294.78 quicksort :: Cons:Nil -> Cons:Nil 1129.25/294.78 Cons :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 part :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 Nil :: Cons:Nil 1129.25/294.78 partLt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partLt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 < :: S:0' -> S:0' -> True:False 1129.25/294.78 partGt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partGt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 > :: S:0' -> S:0' -> True:False 1129.25/294.78 app :: Cons:Nil -> Cons:Nil -> Cons:Nil 1129.25/294.78 notEmpty :: Cons:Nil -> True:False 1129.25/294.78 True :: True:False 1129.25/294.78 False :: True:False 1129.25/294.78 goal :: Cons:Nil -> Cons:Nil 1129.25/294.78 S :: S:0' -> S:0' 1129.25/294.78 0' :: S:0' 1129.25/294.78 hole_Cons:Nil1_0 :: Cons:Nil 1129.25/294.78 hole_S:0'2_0 :: S:0' 1129.25/294.78 hole_True:False3_0 :: True:False 1129.25/294.78 gen_Cons:Nil4_0 :: Nat -> Cons:Nil 1129.25/294.78 gen_S:0'5_0 :: Nat -> S:0' 1129.25/294.78 1129.25/294.78 1129.25/294.78 Lemmas: 1129.25/294.78 <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) 1129.25/294.78 partLt(gen_S:0'5_0(1), gen_Cons:Nil4_0(n299_0)) -> gen_Cons:Nil4_0(n299_0), rt in Omega(1 + n299_0) 1129.25/294.78 >(gen_S:0'5_0(n1026_0), gen_S:0'5_0(n1026_0)) -> False, rt in Omega(0) 1129.25/294.78 partGt(gen_S:0'5_0(0), gen_Cons:Nil4_0(n1331_0)) -> gen_Cons:Nil4_0(0), rt in Omega(1 + n1331_0) 1129.25/294.78 1129.25/294.78 1129.25/294.78 Generator Equations: 1129.25/294.78 gen_Cons:Nil4_0(0) <=> Nil 1129.25/294.78 gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) 1129.25/294.78 gen_S:0'5_0(0) <=> 0' 1129.25/294.78 gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) 1129.25/294.78 1129.25/294.78 1129.25/294.78 The following defined symbols remain to be analysed: 1129.25/294.78 app, quicksort 1129.25/294.78 1129.25/294.78 They will be analysed ascendingly in the following order: 1129.25/294.78 app < quicksort 1129.25/294.78 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (21) RewriteLemmaProof (LOWER BOUND(ID)) 1129.25/294.78 Proved the following rewrite lemma: 1129.25/294.78 app(gen_Cons:Nil4_0(n2095_0), gen_Cons:Nil4_0(b)) -> gen_Cons:Nil4_0(+(n2095_0, b)), rt in Omega(1 + n2095_0) 1129.25/294.78 1129.25/294.78 Induction Base: 1129.25/294.78 app(gen_Cons:Nil4_0(0), gen_Cons:Nil4_0(b)) ->_R^Omega(1) 1129.25/294.78 gen_Cons:Nil4_0(b) 1129.25/294.78 1129.25/294.78 Induction Step: 1129.25/294.78 app(gen_Cons:Nil4_0(+(n2095_0, 1)), gen_Cons:Nil4_0(b)) ->_R^Omega(1) 1129.25/294.78 Cons(0', app(gen_Cons:Nil4_0(n2095_0), gen_Cons:Nil4_0(b))) ->_IH 1129.25/294.78 Cons(0', gen_Cons:Nil4_0(+(b, c2096_0))) 1129.25/294.78 1129.25/294.78 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1129.25/294.78 ---------------------------------------- 1129.25/294.78 1129.25/294.78 (22) 1129.25/294.78 Obligation: 1129.25/294.78 Innermost TRS: 1129.25/294.78 Rules: 1129.25/294.78 quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x', xs)) 1129.25/294.78 quicksort(Cons(x, Nil)) -> Cons(x, Nil) 1129.25/294.78 quicksort(Nil) -> Nil 1129.25/294.78 partLt(x', Cons(x, xs)) -> partLt[Ite][True][Ite](<(x, x'), x', Cons(x, xs)) 1129.25/294.78 partLt(x, Nil) -> Nil 1129.25/294.78 partGt(x', Cons(x, xs)) -> partGt[Ite][True][Ite](>(x, x'), x', Cons(x, xs)) 1129.25/294.78 partGt(x, Nil) -> Nil 1129.25/294.78 app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) 1129.25/294.78 app(Nil, ys) -> ys 1129.25/294.78 notEmpty(Cons(x, xs)) -> True 1129.25/294.78 notEmpty(Nil) -> False 1129.25/294.78 part(x, xs) -> app(quicksort(partLt(x, xs)), Cons(x, quicksort(partGt(x, xs)))) 1129.25/294.78 goal(xs) -> quicksort(xs) 1129.25/294.78 <(S(x), S(y)) -> <(x, y) 1129.25/294.78 <(0', S(y)) -> True 1129.25/294.78 <(x, 0') -> False 1129.25/294.78 >(S(x), S(y)) -> >(x, y) 1129.25/294.78 >(0', y) -> False 1129.25/294.78 >(S(x), 0') -> True 1129.25/294.78 partLt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partLt(x', xs)) 1129.25/294.78 partGt[Ite][True][Ite](True, x', Cons(x, xs)) -> Cons(x, partGt(x', xs)) 1129.25/294.78 partLt[Ite][True][Ite](False, x', Cons(x, xs)) -> partLt(x', xs) 1129.25/294.78 partGt[Ite][True][Ite](False, x', Cons(x, xs)) -> partGt(x', xs) 1129.25/294.78 1129.25/294.78 Types: 1129.25/294.78 quicksort :: Cons:Nil -> Cons:Nil 1129.25/294.78 Cons :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 part :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 Nil :: Cons:Nil 1129.25/294.78 partLt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partLt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 < :: S:0' -> S:0' -> True:False 1129.25/294.78 partGt :: S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 partGt[Ite][True][Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil 1129.25/294.78 > :: S:0' -> S:0' -> True:False 1129.25/294.78 app :: Cons:Nil -> Cons:Nil -> Cons:Nil 1129.25/294.78 notEmpty :: Cons:Nil -> True:False 1129.25/294.78 True :: True:False 1129.25/294.78 False :: True:False 1129.25/294.78 goal :: Cons:Nil -> Cons:Nil 1129.25/294.78 S :: S:0' -> S:0' 1129.25/294.78 0' :: S:0' 1129.25/294.78 hole_Cons:Nil1_0 :: Cons:Nil 1129.25/294.78 hole_S:0'2_0 :: S:0' 1129.25/294.78 hole_True:False3_0 :: True:False 1129.25/294.78 gen_Cons:Nil4_0 :: Nat -> Cons:Nil 1129.25/294.78 gen_S:0'5_0 :: Nat -> S:0' 1129.25/294.78 1129.25/294.78 1129.25/294.78 Lemmas: 1129.25/294.78 <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) 1129.25/294.78 partLt(gen_S:0'5_0(1), gen_Cons:Nil4_0(n299_0)) -> gen_Cons:Nil4_0(n299_0), rt in Omega(1 + n299_0) 1129.25/294.78 >(gen_S:0'5_0(n1026_0), gen_S:0'5_0(n1026_0)) -> False, rt in Omega(0) 1129.25/294.78 partGt(gen_S:0'5_0(0), gen_Cons:Nil4_0(n1331_0)) -> gen_Cons:Nil4_0(0), rt in Omega(1 + n1331_0) 1129.25/294.78 app(gen_Cons:Nil4_0(n2095_0), gen_Cons:Nil4_0(b)) -> gen_Cons:Nil4_0(+(n2095_0, b)), rt in Omega(1 + n2095_0) 1129.25/294.78 1129.25/294.78 1129.25/294.78 Generator Equations: 1129.25/294.78 gen_Cons:Nil4_0(0) <=> Nil 1129.25/294.78 gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) 1129.25/294.78 gen_S:0'5_0(0) <=> 0' 1129.25/294.78 gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) 1129.25/294.78 1129.25/294.78 1129.25/294.78 The following defined symbols remain to be analysed: 1129.25/294.78 quicksort 1129.64/294.87 EOF