Left Termination of the query pattern h(b) w.r.t. the given Prolog program could successfully be proven:



PROLOG
  ↳ PrologToPiTRSProof

f1(c2(s1(X), Y)) :- f1(c2(X, s1(Y))).
g1(c2(X, s1(Y))) :- g1(c2(s1(X), Y)).
h1(X) :- f1(X), g1(X).


With regard to the inferred argument filtering the predicates were used in the following modes:
h1: (b)
f1: (b)
g1: (b)
Transforming PROLOG into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:


h_1_in_g1(X) -> if_h_1_in_1_g2(X, f_1_in_g1(X))
f_1_in_g1(c_22(s_11(X), Y)) -> if_f_1_in_1_g3(X, Y, f_1_in_g1(c_22(X, s_11(Y))))
if_f_1_in_1_g3(X, Y, f_1_out_g1(c_22(X, s_11(Y)))) -> f_1_out_g1(c_22(s_11(X), Y))
if_h_1_in_1_g2(X, f_1_out_g1(X)) -> if_h_1_in_2_g2(X, g_1_in_g1(X))
g_1_in_g1(c_22(X, s_11(Y))) -> if_g_1_in_1_g3(X, Y, g_1_in_g1(c_22(s_11(X), Y)))
if_g_1_in_1_g3(X, Y, g_1_out_g1(c_22(s_11(X), Y))) -> g_1_out_g1(c_22(X, s_11(Y)))
if_h_1_in_2_g2(X, g_1_out_g1(X)) -> h_1_out_g1(X)

The argument filtering Pi contains the following mapping:
h_1_in_g1(x1)  =  h_1_in_g1(x1)
c_22(x1, x2)  =  c_22(x1, x2)
s_11(x1)  =  s_11(x1)
if_h_1_in_1_g2(x1, x2)  =  if_h_1_in_1_g2(x1, x2)
f_1_in_g1(x1)  =  f_1_in_g1(x1)
if_f_1_in_1_g3(x1, x2, x3)  =  if_f_1_in_1_g1(x3)
f_1_out_g1(x1)  =  f_1_out_g
if_h_1_in_2_g2(x1, x2)  =  if_h_1_in_2_g1(x2)
g_1_in_g1(x1)  =  g_1_in_g1(x1)
if_g_1_in_1_g3(x1, x2, x3)  =  if_g_1_in_1_g1(x3)
g_1_out_g1(x1)  =  g_1_out_g
h_1_out_g1(x1)  =  h_1_out_g

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

h_1_in_g1(X) -> if_h_1_in_1_g2(X, f_1_in_g1(X))
f_1_in_g1(c_22(s_11(X), Y)) -> if_f_1_in_1_g3(X, Y, f_1_in_g1(c_22(X, s_11(Y))))
if_f_1_in_1_g3(X, Y, f_1_out_g1(c_22(X, s_11(Y)))) -> f_1_out_g1(c_22(s_11(X), Y))
if_h_1_in_1_g2(X, f_1_out_g1(X)) -> if_h_1_in_2_g2(X, g_1_in_g1(X))
g_1_in_g1(c_22(X, s_11(Y))) -> if_g_1_in_1_g3(X, Y, g_1_in_g1(c_22(s_11(X), Y)))
if_g_1_in_1_g3(X, Y, g_1_out_g1(c_22(s_11(X), Y))) -> g_1_out_g1(c_22(X, s_11(Y)))
if_h_1_in_2_g2(X, g_1_out_g1(X)) -> h_1_out_g1(X)

The argument filtering Pi contains the following mapping:
h_1_in_g1(x1)  =  h_1_in_g1(x1)
c_22(x1, x2)  =  c_22(x1, x2)
s_11(x1)  =  s_11(x1)
if_h_1_in_1_g2(x1, x2)  =  if_h_1_in_1_g2(x1, x2)
f_1_in_g1(x1)  =  f_1_in_g1(x1)
if_f_1_in_1_g3(x1, x2, x3)  =  if_f_1_in_1_g1(x3)
f_1_out_g1(x1)  =  f_1_out_g
if_h_1_in_2_g2(x1, x2)  =  if_h_1_in_2_g1(x2)
g_1_in_g1(x1)  =  g_1_in_g1(x1)
if_g_1_in_1_g3(x1, x2, x3)  =  if_g_1_in_1_g1(x3)
g_1_out_g1(x1)  =  g_1_out_g
h_1_out_g1(x1)  =  h_1_out_g


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

