/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^2), ?) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). (0) CpxTRS (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) typed CpxTrs (5) OrderProof [LOWER BOUND(ID), 0 ms] (6) typed CpxTrs (7) RewriteLemmaProof [LOWER BOUND(ID), 228 ms] (8) BEST (9) proven lower bound (10) LowerBoundPropagationProof [FINISHED, 0 ms] (11) BOUNDS(n^1, INF) (12) typed CpxTrs (13) RewriteLemmaProof [LOWER BOUND(ID), 52 ms] (14) BEST (15) proven lower bound (16) LowerBoundPropagationProof [FINISHED, 0 ms] (17) BOUNDS(n^2, INF) (18) typed CpxTrs (19) RewriteLemmaProof [LOWER BOUND(ID), 54 ms] (20) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0) -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0), shorter(l, s(0)), l) if(true, b, l) -> s(0) if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0') -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0' iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0') -> 0' shorter(nil, y) -> true shorter(cons(x, l), 0') -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) if(true, b, l) -> s(0') if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: TRS: Rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0') -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0' iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0') -> 0' shorter(nil, y) -> true shorter(cons(x, l), 0') -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) if(true, b, l) -> s(0') if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) Types: car :: cons:nil -> 0':s cons :: 0':s -> cons:nil -> cons:nil cddr :: cons:nil -> cons:nil nil :: cons:nil cadr :: cons:nil -> 0':s isZero :: 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false plus :: 0':s -> 0':s -> 0':s ifplus :: true:false -> 0':s -> 0':s -> 0':s p :: 0':s -> 0':s times :: 0':s -> 0':s -> 0':s iftimes :: true:false -> 0':s -> 0':s -> 0':s shorter :: cons:nil -> 0':s -> true:false prod :: cons:nil -> 0':s if :: true:false -> true:false -> cons:nil -> 0':s if2 :: true:false -> cons:nil -> 0':s hole_0':s1_0 :: 0':s hole_cons:nil2_0 :: cons:nil hole_true:false3_0 :: true:false gen_0':s4_0 :: Nat -> 0':s gen_cons:nil5_0 :: Nat -> cons:nil ---------------------------------------- (5) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: plus, times, shorter, prod They will be analysed ascendingly in the following order: plus < times times < prod shorter < prod ---------------------------------------- (6) Obligation: TRS: Rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0') -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0' iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0') -> 0' shorter(nil, y) -> true shorter(cons(x, l), 0') -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) if(true, b, l) -> s(0') if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) Types: car :: cons:nil -> 0':s cons :: 0':s -> cons:nil -> cons:nil cddr :: cons:nil -> cons:nil nil :: cons:nil cadr :: cons:nil -> 0':s isZero :: 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false plus :: 0':s -> 0':s -> 0':s ifplus :: true:false -> 0':s -> 0':s -> 0':s p :: 0':s -> 0':s times :: 0':s -> 0':s -> 0':s iftimes :: true:false -> 0':s -> 0':s -> 0':s shorter :: cons:nil -> 0':s -> true:false prod :: cons:nil -> 0':s if :: true:false -> true:false -> cons:nil -> 0':s if2 :: true:false -> cons:nil -> 0':s hole_0':s1_0 :: 0':s hole_cons:nil2_0 :: cons:nil hole_true:false3_0 :: true:false gen_0':s4_0 :: Nat -> 0':s gen_cons:nil5_0 :: Nat -> cons:nil Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) gen_cons:nil5_0(0) <=> nil gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) The following defined symbols remain to be analysed: plus, times, shorter, prod They will be analysed ascendingly in the following order: plus < times times < prod shorter < prod ---------------------------------------- (7) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n7_0, b)), rt in Omega(1 + n7_0) Induction Base: plus(gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) ifplus(isZero(gen_0':s4_0(0)), gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) ifplus(true, gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) gen_0':s4_0(b) Induction Step: plus(gen_0':s4_0(+(n7_0, 1)), gen_0':s4_0(b)) ->_R^Omega(1) ifplus(isZero(gen_0':s4_0(+(n7_0, 1))), gen_0':s4_0(+(n7_0, 1)), gen_0':s4_0(b)) ->_R^Omega(1) ifplus(false, gen_0':s4_0(+(1, n7_0)), gen_0':s4_0(b)) ->_R^Omega(1) s(plus(p(gen_0':s4_0(+(1, n7_0))), gen_0':s4_0(b))) ->_R^Omega(1) s(plus(gen_0':s4_0(n7_0), gen_0':s4_0(b))) ->_IH s(gen_0':s4_0(+(b, c8_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (8) Complex Obligation (BEST) ---------------------------------------- (9) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0') -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0' iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0') -> 0' shorter(nil, y) -> true shorter(cons(x, l), 0') -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) if(true, b, l) -> s(0') if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) Types: car :: cons:nil -> 0':s cons :: 0':s -> cons:nil -> cons:nil cddr :: cons:nil -> cons:nil nil :: cons:nil cadr :: cons:nil -> 0':s isZero :: 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false plus :: 0':s -> 0':s -> 0':s ifplus :: true:false -> 0':s -> 0':s -> 0':s p :: 0':s -> 0':s times :: 0':s -> 0':s -> 0':s iftimes :: true:false -> 0':s -> 0':s -> 0':s shorter :: cons:nil -> 0':s -> true:false prod :: cons:nil -> 0':s if :: true:false -> true:false -> cons:nil -> 0':s if2 :: true:false -> cons:nil -> 0':s hole_0':s1_0 :: 0':s hole_cons:nil2_0 :: cons:nil hole_true:false3_0 :: true:false gen_0':s4_0 :: Nat -> 0':s gen_cons:nil5_0 :: Nat -> cons:nil Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) gen_cons:nil5_0(0) <=> nil gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) The following defined symbols remain to be analysed: plus, times, shorter, prod They will be analysed ascendingly in the following order: plus < times times < prod shorter < prod ---------------------------------------- (10) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (11) BOUNDS(n^1, INF) ---------------------------------------- (12) Obligation: TRS: Rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0') -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0' iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0') -> 0' shorter(nil, y) -> true shorter(cons(x, l), 0') -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) if(true, b, l) -> s(0') if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) Types: car :: cons:nil -> 0':s cons :: 0':s -> cons:nil -> cons:nil cddr :: cons:nil -> cons:nil nil :: cons:nil cadr :: cons:nil -> 0':s isZero :: 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false plus :: 0':s -> 0':s -> 0':s ifplus :: true:false -> 0':s -> 0':s -> 0':s p :: 0':s -> 0':s times :: 0':s -> 0':s -> 0':s iftimes :: true:false -> 0':s -> 0':s -> 0':s shorter :: cons:nil -> 0':s -> true:false prod :: cons:nil -> 0':s if :: true:false -> true:false -> cons:nil -> 0':s if2 :: true:false -> cons:nil -> 0':s hole_0':s1_0 :: 0':s hole_cons:nil2_0 :: cons:nil hole_true:false3_0 :: true:false gen_0':s4_0 :: Nat -> 0':s gen_cons:nil5_0 :: Nat -> cons:nil Lemmas: plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n7_0, b)), rt in Omega(1 + n7_0) Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) gen_cons:nil5_0(0) <=> nil gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) The following defined symbols remain to be analysed: times, shorter, prod They will be analysed ascendingly in the following order: times < prod shorter < prod ---------------------------------------- (13) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: times(gen_0':s4_0(n1253_0), gen_0':s4_0(b)) -> gen_0':s4_0(*(n1253_0, b)), rt in Omega(1 + b*n1253_0 + n1253_0) Induction Base: times(gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) iftimes(isZero(gen_0':s4_0(0)), gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) iftimes(true, gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) 0' Induction Step: times(gen_0':s4_0(+(n1253_0, 1)), gen_0':s4_0(b)) ->_R^Omega(1) iftimes(isZero(gen_0':s4_0(+(n1253_0, 1))), gen_0':s4_0(+(n1253_0, 1)), gen_0':s4_0(b)) ->_R^Omega(1) iftimes(false, gen_0':s4_0(+(1, n1253_0)), gen_0':s4_0(b)) ->_R^Omega(1) plus(gen_0':s4_0(b), times(p(gen_0':s4_0(+(1, n1253_0))), gen_0':s4_0(b))) ->_R^Omega(1) plus(gen_0':s4_0(b), times(gen_0':s4_0(n1253_0), gen_0':s4_0(b))) ->_IH plus(gen_0':s4_0(b), gen_0':s4_0(*(c1254_0, b))) ->_L^Omega(1 + b) gen_0':s4_0(+(b, *(n1253_0, b))) We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). ---------------------------------------- (14) Complex Obligation (BEST) ---------------------------------------- (15) Obligation: Proved the lower bound n^2 for the following obligation: TRS: Rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0') -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0' iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0') -> 0' shorter(nil, y) -> true shorter(cons(x, l), 0') -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) if(true, b, l) -> s(0') if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) Types: car :: cons:nil -> 0':s cons :: 0':s -> cons:nil -> cons:nil cddr :: cons:nil -> cons:nil nil :: cons:nil cadr :: cons:nil -> 0':s isZero :: 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false plus :: 0':s -> 0':s -> 0':s ifplus :: true:false -> 0':s -> 0':s -> 0':s p :: 0':s -> 0':s times :: 0':s -> 0':s -> 0':s iftimes :: true:false -> 0':s -> 0':s -> 0':s shorter :: cons:nil -> 0':s -> true:false prod :: cons:nil -> 0':s if :: true:false -> true:false -> cons:nil -> 0':s if2 :: true:false -> cons:nil -> 0':s hole_0':s1_0 :: 0':s hole_cons:nil2_0 :: cons:nil hole_true:false3_0 :: true:false gen_0':s4_0 :: Nat -> 0':s gen_cons:nil5_0 :: Nat -> cons:nil Lemmas: plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n7_0, b)), rt in Omega(1 + n7_0) Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) gen_cons:nil5_0(0) <=> nil gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) The following defined symbols remain to be analysed: times, shorter, prod They will be analysed ascendingly in the following order: times < prod shorter < prod ---------------------------------------- (16) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (17) BOUNDS(n^2, INF) ---------------------------------------- (18) Obligation: TRS: Rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0') -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0' iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0') -> 0' shorter(nil, y) -> true shorter(cons(x, l), 0') -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) if(true, b, l) -> s(0') if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) Types: car :: cons:nil -> 0':s cons :: 0':s -> cons:nil -> cons:nil cddr :: cons:nil -> cons:nil nil :: cons:nil cadr :: cons:nil -> 0':s isZero :: 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false plus :: 0':s -> 0':s -> 0':s ifplus :: true:false -> 0':s -> 0':s -> 0':s p :: 0':s -> 0':s times :: 0':s -> 0':s -> 0':s iftimes :: true:false -> 0':s -> 0':s -> 0':s shorter :: cons:nil -> 0':s -> true:false prod :: cons:nil -> 0':s if :: true:false -> true:false -> cons:nil -> 0':s if2 :: true:false -> cons:nil -> 0':s hole_0':s1_0 :: 0':s hole_cons:nil2_0 :: cons:nil hole_true:false3_0 :: true:false gen_0':s4_0 :: Nat -> 0':s gen_cons:nil5_0 :: Nat -> cons:nil Lemmas: plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n7_0, b)), rt in Omega(1 + n7_0) times(gen_0':s4_0(n1253_0), gen_0':s4_0(b)) -> gen_0':s4_0(*(n1253_0, b)), rt in Omega(1 + b*n1253_0 + n1253_0) Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) gen_cons:nil5_0(0) <=> nil gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) The following defined symbols remain to be analysed: shorter, prod They will be analysed ascendingly in the following order: shorter < prod ---------------------------------------- (19) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: shorter(gen_cons:nil5_0(n3479_0), gen_0':s4_0(n3479_0)) -> true, rt in Omega(1 + n3479_0) Induction Base: shorter(gen_cons:nil5_0(0), gen_0':s4_0(0)) ->_R^Omega(1) true Induction Step: shorter(gen_cons:nil5_0(+(n3479_0, 1)), gen_0':s4_0(+(n3479_0, 1))) ->_R^Omega(1) shorter(gen_cons:nil5_0(n3479_0), gen_0':s4_0(n3479_0)) ->_IH true We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (20) Obligation: TRS: Rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0') -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0' iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0') -> 0' shorter(nil, y) -> true shorter(cons(x, l), 0') -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) if(true, b, l) -> s(0') if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) Types: car :: cons:nil -> 0':s cons :: 0':s -> cons:nil -> cons:nil cddr :: cons:nil -> cons:nil nil :: cons:nil cadr :: cons:nil -> 0':s isZero :: 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false plus :: 0':s -> 0':s -> 0':s ifplus :: true:false -> 0':s -> 0':s -> 0':s p :: 0':s -> 0':s times :: 0':s -> 0':s -> 0':s iftimes :: true:false -> 0':s -> 0':s -> 0':s shorter :: cons:nil -> 0':s -> true:false prod :: cons:nil -> 0':s if :: true:false -> true:false -> cons:nil -> 0':s if2 :: true:false -> cons:nil -> 0':s hole_0':s1_0 :: 0':s hole_cons:nil2_0 :: cons:nil hole_true:false3_0 :: true:false gen_0':s4_0 :: Nat -> 0':s gen_cons:nil5_0 :: Nat -> cons:nil Lemmas: plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n7_0, b)), rt in Omega(1 + n7_0) times(gen_0':s4_0(n1253_0), gen_0':s4_0(b)) -> gen_0':s4_0(*(n1253_0, b)), rt in Omega(1 + b*n1253_0 + n1253_0) shorter(gen_cons:nil5_0(n3479_0), gen_0':s4_0(n3479_0)) -> true, rt in Omega(1 + n3479_0) Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) gen_cons:nil5_0(0) <=> nil gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) The following defined symbols remain to be analysed: prod