Term Rewriting System R:
[x, y, z]
f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

F(x, g(y, z)) -> F(x, y)
++'(x, g(y, z)) -> ++'(x, y)
MEM(g(x, y), z) -> MEM(x, z)
MEM(x, max(x)) -> NULL(x)
MAX(g(g(g(x, y), z), u)) -> MAX(g(g(x, y), z))

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:

F(x, g(y, z)) -> F(x, y)

Rules:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

The following dependency pair can be strictly oriented:

F(x, g(y, z)) -> F(x, y)

The following rules can be oriented:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(false) =  0 POL(true) =  0 POL(or(x1, x2)) =  x1 + x2 POL(not(x1)) =  x1 POL(max'(x1, x2)) =  x1 + x2 POL(u) =  0 POL(F(x1, x2)) =  1 + x1 + x2 POL(f(x1, x2)) =  1 + x1 + x2 POL(mem(x1, x2)) =  x1 + x2 POL(g(x1, x2)) =  1 + x1 + x2 POL(null(x1)) =  x1 POL(++(x1, x2)) =  x1 + x2 POL(nil) =  0 POL(max(x1)) =  x1

resulting in one new DP problem.
Used Argument Filtering System:
F(x1, x2) -> F(x1, x2)
g(x1, x2) -> g(x1, x2)
f(x1, x2) -> f(x1, x2)
++(x1, x2) -> ++(x1, x2)
null(x1) -> null(x1)
mem(x1, x2) -> mem(x1, x2)
or(x1, x2) -> or(x1, x2)
=(x1, x2) -> x1
max(x1) -> max(x1)
not(x1) -> not(x1)
max'(x1, x2) -> max'(x1, x2)

`   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:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

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:

++'(x, g(y, z)) -> ++'(x, y)

Rules:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

The following dependency pair can be strictly oriented:

++'(x, g(y, z)) -> ++'(x, y)

The following rules can be oriented:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(++'(x1, x2)) =  1 + x1 + x2 POL(false) =  0 POL(true) =  0 POL(or(x1, x2)) =  x1 + x2 POL(not(x1)) =  x1 POL(max'(x1, x2)) =  x1 + x2 POL(u) =  0 POL(f(x1, x2)) =  1 + x1 + x2 POL(mem(x1, x2)) =  x1 + x2 POL(g(x1, x2)) =  1 + x1 + x2 POL(null(x1)) =  x1 POL(++(x1, x2)) =  x1 + x2 POL(nil) =  0 POL(max(x1)) =  x1

resulting in one new DP problem.
Used Argument Filtering System:
++'(x1, x2) -> ++'(x1, x2)
g(x1, x2) -> g(x1, x2)
f(x1, x2) -> f(x1, x2)
++(x1, x2) -> ++(x1, x2)
null(x1) -> null(x1)
mem(x1, x2) -> mem(x1, x2)
or(x1, x2) -> or(x1, x2)
=(x1, x2) -> x1
max(x1) -> max(x1)
not(x1) -> not(x1)
max'(x1, x2) -> max'(x1, x2)

`   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:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

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:

MEM(g(x, y), z) -> MEM(x, z)

Rules:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

The following dependency pair can be strictly oriented:

MEM(g(x, y), z) -> MEM(x, z)

The following rules can be oriented:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(false) =  0 POL(true) =  0 POL(or(x1, x2)) =  x1 + x2 POL(not(x1)) =  x1 POL(max'(x1, x2)) =  x1 + x2 POL(u) =  0 POL(f(x1, x2)) =  1 + x1 + x2 POL(MEM(x1, x2)) =  1 + x1 + x2 POL(mem(x1, x2)) =  x1 + x2 POL(g(x1, x2)) =  1 + x1 + x2 POL(null(x1)) =  x1 POL(++(x1, x2)) =  x1 + x2 POL(nil) =  0 POL(max(x1)) =  x1

resulting in one new DP problem.
Used Argument Filtering System:
MEM(x1, x2) -> MEM(x1, x2)
g(x1, x2) -> g(x1, x2)
f(x1, x2) -> f(x1, x2)
++(x1, x2) -> ++(x1, x2)
null(x1) -> null(x1)
mem(x1, x2) -> mem(x1, x2)
or(x1, x2) -> or(x1, x2)
=(x1, x2) -> x1
max(x1) -> max(x1)
not(x1) -> not(x1)
max'(x1, x2) -> max'(x1, x2)

`   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:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

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 Pair:

MAX(g(g(g(x, y), z), u)) -> MAX(g(g(x, y), z))

Rules:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

The following dependency pair can be strictly oriented:

MAX(g(g(g(x, y), z), u)) -> MAX(g(g(x, y), z))

The following rules can be oriented:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(false) =  0 POL(true) =  0 POL(or(x1, x2)) =  x1 + x2 POL(max'(x1, x2)) =  x1 + x2 POL(not(x1)) =  x1 POL(u) =  1 POL(f(x1, x2)) =  x1 + x2 POL(mem(x1, x2)) =  x1 + x2 POL(MAX(x1)) =  1 + x1 POL(g(x1, x2)) =  x1 + x2 POL(null(x1)) =  x1 POL(++(x1, x2)) =  x1 + x2 POL(nil) =  0 POL(max(x1)) =  x1

resulting in one new DP problem.
Used Argument Filtering System:
MAX(x1) -> MAX(x1)
g(x1, x2) -> g(x1, x2)
f(x1, x2) -> f(x1, x2)
++(x1, x2) -> ++(x1, x2)
null(x1) -> null(x1)
mem(x1, x2) -> mem(x1, x2)
or(x1, x2) -> or(x1, x2)
=(x1, x2) -> x1
max(x1) -> max(x1)
not(x1) -> not(x1)
max'(x1, x2) -> max'(x1, x2)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳AFS`
`       →DP Problem 4`
`         ↳AFS`
`           →DP Problem 8`
`             ↳Dependency Graph`

Dependency Pair:

Rules:

f(x, nil) -> g(nil, x)
f(x, g(y, z)) -> g(f(x, y), z)
++(x, nil) -> x
++(x, g(y, z)) -> g(++(x, y), z)
null(nil) -> true
null(g(x, y)) -> false
mem(nil, y) -> false
mem(g(x, y), z) -> or(=(y, z), mem(x, z))
mem(x, max(x)) -> not(null(x))
max(g(g(nil, x), y)) -> max'(x, y)
max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u)

Using the Dependency Graph resulted in no new DP problems.

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