Term Rewriting System R:
[y, x, f, ys]
app(app(neq, 0), 0) -> false
app(app(neq, 0), app(s, y)) -> true
app(app(neq, app(s, x)), 0) -> true
app(app(neq, app(s, x)), app(s, y)) -> app(app(neq, x), y)
app(app(filter, f), nil) -> nil
app(app(filter, f), app(app(cons, y), ys)) -> app(app(app(filtersub, app(f, y)), f), app(app(cons, y), ys))
app(app(app(filtersub, true), f), app(app(cons, y), ys)) -> app(app(cons, y), app(app(filter, f), ys))
app(app(app(filtersub, false), f), app(app(cons, y), ys)) -> app(app(filter, f), ys)
nonzero -> app(filter, app(neq, 0))
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(neq, app(s, x)), app(s, y)) -> APP(app(neq, x), y)
APP(app(neq, app(s, x)), app(s, y)) -> APP(neq, x)
APP(app(filter, f), app(app(cons, y), ys)) -> APP(app(app(filtersub, app(f, y)), f), app(app(cons, y), ys))
APP(app(filter, f), app(app(cons, y), ys)) -> APP(app(filtersub, app(f, y)), f)
APP(app(filter, f), app(app(cons, y), ys)) -> APP(filtersub, app(f, y))
APP(app(filter, f), app(app(cons, y), ys)) -> APP(f, y)
APP(app(app(filtersub, true), f), app(app(cons, y), ys)) -> APP(app(cons, y), app(app(filter, f), ys))
APP(app(app(filtersub, true), f), app(app(cons, y), ys)) -> APP(app(filter, f), ys)
APP(app(app(filtersub, true), f), app(app(cons, y), ys)) -> APP(filter, f)
APP(app(app(filtersub, false), f), app(app(cons, y), ys)) -> APP(app(filter, f), ys)
APP(app(app(filtersub, false), f), app(app(cons, y), ys)) -> APP(filter, f)
NONZERO -> APP(filter, app(neq, 0))
NONZERO -> APP(neq, 0)
Furthermore, R contains two SCCs.
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳Usable Rules (Innermost)
→DP Problem 2
↳UsableRules
Dependency Pair:
APP(app(neq, app(s, x)), app(s, y)) -> APP(app(neq, x), y)
Rules:
app(app(neq, 0), 0) -> false
app(app(neq, 0), app(s, y)) -> true
app(app(neq, app(s, x)), 0) -> true
app(app(neq, app(s, x)), app(s, y)) -> app(app(neq, x), y)
app(app(filter, f), nil) -> nil
app(app(filter, f), app(app(cons, y), ys)) -> app(app(app(filtersub, app(f, y)), f), app(app(cons, y), ys))
app(app(app(filtersub, true), f), app(app(cons, y), ys)) -> app(app(cons, y), app(app(filter, f), ys))
app(app(app(filtersub, false), f), app(app(cons, y), ys)) -> app(app(filter, f), ys)
nonzero -> app(filter, app(neq, 0))
Strategy:
innermost
As we are in the innermost case, we can delete all 9 non-usable-rules.
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
...
→DP Problem 3
↳A-Transformation
→DP Problem 2
↳UsableRules
Dependency Pair:
APP(app(neq, app(s, x)), app(s, y)) -> APP(app(neq, 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 4
↳Size-Change Principle
→DP Problem 2
↳UsableRules
Dependency Pair:
NEQ(s(x), s(y)) -> NEQ(x, y)
Rule:
none
Strategy:
innermost
We number the DPs as follows:
- NEQ(s(x), s(y)) -> NEQ(x, y)
and get the following Size-Change Graph(s):
which lead(s) to this/these maximal multigraph(s):
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)
Dependency Pairs:
APP(app(app(filtersub, false), f), app(app(cons, y), ys)) -> APP(app(filter, f), ys)
APP(app(filter, f), app(app(cons, y), ys)) -> APP(f, y)
APP(app(app(filtersub, true), f), app(app(cons, y), ys)) -> APP(app(filter, f), ys)
APP(app(filter, f), app(app(cons, y), ys)) -> APP(app(app(filtersub, app(f, y)), f), app(app(cons, y), ys))
Rules:
app(app(neq, 0), 0) -> false
app(app(neq, 0), app(s, y)) -> true
app(app(neq, app(s, x)), 0) -> true
app(app(neq, app(s, x)), app(s, y)) -> app(app(neq, x), y)
app(app(filter, f), nil) -> nil
app(app(filter, f), app(app(cons, y), ys)) -> app(app(app(filtersub, app(f, y)), f), app(app(cons, y), ys))
app(app(app(filtersub, true), f), app(app(cons, y), ys)) -> app(app(cons, y), app(app(filter, f), ys))
app(app(app(filtersub, false), f), app(app(cons, y), ys)) -> app(app(filter, f), ys)
nonzero -> app(filter, app(neq, 0))
Strategy:
innermost
As we are in the innermost case, we can delete all 1 non-usable-rules.
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
...
→DP Problem 5
↳Size-Change Principle
Dependency Pairs:
APP(app(app(filtersub, false), f), app(app(cons, y), ys)) -> APP(app(filter, f), ys)
APP(app(filter, f), app(app(cons, y), ys)) -> APP(f, y)
APP(app(app(filtersub, true), f), app(app(cons, y), ys)) -> APP(app(filter, f), ys)
APP(app(filter, f), app(app(cons, y), ys)) -> APP(app(app(filtersub, app(f, y)), f), app(app(cons, y), ys))
Rules:
app(app(neq, app(s, x)), app(s, y)) -> app(app(neq, x), y)
app(app(neq, 0), 0) -> false
app(app(filter, f), nil) -> nil
app(app(filter, f), app(app(cons, y), ys)) -> app(app(app(filtersub, app(f, y)), f), app(app(cons, y), ys))
app(app(app(filtersub, true), f), app(app(cons, y), ys)) -> app(app(cons, y), app(app(filter, f), ys))
app(app(neq, app(s, x)), 0) -> true
app(app(neq, 0), app(s, y)) -> true
app(app(app(filtersub, false), f), app(app(cons, y), ys)) -> app(app(filter, f), ys)
Strategy:
innermost
We number the DPs as follows:
- APP(app(app(filtersub, false), f), app(app(cons, y), ys)) -> APP(app(filter, f), ys)
- APP(app(filter, f), app(app(cons, y), ys)) -> APP(f, y)
- APP(app(app(filtersub, true), f), app(app(cons, y), ys)) -> APP(app(filter, f), ys)
- APP(app(filter, f), app(app(cons, y), ys)) -> APP(app(app(filtersub, app(f, y)), f), app(app(cons, y), ys))
and get the following Size-Change Graph(s):
which lead(s) to this/these maximal multigraph(s):
DP: empty set
Oriented Rules: none
We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial
with Argument Filtering System:
trivial
We obtain no new DP problems.
Termination of R successfully shown.
Duration:
0:00 minutes