Time: 5.097445
TRS:
 {       Cond_isdiv(true(), x, y) -> false(),
                      sieve nil() -> nil(),
                sieve cons(x, ys) -> cons(x, sieve filter(x, ys)),
            if(false(), x, y, zs) -> cons(y, filter(x, zs)),
             if(true(), x, y, zs) -> filter(x, zs),
                      isdiv(x, y) -> Cond_isdiv(and(greater_int(x, y), greater_int(y, pos 0())), x, y),
                      isdiv(x, y) -> Cond_isdiv1(and(greatereq_int(y, x), greater_int(x, pos 0())), x, y),
                isdiv(x, pos 0()) -> Cond_isdiv2(greater_int(x, pos 0()), x),
                 filter(x, nil()) -> nil(),
           filter(x, cons(y, zs)) -> if(isdiv(x, y), x, y, zs),
         Cond_nats1(true(), x, y) -> nil(),
    greater_int(pos 0(), pos 0()) -> false(),
    greater_int(pos 0(), pos s y) -> false(),
    greater_int(pos 0(), neg 0()) -> false(),
    greater_int(pos 0(), neg s y) -> true(),
    greater_int(pos s x, pos 0()) -> true(),
    greater_int(pos s x, pos s y) -> greater_int(pos x, pos y),
    greater_int(pos s x, neg 0()) -> true(),
    greater_int(pos s x, neg s y) -> true(),
    greater_int(neg 0(), pos 0()) -> false(),
    greater_int(neg 0(), pos s y) -> false(),
    greater_int(neg 0(), neg 0()) -> false(),
    greater_int(neg 0(), neg s y) -> true(),
    greater_int(neg s x, pos 0()) -> false(),
    greater_int(neg s x, pos s y) -> false(),
    greater_int(neg s x, neg 0()) -> false(),
    greater_int(neg s x, neg s y) -> greater_int(neg x, neg y),
                       nats(x, y) -> Cond_nats1(greater_int(x, y), x, y),
                       nats(x, y) -> Cond_nats(greatereq_int(y, x), x, y),
          Cond_nats(true(), x, y) -> cons(x, nats(plus_int(pos s 0(), x), y)),
    greatereq_int(pos x, pos 0()) -> true(),
      greatereq_int(pos x, neg y) -> true(),
  greatereq_int(pos 0(), pos s y) -> false(),
  greatereq_int(pos s x, pos s y) -> greatereq_int(pos x, pos y),
    greatereq_int(neg x, pos s y) -> false(),
  greatereq_int(neg 0(), pos 0()) -> true(),
    greatereq_int(neg 0(), neg y) -> true(),
  greatereq_int(neg s x, pos 0()) -> false(),
  greatereq_int(neg s x, neg 0()) -> false(),
  greatereq_int(neg s x, neg s y) -> greatereq_int(neg x, neg y),
          minus_int(pos x, pos y) -> minus_nat(x, y),
          minus_int(pos x, neg y) -> pos plus_nat(x, y),
          minus_int(neg x, pos y) -> neg plus_nat(x, y),
          minus_int(neg x, neg y) -> minus_nat(y, x),
        Cond_isdiv1(true(), x, y) -> isdiv(x, minus_int(y, x)),
           Cond_isdiv2(true(), x) -> true(),
            and(false(), false()) -> false(),
             and(false(), true()) -> false(),
             and(true(), false()) -> false(),
              and(true(), true()) -> true(),
           plus_int(pos x, pos y) -> pos plus_nat(x, y),
           plus_int(pos x, neg y) -> minus_nat(x, y),
           plus_int(neg x, pos y) -> minus_nat(y, x),
           plus_int(neg x, neg y) -> neg plus_nat(x, y),
                         primes x -> sieve nats(pos s s 0(), x),
              minus_nat(0(), 0()) -> pos 0(),
              minus_nat(0(), s y) -> neg s y,
              minus_nat(s x, 0()) -> pos s x,
              minus_nat(s x, s y) -> minus_nat(x, y),
                 plus_nat(0(), x) -> x,
                 plus_nat(s x, y) -> s plus_nat(x, y)}
 SRS: We consider a TRS.
  Trs:
   {       Cond_isdiv(true(), x, y) -> false(),
                        sieve nil() -> nil(),
                  sieve cons(x, ys) -> cons(x, sieve filter(x, ys)),
              if(false(), x, y, zs) -> cons(y, filter(x, zs)),
               if(true(), x, y, zs) -> filter(x, zs),
                        isdiv(x, y) -> Cond_isdiv(and(greater_int(x, y), greater_int(y, pos 0())), x, y),
                        isdiv(x, y) -> Cond_isdiv1(and(greatereq_int(y, x), greater_int(x, pos 0())), x, y),
                  isdiv(x, pos 0()) -> Cond_isdiv2(greater_int(x, pos 0()), x),
                   filter(x, nil()) -> nil(),
             filter(x, cons(y, zs)) -> if(isdiv(x, y), x, y, zs),
           Cond_nats1(true(), x, y) -> nil(),
      greater_int(pos 0(), pos 0()) -> false(),
      greater_int(pos 0(), pos s y) -> false(),
      greater_int(pos 0(), neg 0()) -> false(),
      greater_int(pos 0(), neg s y) -> true(),
      greater_int(pos s x, pos 0()) -> true(),
      greater_int(pos s x, pos s y) -> greater_int(pos x, pos y),
      greater_int(pos s x, neg 0()) -> true(),
      greater_int(pos s x, neg s y) -> true(),
      greater_int(neg 0(), pos 0()) -> false(),
      greater_int(neg 0(), pos s y) -> false(),
      greater_int(neg 0(), neg 0()) -> false(),
      greater_int(neg 0(), neg s y) -> true(),
      greater_int(neg s x, pos 0()) -> false(),
      greater_int(neg s x, pos s y) -> false(),
      greater_int(neg s x, neg 0()) -> false(),
      greater_int(neg s x, neg s y) -> greater_int(neg x, neg y),
                         nats(x, y) -> Cond_nats1(greater_int(x, y), x, y),
                         nats(x, y) -> Cond_nats(greatereq_int(y, x), x, y),
            Cond_nats(true(), x, y) -> cons(x, nats(plus_int(pos s 0(), x), y)),
      greatereq_int(pos x, pos 0()) -> true(),
        greatereq_int(pos x, neg y) -> true(),
    greatereq_int(pos 0(), pos s y) -> false(),
    greatereq_int(pos s x, pos s y) -> greatereq_int(pos x, pos y),
      greatereq_int(neg x, pos s y) -> false(),
    greatereq_int(neg 0(), pos 0()) -> true(),
      greatereq_int(neg 0(), neg y) -> true(),
    greatereq_int(neg s x, pos 0()) -> false(),
    greatereq_int(neg s x, neg 0()) -> false(),
    greatereq_int(neg s x, neg s y) -> greatereq_int(neg x, neg y),
            minus_int(pos x, pos y) -> minus_nat(x, y),
            minus_int(pos x, neg y) -> pos plus_nat(x, y),
            minus_int(neg x, pos y) -> neg plus_nat(x, y),
            minus_int(neg x, neg y) -> minus_nat(y, x),
          Cond_isdiv1(true(), x, y) -> isdiv(x, minus_int(y, x)),
             Cond_isdiv2(true(), x) -> true(),
              and(false(), false()) -> false(),
               and(false(), true()) -> false(),
               and(true(), false()) -> false(),
                and(true(), true()) -> true(),
             plus_int(pos x, pos y) -> pos plus_nat(x, y),
             plus_int(pos x, neg y) -> minus_nat(x, y),
             plus_int(neg x, pos y) -> minus_nat(y, x),
             plus_int(neg x, neg y) -> neg plus_nat(x, y),
                           primes x -> sieve nats(pos s s 0(), x),
                minus_nat(0(), 0()) -> pos 0(),
                minus_nat(0(), s y) -> neg s y,
                minus_nat(s x, 0()) -> pos s x,
                minus_nat(s x, s y) -> minus_nat(x, y),
                   plus_nat(0(), x) -> x,
                   plus_nat(s x, y) -> s plus_nat(x, y)}
  Fail