/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), ?) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, 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), 327 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), 63 ms] (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 46 ms] (18) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: gcd(x, y) -> gcd2(x, y, 0) gcd2(x, y, i) -> if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i)) if1(true, b1, b2, b3, x, y, i) -> pair(result(y), neededIterations(i)) if1(false, b1, b2, b3, x, y, i) -> if2(b1, b2, b3, x, y, i) if2(true, b2, b3, x, y, i) -> pair(result(x), neededIterations(i)) if2(false, b2, b3, x, y, i) -> if3(b2, b3, x, y, i) if3(false, b3, x, y, i) -> gcd2(minus(x, y), y, i) if3(true, b3, x, y, i) -> if4(b3, x, y, i) if4(false, x, y, i) -> gcd2(x, minus(y, x), i) if4(true, x, y, i) -> pair(result(x), neededIterations(i)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) a -> b a -> c 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^1, INF). The TRS R consists of the following rules: gcd(x, y) -> gcd2(x, y, 0') gcd2(x, y, i) -> if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i)) if1(true, b1, b2, b3, x, y, i) -> pair(result(y), neededIterations(i)) if1(false, b1, b2, b3, x, y, i) -> if2(b1, b2, b3, x, y, i) if2(true, b2, b3, x, y, i) -> pair(result(x), neededIterations(i)) if2(false, b2, b3, x, y, i) -> if3(b2, b3, x, y, i) if3(false, b3, x, y, i) -> gcd2(minus(x, y), y, i) if3(true, b3, x, y, i) -> if4(b3, x, y, i) if4(false, x, y, i) -> gcd2(x, minus(y, x), i) if4(true, x, y, i) -> pair(result(x), neededIterations(i)) inc(0') -> 0' inc(s(i)) -> s(inc(i)) le(s(x), 0') -> false le(0', y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(0', y) -> 0' minus(s(x), s(y)) -> minus(x, y) a -> b a -> c S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) SlicingProof (LOWER BOUND(ID)) Sliced the following arguments: pair/0 pair/1 result/0 neededIterations/0 ---------------------------------------- (4) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: gcd(x, y) -> gcd2(x, y, 0') gcd2(x, y, i) -> if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i)) if1(true, b1, b2, b3, x, y, i) -> pair if1(false, b1, b2, b3, x, y, i) -> if2(b1, b2, b3, x, y, i) if2(true, b2, b3, x, y, i) -> pair if2(false, b2, b3, x, y, i) -> if3(b2, b3, x, y, i) if3(false, b3, x, y, i) -> gcd2(minus(x, y), y, i) if3(true, b3, x, y, i) -> if4(b3, x, y, i) if4(false, x, y, i) -> gcd2(x, minus(y, x), i) if4(true, x, y, i) -> pair inc(0') -> 0' inc(s(i)) -> s(inc(i)) le(s(x), 0') -> false le(0', y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(0', y) -> 0' minus(s(x), s(y)) -> minus(x, y) a -> b a -> c S is empty. Rewrite Strategy: FULL ---------------------------------------- (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (6) Obligation: TRS: Rules: gcd(x, y) -> gcd2(x, y, 0') gcd2(x, y, i) -> if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i)) if1(true, b1, b2, b3, x, y, i) -> pair if1(false, b1, b2, b3, x, y, i) -> if2(b1, b2, b3, x, y, i) if2(true, b2, b3, x, y, i) -> pair if2(false, b2, b3, x, y, i) -> if3(b2, b3, x, y, i) if3(false, b3, x, y, i) -> gcd2(minus(x, y), y, i) if3(true, b3, x, y, i) -> if4(b3, x, y, i) if4(false, x, y, i) -> gcd2(x, minus(y, x), i) if4(true, x, y, i) -> pair inc(0') -> 0' inc(s(i)) -> s(inc(i)) le(s(x), 0') -> false le(0', y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(0', y) -> 0' minus(s(x), s(y)) -> minus(x, y) a -> b a -> c Types: gcd :: 0':s -> 0':s -> pair gcd2 :: 0':s -> 0':s -> 0':s -> pair 0' :: 0':s if1 :: true:false -> true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair le :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false pair :: pair false :: true:false if2 :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair if3 :: true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair minus :: 0':s -> 0':s -> 0':s if4 :: true:false -> 0':s -> 0':s -> 0':s -> pair s :: 0':s -> 0':s a :: b:c b :: b:c c :: b:c hole_pair1_0 :: pair hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s5_0 :: Nat -> 0':s ---------------------------------------- (7) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: gcd2, le, inc, minus They will be analysed ascendingly in the following order: le < gcd2 inc < gcd2 minus < gcd2 ---------------------------------------- (8) Obligation: TRS: Rules: gcd(x, y) -> gcd2(x, y, 0') gcd2(x, y, i) -> if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i)) if1(true, b1, b2, b3, x, y, i) -> pair if1(false, b1, b2, b3, x, y, i) -> if2(b1, b2, b3, x, y, i) if2(true, b2, b3, x, y, i) -> pair if2(false, b2, b3, x, y, i) -> if3(b2, b3, x, y, i) if3(false, b3, x, y, i) -> gcd2(minus(x, y), y, i) if3(true, b3, x, y, i) -> if4(b3, x, y, i) if4(false, x, y, i) -> gcd2(x, minus(y, x), i) if4(true, x, y, i) -> pair inc(0') -> 0' inc(s(i)) -> s(inc(i)) le(s(x), 0') -> false le(0', y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(0', y) -> 0' minus(s(x), s(y)) -> minus(x, y) a -> b a -> c Types: gcd :: 0':s -> 0':s -> pair gcd2 :: 0':s -> 0':s -> 0':s -> pair 0' :: 0':s if1 :: true:false -> true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair le :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false pair :: pair false :: true:false if2 :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair if3 :: true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair minus :: 0':s -> 0':s -> 0':s if4 :: true:false -> 0':s -> 0':s -> 0':s -> pair s :: 0':s -> 0':s a :: b:c b :: b:c c :: b:c hole_pair1_0 :: pair hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s5_0 :: Nat -> 0':s Generator Equations: gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) The following defined symbols remain to be analysed: le, gcd2, inc, minus They will be analysed ascendingly in the following order: le < gcd2 inc < gcd2 minus < gcd2 ---------------------------------------- (9) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) -> false, rt in Omega(1 + n7_0) Induction Base: le(gen_0':s5_0(+(1, 0)), gen_0':s5_0(0)) ->_R^Omega(1) false Induction Step: le(gen_0':s5_0(+(1, +(n7_0, 1))), gen_0':s5_0(+(n7_0, 1))) ->_R^Omega(1) le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) ->_IH false 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: gcd(x, y) -> gcd2(x, y, 0') gcd2(x, y, i) -> if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i)) if1(true, b1, b2, b3, x, y, i) -> pair if1(false, b1, b2, b3, x, y, i) -> if2(b1, b2, b3, x, y, i) if2(true, b2, b3, x, y, i) -> pair if2(false, b2, b3, x, y, i) -> if3(b2, b3, x, y, i) if3(false, b3, x, y, i) -> gcd2(minus(x, y), y, i) if3(true, b3, x, y, i) -> if4(b3, x, y, i) if4(false, x, y, i) -> gcd2(x, minus(y, x), i) if4(true, x, y, i) -> pair inc(0') -> 0' inc(s(i)) -> s(inc(i)) le(s(x), 0') -> false le(0', y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(0', y) -> 0' minus(s(x), s(y)) -> minus(x, y) a -> b a -> c Types: gcd :: 0':s -> 0':s -> pair gcd2 :: 0':s -> 0':s -> 0':s -> pair 0' :: 0':s if1 :: true:false -> true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair le :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false pair :: pair false :: true:false if2 :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair if3 :: true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair minus :: 0':s -> 0':s -> 0':s if4 :: true:false -> 0':s -> 0':s -> 0':s -> pair s :: 0':s -> 0':s a :: b:c b :: b:c c :: b:c hole_pair1_0 :: pair hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s5_0 :: Nat -> 0':s Generator Equations: gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) The following defined symbols remain to be analysed: le, gcd2, inc, minus They will be analysed ascendingly in the following order: le < gcd2 inc < gcd2 minus < gcd2 ---------------------------------------- (12) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (13) BOUNDS(n^1, INF) ---------------------------------------- (14) Obligation: TRS: Rules: gcd(x, y) -> gcd2(x, y, 0') gcd2(x, y, i) -> if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i)) if1(true, b1, b2, b3, x, y, i) -> pair if1(false, b1, b2, b3, x, y, i) -> if2(b1, b2, b3, x, y, i) if2(true, b2, b3, x, y, i) -> pair if2(false, b2, b3, x, y, i) -> if3(b2, b3, x, y, i) if3(false, b3, x, y, i) -> gcd2(minus(x, y), y, i) if3(true, b3, x, y, i) -> if4(b3, x, y, i) if4(false, x, y, i) -> gcd2(x, minus(y, x), i) if4(true, x, y, i) -> pair inc(0') -> 0' inc(s(i)) -> s(inc(i)) le(s(x), 0') -> false le(0', y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(0', y) -> 0' minus(s(x), s(y)) -> minus(x, y) a -> b a -> c Types: gcd :: 0':s -> 0':s -> pair gcd2 :: 0':s -> 0':s -> 0':s -> pair 0' :: 0':s if1 :: true:false -> true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair le :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false pair :: pair false :: true:false if2 :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair if3 :: true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair minus :: 0':s -> 0':s -> 0':s if4 :: true:false -> 0':s -> 0':s -> 0':s -> pair s :: 0':s -> 0':s a :: b:c b :: b:c c :: b:c hole_pair1_0 :: pair hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s5_0 :: Nat -> 0':s Lemmas: le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) -> false, rt in Omega(1 + n7_0) Generator Equations: gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) The following defined symbols remain to be analysed: inc, gcd2, minus They will be analysed ascendingly in the following order: inc < gcd2 minus < gcd2 ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: inc(gen_0':s5_0(n314_0)) -> gen_0':s5_0(n314_0), rt in Omega(1 + n314_0) Induction Base: inc(gen_0':s5_0(0)) ->_R^Omega(1) 0' Induction Step: inc(gen_0':s5_0(+(n314_0, 1))) ->_R^Omega(1) s(inc(gen_0':s5_0(n314_0))) ->_IH s(gen_0':s5_0(c315_0)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (16) Obligation: TRS: Rules: gcd(x, y) -> gcd2(x, y, 0') gcd2(x, y, i) -> if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i)) if1(true, b1, b2, b3, x, y, i) -> pair if1(false, b1, b2, b3, x, y, i) -> if2(b1, b2, b3, x, y, i) if2(true, b2, b3, x, y, i) -> pair if2(false, b2, b3, x, y, i) -> if3(b2, b3, x, y, i) if3(false, b3, x, y, i) -> gcd2(minus(x, y), y, i) if3(true, b3, x, y, i) -> if4(b3, x, y, i) if4(false, x, y, i) -> gcd2(x, minus(y, x), i) if4(true, x, y, i) -> pair inc(0') -> 0' inc(s(i)) -> s(inc(i)) le(s(x), 0') -> false le(0', y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(0', y) -> 0' minus(s(x), s(y)) -> minus(x, y) a -> b a -> c Types: gcd :: 0':s -> 0':s -> pair gcd2 :: 0':s -> 0':s -> 0':s -> pair 0' :: 0':s if1 :: true:false -> true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair le :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false pair :: pair false :: true:false if2 :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair if3 :: true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair minus :: 0':s -> 0':s -> 0':s if4 :: true:false -> 0':s -> 0':s -> 0':s -> pair s :: 0':s -> 0':s a :: b:c b :: b:c c :: b:c hole_pair1_0 :: pair hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s5_0 :: Nat -> 0':s Lemmas: le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) -> false, rt in Omega(1 + n7_0) inc(gen_0':s5_0(n314_0)) -> gen_0':s5_0(n314_0), rt in Omega(1 + n314_0) Generator Equations: gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) The following defined symbols remain to be analysed: minus, gcd2 They will be analysed ascendingly in the following order: minus < gcd2 ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: minus(gen_0':s5_0(n544_0), gen_0':s5_0(n544_0)) -> gen_0':s5_0(0), rt in Omega(1 + n544_0) Induction Base: minus(gen_0':s5_0(0), gen_0':s5_0(0)) ->_R^Omega(1) gen_0':s5_0(0) Induction Step: minus(gen_0':s5_0(+(n544_0, 1)), gen_0':s5_0(+(n544_0, 1))) ->_R^Omega(1) minus(gen_0':s5_0(n544_0), gen_0':s5_0(n544_0)) ->_IH gen_0':s5_0(0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (18) Obligation: TRS: Rules: gcd(x, y) -> gcd2(x, y, 0') gcd2(x, y, i) -> if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i)) if1(true, b1, b2, b3, x, y, i) -> pair if1(false, b1, b2, b3, x, y, i) -> if2(b1, b2, b3, x, y, i) if2(true, b2, b3, x, y, i) -> pair if2(false, b2, b3, x, y, i) -> if3(b2, b3, x, y, i) if3(false, b3, x, y, i) -> gcd2(minus(x, y), y, i) if3(true, b3, x, y, i) -> if4(b3, x, y, i) if4(false, x, y, i) -> gcd2(x, minus(y, x), i) if4(true, x, y, i) -> pair inc(0') -> 0' inc(s(i)) -> s(inc(i)) le(s(x), 0') -> false le(0', y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(0', y) -> 0' minus(s(x), s(y)) -> minus(x, y) a -> b a -> c Types: gcd :: 0':s -> 0':s -> pair gcd2 :: 0':s -> 0':s -> 0':s -> pair 0' :: 0':s if1 :: true:false -> true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair le :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false pair :: pair false :: true:false if2 :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair if3 :: true:false -> true:false -> 0':s -> 0':s -> 0':s -> pair minus :: 0':s -> 0':s -> 0':s if4 :: true:false -> 0':s -> 0':s -> 0':s -> pair s :: 0':s -> 0':s a :: b:c b :: b:c c :: b:c hole_pair1_0 :: pair hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s5_0 :: Nat -> 0':s Lemmas: le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) -> false, rt in Omega(1 + n7_0) inc(gen_0':s5_0(n314_0)) -> gen_0':s5_0(n314_0), rt in Omega(1 + n314_0) minus(gen_0':s5_0(n544_0), gen_0':s5_0(n544_0)) -> gen_0':s5_0(0), rt in Omega(1 + n544_0) Generator Equations: gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) The following defined symbols remain to be analysed: gcd2