H_1_IN_G1(X) -> IF_H_1_IN_1_G2(X, f_1_in_g1(X))
H_1_IN_G1(X) -> F_1_IN_G1(X)
F_1_IN_G1(c_22(s_11(X), Y)) -> IF_F_1_IN_1_G3(X, Y, f_1_in_g1(c_22(X, s_11(Y))))
F_1_IN_G1(c_22(s_11(X), Y)) -> F_1_IN_G1(c_22(X, s_11(Y)))
IF_H_1_IN_1_G2(X, f_1_out_g1(X)) -> IF_H_1_IN_2_G2(X, g_1_in_g1(X))
IF_H_1_IN_1_G2(X, f_1_out_g1(X)) -> G_1_IN_G1(X)
G_1_IN_G1(c_22(X, s_11(Y))) -> IF_G_1_IN_1_G3(X, Y, g_1_in_g1(c_22(s_11(X), Y)))
G_1_IN_G1(c_22(X, s_11(Y))) -> G_1_IN_G1(c_22(s_11(X), Y))

The TRS R consists of the following rules:

h_1_in_g1(X) -> if_h_1_in_1_g2(X, f_1_in_g1(X))
f_1_in_g1(c_22(s_11(X), Y)) -> if_f_1_in_1_g3(X, Y, f_1_in_g1(c_22(X, s_11(Y))))
if_f_1_in_1_g3(X, Y, f_1_out_g1(c_22(X, s_11(Y)))) -> f_1_out_g1(c_22(s_11(X), Y))
if_h_1_in_1_g2(X, f_1_out_g1(X)) -> if_h_1_in_2_g2(X, g_1_in_g1(X))
g_1_in_g1(c_22(X, s_11(Y))) -> if_g_1_in_1_g3(X, Y, g_1_in_g1(c_22(s_11(X), Y)))
if_g_1_in_1_g3(X, Y, g_1_out_g1(c_22(s_11(X), Y))) -> g_1_out_g1(c_22(X, s_11(Y)))
if_h_1_in_2_g2(X, g_1_out_g1(X)) -> h_1_out_g1(X)

The argument filtering Pi contains the following mapping:
h_1_in_g1(x1)  =  h_1_in_g1(x1)
c_22(x1, x2)  =  c_22(x1, x2)
s_11(x1)  =  s_11(x1)
if_h_1_in_1_g2(x1, x2)  =  if_h_1_in_1_g2(x1, x2)
f_1_in_g1(x1)  =  f_1_in_g1(x1)
if_f_1_in_1_g3(x1, x2, x3)  =  if_f_1_in_1_g1(x3)
f_1_out_g1(x1)  =  f_1_out_g
if_h_1_in_2_g2(x1, x2)  =  if_h_1_in_2_g1(x2)
g_1_in_g1(x1)  =  g_1_in_g1(x1)
if_g_1_in_1_g3(x1, x2, x3)  =  if_g_1_in_1_g1(x3)
g_1_out_g1(x1)  =  g_1_out_g
h_1_out_g1(x1)  =  h_1_out_g
F_1_IN_G1(x1)  =  F_1_IN_G1(x1)
IF_H_1_IN_1_G2(x1, x2)  =  IF_H_1_IN_1_G2(x1, x2)
IF_G_1_IN_1_G3(x1, x2, x3)  =  IF_G_1_IN_1_G1(x3)
IF_H_1_IN_2_G2(x1, x2)  =  IF_H_1_IN_2_G1(x2)
G_1_IN_G1(x1)  =  G_1_IN_G1(x1)
IF_F_1_IN_1_G3(x1, x2, x3)  =  IF_F_1_IN_1_G1(x3)
H_1_IN_G1(x1)  =  H_1_IN_G1(x1)

We have to consider all (P,R,Pi)-chains

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

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

H_1_IN_G1(X) -> IF_H_1_IN_1_G2(X, f_1_in_g1(X))
H_1_IN_G1(X) -> F_1_IN_G1(X)
F_1_IN_G1(c_22(s_11(X), Y)) -> IF_F_1_IN_1_G3(X, Y, f_1_in_g1(c_22(X, s_11(Y))))
F_1_IN_G1(c_22(s_11(X), Y)) -> F_1_IN_G1(c_22(X, s_11(Y)))
IF_H_1_IN_1_G2(X, f_1_out_g1(X)) -> IF_H_1_IN_2_G2(X, g_1_in_g1(X))
IF_H_1_IN_1_G2(X, f_1_out_g1(X)) -> G_1_IN_G1(X)
G_1_IN_G1(c_22(X, s_11(Y))) -> IF_G_1_IN_1_G3(X, Y, g_1_in_g1(c_22(s_11(X), Y)))
G_1_IN_G1(c_22(X, s_11(Y))) -> G_1_IN_G1(c_22(s_11(X), Y))

