Term Rewriting System R:
[y, n, x]
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(add(n, x), y) -> APP(x, y)
REVERSE(add(n, x)) -> APP(reverse(x), add(n, nil))
REVERSE(add(n, x)) -> REVERSE(x)
SHUFFLE(add(n, x)) -> SHUFFLE(reverse(x))
SHUFFLE(add(n, x)) -> REVERSE(x)

Furthermore, R contains three SCCs.


   R
DPs
       →DP Problem 1
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar


Dependency Pair:

APP(add(n, x), y) -> APP(x, y)


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




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

APP(add(n, x), y) -> APP(x, y)
one new Dependency Pair is created:

APP(add(n, add(n'', x'')), y'') -> APP(add(n'', x''), y'')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 4
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar


Dependency Pair:

APP(add(n, add(n'', x'')), y'') -> APP(add(n'', x''), y'')


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




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

APP(add(n, add(n'', x'')), y'') -> APP(add(n'', x''), y'')
one new Dependency Pair is created:

APP(add(n, add(n'''', add(n''''', x''''))), y'''') -> APP(add(n'''', add(n''''', x'''')), y'''')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 4
FwdInst
             ...
               →DP Problem 5
Argument Filtering and Ordering
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar


Dependency Pair:

APP(add(n, add(n'''', add(n''''', x''''))), y'''') -> APP(add(n'''', add(n''''', x'''')), y'''')


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

APP(add(n, add(n'''', add(n''''', x''''))), y'''') -> APP(add(n'''', add(n''''', x'''')), y'''')


There are no usable rules for innermost that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(APP(x1, x2))=  1 + x1 + x2  
  POL(add(x1, x2))=  1 + x1 + x2  

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


   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 4
FwdInst
             ...
               →DP Problem 6
Dependency Graph
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar


Dependency Pair:


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pair:

REVERSE(add(n, x)) -> REVERSE(x)


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




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

REVERSE(add(n, x)) -> REVERSE(x)
one new Dependency Pair is created:

REVERSE(add(n, add(n'', x''))) -> REVERSE(add(n'', x''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 7
Forward Instantiation Transformation
       →DP Problem 3
Nar


Dependency Pair:

REVERSE(add(n, add(n'', x''))) -> REVERSE(add(n'', x''))


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




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

REVERSE(add(n, add(n'', x''))) -> REVERSE(add(n'', x''))
one new Dependency Pair is created:

REVERSE(add(n, add(n'''', add(n''''', x'''')))) -> REVERSE(add(n'''', add(n''''', x'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 7
FwdInst
             ...
               →DP Problem 8
Argument Filtering and Ordering
       →DP Problem 3
Nar


Dependency Pair:

REVERSE(add(n, add(n'''', add(n''''', x'''')))) -> REVERSE(add(n'''', add(n''''', x'''')))


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

REVERSE(add(n, add(n'''', add(n''''', x'''')))) -> REVERSE(add(n'''', add(n''''', x'''')))


There are no usable rules for innermost that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(REVERSE(x1))=  1 + x1  
  POL(add(x1, x2))=  1 + x1 + x2  

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


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 7
FwdInst
             ...
               →DP Problem 9
Dependency Graph
       →DP Problem 3
Nar


Dependency Pair:


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Narrowing Transformation


Dependency Pair:

SHUFFLE(add(n, x)) -> SHUFFLE(reverse(x))


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




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

SHUFFLE(add(n, x)) -> SHUFFLE(reverse(x))
two new Dependency Pairs are created:

SHUFFLE(add(n, nil)) -> SHUFFLE(nil)
SHUFFLE(add(n, add(n'', x''))) -> SHUFFLE(app(reverse(x''), add(n'', nil)))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 10
Narrowing Transformation


Dependency Pair:

SHUFFLE(add(n, add(n'', x''))) -> SHUFFLE(app(reverse(x''), add(n'', nil)))


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




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

SHUFFLE(add(n, add(n'', x''))) -> SHUFFLE(app(reverse(x''), add(n'', nil)))
two new Dependency Pairs are created:

SHUFFLE(add(n, add(n'', nil))) -> SHUFFLE(app(nil, add(n'', nil)))
SHUFFLE(add(n, add(n'', add(n''', x')))) -> SHUFFLE(app(app(reverse(x'), add(n''', nil)), add(n'', nil)))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 10
Nar
             ...
               →DP Problem 11
Rewriting Transformation


Dependency Pairs:

SHUFFLE(add(n, add(n'', add(n''', x')))) -> SHUFFLE(app(app(reverse(x'), add(n''', nil)), add(n'', nil)))
SHUFFLE(add(n, add(n'', nil))) -> SHUFFLE(app(nil, add(n'', nil)))


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




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

SHUFFLE(add(n, add(n'', nil))) -> SHUFFLE(app(nil, add(n'', nil)))
one new Dependency Pair is created:

SHUFFLE(add(n, add(n'', nil))) -> SHUFFLE(add(n'', nil))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 10
Nar
             ...
               →DP Problem 12
Argument Filtering and Ordering


Dependency Pair:

SHUFFLE(add(n, add(n'', add(n''', x')))) -> SHUFFLE(app(app(reverse(x'), add(n''', nil)), add(n'', nil)))


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

SHUFFLE(add(n, add(n'', add(n''', x')))) -> SHUFFLE(app(app(reverse(x'), add(n''', nil)), add(n'', nil)))


The following usable rules for innermost can be oriented:

app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(reverse(x1))=  x1  
  POL(SHUFFLE(x1))=  1 + x1  
  POL(nil)=  0  
  POL(app(x1, x2))=  x1 + x2  
  POL(add(x1, x2))=  1 + x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
SHUFFLE(x1) -> SHUFFLE(x1)
add(x1, x2) -> add(x1, x2)
app(x1, x2) -> app(x1, x2)
reverse(x1) -> reverse(x1)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 10
Nar
             ...
               →DP Problem 13
Dependency Graph


Dependency Pair:


Rules:


app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
reverse(nil) -> nil
reverse(add(n, x)) -> app(reverse(x), add(n, nil))
shuffle(nil) -> nil
shuffle(add(n, x)) -> add(n, shuffle(reverse(x)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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