302.40/291.49 WORST_CASE(Omega(n^1), ?) 302.52/291.53 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 302.52/291.53 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 302.52/291.53 302.52/291.53 302.52/291.53 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 302.52/291.53 302.52/291.53 (0) CpxTRS 302.52/291.53 (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 302.52/291.53 (2) CpxTRS 302.52/291.53 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 302.52/291.53 (4) typed CpxTrs 302.52/291.53 (5) OrderProof [LOWER BOUND(ID), 0 ms] 302.52/291.53 (6) typed CpxTrs 302.52/291.53 (7) RewriteLemmaProof [LOWER BOUND(ID), 294 ms] 302.52/291.53 (8) BEST 302.52/291.53 (9) proven lower bound 302.52/291.53 (10) LowerBoundPropagationProof [FINISHED, 0 ms] 302.52/291.53 (11) BOUNDS(n^1, INF) 302.52/291.53 (12) typed CpxTrs 302.52/291.53 (13) RewriteLemmaProof [LOWER BOUND(ID), 51 ms] 302.52/291.53 (14) typed CpxTrs 302.52/291.53 302.52/291.53 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (0) 302.52/291.53 Obligation: 302.52/291.53 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 302.52/291.53 302.52/291.53 302.52/291.53 The TRS R consists of the following rules: 302.52/291.53 302.52/291.53 minus(0, x) -> 0 302.52/291.53 minus(s(x), 0) -> s(x) 302.52/291.53 minus(s(x), s(y)) -> minus(x, y) 302.52/291.53 mod(x, 0) -> 0 302.52/291.53 mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) 302.52/291.53 if(true, x, y) -> x 302.52/291.53 if(false, x, y) -> mod(minus(x, y), y) 302.52/291.53 gcd(x, 0) -> x 302.52/291.53 gcd(0, s(y)) -> s(y) 302.52/291.53 gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) 302.52/291.53 lt(x, 0) -> false 302.52/291.53 lt(0, s(x)) -> true 302.52/291.53 lt(s(x), s(y)) -> lt(x, y) 302.52/291.53 302.52/291.53 S is empty. 302.52/291.53 Rewrite Strategy: FULL 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (1) RenamingProof (BOTH BOUNDS(ID, ID)) 302.52/291.53 Renamed function symbols to avoid clashes with predefined symbol. 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (2) 302.52/291.53 Obligation: 302.52/291.53 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 302.52/291.53 302.52/291.53 302.52/291.53 The TRS R consists of the following rules: 302.52/291.53 302.52/291.53 minus(0', x) -> 0' 302.52/291.53 minus(s(x), 0') -> s(x) 302.52/291.53 minus(s(x), s(y)) -> minus(x, y) 302.52/291.53 mod(x, 0') -> 0' 302.52/291.53 mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) 302.52/291.53 if(true, x, y) -> x 302.52/291.53 if(false, x, y) -> mod(minus(x, y), y) 302.52/291.53 gcd(x, 0') -> x 302.52/291.53 gcd(0', s(y)) -> s(y) 302.52/291.53 gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) 302.52/291.53 lt(x, 0') -> false 302.52/291.53 lt(0', s(x)) -> true 302.52/291.53 lt(s(x), s(y)) -> lt(x, y) 302.52/291.53 302.52/291.53 S is empty. 302.52/291.53 Rewrite Strategy: FULL 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 302.52/291.53 Infered types. 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (4) 302.52/291.53 Obligation: 302.52/291.53 TRS: 302.52/291.53 Rules: 302.52/291.53 minus(0', x) -> 0' 302.52/291.53 minus(s(x), 0') -> s(x) 302.52/291.53 minus(s(x), s(y)) -> minus(x, y) 302.52/291.53 mod(x, 0') -> 0' 302.52/291.53 mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) 302.52/291.53 if(true, x, y) -> x 302.52/291.53 if(false, x, y) -> mod(minus(x, y), y) 302.52/291.53 gcd(x, 0') -> x 302.52/291.53 gcd(0', s(y)) -> s(y) 302.52/291.53 gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) 302.52/291.53 lt(x, 0') -> false 302.52/291.53 lt(0', s(x)) -> true 302.52/291.53 lt(s(x), s(y)) -> lt(x, y) 302.52/291.53 302.52/291.53 Types: 302.52/291.53 minus :: 0':s -> 0':s -> 0':s 302.52/291.53 0' :: 0':s 302.52/291.53 s :: 0':s -> 0':s 302.52/291.53 mod :: 0':s -> 0':s -> 0':s 302.52/291.53 if :: true:false -> 0':s -> 0':s -> 0':s 302.52/291.53 lt :: 0':s -> 0':s -> true:false 302.52/291.53 true :: true:false 302.52/291.53 false :: true:false 302.52/291.53 gcd :: 0':s -> 0':s -> 0':s 302.52/291.53 hole_0':s1_0 :: 0':s 302.52/291.53 hole_true:false2_0 :: true:false 302.52/291.53 gen_0':s3_0 :: Nat -> 0':s 302.52/291.53 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (5) OrderProof (LOWER BOUND(ID)) 302.52/291.53 Heuristically decided to analyse the following defined symbols: 302.52/291.53 minus, mod, lt, gcd 302.52/291.53 302.52/291.53 They will be analysed ascendingly in the following order: 302.52/291.53 minus < mod 302.52/291.53 lt < mod 302.52/291.53 mod < gcd 302.52/291.53 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (6) 302.52/291.53 Obligation: 302.52/291.53 TRS: 302.52/291.53 Rules: 302.52/291.53 minus(0', x) -> 0' 302.52/291.53 minus(s(x), 0') -> s(x) 302.52/291.53 minus(s(x), s(y)) -> minus(x, y) 302.52/291.53 mod(x, 0') -> 0' 302.52/291.53 mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) 302.52/291.53 if(true, x, y) -> x 302.52/291.53 if(false, x, y) -> mod(minus(x, y), y) 302.52/291.53 gcd(x, 0') -> x 302.52/291.53 gcd(0', s(y)) -> s(y) 302.52/291.53 gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) 302.52/291.53 lt(x, 0') -> false 302.52/291.53 lt(0', s(x)) -> true 302.52/291.53 lt(s(x), s(y)) -> lt(x, y) 302.52/291.53 302.52/291.53 Types: 302.52/291.53 minus :: 0':s -> 0':s -> 0':s 302.52/291.53 0' :: 0':s 302.52/291.53 s :: 0':s -> 0':s 302.52/291.53 mod :: 0':s -> 0':s -> 0':s 302.52/291.53 if :: true:false -> 0':s -> 0':s -> 0':s 302.52/291.53 lt :: 0':s -> 0':s -> true:false 302.52/291.53 true :: true:false 302.52/291.53 false :: true:false 302.52/291.53 gcd :: 0':s -> 0':s -> 0':s 302.52/291.53 hole_0':s1_0 :: 0':s 302.52/291.53 hole_true:false2_0 :: true:false 302.52/291.53 gen_0':s3_0 :: Nat -> 0':s 302.52/291.53 302.52/291.53 302.52/291.53 Generator Equations: 302.52/291.53 gen_0':s3_0(0) <=> 0' 302.52/291.53 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 302.52/291.53 302.52/291.53 302.52/291.53 The following defined symbols remain to be analysed: 302.52/291.53 minus, mod, lt, gcd 302.52/291.53 302.52/291.53 They will be analysed ascendingly in the following order: 302.52/291.53 minus < mod 302.52/291.53 lt < mod 302.52/291.53 mod < gcd 302.52/291.53 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (7) RewriteLemmaProof (LOWER BOUND(ID)) 302.52/291.53 Proved the following rewrite lemma: 302.52/291.53 minus(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> gen_0':s3_0(0), rt in Omega(1 + n5_0) 302.52/291.53 302.52/291.53 Induction Base: 302.52/291.53 minus(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) 302.52/291.53 0' 302.52/291.53 302.52/291.53 Induction Step: 302.52/291.53 minus(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) ->_R^Omega(1) 302.52/291.53 minus(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) ->_IH 302.52/291.53 gen_0':s3_0(0) 302.52/291.53 302.52/291.53 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (8) 302.52/291.53 Complex Obligation (BEST) 302.52/291.53 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (9) 302.52/291.53 Obligation: 302.52/291.53 Proved the lower bound n^1 for the following obligation: 302.52/291.53 302.52/291.53 TRS: 302.52/291.53 Rules: 302.52/291.53 minus(0', x) -> 0' 302.52/291.53 minus(s(x), 0') -> s(x) 302.52/291.53 minus(s(x), s(y)) -> minus(x, y) 302.52/291.53 mod(x, 0') -> 0' 302.52/291.53 mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) 302.52/291.53 if(true, x, y) -> x 302.52/291.53 if(false, x, y) -> mod(minus(x, y), y) 302.52/291.53 gcd(x, 0') -> x 302.52/291.53 gcd(0', s(y)) -> s(y) 302.52/291.53 gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) 302.52/291.53 lt(x, 0') -> false 302.52/291.53 lt(0', s(x)) -> true 302.52/291.53 lt(s(x), s(y)) -> lt(x, y) 302.52/291.53 302.52/291.53 Types: 302.52/291.53 minus :: 0':s -> 0':s -> 0':s 302.52/291.53 0' :: 0':s 302.52/291.53 s :: 0':s -> 0':s 302.52/291.53 mod :: 0':s -> 0':s -> 0':s 302.52/291.53 if :: true:false -> 0':s -> 0':s -> 0':s 302.52/291.53 lt :: 0':s -> 0':s -> true:false 302.52/291.53 true :: true:false 302.52/291.53 false :: true:false 302.52/291.53 gcd :: 0':s -> 0':s -> 0':s 302.52/291.53 hole_0':s1_0 :: 0':s 302.52/291.53 hole_true:false2_0 :: true:false 302.52/291.53 gen_0':s3_0 :: Nat -> 0':s 302.52/291.53 302.52/291.53 302.52/291.53 Generator Equations: 302.52/291.53 gen_0':s3_0(0) <=> 0' 302.52/291.53 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 302.52/291.53 302.52/291.53 302.52/291.53 The following defined symbols remain to be analysed: 302.52/291.53 minus, mod, lt, gcd 302.52/291.53 302.52/291.53 They will be analysed ascendingly in the following order: 302.52/291.53 minus < mod 302.52/291.53 lt < mod 302.52/291.53 mod < gcd 302.52/291.53 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (10) LowerBoundPropagationProof (FINISHED) 302.52/291.53 Propagated lower bound. 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (11) 302.52/291.53 BOUNDS(n^1, INF) 302.52/291.53 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (12) 302.52/291.53 Obligation: 302.52/291.53 TRS: 302.52/291.53 Rules: 302.52/291.53 minus(0', x) -> 0' 302.52/291.53 minus(s(x), 0') -> s(x) 302.52/291.53 minus(s(x), s(y)) -> minus(x, y) 302.52/291.53 mod(x, 0') -> 0' 302.52/291.53 mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) 302.52/291.53 if(true, x, y) -> x 302.52/291.53 if(false, x, y) -> mod(minus(x, y), y) 302.52/291.53 gcd(x, 0') -> x 302.52/291.53 gcd(0', s(y)) -> s(y) 302.52/291.53 gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) 302.52/291.53 lt(x, 0') -> false 302.52/291.53 lt(0', s(x)) -> true 302.52/291.53 lt(s(x), s(y)) -> lt(x, y) 302.52/291.53 302.52/291.53 Types: 302.52/291.53 minus :: 0':s -> 0':s -> 0':s 302.52/291.53 0' :: 0':s 302.52/291.53 s :: 0':s -> 0':s 302.52/291.53 mod :: 0':s -> 0':s -> 0':s 302.52/291.53 if :: true:false -> 0':s -> 0':s -> 0':s 302.52/291.53 lt :: 0':s -> 0':s -> true:false 302.52/291.53 true :: true:false 302.52/291.53 false :: true:false 302.52/291.53 gcd :: 0':s -> 0':s -> 0':s 302.52/291.53 hole_0':s1_0 :: 0':s 302.52/291.53 hole_true:false2_0 :: true:false 302.52/291.53 gen_0':s3_0 :: Nat -> 0':s 302.52/291.53 302.52/291.53 302.52/291.53 Lemmas: 302.52/291.53 minus(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> gen_0':s3_0(0), rt in Omega(1 + n5_0) 302.52/291.53 302.52/291.53 302.52/291.53 Generator Equations: 302.52/291.53 gen_0':s3_0(0) <=> 0' 302.52/291.53 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 302.52/291.53 302.52/291.53 302.52/291.53 The following defined symbols remain to be analysed: 302.52/291.53 lt, mod, gcd 302.52/291.53 302.52/291.53 They will be analysed ascendingly in the following order: 302.52/291.53 lt < mod 302.52/291.53 mod < gcd 302.52/291.53 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (13) RewriteLemmaProof (LOWER BOUND(ID)) 302.52/291.53 Proved the following rewrite lemma: 302.52/291.53 lt(gen_0':s3_0(n404_0), gen_0':s3_0(n404_0)) -> false, rt in Omega(1 + n404_0) 302.52/291.53 302.52/291.53 Induction Base: 302.52/291.53 lt(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) 302.52/291.53 false 302.52/291.53 302.52/291.53 Induction Step: 302.52/291.53 lt(gen_0':s3_0(+(n404_0, 1)), gen_0':s3_0(+(n404_0, 1))) ->_R^Omega(1) 302.52/291.53 lt(gen_0':s3_0(n404_0), gen_0':s3_0(n404_0)) ->_IH 302.52/291.53 false 302.52/291.53 302.52/291.53 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 302.52/291.53 ---------------------------------------- 302.52/291.53 302.52/291.53 (14) 302.52/291.53 Obligation: 302.52/291.53 TRS: 302.52/291.53 Rules: 302.52/291.53 minus(0', x) -> 0' 302.52/291.53 minus(s(x), 0') -> s(x) 302.52/291.53 minus(s(x), s(y)) -> minus(x, y) 302.52/291.53 mod(x, 0') -> 0' 302.52/291.53 mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) 302.52/291.53 if(true, x, y) -> x 302.52/291.53 if(false, x, y) -> mod(minus(x, y), y) 302.52/291.53 gcd(x, 0') -> x 302.52/291.53 gcd(0', s(y)) -> s(y) 302.52/291.53 gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) 302.52/291.53 lt(x, 0') -> false 302.52/291.53 lt(0', s(x)) -> true 302.52/291.53 lt(s(x), s(y)) -> lt(x, y) 302.52/291.53 302.52/291.53 Types: 302.52/291.53 minus :: 0':s -> 0':s -> 0':s 302.52/291.53 0' :: 0':s 302.52/291.53 s :: 0':s -> 0':s 302.52/291.53 mod :: 0':s -> 0':s -> 0':s 302.52/291.53 if :: true:false -> 0':s -> 0':s -> 0':s 302.52/291.53 lt :: 0':s -> 0':s -> true:false 302.52/291.53 true :: true:false 302.52/291.53 false :: true:false 302.52/291.53 gcd :: 0':s -> 0':s -> 0':s 302.52/291.53 hole_0':s1_0 :: 0':s 302.52/291.53 hole_true:false2_0 :: true:false 302.52/291.53 gen_0':s3_0 :: Nat -> 0':s 302.52/291.53 302.52/291.53 302.52/291.53 Lemmas: 302.52/291.53 minus(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> gen_0':s3_0(0), rt in Omega(1 + n5_0) 302.52/291.53 lt(gen_0':s3_0(n404_0), gen_0':s3_0(n404_0)) -> false, rt in Omega(1 + n404_0) 302.52/291.53 302.52/291.53 302.52/291.53 Generator Equations: 302.52/291.53 gen_0':s3_0(0) <=> 0' 302.52/291.53 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 302.52/291.53 302.52/291.53 302.52/291.53 The following defined symbols remain to be analysed: 302.52/291.53 mod, gcd 302.52/291.53 302.52/291.53 They will be analysed ascendingly in the following order: 302.52/291.53 mod < gcd 302.52/291.57 EOF