Term Rewriting System R:
[xs, ys, x, y, f]
app(app(app(if, true), xs), ys) -> xs
app(app(app(if, false), xs), ys) -> ys
app(app(lt, app(s, x)), app(s, y)) -> app(app(lt, x), y)
app(app(lt, 0), app(s, y)) -> true
app(app(lt, y), 0) -> false
app(app(eq, x), x) -> true
app(app(eq, app(s, x)), 0) -> false
app(app(eq, 0), app(s, x)) -> false
app(app(merge, xs), nil) -> xs
app(app(merge, nil), ys) -> ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(mult, 0), x) -> 0
app(app(mult, app(s, x)), y) -> app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) -> 0
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
list1 -> app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 -> app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 -> app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming -> app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

Termination of R to be shown.



   R
Overlay and local confluence Check



The TRS is overlay and locally confluent (all critical pairs are trivially joinable).Hence, we can switch to innermost.


   R
OC
       →TRS2
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(lt, app(s, x)), app(s, y)) -> APP(app(lt, x), y)
APP(app(lt, app(s, x)), app(s, y)) -> APP(lt, x)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys))))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(if, app(app(lt, x), y))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(lt, x), y)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(lt, x)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(merge, xs), app(app(cons, y), ys))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(merge, xs)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys)))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys)))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(if, app(app(eq, x), y))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(eq, x), y)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(eq, x)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(cons, x), app(app(merge, xs), ys))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(merge, xs), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(merge, app(app(cons, x), xs)), ys)
APP(app(map, f), app(app(cons, x), xs)) -> APP(app(cons, app(f, x)), app(app(map, f), xs))
APP(app(map, f), app(app(cons, x), xs)) -> APP(cons, app(f, x))
APP(app(map, f), app(app(cons, x), xs)) -> APP(f, x)
APP(app(map, f), app(app(cons, x), xs)) -> APP(app(map, f), xs)
APP(app(mult, app(s, x)), y) -> APP(app(plus, y), app(app(mult, x), y))
APP(app(mult, app(s, x)), y) -> APP(plus, y)
APP(app(mult, app(s, x)), y) -> APP(app(mult, x), y)
APP(app(mult, app(s, x)), y) -> APP(mult, x)
APP(app(plus, app(s, x)), y) -> APP(s, app(app(plus, x), y))
APP(app(plus, app(s, x)), y) -> APP(app(plus, x), y)
APP(app(plus, app(s, x)), y) -> APP(plus, x)
LIST1 -> APP(app(map, app(mult, app(s, app(s, 0)))), hamming)
LIST1 -> APP(map, app(mult, app(s, app(s, 0))))
LIST1 -> APP(mult, app(s, app(s, 0)))
LIST1 -> APP(s, app(s, 0))
LIST1 -> APP(s, 0)
LIST1 -> HAMMING
LIST2 -> APP(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
LIST2 -> APP(map, app(mult, app(s, app(s, app(s, 0)))))
LIST2 -> APP(mult, app(s, app(s, app(s, 0))))
LIST2 -> APP(s, app(s, app(s, 0)))
LIST2 -> APP(s, app(s, 0))
LIST2 -> APP(s, 0)
LIST2 -> HAMMING
LIST3 -> APP(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
LIST3 -> APP(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0)))))))
LIST3 -> APP(mult, app(s, app(s, app(s, app(s, app(s, 0))))))
LIST3 -> APP(s, app(s, app(s, app(s, app(s, 0)))))
LIST3 -> APP(s, app(s, app(s, app(s, 0))))
LIST3 -> APP(s, app(s, app(s, 0)))
LIST3 -> APP(s, app(s, 0))
LIST3 -> APP(s, 0)
LIST3 -> HAMMING
HAMMING -> APP(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))
HAMMING -> APP(cons, app(s, 0))
HAMMING -> APP(s, 0)
HAMMING -> APP(app(merge, list1), app(app(merge, list2), list3))
HAMMING -> APP(merge, list1)
HAMMING -> LIST1
HAMMING -> APP(app(merge, list2), list3)
HAMMING -> APP(merge, list2)
HAMMING -> LIST2
HAMMING -> LIST3

Furthermore, R contains six SCCs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
Usable Rules (Innermost)
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP(app(lt, app(s, x)), app(s, y)) -> APP(app(lt, x), y)


Rules:


app(app(app(if, true), xs), ys) -> xs
app(app(app(if, false), xs), ys) -> ys
app(app(lt, app(s, x)), app(s, y)) -> app(app(lt, x), y)
app(app(lt, 0), app(s, y)) -> true
app(app(lt, y), 0) -> false
app(app(eq, x), x) -> true
app(app(eq, app(s, x)), 0) -> false
app(app(eq, 0), app(s, x)) -> false
app(app(merge, xs), nil) -> xs
app(app(merge, nil), ys) -> ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(mult, 0), x) -> 0
app(app(mult, app(s, x)), y) -> app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) -> 0
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
list1 -> app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 -> app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 -> app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming -> app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
             ...
               →DP Problem 7
A-Transformation
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP(app(lt, app(s, x)), app(s, y)) -> APP(app(lt, x), y)


Rule:

none


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
             ...
               →DP Problem 8
Size-Change Principle
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. LT(s(x), s(y)) -> LT(x, y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
Usable Rules (Innermost)
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP(app(plus, app(s, x)), y) -> APP(app(plus, x), y)


Rules:


app(app(app(if, true), xs), ys) -> xs
app(app(app(if, false), xs), ys) -> ys
app(app(lt, app(s, x)), app(s, y)) -> app(app(lt, x), y)
app(app(lt, 0), app(s, y)) -> true
app(app(lt, y), 0) -> false
app(app(eq, x), x) -> true
app(app(eq, app(s, x)), 0) -> false
app(app(eq, 0), app(s, x)) -> false
app(app(merge, xs), nil) -> xs
app(app(merge, nil), ys) -> ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(mult, 0), x) -> 0
app(app(mult, app(s, x)), y) -> app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) -> 0
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
list1 -> app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 -> app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 -> app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming -> app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
             ...
               →DP Problem 9
A-Transformation
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP(app(plus, app(s, x)), y) -> APP(app(plus, x), y)


Rule:

none


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
             ...
               →DP Problem 10
Size-Change Principle
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. PLUS(s(x), y) -> PLUS(x, y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2=2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
Usable Rules (Innermost)
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pairs:

APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(merge, app(app(cons, x), xs)), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(merge, xs), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(merge, xs), app(app(cons, y), ys))


Rules:


app(app(app(if, true), xs), ys) -> xs
app(app(app(if, false), xs), ys) -> ys
app(app(lt, app(s, x)), app(s, y)) -> app(app(lt, x), y)
app(app(lt, 0), app(s, y)) -> true
app(app(lt, y), 0) -> false
app(app(eq, x), x) -> true
app(app(eq, app(s, x)), 0) -> false
app(app(eq, 0), app(s, x)) -> false
app(app(merge, xs), nil) -> xs
app(app(merge, nil), ys) -> ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(mult, 0), x) -> 0
app(app(mult, app(s, x)), y) -> app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) -> 0
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
list1 -> app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 -> app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 -> app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming -> app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
             ...
               →DP Problem 11
A-Transformation
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pairs:

APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(merge, app(app(cons, x), xs)), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(merge, xs), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> APP(app(merge, xs), app(app(cons, y), ys))


Rule:

none


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
             ...
               →DP Problem 12
Size-Change Principle
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pairs:

MERGE(cons(x, xs), cons(y, ys)) -> MERGE(cons(x, xs), ys)
MERGE(cons(x, xs), cons(y, ys)) -> MERGE(xs, ys)
MERGE(cons(x, xs), cons(y, ys)) -> MERGE(xs, cons(y, ys))


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. MERGE(cons(x, xs), cons(y, ys)) -> MERGE(cons(x, xs), ys)
  2. MERGE(cons(x, xs), cons(y, ys)) -> MERGE(xs, ys)
  3. MERGE(cons(x, xs), cons(y, ys)) -> MERGE(xs, cons(y, ys))
and get the following Size-Change Graph(s):
{1, 2, 3} , {1, 2, 3}
1=1
2>2
{1, 2, 3} , {1, 2, 3}
1>1
2>2
{1, 2, 3} , {1, 2, 3}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{1, 2, 3} , {1, 2, 3}
1>1
2>2
{1, 2, 3} , {1, 2, 3}
1>1
2=2
{1, 2, 3} , {1, 2, 3}
1=1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
cons(x1, x2) -> cons(x1, x2)

We obtain no new DP problems.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
Usable Rules (Innermost)
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP(app(mult, app(s, x)), y) -> APP(app(mult, x), y)


Rules:


