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: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
{mem, null, =} > not
{mem, null, =} > or
++ > {g, max, max'} > {true, nil, false}
f > {g, max, max'} > {true, nil, false}

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, x2)
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: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
mem > not
mem > or
mem > =
++ > {true, g, max, max', nil, false} > null
f > {true, g, max, max', nil, false} > null

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, x2)
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: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
max > not
max > max'
max > null > {mem, =, false} > or
++ > g
nil > true
f > g

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, x2)
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: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
{true, nil}
{mem, =} > {g, false}
{mem, =} > or
max > not
max > max'
max > null
++ > {g, false}
f > {g, false}

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, x2)
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:37 minutes