WORST_CASE(Omega(n^1), ?) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(n^1, INF). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 242 ms] (4) CpxRelTRS (5) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxRelTRS (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 6 ms] (8) typed CpxTrs (9) OrderProof [LOWER BOUND(ID), 0 ms] (10) typed CpxTrs (11) RewriteLemmaProof [LOWER BOUND(ID), 242 ms] (12) BEST (13) proven lower bound (14) LowerBoundPropagationProof [FINISHED, 0 ms] (15) BOUNDS(n^1, INF) (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 66 ms] (18) typed CpxTrs (19) RewriteLemmaProof [LOWER BOUND(ID), 305 ms] (20) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: minus(0, x) -> 0 minus(s(x), 0) -> s(x) minus(s(x), s(y)) -> minus(x, y) mod(x, 0) -> 0 mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) if(true, x, y) -> x if(false, x, y) -> mod(minus(x, y), y) gcd(x, 0) -> x gcd(0, s(y)) -> s(y) gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) lt(x, 0) -> false lt(0, s(x)) -> true lt(s(x), s(y)) -> lt(x, y) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) DerivationalComplexityToRuntimeComplexityProof (BOTH BOUNDS(ID, ID)) The following rules have been added to S to convert the given derivational complexity problem to a runtime complexity problem: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_mod(x_1, x_2)) -> mod(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3)) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_gcd(x_1, x_2)) -> gcd(encArg(x_1), encArg(x_2)) encArg(cons_lt(x_1, x_2)) -> lt(encArg(x_1), encArg(x_2)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_mod(x_1, x_2) -> mod(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encode_lt(x_1, x_2) -> lt(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_gcd(x_1, x_2) -> gcd(encArg(x_1), encArg(x_2)) ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: minus(0, x) -> 0 minus(s(x), 0) -> s(x) minus(s(x), s(y)) -> minus(x, y) mod(x, 0) -> 0 mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) if(true, x, y) -> x if(false, x, y) -> mod(minus(x, y), y) gcd(x, 0) -> x gcd(0, s(y)) -> s(y) gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) lt(x, 0) -> false lt(0, s(x)) -> true lt(s(x), s(y)) -> lt(x, y) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_mod(x_1, x_2)) -> mod(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3)) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_gcd(x_1, x_2)) -> gcd(encArg(x_1), encArg(x_2)) encArg(cons_lt(x_1, x_2)) -> lt(encArg(x_1), encArg(x_2)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_mod(x_1, x_2) -> mod(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encode_lt(x_1, x_2) -> lt(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_gcd(x_1, x_2) -> gcd(encArg(x_1), encArg(x_2)) Rewrite Strategy: INNERMOST ---------------------------------------- (3) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (4) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: minus(0, x) -> 0 minus(s(x), 0) -> s(x) minus(s(x), s(y)) -> minus(x, y) mod(x, 0) -> 0 mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) if(true, x, y) -> x if(false, x, y) -> mod(minus(x, y), y) gcd(x, 0) -> x gcd(0, s(y)) -> s(y) gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) lt(x, 0) -> false lt(0, s(x)) -> true lt(s(x), s(y)) -> lt(x, y) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_mod(x_1, x_2)) -> mod(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3)) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_gcd(x_1, x_2)) -> gcd(encArg(x_1), encArg(x_2)) encArg(cons_lt(x_1, x_2)) -> lt(encArg(x_1), encArg(x_2)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_mod(x_1, x_2) -> mod(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encode_lt(x_1, x_2) -> lt(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_gcd(x_1, x_2) -> gcd(encArg(x_1), encArg(x_2)) Rewrite Strategy: INNERMOST ---------------------------------------- (5) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (6) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: minus(0', x) -> 0' minus(s(x), 0') -> s(x) minus(s(x), s(y)) -> minus(x, y) mod(x, 0') -> 0' mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) if(true, x, y) -> x if(false, x, y) -> mod(minus(x, y), y) gcd(x, 0') -> x gcd(0', s(y)) -> s(y) gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) lt(x, 0') -> false lt(0', s(x)) -> true lt(s(x), s(y)) -> lt(x, y) The (relative) TRS S consists of the following rules: encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_mod(x_1, x_2)) -> mod(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3)) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_gcd(x_1, x_2)) -> gcd(encArg(x_1), encArg(x_2)) encArg(cons_lt(x_1, x_2)) -> lt(encArg(x_1), encArg(x_2)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_mod(x_1, x_2) -> mod(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encode_lt(x_1, x_2) -> lt(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_gcd(x_1, x_2) -> gcd(encArg(x_1), encArg(x_2)) Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Innermost TRS: Rules: minus(0', x) -> 0' minus(s(x), 0') -> s(x) minus(s(x), s(y)) -> minus(x, y) mod(x, 0') -> 0' mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) if(true, x, y) -> x if(false, x, y) -> mod(minus(x, y), y) gcd(x, 0') -> x gcd(0', s(y)) -> s(y) gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) lt(x, 0') -> false lt(0', s(x)) -> true lt(s(x), s(y)) -> lt(x, y) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_mod(x_1, x_2)) -> mod(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3)) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_gcd(x_1, x_2)) -> gcd(encArg(x_1), encArg(x_2)) encArg(cons_lt(x_1, x_2)) -> lt(encArg(x_1), encArg(x_2)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_mod(x_1, x_2) -> mod(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encode_lt(x_1, x_2) -> lt(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_gcd(x_1, x_2) -> gcd(encArg(x_1), encArg(x_2)) Types: minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt 0' :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt s :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt true :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt false :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encArg :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_0 :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_s :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_true :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_false :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt hole_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt1_4 :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4 :: Nat -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt ---------------------------------------- (9) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: minus, mod, if, lt, gcd, encArg They will be analysed ascendingly in the following order: minus < if minus < encArg mod = if lt < mod mod < gcd mod < encArg if < encArg lt < encArg gcd < encArg ---------------------------------------- (10) Obligation: Innermost TRS: Rules: minus(0', x) -> 0' minus(s(x), 0') -> s(x) minus(s(x), s(y)) -> minus(x, y) mod(x, 0') -> 0' mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) if(true, x, y) -> x if(false, x, y) -> mod(minus(x, y), y) gcd(x, 0') -> x gcd(0', s(y)) -> s(y) gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) lt(x, 0') -> false lt(0', s(x)) -> true lt(s(x), s(y)) -> lt(x, y) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_mod(x_1, x_2)) -> mod(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3)) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_gcd(x_1, x_2)) -> gcd(encArg(x_1), encArg(x_2)) encArg(cons_lt(x_1, x_2)) -> lt(encArg(x_1), encArg(x_2)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_mod(x_1, x_2) -> mod(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encode_lt(x_1, x_2) -> lt(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_gcd(x_1, x_2) -> gcd(encArg(x_1), encArg(x_2)) Types: minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt 0' :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt s :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt true :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt false :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encArg :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_0 :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_s :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_true :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_false :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt hole_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt1_4 :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4 :: Nat -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt Generator Equations: gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0) <=> 0' gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(+(x, 1)) <=> s(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(x)) The following defined symbols remain to be analysed: minus, mod, if, lt, gcd, encArg They will be analysed ascendingly in the following order: minus < if minus < encArg mod = if lt < mod mod < gcd mod < encArg if < encArg lt < encArg gcd < encArg ---------------------------------------- (11) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: minus(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n4_4), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n4_4)) -> gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0), rt in Omega(1 + n4_4) Induction Base: minus(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0)) ->_R^Omega(1) 0' Induction Step: minus(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(+(n4_4, 1)), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(+(n4_4, 1))) ->_R^Omega(1) minus(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n4_4), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n4_4)) ->_IH gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (12) Complex Obligation (BEST) ---------------------------------------- (13) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: minus(0', x) -> 0' minus(s(x), 0') -> s(x) minus(s(x), s(y)) -> minus(x, y) mod(x, 0') -> 0' mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) if(true, x, y) -> x if(false, x, y) -> mod(minus(x, y), y) gcd(x, 0') -> x gcd(0', s(y)) -> s(y) gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) lt(x, 0') -> false lt(0', s(x)) -> true lt(s(x), s(y)) -> lt(x, y) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_mod(x_1, x_2)) -> mod(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3)) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_gcd(x_1, x_2)) -> gcd(encArg(x_1), encArg(x_2)) encArg(cons_lt(x_1, x_2)) -> lt(encArg(x_1), encArg(x_2)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_mod(x_1, x_2) -> mod(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encode_lt(x_1, x_2) -> lt(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_gcd(x_1, x_2) -> gcd(encArg(x_1), encArg(x_2)) Types: minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt 0' :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt s :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt true :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt false :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encArg :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_0 :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_s :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_true :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_false :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt hole_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt1_4 :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4 :: Nat -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt Generator Equations: gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0) <=> 0' gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(+(x, 1)) <=> s(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(x)) The following defined symbols remain to be analysed: minus, mod, if, lt, gcd, encArg They will be analysed ascendingly in the following order: minus < if minus < encArg mod = if lt < mod mod < gcd mod < encArg if < encArg lt < encArg gcd < encArg ---------------------------------------- (14) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (15) BOUNDS(n^1, INF) ---------------------------------------- (16) Obligation: Innermost TRS: Rules: minus(0', x) -> 0' minus(s(x), 0') -> s(x) minus(s(x), s(y)) -> minus(x, y) mod(x, 0') -> 0' mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) if(true, x, y) -> x if(false, x, y) -> mod(minus(x, y), y) gcd(x, 0') -> x gcd(0', s(y)) -> s(y) gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) lt(x, 0') -> false lt(0', s(x)) -> true lt(s(x), s(y)) -> lt(x, y) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_mod(x_1, x_2)) -> mod(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3)) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_gcd(x_1, x_2)) -> gcd(encArg(x_1), encArg(x_2)) encArg(cons_lt(x_1, x_2)) -> lt(encArg(x_1), encArg(x_2)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_mod(x_1, x_2) -> mod(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encode_lt(x_1, x_2) -> lt(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_gcd(x_1, x_2) -> gcd(encArg(x_1), encArg(x_2)) Types: minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt 0' :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt s :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt true :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt false :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encArg :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_0 :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_s :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_true :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_false :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt hole_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt1_4 :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4 :: Nat -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt Lemmas: minus(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n4_4), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n4_4)) -> gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0), rt in Omega(1 + n4_4) Generator Equations: gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0) <=> 0' gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(+(x, 1)) <=> s(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(x)) The following defined symbols remain to be analysed: lt, mod, if, gcd, encArg They will be analysed ascendingly in the following order: mod = if lt < mod mod < gcd mod < encArg if < encArg lt < encArg gcd < encArg ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: lt(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n746_4), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n746_4)) -> false, rt in Omega(1 + n746_4) Induction Base: lt(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0)) ->_R^Omega(1) false Induction Step: lt(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(+(n746_4, 1)), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(+(n746_4, 1))) ->_R^Omega(1) lt(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n746_4), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n746_4)) ->_IH false We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (18) Obligation: Innermost TRS: Rules: minus(0', x) -> 0' minus(s(x), 0') -> s(x) minus(s(x), s(y)) -> minus(x, y) mod(x, 0') -> 0' mod(x, s(y)) -> if(lt(x, s(y)), x, s(y)) if(true, x, y) -> x if(false, x, y) -> mod(minus(x, y), y) gcd(x, 0') -> x gcd(0', s(y)) -> s(y) gcd(s(x), s(y)) -> gcd(mod(s(x), s(y)), mod(s(y), s(x))) lt(x, 0') -> false lt(0', s(x)) -> true lt(s(x), s(y)) -> lt(x, y) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_mod(x_1, x_2)) -> mod(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3)) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_gcd(x_1, x_2)) -> gcd(encArg(x_1), encArg(x_2)) encArg(cons_lt(x_1, x_2)) -> lt(encArg(x_1), encArg(x_2)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_mod(x_1, x_2) -> mod(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3) -> if(encArg(x_1), encArg(x_2), encArg(x_3)) encode_lt(x_1, x_2) -> lt(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_gcd(x_1, x_2) -> gcd(encArg(x_1), encArg(x_2)) Types: minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt 0' :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt s :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt true :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt false :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encArg :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt cons_lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_minus :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_0 :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_s :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_mod :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_if :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_lt :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_true :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_false :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt encode_gcd :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt hole_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt1_4 :: 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4 :: Nat -> 0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt Lemmas: minus(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n4_4), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n4_4)) -> gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0), rt in Omega(1 + n4_4) lt(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n746_4), gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n746_4)) -> false, rt in Omega(1 + n746_4) Generator Equations: gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0) <=> 0' gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(+(x, 1)) <=> s(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(x)) The following defined symbols remain to be analysed: if, mod, gcd, encArg They will be analysed ascendingly in the following order: mod = if mod < gcd mod < encArg if < encArg gcd < encArg ---------------------------------------- (19) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: encArg(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n1725_4)) -> gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n1725_4), rt in Omega(0) Induction Base: encArg(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(0)) ->_R^Omega(0) 0' Induction Step: encArg(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(+(n1725_4, 1))) ->_R^Omega(0) s(encArg(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(n1725_4))) ->_IH s(gen_0':s:true:false:cons_minus:cons_mod:cons_if:cons_gcd:cons_lt2_4(c1726_4)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (20) BOUNDS(1, INF)