app(app(app(if, true), xs), ys) -> xs
app(app(app(if, false), xs), ys) -> ys
app(app(lt, app(s, x)), app(s, y)) -> app(app(lt, x), y)
app(app(lt, 0), app(s, y)) -> true
app(app(lt, y), 0) -> false
app(app(eq, x), x) -> true
app(app(eq, app(s, x)), 0) -> false
app(app(eq, 0), app(s, x)) -> false
app(app(merge, xs), nil) -> xs
app(app(merge, nil), ys) -> ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(mult, 0), x) -> 0
app(app(mult, app(s, x)), y) -> app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) -> 0
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
list1 -> app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 -> app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 -> app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming -> app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
             ...
               →DP Problem 13
A-Transformation
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

APP(app(mult, app(s, x)), y) -> APP(app(mult, x), y)


Rule:

none


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
             ...
               →DP Problem 14
Size-Change Principle
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. MULT(s(x), y) -> MULT(x, y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2=2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
Usable Rules (Innermost)
           →DP Problem 6
UsableRules


Dependency Pairs:

APP(app(map, f), app(app(cons, x), xs)) -> APP(app(map, f), xs)
APP(app(map, f), app(app(cons, x), xs)) -> APP(f, x)


Rules:


app(app(app(if, true), xs), ys) -> xs
app(app(app(if, false), xs), ys) -> ys
app(app(lt, app(s, x)), app(s, y)) -> app(app(lt, x), y)
app(app(lt, 0), app(s, y)) -> true
app(app(lt, y), 0) -> false
app(app(eq, x), x) -> true
app(app(eq, app(s, x)), 0) -> false
app(app(eq, 0), app(s, x)) -> false
app(app(merge, xs), nil) -> xs
app(app(merge, nil), ys) -> ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(mult, 0), x) -> 0
app(app(mult, app(s, x)), y) -> app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) -> 0
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
list1 -> app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 -> app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 -> app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming -> app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
             ...
               →DP Problem 15
Size-Change Principle
           →DP Problem 6
UsableRules


Dependency Pairs:

APP(app(map, f), app(app(cons, x), xs)) -> APP(app(map, f), xs)
APP(app(map, f), app(app(cons, x), xs)) -> APP(f, x)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. APP(app(map, f), app(app(cons, x), xs)) -> APP(app(map, f), xs)
  2. APP(app(map, f), app(app(cons, x), xs)) -> APP(f, x)
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
1=1
2>2
{1, 2} , {1, 2}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
1=1
2>2
{1, 2} , {1, 2}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
app(x1, x2) -> app(x1, x2)

We obtain no new DP problems.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
Usable Rules (Innermost)


Dependency Pairs:

LIST3 -> HAMMING
HAMMING -> LIST3
LIST2 -> HAMMING
HAMMING -> LIST2
HAMMING -> LIST1
LIST1 -> HAMMING


Rules:


app(app(app(if, true), xs), ys) -> xs
app(app(app(if, false), xs), ys) -> ys
app(app(lt, app(s, x)), app(s, y)) -> app(app(lt, x), y)
app(app(lt, 0), app(s, y)) -> true
app(app(lt, y), 0) -> false
app(app(eq, x), x) -> true
app(app(eq, app(s, x)), 0) -> false
app(app(eq, 0), app(s, x)) -> false
app(app(merge, xs), nil) -> xs
app(app(merge, nil), ys) -> ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) -> app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, x), xs)) -> app(app(cons, app(f, x)), app(app(map, f), xs))
app(app(mult, 0), x) -> 0
app(app(mult, app(s, x)), y) -> app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) -> 0
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
list1 -> app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 -> app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 -> app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming -> app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
UsableRules
           →DP Problem 3
UsableRules
           →DP Problem 4
UsableRules
           →DP Problem 5
UsableRules
           →DP Problem 6
UsableRules
             ...
               →DP Problem 16
Non Termination


Dependency Pairs:

LIST3 -> HAMMING
HAMMING -> LIST3
LIST2 -> HAMMING
HAMMING -> LIST2
HAMMING -> LIST1
LIST1 -> HAMMING


Rule:

none


Strategy:

innermost




Found an infinite P-chain over R:
P =

LIST3 -> HAMMING
HAMMING -> LIST3
LIST2 -> HAMMING
HAMMING -> LIST2
HAMMING -> LIST1
LIST1 -> HAMMING

R = none

s = HAMMING
evaluates to t =HAMMING

Thus, s starts an infinite chain.

Non-Termination of R could be shown.
Duration:
0:07 minutes