The TRS R consists of the following rules:

h_1_in_g1(X) -> if_h_1_in_1_g2(X, f_1_in_g1(X))
f_1_in_g1(c_22(s_11(X), Y)) -> if_f_1_in_1_g3(X, Y, f_1_in_g1(c_22(X, s_11(Y))))
if_f_1_in_1_g3(X, Y, f_1_out_g1(c_22(X, s_11(Y)))) -> f_1_out_g1(c_22(s_11(X), Y))
if_h_1_in_1_g2(X, f_1_out_g1(X)) -> if_h_1_in_2_g2(X, g_1_in_g1(X))
g_1_in_g1(c_22(X, s_11(Y))) -> if_g_1_in_1_g3(X, Y, g_1_in_g1(c_22(s_11(X), Y)))
if_g_1_in_1_g3(X, Y, g_1_out_g1(c_22(s_11(X), Y))) -> g_1_out_g1(c_22(X, s_11(Y)))
if_h_1_in_2_g2(X, g_1_out_g1(X)) -> h_1_out_g1(X)

The argument filtering Pi contains the following mapping:
h_1_in_g1(x1)  =  h_1_in_g1(x1)
c_22(x1, x2)  =  c_22(x1, x2)
s_11(x1)  =  s_11(x1)
if_h_1_in_1_g2(x1, x2)  =  if_h_1_in_1_g2(x1, x2)
f_1_in_g1(x1)  =  f_1_in_g1(x1)
if_f_1_in_1_g3(x1, x2, x3)  =  if_f_1_in_1_g1(x3)
f_1_out_g1(x1)  =  f_1_out_g
if_h_1_in_2_g2(x1, x2)  =  if_h_1_in_2_g1(x2)
g_1_in_g1(x1)  =  g_1_in_g1(x1)
if_g_1_in_1_g3(x1, x2, x3)  =  if_g_1_in_1_g1(x3)
g_1_out_g1(x1)  =  g_1_out_g
h_1_out_g1(x1)  =  h_1_out_g
F_1_IN_G1(x1)  =  F_1_IN_G1(x1)
IF_H_1_IN_1_G2(x1, x2)  =  IF_H_1_IN_1_G2(x1, x2)
IF_G_1_IN_1_G3(x1, x2, x3)  =  IF_G_1_IN_1_G1(x3)
IF_H_1_IN_2_G2(x1, x2)  =  IF_H_1_IN_2_G1(x2)
G_1_IN_G1(x1)  =  G_1_IN_G1(x1)
IF_F_1_IN_1_G3(x1, x2, x3)  =  IF_F_1_IN_1_G1(x3)
H_1_IN_G1(x1)  =  H_1_IN_G1(x1)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph contains 2 SCCs with 6 less nodes.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

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

G_1_IN_G1(c_22(X, s_11(Y))) -> G_1_IN_G1(c_22(s_11(X), Y))

The TRS R consists of the following rules:

h_1_in_g1(X) -> if_h_1_in_1_g2(X, f_1_in_g1(X))
f_1_in_g1(c_22(s_11(X), Y)) -> if_f_1_in_1_g3(X, Y, f_1_in_g1(c_22(X, s_11(Y))))
if_f_1_in_1_g3(X, Y, f_1_out_g1(c_22(X, s_11(Y)))) -> f_1_out_g1(c_22(s_11(X), Y))
if_h_1_in_1_g2(X, f_1_out_g1(X)) -> if_h_1_in_2_g2(X, g_1_in_g1(X))
g_1_in_g1(c_22(X, s_11(Y))) -> if_g_1_in_1_g3(X, Y, g_1_in_g1(c_22(s_11(X), Y)))
if_g_1_in_1_g3(X, Y, g_1_out_g1(c_22(s_11(X), Y))) -> g_1_out_g1(c_22(X, s_11(Y)))
if_h_1_in_2_g2(X, g_1_out_g1(X)) -> h_1_out_g1(X)

