(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(h(X)) → MARK(g(X, X))
ACTIVE(h(X)) → G(X, X)
ACTIVE(g(a, X)) → MARK(f(b, X))
ACTIVE(g(a, X)) → F(b, X)
ACTIVE(f(X, X)) → MARK(h(a))
ACTIVE(f(X, X)) → H(a)
ACTIVE(a) → MARK(b)
MARK(h(X)) → ACTIVE(h(mark(X)))
MARK(h(X)) → H(mark(X))
MARK(h(X)) → MARK(X)
MARK(g(X1, X2)) → ACTIVE(g(mark(X1), X2))
MARK(g(X1, X2)) → G(mark(X1), X2)
MARK(g(X1, X2)) → MARK(X1)
MARK(a) → ACTIVE(a)
MARK(f(X1, X2)) → ACTIVE(f(mark(X1), X2))
MARK(f(X1, X2)) → F(mark(X1), X2)
MARK(f(X1, X2)) → MARK(X1)
MARK(b) → ACTIVE(b)
H(mark(X)) → H(X)
H(active(X)) → H(X)
G(mark(X1), X2) → G(X1, X2)
G(X1, mark(X2)) → G(X1, X2)
G(active(X1), X2) → G(X1, X2)
G(X1, active(X2)) → G(X1, X2)
F(mark(X1), X2) → F(X1, X2)
F(X1, mark(X2)) → F(X1, X2)
F(active(X1), X2) → F(X1, X2)
F(X1, active(X2)) → F(X1, X2)

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 4 SCCs with 9 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

Q DP problem:
The TRS P consists of the following rules:

F(X1, mark(X2)) → F(X1, X2)
F(mark(X1), X2) → F(X1, X2)
F(active(X1), X2) → F(X1, X2)
F(X1, active(X2)) → F(X1, X2)

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(6) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


F(X1, mark(X2)) → F(X1, X2)
F(mark(X1), X2) → F(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
F(x1, x2)  =  F(x1, x2)
mark(x1)  =  mark(x1)
active(x1)  =  x1

Lexicographic path order with status [LPO].
Quasi-Precedence:
mark1 > F2

Status:
F2: [2,1]
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

(7) Obligation:

Q DP problem:
The TRS P consists of the following rules:

F(active(X1), X2) → F(X1, X2)
F(X1, active(X2)) → F(X1, X2)

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


F(X1, active(X2)) → F(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
F(x1, x2)  =  F(x2)
active(x1)  =  active(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
active1 > F1

Status:
F1: [1]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

Q DP problem:
The TRS P consists of the following rules:

F(active(X1), X2) → F(X1, X2)

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(10) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


F(active(X1), X2) → F(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Lexicographic path order with status [LPO].
Quasi-Precedence:
[F2, active1]

Status:
F2: [2,1]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

(11) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(12) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(13) TRUE

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

G(X1, mark(X2)) → G(X1, X2)
G(mark(X1), X2) → G(X1, X2)
G(active(X1), X2) → G(X1, X2)
G(X1, active(X2)) → G(X1, X2)

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


G(X1, mark(X2)) → G(X1, X2)
G(mark(X1), X2) → G(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
G(x1, x2)  =  G(x1, x2)
mark(x1)  =  mark(x1)
active(x1)  =  x1

Lexicographic path order with status [LPO].
Quasi-Precedence:
mark1 > G2

Status:
G2: [2,1]
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

G(active(X1), X2) → G(X1, X2)
G(X1, active(X2)) → G(X1, X2)

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(17) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


G(X1, active(X2)) → G(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
G(x1, x2)  =  G(x2)
active(x1)  =  active(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
active1 > G1

Status:
G1: [1]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

G(active(X1), X2) → G(X1, X2)

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(19) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


G(active(X1), X2) → G(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Lexicographic path order with status [LPO].
Quasi-Precedence:
[G2, active1]

Status:
G2: [2,1]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

(20) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(21) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(22) TRUE

(23) Obligation:

Q DP problem:
The TRS P consists of the following rules:

H(active(X)) → H(X)
H(mark(X)) → H(X)

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(24) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


H(active(X)) → H(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
H(x1)  =  H(x1)
active(x1)  =  active(x1)
mark(x1)  =  x1

Lexicographic path order with status [LPO].
Quasi-Precedence:
[H1, active1]

Status:
H1: [1]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

(25) Obligation:

Q DP problem:
The TRS P consists of the following rules:

H(mark(X)) → H(X)

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(26) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


H(mark(X)) → H(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
H(x1)  =  x1
mark(x1)  =  mark(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

(27) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(28) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(29) TRUE

(30) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MARK(h(X)) → ACTIVE(h(mark(X)))
ACTIVE(h(X)) → MARK(g(X, X))
MARK(h(X)) → MARK(X)
MARK(g(X1, X2)) → ACTIVE(g(mark(X1), X2))
ACTIVE(g(a, X)) → MARK(f(b, X))
MARK(g(X1, X2)) → MARK(X1)
MARK(f(X1, X2)) → ACTIVE(f(mark(X1), X2))
ACTIVE(f(X, X)) → MARK(h(a))
MARK(f(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(31) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(h(X)) → MARK(X)
MARK(g(X1, X2)) → MARK(X1)
MARK(f(X1, X2)) → MARK(X1)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  x1
h(x1)  =  h(x1)
ACTIVE(x1)  =  x1
mark(x1)  =  x1
g(x1, x2)  =  g(x1)
a  =  a
f(x1, x2)  =  f(x1)
b  =  b
active(x1)  =  x1

Lexicographic path order with status [LPO].
Quasi-Precedence:
[h1, g1, f1] > [a, b]

Status:
h1: [1]
g1: [1]
a: []
f1: [1]
b: []


The following usable rules [FROCOS05] were oriented:

mark(h(X)) → active(h(mark(X)))
active(h(X)) → mark(g(X, X))
mark(g(X1, X2)) → active(g(mark(X1), X2))
active(g(a, X)) → mark(f(b, X))
mark(f(X1, X2)) → active(f(mark(X1), X2))
active(f(X, X)) → mark(h(a))
mark(a) → active(a)
mark(b) → active(b)
h(active(X)) → h(X)
h(mark(X)) → h(X)
g(X1, mark(X2)) → g(X1, X2)
g(mark(X1), X2) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)
active(a) → mark(b)

(32) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MARK(h(X)) → ACTIVE(h(mark(X)))
ACTIVE(h(X)) → MARK(g(X, X))
MARK(g(X1, X2)) → ACTIVE(g(mark(X1), X2))
ACTIVE(g(a, X)) → MARK(f(b, X))
MARK(f(X1, X2)) → ACTIVE(f(mark(X1), X2))
ACTIVE(f(X, X)) → MARK(h(a))

The TRS R consists of the following rules:

active(h(X)) → mark(g(X, X))
active(g(a, X)) → mark(f(b, X))
active(f(X, X)) → mark(h(a))
active(a) → mark(b)
mark(h(X)) → active(h(mark(X)))
mark(g(X1, X2)) → active(g(mark(X1), X2))
mark(a) → active(a)
mark(f(X1, X2)) → active(f(mark(X1), X2))
mark(b) → active(b)
h(mark(X)) → h(X)
h(active(X)) → h(X)
g(mark(X1), X2) → g(X1, X2)
g(X1, mark(X2)) → g(X1, X2)
g(active(X1), X2) → g(X1, X2)
g(X1, active(X2)) → g(X1, X2)
f(mark(X1), X2) → f(X1, X2)
f(X1, mark(X2)) → f(X1, X2)
f(active(X1), X2) → f(X1, X2)
f(X1, active(X2)) → f(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.