Problem Transformed CSR 04 Ex26 Luc03b L

interpretations

Execution Time (secs)
-
Answer
YES(?,O(n^1))
InputTransformed CSR 04 Ex26 Luc03b L
YES(?,O(n^1))

We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^1)).

Strict Trs:
  { terms(N) -> cons(recip(sqr(N)))
  , sqr(0()) -> 0()
  , sqr(s()) -> s()
  , dbl(0()) -> 0()
  , dbl(s()) -> s()
  , add(0(), X) -> X
  , add(s(), Y) -> s()
  , first(0(), X) -> nil()
  , first(s(), cons(Y)) -> cons(Y) }
Obligation:
  innermost runtime complexity
Answer:
  YES(?,O(n^1))

The following argument positions are usable:
  Uargs(terms) = {}, Uargs(cons) = {1}, Uargs(recip) = {1},
  Uargs(sqr) = {}, Uargs(dbl) = {}, Uargs(add) = {},
  Uargs(first) = {}

TcT has computed following constructor-based matrix interpretation
satisfying not(EDA).

      [terms](x1) = [3] x1 + [3]
                                
       [cons](x1) = [1] x1 + [0]
                                
      [recip](x1) = [1] x1 + [1]
                                
        [sqr](x1) = [2] x1 + [0]
                                
              [0] = [2]
                       
              [s] = [2]
                       
        [dbl](x1) = [2] x1 + [0]
                                
    [add](x1, x2) = [2] x1 + [1] x2 + [0]
                                         
  [first](x1, x2) = [2] x1 + [3] x2 + [0]
                                         
            [nil] = [0]

This order satisfies following ordering constraints

             [terms(N)] = [3] N + [3]          
                        > [2] N + [1]          
                        = [cons(recip(sqr(N)))]
                                               
             [sqr(0())] = [4]                  
                        > [2]                  
                        = [0()]                
                                               
             [sqr(s())] = [4]                  
                        > [2]                  
                        = [s()]                
                                               
             [dbl(0())] = [4]                  
                        > [2]                  
                        = [0()]                
                                               
             [dbl(s())] = [4]                  
                        > [2]                  
                        = [s()]                
                                               
          [add(0(), X)] = [1] X + [4]          
                        > [1] X + [0]          
                        = [X]                  
                                               
          [add(s(), Y)] = [1] Y + [4]          
                        > [2]                  
                        = [s()]                
                                               
        [first(0(), X)] = [3] X + [4]          
                        > [0]                  
                        = [nil()]              
                                               
  [first(s(), cons(Y))] = [3] Y + [4]          
                        > [1] Y + [0]          
                        = [cons(Y)]            
                                               

Hurray, we answered YES(?,O(n^1))

lmpo

Execution Time (secs)
-
Answer
YES(?,ELEMENTARY)
InputTransformed CSR 04 Ex26 Luc03b L
YES(?,ELEMENTARY)

We are left with following problem, upon which TcT provides the
certificate YES(?,ELEMENTARY).

Strict Trs:
  { terms(N) -> cons(recip(sqr(N)))
  , sqr(0()) -> 0()
  , sqr(s()) -> s()
  , dbl(0()) -> 0()
  , dbl(s()) -> s()
  , add(0(), X) -> X
  , add(s(), Y) -> s()
  , first(0(), X) -> nil()
  , first(s(), cons(Y)) -> cons(Y) }
Obligation:
  innermost runtime complexity
Answer:
  YES(?,ELEMENTARY)

The input was oriented with the instance of 'Lightweight Multiset
Path Order' as induced by the safe mapping

 safe(terms) = {}, safe(cons) = {1}, safe(recip) = {1},
 safe(sqr) = {1}, safe(0) = {}, safe(s) = {}, safe(dbl) = {},
 safe(add) = {}, safe(first) = {2}, safe(nil) = {}

and precedence

 terms > sqr .

Following symbols are considered recursive:

 {terms, sqr}

The recursion depth is 2.

For your convenience, here are the oriented rules in predicative
notation, possibly applying argument filtering:

 Strict DPs: 
 Weak DPs  : 
 Strict Trs:
   { terms(N;) -> cons(; recip(; sqr(; N)))
   , sqr(; 0()) -> 0()
   , sqr(; s()) -> s()
   , dbl(0();) -> 0()
   , dbl(s();) -> s()
   , add(0(),  X;) -> X
   , add(s(),  Y;) -> s()
   , first(0(); X) -> nil()
   , first(s(); cons(; Y)) -> cons(; Y) }
 Weak Trs  : 

Hurray, we answered YES(?,ELEMENTARY)

mpo