The argument filtering Pi contains the following mapping:
h_1_in_g1(x1)  =  h_1_in_g1(x1)
c_22(x1, x2)  =  c_22(x1, x2)
s_11(x1)  =  s_11(x1)
if_h_1_in_1_g2(x1, x2)  =  if_h_1_in_1_g2(x1, x2)
f_1_in_g1(x1)  =  f_1_in_g1(x1)
if_f_1_in_1_g3(x1, x2, x3)  =  if_f_1_in_1_g1(x3)
f_1_out_g1(x1)  =  f_1_out_g
if_h_1_in_2_g2(x1, x2)  =  if_h_1_in_2_g1(x2)
g_1_in_g1(x1)  =  g_1_in_g1(x1)
if_g_1_in_1_g3(x1, x2, x3)  =  if_g_1_in_1_g1(x3)
g_1_out_g1(x1)  =  g_1_out_g
h_1_out_g1(x1)  =  h_1_out_g
G_1_IN_G1(x1)  =  G_1_IN_G1(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

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

G_1_IN_G1(c_22(X, s_11(Y))) -> G_1_IN_G1(c_22(s_11(X), Y))

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

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

G_1_IN_G1(c_22(X, s_11(Y))) -> G_1_IN_G1(c_22(s_11(X), Y))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {G_1_IN_G1}.
We used the following order and afs together with the size-change analysis to show that there are no infinite chains for this DP problem.

Order:Homeomorphic Embedding Order

AFS:
s_11(x1)  =  s_11(x1)
c_22(x1, x2)  =  x2

From the DPs we obtained the following set of size-change graphs:

We oriented the following set of usable rules. none


↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

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

F_1_IN_G1(c_22(s_11(X), Y)) -> F_1_IN_G1(c_22(X, s_11(Y)))

The TRS R consists of the following rules:

h_1_in_g1(X) -> if_h_1_in_1_g2(X, f_1_in_g1(X))
f_1_in_g1(c_22(s_11(X), Y)) -> if_f_1_in_1_g3(X, Y, f_1_in_g1(c_22(X, s_11(Y))))
if_f_1_in_1_g3(X, Y, f_1_out_g1(c_22(X, s_11(Y)))) -> f_1_out_g1(c_22(s_11(X), Y))
if_h_1_in_1_g2(X, f_1_out_g1(X)) -> if_h_1_in_2_g2(X, g_1_in_g1(X))
g_1_in_g1(c_22(X, s_11(Y))) -> if_g_1_in_1_g3(X, Y, g_1_in_g1(c_22(s_11(X), Y)))
if_g_1_in_1_g3(X, Y, g_1_out_g1(c_22(s_11(X), Y))) -> g_1_out_g1(c_22(X, s_11(Y)))
if_h_1_in_2_g2(X, g_1_out_g1(X)) -> h_1_out_g1(X)

The argument filtering Pi contains the following mapping:
h_1_in_g1(x1)  =  h_1_in_g1(x1)
c_22(x1, x2)  =  c_22(x1, x2)
s_11(x1)  =  s_11(x1)
if_h_1_in_1_g2(x1, x2)  =  if_h_1_in_1_g2(x1, x2)
f_1_in_g1(x1)  =  f_1_in_g1(x1)
if_f_1_in_1_g3(x1, x2, x3)  =  if_f_1_in_1_g1(x3)
f_1_out_g1(x1)  =  f_1_out_g
if_h_1_in_2_g2(x1, x2)  =  if_h_1_in_2_g1(x2)
g_1_in_g1(x1)  =  g_1_in_g1(x1)
if_g_1_in_1_g3(x1, x2, x3)  =  if_g_1_in_1_g1(x3)
g_1_out_g1(x1)  =  g_1_out_g
h_1_out_g1(x1)  =  h_1_out_g
F_1_IN_G1(x1)  =  F_1_IN_G1(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

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

F_1_IN_G1(c_22(s_11(X), Y)) -> F_1_IN_G1(c_22(X, s_11(Y)))

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof

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

F_1_IN_G1(c_22(s_11(X), Y)) -> F_1_IN_G1(c_22(X, s_11(Y)))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {F_1_IN_G1}.
We used the following order and afs together with the size-change analysis to show that there are no infinite chains for this DP problem.

Order:Homeomorphic Embedding Order

AFS:
s_11(x1)  =  s_11(x1)
c_22(x1, x2)  =  x1

From the DPs we obtained the following set of size-change graphs:

We oriented the following set of usable rules. none