/export/starexec/sandbox2/solver/bin/starexec_run_rcdcRelativeAlsoLower /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^3), ?) 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^3, INF). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 368 ms] (4) CpxRelTRS (5) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxRelTRS (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) typed CpxTrs (9) OrderProof [LOWER BOUND(ID), 0 ms] (10) typed CpxTrs (11) RewriteLemmaProof [LOWER BOUND(ID), 302 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), 63 ms] (18) BEST (19) proven lower bound (20) LowerBoundPropagationProof [FINISHED, 0 ms] (21) BOUNDS(n^2, INF) (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 599 ms] (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 267 ms] (26) BEST (27) proven lower bound (28) LowerBoundPropagationProof [FINISHED, 0 ms] (29) BOUNDS(n^3, INF) (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 1045 ms] (32) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(n^3, INF). The TRS R consists of the following rules: plus(0, x) -> x plus(s(x), y) -> s(plus(x, y)) times(0, y) -> 0 times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0) -> 0 minus(x, 0) -> x minus(0, x) -> 0 minus(x, s(y)) -> p(minus(x, y)) isZero(0) -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0)), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0)) 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_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^3, INF). The TRS R consists of the following rules: plus(0, x) -> x plus(s(x), y) -> s(plus(x, y)) times(0, y) -> 0 times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0) -> 0 minus(x, 0) -> x minus(0, x) -> 0 minus(x, s(y)) -> p(minus(x, y)) isZero(0) -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0)), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0)) 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_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) 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^3, INF). The TRS R consists of the following rules: plus(0, x) -> x plus(s(x), y) -> s(plus(x, y)) times(0, y) -> 0 times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0) -> 0 minus(x, 0) -> x minus(0, x) -> 0 minus(x, s(y)) -> p(minus(x, y)) isZero(0) -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0)), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0)) 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_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) 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^3, INF). The TRS R consists of the following rules: plus(0', x) -> x plus(s(x), y) -> s(plus(x, y)) times(0', y) -> 0' times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0') -> 0' minus(x, 0') -> x minus(0', x) -> 0' minus(x, s(y)) -> p(minus(x, y)) isZero(0') -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0')) 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_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Innermost TRS: Rules: plus(0', x) -> x plus(s(x), y) -> s(plus(x, y)) times(0', y) -> 0' times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0') -> 0' minus(x, 0') -> x minus(0', x) -> 0' minus(x, s(y)) -> p(minus(x, y)) isZero(0') -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0')) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) Types: plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial 0' :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encArg :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_0 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial hole_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial1_5 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5 :: Nat -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial ---------------------------------------- (9) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: plus, times, minus, facIter, if, encArg They will be analysed ascendingly in the following order: plus < times plus < encArg times < facIter times < encArg minus < facIter minus < encArg facIter = if facIter < encArg if < encArg ---------------------------------------- (10) Obligation: Innermost TRS: Rules: plus(0', x) -> x plus(s(x), y) -> s(plus(x, y)) times(0', y) -> 0' times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0') -> 0' minus(x, 0') -> x minus(0', x) -> 0' minus(x, s(y)) -> p(minus(x, y)) isZero(0') -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0')) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) Types: plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial 0' :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encArg :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_0 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial hole_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial1_5 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5 :: Nat -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial Generator Equations: gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0) <=> 0' gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(x, 1)) <=> s(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(x)) The following defined symbols remain to be analysed: plus, times, minus, facIter, if, encArg They will be analysed ascendingly in the following order: plus < times plus < encArg times < facIter times < encArg minus < facIter minus < encArg facIter = if facIter < encArg if < encArg ---------------------------------------- (11) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n4_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n4_5, b)), rt in Omega(1 + n4_5) Induction Base: plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) ->_R^Omega(1) gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b) Induction Step: plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n4_5, 1)), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) ->_R^Omega(1) s(plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n4_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b))) ->_IH s(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(b, c5_5))) 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: plus(0', x) -> x plus(s(x), y) -> s(plus(x, y)) times(0', y) -> 0' times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0') -> 0' minus(x, 0') -> x minus(0', x) -> 0' minus(x, s(y)) -> p(minus(x, y)) isZero(0') -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0')) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) Types: plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial 0' :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encArg :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_0 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial hole_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial1_5 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5 :: Nat -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial Generator Equations: gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0) <=> 0' gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(x, 1)) <=> s(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(x)) The following defined symbols remain to be analysed: plus, times, minus, facIter, if, encArg They will be analysed ascendingly in the following order: plus < times plus < encArg times < facIter times < encArg minus < facIter minus < encArg facIter = if facIter < encArg if < encArg ---------------------------------------- (14) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (15) BOUNDS(n^1, INF) ---------------------------------------- (16) Obligation: Innermost TRS: Rules: plus(0', x) -> x plus(s(x), y) -> s(plus(x, y)) times(0', y) -> 0' times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0') -> 0' minus(x, 0') -> x minus(0', x) -> 0' minus(x, s(y)) -> p(minus(x, y)) isZero(0') -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0')) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) Types: plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial 0' :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encArg :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_0 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial hole_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial1_5 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5 :: Nat -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial Lemmas: plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n4_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n4_5, b)), rt in Omega(1 + n4_5) Generator Equations: gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0) <=> 0' gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(x, 1)) <=> s(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(x)) The following defined symbols remain to be analysed: times, minus, facIter, if, encArg They will be analysed ascendingly in the following order: times < facIter times < encArg minus < facIter minus < encArg facIter = if facIter < encArg if < encArg ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n1345_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(*(n1345_5, b)), rt in Omega(1 + b*n1345_5 + n1345_5) Induction Base: times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) ->_R^Omega(1) 0' Induction Step: times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n1345_5, 1)), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) ->_R^Omega(1) plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n1345_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b))) ->_IH plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(*(c1346_5, b))) ->_L^Omega(1 + b) gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(b, *(n1345_5, b))) We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). ---------------------------------------- (18) Complex Obligation (BEST) ---------------------------------------- (19) Obligation: Proved the lower bound n^2 for the following obligation: Innermost TRS: Rules: plus(0', x) -> x plus(s(x), y) -> s(plus(x, y)) times(0', y) -> 0' times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0') -> 0' minus(x, 0') -> x minus(0', x) -> 0' minus(x, s(y)) -> p(minus(x, y)) isZero(0') -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0')) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) Types: plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial 0' :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encArg :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_0 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial hole_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial1_5 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5 :: Nat -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial Lemmas: plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n4_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n4_5, b)), rt in Omega(1 + n4_5) Generator Equations: gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0) <=> 0' gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(x, 1)) <=> s(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(x)) The following defined symbols remain to be analysed: times, minus, facIter, if, encArg They will be analysed ascendingly in the following order: times < facIter times < encArg minus < facIter minus < encArg facIter = if facIter < encArg if < encArg ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^2, INF) ---------------------------------------- (22) Obligation: Innermost TRS: Rules: plus(0', x) -> x plus(s(x), y) -> s(plus(x, y)) times(0', y) -> 0' times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0') -> 0' minus(x, 0') -> x minus(0', x) -> 0' minus(x, s(y)) -> p(minus(x, y)) isZero(0') -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0')) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) Types: plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial 0' :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encArg :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_0 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial hole_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial1_5 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5 :: Nat -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial Lemmas: plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n4_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n4_5, b)), rt in Omega(1 + n4_5) times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n1345_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(*(n1345_5, b)), rt in Omega(1 + b*n1345_5 + n1345_5) Generator Equations: gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0) <=> 0' gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(x, 1)) <=> s(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(x)) The following defined symbols remain to be analysed: minus, facIter, if, encArg They will be analysed ascendingly in the following order: minus < facIter minus < encArg facIter = if facIter < encArg if < encArg ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: minus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(a), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n3071_5))) -> *3_5, rt in Omega(n3071_5) Induction Base: minus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(a), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, 0))) Induction Step: minus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(a), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, +(n3071_5, 1)))) ->_R^Omega(1) p(minus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(a), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n3071_5)))) ->_IH p(*3_5) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Obligation: Innermost TRS: Rules: plus(0', x) -> x plus(s(x), y) -> s(plus(x, y)) times(0', y) -> 0' times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0') -> 0' minus(x, 0') -> x minus(0', x) -> 0' minus(x, s(y)) -> p(minus(x, y)) isZero(0') -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0')) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) Types: plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial 0' :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encArg :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_0 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial hole_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial1_5 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5 :: Nat -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial Lemmas: plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n4_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n4_5, b)), rt in Omega(1 + n4_5) times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n1345_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(*(n1345_5, b)), rt in Omega(1 + b*n1345_5 + n1345_5) minus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(a), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n3071_5))) -> *3_5, rt in Omega(n3071_5) Generator Equations: gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0) <=> 0' gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(x, 1)) <=> s(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(x)) The following defined symbols remain to be analysed: if, facIter, encArg They will be analysed ascendingly in the following order: facIter = if facIter < encArg if < encArg ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: facIter(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n11511_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> *3_5, rt in Omega(n11511_5 + n11511_5^2 + n11511_5^3) Induction Base: facIter(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) Induction Step: facIter(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n11511_5, 1)), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) ->_R^Omega(1) if(isZero(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n11511_5, 1))), minus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n11511_5, 1)), s(0')), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n11511_5, 1)))) ->_R^Omega(1) if(false, minus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n11511_5)), s(0')), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n11511_5)))) ->_R^Omega(1) if(false, p(minus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n11511_5)), 0')), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n11511_5)))) ->_R^Omega(1) if(false, p(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n11511_5))), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n11511_5)))) ->_R^Omega(1) if(false, gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n11511_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n11511_5)))) ->_L^Omega(3 + 3*n11511_5 + n11511_5^2) if(false, gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n11511_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n11511_5)), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(*(b, +(1, n11511_5)))) ->_R^Omega(1) facIter(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n11511_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(b, *(b, n11511_5)))) ->_IH *3_5 We have rt in Omega(n^3) and sz in O(n). Thus, we have irc_R in Omega(n^3). ---------------------------------------- (26) Complex Obligation (BEST) ---------------------------------------- (27) Obligation: Proved the lower bound n^3 for the following obligation: Innermost TRS: Rules: plus(0', x) -> x plus(s(x), y) -> s(plus(x, y)) times(0', y) -> 0' times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0') -> 0' minus(x, 0') -> x minus(0', x) -> 0' minus(x, s(y)) -> p(minus(x, y)) isZero(0') -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0')) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) Types: plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial 0' :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encArg :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_0 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial hole_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial1_5 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5 :: Nat -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial Lemmas: plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n4_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n4_5, b)), rt in Omega(1 + n4_5) times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n1345_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(*(n1345_5, b)), rt in Omega(1 + b*n1345_5 + n1345_5) minus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(a), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n3071_5))) -> *3_5, rt in Omega(n3071_5) Generator Equations: gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0) <=> 0' gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(x, 1)) <=> s(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(x)) The following defined symbols remain to be analysed: facIter, encArg They will be analysed ascendingly in the following order: facIter = if facIter < encArg if < encArg ---------------------------------------- (28) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (29) BOUNDS(n^3, INF) ---------------------------------------- (30) Obligation: Innermost TRS: Rules: plus(0', x) -> x plus(s(x), y) -> s(plus(x, y)) times(0', y) -> 0' times(s(x), y) -> plus(y, times(x, y)) p(s(x)) -> x p(0') -> 0' minus(x, 0') -> x minus(0', x) -> 0' minus(x, s(y)) -> p(minus(x, y)) isZero(0') -> true isZero(s(x)) -> false facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) if(true, x, y, z) -> y if(false, x, y, z) -> facIter(x, z) factorial(x) -> facIter(x, s(0')) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(true) -> true encArg(false) -> false encArg(cons_plus(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) encArg(cons_times(x_1, x_2)) -> times(encArg(x_1), encArg(x_2)) encArg(cons_p(x_1)) -> p(encArg(x_1)) encArg(cons_minus(x_1, x_2)) -> minus(encArg(x_1), encArg(x_2)) encArg(cons_isZero(x_1)) -> isZero(encArg(x_1)) encArg(cons_facIter(x_1, x_2)) -> facIter(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_factorial(x_1)) -> factorial(encArg(x_1)) encode_plus(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_times(x_1, x_2) -> times(encArg(x_1), encArg(x_2)) encode_p(x_1) -> p(encArg(x_1)) encode_minus(x_1, x_2) -> minus(encArg(x_1), encArg(x_2)) encode_isZero(x_1) -> isZero(encArg(x_1)) encode_true -> true encode_false -> false encode_facIter(x_1, x_2) -> facIter(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_factorial(x_1) -> factorial(encArg(x_1)) Types: plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial 0' :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encArg :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial cons_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_plus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_0 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_s :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_times :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_p :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_minus :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_isZero :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_true :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_false :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_facIter :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_if :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial encode_factorial :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial hole_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial1_5 :: 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5 :: Nat -> 0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial Lemmas: plus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n4_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n4_5, b)), rt in Omega(1 + n4_5) times(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n1345_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(*(n1345_5, b)), rt in Omega(1 + b*n1345_5 + n1345_5) minus(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(a), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(1, n3071_5))) -> *3_5, rt in Omega(n3071_5) facIter(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n11511_5), gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(b)) -> *3_5, rt in Omega(n11511_5 + n11511_5^2 + n11511_5^3) Generator Equations: gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0) <=> 0' gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(x, 1)) <=> s(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(x)) The following defined symbols remain to be analysed: if, encArg They will be analysed ascendingly in the following order: facIter = if facIter < encArg if < encArg ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: encArg(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n18169_5)) -> gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n18169_5), rt in Omega(0) Induction Base: encArg(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(0)) ->_R^Omega(0) 0' Induction Step: encArg(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(+(n18169_5, 1))) ->_R^Omega(0) s(encArg(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(n18169_5))) ->_IH s(gen_0':s:true:false:cons_plus:cons_times:cons_p:cons_minus:cons_isZero:cons_facIter:cons_if:cons_factorial2_5(c18170_5)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (32) BOUNDS(1, INF)