/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^2), ?) proof of /export/starexec/sandbox2/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), 282 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), 55 ms] (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 371 ms] (16) BEST (17) proven lower bound (18) LowerBoundPropagationProof [FINISHED, 0 ms] (19) BOUNDS(n^2, INF) (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 20 ms] (22) BOUNDS(1, INF) ---------------------------------------- (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: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(s(x), s(y)) -> s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y))))) plus(s(x), x) -> plus(if(gt(x, x), id(x), id(x)), s(x)) plus(zero, y) -> y plus(id(x), s(y)) -> s(plus(x, if(gt(s(y), y), y, s(y)))) id(x) -> x if(true, x, y) -> x if(false, x, y) -> y not(x) -> if(x, false, true) gt(s(x), zero) -> true gt(zero, y) -> false gt(s(x), s(y)) -> gt(x, y) 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: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(s(x), s(y)) -> s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y))))) plus(s(x), x) -> plus(if(gt(x, x), id(x), id(x)), s(x)) plus(zero, y) -> y plus(id(x), s(y)) -> s(plus(x, if(gt(s(y), y), y, s(y)))) id(x) -> x if(true, x, y) -> x if(false, x, y) -> y not(x) -> if(x, false, true) gt(s(x), zero) -> true gt(zero, y) -> false gt(s(x), s(y)) -> gt(x, y) S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: TRS: Rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(s(x), s(y)) -> s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y))))) plus(s(x), x) -> plus(if(gt(x, x), id(x), id(x)), s(x)) plus(zero, y) -> y plus(id(x), s(y)) -> s(plus(x, if(gt(s(y), y), y, s(y)))) id(x) -> x if(true, x, y) -> x if(false, x, y) -> y not(x) -> if(x, false, true) gt(s(x), zero) -> true gt(zero, y) -> false gt(s(x), s(y)) -> gt(x, y) Types: app :: nil:cons -> nil:cons -> nil:cons nil :: nil:cons cons :: s:zero:true:false -> nil:cons -> nil:cons sum :: nil:cons -> nil:cons plus :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false s :: s:zero:true:false -> s:zero:true:false if :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false -> s:zero:true:false gt :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false not :: s:zero:true:false -> s:zero:true:false id :: s:zero:true:false -> s:zero:true:false zero :: s:zero:true:false true :: s:zero:true:false false :: s:zero:true:false hole_nil:cons1_0 :: nil:cons hole_s:zero:true:false2_0 :: s:zero:true:false gen_nil:cons3_0 :: Nat -> nil:cons gen_s:zero:true:false4_0 :: Nat -> s:zero:true:false ---------------------------------------- (5) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: app, sum, plus, gt They will be analysed ascendingly in the following order: app < sum plus < sum gt < plus ---------------------------------------- (6) Obligation: TRS: Rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(s(x), s(y)) -> s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y))))) plus(s(x), x) -> plus(if(gt(x, x), id(x), id(x)), s(x)) plus(zero, y) -> y plus(id(x), s(y)) -> s(plus(x, if(gt(s(y), y), y, s(y)))) id(x) -> x if(true, x, y) -> x if(false, x, y) -> y not(x) -> if(x, false, true) gt(s(x), zero) -> true gt(zero, y) -> false gt(s(x), s(y)) -> gt(x, y) Types: app :: nil:cons -> nil:cons -> nil:cons nil :: nil:cons cons :: s:zero:true:false -> nil:cons -> nil:cons sum :: nil:cons -> nil:cons plus :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false s :: s:zero:true:false -> s:zero:true:false if :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false -> s:zero:true:false gt :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false not :: s:zero:true:false -> s:zero:true:false id :: s:zero:true:false -> s:zero:true:false zero :: s:zero:true:false true :: s:zero:true:false false :: s:zero:true:false hole_nil:cons1_0 :: nil:cons hole_s:zero:true:false2_0 :: s:zero:true:false gen_nil:cons3_0 :: Nat -> nil:cons gen_s:zero:true:false4_0 :: Nat -> s:zero:true:false Generator Equations: gen_nil:cons3_0(0) <=> nil gen_nil:cons3_0(+(x, 1)) <=> cons(zero, gen_nil:cons3_0(x)) gen_s:zero:true:false4_0(0) <=> zero gen_s:zero:true:false4_0(+(x, 1)) <=> s(gen_s:zero:true:false4_0(x)) The following defined symbols remain to be analysed: app, sum, plus, gt They will be analysed ascendingly in the following order: app < sum plus < sum gt < plus ---------------------------------------- (7) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) -> gen_nil:cons3_0(+(n6_0, b)), rt in Omega(1 + n6_0) Induction Base: app(gen_nil:cons3_0(0), gen_nil:cons3_0(b)) ->_R^Omega(1) gen_nil:cons3_0(b) Induction Step: app(gen_nil:cons3_0(+(n6_0, 1)), gen_nil:cons3_0(b)) ->_R^Omega(1) cons(zero, app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b))) ->_IH cons(zero, gen_nil:cons3_0(+(b, c7_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: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(s(x), s(y)) -> s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y))))) plus(s(x), x) -> plus(if(gt(x, x), id(x), id(x)), s(x)) plus(zero, y) -> y plus(id(x), s(y)) -> s(plus(x, if(gt(s(y), y), y, s(y)))) id(x) -> x if(true, x, y) -> x if(false, x, y) -> y not(x) -> if(x, false, true) gt(s(x), zero) -> true gt(zero, y) -> false gt(s(x), s(y)) -> gt(x, y) Types: app :: nil:cons -> nil:cons -> nil:cons nil :: nil:cons cons :: s:zero:true:false -> nil:cons -> nil:cons sum :: nil:cons -> nil:cons plus :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false s :: s:zero:true:false -> s:zero:true:false if :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false -> s:zero:true:false gt :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false not :: s:zero:true:false -> s:zero:true:false id :: s:zero:true:false -> s:zero:true:false zero :: s:zero:true:false true :: s:zero:true:false false :: s:zero:true:false hole_nil:cons1_0 :: nil:cons hole_s:zero:true:false2_0 :: s:zero:true:false gen_nil:cons3_0 :: Nat -> nil:cons gen_s:zero:true:false4_0 :: Nat -> s:zero:true:false Generator Equations: gen_nil:cons3_0(0) <=> nil gen_nil:cons3_0(+(x, 1)) <=> cons(zero, gen_nil:cons3_0(x)) gen_s:zero:true:false4_0(0) <=> zero gen_s:zero:true:false4_0(+(x, 1)) <=> s(gen_s:zero:true:false4_0(x)) The following defined symbols remain to be analysed: app, sum, plus, gt They will be analysed ascendingly in the following order: app < sum plus < sum gt < plus ---------------------------------------- (10) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (11) BOUNDS(n^1, INF) ---------------------------------------- (12) Obligation: TRS: Rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(s(x), s(y)) -> s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y))))) plus(s(x), x) -> plus(if(gt(x, x), id(x), id(x)), s(x)) plus(zero, y) -> y plus(id(x), s(y)) -> s(plus(x, if(gt(s(y), y), y, s(y)))) id(x) -> x if(true, x, y) -> x if(false, x, y) -> y not(x) -> if(x, false, true) gt(s(x), zero) -> true gt(zero, y) -> false gt(s(x), s(y)) -> gt(x, y) Types: app :: nil:cons -> nil:cons -> nil:cons nil :: nil:cons cons :: s:zero:true:false -> nil:cons -> nil:cons sum :: nil:cons -> nil:cons plus :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false s :: s:zero:true:false -> s:zero:true:false if :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false -> s:zero:true:false gt :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false not :: s:zero:true:false -> s:zero:true:false id :: s:zero:true:false -> s:zero:true:false zero :: s:zero:true:false true :: s:zero:true:false false :: s:zero:true:false hole_nil:cons1_0 :: nil:cons hole_s:zero:true:false2_0 :: s:zero:true:false gen_nil:cons3_0 :: Nat -> nil:cons gen_s:zero:true:false4_0 :: Nat -> s:zero:true:false Lemmas: app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) -> gen_nil:cons3_0(+(n6_0, b)), rt in Omega(1 + n6_0) Generator Equations: gen_nil:cons3_0(0) <=> nil gen_nil:cons3_0(+(x, 1)) <=> cons(zero, gen_nil:cons3_0(x)) gen_s:zero:true:false4_0(0) <=> zero gen_s:zero:true:false4_0(+(x, 1)) <=> s(gen_s:zero:true:false4_0(x)) The following defined symbols remain to be analysed: gt, sum, plus They will be analysed ascendingly in the following order: plus < sum gt < plus ---------------------------------------- (13) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) -> true, rt in Omega(1 + n798_0) Induction Base: gt(gen_s:zero:true:false4_0(+(1, 0)), gen_s:zero:true:false4_0(0)) ->_R^Omega(1) true Induction Step: gt(gen_s:zero:true:false4_0(+(1, +(n798_0, 1))), gen_s:zero:true:false4_0(+(n798_0, 1))) ->_R^Omega(1) gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) ->_IH true We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (14) Obligation: TRS: Rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(s(x), s(y)) -> s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y))))) plus(s(x), x) -> plus(if(gt(x, x), id(x), id(x)), s(x)) plus(zero, y) -> y plus(id(x), s(y)) -> s(plus(x, if(gt(s(y), y), y, s(y)))) id(x) -> x if(true, x, y) -> x if(false, x, y) -> y not(x) -> if(x, false, true) gt(s(x), zero) -> true gt(zero, y) -> false gt(s(x), s(y)) -> gt(x, y) Types: app :: nil:cons -> nil:cons -> nil:cons nil :: nil:cons cons :: s:zero:true:false -> nil:cons -> nil:cons sum :: nil:cons -> nil:cons plus :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false s :: s:zero:true:false -> s:zero:true:false if :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false -> s:zero:true:false gt :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false not :: s:zero:true:false -> s:zero:true:false id :: s:zero:true:false -> s:zero:true:false zero :: s:zero:true:false true :: s:zero:true:false false :: s:zero:true:false hole_nil:cons1_0 :: nil:cons hole_s:zero:true:false2_0 :: s:zero:true:false gen_nil:cons3_0 :: Nat -> nil:cons gen_s:zero:true:false4_0 :: Nat -> s:zero:true:false Lemmas: app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) -> gen_nil:cons3_0(+(n6_0, b)), rt in Omega(1 + n6_0) gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) -> true, rt in Omega(1 + n798_0) Generator Equations: gen_nil:cons3_0(0) <=> nil gen_nil:cons3_0(+(x, 1)) <=> cons(zero, gen_nil:cons3_0(x)) gen_s:zero:true:false4_0(0) <=> zero gen_s:zero:true:false4_0(+(x, 1)) <=> s(gen_s:zero:true:false4_0(x)) The following defined symbols remain to be analysed: plus, sum They will be analysed ascendingly in the following order: plus < sum ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: plus(gen_s:zero:true:false4_0(+(2, n1097_0)), gen_s:zero:true:false4_0(+(1, n1097_0))) -> *5_0, rt in Omega(n1097_0 + n1097_0^2) Induction Base: plus(gen_s:zero:true:false4_0(+(2, 0)), gen_s:zero:true:false4_0(+(1, 0))) Induction Step: plus(gen_s:zero:true:false4_0(+(2, +(n1097_0, 1))), gen_s:zero:true:false4_0(+(1, +(n1097_0, 1)))) ->_R^Omega(1) s(s(plus(if(gt(gen_s:zero:true:false4_0(+(2, n1097_0)), gen_s:zero:true:false4_0(+(1, n1097_0))), gen_s:zero:true:false4_0(+(2, n1097_0)), gen_s:zero:true:false4_0(+(1, n1097_0))), if(not(gt(gen_s:zero:true:false4_0(+(2, n1097_0)), gen_s:zero:true:false4_0(+(1, n1097_0)))), id(gen_s:zero:true:false4_0(+(2, n1097_0))), id(gen_s:zero:true:false4_0(+(1, n1097_0))))))) ->_L^Omega(2 + n1097_0) s(s(plus(if(true, gen_s:zero:true:false4_0(+(2, n1097_0)), gen_s:zero:true:false4_0(+(1, n1097_0))), if(not(gt(gen_s:zero:true:false4_0(+(2, n1097_0)), gen_s:zero:true:false4_0(+(1, n1097_0)))), id(gen_s:zero:true:false4_0(+(2, n1097_0))), id(gen_s:zero:true:false4_0(+(1, n1097_0))))))) ->_R^Omega(1) s(s(plus(gen_s:zero:true:false4_0(+(2, n1097_0)), if(not(gt(gen_s:zero:true:false4_0(+(2, n1097_0)), gen_s:zero:true:false4_0(+(1, n1097_0)))), id(gen_s:zero:true:false4_0(+(2, n1097_0))), id(gen_s:zero:true:false4_0(+(1, n1097_0))))))) ->_L^Omega(2 + n1097_0) s(s(plus(gen_s:zero:true:false4_0(+(2, n1097_0)), if(not(true), id(gen_s:zero:true:false4_0(+(2, n1097_0))), id(gen_s:zero:true:false4_0(+(1, n1097_0))))))) ->_R^Omega(1) s(s(plus(gen_s:zero:true:false4_0(+(2, n1097_0)), if(if(true, false, true), id(gen_s:zero:true:false4_0(+(2, n1097_0))), id(gen_s:zero:true:false4_0(+(1, n1097_0))))))) ->_R^Omega(1) s(s(plus(gen_s:zero:true:false4_0(+(2, n1097_0)), if(false, id(gen_s:zero:true:false4_0(+(2, n1097_0))), id(gen_s:zero:true:false4_0(+(1, n1097_0))))))) ->_R^Omega(1) s(s(plus(gen_s:zero:true:false4_0(+(2, n1097_0)), if(false, gen_s:zero:true:false4_0(+(2, n1097_0)), id(gen_s:zero:true:false4_0(+(1, n1097_0))))))) ->_R^Omega(1) s(s(plus(gen_s:zero:true:false4_0(+(2, n1097_0)), if(false, gen_s:zero:true:false4_0(+(2, n1097_0)), gen_s:zero:true:false4_0(+(1, n1097_0)))))) ->_R^Omega(1) s(s(plus(gen_s:zero:true:false4_0(+(2, n1097_0)), gen_s:zero:true:false4_0(+(1, n1097_0))))) ->_IH s(s(*5_0)) We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). ---------------------------------------- (16) Complex Obligation (BEST) ---------------------------------------- (17) Obligation: Proved the lower bound n^2 for the following obligation: TRS: Rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(s(x), s(y)) -> s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y))))) plus(s(x), x) -> plus(if(gt(x, x), id(x), id(x)), s(x)) plus(zero, y) -> y plus(id(x), s(y)) -> s(plus(x, if(gt(s(y), y), y, s(y)))) id(x) -> x if(true, x, y) -> x if(false, x, y) -> y not(x) -> if(x, false, true) gt(s(x), zero) -> true gt(zero, y) -> false gt(s(x), s(y)) -> gt(x, y) Types: app :: nil:cons -> nil:cons -> nil:cons nil :: nil:cons cons :: s:zero:true:false -> nil:cons -> nil:cons sum :: nil:cons -> nil:cons plus :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false s :: s:zero:true:false -> s:zero:true:false if :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false -> s:zero:true:false gt :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false not :: s:zero:true:false -> s:zero:true:false id :: s:zero:true:false -> s:zero:true:false zero :: s:zero:true:false true :: s:zero:true:false false :: s:zero:true:false hole_nil:cons1_0 :: nil:cons hole_s:zero:true:false2_0 :: s:zero:true:false gen_nil:cons3_0 :: Nat -> nil:cons gen_s:zero:true:false4_0 :: Nat -> s:zero:true:false Lemmas: app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) -> gen_nil:cons3_0(+(n6_0, b)), rt in Omega(1 + n6_0) gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) -> true, rt in Omega(1 + n798_0) Generator Equations: gen_nil:cons3_0(0) <=> nil gen_nil:cons3_0(+(x, 1)) <=> cons(zero, gen_nil:cons3_0(x)) gen_s:zero:true:false4_0(0) <=> zero gen_s:zero:true:false4_0(+(x, 1)) <=> s(gen_s:zero:true:false4_0(x)) The following defined symbols remain to be analysed: plus, sum They will be analysed ascendingly in the following order: plus < sum ---------------------------------------- (18) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (19) BOUNDS(n^2, INF) ---------------------------------------- (20) Obligation: TRS: Rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(s(x), s(y)) -> s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y))))) plus(s(x), x) -> plus(if(gt(x, x), id(x), id(x)), s(x)) plus(zero, y) -> y plus(id(x), s(y)) -> s(plus(x, if(gt(s(y), y), y, s(y)))) id(x) -> x if(true, x, y) -> x if(false, x, y) -> y not(x) -> if(x, false, true) gt(s(x), zero) -> true gt(zero, y) -> false gt(s(x), s(y)) -> gt(x, y) Types: app :: nil:cons -> nil:cons -> nil:cons nil :: nil:cons cons :: s:zero:true:false -> nil:cons -> nil:cons sum :: nil:cons -> nil:cons plus :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false s :: s:zero:true:false -> s:zero:true:false if :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false -> s:zero:true:false gt :: s:zero:true:false -> s:zero:true:false -> s:zero:true:false not :: s:zero:true:false -> s:zero:true:false id :: s:zero:true:false -> s:zero:true:false zero :: s:zero:true:false true :: s:zero:true:false false :: s:zero:true:false hole_nil:cons1_0 :: nil:cons hole_s:zero:true:false2_0 :: s:zero:true:false gen_nil:cons3_0 :: Nat -> nil:cons gen_s:zero:true:false4_0 :: Nat -> s:zero:true:false Lemmas: app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) -> gen_nil:cons3_0(+(n6_0, b)), rt in Omega(1 + n6_0) gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) -> true, rt in Omega(1 + n798_0) plus(gen_s:zero:true:false4_0(+(2, n1097_0)), gen_s:zero:true:false4_0(+(1, n1097_0))) -> *5_0, rt in Omega(n1097_0 + n1097_0^2) Generator Equations: gen_nil:cons3_0(0) <=> nil gen_nil:cons3_0(+(x, 1)) <=> cons(zero, gen_nil:cons3_0(x)) gen_s:zero:true:false4_0(0) <=> zero gen_s:zero:true:false4_0(+(x, 1)) <=> s(gen_s:zero:true:false4_0(x)) The following defined symbols remain to be analysed: sum ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: sum(gen_nil:cons3_0(+(1, n7328_0))) -> gen_nil:cons3_0(1), rt in Omega(1 + n7328_0) Induction Base: sum(gen_nil:cons3_0(+(1, 0))) ->_R^Omega(1) cons(zero, nil) Induction Step: sum(gen_nil:cons3_0(+(1, +(n7328_0, 1)))) ->_R^Omega(1) sum(cons(plus(zero, zero), gen_nil:cons3_0(n7328_0))) ->_R^Omega(1) sum(cons(zero, gen_nil:cons3_0(n7328_0))) ->_IH gen_nil:cons3_0(1) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (22) BOUNDS(1, INF)