YES(O(1),O(n^1)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict Trs: { getFuncName(Fun(n, e)) -> n , run(Cons(Fun(f0, e), xs), input) -> run[Let][Let](Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))) , getIfFalse(ITE(i, t, e)) -> e , lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookvar(x', Cons(x, xs), vs) -> lookvar[Ite](!EQ(x', x), x', Cons(x, xs), vs) , lookname(f, Cons(Fun(n, e), xs)) -> lookname[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , getConst(Cst(int)) -> int , getFuncExp(Fun(n, e)) -> e , eqExp(Fun(fn1, fe1), Fun(fn2, fe2)) -> and(!EQ(fn1, fn2), eqExp(fe1, fe2)) , eqExp(Fun(fn1, fe1), Var(v2)) -> False() , eqExp(Fun(fn1, fe1), ITE(i2, t2, e2)) -> False() , eqExp(Fun(fn1, fe1), Eq(eq21, eq22)) -> False() , eqExp(Fun(fn1, fe1), Error(e21, e22)) -> False() , eqExp(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> False() , eqExp(Fun(fn1, fe1), T()) -> False() , eqExp(Fun(fn1, fe1), F()) -> False() , eqExp(Var(v1), Fun(fn2, fe2)) -> False() , eqExp(Var(v1), Var(v2)) -> !EQ(v1, v2) , eqExp(Var(v1), ITE(i2, t2, e2)) -> False() , eqExp(Var(v1), Eq(eq21, eq22)) -> False() , eqExp(Var(v1), Error(e21, e22)) -> False() , eqExp(Var(v1), Bsf(op2, b21, b22)) -> False() , eqExp(Var(v1), T()) -> False() , eqExp(Var(v1), F()) -> False() , eqExp(ITE(i1, t1, e1), Fun(fn2, fe2)) -> False() , eqExp(ITE(i1, t1, e1), Var(v2)) -> False() , eqExp(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> and(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))) , eqExp(ITE(i1, t1, e1), Eq(eq21, eq22)) -> False() , eqExp(ITE(i1, t1, e1), Error(e21, e22)) -> False() , eqExp(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> False() , eqExp(ITE(i1, t1, e1), T()) -> False() , eqExp(ITE(i1, t1, e1), F()) -> False() , eqExp(Eq(eq11, eq12), Fun(fn2, fe2)) -> False() , eqExp(Eq(eq11, eq12), Var(v2)) -> False() , eqExp(Eq(eq11, eq12), ITE(i2, t2, e2)) -> False() , eqExp(Eq(eq11, eq12), Eq(eq21, eq22)) -> and(eqExp(eq11, eq21), eqExp(eq12, eq22)) , eqExp(Eq(eq11, eq12), Error(e21, e22)) -> False() , eqExp(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> False() , eqExp(Eq(eq11, eq12), T()) -> False() , eqExp(Eq(eq11, eq12), F()) -> False() , eqExp(Error(e11, e12), Fun(fn2, fe2)) -> False() , eqExp(Error(e11, e12), Var(v2)) -> False() , eqExp(Error(e11, e12), ITE(i2, t2, e2)) -> False() , eqExp(Error(e11, e12), Eq(eq21, eq22)) -> False() , eqExp(Error(e11, e12), Error(e21, e22)) -> and(eqExp(e11, e21), eqExp(e12, e22)) , eqExp(Error(e11, e12), Bsf(op2, b21, b22)) -> False() , eqExp(Error(e11, e12), T()) -> False() , eqExp(Error(e11, e12), F()) -> False() , eqExp(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> False() , eqExp(Bsf(op1, b11, b12), Var(v2)) -> False() , eqExp(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> False() , eqExp(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> False() , eqExp(Bsf(op1, b11, b12), Error(e21, e22)) -> False() , eqExp(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> and(True(), and(eqExp(b11, b21), eqExp(b12, b22))) , eqExp(Bsf(op1, b11, b12), T()) -> False() , eqExp(Bsf(op1, b11, b12), F()) -> False() , eqExp(T(), Fun(fn2, fe2)) -> False() , eqExp(T(), Var(v2)) -> False() , eqExp(T(), ITE(i2, t2, e2)) -> False() , eqExp(T(), Eq(eq21, eq22)) -> False() , eqExp(T(), Error(e21, e22)) -> False() , eqExp(T(), Bsf(op2, b21, b22)) -> False() , eqExp(T(), T()) -> True() , eqExp(T(), F()) -> False() , eqExp(F(), Fun(fn2, fe2)) -> False() , eqExp(F(), Var(v2)) -> False() , eqExp(F(), ITE(i2, t2, e2)) -> False() , eqExp(F(), Eq(eq21, eq22)) -> False() , eqExp(F(), Error(e21, e22)) -> False() , eqExp(F(), Bsf(op2, b21, b22)) -> False() , eqExp(F(), T()) -> False() , eqExp(F(), F()) -> True() , apply(op, v1, v2) -> apply[Ite][True][Ite](eqExp(v1, v2), op, v1, v2) , getVar(Var(int)) -> int , getBsfSecondTerm(Bsf(op, t1, t2)) -> t2 , eeval(Fun(fn1, fe1), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Fun(fn1, fe1), ns, vs, p) , eeval(Var(int), ns, vs, p) -> lookvar(int, ns, vs) , eeval(ITE(i1, t1, e1), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), ITE(i1, t1, e1), ns, vs, p) , eeval(Eq(eq11, eq12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Eq(eq11, eq12), ns, vs, p) , eeval(Error(e11, e12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Error(e11, e12), ns, vs, p) , eeval(Bsf(op1, b11, b12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](True(), Bsf(op1, b11, b12), ns, vs, p) , eeval(T(), ns, vs, p) -> T() , eeval(F(), ns, vs, p) -> F() , checkConstrExp(Fun(fn1, fe1), Fun(fn2, fe2)) -> True() , checkConstrExp(Fun(fn1, fe1), Var(v2)) -> False() , checkConstrExp(Fun(fn1, fe1), ITE(i2, t2, e2)) -> False() , checkConstrExp(Fun(fn1, fe1), Eq(eq21, eq22)) -> False() , checkConstrExp(Fun(fn1, fe1), Error(e21, e22)) -> False() , checkConstrExp(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Fun(fn1, fe1), T()) -> False() , checkConstrExp(Fun(fn1, fe1), F()) -> False() , checkConstrExp(Var(v1), Fun(fn2, fe2)) -> False() , checkConstrExp(Var(v1), Var(v2)) -> True() , checkConstrExp(Var(v1), ITE(i2, t2, e2)) -> False() , checkConstrExp(Var(v1), Eq(eq21, eq22)) -> False() , checkConstrExp(Var(v1), Error(e21, e22)) -> False() , checkConstrExp(Var(v1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Var(v1), T()) -> False() , checkConstrExp(Var(v1), F()) -> False() , checkConstrExp(ITE(i1, t1, e1), Fun(fn2, fe2)) -> False() , checkConstrExp(ITE(i1, t1, e1), Var(v2)) -> False() , checkConstrExp(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> True() , checkConstrExp(ITE(i1, t1, e1), Eq(eq21, eq22)) -> False() , checkConstrExp(ITE(i1, t1, e1), Error(e21, e22)) -> False() , checkConstrExp(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(ITE(i1, t1, e1), T()) -> False() , checkConstrExp(ITE(i1, t1, e1), F()) -> False() , checkConstrExp(Eq(eq11, eq12), Fun(fn2, fe2)) -> False() , checkConstrExp(Eq(eq11, eq12), Var(v2)) -> False() , checkConstrExp(Eq(eq11, eq12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Eq(eq11, eq12), Eq(eq21, eq22)) -> True() , checkConstrExp(Eq(eq11, eq12), Error(e21, e22)) -> False() , checkConstrExp(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Eq(eq11, eq12), T()) -> False() , checkConstrExp(Eq(eq11, eq12), F()) -> False() , checkConstrExp(Error(e11, e12), Fun(fn2, fe2)) -> False() , checkConstrExp(Error(e11, e12), Var(v2)) -> False() , checkConstrExp(Error(e11, e12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Error(e11, e12), Eq(eq21, eq22)) -> False() , checkConstrExp(Error(e11, e12), Error(e21, e22)) -> True() , checkConstrExp(Error(e11, e12), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Error(e11, e12), T()) -> False() , checkConstrExp(Error(e11, e12), F()) -> False() , checkConstrExp(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Var(v2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Error(e21, e22)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Bsf(op2, b21, b22)) -> True() , checkConstrExp(Bsf(op1, b11, b12), T()) -> False() , checkConstrExp(Bsf(op1, b11, b12), F()) -> False() , checkConstrExp(T(), Fun(fn2, fe2)) -> False() , checkConstrExp(T(), Var(v2)) -> False() , checkConstrExp(T(), ITE(i2, t2, e2)) -> False() , checkConstrExp(T(), Eq(eq21, eq22)) -> False() , checkConstrExp(T(), Error(e21, e22)) -> False() , checkConstrExp(T(), Bsf(op2, b21, b22)) -> False() , checkConstrExp(T(), T()) -> True() , checkConstrExp(T(), F()) -> False() , checkConstrExp(F(), Fun(fn2, fe2)) -> False() , checkConstrExp(F(), Var(v2)) -> False() , checkConstrExp(F(), ITE(i2, t2, e2)) -> False() , checkConstrExp(F(), Eq(eq21, eq22)) -> False() , checkConstrExp(F(), Error(e21, e22)) -> False() , checkConstrExp(F(), Bsf(op2, b21, b22)) -> False() , checkConstrExp(F(), T()) -> False() , checkConstrExp(F(), F()) -> True() , getIfTrue(ITE(i, t, e)) -> t , getEqSecond(Eq(f, s)) -> s , getEqFirst(Eq(f, s)) -> f , getBsfOp(Bsf(op, t1, t2)) -> op , getBsfFirstTerm(Bsf(op, t1, t2)) -> t1 , getIfGuard(ITE(i, t, e)) -> i , eqOps(o1, o2) -> True() } Weak Trs: { lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , lookvar[Ite](True(), x', ns, Cons(x, xs)) -> x , lookvar[Ite](False(), x', Cons(x', xs'), Cons(x, xs)) -> lookvar(x', xs', xs) , apply[Ite][True][Ite](True(), op, v1, v2) -> T() , apply[Ite][True][Ite](False(), op, v1, v2) -> F() , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() , and(True(), True()) -> True() , and(True(), False()) -> False() , and(False(), True()) -> False() , and(False(), False()) -> False() , run[Let][Let](p, input, f0, ef) -> run[Let][Let][Let](p, input, f0, ef, lookname(f0, p)) , lookname[Ite](True(), f, Cons(Fun(n, e), xs)) -> n , lookname[Ite](False(), f, Cons(x, xs)) -> lookname(f, xs) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We add the following dependency tuples: Strict DPs: { getFuncName^#(Fun(n, e)) -> c_1() , run^#(Cons(Fun(f0, e), xs), input) -> c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_4(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , getIfFalse^#(ITE(i, t, e)) -> c_3() , lookvar^#(x', Cons(x, xs), vs) -> c_5(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs), !EQ^#(x', x)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_6(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , getConst^#(Cst(int)) -> c_7() , getFuncExp^#(Fun(n, e)) -> c_8() , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_9(and^#(!EQ(fn1, fn2), eqExp(fe1, fe2)), !EQ^#(fn1, fn2), eqExp^#(fe1, fe2)) , eqExp^#(Fun(fn1, fe1), Var(v2)) -> c_10() , eqExp^#(Fun(fn1, fe1), ITE(i2, t2, e2)) -> c_11() , eqExp^#(Fun(fn1, fe1), Eq(eq21, eq22)) -> c_12() , eqExp^#(Fun(fn1, fe1), Error(e21, e22)) -> c_13() , eqExp^#(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> c_14() , eqExp^#(Fun(fn1, fe1), T()) -> c_15() , eqExp^#(Fun(fn1, fe1), F()) -> c_16() , eqExp^#(Var(v1), Fun(fn2, fe2)) -> c_17() , eqExp^#(Var(v1), Var(v2)) -> c_18(!EQ^#(v1, v2)) , eqExp^#(Var(v1), ITE(i2, t2, e2)) -> c_19() , eqExp^#(Var(v1), Eq(eq21, eq22)) -> c_20() , eqExp^#(Var(v1), Error(e21, e22)) -> c_21() , eqExp^#(Var(v1), Bsf(op2, b21, b22)) -> c_22() , eqExp^#(Var(v1), T()) -> c_23() , eqExp^#(Var(v1), F()) -> c_24() , eqExp^#(ITE(i1, t1, e1), Fun(fn2, fe2)) -> c_25() , eqExp^#(ITE(i1, t1, e1), Var(v2)) -> c_26() , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_27(and^#(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))), eqExp^#(i1, i2), and^#(eqExp(t1, t2), eqExp(e1, e2)), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(ITE(i1, t1, e1), Eq(eq21, eq22)) -> c_28() , eqExp^#(ITE(i1, t1, e1), Error(e21, e22)) -> c_29() , eqExp^#(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> c_30() , eqExp^#(ITE(i1, t1, e1), T()) -> c_31() , eqExp^#(ITE(i1, t1, e1), F()) -> c_32() , eqExp^#(Eq(eq11, eq12), Fun(fn2, fe2)) -> c_33() , eqExp^#(Eq(eq11, eq12), Var(v2)) -> c_34() , eqExp^#(Eq(eq11, eq12), ITE(i2, t2, e2)) -> c_35() , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_36(and^#(eqExp(eq11, eq21), eqExp(eq12, eq22)), eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Eq(eq11, eq12), Error(e21, e22)) -> c_37() , eqExp^#(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> c_38() , eqExp^#(Eq(eq11, eq12), T()) -> c_39() , eqExp^#(Eq(eq11, eq12), F()) -> c_40() , eqExp^#(Error(e11, e12), Fun(fn2, fe2)) -> c_41() , eqExp^#(Error(e11, e12), Var(v2)) -> c_42() , eqExp^#(Error(e11, e12), ITE(i2, t2, e2)) -> c_43() , eqExp^#(Error(e11, e12), Eq(eq21, eq22)) -> c_44() , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_45(and^#(eqExp(e11, e21), eqExp(e12, e22)), eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Error(e11, e12), Bsf(op2, b21, b22)) -> c_46() , eqExp^#(Error(e11, e12), T()) -> c_47() , eqExp^#(Error(e11, e12), F()) -> c_48() , eqExp^#(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> c_49() , eqExp^#(Bsf(op1, b11, b12), Var(v2)) -> c_50() , eqExp^#(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> c_51() , eqExp^#(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> c_52() , eqExp^#(Bsf(op1, b11, b12), Error(e21, e22)) -> c_53() , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_54(and^#(True(), and(eqExp(b11, b21), eqExp(b12, b22))), and^#(eqExp(b11, b21), eqExp(b12, b22)), eqExp^#(b11, b21), eqExp^#(b12, b22)) , eqExp^#(Bsf(op1, b11, b12), T()) -> c_55() , eqExp^#(Bsf(op1, b11, b12), F()) -> c_56() , eqExp^#(T(), Fun(fn2, fe2)) -> c_57() , eqExp^#(T(), Var(v2)) -> c_58() , eqExp^#(T(), ITE(i2, t2, e2)) -> c_59() , eqExp^#(T(), Eq(eq21, eq22)) -> c_60() , eqExp^#(T(), Error(e21, e22)) -> c_61() , eqExp^#(T(), Bsf(op2, b21, b22)) -> c_62() , eqExp^#(T(), T()) -> c_63() , eqExp^#(T(), F()) -> c_64() , eqExp^#(F(), Fun(fn2, fe2)) -> c_65() , eqExp^#(F(), Var(v2)) -> c_66() , eqExp^#(F(), ITE(i2, t2, e2)) -> c_67() , eqExp^#(F(), Eq(eq21, eq22)) -> c_68() , eqExp^#(F(), Error(e21, e22)) -> c_69() , eqExp^#(F(), Bsf(op2, b21, b22)) -> c_70() , eqExp^#(F(), T()) -> c_71() , eqExp^#(F(), F()) -> c_72() , apply^#(op, v1, v2) -> c_73(apply[Ite][True][Ite]^#(eqExp(v1, v2), op, v1, v2), eqExp^#(v1, v2)) , getVar^#(Var(int)) -> c_74() , getBsfSecondTerm^#(Bsf(op, t1, t2)) -> c_75() , eeval^#(Fun(fn1, fe1), ns, vs, p) -> c_76() , eeval^#(Var(int), ns, vs, p) -> c_77(lookvar^#(int, ns, vs)) , eeval^#(ITE(i1, t1, e1), ns, vs, p) -> c_78() , eeval^#(Eq(eq11, eq12), ns, vs, p) -> c_79() , eeval^#(Error(e11, e12), ns, vs, p) -> c_80() , eeval^#(Bsf(op1, b11, b12), ns, vs, p) -> c_81() , eeval^#(T(), ns, vs, p) -> c_82() , eeval^#(F(), ns, vs, p) -> c_83() , checkConstrExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_84() , checkConstrExp^#(Fun(fn1, fe1), Var(v2)) -> c_85() , checkConstrExp^#(Fun(fn1, fe1), ITE(i2, t2, e2)) -> c_86() , checkConstrExp^#(Fun(fn1, fe1), Eq(eq21, eq22)) -> c_87() , checkConstrExp^#(Fun(fn1, fe1), Error(e21, e22)) -> c_88() , checkConstrExp^#(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> c_89() , checkConstrExp^#(Fun(fn1, fe1), T()) -> c_90() , checkConstrExp^#(Fun(fn1, fe1), F()) -> c_91() , checkConstrExp^#(Var(v1), Fun(fn2, fe2)) -> c_92() , checkConstrExp^#(Var(v1), Var(v2)) -> c_93() , checkConstrExp^#(Var(v1), ITE(i2, t2, e2)) -> c_94() , checkConstrExp^#(Var(v1), Eq(eq21, eq22)) -> c_95() , checkConstrExp^#(Var(v1), Error(e21, e22)) -> c_96() , checkConstrExp^#(Var(v1), Bsf(op2, b21, b22)) -> c_97() , checkConstrExp^#(Var(v1), T()) -> c_98() , checkConstrExp^#(Var(v1), F()) -> c_99() , checkConstrExp^#(ITE(i1, t1, e1), Fun(fn2, fe2)) -> c_100() , checkConstrExp^#(ITE(i1, t1, e1), Var(v2)) -> c_101() , checkConstrExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_102() , checkConstrExp^#(ITE(i1, t1, e1), Eq(eq21, eq22)) -> c_103() , checkConstrExp^#(ITE(i1, t1, e1), Error(e21, e22)) -> c_104() , checkConstrExp^#(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> c_105() , checkConstrExp^#(ITE(i1, t1, e1), T()) -> c_106() , checkConstrExp^#(ITE(i1, t1, e1), F()) -> c_107() , checkConstrExp^#(Eq(eq11, eq12), Fun(fn2, fe2)) -> c_108() , checkConstrExp^#(Eq(eq11, eq12), Var(v2)) -> c_109() , checkConstrExp^#(Eq(eq11, eq12), ITE(i2, t2, e2)) -> c_110() , checkConstrExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_111() , checkConstrExp^#(Eq(eq11, eq12), Error(e21, e22)) -> c_112() , checkConstrExp^#(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> c_113() , checkConstrExp^#(Eq(eq11, eq12), T()) -> c_114() , checkConstrExp^#(Eq(eq11, eq12), F()) -> c_115() , checkConstrExp^#(Error(e11, e12), Fun(fn2, fe2)) -> c_116() , checkConstrExp^#(Error(e11, e12), Var(v2)) -> c_117() , checkConstrExp^#(Error(e11, e12), ITE(i2, t2, e2)) -> c_118() , checkConstrExp^#(Error(e11, e12), Eq(eq21, eq22)) -> c_119() , checkConstrExp^#(Error(e11, e12), Error(e21, e22)) -> c_120() , checkConstrExp^#(Error(e11, e12), Bsf(op2, b21, b22)) -> c_121() , checkConstrExp^#(Error(e11, e12), T()) -> c_122() , checkConstrExp^#(Error(e11, e12), F()) -> c_123() , checkConstrExp^#(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> c_124() , checkConstrExp^#(Bsf(op1, b11, b12), Var(v2)) -> c_125() , checkConstrExp^#(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> c_126() , checkConstrExp^#(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> c_127() , checkConstrExp^#(Bsf(op1, b11, b12), Error(e21, e22)) -> c_128() , checkConstrExp^#(Bsf(op1, b11, b12), Bsf(op2, b21, b22)) -> c_129() , checkConstrExp^#(Bsf(op1, b11, b12), T()) -> c_130() , checkConstrExp^#(Bsf(op1, b11, b12), F()) -> c_131() , checkConstrExp^#(T(), Fun(fn2, fe2)) -> c_132() , checkConstrExp^#(T(), Var(v2)) -> c_133() , checkConstrExp^#(T(), ITE(i2, t2, e2)) -> c_134() , checkConstrExp^#(T(), Eq(eq21, eq22)) -> c_135() , checkConstrExp^#(T(), Error(e21, e22)) -> c_136() , checkConstrExp^#(T(), Bsf(op2, b21, b22)) -> c_137() , checkConstrExp^#(T(), T()) -> c_138() , checkConstrExp^#(T(), F()) -> c_139() , checkConstrExp^#(F(), Fun(fn2, fe2)) -> c_140() , checkConstrExp^#(F(), Var(v2)) -> c_141() , checkConstrExp^#(F(), ITE(i2, t2, e2)) -> c_142() , checkConstrExp^#(F(), Eq(eq21, eq22)) -> c_143() , checkConstrExp^#(F(), Error(e21, e22)) -> c_144() , checkConstrExp^#(F(), Bsf(op2, b21, b22)) -> c_145() , checkConstrExp^#(F(), T()) -> c_146() , checkConstrExp^#(F(), F()) -> c_147() , getIfTrue^#(ITE(i, t, e)) -> c_148() , getEqSecond^#(Eq(f, s)) -> c_149() , getEqFirst^#(Eq(f, s)) -> c_150() , getBsfOp^#(Bsf(op, t1, t2)) -> c_151() , getBsfFirstTerm^#(Bsf(op, t1, t2)) -> c_152() , getIfGuard^#(ITE(i, t, e)) -> c_153() , eqOps^#(o1, o2) -> c_154() } Weak DPs: { run[Let][Let]^#(p, input, f0, ef) -> c_169(lookname^#(f0, p)) , lookbody[Ite]^#(True(), f, Cons(Fun(n, e), xs)) -> c_155() , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_156(lookbody^#(f, xs)) , !EQ^#(S(x), S(y)) -> c_161(!EQ^#(x, y)) , !EQ^#(S(x), 0()) -> c_162() , !EQ^#(0(), S(y)) -> c_163() , !EQ^#(0(), 0()) -> c_164() , lookvar[Ite]^#(True(), x', ns, Cons(x, xs)) -> c_157() , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_158(lookvar^#(x', xs', xs)) , lookname[Ite]^#(True(), f, Cons(Fun(n, e), xs)) -> c_170() , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_171(lookname^#(f, xs)) , and^#(True(), True()) -> c_165() , and^#(True(), False()) -> c_166() , and^#(False(), True()) -> c_167() , and^#(False(), False()) -> c_168() , apply[Ite][True][Ite]^#(True(), op, v1, v2) -> c_159() , apply[Ite][True][Ite]^#(False(), op, v1, v2) -> c_160() } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { getFuncName^#(Fun(n, e)) -> c_1() , run^#(Cons(Fun(f0, e), xs), input) -> c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_4(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , getIfFalse^#(ITE(i, t, e)) -> c_3() , lookvar^#(x', Cons(x, xs), vs) -> c_5(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs), !EQ^#(x', x)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_6(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , getConst^#(Cst(int)) -> c_7() , getFuncExp^#(Fun(n, e)) -> c_8() , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_9(and^#(!EQ(fn1, fn2), eqExp(fe1, fe2)), !EQ^#(fn1, fn2), eqExp^#(fe1, fe2)) , eqExp^#(Fun(fn1, fe1), Var(v2)) -> c_10() , eqExp^#(Fun(fn1, fe1), ITE(i2, t2, e2)) -> c_11() , eqExp^#(Fun(fn1, fe1), Eq(eq21, eq22)) -> c_12() , eqExp^#(Fun(fn1, fe1), Error(e21, e22)) -> c_13() , eqExp^#(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> c_14() , eqExp^#(Fun(fn1, fe1), T()) -> c_15() , eqExp^#(Fun(fn1, fe1), F()) -> c_16() , eqExp^#(Var(v1), Fun(fn2, fe2)) -> c_17() , eqExp^#(Var(v1), Var(v2)) -> c_18(!EQ^#(v1, v2)) , eqExp^#(Var(v1), ITE(i2, t2, e2)) -> c_19() , eqExp^#(Var(v1), Eq(eq21, eq22)) -> c_20() , eqExp^#(Var(v1), Error(e21, e22)) -> c_21() , eqExp^#(Var(v1), Bsf(op2, b21, b22)) -> c_22() , eqExp^#(Var(v1), T()) -> c_23() , eqExp^#(Var(v1), F()) -> c_24() , eqExp^#(ITE(i1, t1, e1), Fun(fn2, fe2)) -> c_25() , eqExp^#(ITE(i1, t1, e1), Var(v2)) -> c_26() , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_27(and^#(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))), eqExp^#(i1, i2), and^#(eqExp(t1, t2), eqExp(e1, e2)), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(ITE(i1, t1, e1), Eq(eq21, eq22)) -> c_28() , eqExp^#(ITE(i1, t1, e1), Error(e21, e22)) -> c_29() , eqExp^#(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> c_30() , eqExp^#(ITE(i1, t1, e1), T()) -> c_31() , eqExp^#(ITE(i1, t1, e1), F()) -> c_32() , eqExp^#(Eq(eq11, eq12), Fun(fn2, fe2)) -> c_33() , eqExp^#(Eq(eq11, eq12), Var(v2)) -> c_34() , eqExp^#(Eq(eq11, eq12), ITE(i2, t2, e2)) -> c_35() , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_36(and^#(eqExp(eq11, eq21), eqExp(eq12, eq22)), eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Eq(eq11, eq12), Error(e21, e22)) -> c_37() , eqExp^#(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> c_38() , eqExp^#(Eq(eq11, eq12), T()) -> c_39() , eqExp^#(Eq(eq11, eq12), F()) -> c_40() , eqExp^#(Error(e11, e12), Fun(fn2, fe2)) -> c_41() , eqExp^#(Error(e11, e12), Var(v2)) -> c_42() , eqExp^#(Error(e11, e12), ITE(i2, t2, e2)) -> c_43() , eqExp^#(Error(e11, e12), Eq(eq21, eq22)) -> c_44() , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_45(and^#(eqExp(e11, e21), eqExp(e12, e22)), eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Error(e11, e12), Bsf(op2, b21, b22)) -> c_46() , eqExp^#(Error(e11, e12), T()) -> c_47() , eqExp^#(Error(e11, e12), F()) -> c_48() , eqExp^#(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> c_49() , eqExp^#(Bsf(op1, b11, b12), Var(v2)) -> c_50() , eqExp^#(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> c_51() , eqExp^#(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> c_52() , eqExp^#(Bsf(op1, b11, b12), Error(e21, e22)) -> c_53() , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_54(and^#(True(), and(eqExp(b11, b21), eqExp(b12, b22))), and^#(eqExp(b11, b21), eqExp(b12, b22)), eqExp^#(b11, b21), eqExp^#(b12, b22)) , eqExp^#(Bsf(op1, b11, b12), T()) -> c_55() , eqExp^#(Bsf(op1, b11, b12), F()) -> c_56() , eqExp^#(T(), Fun(fn2, fe2)) -> c_57() , eqExp^#(T(), Var(v2)) -> c_58() , eqExp^#(T(), ITE(i2, t2, e2)) -> c_59() , eqExp^#(T(), Eq(eq21, eq22)) -> c_60() , eqExp^#(T(), Error(e21, e22)) -> c_61() , eqExp^#(T(), Bsf(op2, b21, b22)) -> c_62() , eqExp^#(T(), T()) -> c_63() , eqExp^#(T(), F()) -> c_64() , eqExp^#(F(), Fun(fn2, fe2)) -> c_65() , eqExp^#(F(), Var(v2)) -> c_66() , eqExp^#(F(), ITE(i2, t2, e2)) -> c_67() , eqExp^#(F(), Eq(eq21, eq22)) -> c_68() , eqExp^#(F(), Error(e21, e22)) -> c_69() , eqExp^#(F(), Bsf(op2, b21, b22)) -> c_70() , eqExp^#(F(), T()) -> c_71() , eqExp^#(F(), F()) -> c_72() , apply^#(op, v1, v2) -> c_73(apply[Ite][True][Ite]^#(eqExp(v1, v2), op, v1, v2), eqExp^#(v1, v2)) , getVar^#(Var(int)) -> c_74() , getBsfSecondTerm^#(Bsf(op, t1, t2)) -> c_75() , eeval^#(Fun(fn1, fe1), ns, vs, p) -> c_76() , eeval^#(Var(int), ns, vs, p) -> c_77(lookvar^#(int, ns, vs)) , eeval^#(ITE(i1, t1, e1), ns, vs, p) -> c_78() , eeval^#(Eq(eq11, eq12), ns, vs, p) -> c_79() , eeval^#(Error(e11, e12), ns, vs, p) -> c_80() , eeval^#(Bsf(op1, b11, b12), ns, vs, p) -> c_81() , eeval^#(T(), ns, vs, p) -> c_82() , eeval^#(F(), ns, vs, p) -> c_83() , checkConstrExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_84() , checkConstrExp^#(Fun(fn1, fe1), Var(v2)) -> c_85() , checkConstrExp^#(Fun(fn1, fe1), ITE(i2, t2, e2)) -> c_86() , checkConstrExp^#(Fun(fn1, fe1), Eq(eq21, eq22)) -> c_87() , checkConstrExp^#(Fun(fn1, fe1), Error(e21, e22)) -> c_88() , checkConstrExp^#(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> c_89() , checkConstrExp^#(Fun(fn1, fe1), T()) -> c_90() , checkConstrExp^#(Fun(fn1, fe1), F()) -> c_91() , checkConstrExp^#(Var(v1), Fun(fn2, fe2)) -> c_92() , checkConstrExp^#(Var(v1), Var(v2)) -> c_93() , checkConstrExp^#(Var(v1), ITE(i2, t2, e2)) -> c_94() , checkConstrExp^#(Var(v1), Eq(eq21, eq22)) -> c_95() , checkConstrExp^#(Var(v1), Error(e21, e22)) -> c_96() , checkConstrExp^#(Var(v1), Bsf(op2, b21, b22)) -> c_97() , checkConstrExp^#(Var(v1), T()) -> c_98() , checkConstrExp^#(Var(v1), F()) -> c_99() , checkConstrExp^#(ITE(i1, t1, e1), Fun(fn2, fe2)) -> c_100() , checkConstrExp^#(ITE(i1, t1, e1), Var(v2)) -> c_101() , checkConstrExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_102() , checkConstrExp^#(ITE(i1, t1, e1), Eq(eq21, eq22)) -> c_103() , checkConstrExp^#(ITE(i1, t1, e1), Error(e21, e22)) -> c_104() , checkConstrExp^#(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> c_105() , checkConstrExp^#(ITE(i1, t1, e1), T()) -> c_106() , checkConstrExp^#(ITE(i1, t1, e1), F()) -> c_107() , checkConstrExp^#(Eq(eq11, eq12), Fun(fn2, fe2)) -> c_108() , checkConstrExp^#(Eq(eq11, eq12), Var(v2)) -> c_109() , checkConstrExp^#(Eq(eq11, eq12), ITE(i2, t2, e2)) -> c_110() , checkConstrExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_111() , checkConstrExp^#(Eq(eq11, eq12), Error(e21, e22)) -> c_112() , checkConstrExp^#(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> c_113() , checkConstrExp^#(Eq(eq11, eq12), T()) -> c_114() , checkConstrExp^#(Eq(eq11, eq12), F()) -> c_115() , checkConstrExp^#(Error(e11, e12), Fun(fn2, fe2)) -> c_116() , checkConstrExp^#(Error(e11, e12), Var(v2)) -> c_117() , checkConstrExp^#(Error(e11, e12), ITE(i2, t2, e2)) -> c_118() , checkConstrExp^#(Error(e11, e12), Eq(eq21, eq22)) -> c_119() , checkConstrExp^#(Error(e11, e12), Error(e21, e22)) -> c_120() , checkConstrExp^#(Error(e11, e12), Bsf(op2, b21, b22)) -> c_121() , checkConstrExp^#(Error(e11, e12), T()) -> c_122() , checkConstrExp^#(Error(e11, e12), F()) -> c_123() , checkConstrExp^#(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> c_124() , checkConstrExp^#(Bsf(op1, b11, b12), Var(v2)) -> c_125() , checkConstrExp^#(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> c_126() , checkConstrExp^#(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> c_127() , checkConstrExp^#(Bsf(op1, b11, b12), Error(e21, e22)) -> c_128() , checkConstrExp^#(Bsf(op1, b11, b12), Bsf(op2, b21, b22)) -> c_129() , checkConstrExp^#(Bsf(op1, b11, b12), T()) -> c_130() , checkConstrExp^#(Bsf(op1, b11, b12), F()) -> c_131() , checkConstrExp^#(T(), Fun(fn2, fe2)) -> c_132() , checkConstrExp^#(T(), Var(v2)) -> c_133() , checkConstrExp^#(T(), ITE(i2, t2, e2)) -> c_134() , checkConstrExp^#(T(), Eq(eq21, eq22)) -> c_135() , checkConstrExp^#(T(), Error(e21, e22)) -> c_136() , checkConstrExp^#(T(), Bsf(op2, b21, b22)) -> c_137() , checkConstrExp^#(T(), T()) -> c_138() , checkConstrExp^#(T(), F()) -> c_139() , checkConstrExp^#(F(), Fun(fn2, fe2)) -> c_140() , checkConstrExp^#(F(), Var(v2)) -> c_141() , checkConstrExp^#(F(), ITE(i2, t2, e2)) -> c_142() , checkConstrExp^#(F(), Eq(eq21, eq22)) -> c_143() , checkConstrExp^#(F(), Error(e21, e22)) -> c_144() , checkConstrExp^#(F(), Bsf(op2, b21, b22)) -> c_145() , checkConstrExp^#(F(), T()) -> c_146() , checkConstrExp^#(F(), F()) -> c_147() , getIfTrue^#(ITE(i, t, e)) -> c_148() , getEqSecond^#(Eq(f, s)) -> c_149() , getEqFirst^#(Eq(f, s)) -> c_150() , getBsfOp^#(Bsf(op, t1, t2)) -> c_151() , getBsfFirstTerm^#(Bsf(op, t1, t2)) -> c_152() , getIfGuard^#(ITE(i, t, e)) -> c_153() , eqOps^#(o1, o2) -> c_154() } Weak DPs: { run[Let][Let]^#(p, input, f0, ef) -> c_169(lookname^#(f0, p)) , lookbody[Ite]^#(True(), f, Cons(Fun(n, e), xs)) -> c_155() , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_156(lookbody^#(f, xs)) , !EQ^#(S(x), S(y)) -> c_161(!EQ^#(x, y)) , !EQ^#(S(x), 0()) -> c_162() , !EQ^#(0(), S(y)) -> c_163() , !EQ^#(0(), 0()) -> c_164() , lookvar[Ite]^#(True(), x', ns, Cons(x, xs)) -> c_157() , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_158(lookvar^#(x', xs', xs)) , lookname[Ite]^#(True(), f, Cons(Fun(n, e), xs)) -> c_170() , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_171(lookname^#(f, xs)) , and^#(True(), True()) -> c_165() , and^#(True(), False()) -> c_166() , and^#(False(), True()) -> c_167() , and^#(False(), False()) -> c_168() , apply[Ite][True][Ite]^#(True(), op, v1, v2) -> c_159() , apply[Ite][True][Ite]^#(False(), op, v1, v2) -> c_160() } Weak Trs: { getFuncName(Fun(n, e)) -> n , run(Cons(Fun(f0, e), xs), input) -> run[Let][Let](Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))) , getIfFalse(ITE(i, t, e)) -> e , lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookvar(x', Cons(x, xs), vs) -> lookvar[Ite](!EQ(x', x), x', Cons(x, xs), vs) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , lookvar[Ite](True(), x', ns, Cons(x, xs)) -> x , lookvar[Ite](False(), x', Cons(x', xs'), Cons(x, xs)) -> lookvar(x', xs', xs) , lookname(f, Cons(Fun(n, e), xs)) -> lookname[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , apply[Ite][True][Ite](True(), op, v1, v2) -> T() , apply[Ite][True][Ite](False(), op, v1, v2) -> F() , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() , getConst(Cst(int)) -> int , getFuncExp(Fun(n, e)) -> e , eqExp(Fun(fn1, fe1), Fun(fn2, fe2)) -> and(!EQ(fn1, fn2), eqExp(fe1, fe2)) , eqExp(Fun(fn1, fe1), Var(v2)) -> False() , eqExp(Fun(fn1, fe1), ITE(i2, t2, e2)) -> False() , eqExp(Fun(fn1, fe1), Eq(eq21, eq22)) -> False() , eqExp(Fun(fn1, fe1), Error(e21, e22)) -> False() , eqExp(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> False() , eqExp(Fun(fn1, fe1), T()) -> False() , eqExp(Fun(fn1, fe1), F()) -> False() , eqExp(Var(v1), Fun(fn2, fe2)) -> False() , eqExp(Var(v1), Var(v2)) -> !EQ(v1, v2) , eqExp(Var(v1), ITE(i2, t2, e2)) -> False() , eqExp(Var(v1), Eq(eq21, eq22)) -> False() , eqExp(Var(v1), Error(e21, e22)) -> False() , eqExp(Var(v1), Bsf(op2, b21, b22)) -> False() , eqExp(Var(v1), T()) -> False() , eqExp(Var(v1), F()) -> False() , eqExp(ITE(i1, t1, e1), Fun(fn2, fe2)) -> False() , eqExp(ITE(i1, t1, e1), Var(v2)) -> False() , eqExp(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> and(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))) , eqExp(ITE(i1, t1, e1), Eq(eq21, eq22)) -> False() , eqExp(ITE(i1, t1, e1), Error(e21, e22)) -> False() , eqExp(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> False() , eqExp(ITE(i1, t1, e1), T()) -> False() , eqExp(ITE(i1, t1, e1), F()) -> False() , eqExp(Eq(eq11, eq12), Fun(fn2, fe2)) -> False() , eqExp(Eq(eq11, eq12), Var(v2)) -> False() , eqExp(Eq(eq11, eq12), ITE(i2, t2, e2)) -> False() , eqExp(Eq(eq11, eq12), Eq(eq21, eq22)) -> and(eqExp(eq11, eq21), eqExp(eq12, eq22)) , eqExp(Eq(eq11, eq12), Error(e21, e22)) -> False() , eqExp(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> False() , eqExp(Eq(eq11, eq12), T()) -> False() , eqExp(Eq(eq11, eq12), F()) -> False() , eqExp(Error(e11, e12), Fun(fn2, fe2)) -> False() , eqExp(Error(e11, e12), Var(v2)) -> False() , eqExp(Error(e11, e12), ITE(i2, t2, e2)) -> False() , eqExp(Error(e11, e12), Eq(eq21, eq22)) -> False() , eqExp(Error(e11, e12), Error(e21, e22)) -> and(eqExp(e11, e21), eqExp(e12, e22)) , eqExp(Error(e11, e12), Bsf(op2, b21, b22)) -> False() , eqExp(Error(e11, e12), T()) -> False() , eqExp(Error(e11, e12), F()) -> False() , eqExp(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> False() , eqExp(Bsf(op1, b11, b12), Var(v2)) -> False() , eqExp(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> False() , eqExp(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> False() , eqExp(Bsf(op1, b11, b12), Error(e21, e22)) -> False() , eqExp(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> and(True(), and(eqExp(b11, b21), eqExp(b12, b22))) , eqExp(Bsf(op1, b11, b12), T()) -> False() , eqExp(Bsf(op1, b11, b12), F()) -> False() , eqExp(T(), Fun(fn2, fe2)) -> False() , eqExp(T(), Var(v2)) -> False() , eqExp(T(), ITE(i2, t2, e2)) -> False() , eqExp(T(), Eq(eq21, eq22)) -> False() , eqExp(T(), Error(e21, e22)) -> False() , eqExp(T(), Bsf(op2, b21, b22)) -> False() , eqExp(T(), T()) -> True() , eqExp(T(), F()) -> False() , eqExp(F(), Fun(fn2, fe2)) -> False() , eqExp(F(), Var(v2)) -> False() , eqExp(F(), ITE(i2, t2, e2)) -> False() , eqExp(F(), Eq(eq21, eq22)) -> False() , eqExp(F(), Error(e21, e22)) -> False() , eqExp(F(), Bsf(op2, b21, b22)) -> False() , eqExp(F(), T()) -> False() , eqExp(F(), F()) -> True() , apply(op, v1, v2) -> apply[Ite][True][Ite](eqExp(v1, v2), op, v1, v2) , getVar(Var(int)) -> int , getBsfSecondTerm(Bsf(op, t1, t2)) -> t2 , eeval(Fun(fn1, fe1), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Fun(fn1, fe1), ns, vs, p) , eeval(Var(int), ns, vs, p) -> lookvar(int, ns, vs) , eeval(ITE(i1, t1, e1), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), ITE(i1, t1, e1), ns, vs, p) , eeval(Eq(eq11, eq12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Eq(eq11, eq12), ns, vs, p) , eeval(Error(e11, e12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Error(e11, e12), ns, vs, p) , eeval(Bsf(op1, b11, b12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](True(), Bsf(op1, b11, b12), ns, vs, p) , eeval(T(), ns, vs, p) -> T() , eeval(F(), ns, vs, p) -> F() , and(True(), True()) -> True() , and(True(), False()) -> False() , and(False(), True()) -> False() , and(False(), False()) -> False() , checkConstrExp(Fun(fn1, fe1), Fun(fn2, fe2)) -> True() , checkConstrExp(Fun(fn1, fe1), Var(v2)) -> False() , checkConstrExp(Fun(fn1, fe1), ITE(i2, t2, e2)) -> False() , checkConstrExp(Fun(fn1, fe1), Eq(eq21, eq22)) -> False() , checkConstrExp(Fun(fn1, fe1), Error(e21, e22)) -> False() , checkConstrExp(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Fun(fn1, fe1), T()) -> False() , checkConstrExp(Fun(fn1, fe1), F()) -> False() , checkConstrExp(Var(v1), Fun(fn2, fe2)) -> False() , checkConstrExp(Var(v1), Var(v2)) -> True() , checkConstrExp(Var(v1), ITE(i2, t2, e2)) -> False() , checkConstrExp(Var(v1), Eq(eq21, eq22)) -> False() , checkConstrExp(Var(v1), Error(e21, e22)) -> False() , checkConstrExp(Var(v1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Var(v1), T()) -> False() , checkConstrExp(Var(v1), F()) -> False() , checkConstrExp(ITE(i1, t1, e1), Fun(fn2, fe2)) -> False() , checkConstrExp(ITE(i1, t1, e1), Var(v2)) -> False() , checkConstrExp(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> True() , checkConstrExp(ITE(i1, t1, e1), Eq(eq21, eq22)) -> False() , checkConstrExp(ITE(i1, t1, e1), Error(e21, e22)) -> False() , checkConstrExp(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(ITE(i1, t1, e1), T()) -> False() , checkConstrExp(ITE(i1, t1, e1), F()) -> False() , checkConstrExp(Eq(eq11, eq12), Fun(fn2, fe2)) -> False() , checkConstrExp(Eq(eq11, eq12), Var(v2)) -> False() , checkConstrExp(Eq(eq11, eq12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Eq(eq11, eq12), Eq(eq21, eq22)) -> True() , checkConstrExp(Eq(eq11, eq12), Error(e21, e22)) -> False() , checkConstrExp(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Eq(eq11, eq12), T()) -> False() , checkConstrExp(Eq(eq11, eq12), F()) -> False() , checkConstrExp(Error(e11, e12), Fun(fn2, fe2)) -> False() , checkConstrExp(Error(e11, e12), Var(v2)) -> False() , checkConstrExp(Error(e11, e12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Error(e11, e12), Eq(eq21, eq22)) -> False() , checkConstrExp(Error(e11, e12), Error(e21, e22)) -> True() , checkConstrExp(Error(e11, e12), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Error(e11, e12), T()) -> False() , checkConstrExp(Error(e11, e12), F()) -> False() , checkConstrExp(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Var(v2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Error(e21, e22)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Bsf(op2, b21, b22)) -> True() , checkConstrExp(Bsf(op1, b11, b12), T()) -> False() , checkConstrExp(Bsf(op1, b11, b12), F()) -> False() , checkConstrExp(T(), Fun(fn2, fe2)) -> False() , checkConstrExp(T(), Var(v2)) -> False() , checkConstrExp(T(), ITE(i2, t2, e2)) -> False() , checkConstrExp(T(), Eq(eq21, eq22)) -> False() , checkConstrExp(T(), Error(e21, e22)) -> False() , checkConstrExp(T(), Bsf(op2, b21, b22)) -> False() , checkConstrExp(T(), T()) -> True() , checkConstrExp(T(), F()) -> False() , checkConstrExp(F(), Fun(fn2, fe2)) -> False() , checkConstrExp(F(), Var(v2)) -> False() , checkConstrExp(F(), ITE(i2, t2, e2)) -> False() , checkConstrExp(F(), Eq(eq21, eq22)) -> False() , checkConstrExp(F(), Error(e21, e22)) -> False() , checkConstrExp(F(), Bsf(op2, b21, b22)) -> False() , checkConstrExp(F(), T()) -> False() , checkConstrExp(F(), F()) -> True() , getIfTrue(ITE(i, t, e)) -> t , getEqSecond(Eq(f, s)) -> s , getEqFirst(Eq(f, s)) -> f , getBsfOp(Bsf(op, t1, t2)) -> op , getBsfFirstTerm(Bsf(op, t1, t2)) -> t1 , run[Let][Let](p, input, f0, ef) -> run[Let][Let][Let](p, input, f0, ef, lookname(f0, p)) , lookname[Ite](True(), f, Cons(Fun(n, e), xs)) -> n , lookname[Ite](False(), f, Cons(x, xs)) -> lookname(f, xs) , getIfGuard(ITE(i, t, e)) -> i , eqOps(o1, o2) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We estimate the number of application of {1,4,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,74,75,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154} by applications of Pre({1,4,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,74,75,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154}) = {9,27,36,45,54,73}. Here rules are labeled as follows: DPs: { 1: getFuncName^#(Fun(n, e)) -> c_1() , 2: run^#(Cons(Fun(f0, e), xs), input) -> c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , 3: lookbody^#(f, Cons(Fun(n, e), xs)) -> c_4(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , 4: getIfFalse^#(ITE(i, t, e)) -> c_3() , 5: lookvar^#(x', Cons(x, xs), vs) -> c_5(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs), !EQ^#(x', x)) , 6: lookname^#(f, Cons(Fun(n, e), xs)) -> c_6(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , 7: getConst^#(Cst(int)) -> c_7() , 8: getFuncExp^#(Fun(n, e)) -> c_8() , 9: eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_9(and^#(!EQ(fn1, fn2), eqExp(fe1, fe2)), !EQ^#(fn1, fn2), eqExp^#(fe1, fe2)) , 10: eqExp^#(Fun(fn1, fe1), Var(v2)) -> c_10() , 11: eqExp^#(Fun(fn1, fe1), ITE(i2, t2, e2)) -> c_11() , 12: eqExp^#(Fun(fn1, fe1), Eq(eq21, eq22)) -> c_12() , 13: eqExp^#(Fun(fn1, fe1), Error(e21, e22)) -> c_13() , 14: eqExp^#(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> c_14() , 15: eqExp^#(Fun(fn1, fe1), T()) -> c_15() , 16: eqExp^#(Fun(fn1, fe1), F()) -> c_16() , 17: eqExp^#(Var(v1), Fun(fn2, fe2)) -> c_17() , 18: eqExp^#(Var(v1), Var(v2)) -> c_18(!EQ^#(v1, v2)) , 19: eqExp^#(Var(v1), ITE(i2, t2, e2)) -> c_19() , 20: eqExp^#(Var(v1), Eq(eq21, eq22)) -> c_20() , 21: eqExp^#(Var(v1), Error(e21, e22)) -> c_21() , 22: eqExp^#(Var(v1), Bsf(op2, b21, b22)) -> c_22() , 23: eqExp^#(Var(v1), T()) -> c_23() , 24: eqExp^#(Var(v1), F()) -> c_24() , 25: eqExp^#(ITE(i1, t1, e1), Fun(fn2, fe2)) -> c_25() , 26: eqExp^#(ITE(i1, t1, e1), Var(v2)) -> c_26() , 27: eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_27(and^#(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))), eqExp^#(i1, i2), and^#(eqExp(t1, t2), eqExp(e1, e2)), eqExp^#(t1, t2), eqExp^#(e1, e2)) , 28: eqExp^#(ITE(i1, t1, e1), Eq(eq21, eq22)) -> c_28() , 29: eqExp^#(ITE(i1, t1, e1), Error(e21, e22)) -> c_29() , 30: eqExp^#(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> c_30() , 31: eqExp^#(ITE(i1, t1, e1), T()) -> c_31() , 32: eqExp^#(ITE(i1, t1, e1), F()) -> c_32() , 33: eqExp^#(Eq(eq11, eq12), Fun(fn2, fe2)) -> c_33() , 34: eqExp^#(Eq(eq11, eq12), Var(v2)) -> c_34() , 35: eqExp^#(Eq(eq11, eq12), ITE(i2, t2, e2)) -> c_35() , 36: eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_36(and^#(eqExp(eq11, eq21), eqExp(eq12, eq22)), eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , 37: eqExp^#(Eq(eq11, eq12), Error(e21, e22)) -> c_37() , 38: eqExp^#(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> c_38() , 39: eqExp^#(Eq(eq11, eq12), T()) -> c_39() , 40: eqExp^#(Eq(eq11, eq12), F()) -> c_40() , 41: eqExp^#(Error(e11, e12), Fun(fn2, fe2)) -> c_41() , 42: eqExp^#(Error(e11, e12), Var(v2)) -> c_42() , 43: eqExp^#(Error(e11, e12), ITE(i2, t2, e2)) -> c_43() , 44: eqExp^#(Error(e11, e12), Eq(eq21, eq22)) -> c_44() , 45: eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_45(and^#(eqExp(e11, e21), eqExp(e12, e22)), eqExp^#(e11, e21), eqExp^#(e12, e22)) , 46: eqExp^#(Error(e11, e12), Bsf(op2, b21, b22)) -> c_46() , 47: eqExp^#(Error(e11, e12), T()) -> c_47() , 48: eqExp^#(Error(e11, e12), F()) -> c_48() , 49: eqExp^#(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> c_49() , 50: eqExp^#(Bsf(op1, b11, b12), Var(v2)) -> c_50() , 51: eqExp^#(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> c_51() , 52: eqExp^#(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> c_52() , 53: eqExp^#(Bsf(op1, b11, b12), Error(e21, e22)) -> c_53() , 54: eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_54(and^#(True(), and(eqExp(b11, b21), eqExp(b12, b22))), and^#(eqExp(b11, b21), eqExp(b12, b22)), eqExp^#(b11, b21), eqExp^#(b12, b22)) , 55: eqExp^#(Bsf(op1, b11, b12), T()) -> c_55() , 56: eqExp^#(Bsf(op1, b11, b12), F()) -> c_56() , 57: eqExp^#(T(), Fun(fn2, fe2)) -> c_57() , 58: eqExp^#(T(), Var(v2)) -> c_58() , 59: eqExp^#(T(), ITE(i2, t2, e2)) -> c_59() , 60: eqExp^#(T(), Eq(eq21, eq22)) -> c_60() , 61: eqExp^#(T(), Error(e21, e22)) -> c_61() , 62: eqExp^#(T(), Bsf(op2, b21, b22)) -> c_62() , 63: eqExp^#(T(), T()) -> c_63() , 64: eqExp^#(T(), F()) -> c_64() , 65: eqExp^#(F(), Fun(fn2, fe2)) -> c_65() , 66: eqExp^#(F(), Var(v2)) -> c_66() , 67: eqExp^#(F(), ITE(i2, t2, e2)) -> c_67() , 68: eqExp^#(F(), Eq(eq21, eq22)) -> c_68() , 69: eqExp^#(F(), Error(e21, e22)) -> c_69() , 70: eqExp^#(F(), Bsf(op2, b21, b22)) -> c_70() , 71: eqExp^#(F(), T()) -> c_71() , 72: eqExp^#(F(), F()) -> c_72() , 73: apply^#(op, v1, v2) -> c_73(apply[Ite][True][Ite]^#(eqExp(v1, v2), op, v1, v2), eqExp^#(v1, v2)) , 74: getVar^#(Var(int)) -> c_74() , 75: getBsfSecondTerm^#(Bsf(op, t1, t2)) -> c_75() , 76: eeval^#(Fun(fn1, fe1), ns, vs, p) -> c_76() , 77: eeval^#(Var(int), ns, vs, p) -> c_77(lookvar^#(int, ns, vs)) , 78: eeval^#(ITE(i1, t1, e1), ns, vs, p) -> c_78() , 79: eeval^#(Eq(eq11, eq12), ns, vs, p) -> c_79() , 80: eeval^#(Error(e11, e12), ns, vs, p) -> c_80() , 81: eeval^#(Bsf(op1, b11, b12), ns, vs, p) -> c_81() , 82: eeval^#(T(), ns, vs, p) -> c_82() , 83: eeval^#(F(), ns, vs, p) -> c_83() , 84: checkConstrExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_84() , 85: checkConstrExp^#(Fun(fn1, fe1), Var(v2)) -> c_85() , 86: checkConstrExp^#(Fun(fn1, fe1), ITE(i2, t2, e2)) -> c_86() , 87: checkConstrExp^#(Fun(fn1, fe1), Eq(eq21, eq22)) -> c_87() , 88: checkConstrExp^#(Fun(fn1, fe1), Error(e21, e22)) -> c_88() , 89: checkConstrExp^#(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> c_89() , 90: checkConstrExp^#(Fun(fn1, fe1), T()) -> c_90() , 91: checkConstrExp^#(Fun(fn1, fe1), F()) -> c_91() , 92: checkConstrExp^#(Var(v1), Fun(fn2, fe2)) -> c_92() , 93: checkConstrExp^#(Var(v1), Var(v2)) -> c_93() , 94: checkConstrExp^#(Var(v1), ITE(i2, t2, e2)) -> c_94() , 95: checkConstrExp^#(Var(v1), Eq(eq21, eq22)) -> c_95() , 96: checkConstrExp^#(Var(v1), Error(e21, e22)) -> c_96() , 97: checkConstrExp^#(Var(v1), Bsf(op2, b21, b22)) -> c_97() , 98: checkConstrExp^#(Var(v1), T()) -> c_98() , 99: checkConstrExp^#(Var(v1), F()) -> c_99() , 100: checkConstrExp^#(ITE(i1, t1, e1), Fun(fn2, fe2)) -> c_100() , 101: checkConstrExp^#(ITE(i1, t1, e1), Var(v2)) -> c_101() , 102: checkConstrExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_102() , 103: checkConstrExp^#(ITE(i1, t1, e1), Eq(eq21, eq22)) -> c_103() , 104: checkConstrExp^#(ITE(i1, t1, e1), Error(e21, e22)) -> c_104() , 105: checkConstrExp^#(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> c_105() , 106: checkConstrExp^#(ITE(i1, t1, e1), T()) -> c_106() , 107: checkConstrExp^#(ITE(i1, t1, e1), F()) -> c_107() , 108: checkConstrExp^#(Eq(eq11, eq12), Fun(fn2, fe2)) -> c_108() , 109: checkConstrExp^#(Eq(eq11, eq12), Var(v2)) -> c_109() , 110: checkConstrExp^#(Eq(eq11, eq12), ITE(i2, t2, e2)) -> c_110() , 111: checkConstrExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_111() , 112: checkConstrExp^#(Eq(eq11, eq12), Error(e21, e22)) -> c_112() , 113: checkConstrExp^#(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> c_113() , 114: checkConstrExp^#(Eq(eq11, eq12), T()) -> c_114() , 115: checkConstrExp^#(Eq(eq11, eq12), F()) -> c_115() , 116: checkConstrExp^#(Error(e11, e12), Fun(fn2, fe2)) -> c_116() , 117: checkConstrExp^#(Error(e11, e12), Var(v2)) -> c_117() , 118: checkConstrExp^#(Error(e11, e12), ITE(i2, t2, e2)) -> c_118() , 119: checkConstrExp^#(Error(e11, e12), Eq(eq21, eq22)) -> c_119() , 120: checkConstrExp^#(Error(e11, e12), Error(e21, e22)) -> c_120() , 121: checkConstrExp^#(Error(e11, e12), Bsf(op2, b21, b22)) -> c_121() , 122: checkConstrExp^#(Error(e11, e12), T()) -> c_122() , 123: checkConstrExp^#(Error(e11, e12), F()) -> c_123() , 124: checkConstrExp^#(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> c_124() , 125: checkConstrExp^#(Bsf(op1, b11, b12), Var(v2)) -> c_125() , 126: checkConstrExp^#(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> c_126() , 127: checkConstrExp^#(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> c_127() , 128: checkConstrExp^#(Bsf(op1, b11, b12), Error(e21, e22)) -> c_128() , 129: checkConstrExp^#(Bsf(op1, b11, b12), Bsf(op2, b21, b22)) -> c_129() , 130: checkConstrExp^#(Bsf(op1, b11, b12), T()) -> c_130() , 131: checkConstrExp^#(Bsf(op1, b11, b12), F()) -> c_131() , 132: checkConstrExp^#(T(), Fun(fn2, fe2)) -> c_132() , 133: checkConstrExp^#(T(), Var(v2)) -> c_133() , 134: checkConstrExp^#(T(), ITE(i2, t2, e2)) -> c_134() , 135: checkConstrExp^#(T(), Eq(eq21, eq22)) -> c_135() , 136: checkConstrExp^#(T(), Error(e21, e22)) -> c_136() , 137: checkConstrExp^#(T(), Bsf(op2, b21, b22)) -> c_137() , 138: checkConstrExp^#(T(), T()) -> c_138() , 139: checkConstrExp^#(T(), F()) -> c_139() , 140: checkConstrExp^#(F(), Fun(fn2, fe2)) -> c_140() , 141: checkConstrExp^#(F(), Var(v2)) -> c_141() , 142: checkConstrExp^#(F(), ITE(i2, t2, e2)) -> c_142() , 143: checkConstrExp^#(F(), Eq(eq21, eq22)) -> c_143() , 144: checkConstrExp^#(F(), Error(e21, e22)) -> c_144() , 145: checkConstrExp^#(F(), Bsf(op2, b21, b22)) -> c_145() , 146: checkConstrExp^#(F(), T()) -> c_146() , 147: checkConstrExp^#(F(), F()) -> c_147() , 148: getIfTrue^#(ITE(i, t, e)) -> c_148() , 149: getEqSecond^#(Eq(f, s)) -> c_149() , 150: getEqFirst^#(Eq(f, s)) -> c_150() , 151: getBsfOp^#(Bsf(op, t1, t2)) -> c_151() , 152: getBsfFirstTerm^#(Bsf(op, t1, t2)) -> c_152() , 153: getIfGuard^#(ITE(i, t, e)) -> c_153() , 154: eqOps^#(o1, o2) -> c_154() , 155: run[Let][Let]^#(p, input, f0, ef) -> c_169(lookname^#(f0, p)) , 156: lookbody[Ite]^#(True(), f, Cons(Fun(n, e), xs)) -> c_155() , 157: lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_156(lookbody^#(f, xs)) , 158: !EQ^#(S(x), S(y)) -> c_161(!EQ^#(x, y)) , 159: !EQ^#(S(x), 0()) -> c_162() , 160: !EQ^#(0(), S(y)) -> c_163() , 161: !EQ^#(0(), 0()) -> c_164() , 162: lookvar[Ite]^#(True(), x', ns, Cons(x, xs)) -> c_157() , 163: lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_158(lookvar^#(x', xs', xs)) , 164: lookname[Ite]^#(True(), f, Cons(Fun(n, e), xs)) -> c_170() , 165: lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_171(lookname^#(f, xs)) , 166: and^#(True(), True()) -> c_165() , 167: and^#(True(), False()) -> c_166() , 168: and^#(False(), True()) -> c_167() , 169: and^#(False(), False()) -> c_168() , 170: apply[Ite][True][Ite]^#(True(), op, v1, v2) -> c_159() , 171: apply[Ite][True][Ite]^#(False(), op, v1, v2) -> c_160() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_4(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , lookvar^#(x', Cons(x, xs), vs) -> c_5(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs), !EQ^#(x', x)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_6(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_9(and^#(!EQ(fn1, fn2), eqExp(fe1, fe2)), !EQ^#(fn1, fn2), eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_27(and^#(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))), eqExp^#(i1, i2), and^#(eqExp(t1, t2), eqExp(e1, e2)), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_36(and^#(eqExp(eq11, eq21), eqExp(eq12, eq22)), eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_45(and^#(eqExp(e11, e21), eqExp(e12, e22)), eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_54(and^#(True(), and(eqExp(b11, b21), eqExp(b12, b22))), and^#(eqExp(b11, b21), eqExp(b12, b22)), eqExp^#(b11, b21), eqExp^#(b12, b22)) , apply^#(op, v1, v2) -> c_73(apply[Ite][True][Ite]^#(eqExp(v1, v2), op, v1, v2), eqExp^#(v1, v2)) , eeval^#(Var(int), ns, vs, p) -> c_77(lookvar^#(int, ns, vs)) } Weak DPs: { getFuncName^#(Fun(n, e)) -> c_1() , run[Let][Let]^#(p, input, f0, ef) -> c_169(lookname^#(f0, p)) , getIfFalse^#(ITE(i, t, e)) -> c_3() , lookbody[Ite]^#(True(), f, Cons(Fun(n, e), xs)) -> c_155() , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_156(lookbody^#(f, xs)) , !EQ^#(S(x), S(y)) -> c_161(!EQ^#(x, y)) , !EQ^#(S(x), 0()) -> c_162() , !EQ^#(0(), S(y)) -> c_163() , !EQ^#(0(), 0()) -> c_164() , lookvar[Ite]^#(True(), x', ns, Cons(x, xs)) -> c_157() , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_158(lookvar^#(x', xs', xs)) , lookname[Ite]^#(True(), f, Cons(Fun(n, e), xs)) -> c_170() , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_171(lookname^#(f, xs)) , getConst^#(Cst(int)) -> c_7() , getFuncExp^#(Fun(n, e)) -> c_8() , eqExp^#(Fun(fn1, fe1), Var(v2)) -> c_10() , eqExp^#(Fun(fn1, fe1), ITE(i2, t2, e2)) -> c_11() , eqExp^#(Fun(fn1, fe1), Eq(eq21, eq22)) -> c_12() , eqExp^#(Fun(fn1, fe1), Error(e21, e22)) -> c_13() , eqExp^#(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> c_14() , eqExp^#(Fun(fn1, fe1), T()) -> c_15() , eqExp^#(Fun(fn1, fe1), F()) -> c_16() , eqExp^#(Var(v1), Fun(fn2, fe2)) -> c_17() , eqExp^#(Var(v1), Var(v2)) -> c_18(!EQ^#(v1, v2)) , eqExp^#(Var(v1), ITE(i2, t2, e2)) -> c_19() , eqExp^#(Var(v1), Eq(eq21, eq22)) -> c_20() , eqExp^#(Var(v1), Error(e21, e22)) -> c_21() , eqExp^#(Var(v1), Bsf(op2, b21, b22)) -> c_22() , eqExp^#(Var(v1), T()) -> c_23() , eqExp^#(Var(v1), F()) -> c_24() , eqExp^#(ITE(i1, t1, e1), Fun(fn2, fe2)) -> c_25() , eqExp^#(ITE(i1, t1, e1), Var(v2)) -> c_26() , eqExp^#(ITE(i1, t1, e1), Eq(eq21, eq22)) -> c_28() , eqExp^#(ITE(i1, t1, e1), Error(e21, e22)) -> c_29() , eqExp^#(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> c_30() , eqExp^#(ITE(i1, t1, e1), T()) -> c_31() , eqExp^#(ITE(i1, t1, e1), F()) -> c_32() , eqExp^#(Eq(eq11, eq12), Fun(fn2, fe2)) -> c_33() , eqExp^#(Eq(eq11, eq12), Var(v2)) -> c_34() , eqExp^#(Eq(eq11, eq12), ITE(i2, t2, e2)) -> c_35() , eqExp^#(Eq(eq11, eq12), Error(e21, e22)) -> c_37() , eqExp^#(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> c_38() , eqExp^#(Eq(eq11, eq12), T()) -> c_39() , eqExp^#(Eq(eq11, eq12), F()) -> c_40() , eqExp^#(Error(e11, e12), Fun(fn2, fe2)) -> c_41() , eqExp^#(Error(e11, e12), Var(v2)) -> c_42() , eqExp^#(Error(e11, e12), ITE(i2, t2, e2)) -> c_43() , eqExp^#(Error(e11, e12), Eq(eq21, eq22)) -> c_44() , eqExp^#(Error(e11, e12), Bsf(op2, b21, b22)) -> c_46() , eqExp^#(Error(e11, e12), T()) -> c_47() , eqExp^#(Error(e11, e12), F()) -> c_48() , eqExp^#(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> c_49() , eqExp^#(Bsf(op1, b11, b12), Var(v2)) -> c_50() , eqExp^#(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> c_51() , eqExp^#(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> c_52() , eqExp^#(Bsf(op1, b11, b12), Error(e21, e22)) -> c_53() , eqExp^#(Bsf(op1, b11, b12), T()) -> c_55() , eqExp^#(Bsf(op1, b11, b12), F()) -> c_56() , eqExp^#(T(), Fun(fn2, fe2)) -> c_57() , eqExp^#(T(), Var(v2)) -> c_58() , eqExp^#(T(), ITE(i2, t2, e2)) -> c_59() , eqExp^#(T(), Eq(eq21, eq22)) -> c_60() , eqExp^#(T(), Error(e21, e22)) -> c_61() , eqExp^#(T(), Bsf(op2, b21, b22)) -> c_62() , eqExp^#(T(), T()) -> c_63() , eqExp^#(T(), F()) -> c_64() , eqExp^#(F(), Fun(fn2, fe2)) -> c_65() , eqExp^#(F(), Var(v2)) -> c_66() , eqExp^#(F(), ITE(i2, t2, e2)) -> c_67() , eqExp^#(F(), Eq(eq21, eq22)) -> c_68() , eqExp^#(F(), Error(e21, e22)) -> c_69() , eqExp^#(F(), Bsf(op2, b21, b22)) -> c_70() , eqExp^#(F(), T()) -> c_71() , eqExp^#(F(), F()) -> c_72() , and^#(True(), True()) -> c_165() , and^#(True(), False()) -> c_166() , and^#(False(), True()) -> c_167() , and^#(False(), False()) -> c_168() , apply[Ite][True][Ite]^#(True(), op, v1, v2) -> c_159() , apply[Ite][True][Ite]^#(False(), op, v1, v2) -> c_160() , getVar^#(Var(int)) -> c_74() , getBsfSecondTerm^#(Bsf(op, t1, t2)) -> c_75() , eeval^#(Fun(fn1, fe1), ns, vs, p) -> c_76() , eeval^#(ITE(i1, t1, e1), ns, vs, p) -> c_78() , eeval^#(Eq(eq11, eq12), ns, vs, p) -> c_79() , eeval^#(Error(e11, e12), ns, vs, p) -> c_80() , eeval^#(Bsf(op1, b11, b12), ns, vs, p) -> c_81() , eeval^#(T(), ns, vs, p) -> c_82() , eeval^#(F(), ns, vs, p) -> c_83() , checkConstrExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_84() , checkConstrExp^#(Fun(fn1, fe1), Var(v2)) -> c_85() , checkConstrExp^#(Fun(fn1, fe1), ITE(i2, t2, e2)) -> c_86() , checkConstrExp^#(Fun(fn1, fe1), Eq(eq21, eq22)) -> c_87() , checkConstrExp^#(Fun(fn1, fe1), Error(e21, e22)) -> c_88() , checkConstrExp^#(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> c_89() , checkConstrExp^#(Fun(fn1, fe1), T()) -> c_90() , checkConstrExp^#(Fun(fn1, fe1), F()) -> c_91() , checkConstrExp^#(Var(v1), Fun(fn2, fe2)) -> c_92() , checkConstrExp^#(Var(v1), Var(v2)) -> c_93() , checkConstrExp^#(Var(v1), ITE(i2, t2, e2)) -> c_94() , checkConstrExp^#(Var(v1), Eq(eq21, eq22)) -> c_95() , checkConstrExp^#(Var(v1), Error(e21, e22)) -> c_96() , checkConstrExp^#(Var(v1), Bsf(op2, b21, b22)) -> c_97() , checkConstrExp^#(Var(v1), T()) -> c_98() , checkConstrExp^#(Var(v1), F()) -> c_99() , checkConstrExp^#(ITE(i1, t1, e1), Fun(fn2, fe2)) -> c_100() , checkConstrExp^#(ITE(i1, t1, e1), Var(v2)) -> c_101() , checkConstrExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_102() , checkConstrExp^#(ITE(i1, t1, e1), Eq(eq21, eq22)) -> c_103() , checkConstrExp^#(ITE(i1, t1, e1), Error(e21, e22)) -> c_104() , checkConstrExp^#(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> c_105() , checkConstrExp^#(ITE(i1, t1, e1), T()) -> c_106() , checkConstrExp^#(ITE(i1, t1, e1), F()) -> c_107() , checkConstrExp^#(Eq(eq11, eq12), Fun(fn2, fe2)) -> c_108() , checkConstrExp^#(Eq(eq11, eq12), Var(v2)) -> c_109() , checkConstrExp^#(Eq(eq11, eq12), ITE(i2, t2, e2)) -> c_110() , checkConstrExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_111() , checkConstrExp^#(Eq(eq11, eq12), Error(e21, e22)) -> c_112() , checkConstrExp^#(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> c_113() , checkConstrExp^#(Eq(eq11, eq12), T()) -> c_114() , checkConstrExp^#(Eq(eq11, eq12), F()) -> c_115() , checkConstrExp^#(Error(e11, e12), Fun(fn2, fe2)) -> c_116() , checkConstrExp^#(Error(e11, e12), Var(v2)) -> c_117() , checkConstrExp^#(Error(e11, e12), ITE(i2, t2, e2)) -> c_118() , checkConstrExp^#(Error(e11, e12), Eq(eq21, eq22)) -> c_119() , checkConstrExp^#(Error(e11, e12), Error(e21, e22)) -> c_120() , checkConstrExp^#(Error(e11, e12), Bsf(op2, b21, b22)) -> c_121() , checkConstrExp^#(Error(e11, e12), T()) -> c_122() , checkConstrExp^#(Error(e11, e12), F()) -> c_123() , checkConstrExp^#(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> c_124() , checkConstrExp^#(Bsf(op1, b11, b12), Var(v2)) -> c_125() , checkConstrExp^#(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> c_126() , checkConstrExp^#(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> c_127() , checkConstrExp^#(Bsf(op1, b11, b12), Error(e21, e22)) -> c_128() , checkConstrExp^#(Bsf(op1, b11, b12), Bsf(op2, b21, b22)) -> c_129() , checkConstrExp^#(Bsf(op1, b11, b12), T()) -> c_130() , checkConstrExp^#(Bsf(op1, b11, b12), F()) -> c_131() , checkConstrExp^#(T(), Fun(fn2, fe2)) -> c_132() , checkConstrExp^#(T(), Var(v2)) -> c_133() , checkConstrExp^#(T(), ITE(i2, t2, e2)) -> c_134() , checkConstrExp^#(T(), Eq(eq21, eq22)) -> c_135() , checkConstrExp^#(T(), Error(e21, e22)) -> c_136() , checkConstrExp^#(T(), Bsf(op2, b21, b22)) -> c_137() , checkConstrExp^#(T(), T()) -> c_138() , checkConstrExp^#(T(), F()) -> c_139() , checkConstrExp^#(F(), Fun(fn2, fe2)) -> c_140() , checkConstrExp^#(F(), Var(v2)) -> c_141() , checkConstrExp^#(F(), ITE(i2, t2, e2)) -> c_142() , checkConstrExp^#(F(), Eq(eq21, eq22)) -> c_143() , checkConstrExp^#(F(), Error(e21, e22)) -> c_144() , checkConstrExp^#(F(), Bsf(op2, b21, b22)) -> c_145() , checkConstrExp^#(F(), T()) -> c_146() , checkConstrExp^#(F(), F()) -> c_147() , getIfTrue^#(ITE(i, t, e)) -> c_148() , getEqSecond^#(Eq(f, s)) -> c_149() , getEqFirst^#(Eq(f, s)) -> c_150() , getBsfOp^#(Bsf(op, t1, t2)) -> c_151() , getBsfFirstTerm^#(Bsf(op, t1, t2)) -> c_152() , getIfGuard^#(ITE(i, t, e)) -> c_153() , eqOps^#(o1, o2) -> c_154() } Weak Trs: { getFuncName(Fun(n, e)) -> n , run(Cons(Fun(f0, e), xs), input) -> run[Let][Let](Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))) , getIfFalse(ITE(i, t, e)) -> e , lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookvar(x', Cons(x, xs), vs) -> lookvar[Ite](!EQ(x', x), x', Cons(x, xs), vs) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , lookvar[Ite](True(), x', ns, Cons(x, xs)) -> x , lookvar[Ite](False(), x', Cons(x', xs'), Cons(x, xs)) -> lookvar(x', xs', xs) , lookname(f, Cons(Fun(n, e), xs)) -> lookname[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , apply[Ite][True][Ite](True(), op, v1, v2) -> T() , apply[Ite][True][Ite](False(), op, v1, v2) -> F() , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() , getConst(Cst(int)) -> int , getFuncExp(Fun(n, e)) -> e , eqExp(Fun(fn1, fe1), Fun(fn2, fe2)) -> and(!EQ(fn1, fn2), eqExp(fe1, fe2)) , eqExp(Fun(fn1, fe1), Var(v2)) -> False() , eqExp(Fun(fn1, fe1), ITE(i2, t2, e2)) -> False() , eqExp(Fun(fn1, fe1), Eq(eq21, eq22)) -> False() , eqExp(Fun(fn1, fe1), Error(e21, e22)) -> False() , eqExp(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> False() , eqExp(Fun(fn1, fe1), T()) -> False() , eqExp(Fun(fn1, fe1), F()) -> False() , eqExp(Var(v1), Fun(fn2, fe2)) -> False() , eqExp(Var(v1), Var(v2)) -> !EQ(v1, v2) , eqExp(Var(v1), ITE(i2, t2, e2)) -> False() , eqExp(Var(v1), Eq(eq21, eq22)) -> False() , eqExp(Var(v1), Error(e21, e22)) -> False() , eqExp(Var(v1), Bsf(op2, b21, b22)) -> False() , eqExp(Var(v1), T()) -> False() , eqExp(Var(v1), F()) -> False() , eqExp(ITE(i1, t1, e1), Fun(fn2, fe2)) -> False() , eqExp(ITE(i1, t1, e1), Var(v2)) -> False() , eqExp(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> and(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))) , eqExp(ITE(i1, t1, e1), Eq(eq21, eq22)) -> False() , eqExp(ITE(i1, t1, e1), Error(e21, e22)) -> False() , eqExp(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> False() , eqExp(ITE(i1, t1, e1), T()) -> False() , eqExp(ITE(i1, t1, e1), F()) -> False() , eqExp(Eq(eq11, eq12), Fun(fn2, fe2)) -> False() , eqExp(Eq(eq11, eq12), Var(v2)) -> False() , eqExp(Eq(eq11, eq12), ITE(i2, t2, e2)) -> False() , eqExp(Eq(eq11, eq12), Eq(eq21, eq22)) -> and(eqExp(eq11, eq21), eqExp(eq12, eq22)) , eqExp(Eq(eq11, eq12), Error(e21, e22)) -> False() , eqExp(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> False() , eqExp(Eq(eq11, eq12), T()) -> False() , eqExp(Eq(eq11, eq12), F()) -> False() , eqExp(Error(e11, e12), Fun(fn2, fe2)) -> False() , eqExp(Error(e11, e12), Var(v2)) -> False() , eqExp(Error(e11, e12), ITE(i2, t2, e2)) -> False() , eqExp(Error(e11, e12), Eq(eq21, eq22)) -> False() , eqExp(Error(e11, e12), Error(e21, e22)) -> and(eqExp(e11, e21), eqExp(e12, e22)) , eqExp(Error(e11, e12), Bsf(op2, b21, b22)) -> False() , eqExp(Error(e11, e12), T()) -> False() , eqExp(Error(e11, e12), F()) -> False() , eqExp(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> False() , eqExp(Bsf(op1, b11, b12), Var(v2)) -> False() , eqExp(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> False() , eqExp(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> False() , eqExp(Bsf(op1, b11, b12), Error(e21, e22)) -> False() , eqExp(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> and(True(), and(eqExp(b11, b21), eqExp(b12, b22))) , eqExp(Bsf(op1, b11, b12), T()) -> False() , eqExp(Bsf(op1, b11, b12), F()) -> False() , eqExp(T(), Fun(fn2, fe2)) -> False() , eqExp(T(), Var(v2)) -> False() , eqExp(T(), ITE(i2, t2, e2)) -> False() , eqExp(T(), Eq(eq21, eq22)) -> False() , eqExp(T(), Error(e21, e22)) -> False() , eqExp(T(), Bsf(op2, b21, b22)) -> False() , eqExp(T(), T()) -> True() , eqExp(T(), F()) -> False() , eqExp(F(), Fun(fn2, fe2)) -> False() , eqExp(F(), Var(v2)) -> False() , eqExp(F(), ITE(i2, t2, e2)) -> False() , eqExp(F(), Eq(eq21, eq22)) -> False() , eqExp(F(), Error(e21, e22)) -> False() , eqExp(F(), Bsf(op2, b21, b22)) -> False() , eqExp(F(), T()) -> False() , eqExp(F(), F()) -> True() , apply(op, v1, v2) -> apply[Ite][True][Ite](eqExp(v1, v2), op, v1, v2) , getVar(Var(int)) -> int , getBsfSecondTerm(Bsf(op, t1, t2)) -> t2 , eeval(Fun(fn1, fe1), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Fun(fn1, fe1), ns, vs, p) , eeval(Var(int), ns, vs, p) -> lookvar(int, ns, vs) , eeval(ITE(i1, t1, e1), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), ITE(i1, t1, e1), ns, vs, p) , eeval(Eq(eq11, eq12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Eq(eq11, eq12), ns, vs, p) , eeval(Error(e11, e12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Error(e11, e12), ns, vs, p) , eeval(Bsf(op1, b11, b12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](True(), Bsf(op1, b11, b12), ns, vs, p) , eeval(T(), ns, vs, p) -> T() , eeval(F(), ns, vs, p) -> F() , and(True(), True()) -> True() , and(True(), False()) -> False() , and(False(), True()) -> False() , and(False(), False()) -> False() , checkConstrExp(Fun(fn1, fe1), Fun(fn2, fe2)) -> True() , checkConstrExp(Fun(fn1, fe1), Var(v2)) -> False() , checkConstrExp(Fun(fn1, fe1), ITE(i2, t2, e2)) -> False() , checkConstrExp(Fun(fn1, fe1), Eq(eq21, eq22)) -> False() , checkConstrExp(Fun(fn1, fe1), Error(e21, e22)) -> False() , checkConstrExp(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Fun(fn1, fe1), T()) -> False() , checkConstrExp(Fun(fn1, fe1), F()) -> False() , checkConstrExp(Var(v1), Fun(fn2, fe2)) -> False() , checkConstrExp(Var(v1), Var(v2)) -> True() , checkConstrExp(Var(v1), ITE(i2, t2, e2)) -> False() , checkConstrExp(Var(v1), Eq(eq21, eq22)) -> False() , checkConstrExp(Var(v1), Error(e21, e22)) -> False() , checkConstrExp(Var(v1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Var(v1), T()) -> False() , checkConstrExp(Var(v1), F()) -> False() , checkConstrExp(ITE(i1, t1, e1), Fun(fn2, fe2)) -> False() , checkConstrExp(ITE(i1, t1, e1), Var(v2)) -> False() , checkConstrExp(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> True() , checkConstrExp(ITE(i1, t1, e1), Eq(eq21, eq22)) -> False() , checkConstrExp(ITE(i1, t1, e1), Error(e21, e22)) -> False() , checkConstrExp(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(ITE(i1, t1, e1), T()) -> False() , checkConstrExp(ITE(i1, t1, e1), F()) -> False() , checkConstrExp(Eq(eq11, eq12), Fun(fn2, fe2)) -> False() , checkConstrExp(Eq(eq11, eq12), Var(v2)) -> False() , checkConstrExp(Eq(eq11, eq12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Eq(eq11, eq12), Eq(eq21, eq22)) -> True() , checkConstrExp(Eq(eq11, eq12), Error(e21, e22)) -> False() , checkConstrExp(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Eq(eq11, eq12), T()) -> False() , checkConstrExp(Eq(eq11, eq12), F()) -> False() , checkConstrExp(Error(e11, e12), Fun(fn2, fe2)) -> False() , checkConstrExp(Error(e11, e12), Var(v2)) -> False() , checkConstrExp(Error(e11, e12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Error(e11, e12), Eq(eq21, eq22)) -> False() , checkConstrExp(Error(e11, e12), Error(e21, e22)) -> True() , checkConstrExp(Error(e11, e12), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Error(e11, e12), T()) -> False() , checkConstrExp(Error(e11, e12), F()) -> False() , checkConstrExp(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Var(v2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Error(e21, e22)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Bsf(op2, b21, b22)) -> True() , checkConstrExp(Bsf(op1, b11, b12), T()) -> False() , checkConstrExp(Bsf(op1, b11, b12), F()) -> False() , checkConstrExp(T(), Fun(fn2, fe2)) -> False() , checkConstrExp(T(), Var(v2)) -> False() , checkConstrExp(T(), ITE(i2, t2, e2)) -> False() , checkConstrExp(T(), Eq(eq21, eq22)) -> False() , checkConstrExp(T(), Error(e21, e22)) -> False() , checkConstrExp(T(), Bsf(op2, b21, b22)) -> False() , checkConstrExp(T(), T()) -> True() , checkConstrExp(T(), F()) -> False() , checkConstrExp(F(), Fun(fn2, fe2)) -> False() , checkConstrExp(F(), Var(v2)) -> False() , checkConstrExp(F(), ITE(i2, t2, e2)) -> False() , checkConstrExp(F(), Eq(eq21, eq22)) -> False() , checkConstrExp(F(), Error(e21, e22)) -> False() , checkConstrExp(F(), Bsf(op2, b21, b22)) -> False() , checkConstrExp(F(), T()) -> False() , checkConstrExp(F(), F()) -> True() , getIfTrue(ITE(i, t, e)) -> t , getEqSecond(Eq(f, s)) -> s , getEqFirst(Eq(f, s)) -> f , getBsfOp(Bsf(op, t1, t2)) -> op , getBsfFirstTerm(Bsf(op, t1, t2)) -> t1 , run[Let][Let](p, input, f0, ef) -> run[Let][Let][Let](p, input, f0, ef, lookname(f0, p)) , lookname[Ite](True(), f, Cons(Fun(n, e), xs)) -> n , lookname[Ite](False(), f, Cons(x, xs)) -> lookname(f, xs) , getIfGuard(ITE(i, t, e)) -> i , eqOps(o1, o2) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { getFuncName^#(Fun(n, e)) -> c_1() , getIfFalse^#(ITE(i, t, e)) -> c_3() , lookbody[Ite]^#(True(), f, Cons(Fun(n, e), xs)) -> c_155() , !EQ^#(S(x), S(y)) -> c_161(!EQ^#(x, y)) , !EQ^#(S(x), 0()) -> c_162() , !EQ^#(0(), S(y)) -> c_163() , !EQ^#(0(), 0()) -> c_164() , lookvar[Ite]^#(True(), x', ns, Cons(x, xs)) -> c_157() , lookname[Ite]^#(True(), f, Cons(Fun(n, e), xs)) -> c_170() , getConst^#(Cst(int)) -> c_7() , getFuncExp^#(Fun(n, e)) -> c_8() , eqExp^#(Fun(fn1, fe1), Var(v2)) -> c_10() , eqExp^#(Fun(fn1, fe1), ITE(i2, t2, e2)) -> c_11() , eqExp^#(Fun(fn1, fe1), Eq(eq21, eq22)) -> c_12() , eqExp^#(Fun(fn1, fe1), Error(e21, e22)) -> c_13() , eqExp^#(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> c_14() , eqExp^#(Fun(fn1, fe1), T()) -> c_15() , eqExp^#(Fun(fn1, fe1), F()) -> c_16() , eqExp^#(Var(v1), Fun(fn2, fe2)) -> c_17() , eqExp^#(Var(v1), Var(v2)) -> c_18(!EQ^#(v1, v2)) , eqExp^#(Var(v1), ITE(i2, t2, e2)) -> c_19() , eqExp^#(Var(v1), Eq(eq21, eq22)) -> c_20() , eqExp^#(Var(v1), Error(e21, e22)) -> c_21() , eqExp^#(Var(v1), Bsf(op2, b21, b22)) -> c_22() , eqExp^#(Var(v1), T()) -> c_23() , eqExp^#(Var(v1), F()) -> c_24() , eqExp^#(ITE(i1, t1, e1), Fun(fn2, fe2)) -> c_25() , eqExp^#(ITE(i1, t1, e1), Var(v2)) -> c_26() , eqExp^#(ITE(i1, t1, e1), Eq(eq21, eq22)) -> c_28() , eqExp^#(ITE(i1, t1, e1), Error(e21, e22)) -> c_29() , eqExp^#(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> c_30() , eqExp^#(ITE(i1, t1, e1), T()) -> c_31() , eqExp^#(ITE(i1, t1, e1), F()) -> c_32() , eqExp^#(Eq(eq11, eq12), Fun(fn2, fe2)) -> c_33() , eqExp^#(Eq(eq11, eq12), Var(v2)) -> c_34() , eqExp^#(Eq(eq11, eq12), ITE(i2, t2, e2)) -> c_35() , eqExp^#(Eq(eq11, eq12), Error(e21, e22)) -> c_37() , eqExp^#(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> c_38() , eqExp^#(Eq(eq11, eq12), T()) -> c_39() , eqExp^#(Eq(eq11, eq12), F()) -> c_40() , eqExp^#(Error(e11, e12), Fun(fn2, fe2)) -> c_41() , eqExp^#(Error(e11, e12), Var(v2)) -> c_42() , eqExp^#(Error(e11, e12), ITE(i2, t2, e2)) -> c_43() , eqExp^#(Error(e11, e12), Eq(eq21, eq22)) -> c_44() , eqExp^#(Error(e11, e12), Bsf(op2, b21, b22)) -> c_46() , eqExp^#(Error(e11, e12), T()) -> c_47() , eqExp^#(Error(e11, e12), F()) -> c_48() , eqExp^#(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> c_49() , eqExp^#(Bsf(op1, b11, b12), Var(v2)) -> c_50() , eqExp^#(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> c_51() , eqExp^#(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> c_52() , eqExp^#(Bsf(op1, b11, b12), Error(e21, e22)) -> c_53() , eqExp^#(Bsf(op1, b11, b12), T()) -> c_55() , eqExp^#(Bsf(op1, b11, b12), F()) -> c_56() , eqExp^#(T(), Fun(fn2, fe2)) -> c_57() , eqExp^#(T(), Var(v2)) -> c_58() , eqExp^#(T(), ITE(i2, t2, e2)) -> c_59() , eqExp^#(T(), Eq(eq21, eq22)) -> c_60() , eqExp^#(T(), Error(e21, e22)) -> c_61() , eqExp^#(T(), Bsf(op2, b21, b22)) -> c_62() , eqExp^#(T(), T()) -> c_63() , eqExp^#(T(), F()) -> c_64() , eqExp^#(F(), Fun(fn2, fe2)) -> c_65() , eqExp^#(F(), Var(v2)) -> c_66() , eqExp^#(F(), ITE(i2, t2, e2)) -> c_67() , eqExp^#(F(), Eq(eq21, eq22)) -> c_68() , eqExp^#(F(), Error(e21, e22)) -> c_69() , eqExp^#(F(), Bsf(op2, b21, b22)) -> c_70() , eqExp^#(F(), T()) -> c_71() , eqExp^#(F(), F()) -> c_72() , and^#(True(), True()) -> c_165() , and^#(True(), False()) -> c_166() , and^#(False(), True()) -> c_167() , and^#(False(), False()) -> c_168() , apply[Ite][True][Ite]^#(True(), op, v1, v2) -> c_159() , apply[Ite][True][Ite]^#(False(), op, v1, v2) -> c_160() , getVar^#(Var(int)) -> c_74() , getBsfSecondTerm^#(Bsf(op, t1, t2)) -> c_75() , eeval^#(Fun(fn1, fe1), ns, vs, p) -> c_76() , eeval^#(ITE(i1, t1, e1), ns, vs, p) -> c_78() , eeval^#(Eq(eq11, eq12), ns, vs, p) -> c_79() , eeval^#(Error(e11, e12), ns, vs, p) -> c_80() , eeval^#(Bsf(op1, b11, b12), ns, vs, p) -> c_81() , eeval^#(T(), ns, vs, p) -> c_82() , eeval^#(F(), ns, vs, p) -> c_83() , checkConstrExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_84() , checkConstrExp^#(Fun(fn1, fe1), Var(v2)) -> c_85() , checkConstrExp^#(Fun(fn1, fe1), ITE(i2, t2, e2)) -> c_86() , checkConstrExp^#(Fun(fn1, fe1), Eq(eq21, eq22)) -> c_87() , checkConstrExp^#(Fun(fn1, fe1), Error(e21, e22)) -> c_88() , checkConstrExp^#(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> c_89() , checkConstrExp^#(Fun(fn1, fe1), T()) -> c_90() , checkConstrExp^#(Fun(fn1, fe1), F()) -> c_91() , checkConstrExp^#(Var(v1), Fun(fn2, fe2)) -> c_92() , checkConstrExp^#(Var(v1), Var(v2)) -> c_93() , checkConstrExp^#(Var(v1), ITE(i2, t2, e2)) -> c_94() , checkConstrExp^#(Var(v1), Eq(eq21, eq22)) -> c_95() , checkConstrExp^#(Var(v1), Error(e21, e22)) -> c_96() , checkConstrExp^#(Var(v1), Bsf(op2, b21, b22)) -> c_97() , checkConstrExp^#(Var(v1), T()) -> c_98() , checkConstrExp^#(Var(v1), F()) -> c_99() , checkConstrExp^#(ITE(i1, t1, e1), Fun(fn2, fe2)) -> c_100() , checkConstrExp^#(ITE(i1, t1, e1), Var(v2)) -> c_101() , checkConstrExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_102() , checkConstrExp^#(ITE(i1, t1, e1), Eq(eq21, eq22)) -> c_103() , checkConstrExp^#(ITE(i1, t1, e1), Error(e21, e22)) -> c_104() , checkConstrExp^#(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> c_105() , checkConstrExp^#(ITE(i1, t1, e1), T()) -> c_106() , checkConstrExp^#(ITE(i1, t1, e1), F()) -> c_107() , checkConstrExp^#(Eq(eq11, eq12), Fun(fn2, fe2)) -> c_108() , checkConstrExp^#(Eq(eq11, eq12), Var(v2)) -> c_109() , checkConstrExp^#(Eq(eq11, eq12), ITE(i2, t2, e2)) -> c_110() , checkConstrExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_111() , checkConstrExp^#(Eq(eq11, eq12), Error(e21, e22)) -> c_112() , checkConstrExp^#(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> c_113() , checkConstrExp^#(Eq(eq11, eq12), T()) -> c_114() , checkConstrExp^#(Eq(eq11, eq12), F()) -> c_115() , checkConstrExp^#(Error(e11, e12), Fun(fn2, fe2)) -> c_116() , checkConstrExp^#(Error(e11, e12), Var(v2)) -> c_117() , checkConstrExp^#(Error(e11, e12), ITE(i2, t2, e2)) -> c_118() , checkConstrExp^#(Error(e11, e12), Eq(eq21, eq22)) -> c_119() , checkConstrExp^#(Error(e11, e12), Error(e21, e22)) -> c_120() , checkConstrExp^#(Error(e11, e12), Bsf(op2, b21, b22)) -> c_121() , checkConstrExp^#(Error(e11, e12), T()) -> c_122() , checkConstrExp^#(Error(e11, e12), F()) -> c_123() , checkConstrExp^#(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> c_124() , checkConstrExp^#(Bsf(op1, b11, b12), Var(v2)) -> c_125() , checkConstrExp^#(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> c_126() , checkConstrExp^#(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> c_127() , checkConstrExp^#(Bsf(op1, b11, b12), Error(e21, e22)) -> c_128() , checkConstrExp^#(Bsf(op1, b11, b12), Bsf(op2, b21, b22)) -> c_129() , checkConstrExp^#(Bsf(op1, b11, b12), T()) -> c_130() , checkConstrExp^#(Bsf(op1, b11, b12), F()) -> c_131() , checkConstrExp^#(T(), Fun(fn2, fe2)) -> c_132() , checkConstrExp^#(T(), Var(v2)) -> c_133() , checkConstrExp^#(T(), ITE(i2, t2, e2)) -> c_134() , checkConstrExp^#(T(), Eq(eq21, eq22)) -> c_135() , checkConstrExp^#(T(), Error(e21, e22)) -> c_136() , checkConstrExp^#(T(), Bsf(op2, b21, b22)) -> c_137() , checkConstrExp^#(T(), T()) -> c_138() , checkConstrExp^#(T(), F()) -> c_139() , checkConstrExp^#(F(), Fun(fn2, fe2)) -> c_140() , checkConstrExp^#(F(), Var(v2)) -> c_141() , checkConstrExp^#(F(), ITE(i2, t2, e2)) -> c_142() , checkConstrExp^#(F(), Eq(eq21, eq22)) -> c_143() , checkConstrExp^#(F(), Error(e21, e22)) -> c_144() , checkConstrExp^#(F(), Bsf(op2, b21, b22)) -> c_145() , checkConstrExp^#(F(), T()) -> c_146() , checkConstrExp^#(F(), F()) -> c_147() , getIfTrue^#(ITE(i, t, e)) -> c_148() , getEqSecond^#(Eq(f, s)) -> c_149() , getEqFirst^#(Eq(f, s)) -> c_150() , getBsfOp^#(Bsf(op, t1, t2)) -> c_151() , getBsfFirstTerm^#(Bsf(op, t1, t2)) -> c_152() , getIfGuard^#(ITE(i, t, e)) -> c_153() , eqOps^#(o1, o2) -> c_154() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_4(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , lookvar^#(x', Cons(x, xs), vs) -> c_5(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs), !EQ^#(x', x)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_6(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_9(and^#(!EQ(fn1, fn2), eqExp(fe1, fe2)), !EQ^#(fn1, fn2), eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_27(and^#(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))), eqExp^#(i1, i2), and^#(eqExp(t1, t2), eqExp(e1, e2)), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_36(and^#(eqExp(eq11, eq21), eqExp(eq12, eq22)), eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_45(and^#(eqExp(e11, e21), eqExp(e12, e22)), eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_54(and^#(True(), and(eqExp(b11, b21), eqExp(b12, b22))), and^#(eqExp(b11, b21), eqExp(b12, b22)), eqExp^#(b11, b21), eqExp^#(b12, b22)) , apply^#(op, v1, v2) -> c_73(apply[Ite][True][Ite]^#(eqExp(v1, v2), op, v1, v2), eqExp^#(v1, v2)) , eeval^#(Var(int), ns, vs, p) -> c_77(lookvar^#(int, ns, vs)) } Weak DPs: { run[Let][Let]^#(p, input, f0, ef) -> c_169(lookname^#(f0, p)) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_156(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_158(lookvar^#(x', xs', xs)) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_171(lookname^#(f, xs)) } Weak Trs: { getFuncName(Fun(n, e)) -> n , run(Cons(Fun(f0, e), xs), input) -> run[Let][Let](Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))) , getIfFalse(ITE(i, t, e)) -> e , lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookvar(x', Cons(x, xs), vs) -> lookvar[Ite](!EQ(x', x), x', Cons(x, xs), vs) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , lookvar[Ite](True(), x', ns, Cons(x, xs)) -> x , lookvar[Ite](False(), x', Cons(x', xs'), Cons(x, xs)) -> lookvar(x', xs', xs) , lookname(f, Cons(Fun(n, e), xs)) -> lookname[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , apply[Ite][True][Ite](True(), op, v1, v2) -> T() , apply[Ite][True][Ite](False(), op, v1, v2) -> F() , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() , getConst(Cst(int)) -> int , getFuncExp(Fun(n, e)) -> e , eqExp(Fun(fn1, fe1), Fun(fn2, fe2)) -> and(!EQ(fn1, fn2), eqExp(fe1, fe2)) , eqExp(Fun(fn1, fe1), Var(v2)) -> False() , eqExp(Fun(fn1, fe1), ITE(i2, t2, e2)) -> False() , eqExp(Fun(fn1, fe1), Eq(eq21, eq22)) -> False() , eqExp(Fun(fn1, fe1), Error(e21, e22)) -> False() , eqExp(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> False() , eqExp(Fun(fn1, fe1), T()) -> False() , eqExp(Fun(fn1, fe1), F()) -> False() , eqExp(Var(v1), Fun(fn2, fe2)) -> False() , eqExp(Var(v1), Var(v2)) -> !EQ(v1, v2) , eqExp(Var(v1), ITE(i2, t2, e2)) -> False() , eqExp(Var(v1), Eq(eq21, eq22)) -> False() , eqExp(Var(v1), Error(e21, e22)) -> False() , eqExp(Var(v1), Bsf(op2, b21, b22)) -> False() , eqExp(Var(v1), T()) -> False() , eqExp(Var(v1), F()) -> False() , eqExp(ITE(i1, t1, e1), Fun(fn2, fe2)) -> False() , eqExp(ITE(i1, t1, e1), Var(v2)) -> False() , eqExp(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> and(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))) , eqExp(ITE(i1, t1, e1), Eq(eq21, eq22)) -> False() , eqExp(ITE(i1, t1, e1), Error(e21, e22)) -> False() , eqExp(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> False() , eqExp(ITE(i1, t1, e1), T()) -> False() , eqExp(ITE(i1, t1, e1), F()) -> False() , eqExp(Eq(eq11, eq12), Fun(fn2, fe2)) -> False() , eqExp(Eq(eq11, eq12), Var(v2)) -> False() , eqExp(Eq(eq11, eq12), ITE(i2, t2, e2)) -> False() , eqExp(Eq(eq11, eq12), Eq(eq21, eq22)) -> and(eqExp(eq11, eq21), eqExp(eq12, eq22)) , eqExp(Eq(eq11, eq12), Error(e21, e22)) -> False() , eqExp(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> False() , eqExp(Eq(eq11, eq12), T()) -> False() , eqExp(Eq(eq11, eq12), F()) -> False() , eqExp(Error(e11, e12), Fun(fn2, fe2)) -> False() , eqExp(Error(e11, e12), Var(v2)) -> False() , eqExp(Error(e11, e12), ITE(i2, t2, e2)) -> False() , eqExp(Error(e11, e12), Eq(eq21, eq22)) -> False() , eqExp(Error(e11, e12), Error(e21, e22)) -> and(eqExp(e11, e21), eqExp(e12, e22)) , eqExp(Error(e11, e12), Bsf(op2, b21, b22)) -> False() , eqExp(Error(e11, e12), T()) -> False() , eqExp(Error(e11, e12), F()) -> False() , eqExp(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> False() , eqExp(Bsf(op1, b11, b12), Var(v2)) -> False() , eqExp(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> False() , eqExp(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> False() , eqExp(Bsf(op1, b11, b12), Error(e21, e22)) -> False() , eqExp(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> and(True(), and(eqExp(b11, b21), eqExp(b12, b22))) , eqExp(Bsf(op1, b11, b12), T()) -> False() , eqExp(Bsf(op1, b11, b12), F()) -> False() , eqExp(T(), Fun(fn2, fe2)) -> False() , eqExp(T(), Var(v2)) -> False() , eqExp(T(), ITE(i2, t2, e2)) -> False() , eqExp(T(), Eq(eq21, eq22)) -> False() , eqExp(T(), Error(e21, e22)) -> False() , eqExp(T(), Bsf(op2, b21, b22)) -> False() , eqExp(T(), T()) -> True() , eqExp(T(), F()) -> False() , eqExp(F(), Fun(fn2, fe2)) -> False() , eqExp(F(), Var(v2)) -> False() , eqExp(F(), ITE(i2, t2, e2)) -> False() , eqExp(F(), Eq(eq21, eq22)) -> False() , eqExp(F(), Error(e21, e22)) -> False() , eqExp(F(), Bsf(op2, b21, b22)) -> False() , eqExp(F(), T()) -> False() , eqExp(F(), F()) -> True() , apply(op, v1, v2) -> apply[Ite][True][Ite](eqExp(v1, v2), op, v1, v2) , getVar(Var(int)) -> int , getBsfSecondTerm(Bsf(op, t1, t2)) -> t2 , eeval(Fun(fn1, fe1), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Fun(fn1, fe1), ns, vs, p) , eeval(Var(int), ns, vs, p) -> lookvar(int, ns, vs) , eeval(ITE(i1, t1, e1), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), ITE(i1, t1, e1), ns, vs, p) , eeval(Eq(eq11, eq12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Eq(eq11, eq12), ns, vs, p) , eeval(Error(e11, e12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Error(e11, e12), ns, vs, p) , eeval(Bsf(op1, b11, b12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](True(), Bsf(op1, b11, b12), ns, vs, p) , eeval(T(), ns, vs, p) -> T() , eeval(F(), ns, vs, p) -> F() , and(True(), True()) -> True() , and(True(), False()) -> False() , and(False(), True()) -> False() , and(False(), False()) -> False() , checkConstrExp(Fun(fn1, fe1), Fun(fn2, fe2)) -> True() , checkConstrExp(Fun(fn1, fe1), Var(v2)) -> False() , checkConstrExp(Fun(fn1, fe1), ITE(i2, t2, e2)) -> False() , checkConstrExp(Fun(fn1, fe1), Eq(eq21, eq22)) -> False() , checkConstrExp(Fun(fn1, fe1), Error(e21, e22)) -> False() , checkConstrExp(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Fun(fn1, fe1), T()) -> False() , checkConstrExp(Fun(fn1, fe1), F()) -> False() , checkConstrExp(Var(v1), Fun(fn2, fe2)) -> False() , checkConstrExp(Var(v1), Var(v2)) -> True() , checkConstrExp(Var(v1), ITE(i2, t2, e2)) -> False() , checkConstrExp(Var(v1), Eq(eq21, eq22)) -> False() , checkConstrExp(Var(v1), Error(e21, e22)) -> False() , checkConstrExp(Var(v1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Var(v1), T()) -> False() , checkConstrExp(Var(v1), F()) -> False() , checkConstrExp(ITE(i1, t1, e1), Fun(fn2, fe2)) -> False() , checkConstrExp(ITE(i1, t1, e1), Var(v2)) -> False() , checkConstrExp(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> True() , checkConstrExp(ITE(i1, t1, e1), Eq(eq21, eq22)) -> False() , checkConstrExp(ITE(i1, t1, e1), Error(e21, e22)) -> False() , checkConstrExp(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(ITE(i1, t1, e1), T()) -> False() , checkConstrExp(ITE(i1, t1, e1), F()) -> False() , checkConstrExp(Eq(eq11, eq12), Fun(fn2, fe2)) -> False() , checkConstrExp(Eq(eq11, eq12), Var(v2)) -> False() , checkConstrExp(Eq(eq11, eq12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Eq(eq11, eq12), Eq(eq21, eq22)) -> True() , checkConstrExp(Eq(eq11, eq12), Error(e21, e22)) -> False() , checkConstrExp(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Eq(eq11, eq12), T()) -> False() , checkConstrExp(Eq(eq11, eq12), F()) -> False() , checkConstrExp(Error(e11, e12), Fun(fn2, fe2)) -> False() , checkConstrExp(Error(e11, e12), Var(v2)) -> False() , checkConstrExp(Error(e11, e12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Error(e11, e12), Eq(eq21, eq22)) -> False() , checkConstrExp(Error(e11, e12), Error(e21, e22)) -> True() , checkConstrExp(Error(e11, e12), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Error(e11, e12), T()) -> False() , checkConstrExp(Error(e11, e12), F()) -> False() , checkConstrExp(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Var(v2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Error(e21, e22)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Bsf(op2, b21, b22)) -> True() , checkConstrExp(Bsf(op1, b11, b12), T()) -> False() , checkConstrExp(Bsf(op1, b11, b12), F()) -> False() , checkConstrExp(T(), Fun(fn2, fe2)) -> False() , checkConstrExp(T(), Var(v2)) -> False() , checkConstrExp(T(), ITE(i2, t2, e2)) -> False() , checkConstrExp(T(), Eq(eq21, eq22)) -> False() , checkConstrExp(T(), Error(e21, e22)) -> False() , checkConstrExp(T(), Bsf(op2, b21, b22)) -> False() , checkConstrExp(T(), T()) -> True() , checkConstrExp(T(), F()) -> False() , checkConstrExp(F(), Fun(fn2, fe2)) -> False() , checkConstrExp(F(), Var(v2)) -> False() , checkConstrExp(F(), ITE(i2, t2, e2)) -> False() , checkConstrExp(F(), Eq(eq21, eq22)) -> False() , checkConstrExp(F(), Error(e21, e22)) -> False() , checkConstrExp(F(), Bsf(op2, b21, b22)) -> False() , checkConstrExp(F(), T()) -> False() , checkConstrExp(F(), F()) -> True() , getIfTrue(ITE(i, t, e)) -> t , getEqSecond(Eq(f, s)) -> s , getEqFirst(Eq(f, s)) -> f , getBsfOp(Bsf(op, t1, t2)) -> op , getBsfFirstTerm(Bsf(op, t1, t2)) -> t1 , run[Let][Let](p, input, f0, ef) -> run[Let][Let][Let](p, input, f0, ef, lookname(f0, p)) , lookname[Ite](True(), f, Cons(Fun(n, e), xs)) -> n , lookname[Ite](False(), f, Cons(x, xs)) -> lookname(f, xs) , getIfGuard(ITE(i, t, e)) -> i , eqOps(o1, o2) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_4(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , lookvar^#(x', Cons(x, xs), vs) -> c_5(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs), !EQ^#(x', x)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_6(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)), !EQ^#(f, n)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_9(and^#(!EQ(fn1, fn2), eqExp(fe1, fe2)), !EQ^#(fn1, fn2), eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_27(and^#(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))), eqExp^#(i1, i2), and^#(eqExp(t1, t2), eqExp(e1, e2)), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_36(and^#(eqExp(eq11, eq21), eqExp(eq12, eq22)), eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_45(and^#(eqExp(e11, e21), eqExp(e12, e22)), eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_54(and^#(True(), and(eqExp(b11, b21), eqExp(b12, b22))), and^#(eqExp(b11, b21), eqExp(b12, b22)), eqExp^#(b11, b21), eqExp^#(b12, b22)) , apply^#(op, v1, v2) -> c_73(apply[Ite][True][Ite]^#(eqExp(v1, v2), op, v1, v2), eqExp^#(v1, v2)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) , apply^#(op, v1, v2) -> c_10(eqExp^#(v1, v2)) , eeval^#(Var(int), ns, vs, p) -> c_11(lookvar^#(int, ns, vs)) } Weak DPs: { run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) } Weak Trs: { getFuncName(Fun(n, e)) -> n , run(Cons(Fun(f0, e), xs), input) -> run[Let][Let](Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))) , getIfFalse(ITE(i, t, e)) -> e , lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookvar(x', Cons(x, xs), vs) -> lookvar[Ite](!EQ(x', x), x', Cons(x, xs), vs) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , lookvar[Ite](True(), x', ns, Cons(x, xs)) -> x , lookvar[Ite](False(), x', Cons(x', xs'), Cons(x, xs)) -> lookvar(x', xs', xs) , lookname(f, Cons(Fun(n, e), xs)) -> lookname[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , apply[Ite][True][Ite](True(), op, v1, v2) -> T() , apply[Ite][True][Ite](False(), op, v1, v2) -> F() , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() , getConst(Cst(int)) -> int , getFuncExp(Fun(n, e)) -> e , eqExp(Fun(fn1, fe1), Fun(fn2, fe2)) -> and(!EQ(fn1, fn2), eqExp(fe1, fe2)) , eqExp(Fun(fn1, fe1), Var(v2)) -> False() , eqExp(Fun(fn1, fe1), ITE(i2, t2, e2)) -> False() , eqExp(Fun(fn1, fe1), Eq(eq21, eq22)) -> False() , eqExp(Fun(fn1, fe1), Error(e21, e22)) -> False() , eqExp(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> False() , eqExp(Fun(fn1, fe1), T()) -> False() , eqExp(Fun(fn1, fe1), F()) -> False() , eqExp(Var(v1), Fun(fn2, fe2)) -> False() , eqExp(Var(v1), Var(v2)) -> !EQ(v1, v2) , eqExp(Var(v1), ITE(i2, t2, e2)) -> False() , eqExp(Var(v1), Eq(eq21, eq22)) -> False() , eqExp(Var(v1), Error(e21, e22)) -> False() , eqExp(Var(v1), Bsf(op2, b21, b22)) -> False() , eqExp(Var(v1), T()) -> False() , eqExp(Var(v1), F()) -> False() , eqExp(ITE(i1, t1, e1), Fun(fn2, fe2)) -> False() , eqExp(ITE(i1, t1, e1), Var(v2)) -> False() , eqExp(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> and(eqExp(i1, i2), and(eqExp(t1, t2), eqExp(e1, e2))) , eqExp(ITE(i1, t1, e1), Eq(eq21, eq22)) -> False() , eqExp(ITE(i1, t1, e1), Error(e21, e22)) -> False() , eqExp(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> False() , eqExp(ITE(i1, t1, e1), T()) -> False() , eqExp(ITE(i1, t1, e1), F()) -> False() , eqExp(Eq(eq11, eq12), Fun(fn2, fe2)) -> False() , eqExp(Eq(eq11, eq12), Var(v2)) -> False() , eqExp(Eq(eq11, eq12), ITE(i2, t2, e2)) -> False() , eqExp(Eq(eq11, eq12), Eq(eq21, eq22)) -> and(eqExp(eq11, eq21), eqExp(eq12, eq22)) , eqExp(Eq(eq11, eq12), Error(e21, e22)) -> False() , eqExp(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> False() , eqExp(Eq(eq11, eq12), T()) -> False() , eqExp(Eq(eq11, eq12), F()) -> False() , eqExp(Error(e11, e12), Fun(fn2, fe2)) -> False() , eqExp(Error(e11, e12), Var(v2)) -> False() , eqExp(Error(e11, e12), ITE(i2, t2, e2)) -> False() , eqExp(Error(e11, e12), Eq(eq21, eq22)) -> False() , eqExp(Error(e11, e12), Error(e21, e22)) -> and(eqExp(e11, e21), eqExp(e12, e22)) , eqExp(Error(e11, e12), Bsf(op2, b21, b22)) -> False() , eqExp(Error(e11, e12), T()) -> False() , eqExp(Error(e11, e12), F()) -> False() , eqExp(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> False() , eqExp(Bsf(op1, b11, b12), Var(v2)) -> False() , eqExp(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> False() , eqExp(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> False() , eqExp(Bsf(op1, b11, b12), Error(e21, e22)) -> False() , eqExp(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> and(True(), and(eqExp(b11, b21), eqExp(b12, b22))) , eqExp(Bsf(op1, b11, b12), T()) -> False() , eqExp(Bsf(op1, b11, b12), F()) -> False() , eqExp(T(), Fun(fn2, fe2)) -> False() , eqExp(T(), Var(v2)) -> False() , eqExp(T(), ITE(i2, t2, e2)) -> False() , eqExp(T(), Eq(eq21, eq22)) -> False() , eqExp(T(), Error(e21, e22)) -> False() , eqExp(T(), Bsf(op2, b21, b22)) -> False() , eqExp(T(), T()) -> True() , eqExp(T(), F()) -> False() , eqExp(F(), Fun(fn2, fe2)) -> False() , eqExp(F(), Var(v2)) -> False() , eqExp(F(), ITE(i2, t2, e2)) -> False() , eqExp(F(), Eq(eq21, eq22)) -> False() , eqExp(F(), Error(e21, e22)) -> False() , eqExp(F(), Bsf(op2, b21, b22)) -> False() , eqExp(F(), T()) -> False() , eqExp(F(), F()) -> True() , apply(op, v1, v2) -> apply[Ite][True][Ite](eqExp(v1, v2), op, v1, v2) , getVar(Var(int)) -> int , getBsfSecondTerm(Bsf(op, t1, t2)) -> t2 , eeval(Fun(fn1, fe1), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Fun(fn1, fe1), ns, vs, p) , eeval(Var(int), ns, vs, p) -> lookvar(int, ns, vs) , eeval(ITE(i1, t1, e1), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), ITE(i1, t1, e1), ns, vs, p) , eeval(Eq(eq11, eq12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Eq(eq11, eq12), ns, vs, p) , eeval(Error(e11, e12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](False(), Error(e11, e12), ns, vs, p) , eeval(Bsf(op1, b11, b12), ns, vs, p) -> eeval[Ite][False][Ite][False][Ite](True(), Bsf(op1, b11, b12), ns, vs, p) , eeval(T(), ns, vs, p) -> T() , eeval(F(), ns, vs, p) -> F() , and(True(), True()) -> True() , and(True(), False()) -> False() , and(False(), True()) -> False() , and(False(), False()) -> False() , checkConstrExp(Fun(fn1, fe1), Fun(fn2, fe2)) -> True() , checkConstrExp(Fun(fn1, fe1), Var(v2)) -> False() , checkConstrExp(Fun(fn1, fe1), ITE(i2, t2, e2)) -> False() , checkConstrExp(Fun(fn1, fe1), Eq(eq21, eq22)) -> False() , checkConstrExp(Fun(fn1, fe1), Error(e21, e22)) -> False() , checkConstrExp(Fun(fn1, fe1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Fun(fn1, fe1), T()) -> False() , checkConstrExp(Fun(fn1, fe1), F()) -> False() , checkConstrExp(Var(v1), Fun(fn2, fe2)) -> False() , checkConstrExp(Var(v1), Var(v2)) -> True() , checkConstrExp(Var(v1), ITE(i2, t2, e2)) -> False() , checkConstrExp(Var(v1), Eq(eq21, eq22)) -> False() , checkConstrExp(Var(v1), Error(e21, e22)) -> False() , checkConstrExp(Var(v1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Var(v1), T()) -> False() , checkConstrExp(Var(v1), F()) -> False() , checkConstrExp(ITE(i1, t1, e1), Fun(fn2, fe2)) -> False() , checkConstrExp(ITE(i1, t1, e1), Var(v2)) -> False() , checkConstrExp(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> True() , checkConstrExp(ITE(i1, t1, e1), Eq(eq21, eq22)) -> False() , checkConstrExp(ITE(i1, t1, e1), Error(e21, e22)) -> False() , checkConstrExp(ITE(i1, t1, e1), Bsf(op2, b21, b22)) -> False() , checkConstrExp(ITE(i1, t1, e1), T()) -> False() , checkConstrExp(ITE(i1, t1, e1), F()) -> False() , checkConstrExp(Eq(eq11, eq12), Fun(fn2, fe2)) -> False() , checkConstrExp(Eq(eq11, eq12), Var(v2)) -> False() , checkConstrExp(Eq(eq11, eq12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Eq(eq11, eq12), Eq(eq21, eq22)) -> True() , checkConstrExp(Eq(eq11, eq12), Error(e21, e22)) -> False() , checkConstrExp(Eq(eq11, eq12), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Eq(eq11, eq12), T()) -> False() , checkConstrExp(Eq(eq11, eq12), F()) -> False() , checkConstrExp(Error(e11, e12), Fun(fn2, fe2)) -> False() , checkConstrExp(Error(e11, e12), Var(v2)) -> False() , checkConstrExp(Error(e11, e12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Error(e11, e12), Eq(eq21, eq22)) -> False() , checkConstrExp(Error(e11, e12), Error(e21, e22)) -> True() , checkConstrExp(Error(e11, e12), Bsf(op2, b21, b22)) -> False() , checkConstrExp(Error(e11, e12), T()) -> False() , checkConstrExp(Error(e11, e12), F()) -> False() , checkConstrExp(Bsf(op1, b11, b12), Fun(fn2, fe2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Var(v2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), ITE(i2, t2, e2)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Eq(eq21, eq22)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Error(e21, e22)) -> False() , checkConstrExp(Bsf(op1, b11, b12), Bsf(op2, b21, b22)) -> True() , checkConstrExp(Bsf(op1, b11, b12), T()) -> False() , checkConstrExp(Bsf(op1, b11, b12), F()) -> False() , checkConstrExp(T(), Fun(fn2, fe2)) -> False() , checkConstrExp(T(), Var(v2)) -> False() , checkConstrExp(T(), ITE(i2, t2, e2)) -> False() , checkConstrExp(T(), Eq(eq21, eq22)) -> False() , checkConstrExp(T(), Error(e21, e22)) -> False() , checkConstrExp(T(), Bsf(op2, b21, b22)) -> False() , checkConstrExp(T(), T()) -> True() , checkConstrExp(T(), F()) -> False() , checkConstrExp(F(), Fun(fn2, fe2)) -> False() , checkConstrExp(F(), Var(v2)) -> False() , checkConstrExp(F(), ITE(i2, t2, e2)) -> False() , checkConstrExp(F(), Eq(eq21, eq22)) -> False() , checkConstrExp(F(), Error(e21, e22)) -> False() , checkConstrExp(F(), Bsf(op2, b21, b22)) -> False() , checkConstrExp(F(), T()) -> False() , checkConstrExp(F(), F()) -> True() , getIfTrue(ITE(i, t, e)) -> t , getEqSecond(Eq(f, s)) -> s , getEqFirst(Eq(f, s)) -> f , getBsfOp(Bsf(op, t1, t2)) -> op , getBsfFirstTerm(Bsf(op, t1, t2)) -> t1 , run[Let][Let](p, input, f0, ef) -> run[Let][Let][Let](p, input, f0, ef, lookname(f0, p)) , lookname[Ite](True(), f, Cons(Fun(n, e), xs)) -> n , lookname[Ite](False(), f, Cons(x, xs)) -> lookname(f, xs) , getIfGuard(ITE(i, t, e)) -> i , eqOps(o1, o2) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We replace rewrite rules by usable rules: Weak Usable Rules: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) , apply^#(op, v1, v2) -> c_10(eqExp^#(v1, v2)) , eeval^#(Var(int), ns, vs, p) -> c_11(lookvar^#(int, ns, vs)) } Weak DPs: { run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Consider the dependency graph 1: run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) -->_1 run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) :12 -->_2 lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) :2 2: lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) -->_1 lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) :13 3: lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) -->_1 lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) :14 4: lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) -->_1 lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) :15 5: eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) -->_1 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_1 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_1 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_1 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_1 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 6: eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) -->_3 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_2 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_1 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_3 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_2 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_1 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_3 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_2 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_1 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_3 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_2 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_1 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_3 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 -->_2 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 -->_1 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 7: eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) -->_2 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_1 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_2 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_1 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_2 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_1 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_2 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_1 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_2 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 -->_1 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 8: eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) -->_2 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_1 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_2 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_1 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_2 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_1 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_2 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_1 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_2 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 -->_1 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 9: eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) -->_2 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_1 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_2 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_1 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_2 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_1 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_2 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_1 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_2 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 -->_1 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 10: apply^#(op, v1, v2) -> c_10(eqExp^#(v1, v2)) -->_1 eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) :9 -->_1 eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) :8 -->_1 eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) :7 -->_1 eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) :6 -->_1 eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) :5 11: eeval^#(Var(int), ns, vs, p) -> c_11(lookvar^#(int, ns, vs)) -->_1 lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) :3 12: run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) -->_1 lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) :4 13: lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) -->_1 lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) :2 14: lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) -->_1 lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) :3 15: lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) -->_1 lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) :4 Following roots of the dependency graph are removed, as the considered set of starting terms is closed under reduction with respect to these rules (modulo compound contexts). { apply^#(op, v1, v2) -> c_10(eqExp^#(v1, v2)) , eeval^#(Var(int), ns, vs, p) -> c_11(lookvar^#(int, ns, vs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component: Problem (R): ------------ Strict DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) } Weak DPs: { run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } StartTerms: basic terms Defined Symbols: getFuncName^# run^# run[Let][Let]^# lookbody^# getIfFalse^# lookbody[Ite]^# !EQ^# lookvar^# lookvar[Ite]^# lookname^# lookname[Ite]^# getConst^# getFuncExp^# eqExp^# and^# apply^# apply[Ite][True][Ite]^# getVar^# getBsfSecondTerm^# eeval^# checkConstrExp^# getIfTrue^# getEqSecond^# getEqFirst^# getBsfOp^# getBsfFirstTerm^# getIfGuard^# eqOps^# Constructors: True Fun Var ITE run[Let][Let][Let] Eq Error Cons Bsf False Cst eeval[Ite][False][Ite][False][Ite] S 0 T F Strategy: innermost Problem (S): ------------ Strict DPs: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } StartTerms: basic terms Defined Symbols: getFuncName^# run^# run[Let][Let]^# lookbody^# getIfFalse^# lookbody[Ite]^# !EQ^# lookvar^# lookvar[Ite]^# lookname^# lookname[Ite]^# getConst^# getFuncExp^# eqExp^# and^# apply^# apply[Ite][True][Ite]^# getVar^# getBsfSecondTerm^# eeval^# checkConstrExp^# getIfTrue^# getEqSecond^# getEqFirst^# getBsfOp^# getBsfFirstTerm^# getIfGuard^# eqOps^# Constructors: True Fun Var ITE run[Let][Let][Let] Eq Error Cons Bsf False Cst eeval[Ite][False][Ite][False][Ite] S 0 T F Strategy: innermost Overall, the transformation results in the following sub-problem(s): Generated new problems: ----------------------- R) Strict DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) } Weak DPs: { run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } StartTerms: basic terms Defined Symbols: getFuncName^# run^# run[Let][Let]^# lookbody^# getIfFalse^# lookbody[Ite]^# !EQ^# lookvar^# lookvar[Ite]^# lookname^# lookname[Ite]^# getConst^# getFuncExp^# eqExp^# and^# apply^# apply[Ite][True][Ite]^# getVar^# getBsfSecondTerm^# eeval^# checkConstrExp^# getIfTrue^# getEqSecond^# getEqFirst^# getBsfOp^# getBsfFirstTerm^# getIfGuard^# eqOps^# Constructors: True Fun Var ITE run[Let][Let][Let] Eq Error Cons Bsf False Cst eeval[Ite][False][Ite][False][Ite] S 0 T F Strategy: innermost This problem was proven YES(O(1),O(n^1)). S) Strict DPs: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } StartTerms: basic terms Defined Symbols: getFuncName^# run^# run[Let][Let]^# lookbody^# getIfFalse^# lookbody[Ite]^# !EQ^# lookvar^# lookvar[Ite]^# lookname^# lookname[Ite]^# getConst^# getFuncExp^# eqExp^# and^# apply^# apply[Ite][True][Ite]^# getVar^# getBsfSecondTerm^# eeval^# checkConstrExp^# getIfTrue^# getEqSecond^# getEqFirst^# getBsfOp^# getBsfFirstTerm^# getIfGuard^# eqOps^# Constructors: True Fun Var ITE run[Let][Let][Let] Eq Error Cons Bsf False Cst eeval[Ite][False][Ite][False][Ite] S 0 T F Strategy: innermost This problem was proven YES(O(1),O(n^1)). Proofs for generated problems: ------------------------------ R) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) } Weak DPs: { run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We estimate the number of application of {1} by applications of Pre({1}) = {}. Here rules are labeled as follows: DPs: { 1: run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , 2: lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , 3: run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , 4: lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , 5: lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , 6: lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , 7: lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , 8: lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) , 9: eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , 10: eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , 11: eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , 12: eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , 13: eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookname^#(f, Cons(Fun(n, e), xs)) -> c_1(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs)))) , run[Let][Let]^#(p, input, f0, ef) -> c_3(lookname^#(f0, p)) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_4(lookname^#(f, xs)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: lookname^#(f, Cons(Fun(n, e), xs)) -> c_1(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , 2: run^#(Cons(Fun(f0, e), xs), input) -> c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs)))) } Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1}, Uargs(c_3) = {1}, Uargs(c_4) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [getFuncName](x1) = [7] x1 + [0] [run](x1, x2) = [7] x1 + [7] x2 + [0] [True] = [0] [Fun](x1, x2) = [1] x2 + [0] [Var](x1) = [1] x1 + [0] [getIfFalse](x1) = [7] x1 + [0] [lookbody](x1, x2) = [2] x2 + [6] [lookvar](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [ITE](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] [lookbody[Ite]](x1, x2, x3) = [2] x3 + [4] [run[Let][Let][Let]](x1, x2, x3, x4, x5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] [lookvar[Ite]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname](x1, x2) = [7] x1 + [7] x2 + [0] [apply[Ite][True][Ite]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [!EQ](x1, x2) = [0] [getConst](x1) = [7] x1 + [0] [Eq](x1, x2) = [1] x1 + [1] x2 + [0] [getFuncExp](x1) = [7] x1 + [0] [Error](x1, x2) = [1] x1 + [1] x2 + [0] [Cons](x1, x2) = [1] x1 + [1] x2 + [1] [eqExp](x1, x2) = [7] x1 + [7] x2 + [0] [Bsf](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] [False] = [0] [apply](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [Cst](x1) = [1] x1 + [0] [getVar](x1) = [7] x1 + [0] [getBsfSecondTerm](x1) = [7] x1 + [0] [eeval[Ite][False][Ite][False][Ite]](x1, x2, x3, x4, x5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] [eeval](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [and](x1, x2) = [7] x1 + [7] x2 + [0] [checkConstrExp](x1, x2) = [7] x1 + [7] x2 + [0] [getIfTrue](x1) = [7] x1 + [0] [getEqSecond](x1) = [7] x1 + [0] [getEqFirst](x1) = [7] x1 + [0] [S](x1) = [1] x1 + [0] [0] = [0] [getBsfOp](x1) = [7] x1 + [0] [getBsfFirstTerm](x1) = [7] x1 + [0] [T] = [0] [run[Let][Let]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname[Ite]](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [getIfGuard](x1) = [7] x1 + [0] [F] = [0] [eqOps](x1, x2) = [7] x1 + [7] x2 + [0] [getFuncName^#](x1) = [7] x1 + [0] [c_1] = [0] [run^#](x1, x2) = [5] x1 + [7] x2 + [7] [c_2](x1, x2) = [7] x1 + [7] x2 + [0] [run[Let][Let]^#](x1, x2, x3, x4) = [4] x1 + [7] x2 + [4] [lookbody^#](x1, x2) = [7] x1 + [7] x2 + [0] [getIfFalse^#](x1) = [7] x1 + [0] [c_3] = [0] [c_4](x1, x2) = [7] x1 + [7] x2 + [0] [lookbody[Ite]^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [!EQ^#](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_5](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar[Ite]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname^#](x1, x2) = [2] x2 + [2] [c_6](x1, x2) = [7] x1 + [7] x2 + [0] [lookname[Ite]^#](x1, x2, x3) = [2] x3 + [0] [getConst^#](x1) = [7] x1 + [0] [c_7] = [0] [getFuncExp^#](x1) = [7] x1 + [0] [c_8] = [0] [eqExp^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_9](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [and^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_10] = [0] [c_11] = [0] [c_12] = [0] [c_13] = [0] [c_14] = [0] [c_15] = [0] [c_16] = [0] [c_17] = [0] [c_18](x1) = [7] x1 + [0] [c_19] = [0] [c_20] = [0] [c_21] = [0] [c_22] = [0] [c_23] = [0] [c_24] = [0] [c_25] = [0] [c_26] = [0] [c_27](x1, x2, x3, x4, x5) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [7] x5 + [0] [c_28] = [0] [c_29] = [0] [c_30] = [0] [c_31] = [0] [c_32] = [0] [c_33] = [0] [c_34] = [0] [c_35] = [0] [c_36](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_37] = [0] [c_38] = [0] [c_39] = [0] [c_40] = [0] [c_41] = [0] [c_42] = [0] [c_43] = [0] [c_44] = [0] [c_45](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_46] = [0] [c_47] = [0] [c_48] = [0] [c_49] = [0] [c_50] = [0] [c_51] = [0] [c_52] = [0] [c_53] = [0] [c_54](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_55] = [0] [c_56] = [0] [c_57] = [0] [c_58] = [0] [c_59] = [0] [c_60] = [0] [c_61] = [0] [c_62] = [0] [c_63] = [0] [c_64] = [0] [c_65] = [0] [c_66] = [0] [c_67] = [0] [c_68] = [0] [c_69] = [0] [c_70] = [0] [c_71] = [0] [c_72] = [0] [apply^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_73](x1, x2) = [7] x1 + [7] x2 + [0] [apply[Ite][True][Ite]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [getVar^#](x1) = [7] x1 + [0] [c_74] = [0] [getBsfSecondTerm^#](x1) = [7] x1 + [0] [c_75] = [0] [eeval^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_76] = [0] [c_77](x1) = [7] x1 + [0] [c_78] = [0] [c_79] = [0] [c_80] = [0] [c_81] = [0] [c_82] = [0] [c_83] = [0] [checkConstrExp^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_84] = [0] [c_85] = [0] [c_86] = [0] [c_87] = [0] [c_88] = [0] [c_89] = [0] [c_90] = [0] [c_91] = [0] [c_92] = [0] [c_93] = [0] [c_94] = [0] [c_95] = [0] [c_96] = [0] [c_97] = [0] [c_98] = [0] [c_99] = [0] [c_100] = [0] [c_101] = [0] [c_102] = [0] [c_103] = [0] [c_104] = [0] [c_105] = [0] [c_106] = [0] [c_107] = [0] [c_108] = [0] [c_109] = [0] [c_110] = [0] [c_111] = [0] [c_112] = [0] [c_113] = [0] [c_114] = [0] [c_115] = [0] [c_116] = [0] [c_117] = [0] [c_118] = [0] [c_119] = [0] [c_120] = [0] [c_121] = [0] [c_122] = [0] [c_123] = [0] [c_124] = [0] [c_125] = [0] [c_126] = [0] [c_127] = [0] [c_128] = [0] [c_129] = [0] [c_130] = [0] [c_131] = [0] [c_132] = [0] [c_133] = [0] [c_134] = [0] [c_135] = [0] [c_136] = [0] [c_137] = [0] [c_138] = [0] [c_139] = [0] [c_140] = [0] [c_141] = [0] [c_142] = [0] [c_143] = [0] [c_144] = [0] [c_145] = [0] [c_146] = [0] [c_147] = [0] [getIfTrue^#](x1) = [7] x1 + [0] [c_148] = [0] [getEqSecond^#](x1) = [7] x1 + [0] [c_149] = [0] [getEqFirst^#](x1) = [7] x1 + [0] [c_150] = [0] [getBsfOp^#](x1) = [7] x1 + [0] [c_151] = [0] [getBsfFirstTerm^#](x1) = [7] x1 + [0] [c_152] = [0] [getIfGuard^#](x1) = [7] x1 + [0] [c_153] = [0] [eqOps^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_154] = [0] [c_155] = [0] [c_156](x1) = [7] x1 + [0] [c_157] = [0] [c_158](x1) = [7] x1 + [0] [c_159] = [0] [c_160] = [0] [c_161](x1) = [7] x1 + [0] [c_162] = [0] [c_163] = [0] [c_164] = [0] [c_165] = [0] [c_166] = [0] [c_167] = [0] [c_168] = [0] [c_169](x1) = [7] x1 + [0] [c_170] = [0] [c_171](x1) = [7] x1 + [0] [c] = [0] [c_1](x1, x2) = [7] x1 + [7] x2 + [0] [c_2](x1) = [7] x1 + [0] [c_3](x1) = [7] x1 + [0] [c_4](x1) = [7] x1 + [0] [c_5](x1) = [7] x1 + [0] [c_6](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_7](x1, x2) = [7] x1 + [7] x2 + [0] [c_8](x1, x2) = [7] x1 + [7] x2 + [0] [c_9](x1, x2) = [7] x1 + [7] x2 + [0] [c_10](x1) = [7] x1 + [0] [c_11](x1) = [7] x1 + [0] [c_12](x1) = [7] x1 + [0] [c_13](x1) = [7] x1 + [0] [c_14](x1) = [7] x1 + [0] [c_15](x1) = [7] x1 + [0] [c] = [0] [c_1](x1) = [1] x1 + [0] [c_2](x1) = [1] x1 + [3] [c_3](x1) = [2] x1 + [0] [c_4](x1) = [1] x1 + [0] The following symbols are considered usable {lookbody, lookbody[Ite], !EQ, run^#, run[Let][Let]^#, lookname^#, lookname[Ite]^#} The order satisfies the following ordering constraints: [lookbody(f, Cons(Fun(n, e), xs))] = [2] e + [2] xs + [8] > [2] e + [2] xs + [6] = [lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs))] [lookbody[Ite](True(), f, Cons(Fun(n, e), xs))] = [2] e + [2] xs + [6] > [1] e + [0] = [e] [lookbody[Ite](False(), f, Cons(x, xs))] = [2] xs + [2] x + [6] >= [2] xs + [6] = [lookbody(f, xs)] [!EQ(S(x), S(y))] = [0] >= [0] = [!EQ(x, y)] [!EQ(S(x), 0())] = [0] >= [0] = [False()] [!EQ(0(), S(y))] = [0] >= [0] = [False()] [!EQ(0(), 0())] = [0] >= [0] = [True()] [run^#(Cons(Fun(f0, e), xs), input)] = [5] e + [5] xs + [7] input + [12] > [4] e + [4] xs + [7] input + [11] = [c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))))] [run[Let][Let]^#(p, input, f0, ef)] = [4] p + [7] input + [4] >= [4] p + [4] = [c_3(lookname^#(f0, p))] [lookname^#(f, Cons(Fun(n, e), xs))] = [2] e + [2] xs + [4] > [2] e + [2] xs + [2] = [c_1(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)))] [lookname[Ite]^#(False(), f, Cons(x, xs))] = [2] xs + [2] x + [2] >= [2] xs + [2] = [c_4(lookname^#(f, xs))] We return to the main proof. Consider the set of all dependency pairs : { 1: lookname^#(f, Cons(Fun(n, e), xs)) -> c_1(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , 2: run^#(Cons(Fun(f0, e), xs), input) -> c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs)))) , 3: run[Let][Let]^#(p, input, f0, ef) -> c_3(lookname^#(f0, p)) , 4: lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_4(lookname^#(f, xs)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1,2}. These cover all (indirect) predecessors of dependency pairs {1,2,3,4}, their number of application is equally bounded. The dependency pairs are shifted into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs)))) , run[Let][Let]^#(p, input, f0, ef) -> c_3(lookname^#(f0, p)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_1(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_4(lookname^#(f, xs)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { run^#(Cons(Fun(f0, e), xs), input) -> c_2(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs)))) , run[Let][Let]^#(p, input, f0, ef) -> c_3(lookname^#(f0, p)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_1(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_4(lookname^#(f, xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded S) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { run[Let][Let]^#(p, input, f0, ef) -> c_12(lookname^#(f0, p)) , lookname^#(f, Cons(Fun(n, e), xs)) -> c_4(lookname[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookname[Ite]^#(False(), f, Cons(x, xs)) -> c_15(lookname^#(f, xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_2(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookvar^#(x', Cons(x, xs), vs) -> c_3(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_5(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_6(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_7(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_8(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_9(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_13(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_14(lookvar^#(x', xs', xs)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { run^#(Cons(Fun(f0, e), xs), input) -> c_1(run[Let][Let]^#(Cons(Fun(f0, e), xs), input, f0, lookbody(f0, Cons(Fun(f0, e), xs))), lookbody^#(f0, Cons(Fun(f0, e), xs))) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) } Weak Trs: { lookbody(f, Cons(Fun(n, e), xs)) -> lookbody[Ite](!EQ(f, n), f, Cons(Fun(n, e), xs)) , lookbody[Ite](True(), f, Cons(Fun(n, e), xs)) -> e , lookbody[Ite](False(), f, Cons(x, xs)) -> lookbody(f, xs) , !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We replace rewrite rules by usable rules: Weak Usable Rules: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component: Problem (R): ------------ Strict DPs: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) , lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } StartTerms: basic terms Defined Symbols: getFuncName^# run^# run[Let][Let]^# lookbody^# getIfFalse^# lookbody[Ite]^# !EQ^# lookvar^# lookvar[Ite]^# lookname^# lookname[Ite]^# getConst^# getFuncExp^# eqExp^# and^# apply^# apply[Ite][True][Ite]^# getVar^# getBsfSecondTerm^# eeval^# checkConstrExp^# getIfTrue^# getEqSecond^# getEqFirst^# getBsfOp^# getBsfFirstTerm^# getIfGuard^# eqOps^# Constructors: True Fun Var ITE run[Let][Let][Let] Eq Error Cons Bsf False Cst eeval[Ite][False][Ite][False][Ite] S 0 T F Strategy: innermost Problem (S): ------------ Strict DPs: { lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } StartTerms: basic terms Defined Symbols: getFuncName^# run^# run[Let][Let]^# lookbody^# getIfFalse^# lookbody[Ite]^# !EQ^# lookvar^# lookvar[Ite]^# lookname^# lookname[Ite]^# getConst^# getFuncExp^# eqExp^# and^# apply^# apply[Ite][True][Ite]^# getVar^# getBsfSecondTerm^# eeval^# checkConstrExp^# getIfTrue^# getEqSecond^# getEqFirst^# getBsfOp^# getBsfFirstTerm^# getIfGuard^# eqOps^# Constructors: True Fun Var ITE run[Let][Let][Let] Eq Error Cons Bsf False Cst eeval[Ite][False][Ite][False][Ite] S 0 T F Strategy: innermost Overall, the transformation results in the following sub-problem(s): Generated new problems: ----------------------- R) Strict DPs: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) , lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } StartTerms: basic terms Defined Symbols: getFuncName^# run^# run[Let][Let]^# lookbody^# getIfFalse^# lookbody[Ite]^# !EQ^# lookvar^# lookvar[Ite]^# lookname^# lookname[Ite]^# getConst^# getFuncExp^# eqExp^# and^# apply^# apply[Ite][True][Ite]^# getVar^# getBsfSecondTerm^# eeval^# checkConstrExp^# getIfTrue^# getEqSecond^# getEqFirst^# getBsfOp^# getBsfFirstTerm^# getIfGuard^# eqOps^# Constructors: True Fun Var ITE run[Let][Let][Let] Eq Error Cons Bsf False Cst eeval[Ite][False][Ite][False][Ite] S 0 T F Strategy: innermost This problem was proven YES(O(1),O(n^1)). S) Strict DPs: { lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } StartTerms: basic terms Defined Symbols: getFuncName^# run^# run[Let][Let]^# lookbody^# getIfFalse^# lookbody[Ite]^# !EQ^# lookvar^# lookvar[Ite]^# lookname^# lookname[Ite]^# getConst^# getFuncExp^# eqExp^# and^# apply^# apply[Ite][True][Ite]^# getVar^# getBsfSecondTerm^# eeval^# checkConstrExp^# getIfTrue^# getEqSecond^# getEqFirst^# getBsfOp^# getBsfFirstTerm^# getIfGuard^# eqOps^# Constructors: True Fun Var ITE run[Let][Let][Let] Eq Error Cons Bsf False Cst eeval[Ite][False][Ite][False][Ite] S 0 T F Strategy: innermost This problem was proven YES(O(1),O(n^1)). Proofs for generated problems: ------------------------------ R) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) , lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 2: run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , 3: lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_8) = {1}, Uargs(c_9) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [getFuncName](x1) = [7] x1 + [0] [run](x1, x2) = [7] x1 + [7] x2 + [0] [True] = [0] [Fun](x1, x2) = [0] [Var](x1) = [1] x1 + [0] [getIfFalse](x1) = [7] x1 + [0] [lookbody](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [ITE](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] [lookbody[Ite]](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [run[Let][Let][Let]](x1, x2, x3, x4, x5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] [lookvar[Ite]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname](x1, x2) = [7] x1 + [7] x2 + [0] [apply[Ite][True][Ite]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [!EQ](x1, x2) = [0] [getConst](x1) = [7] x1 + [0] [Eq](x1, x2) = [1] x1 + [1] x2 + [0] [getFuncExp](x1) = [7] x1 + [0] [Error](x1, x2) = [1] x1 + [1] x2 + [0] [Cons](x1, x2) = [1] x2 + [4] [eqExp](x1, x2) = [7] x1 + [7] x2 + [0] [Bsf](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] [False] = [0] [apply](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [Cst](x1) = [1] x1 + [0] [getVar](x1) = [7] x1 + [0] [getBsfSecondTerm](x1) = [7] x1 + [0] [eeval[Ite][False][Ite][False][Ite]](x1, x2, x3, x4, x5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] [eeval](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [and](x1, x2) = [7] x1 + [7] x2 + [0] [checkConstrExp](x1, x2) = [7] x1 + [7] x2 + [0] [getIfTrue](x1) = [7] x1 + [0] [getEqSecond](x1) = [7] x1 + [0] [getEqFirst](x1) = [7] x1 + [0] [S](x1) = [1] x1 + [0] [0] = [0] [getBsfOp](x1) = [7] x1 + [0] [getBsfFirstTerm](x1) = [7] x1 + [0] [T] = [0] [run[Let][Let]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname[Ite]](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [getIfGuard](x1) = [7] x1 + [0] [F] = [0] [eqOps](x1, x2) = [7] x1 + [7] x2 + [0] [getFuncName^#](x1) = [7] x1 + [0] [c_1] = [0] [run^#](x1, x2) = [2] x1 + [7] x2 + [7] [c_2](x1, x2) = [7] x1 + [7] x2 + [0] [run[Let][Let]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookbody^#](x1, x2) = [2] x2 + [0] [getIfFalse^#](x1) = [7] x1 + [0] [c_3] = [0] [c_4](x1, x2) = [7] x1 + [7] x2 + [0] [lookbody[Ite]^#](x1, x2, x3) = [2] x3 + [0] [!EQ^#](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_5](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar[Ite]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_6](x1, x2) = [7] x1 + [7] x2 + [0] [lookname[Ite]^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [getConst^#](x1) = [7] x1 + [0] [c_7] = [0] [getFuncExp^#](x1) = [7] x1 + [0] [c_8] = [0] [eqExp^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_9](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [and^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_10] = [0] [c_11] = [0] [c_12] = [0] [c_13] = [0] [c_14] = [0] [c_15] = [0] [c_16] = [0] [c_17] = [0] [c_18](x1) = [7] x1 + [0] [c_19] = [0] [c_20] = [0] [c_21] = [0] [c_22] = [0] [c_23] = [0] [c_24] = [0] [c_25] = [0] [c_26] = [0] [c_27](x1, x2, x3, x4, x5) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [7] x5 + [0] [c_28] = [0] [c_29] = [0] [c_30] = [0] [c_31] = [0] [c_32] = [0] [c_33] = [0] [c_34] = [0] [c_35] = [0] [c_36](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_37] = [0] [c_38] = [0] [c_39] = [0] [c_40] = [0] [c_41] = [0] [c_42] = [0] [c_43] = [0] [c_44] = [0] [c_45](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_46] = [0] [c_47] = [0] [c_48] = [0] [c_49] = [0] [c_50] = [0] [c_51] = [0] [c_52] = [0] [c_53] = [0] [c_54](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_55] = [0] [c_56] = [0] [c_57] = [0] [c_58] = [0] [c_59] = [0] [c_60] = [0] [c_61] = [0] [c_62] = [0] [c_63] = [0] [c_64] = [0] [c_65] = [0] [c_66] = [0] [c_67] = [0] [c_68] = [0] [c_69] = [0] [c_70] = [0] [c_71] = [0] [c_72] = [0] [apply^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_73](x1, x2) = [7] x1 + [7] x2 + [0] [apply[Ite][True][Ite]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [getVar^#](x1) = [7] x1 + [0] [c_74] = [0] [getBsfSecondTerm^#](x1) = [7] x1 + [0] [c_75] = [0] [eeval^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_76] = [0] [c_77](x1) = [7] x1 + [0] [c_78] = [0] [c_79] = [0] [c_80] = [0] [c_81] = [0] [c_82] = [0] [c_83] = [0] [checkConstrExp^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_84] = [0] [c_85] = [0] [c_86] = [0] [c_87] = [0] [c_88] = [0] [c_89] = [0] [c_90] = [0] [c_91] = [0] [c_92] = [0] [c_93] = [0] [c_94] = [0] [c_95] = [0] [c_96] = [0] [c_97] = [0] [c_98] = [0] [c_99] = [0] [c_100] = [0] [c_101] = [0] [c_102] = [0] [c_103] = [0] [c_104] = [0] [c_105] = [0] [c_106] = [0] [c_107] = [0] [c_108] = [0] [c_109] = [0] [c_110] = [0] [c_111] = [0] [c_112] = [0] [c_113] = [0] [c_114] = [0] [c_115] = [0] [c_116] = [0] [c_117] = [0] [c_118] = [0] [c_119] = [0] [c_120] = [0] [c_121] = [0] [c_122] = [0] [c_123] = [0] [c_124] = [0] [c_125] = [0] [c_126] = [0] [c_127] = [0] [c_128] = [0] [c_129] = [0] [c_130] = [0] [c_131] = [0] [c_132] = [0] [c_133] = [0] [c_134] = [0] [c_135] = [0] [c_136] = [0] [c_137] = [0] [c_138] = [0] [c_139] = [0] [c_140] = [0] [c_141] = [0] [c_142] = [0] [c_143] = [0] [c_144] = [0] [c_145] = [0] [c_146] = [0] [c_147] = [0] [getIfTrue^#](x1) = [7] x1 + [0] [c_148] = [0] [getEqSecond^#](x1) = [7] x1 + [0] [c_149] = [0] [getEqFirst^#](x1) = [7] x1 + [0] [c_150] = [0] [getBsfOp^#](x1) = [7] x1 + [0] [c_151] = [0] [getBsfFirstTerm^#](x1) = [7] x1 + [0] [c_152] = [0] [getIfGuard^#](x1) = [7] x1 + [0] [c_153] = [0] [eqOps^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_154] = [0] [c_155] = [0] [c_156](x1) = [7] x1 + [0] [c_157] = [0] [c_158](x1) = [7] x1 + [0] [c_159] = [0] [c_160] = [0] [c_161](x1) = [7] x1 + [0] [c_162] = [0] [c_163] = [0] [c_164] = [0] [c_165] = [0] [c_166] = [0] [c_167] = [0] [c_168] = [0] [c_169](x1) = [7] x1 + [0] [c_170] = [0] [c_171](x1) = [7] x1 + [0] [c] = [0] [c_1](x1, x2) = [7] x1 + [7] x2 + [0] [c_2](x1) = [7] x1 + [0] [c_3](x1) = [7] x1 + [0] [c_4](x1) = [7] x1 + [0] [c_5](x1) = [7] x1 + [0] [c_6](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_7](x1, x2) = [7] x1 + [7] x2 + [0] [c_8](x1, x2) = [7] x1 + [7] x2 + [0] [c_9](x1, x2) = [7] x1 + [7] x2 + [0] [c_10](x1) = [7] x1 + [0] [c_11](x1) = [7] x1 + [0] [c_12](x1) = [7] x1 + [0] [c_13](x1) = [7] x1 + [0] [c_14](x1) = [7] x1 + [0] [c_15](x1) = [7] x1 + [0] [c] = [0] [c_1](x1) = [1] x1 + [0] [c_2](x1) = [7] x1 + [0] [c_3](x1) = [7] x1 + [0] [c_4](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_5](x1, x2) = [7] x1 + [7] x2 + [0] [c_6](x1, x2) = [7] x1 + [7] x2 + [0] [c_7](x1, x2) = [7] x1 + [7] x2 + [0] [c_8](x1) = [1] x1 + [3] [c_9](x1) = [1] x1 + [1] [c_10](x1) = [7] x1 + [0] The following symbols are considered usable {!EQ, run^#, lookbody^#, lookbody[Ite]^#} The order satisfies the following ordering constraints: [!EQ(S(x), S(y))] = [0] >= [0] = [!EQ(x, y)] [!EQ(S(x), 0())] = [0] >= [0] = [False()] [!EQ(0(), S(y))] = [0] >= [0] = [False()] [!EQ(0(), 0())] = [0] >= [0] = [True()] [run^#(Cons(Fun(f0, e), xs), input)] = [2] xs + [7] input + [15] > [2] xs + [11] = [c_8(lookbody^#(f0, Cons(Fun(f0, e), xs)))] [lookbody^#(f, Cons(Fun(n, e), xs))] = [2] xs + [8] >= [2] xs + [8] = [c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs)))] [lookbody[Ite]^#(False(), f, Cons(x, xs))] = [2] xs + [8] > [2] xs + [1] = [c_9(lookbody^#(f, xs))] We return to the main proof. Consider the set of all dependency pairs : { 1: lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , 2: run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , 3: lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {2,3}. These cover all (indirect) predecessors of dependency pairs {1,2,3}, their number of application is equally bounded. The dependency pairs are shifted into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded S) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { run^#(Cons(Fun(f0, e), xs), input) -> c_8(lookbody^#(f0, Cons(Fun(f0, e), xs))) , lookbody^#(f, Cons(Fun(n, e), xs)) -> c_1(lookbody[Ite]^#(!EQ(f, n), f, Cons(Fun(n, e), xs))) , lookbody[Ite]^#(False(), f, Cons(x, xs)) -> c_9(lookbody^#(f, xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak DPs: { lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 4: eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , 5: eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , 6: eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_2) = {1}, Uargs(c_3) = {1}, Uargs(c_4) = {1, 2, 3}, Uargs(c_5) = {1, 2}, Uargs(c_6) = {1, 2}, Uargs(c_7) = {1, 2}, Uargs(c_10) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [getFuncName](x1) = [7] x1 + [0] [run](x1, x2) = [7] x1 + [7] x2 + [0] [True] = [0] [Fun](x1, x2) = [1] x1 + [1] x2 + [0] [Var](x1) = [1] x1 + [0] [getIfFalse](x1) = [7] x1 + [0] [lookbody](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [ITE](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] [lookbody[Ite]](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [run[Let][Let][Let]](x1, x2, x3, x4, x5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] [lookvar[Ite]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname](x1, x2) = [7] x1 + [7] x2 + [0] [apply[Ite][True][Ite]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [!EQ](x1, x2) = [0] [getConst](x1) = [7] x1 + [0] [Eq](x1, x2) = [1] x1 + [1] x2 + [4] [getFuncExp](x1) = [7] x1 + [0] [Error](x1, x2) = [1] x1 + [1] x2 + [4] [Cons](x1, x2) = [0] [eqExp](x1, x2) = [7] x1 + [7] x2 + [0] [Bsf](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [4] [False] = [0] [apply](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [Cst](x1) = [1] x1 + [0] [getVar](x1) = [7] x1 + [0] [getBsfSecondTerm](x1) = [7] x1 + [0] [eeval[Ite][False][Ite][False][Ite]](x1, x2, x3, x4, x5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] [eeval](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [and](x1, x2) = [7] x1 + [7] x2 + [0] [checkConstrExp](x1, x2) = [7] x1 + [7] x2 + [0] [getIfTrue](x1) = [7] x1 + [0] [getEqSecond](x1) = [7] x1 + [0] [getEqFirst](x1) = [7] x1 + [0] [S](x1) = [1] x1 + [0] [0] = [0] [getBsfOp](x1) = [7] x1 + [0] [getBsfFirstTerm](x1) = [7] x1 + [0] [T] = [0] [run[Let][Let]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname[Ite]](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [getIfGuard](x1) = [7] x1 + [0] [F] = [0] [eqOps](x1, x2) = [7] x1 + [7] x2 + [0] [getFuncName^#](x1) = [7] x1 + [0] [c_1] = [0] [run^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_2](x1, x2) = [7] x1 + [7] x2 + [0] [run[Let][Let]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookbody^#](x1, x2) = [7] x1 + [7] x2 + [0] [getIfFalse^#](x1) = [7] x1 + [0] [c_3] = [0] [c_4](x1, x2) = [7] x1 + [7] x2 + [0] [lookbody[Ite]^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [!EQ^#](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar^#](x1, x2, x3) = [0] [c_5](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar[Ite]^#](x1, x2, x3, x4) = [0] [lookname^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_6](x1, x2) = [7] x1 + [7] x2 + [0] [lookname[Ite]^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [getConst^#](x1) = [7] x1 + [0] [c_7] = [0] [getFuncExp^#](x1) = [7] x1 + [0] [c_8] = [0] [eqExp^#](x1, x2) = [2] x2 + [0] [c_9](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [and^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_10] = [0] [c_11] = [0] [c_12] = [0] [c_13] = [0] [c_14] = [0] [c_15] = [0] [c_16] = [0] [c_17] = [0] [c_18](x1) = [7] x1 + [0] [c_19] = [0] [c_20] = [0] [c_21] = [0] [c_22] = [0] [c_23] = [0] [c_24] = [0] [c_25] = [0] [c_26] = [0] [c_27](x1, x2, x3, x4, x5) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [7] x5 + [0] [c_28] = [0] [c_29] = [0] [c_30] = [0] [c_31] = [0] [c_32] = [0] [c_33] = [0] [c_34] = [0] [c_35] = [0] [c_36](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_37] = [0] [c_38] = [0] [c_39] = [0] [c_40] = [0] [c_41] = [0] [c_42] = [0] [c_43] = [0] [c_44] = [0] [c_45](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_46] = [0] [c_47] = [0] [c_48] = [0] [c_49] = [0] [c_50] = [0] [c_51] = [0] [c_52] = [0] [c_53] = [0] [c_54](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_55] = [0] [c_56] = [0] [c_57] = [0] [c_58] = [0] [c_59] = [0] [c_60] = [0] [c_61] = [0] [c_62] = [0] [c_63] = [0] [c_64] = [0] [c_65] = [0] [c_66] = [0] [c_67] = [0] [c_68] = [0] [c_69] = [0] [c_70] = [0] [c_71] = [0] [c_72] = [0] [apply^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_73](x1, x2) = [7] x1 + [7] x2 + [0] [apply[Ite][True][Ite]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [getVar^#](x1) = [7] x1 + [0] [c_74] = [0] [getBsfSecondTerm^#](x1) = [7] x1 + [0] [c_75] = [0] [eeval^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_76] = [0] [c_77](x1) = [7] x1 + [0] [c_78] = [0] [c_79] = [0] [c_80] = [0] [c_81] = [0] [c_82] = [0] [c_83] = [0] [checkConstrExp^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_84] = [0] [c_85] = [0] [c_86] = [0] [c_87] = [0] [c_88] = [0] [c_89] = [0] [c_90] = [0] [c_91] = [0] [c_92] = [0] [c_93] = [0] [c_94] = [0] [c_95] = [0] [c_96] = [0] [c_97] = [0] [c_98] = [0] [c_99] = [0] [c_100] = [0] [c_101] = [0] [c_102] = [0] [c_103] = [0] [c_104] = [0] [c_105] = [0] [c_106] = [0] [c_107] = [0] [c_108] = [0] [c_109] = [0] [c_110] = [0] [c_111] = [0] [c_112] = [0] [c_113] = [0] [c_114] = [0] [c_115] = [0] [c_116] = [0] [c_117] = [0] [c_118] = [0] [c_119] = [0] [c_120] = [0] [c_121] = [0] [c_122] = [0] [c_123] = [0] [c_124] = [0] [c_125] = [0] [c_126] = [0] [c_127] = [0] [c_128] = [0] [c_129] = [0] [c_130] = [0] [c_131] = [0] [c_132] = [0] [c_133] = [0] [c_134] = [0] [c_135] = [0] [c_136] = [0] [c_137] = [0] [c_138] = [0] [c_139] = [0] [c_140] = [0] [c_141] = [0] [c_142] = [0] [c_143] = [0] [c_144] = [0] [c_145] = [0] [c_146] = [0] [c_147] = [0] [getIfTrue^#](x1) = [7] x1 + [0] [c_148] = [0] [getEqSecond^#](x1) = [7] x1 + [0] [c_149] = [0] [getEqFirst^#](x1) = [7] x1 + [0] [c_150] = [0] [getBsfOp^#](x1) = [7] x1 + [0] [c_151] = [0] [getBsfFirstTerm^#](x1) = [7] x1 + [0] [c_152] = [0] [getIfGuard^#](x1) = [7] x1 + [0] [c_153] = [0] [eqOps^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_154] = [0] [c_155] = [0] [c_156](x1) = [7] x1 + [0] [c_157] = [0] [c_158](x1) = [7] x1 + [0] [c_159] = [0] [c_160] = [0] [c_161](x1) = [7] x1 + [0] [c_162] = [0] [c_163] = [0] [c_164] = [0] [c_165] = [0] [c_166] = [0] [c_167] = [0] [c_168] = [0] [c_169](x1) = [7] x1 + [0] [c_170] = [0] [c_171](x1) = [7] x1 + [0] [c] = [0] [c_1](x1, x2) = [7] x1 + [7] x2 + [0] [c_2](x1) = [7] x1 + [0] [c_3](x1) = [7] x1 + [0] [c_4](x1) = [7] x1 + [0] [c_5](x1) = [7] x1 + [0] [c_6](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_7](x1, x2) = [7] x1 + [7] x2 + [0] [c_8](x1, x2) = [7] x1 + [7] x2 + [0] [c_9](x1, x2) = [7] x1 + [7] x2 + [0] [c_10](x1) = [7] x1 + [0] [c_11](x1) = [7] x1 + [0] [c_12](x1) = [7] x1 + [0] [c_13](x1) = [7] x1 + [0] [c_14](x1) = [7] x1 + [0] [c_15](x1) = [7] x1 + [0] [c] = [0] [c_1](x1) = [7] x1 + [0] [c_2](x1) = [2] x1 + [0] [c_3](x1) = [1] x1 + [0] [c_4](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] [c_5](x1, x2) = [1] x1 + [1] x2 + [3] [c_6](x1, x2) = [1] x1 + [1] x2 + [7] [c_7](x1, x2) = [1] x1 + [1] x2 + [5] [c_8](x1) = [7] x1 + [0] [c_9](x1) = [7] x1 + [0] [c_10](x1) = [2] x1 + [0] The following symbols are considered usable {!EQ, lookvar^#, lookvar[Ite]^#, eqExp^#} The order satisfies the following ordering constraints: [!EQ(S(x), S(y))] = [0] >= [0] = [!EQ(x, y)] [!EQ(S(x), 0())] = [0] >= [0] = [False()] [!EQ(0(), S(y))] = [0] >= [0] = [False()] [!EQ(0(), 0())] = [0] >= [0] = [True()] [lookvar^#(x', Cons(x, xs), vs)] = [0] >= [0] = [c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs))] [lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs))] = [0] >= [0] = [c_10(lookvar^#(x', xs', xs))] [eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2))] = [2] fn2 + [2] fe2 + [0] >= [2] fe2 + [0] = [c_3(eqExp^#(fe1, fe2))] [eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2))] = [2] i2 + [2] t2 + [2] e2 + [0] >= [2] i2 + [2] t2 + [2] e2 + [0] = [c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2))] [eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22))] = [2] eq21 + [2] eq22 + [8] > [2] eq21 + [2] eq22 + [3] = [c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22))] [eqExp^#(Error(e11, e12), Error(e21, e22))] = [2] e21 + [2] e22 + [8] > [2] e21 + [2] e22 + [7] = [c_6(eqExp^#(e11, e21), eqExp^#(e12, e22))] [eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22))] = [2] b21 + [2] b22 + [2] o2 + [8] > [2] b21 + [2] b22 + [5] = [c_7(eqExp^#(b11, b21), eqExp^#(b12, b22))] The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) } Weak DPs: { lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 2: eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , 3: eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) } Trs: { !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Sub-proof: ---------- The following argument positions are usable: Uargs(c_2) = {1}, Uargs(c_3) = {1}, Uargs(c_4) = {1, 2, 3}, Uargs(c_5) = {1, 2}, Uargs(c_6) = {1, 2}, Uargs(c_7) = {1, 2}, Uargs(c_10) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [getFuncName](x1) = [7] x1 + [0] [run](x1, x2) = [7] x1 + [7] x2 + [0] [True] = [3] [Fun](x1, x2) = [1] x1 + [1] x2 + [4] [Var](x1) = [1] x1 + [0] [getIfFalse](x1) = [7] x1 + [0] [lookbody](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [ITE](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [4] [lookbody[Ite]](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [run[Let][Let][Let]](x1, x2, x3, x4, x5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] [lookvar[Ite]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname](x1, x2) = [7] x1 + [7] x2 + [0] [apply[Ite][True][Ite]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [!EQ](x1, x2) = [4] [getConst](x1) = [7] x1 + [0] [Eq](x1, x2) = [1] x1 + [1] x2 + [0] [getFuncExp](x1) = [7] x1 + [0] [Error](x1, x2) = [1] x1 + [1] x2 + [0] [Cons](x1, x2) = [0] [eqExp](x1, x2) = [7] x1 + [7] x2 + [0] [Bsf](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] [False] = [0] [apply](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [Cst](x1) = [1] x1 + [0] [getVar](x1) = [7] x1 + [0] [getBsfSecondTerm](x1) = [7] x1 + [0] [eeval[Ite][False][Ite][False][Ite]](x1, x2, x3, x4, x5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] [eeval](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [and](x1, x2) = [7] x1 + [7] x2 + [0] [checkConstrExp](x1, x2) = [7] x1 + [7] x2 + [0] [getIfTrue](x1) = [7] x1 + [0] [getEqSecond](x1) = [7] x1 + [0] [getEqFirst](x1) = [7] x1 + [0] [S](x1) = [1] x1 + [0] [0] = [0] [getBsfOp](x1) = [7] x1 + [0] [getBsfFirstTerm](x1) = [7] x1 + [0] [T] = [0] [run[Let][Let]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname[Ite]](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [getIfGuard](x1) = [7] x1 + [0] [F] = [0] [eqOps](x1, x2) = [7] x1 + [7] x2 + [0] [getFuncName^#](x1) = [7] x1 + [0] [c_1] = [0] [run^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_2](x1, x2) = [7] x1 + [7] x2 + [0] [run[Let][Let]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookbody^#](x1, x2) = [7] x1 + [7] x2 + [0] [getIfFalse^#](x1) = [7] x1 + [0] [c_3] = [0] [c_4](x1, x2) = [7] x1 + [7] x2 + [0] [lookbody[Ite]^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [!EQ^#](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar^#](x1, x2, x3) = [0] [c_5](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar[Ite]^#](x1, x2, x3, x4) = [0] [lookname^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_6](x1, x2) = [7] x1 + [7] x2 + [0] [lookname[Ite]^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [getConst^#](x1) = [7] x1 + [0] [c_7] = [0] [getFuncExp^#](x1) = [7] x1 + [0] [c_8] = [0] [eqExp^#](x1, x2) = [2] x2 + [0] [c_9](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [and^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_10] = [0] [c_11] = [0] [c_12] = [0] [c_13] = [0] [c_14] = [0] [c_15] = [0] [c_16] = [0] [c_17] = [0] [c_18](x1) = [7] x1 + [0] [c_19] = [0] [c_20] = [0] [c_21] = [0] [c_22] = [0] [c_23] = [0] [c_24] = [0] [c_25] = [0] [c_26] = [0] [c_27](x1, x2, x3, x4, x5) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [7] x5 + [0] [c_28] = [0] [c_29] = [0] [c_30] = [0] [c_31] = [0] [c_32] = [0] [c_33] = [0] [c_34] = [0] [c_35] = [0] [c_36](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_37] = [0] [c_38] = [0] [c_39] = [0] [c_40] = [0] [c_41] = [0] [c_42] = [0] [c_43] = [0] [c_44] = [0] [c_45](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_46] = [0] [c_47] = [0] [c_48] = [0] [c_49] = [0] [c_50] = [0] [c_51] = [0] [c_52] = [0] [c_53] = [0] [c_54](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_55] = [0] [c_56] = [0] [c_57] = [0] [c_58] = [0] [c_59] = [0] [c_60] = [0] [c_61] = [0] [c_62] = [0] [c_63] = [0] [c_64] = [0] [c_65] = [0] [c_66] = [0] [c_67] = [0] [c_68] = [0] [c_69] = [0] [c_70] = [0] [c_71] = [0] [c_72] = [0] [apply^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_73](x1, x2) = [7] x1 + [7] x2 + [0] [apply[Ite][True][Ite]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [getVar^#](x1) = [7] x1 + [0] [c_74] = [0] [getBsfSecondTerm^#](x1) = [7] x1 + [0] [c_75] = [0] [eeval^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_76] = [0] [c_77](x1) = [7] x1 + [0] [c_78] = [0] [c_79] = [0] [c_80] = [0] [c_81] = [0] [c_82] = [0] [c_83] = [0] [checkConstrExp^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_84] = [0] [c_85] = [0] [c_86] = [0] [c_87] = [0] [c_88] = [0] [c_89] = [0] [c_90] = [0] [c_91] = [0] [c_92] = [0] [c_93] = [0] [c_94] = [0] [c_95] = [0] [c_96] = [0] [c_97] = [0] [c_98] = [0] [c_99] = [0] [c_100] = [0] [c_101] = [0] [c_102] = [0] [c_103] = [0] [c_104] = [0] [c_105] = [0] [c_106] = [0] [c_107] = [0] [c_108] = [0] [c_109] = [0] [c_110] = [0] [c_111] = [0] [c_112] = [0] [c_113] = [0] [c_114] = [0] [c_115] = [0] [c_116] = [0] [c_117] = [0] [c_118] = [0] [c_119] = [0] [c_120] = [0] [c_121] = [0] [c_122] = [0] [c_123] = [0] [c_124] = [0] [c_125] = [0] [c_126] = [0] [c_127] = [0] [c_128] = [0] [c_129] = [0] [c_130] = [0] [c_131] = [0] [c_132] = [0] [c_133] = [0] [c_134] = [0] [c_135] = [0] [c_136] = [0] [c_137] = [0] [c_138] = [0] [c_139] = [0] [c_140] = [0] [c_141] = [0] [c_142] = [0] [c_143] = [0] [c_144] = [0] [c_145] = [0] [c_146] = [0] [c_147] = [0] [getIfTrue^#](x1) = [7] x1 + [0] [c_148] = [0] [getEqSecond^#](x1) = [7] x1 + [0] [c_149] = [0] [getEqFirst^#](x1) = [7] x1 + [0] [c_150] = [0] [getBsfOp^#](x1) = [7] x1 + [0] [c_151] = [0] [getBsfFirstTerm^#](x1) = [7] x1 + [0] [c_152] = [0] [getIfGuard^#](x1) = [7] x1 + [0] [c_153] = [0] [eqOps^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_154] = [0] [c_155] = [0] [c_156](x1) = [7] x1 + [0] [c_157] = [0] [c_158](x1) = [7] x1 + [0] [c_159] = [0] [c_160] = [0] [c_161](x1) = [7] x1 + [0] [c_162] = [0] [c_163] = [0] [c_164] = [0] [c_165] = [0] [c_166] = [0] [c_167] = [0] [c_168] = [0] [c_169](x1) = [7] x1 + [0] [c_170] = [0] [c_171](x1) = [7] x1 + [0] [c] = [0] [c_1](x1, x2) = [7] x1 + [7] x2 + [0] [c_2](x1) = [7] x1 + [0] [c_3](x1) = [7] x1 + [0] [c_4](x1) = [7] x1 + [0] [c_5](x1) = [7] x1 + [0] [c_6](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_7](x1, x2) = [7] x1 + [7] x2 + [0] [c_8](x1, x2) = [7] x1 + [7] x2 + [0] [c_9](x1, x2) = [7] x1 + [7] x2 + [0] [c_10](x1) = [7] x1 + [0] [c_11](x1) = [7] x1 + [0] [c_12](x1) = [7] x1 + [0] [c_13](x1) = [7] x1 + [0] [c_14](x1) = [7] x1 + [0] [c_15](x1) = [7] x1 + [0] [c] = [0] [c_1](x1) = [7] x1 + [0] [c_2](x1) = [2] x1 + [0] [c_3](x1) = [1] x1 + [1] [c_4](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [3] [c_5](x1, x2) = [1] x1 + [1] x2 + [0] [c_6](x1, x2) = [1] x1 + [1] x2 + [0] [c_7](x1, x2) = [1] x1 + [1] x2 + [0] [c_8](x1) = [7] x1 + [0] [c_9](x1) = [7] x1 + [0] [c_10](x1) = [1] x1 + [0] The following symbols are considered usable {!EQ, lookvar^#, lookvar[Ite]^#, eqExp^#} The order satisfies the following ordering constraints: [!EQ(S(x), S(y))] = [4] >= [4] = [!EQ(x, y)] [!EQ(S(x), 0())] = [4] > [0] = [False()] [!EQ(0(), S(y))] = [4] > [0] = [False()] [!EQ(0(), 0())] = [4] > [3] = [True()] [lookvar^#(x', Cons(x, xs), vs)] = [0] >= [0] = [c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs))] [lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs))] = [0] >= [0] = [c_10(lookvar^#(x', xs', xs))] [eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2))] = [2] fn2 + [2] fe2 + [8] > [2] fe2 + [1] = [c_3(eqExp^#(fe1, fe2))] [eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2))] = [2] i2 + [2] t2 + [2] e2 + [8] > [2] i2 + [2] t2 + [2] e2 + [3] = [c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2))] [eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22))] = [2] eq21 + [2] eq22 + [0] >= [2] eq21 + [2] eq22 + [0] = [c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22))] [eqExp^#(Error(e11, e12), Error(e21, e22))] = [2] e21 + [2] e22 + [0] >= [2] e21 + [2] e22 + [0] = [c_6(eqExp^#(e11, e21), eqExp^#(e12, e22))] [eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22))] = [2] b21 + [2] b22 + [2] o2 + [0] >= [2] b21 + [2] b22 + [0] = [c_7(eqExp^#(b11, b21), eqExp^#(b12, b22))] The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) } Weak DPs: { lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) , eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { eqExp^#(Fun(fn1, fe1), Fun(fn2, fe2)) -> c_3(eqExp^#(fe1, fe2)) , eqExp^#(ITE(i1, t1, e1), ITE(i2, t2, e2)) -> c_4(eqExp^#(i1, i2), eqExp^#(t1, t2), eqExp^#(e1, e2)) , eqExp^#(Eq(eq11, eq12), Eq(eq21, eq22)) -> c_5(eqExp^#(eq11, eq21), eqExp^#(eq12, eq22)) , eqExp^#(Error(e11, e12), Error(e21, e22)) -> c_6(eqExp^#(e11, e21), eqExp^#(e12, e22)) , eqExp^#(Bsf(o1, b11, b12), Bsf(o2, b21, b22)) -> c_7(eqExp^#(b11, b21), eqExp^#(b12, b22)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) } Weak DPs: { lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_2) = {1}, Uargs(c_10) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [getFuncName](x1) = [7] x1 + [0] [run](x1, x2) = [7] x1 + [7] x2 + [0] [True] = [0] [Fun](x1, x2) = [1] x1 + [1] x2 + [0] [Var](x1) = [1] x1 + [0] [getIfFalse](x1) = [7] x1 + [0] [lookbody](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [ITE](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] [lookbody[Ite]](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [run[Let][Let][Let]](x1, x2, x3, x4, x5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] [lookvar[Ite]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname](x1, x2) = [7] x1 + [7] x2 + [0] [apply[Ite][True][Ite]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [!EQ](x1, x2) = [0] [getConst](x1) = [7] x1 + [0] [Eq](x1, x2) = [1] x1 + [1] x2 + [0] [getFuncExp](x1) = [7] x1 + [0] [Error](x1, x2) = [1] x1 + [1] x2 + [0] [Cons](x1, x2) = [1] x2 + [4] [eqExp](x1, x2) = [7] x1 + [7] x2 + [0] [Bsf](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] [False] = [0] [apply](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [Cst](x1) = [1] x1 + [0] [getVar](x1) = [7] x1 + [0] [getBsfSecondTerm](x1) = [7] x1 + [0] [eeval[Ite][False][Ite][False][Ite]](x1, x2, x3, x4, x5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] [eeval](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [and](x1, x2) = [7] x1 + [7] x2 + [0] [checkConstrExp](x1, x2) = [7] x1 + [7] x2 + [0] [getIfTrue](x1) = [7] x1 + [0] [getEqSecond](x1) = [7] x1 + [0] [getEqFirst](x1) = [7] x1 + [0] [S](x1) = [1] x1 + [0] [0] = [0] [getBsfOp](x1) = [7] x1 + [0] [getBsfFirstTerm](x1) = [7] x1 + [0] [T] = [0] [run[Let][Let]](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookname[Ite]](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [getIfGuard](x1) = [7] x1 + [0] [F] = [0] [eqOps](x1, x2) = [7] x1 + [7] x2 + [0] [getFuncName^#](x1) = [7] x1 + [0] [c_1] = [0] [run^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_2](x1, x2) = [7] x1 + [7] x2 + [0] [run[Let][Let]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [lookbody^#](x1, x2) = [7] x1 + [7] x2 + [0] [getIfFalse^#](x1) = [7] x1 + [0] [c_3] = [0] [c_4](x1, x2) = [7] x1 + [7] x2 + [0] [lookbody[Ite]^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [!EQ^#](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar^#](x1, x2, x3) = [1] x2 + [4] [c_5](x1, x2) = [7] x1 + [7] x2 + [0] [lookvar[Ite]^#](x1, x2, x3, x4) = [1] x3 + [0] [lookname^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_6](x1, x2) = [7] x1 + [7] x2 + [0] [lookname[Ite]^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [getConst^#](x1) = [7] x1 + [0] [c_7] = [0] [getFuncExp^#](x1) = [7] x1 + [0] [c_8] = [0] [eqExp^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_9](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [and^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_10] = [0] [c_11] = [0] [c_12] = [0] [c_13] = [0] [c_14] = [0] [c_15] = [0] [c_16] = [0] [c_17] = [0] [c_18](x1) = [7] x1 + [0] [c_19] = [0] [c_20] = [0] [c_21] = [0] [c_22] = [0] [c_23] = [0] [c_24] = [0] [c_25] = [0] [c_26] = [0] [c_27](x1, x2, x3, x4, x5) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [7] x5 + [0] [c_28] = [0] [c_29] = [0] [c_30] = [0] [c_31] = [0] [c_32] = [0] [c_33] = [0] [c_34] = [0] [c_35] = [0] [c_36](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_37] = [0] [c_38] = [0] [c_39] = [0] [c_40] = [0] [c_41] = [0] [c_42] = [0] [c_43] = [0] [c_44] = [0] [c_45](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_46] = [0] [c_47] = [0] [c_48] = [0] [c_49] = [0] [c_50] = [0] [c_51] = [0] [c_52] = [0] [c_53] = [0] [c_54](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_55] = [0] [c_56] = [0] [c_57] = [0] [c_58] = [0] [c_59] = [0] [c_60] = [0] [c_61] = [0] [c_62] = [0] [c_63] = [0] [c_64] = [0] [c_65] = [0] [c_66] = [0] [c_67] = [0] [c_68] = [0] [c_69] = [0] [c_70] = [0] [c_71] = [0] [c_72] = [0] [apply^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_73](x1, x2) = [7] x1 + [7] x2 + [0] [apply[Ite][True][Ite]^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [getVar^#](x1) = [7] x1 + [0] [c_74] = [0] [getBsfSecondTerm^#](x1) = [7] x1 + [0] [c_75] = [0] [eeval^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_76] = [0] [c_77](x1) = [7] x1 + [0] [c_78] = [0] [c_79] = [0] [c_80] = [0] [c_81] = [0] [c_82] = [0] [c_83] = [0] [checkConstrExp^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_84] = [0] [c_85] = [0] [c_86] = [0] [c_87] = [0] [c_88] = [0] [c_89] = [0] [c_90] = [0] [c_91] = [0] [c_92] = [0] [c_93] = [0] [c_94] = [0] [c_95] = [0] [c_96] = [0] [c_97] = [0] [c_98] = [0] [c_99] = [0] [c_100] = [0] [c_101] = [0] [c_102] = [0] [c_103] = [0] [c_104] = [0] [c_105] = [0] [c_106] = [0] [c_107] = [0] [c_108] = [0] [c_109] = [0] [c_110] = [0] [c_111] = [0] [c_112] = [0] [c_113] = [0] [c_114] = [0] [c_115] = [0] [c_116] = [0] [c_117] = [0] [c_118] = [0] [c_119] = [0] [c_120] = [0] [c_121] = [0] [c_122] = [0] [c_123] = [0] [c_124] = [0] [c_125] = [0] [c_126] = [0] [c_127] = [0] [c_128] = [0] [c_129] = [0] [c_130] = [0] [c_131] = [0] [c_132] = [0] [c_133] = [0] [c_134] = [0] [c_135] = [0] [c_136] = [0] [c_137] = [0] [c_138] = [0] [c_139] = [0] [c_140] = [0] [c_141] = [0] [c_142] = [0] [c_143] = [0] [c_144] = [0] [c_145] = [0] [c_146] = [0] [c_147] = [0] [getIfTrue^#](x1) = [7] x1 + [0] [c_148] = [0] [getEqSecond^#](x1) = [7] x1 + [0] [c_149] = [0] [getEqFirst^#](x1) = [7] x1 + [0] [c_150] = [0] [getBsfOp^#](x1) = [7] x1 + [0] [c_151] = [0] [getBsfFirstTerm^#](x1) = [7] x1 + [0] [c_152] = [0] [getIfGuard^#](x1) = [7] x1 + [0] [c_153] = [0] [eqOps^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_154] = [0] [c_155] = [0] [c_156](x1) = [7] x1 + [0] [c_157] = [0] [c_158](x1) = [7] x1 + [0] [c_159] = [0] [c_160] = [0] [c_161](x1) = [7] x1 + [0] [c_162] = [0] [c_163] = [0] [c_164] = [0] [c_165] = [0] [c_166] = [0] [c_167] = [0] [c_168] = [0] [c_169](x1) = [7] x1 + [0] [c_170] = [0] [c_171](x1) = [7] x1 + [0] [c] = [0] [c_1](x1, x2) = [7] x1 + [7] x2 + [0] [c_2](x1) = [7] x1 + [0] [c_3](x1) = [7] x1 + [0] [c_4](x1) = [7] x1 + [0] [c_5](x1) = [7] x1 + [0] [c_6](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_7](x1, x2) = [7] x1 + [7] x2 + [0] [c_8](x1, x2) = [7] x1 + [7] x2 + [0] [c_9](x1, x2) = [7] x1 + [7] x2 + [0] [c_10](x1) = [7] x1 + [0] [c_11](x1) = [7] x1 + [0] [c_12](x1) = [7] x1 + [0] [c_13](x1) = [7] x1 + [0] [c_14](x1) = [7] x1 + [0] [c_15](x1) = [7] x1 + [0] [c] = [0] [c_1](x1) = [7] x1 + [0] [c_2](x1) = [1] x1 + [1] [c_3](x1) = [7] x1 + [0] [c_4](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_5](x1, x2) = [7] x1 + [7] x2 + [0] [c_6](x1, x2) = [7] x1 + [7] x2 + [0] [c_7](x1, x2) = [7] x1 + [7] x2 + [0] [c_8](x1) = [7] x1 + [0] [c_9](x1) = [7] x1 + [0] [c_10](x1) = [1] x1 + [0] The following symbols are considered usable {!EQ, lookvar^#, lookvar[Ite]^#} The order satisfies the following ordering constraints: [!EQ(S(x), S(y))] = [0] >= [0] = [!EQ(x, y)] [!EQ(S(x), 0())] = [0] >= [0] = [False()] [!EQ(0(), S(y))] = [0] >= [0] = [False()] [!EQ(0(), 0())] = [0] >= [0] = [True()] [lookvar^#(x', Cons(x, xs), vs)] = [1] xs + [8] > [1] xs + [5] = [c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs))] [lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs))] = [1] xs' + [4] >= [1] xs' + [4] = [c_10(lookvar^#(x', xs', xs))] We return to the main proof. Consider the set of all dependency pairs : { 1: lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , 2: lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1}. These cover all (indirect) predecessors of dependency pairs {1,2}, their number of application is equally bounded. The dependency pairs are shifted into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) } Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { lookvar^#(x', Cons(x, xs), vs) -> c_2(lookvar[Ite]^#(!EQ(x', x), x', Cons(x, xs), vs)) , lookvar[Ite]^#(False(), x', Cons(x', xs'), Cons(x, xs)) -> c_10(lookvar^#(x', xs', xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { !EQ(S(x), S(y)) -> !EQ(x, y) , !EQ(S(x), 0()) -> False() , !EQ(0(), S(y)) -> False() , !EQ(0(), 0()) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^1))