6.13/2.32 WORST_CASE(NON_POLY, ?) 6.13/2.33 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 6.13/2.33 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.13/2.33 6.13/2.33 6.13/2.33 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(EXP, INF). 6.13/2.33 6.13/2.33 (0) CpxTRS 6.13/2.33 (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 6.13/2.33 (2) CpxTRS 6.13/2.33 (3) SlicingProof [LOWER BOUND(ID), 0 ms] 6.13/2.33 (4) CpxTRS 6.13/2.33 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 6.13/2.33 (6) typed CpxTrs 6.13/2.33 (7) OrderProof [LOWER BOUND(ID), 0 ms] 6.13/2.33 (8) typed CpxTrs 6.13/2.33 (9) RewriteLemmaProof [LOWER BOUND(ID), 239 ms] 6.13/2.33 (10) BEST 6.13/2.33 (11) proven lower bound 6.13/2.33 (12) LowerBoundPropagationProof [FINISHED, 0 ms] 6.13/2.33 (13) BOUNDS(n^1, INF) 6.13/2.33 (14) typed CpxTrs 6.13/2.33 (15) RewriteLemmaProof [FINISHED, 115 ms] 6.13/2.33 (16) BOUNDS(EXP, INF) 6.13/2.33 6.13/2.33 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (0) 6.13/2.33 Obligation: 6.13/2.33 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(EXP, INF). 6.13/2.33 6.13/2.33 6.13/2.33 The TRS R consists of the following rules: 6.13/2.33 6.13/2.33 empty(nil) -> true 6.13/2.33 empty(cons(x, l)) -> false 6.13/2.33 head(cons(x, l)) -> x 6.13/2.33 tail(nil) -> nil 6.13/2.33 tail(cons(x, l)) -> l 6.13/2.33 rev(nil) -> nil 6.13/2.33 rev(cons(x, l)) -> cons(rev1(x, l), rev2(x, l)) 6.13/2.33 last(x, l) -> if(empty(l), x, l) 6.13/2.33 if(true, x, l) -> x 6.13/2.33 if(false, x, l) -> last(head(l), tail(l)) 6.13/2.33 rev2(x, nil) -> nil 6.13/2.33 rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) 6.13/2.33 6.13/2.33 S is empty. 6.13/2.33 Rewrite Strategy: INNERMOST 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (1) RenamingProof (BOTH BOUNDS(ID, ID)) 6.13/2.33 Renamed function symbols to avoid clashes with predefined symbol. 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (2) 6.13/2.33 Obligation: 6.13/2.33 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(EXP, INF). 6.13/2.33 6.13/2.33 6.13/2.33 The TRS R consists of the following rules: 6.13/2.33 6.13/2.33 empty(nil) -> true 6.13/2.33 empty(cons(x, l)) -> false 6.13/2.33 head(cons(x, l)) -> x 6.13/2.33 tail(nil) -> nil 6.13/2.33 tail(cons(x, l)) -> l 6.13/2.33 rev(nil) -> nil 6.13/2.33 rev(cons(x, l)) -> cons(rev1(x, l), rev2(x, l)) 6.13/2.33 last(x, l) -> if(empty(l), x, l) 6.13/2.33 if(true, x, l) -> x 6.13/2.33 if(false, x, l) -> last(head(l), tail(l)) 6.13/2.33 rev2(x, nil) -> nil 6.13/2.33 rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) 6.13/2.33 6.13/2.33 S is empty. 6.13/2.33 Rewrite Strategy: INNERMOST 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (3) SlicingProof (LOWER BOUND(ID)) 6.13/2.33 Sliced the following arguments: 6.13/2.33 rev1/0 6.13/2.33 rev1/1 6.13/2.33 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (4) 6.13/2.33 Obligation: 6.13/2.33 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(EXP, INF). 6.13/2.33 6.13/2.33 6.13/2.33 The TRS R consists of the following rules: 6.13/2.33 6.13/2.33 empty(nil) -> true 6.13/2.33 empty(cons(x, l)) -> false 6.13/2.33 head(cons(x, l)) -> x 6.13/2.33 tail(nil) -> nil 6.13/2.33 tail(cons(x, l)) -> l 6.13/2.33 rev(nil) -> nil 6.13/2.33 rev(cons(x, l)) -> cons(rev1, rev2(x, l)) 6.13/2.33 last(x, l) -> if(empty(l), x, l) 6.13/2.33 if(true, x, l) -> x 6.13/2.33 if(false, x, l) -> last(head(l), tail(l)) 6.13/2.33 rev2(x, nil) -> nil 6.13/2.33 rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) 6.13/2.33 6.13/2.33 S is empty. 6.13/2.33 Rewrite Strategy: INNERMOST 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 6.13/2.33 Infered types. 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (6) 6.13/2.33 Obligation: 6.13/2.33 Innermost TRS: 6.13/2.33 Rules: 6.13/2.33 empty(nil) -> true 6.13/2.33 empty(cons(x, l)) -> false 6.13/2.33 head(cons(x, l)) -> x 6.13/2.33 tail(nil) -> nil 6.13/2.33 tail(cons(x, l)) -> l 6.13/2.33 rev(nil) -> nil 6.13/2.33 rev(cons(x, l)) -> cons(rev1, rev2(x, l)) 6.13/2.33 last(x, l) -> if(empty(l), x, l) 6.13/2.33 if(true, x, l) -> x 6.13/2.33 if(false, x, l) -> last(head(l), tail(l)) 6.13/2.33 rev2(x, nil) -> nil 6.13/2.33 rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) 6.13/2.33 6.13/2.33 Types: 6.13/2.33 empty :: nil:cons -> true:false 6.13/2.33 nil :: nil:cons 6.13/2.33 true :: true:false 6.13/2.33 cons :: rev1 -> nil:cons -> nil:cons 6.13/2.33 false :: true:false 6.13/2.33 head :: nil:cons -> rev1 6.13/2.33 tail :: nil:cons -> nil:cons 6.13/2.33 rev :: nil:cons -> nil:cons 6.13/2.33 rev1 :: rev1 6.13/2.33 rev2 :: rev1 -> nil:cons -> nil:cons 6.13/2.33 last :: rev1 -> nil:cons -> rev1 6.13/2.33 if :: true:false -> rev1 -> nil:cons -> rev1 6.13/2.33 hole_true:false1_0 :: true:false 6.13/2.33 hole_nil:cons2_0 :: nil:cons 6.13/2.33 hole_rev13_0 :: rev1 6.13/2.33 gen_nil:cons4_0 :: Nat -> nil:cons 6.13/2.33 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (7) OrderProof (LOWER BOUND(ID)) 6.13/2.33 Heuristically decided to analyse the following defined symbols: 6.13/2.33 rev, rev2, last 6.13/2.33 6.13/2.33 They will be analysed ascendingly in the following order: 6.13/2.33 rev = rev2 6.13/2.33 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (8) 6.13/2.33 Obligation: 6.13/2.33 Innermost TRS: 6.13/2.33 Rules: 6.13/2.33 empty(nil) -> true 6.13/2.33 empty(cons(x, l)) -> false 6.13/2.33 head(cons(x, l)) -> x 6.13/2.33 tail(nil) -> nil 6.13/2.33 tail(cons(x, l)) -> l 6.13/2.33 rev(nil) -> nil 6.13/2.33 rev(cons(x, l)) -> cons(rev1, rev2(x, l)) 6.13/2.33 last(x, l) -> if(empty(l), x, l) 6.13/2.33 if(true, x, l) -> x 6.13/2.33 if(false, x, l) -> last(head(l), tail(l)) 6.13/2.33 rev2(x, nil) -> nil 6.13/2.33 rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) 6.13/2.33 6.13/2.33 Types: 6.13/2.33 empty :: nil:cons -> true:false 6.13/2.33 nil :: nil:cons 6.13/2.33 true :: true:false 6.13/2.33 cons :: rev1 -> nil:cons -> nil:cons 6.13/2.33 false :: true:false 6.13/2.33 head :: nil:cons -> rev1 6.13/2.33 tail :: nil:cons -> nil:cons 6.13/2.33 rev :: nil:cons -> nil:cons 6.13/2.33 rev1 :: rev1 6.13/2.33 rev2 :: rev1 -> nil:cons -> nil:cons 6.13/2.33 last :: rev1 -> nil:cons -> rev1 6.13/2.33 if :: true:false -> rev1 -> nil:cons -> rev1 6.13/2.33 hole_true:false1_0 :: true:false 6.13/2.33 hole_nil:cons2_0 :: nil:cons 6.13/2.33 hole_rev13_0 :: rev1 6.13/2.33 gen_nil:cons4_0 :: Nat -> nil:cons 6.13/2.33 6.13/2.33 6.13/2.33 Generator Equations: 6.13/2.33 gen_nil:cons4_0(0) <=> nil 6.13/2.33 gen_nil:cons4_0(+(x, 1)) <=> cons(rev1, gen_nil:cons4_0(x)) 6.13/2.33 6.13/2.33 6.13/2.33 The following defined symbols remain to be analysed: 6.13/2.33 last, rev, rev2 6.13/2.33 6.13/2.33 They will be analysed ascendingly in the following order: 6.13/2.33 rev = rev2 6.13/2.33 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (9) RewriteLemmaProof (LOWER BOUND(ID)) 6.13/2.33 Proved the following rewrite lemma: 6.13/2.33 last(rev1, gen_nil:cons4_0(n6_0)) -> rev1, rt in Omega(1 + n6_0) 6.13/2.33 6.13/2.33 Induction Base: 6.13/2.33 last(rev1, gen_nil:cons4_0(0)) ->_R^Omega(1) 6.13/2.33 if(empty(gen_nil:cons4_0(0)), rev1, gen_nil:cons4_0(0)) ->_R^Omega(1) 6.13/2.33 if(true, rev1, gen_nil:cons4_0(0)) ->_R^Omega(1) 6.13/2.33 rev1 6.13/2.33 6.13/2.33 Induction Step: 6.13/2.33 last(rev1, gen_nil:cons4_0(+(n6_0, 1))) ->_R^Omega(1) 6.13/2.33 if(empty(gen_nil:cons4_0(+(n6_0, 1))), rev1, gen_nil:cons4_0(+(n6_0, 1))) ->_R^Omega(1) 6.13/2.33 if(false, rev1, gen_nil:cons4_0(+(1, n6_0))) ->_R^Omega(1) 6.13/2.33 last(head(gen_nil:cons4_0(+(1, n6_0))), tail(gen_nil:cons4_0(+(1, n6_0)))) ->_R^Omega(1) 6.13/2.33 last(rev1, tail(gen_nil:cons4_0(+(1, n6_0)))) ->_R^Omega(1) 6.13/2.33 last(rev1, gen_nil:cons4_0(n6_0)) ->_IH 6.13/2.33 rev1 6.13/2.33 6.13/2.33 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (10) 6.13/2.33 Complex Obligation (BEST) 6.13/2.33 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (11) 6.13/2.33 Obligation: 6.13/2.33 Proved the lower bound n^1 for the following obligation: 6.13/2.33 6.13/2.33 Innermost TRS: 6.13/2.33 Rules: 6.13/2.33 empty(nil) -> true 6.13/2.33 empty(cons(x, l)) -> false 6.13/2.33 head(cons(x, l)) -> x 6.13/2.33 tail(nil) -> nil 6.13/2.33 tail(cons(x, l)) -> l 6.13/2.33 rev(nil) -> nil 6.13/2.33 rev(cons(x, l)) -> cons(rev1, rev2(x, l)) 6.13/2.33 last(x, l) -> if(empty(l), x, l) 6.13/2.33 if(true, x, l) -> x 6.13/2.33 if(false, x, l) -> last(head(l), tail(l)) 6.13/2.33 rev2(x, nil) -> nil 6.13/2.33 rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) 6.13/2.33 6.13/2.33 Types: 6.13/2.33 empty :: nil:cons -> true:false 6.13/2.33 nil :: nil:cons 6.13/2.33 true :: true:false 6.13/2.33 cons :: rev1 -> nil:cons -> nil:cons 6.13/2.33 false :: true:false 6.13/2.33 head :: nil:cons -> rev1 6.13/2.33 tail :: nil:cons -> nil:cons 6.13/2.33 rev :: nil:cons -> nil:cons 6.13/2.33 rev1 :: rev1 6.13/2.33 rev2 :: rev1 -> nil:cons -> nil:cons 6.13/2.33 last :: rev1 -> nil:cons -> rev1 6.13/2.33 if :: true:false -> rev1 -> nil:cons -> rev1 6.13/2.33 hole_true:false1_0 :: true:false 6.13/2.33 hole_nil:cons2_0 :: nil:cons 6.13/2.33 hole_rev13_0 :: rev1 6.13/2.33 gen_nil:cons4_0 :: Nat -> nil:cons 6.13/2.33 6.13/2.33 6.13/2.33 Generator Equations: 6.13/2.33 gen_nil:cons4_0(0) <=> nil 6.13/2.33 gen_nil:cons4_0(+(x, 1)) <=> cons(rev1, gen_nil:cons4_0(x)) 6.13/2.33 6.13/2.33 6.13/2.33 The following defined symbols remain to be analysed: 6.13/2.33 last, rev, rev2 6.13/2.33 6.13/2.33 They will be analysed ascendingly in the following order: 6.13/2.33 rev = rev2 6.13/2.33 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (12) LowerBoundPropagationProof (FINISHED) 6.13/2.33 Propagated lower bound. 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (13) 6.13/2.33 BOUNDS(n^1, INF) 6.13/2.33 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (14) 6.13/2.33 Obligation: 6.13/2.33 Innermost TRS: 6.13/2.33 Rules: 6.13/2.33 empty(nil) -> true 6.13/2.33 empty(cons(x, l)) -> false 6.13/2.33 head(cons(x, l)) -> x 6.13/2.33 tail(nil) -> nil 6.13/2.33 tail(cons(x, l)) -> l 6.13/2.33 rev(nil) -> nil 6.13/2.33 rev(cons(x, l)) -> cons(rev1, rev2(x, l)) 6.13/2.33 last(x, l) -> if(empty(l), x, l) 6.13/2.33 if(true, x, l) -> x 6.13/2.33 if(false, x, l) -> last(head(l), tail(l)) 6.13/2.33 rev2(x, nil) -> nil 6.13/2.33 rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) 6.13/2.33 6.13/2.33 Types: 6.13/2.33 empty :: nil:cons -> true:false 6.13/2.33 nil :: nil:cons 6.13/2.33 true :: true:false 6.13/2.33 cons :: rev1 -> nil:cons -> nil:cons 6.13/2.33 false :: true:false 6.13/2.33 head :: nil:cons -> rev1 6.13/2.33 tail :: nil:cons -> nil:cons 6.13/2.33 rev :: nil:cons -> nil:cons 6.13/2.33 rev1 :: rev1 6.13/2.33 rev2 :: rev1 -> nil:cons -> nil:cons 6.13/2.33 last :: rev1 -> nil:cons -> rev1 6.13/2.33 if :: true:false -> rev1 -> nil:cons -> rev1 6.13/2.33 hole_true:false1_0 :: true:false 6.13/2.33 hole_nil:cons2_0 :: nil:cons 6.13/2.33 hole_rev13_0 :: rev1 6.13/2.33 gen_nil:cons4_0 :: Nat -> nil:cons 6.13/2.33 6.13/2.33 6.13/2.33 Lemmas: 6.13/2.33 last(rev1, gen_nil:cons4_0(n6_0)) -> rev1, rt in Omega(1 + n6_0) 6.13/2.33 6.13/2.33 6.13/2.33 Generator Equations: 6.13/2.33 gen_nil:cons4_0(0) <=> nil 6.13/2.33 gen_nil:cons4_0(+(x, 1)) <=> cons(rev1, gen_nil:cons4_0(x)) 6.13/2.33 6.13/2.33 6.13/2.33 The following defined symbols remain to be analysed: 6.13/2.33 rev2, rev 6.13/2.33 6.13/2.33 They will be analysed ascendingly in the following order: 6.13/2.33 rev = rev2 6.13/2.33 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (15) RewriteLemmaProof (FINISHED) 6.13/2.33 Proved the following rewrite lemma: 6.13/2.33 rev2(rev1, gen_nil:cons4_0(n341_0)) -> gen_nil:cons4_0(n341_0), rt in Omega(EXP) 6.13/2.33 6.13/2.33 Induction Base: 6.13/2.33 rev2(rev1, gen_nil:cons4_0(0)) ->_R^Omega(1) 6.13/2.33 nil 6.13/2.33 6.13/2.33 Induction Step: 6.13/2.33 rev2(rev1, gen_nil:cons4_0(+(n341_0, 1))) ->_R^Omega(1) 6.13/2.33 rev(cons(rev1, rev2(rev1, gen_nil:cons4_0(n341_0)))) ->_IH 6.13/2.33 rev(cons(rev1, gen_nil:cons4_0(c342_0))) ->_R^Omega(1) 6.13/2.33 cons(rev1, rev2(rev1, gen_nil:cons4_0(n341_0))) ->_IH 6.13/2.33 cons(rev1, gen_nil:cons4_0(c342_0)) 6.13/2.33 6.13/2.33 We have rt in EXP and sz in O(n). Thus, we have irc_R in EXP 6.13/2.33 ---------------------------------------- 6.13/2.33 6.13/2.33 (16) 6.13/2.33 BOUNDS(EXP, INF) 6.13/2.37 EOF