Term Rewriting System R:
[x, y]
even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

EVEN(s(s(x))) -> EVEN(x)
HALF(s(s(x))) -> HALF(x)
PLUS(s(x), y) -> PLUS(x, y)
TIMES(s(x), y) -> IFTIMES(even(s(x)), s(x), y)
TIMES(s(x), y) -> EVEN(s(x))
IFTIMES(true, s(x), y) -> PLUS(times(half(s(x)), y), times(half(s(x)), y))
IFTIMES(true, s(x), y) -> TIMES(half(s(x)), y)
IFTIMES(true, s(x), y) -> HALF(s(x))
IFTIMES(false, s(x), y) -> PLUS(y, times(x, y))
IFTIMES(false, s(x), y) -> TIMES(x, y)

Furthermore, R contains four SCCs.


   R
DPs
       →DP Problem 1
Polynomial Ordering
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo


Dependency Pair:

EVEN(s(s(x))) -> EVEN(x)


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




The following dependency pair can be strictly oriented:

EVEN(s(s(x))) -> EVEN(x)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(EVEN(x1))=  1 + x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 5
Dependency Graph
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo


Dependency Pair:


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polynomial Ordering
       →DP Problem 3
Polo
       →DP Problem 4
Polo


Dependency Pair:

HALF(s(s(x))) -> HALF(x)


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




The following dependency pair can be strictly oriented:

HALF(s(s(x))) -> HALF(x)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(HALF(x1))=  1 + x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 6
Dependency Graph
       →DP Problem 3
Polo
       →DP Problem 4
Polo


Dependency Pair:


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polynomial Ordering
       →DP Problem 4
Polo


Dependency Pair:

PLUS(s(x), y) -> PLUS(x, y)


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




The following dependency pair can be strictly oriented:

PLUS(s(x), y) -> PLUS(x, y)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(PLUS(x1, x2))=  x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
           →DP Problem 7
Dependency Graph
       →DP Problem 4
Polo


Dependency Pair:


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polynomial Ordering


Dependency Pairs:

IFTIMES(false, s(x), y) -> TIMES(x, y)
IFTIMES(true, s(x), y) -> TIMES(half(s(x)), y)
TIMES(s(x), y) -> IFTIMES(even(s(x)), s(x), y)


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




The following dependency pair can be strictly oriented:

IFTIMES(false, s(x), y) -> TIMES(x, y)


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS can be oriented:

half(0) -> 0
half(s(s(x))) -> s(half(x))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(IF_TIMES(x1, x2, x3))=  x2  
  POL(TIMES(x1, x2))=  x1  
  POL(0)=  0  
  POL(false)=  0  
  POL(even(x1))=  0  
  POL(true)=  0  
  POL(s(x1))=  1 + x1  
  POL(half(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
           →DP Problem 8
Narrowing Transformation


Dependency Pairs:

IFTIMES(true, s(x), y) -> TIMES(half(s(x)), y)
TIMES(s(x), y) -> IFTIMES(even(s(x)), s(x), y)


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

TIMES(s(x), y) -> IFTIMES(even(s(x)), s(x), y)
two new Dependency Pairs are created:

TIMES(s(0), y) -> IFTIMES(false, s(0), y)
TIMES(s(s(x'')), y) -> IFTIMES(even(x''), s(s(x'')), y)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
           →DP Problem 8
Nar
             ...
               →DP Problem 9
Narrowing Transformation


Dependency Pairs:

TIMES(s(s(x'')), y) -> IFTIMES(even(x''), s(s(x'')), y)
IFTIMES(true, s(x), y) -> TIMES(half(s(x)), y)


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

IFTIMES(true, s(x), y) -> TIMES(half(s(x)), y)
one new Dependency Pair is created:

IFTIMES(true, s(s(x'')), y) -> TIMES(s(half(x'')), y)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
           →DP Problem 8
Nar
             ...
               →DP Problem 10
Polynomial Ordering


Dependency Pairs:

IFTIMES(true, s(s(x'')), y) -> TIMES(s(half(x'')), y)
TIMES(s(s(x'')), y) -> IFTIMES(even(x''), s(s(x'')), y)


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




The following dependency pair can be strictly oriented:

IFTIMES(true, s(s(x'')), y) -> TIMES(s(half(x'')), y)


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS can be oriented:

half(0) -> 0
half(s(s(x))) -> s(half(x))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(IF_TIMES(x1, x2, x3))=  x2  
  POL(TIMES(x1, x2))=  x1  
  POL(0)=  0  
  POL(false)=  0  
  POL(even(x1))=  0  
  POL(true)=  0  
  POL(s(x1))=  1 + x1  
  POL(half(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
           →DP Problem 8
Nar
             ...
               →DP Problem 11
Dependency Graph


Dependency Pair:

TIMES(s(s(x'')), y) -> IFTIMES(even(x''), s(s(x'')), y)


Rules:


even(0) -> true
even(s(0)) -> false
even(s(s(x))) -> even(x)
half(0) -> 0
half(s(s(x))) -> s(half(x))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(x), y) -> iftimes(even(s(x)), s(x), y)
iftimes(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y))
iftimes(false, s(x), y) -> plus(y, times(x, y))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:00 minutes