/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^2), ?) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). (0) CpxTRS (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) SlicingProof [LOWER BOUND(ID), 0 ms] (4) CpxTRS (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (6) typed CpxTrs (7) OrderProof [LOWER BOUND(ID), 0 ms] (8) typed CpxTrs (9) RewriteLemmaProof [LOWER BOUND(ID), 284 ms] (10) BEST (11) proven lower bound (12) LowerBoundPropagationProof [FINISHED, 0 ms] (13) BOUNDS(n^1, INF) (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 80 ms] (16) BEST (17) proven lower bound (18) LowerBoundPropagationProof [FINISHED, 0 ms] (19) BOUNDS(n^2, INF) (20) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: from(X) -> cons(X, n__from(s(X))) 2ndspos(0, Z) -> rnil 2ndspos(s(N), cons(X, Z)) -> 2ndspos(s(N), cons2(X, activate(Z))) 2ndspos(s(N), cons2(X, cons(Y, Z))) -> rcons(posrecip(Y), 2ndsneg(N, activate(Z))) 2ndsneg(0, Z) -> rnil 2ndsneg(s(N), cons(X, Z)) -> 2ndsneg(s(N), cons2(X, activate(Z))) 2ndsneg(s(N), cons2(X, cons(Y, Z))) -> rcons(negrecip(Y), 2ndspos(N, activate(Z))) pi(X) -> 2ndspos(X, from(0)) plus(0, Y) -> Y plus(s(X), Y) -> s(plus(X, Y)) times(0, Y) -> 0 times(s(X), Y) -> plus(Y, times(X, Y)) square(X) -> times(X, X) from(X) -> n__from(X) activate(n__from(X)) -> from(X) activate(X) -> X S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: from(X) -> cons(X, n__from(s(X))) 2ndspos(0', Z) -> rnil 2ndspos(s(N), cons(X, Z)) -> 2ndspos(s(N), cons2(X, activate(Z))) 2ndspos(s(N), cons2(X, cons(Y, Z))) -> rcons(posrecip(Y), 2ndsneg(N, activate(Z))) 2ndsneg(0', Z) -> rnil 2ndsneg(s(N), cons(X, Z)) -> 2ndsneg(s(N), cons2(X, activate(Z))) 2ndsneg(s(N), cons2(X, cons(Y, Z))) -> rcons(negrecip(Y), 2ndspos(N, activate(Z))) pi(X) -> 2ndspos(X, from(0')) plus(0', Y) -> Y plus(s(X), Y) -> s(plus(X, Y)) times(0', Y) -> 0' times(s(X), Y) -> plus(Y, times(X, Y)) square(X) -> times(X, X) from(X) -> n__from(X) activate(n__from(X)) -> from(X) activate(X) -> X S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) SlicingProof (LOWER BOUND(ID)) Sliced the following arguments: from/0 cons/0 n__from/0 cons2/0 rcons/0 posrecip/0 negrecip/0 ---------------------------------------- (4) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: from -> cons(n__from) 2ndspos(0', Z) -> rnil 2ndspos(s(N), cons(Z)) -> 2ndspos(s(N), cons2(activate(Z))) 2ndspos(s(N), cons2(cons(Z))) -> rcons(2ndsneg(N, activate(Z))) 2ndsneg(0', Z) -> rnil 2ndsneg(s(N), cons(Z)) -> 2ndsneg(s(N), cons2(activate(Z))) 2ndsneg(s(N), cons2(cons(Z))) -> rcons(2ndspos(N, activate(Z))) pi(X) -> 2ndspos(X, from) plus(0', Y) -> Y plus(s(X), Y) -> s(plus(X, Y)) times(0', Y) -> 0' times(s(X), Y) -> plus(Y, times(X, Y)) square(X) -> times(X, X) from -> n__from activate(n__from) -> from activate(X) -> X S is empty. Rewrite Strategy: FULL ---------------------------------------- (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (6) Obligation: TRS: Rules: from -> cons(n__from) 2ndspos(0', Z) -> rnil 2ndspos(s(N), cons(Z)) -> 2ndspos(s(N), cons2(activate(Z))) 2ndspos(s(N), cons2(cons(Z))) -> rcons(2ndsneg(N, activate(Z))) 2ndsneg(0', Z) -> rnil 2ndsneg(s(N), cons(Z)) -> 2ndsneg(s(N), cons2(activate(Z))) 2ndsneg(s(N), cons2(cons(Z))) -> rcons(2ndspos(N, activate(Z))) pi(X) -> 2ndspos(X, from) plus(0', Y) -> Y plus(s(X), Y) -> s(plus(X, Y)) times(0', Y) -> 0' times(s(X), Y) -> plus(Y, times(X, Y)) square(X) -> times(X, X) from -> n__from activate(n__from) -> from activate(X) -> X Types: from :: n__from:cons:cons2 cons :: n__from:cons:cons2 -> n__from:cons:cons2 n__from :: n__from:cons:cons2 2ndspos :: 0':s -> n__from:cons:cons2 -> rnil:rcons 0' :: 0':s rnil :: rnil:rcons s :: 0':s -> 0':s cons2 :: n__from:cons:cons2 -> n__from:cons:cons2 activate :: n__from:cons:cons2 -> n__from:cons:cons2 rcons :: rnil:rcons -> rnil:rcons 2ndsneg :: 0':s -> n__from:cons:cons2 -> rnil:rcons pi :: 0':s -> rnil:rcons plus :: 0':s -> 0':s -> 0':s times :: 0':s -> 0':s -> 0':s square :: 0':s -> 0':s hole_n__from:cons:cons21_0 :: n__from:cons:cons2 hole_rnil:rcons2_0 :: rnil:rcons hole_0':s3_0 :: 0':s gen_n__from:cons:cons24_0 :: Nat -> n__from:cons:cons2 gen_rnil:rcons5_0 :: Nat -> rnil:rcons gen_0':s6_0 :: Nat -> 0':s ---------------------------------------- (7) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: 2ndspos, 2ndsneg, plus, times They will be analysed ascendingly in the following order: 2ndspos = 2ndsneg plus < times ---------------------------------------- (8) Obligation: TRS: Rules: from -> cons(n__from) 2ndspos(0', Z) -> rnil 2ndspos(s(N), cons(Z)) -> 2ndspos(s(N), cons2(activate(Z))) 2ndspos(s(N), cons2(cons(Z))) -> rcons(2ndsneg(N, activate(Z))) 2ndsneg(0', Z) -> rnil 2ndsneg(s(N), cons(Z)) -> 2ndsneg(s(N), cons2(activate(Z))) 2ndsneg(s(N), cons2(cons(Z))) -> rcons(2ndspos(N, activate(Z))) pi(X) -> 2ndspos(X, from) plus(0', Y) -> Y plus(s(X), Y) -> s(plus(X, Y)) times(0', Y) -> 0' times(s(X), Y) -> plus(Y, times(X, Y)) square(X) -> times(X, X) from -> n__from activate(n__from) -> from activate(X) -> X Types: from :: n__from:cons:cons2 cons :: n__from:cons:cons2 -> n__from:cons:cons2 n__from :: n__from:cons:cons2 2ndspos :: 0':s -> n__from:cons:cons2 -> rnil:rcons 0' :: 0':s rnil :: rnil:rcons s :: 0':s -> 0':s cons2 :: n__from:cons:cons2 -> n__from:cons:cons2 activate :: n__from:cons:cons2 -> n__from:cons:cons2 rcons :: rnil:rcons -> rnil:rcons 2ndsneg :: 0':s -> n__from:cons:cons2 -> rnil:rcons pi :: 0':s -> rnil:rcons plus :: 0':s -> 0':s -> 0':s times :: 0':s -> 0':s -> 0':s square :: 0':s -> 0':s hole_n__from:cons:cons21_0 :: n__from:cons:cons2 hole_rnil:rcons2_0 :: rnil:rcons hole_0':s3_0 :: 0':s gen_n__from:cons:cons24_0 :: Nat -> n__from:cons:cons2 gen_rnil:rcons5_0 :: Nat -> rnil:rcons gen_0':s6_0 :: Nat -> 0':s Generator Equations: gen_n__from:cons:cons24_0(0) <=> n__from gen_n__from:cons:cons24_0(+(x, 1)) <=> cons(gen_n__from:cons:cons24_0(x)) gen_rnil:rcons5_0(0) <=> rnil gen_rnil:rcons5_0(+(x, 1)) <=> rcons(gen_rnil:rcons5_0(x)) gen_0':s6_0(0) <=> 0' gen_0':s6_0(+(x, 1)) <=> s(gen_0':s6_0(x)) The following defined symbols remain to be analysed: plus, 2ndspos, 2ndsneg, times They will be analysed ascendingly in the following order: 2ndspos = 2ndsneg plus < times ---------------------------------------- (9) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: plus(gen_0':s6_0(n8_0), gen_0':s6_0(b)) -> gen_0':s6_0(+(n8_0, b)), rt in Omega(1 + n8_0) Induction Base: plus(gen_0':s6_0(0), gen_0':s6_0(b)) ->_R^Omega(1) gen_0':s6_0(b) Induction Step: plus(gen_0':s6_0(+(n8_0, 1)), gen_0':s6_0(b)) ->_R^Omega(1) s(plus(gen_0':s6_0(n8_0), gen_0':s6_0(b))) ->_IH s(gen_0':s6_0(+(b, c9_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (10) Complex Obligation (BEST) ---------------------------------------- (11) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: from -> cons(n__from) 2ndspos(0', Z) -> rnil 2ndspos(s(N), cons(Z)) -> 2ndspos(s(N), cons2(activate(Z))) 2ndspos(s(N), cons2(cons(Z))) -> rcons(2ndsneg(N, activate(Z))) 2ndsneg(0', Z) -> rnil 2ndsneg(s(N), cons(Z)) -> 2ndsneg(s(N), cons2(activate(Z))) 2ndsneg(s(N), cons2(cons(Z))) -> rcons(2ndspos(N, activate(Z))) pi(X) -> 2ndspos(X, from) plus(0', Y) -> Y plus(s(X), Y) -> s(plus(X, Y)) times(0', Y) -> 0' times(s(X), Y) -> plus(Y, times(X, Y)) square(X) -> times(X, X) from -> n__from activate(n__from) -> from activate(X) -> X Types: from :: n__from:cons:cons2 cons :: n__from:cons:cons2 -> n__from:cons:cons2 n__from :: n__from:cons:cons2 2ndspos :: 0':s -> n__from:cons:cons2 -> rnil:rcons 0' :: 0':s rnil :: rnil:rcons s :: 0':s -> 0':s cons2 :: n__from:cons:cons2 -> n__from:cons:cons2 activate :: n__from:cons:cons2 -> n__from:cons:cons2 rcons :: rnil:rcons -> rnil:rcons 2ndsneg :: 0':s -> n__from:cons:cons2 -> rnil:rcons pi :: 0':s -> rnil:rcons plus :: 0':s -> 0':s -> 0':s times :: 0':s -> 0':s -> 0':s square :: 0':s -> 0':s hole_n__from:cons:cons21_0 :: n__from:cons:cons2 hole_rnil:rcons2_0 :: rnil:rcons hole_0':s3_0 :: 0':s gen_n__from:cons:cons24_0 :: Nat -> n__from:cons:cons2 gen_rnil:rcons5_0 :: Nat -> rnil:rcons gen_0':s6_0 :: Nat -> 0':s Generator Equations: gen_n__from:cons:cons24_0(0) <=> n__from gen_n__from:cons:cons24_0(+(x, 1)) <=> cons(gen_n__from:cons:cons24_0(x)) gen_rnil:rcons5_0(0) <=> rnil gen_rnil:rcons5_0(+(x, 1)) <=> rcons(gen_rnil:rcons5_0(x)) gen_0':s6_0(0) <=> 0' gen_0':s6_0(+(x, 1)) <=> s(gen_0':s6_0(x)) The following defined symbols remain to be analysed: plus, 2ndspos, 2ndsneg, times They will be analysed ascendingly in the following order: 2ndspos = 2ndsneg plus < times ---------------------------------------- (12) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (13) BOUNDS(n^1, INF) ---------------------------------------- (14) Obligation: TRS: Rules: from -> cons(n__from) 2ndspos(0', Z) -> rnil 2ndspos(s(N), cons(Z)) -> 2ndspos(s(N), cons2(activate(Z))) 2ndspos(s(N), cons2(cons(Z))) -> rcons(2ndsneg(N, activate(Z))) 2ndsneg(0', Z) -> rnil 2ndsneg(s(N), cons(Z)) -> 2ndsneg(s(N), cons2(activate(Z))) 2ndsneg(s(N), cons2(cons(Z))) -> rcons(2ndspos(N, activate(Z))) pi(X) -> 2ndspos(X, from) plus(0', Y) -> Y plus(s(X), Y) -> s(plus(X, Y)) times(0', Y) -> 0' times(s(X), Y) -> plus(Y, times(X, Y)) square(X) -> times(X, X) from -> n__from activate(n__from) -> from activate(X) -> X Types: from :: n__from:cons:cons2 cons :: n__from:cons:cons2 -> n__from:cons:cons2 n__from :: n__from:cons:cons2 2ndspos :: 0':s -> n__from:cons:cons2 -> rnil:rcons 0' :: 0':s rnil :: rnil:rcons s :: 0':s -> 0':s cons2 :: n__from:cons:cons2 -> n__from:cons:cons2 activate :: n__from:cons:cons2 -> n__from:cons:cons2 rcons :: rnil:rcons -> rnil:rcons 2ndsneg :: 0':s -> n__from:cons:cons2 -> rnil:rcons pi :: 0':s -> rnil:rcons plus :: 0':s -> 0':s -> 0':s times :: 0':s -> 0':s -> 0':s square :: 0':s -> 0':s hole_n__from:cons:cons21_0 :: n__from:cons:cons2 hole_rnil:rcons2_0 :: rnil:rcons hole_0':s3_0 :: 0':s gen_n__from:cons:cons24_0 :: Nat -> n__from:cons:cons2 gen_rnil:rcons5_0 :: Nat -> rnil:rcons gen_0':s6_0 :: Nat -> 0':s Lemmas: plus(gen_0':s6_0(n8_0), gen_0':s6_0(b)) -> gen_0':s6_0(+(n8_0, b)), rt in Omega(1 + n8_0) Generator Equations: gen_n__from:cons:cons24_0(0) <=> n__from gen_n__from:cons:cons24_0(+(x, 1)) <=> cons(gen_n__from:cons:cons24_0(x)) gen_rnil:rcons5_0(0) <=> rnil gen_rnil:rcons5_0(+(x, 1)) <=> rcons(gen_rnil:rcons5_0(x)) gen_0':s6_0(0) <=> 0' gen_0':s6_0(+(x, 1)) <=> s(gen_0':s6_0(x)) The following defined symbols remain to be analysed: times, 2ndspos, 2ndsneg They will be analysed ascendingly in the following order: 2ndspos = 2ndsneg ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: times(gen_0':s6_0(n1027_0), gen_0':s6_0(b)) -> gen_0':s6_0(*(n1027_0, b)), rt in Omega(1 + b*n1027_0 + n1027_0) Induction Base: times(gen_0':s6_0(0), gen_0':s6_0(b)) ->_R^Omega(1) 0' Induction Step: times(gen_0':s6_0(+(n1027_0, 1)), gen_0':s6_0(b)) ->_R^Omega(1) plus(gen_0':s6_0(b), times(gen_0':s6_0(n1027_0), gen_0':s6_0(b))) ->_IH plus(gen_0':s6_0(b), gen_0':s6_0(*(c1028_0, b))) ->_L^Omega(1 + b) gen_0':s6_0(+(b, *(n1027_0, b))) We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). ---------------------------------------- (16) Complex Obligation (BEST) ---------------------------------------- (17) Obligation: Proved the lower bound n^2 for the following obligation: TRS: Rules: from -> cons(n__from) 2ndspos(0', Z) -> rnil 2ndspos(s(N), cons(Z)) -> 2ndspos(s(N), cons2(activate(Z))) 2ndspos(s(N), cons2(cons(Z))) -> rcons(2ndsneg(N, activate(Z))) 2ndsneg(0', Z) -> rnil 2ndsneg(s(N), cons(Z)) -> 2ndsneg(s(N), cons2(activate(Z))) 2ndsneg(s(N), cons2(cons(Z))) -> rcons(2ndspos(N, activate(Z))) pi(X) -> 2ndspos(X, from) plus(0', Y) -> Y plus(s(X), Y) -> s(plus(X, Y)) times(0', Y) -> 0' times(s(X), Y) -> plus(Y, times(X, Y)) square(X) -> times(X, X) from -> n__from activate(n__from) -> from activate(X) -> X Types: from :: n__from:cons:cons2 cons :: n__from:cons:cons2 -> n__from:cons:cons2 n__from :: n__from:cons:cons2 2ndspos :: 0':s -> n__from:cons:cons2 -> rnil:rcons 0' :: 0':s rnil :: rnil:rcons s :: 0':s -> 0':s cons2 :: n__from:cons:cons2 -> n__from:cons:cons2 activate :: n__from:cons:cons2 -> n__from:cons:cons2 rcons :: rnil:rcons -> rnil:rcons 2ndsneg :: 0':s -> n__from:cons:cons2 -> rnil:rcons pi :: 0':s -> rnil:rcons plus :: 0':s -> 0':s -> 0':s times :: 0':s -> 0':s -> 0':s square :: 0':s -> 0':s hole_n__from:cons:cons21_0 :: n__from:cons:cons2 hole_rnil:rcons2_0 :: rnil:rcons hole_0':s3_0 :: 0':s gen_n__from:cons:cons24_0 :: Nat -> n__from:cons:cons2 gen_rnil:rcons5_0 :: Nat -> rnil:rcons gen_0':s6_0 :: Nat -> 0':s Lemmas: plus(gen_0':s6_0(n8_0), gen_0':s6_0(b)) -> gen_0':s6_0(+(n8_0, b)), rt in Omega(1 + n8_0) Generator Equations: gen_n__from:cons:cons24_0(0) <=> n__from gen_n__from:cons:cons24_0(+(x, 1)) <=> cons(gen_n__from:cons:cons24_0(x)) gen_rnil:rcons5_0(0) <=> rnil gen_rnil:rcons5_0(+(x, 1)) <=> rcons(gen_rnil:rcons5_0(x)) gen_0':s6_0(0) <=> 0' gen_0':s6_0(+(x, 1)) <=> s(gen_0':s6_0(x)) The following defined symbols remain to be analysed: times, 2ndspos, 2ndsneg They will be analysed ascendingly in the following order: 2ndspos = 2ndsneg ---------------------------------------- (18) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (19) BOUNDS(n^2, INF) ---------------------------------------- (20) Obligation: TRS: Rules: from -> cons(n__from) 2ndspos(0', Z) -> rnil 2ndspos(s(N), cons(Z)) -> 2ndspos(s(N), cons2(activate(Z))) 2ndspos(s(N), cons2(cons(Z))) -> rcons(2ndsneg(N, activate(Z))) 2ndsneg(0', Z) -> rnil 2ndsneg(s(N), cons(Z)) -> 2ndsneg(s(N), cons2(activate(Z))) 2ndsneg(s(N), cons2(cons(Z))) -> rcons(2ndspos(N, activate(Z))) pi(X) -> 2ndspos(X, from) plus(0', Y) -> Y plus(s(X), Y) -> s(plus(X, Y)) times(0', Y) -> 0' times(s(X), Y) -> plus(Y, times(X, Y)) square(X) -> times(X, X) from -> n__from activate(n__from) -> from activate(X) -> X Types: from :: n__from:cons:cons2 cons :: n__from:cons:cons2 -> n__from:cons:cons2 n__from :: n__from:cons:cons2 2ndspos :: 0':s -> n__from:cons:cons2 -> rnil:rcons 0' :: 0':s rnil :: rnil:rcons s :: 0':s -> 0':s cons2 :: n__from:cons:cons2 -> n__from:cons:cons2 activate :: n__from:cons:cons2 -> n__from:cons:cons2 rcons :: rnil:rcons -> rnil:rcons 2ndsneg :: 0':s -> n__from:cons:cons2 -> rnil:rcons pi :: 0':s -> rnil:rcons plus :: 0':s -> 0':s -> 0':s times :: 0':s -> 0':s -> 0':s square :: 0':s -> 0':s hole_n__from:cons:cons21_0 :: n__from:cons:cons2 hole_rnil:rcons2_0 :: rnil:rcons hole_0':s3_0 :: 0':s gen_n__from:cons:cons24_0 :: Nat -> n__from:cons:cons2 gen_rnil:rcons5_0 :: Nat -> rnil:rcons gen_0':s6_0 :: Nat -> 0':s Lemmas: plus(gen_0':s6_0(n8_0), gen_0':s6_0(b)) -> gen_0':s6_0(+(n8_0, b)), rt in Omega(1 + n8_0) times(gen_0':s6_0(n1027_0), gen_0':s6_0(b)) -> gen_0':s6_0(*(n1027_0, b)), rt in Omega(1 + b*n1027_0 + n1027_0) Generator Equations: gen_n__from:cons:cons24_0(0) <=> n__from gen_n__from:cons:cons24_0(+(x, 1)) <=> cons(gen_n__from:cons:cons24_0(x)) gen_rnil:rcons5_0(0) <=> rnil gen_rnil:rcons5_0(+(x, 1)) <=> rcons(gen_rnil:rcons5_0(x)) gen_0':s6_0(0) <=> 0' gen_0':s6_0(+(x, 1)) <=> s(gen_0':s6_0(x)) The following defined symbols remain to be analysed: 2ndsneg, 2ndspos They will be analysed ascendingly in the following order: 2ndspos = 2ndsneg