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
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS


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 AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
EVEN(x1) -> EVEN(x1)
s(x1) -> s(x1)


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


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
AFS
       →DP Problem 2
Argument Filtering and Ordering
       →DP Problem 3
AFS
       →DP Problem 4
AFS


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 AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
HALF(x1) -> HALF(x1)
s(x1) -> s(x1)


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


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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Argument Filtering and Ordering
       →DP Problem 4
AFS


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 AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
PLUS(x1, x2) -> PLUS(x1, x2)
s(x1) -> s(x1)


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


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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
Argument Filtering and 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)


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

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


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
IFTIMES(x1, x2, x3) -> x2
s(x1) -> s(x1)
TIMES(x1, x2) -> x1
half(x1) -> x1


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
           →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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
           →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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
           →DP Problem 8
Nar
             ...
               →DP Problem 10
Argument Filtering and 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)


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

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


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
s > half

resulting in one new DP problem.
Used Argument Filtering System:
IFTIMES(x1, x2, x3) -> x2
s(x1) -> s(x1)
TIMES(x1, x2) -> x1
half(x1) -> half(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
           →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:02 minutes