```* Step 1: WeightGap WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
if_mod(false(),s(x),s(y)) -> s(x)
if_mod(true(),s(x),s(y)) -> mod(minus(x,y),s(y))
le(0(),y) -> true()
le(s(x),0()) -> false()
le(s(x),s(y)) -> le(x,y)
minus(x,0()) -> x
minus(s(x),s(y)) -> minus(x,y)
mod(0(),y) -> 0()
mod(s(x),0()) -> 0()
mod(s(x),s(y)) -> if_mod(le(y,x),s(x),s(y))
- Signature:
{if_mod/3,le/2,minus/2,mod/2} / {0/0,false/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if_mod,le,minus,mod} and constructors {0,false,s,true}
+ Applied Processor:
WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny}
+ Details:
The weightgap principle applies using the following nonconstant growth matrix-interpretation:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(if_mod) = {1},
uargs(mod) = {1}

Following symbols are considered usable:
all
TcT has computed the following interpretation:
p(0) = 
p(false) = 
p(if_mod) =  x1 +  x2 +  x3 + 
p(le) = 
p(minus) =  x1 + 
p(mod) =  x1 +  x2 + 
p(s) =  x1 + 
p(true) = 

Following rules are strictly oriented:
if_mod(false(),s(x),s(y)) =  x +  y + 
>  x + 
= s(x)

if_mod(true(),s(x),s(y)) =  x +  y + 
>  x +  y + 
= mod(minus(x,y),s(y))

le(0(),y) = 
> 
= true()

le(s(x),0()) = 
> 
= false()

minus(x,0()) =  x + 
>  x + 
= x

minus(s(x),s(y)) =  x + 
>  x + 
= minus(x,y)

mod(0(),y) =  y + 
> 
= 0()

mod(s(x),0()) =  x + 
> 
= 0()

Following rules are (at-least) weakly oriented:
le(s(x),s(y)) =  
>= 
=  le(x,y)

mod(s(x),s(y)) =   x +  y + 
>=  x +  y + 
=  if_mod(le(y,x),s(x),s(y))

Further, it can be verified that all rules not oriented are covered by the weightgap condition.
* Step 2: WeightGap WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
le(s(x),s(y)) -> le(x,y)
mod(s(x),s(y)) -> if_mod(le(y,x),s(x),s(y))
- Weak TRS:
if_mod(false(),s(x),s(y)) -> s(x)
if_mod(true(),s(x),s(y)) -> mod(minus(x,y),s(y))
le(0(),y) -> true()
le(s(x),0()) -> false()
minus(x,0()) -> x
minus(s(x),s(y)) -> minus(x,y)
mod(0(),y) -> 0()
mod(s(x),0()) -> 0()
- Signature:
{if_mod/3,le/2,minus/2,mod/2} / {0/0,false/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if_mod,le,minus,mod} and constructors {0,false,s,true}
+ Applied Processor:
WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny}
+ Details:
The weightgap principle applies using the following nonconstant growth matrix-interpretation:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(if_mod) = {1},
uargs(mod) = {1}

Following symbols are considered usable:
all
TcT has computed the following interpretation:
p(0) = 
p(false) = 
p(if_mod) =  x1 +  x2 + 
p(le) = 
p(minus) =  x1 + 
p(mod) =  x1 + 
p(s) =  x1 + 
p(true) = 

Following rules are strictly oriented:
mod(s(x),s(y)) =  x + 
>  x + 
= if_mod(le(y,x),s(x),s(y))

Following rules are (at-least) weakly oriented:
if_mod(false(),s(x),s(y)) =   x + 
>=  x + 
=  s(x)

if_mod(true(),s(x),s(y)) =   x + 
>=  x + 
=  mod(minus(x,y),s(y))

le(0(),y) =  
>= 
=  true()

le(s(x),0()) =  
>= 
=  false()

le(s(x),s(y)) =  
>= 
=  le(x,y)

minus(x,0()) =   x + 
>=  x + 
=  x

minus(s(x),s(y)) =   x + 
>=  x + 
=  minus(x,y)

mod(0(),y) =  
>= 
=  0()

mod(s(x),0()) =   x + 
>= 
=  0()

Further, it can be verified that all rules not oriented are covered by the weightgap condition.
* Step 3: NaturalPI WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
le(s(x),s(y)) -> le(x,y)
- Weak TRS:
if_mod(false(),s(x),s(y)) -> s(x)
if_mod(true(),s(x),s(y)) -> mod(minus(x,y),s(y))
le(0(),y) -> true()
le(s(x),0()) -> false()
minus(x,0()) -> x
minus(s(x),s(y)) -> minus(x,y)
mod(0(),y) -> 0()
mod(s(x),0()) -> 0()
mod(s(x),s(y)) -> if_mod(le(y,x),s(x),s(y))
- Signature:
{if_mod/3,le/2,minus/2,mod/2} / {0/0,false/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if_mod,le,minus,mod} and constructors {0,false,s,true}
+ Applied Processor:
NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just any strict-rules}
+ Details:
We apply a polynomial interpretation of kind constructor-based(mixed(2)):
The following argument positions are considered usable:
uargs(if_mod) = {1},
uargs(mod) = {1}

Following symbols are considered usable:
{if_mod,le,minus,mod}
TcT has computed the following interpretation:
p(0) = 0
p(false) = 0
p(if_mod) = 2 + 2*x1 + 2*x2 + 6*x2*x3 + x3^2
p(le) = 1 + 2*x1
p(minus) = x1
p(mod) = 2*x1 + 6*x1*x2 + 6*x2 + x2^2
p(s) = 1 + x1
p(true) = 0

Following rules are strictly oriented:
le(s(x),s(y)) = 3 + 2*x
> 1 + 2*x
= le(x,y)

Following rules are (at-least) weakly oriented:
if_mod(false(),s(x),s(y)) =  11 + 8*x + 6*x*y + 8*y + y^2
>= 1 + x
=  s(x)

if_mod(true(),s(x),s(y)) =  11 + 8*x + 6*x*y + 8*y + y^2
>= 7 + 8*x + 6*x*y + 8*y + y^2
=  mod(minus(x,y),s(y))

le(0(),y) =  1
>= 0
=  true()

le(s(x),0()) =  3 + 2*x
>= 0
=  false()

minus(x,0()) =  x
>= x
=  x

minus(s(x),s(y)) =  1 + x
>= x
=  minus(x,y)

mod(0(),y) =  6*y + y^2
>= 0
=  0()

mod(s(x),0()) =  2 + 2*x
>= 0
=  0()

mod(s(x),s(y)) =  15 + 8*x + 6*x*y + 14*y + y^2
>= 13 + 8*x + 6*x*y + 12*y + y^2
=  if_mod(le(y,x),s(x),s(y))

* Step 4: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
if_mod(false(),s(x),s(y)) -> s(x)
if_mod(true(),s(x),s(y)) -> mod(minus(x,y),s(y))
le(0(),y) -> true()
le(s(x),0()) -> false()
le(s(x),s(y)) -> le(x,y)
minus(x,0()) -> x
minus(s(x),s(y)) -> minus(x,y)
mod(0(),y) -> 0()
mod(s(x),0()) -> 0()
mod(s(x),s(y)) -> if_mod(le(y,x),s(x),s(y))
- Signature:
{if_mod/3,le/2,minus/2,mod/2} / {0/0,false/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if_mod,le,minus,mod} and constructors {0,false,s,true}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).

WORST_CASE(?,O(n^2))
```