Execution Time (secs)
-
Answer
YES(?,PRIMREC)
InputTransformed CSR 04 Ex26 Luc03b L
YES(?,PRIMREC)

We are left with following problem, upon which TcT provides the
certificate YES(?,PRIMREC).

Strict Trs:
  { terms(N) -> cons(recip(sqr(N)))
  , sqr(0()) -> 0()
  , sqr(s()) -> s()
  , dbl(0()) -> 0()
  , dbl(s()) -> s()
  , add(0(), X) -> X
  , add(s(), Y) -> s()
  , first(0(), X) -> nil()
  , first(s(), cons(Y)) -> cons(Y) }
Obligation:
  innermost runtime complexity
Answer:
  YES(?,PRIMREC)

The input was oriented with the instance of'multiset path orders'
as induced by the precedence

 terms > cons, terms > recip, terms > sqr, 0 > nil .

Hurray, we answered YES(?,PRIMREC)

popstar

Execution Time (secs)
0.242
Answer
YES(?,POLY)
InputTransformed CSR 04 Ex26 Luc03b L
YES(?,POLY)

We are left with following problem, upon which TcT provides the
certificate YES(?,POLY).

Strict Trs:
  { terms(N) -> cons(recip(sqr(N)))
  , sqr(0()) -> 0()
  , sqr(s()) -> s()
  , dbl(0()) -> 0()
  , dbl(s()) -> s()
  , add(0(), X) -> X
  , add(s(), Y) -> s()
  , first(0(), X) -> nil()
  , first(s(), cons(Y)) -> cons(Y) }
Obligation:
  innermost runtime complexity
Answer:
  YES(?,POLY)

The input was oriented with the instance of 'Polynomial Path Order'
as induced by the safe mapping

 safe(terms) = {}, safe(cons) = {1}, safe(recip) = {1},
 safe(sqr) = {1}, safe(0) = {}, safe(s) = {}, safe(dbl) = {},
 safe(add) = {}, safe(first) = {2}, safe(nil) = {}

and precedence

 terms > sqr .

Following symbols are considered recursive:

 {terms, sqr}

The recursion depth is 2.

For your convenience, here are the oriented rules in predicative
notation, possibly applying argument filtering:

 Strict DPs: 
 Weak DPs  : 
 Strict Trs:
   { terms(N;) -> cons(; recip(; sqr(; N)))
   , sqr(; 0()) -> 0()
   , sqr(; s()) -> s()
   , dbl(0();) -> 0()
   , dbl(s();) -> s()
   , add(0(),  X;) -> X
   , add(s(),  Y;) -> s()
   , first(0(); X) -> nil()
   , first(s(); cons(; Y)) -> cons(; Y) }
 Weak Trs  : 

Hurray, we answered YES(?,POLY)

popstar-ps

Execution Time (secs)
0.140
Answer
YES(?,POLY)
InputTransformed CSR 04 Ex26 Luc03b L
YES(?,POLY)

We are left with following problem, upon which TcT provides the
certificate YES(?,POLY).

Strict Trs:
  { terms(N) -> cons(recip(sqr(N)))
  , sqr(0()) -> 0()
  , sqr(s()) -> s()
  , dbl(0()) -> 0()
  , dbl(s()) -> s()
  , add(0(), X) -> X
  , add(s(), Y) -> s()
  , first(0(), X) -> nil()
  , first(s(), cons(Y)) -> cons(Y) }
Obligation:
  innermost runtime complexity
Answer:
  YES(?,POLY)

The input was oriented with the instance of 'Polynomial Path Order
(PS)' as induced by the safe mapping

 safe(terms) = {}, safe(cons) = {1}, safe(recip) = {1},
 safe(sqr) = {1}, safe(0) = {}, safe(s) = {}, safe(dbl) = {},
 safe(add) = {}, safe(first) = {2}, safe(nil) = {}

and precedence

 terms > sqr .

Following symbols are considered recursive:

 {terms, sqr}

The recursion depth is 2.

For your convenience, here are the oriented rules in predicative
notation, possibly applying argument filtering:

 Strict DPs: 
 Weak DPs  : 
 Strict Trs:
   { terms(N;) -> cons(; recip(; sqr(; N)))
   , sqr(; 0()) -> 0()
   , sqr(; s()) -> s()
   , dbl(0();) -> 0()
   , dbl(s();) -> s()
   , add(0(),  X;) -> X
   , add(s(),  Y;) -> s()
   , first(0(); X) -> nil()
   , first(s(); cons(; Y)) -> cons(; Y) }
 Weak Trs  : 

Hurray, we answered YES(?,POLY)