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



PROLOG
  ↳ PrologToPiTRSProof

p1(00).
p1(s1(X)) :- geq2(X, Y), p1(Y).
geq2(X, X).
geq2(s1(X), Y) :- geq2(X, Y).


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


p_1_in_g1(0_0) -> p_1_out_g1(0_0)
p_1_in_g1(s_11(X)) -> if_p_1_in_1_g2(X, geq_2_in_ga2(X, Y))
geq_2_in_ga2(X, X) -> geq_2_out_ga2(X, X)
geq_2_in_ga2(s_11(X), Y) -> if_geq_2_in_1_ga3(X, Y, geq_2_in_ga2(X, Y))
if_geq_2_in_1_ga3(X, Y, geq_2_out_ga2(X, Y)) -> geq_2_out_ga2(s_11(X), Y)
if_p_1_in_1_g2(X, geq_2_out_ga2(X, Y)) -> if_p_1_in_2_g3(X, Y, p_1_in_g1(Y))
if_p_1_in_2_g3(X, Y, p_1_out_g1(Y)) -> p_1_out_g1(s_11(X))

The argument filtering Pi contains the following mapping:
p_1_in_g1(x1)  =  p_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
p_1_out_g1(x1)  =  p_1_out_g
if_p_1_in_1_g2(x1, x2)  =  if_p_1_in_1_g1(x2)
geq_2_in_ga2(x1, x2)  =  geq_2_in_ga1(x1)
geq_2_out_ga2(x1, x2)  =  geq_2_out_ga1(x2)
if_geq_2_in_1_ga3(x1, x2, x3)  =  if_geq_2_in_1_ga1(x3)
if_p_1_in_2_g3(x1, x2, x3)  =  if_p_1_in_2_g1(x3)

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:

p_1_in_g1(0_0) -> p_1_out_g1(0_0)
p_1_in_g1(s_11(X)) -> if_p_1_in_1_g2(X, geq_2_in_ga2(X, Y))
geq_2_in_ga2(X, X) -> geq_2_out_ga2(X, X)
geq_2_in_ga2(s_11(X), Y) -> if_geq_2_in_1_ga3(X, Y, geq_2_in_ga2(X, Y))
if_geq_2_in_1_ga3(X, Y, geq_2_out_ga2(X, Y)) -> geq_2_out_ga2(s_11(X), Y)
if_p_1_in_1_g2(X, geq_2_out_ga2(X, Y)) -> if_p_1_in_2_g3(X, Y, p_1_in_g1(Y))
if_p_1_in_2_g3(X, Y, p_1_out_g1(Y)) -> p_1_out_g1(s_11(X))

The argument filtering Pi contains the following mapping:
p_1_in_g1(x1)  =  p_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
p_1_out_g1(x1)  =  p_1_out_g
if_p_1_in_1_g2(x1, x2)  =  if_p_1_in_1_g1(x2)
geq_2_in_ga2(x1, x2)  =  geq_2_in_ga1(x1)
geq_2_out_ga2(x1, x2)  =  geq_2_out_ga1(x2)
if_geq_2_in_1_ga3(x1, x2, x3)  =  if_geq_2_in_1_ga1(x3)
if_p_1_in_2_g3(x1, x2, x3)  =  if_p_1_in_2_g1(x3)


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

P_1_IN_G1(s_11(X)) -> IF_P_1_IN_1_G2(X, geq_2_in_ga2(X, Y))
P_1_IN_G1(s_11(X)) -> GEQ_2_IN_GA2(X, Y)
GEQ_2_IN_GA2(s_11(X), Y) -> IF_GEQ_2_IN_1_GA3(X, Y, geq_2_in_ga2(X, Y))
GEQ_2_IN_GA2(s_11(X), Y) -> GEQ_2_IN_GA2(X, Y)
IF_P_1_IN_1_G2(X, geq_2_out_ga2(X, Y)) -> IF_P_1_IN_2_G3(X, Y, p_1_in_g1(Y))
IF_P_1_IN_1_G2(X, geq_2_out_ga2(X, Y)) -> P_1_IN_G1(Y)

The TRS R consists of the following rules:

p_1_in_g1(0_0) -> p_1_out_g1(0_0)
p_1_in_g1(s_11(X)) -> if_p_1_in_1_g2(X, geq_2_in_ga2(X, Y))
geq_2_in_ga2(X, X) -> geq_2_out_ga2(X, X)
geq_2_in_ga2(s_11(X), Y) -> if_geq_2_in_1_ga3(X, Y, geq_2_in_ga2(X, Y))
if_geq_2_in_1_ga3(X, Y, geq_2_out_ga2(X, Y)) -> geq_2_out_ga2(s_11(X), Y)
if_p_1_in_1_g2(X, geq_2_out_ga2(X, Y)) -> if_p_1_in_2_g3(X, Y, p_1_in_g1(Y))
if_p_1_in_2_g3(X, Y, p_1_out_g1(Y)) -> p_1_out_g1(s_11(X))

The argument filtering Pi contains the following mapping:
p_1_in_g1(x1)  =  p_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
p_1_out_g1(x1)  =  p_1_out_g
if_p_1_in_1_g2(x1, x2)  =  if_p_1_in_1_g1(x2)
geq_2_in_ga2(x1, x2)  =  geq_2_in_ga1(x1)
geq_2_out_ga2(x1, x2)  =  geq_2_out_ga1(x2)
if_geq_2_in_1_ga3(x1, x2, x3)  =  if_geq_2_in_1_ga1(x3)
if_p_1_in_2_g3(x1, x2, x3)  =  if_p_1_in_2_g1(x3)
IF_GEQ_2_IN_1_GA3(x1, x2, x3)  =  IF_GEQ_2_IN_1_GA1(x3)
GEQ_2_IN_GA2(x1, x2)  =  GEQ_2_IN_GA1(x1)
IF_P_1_IN_2_G3(x1, x2, x3)  =  IF_P_1_IN_2_G1(x3)
IF_P_1_IN_1_G2(x1, x2)  =  IF_P_1_IN_1_G1(x2)
P_1_IN_G1(x1)  =  P_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:

P_1_IN_G1(s_11(X)) -> IF_P_1_IN_1_G2(X, geq_2_in_ga2(X, Y))
P_1_IN_G1(s_11(X)) -> GEQ_2_IN_GA2(X, Y)
GEQ_2_IN_GA2(s_11(X), Y) -> IF_GEQ_2_IN_1_GA3(X, Y, geq_2_in_ga2(X, Y))
GEQ_2_IN_GA2(s_11(X), Y) -> GEQ_2_IN_GA2(X, Y)
IF_P_1_IN_1_G2(X, geq_2_out_ga2(X, Y)) -> IF_P_1_IN_2_G3(X, Y, p_1_in_g1(Y))
IF_P_1_IN_1_G2(X, geq_2_out_ga2(X, Y)) -> P_1_IN_G1(Y)

The TRS R consists of the following rules:

p_1_in_g1(0_0) -> p_1_out_g1(0_0)
p_1_in_g1(s_11(X)) -> if_p_1_in_1_g2(X, geq_2_in_ga2(X, Y))
geq_2_in_ga2(X, X) -> geq_2_out_ga2(X, X)
geq_2_in_ga2(s_11(X), Y) -> if_geq_2_in_1_ga3(X, Y, geq_2_in_ga2(X, Y))
if_geq_2_in_1_ga3(X, Y, geq_2_out_ga2(X, Y)) -> geq_2_out_ga2(s_11(X), Y)
if_p_1_in_1_g2(X, geq_2_out_ga2(X, Y)) -> if_p_1_in_2_g3(X, Y, p_1_in_g1(Y))
if_p_1_in_2_g3(X, Y, p_1_out_g1(Y)) -> p_1_out_g1(s_11(X))

The argument filtering Pi contains the following mapping:
p_1_in_g1(x1)  =  p_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
p_1_out_g1(x1)  =  p_1_out_g
if_p_1_in_1_g2(x1, x2)  =  if_p_1_in_1_g1(x2)
geq_2_in_ga2(x1, x2)  =  geq_2_in_ga1(x1)
geq_2_out_ga2(x1, x2)  =  geq_2_out_ga1(x2)
if_geq_2_in_1_ga3(x1, x2, x3)  =  if_geq_2_in_1_ga1(x3)
if_p_1_in_2_g3(x1, x2, x3)  =  if_p_1_in_2_g1(x3)
IF_GEQ_2_IN_1_GA3(x1, x2, x3)  =  IF_GEQ_2_IN_1_GA1(x3)
GEQ_2_IN_GA2(x1, x2)  =  GEQ_2_IN_GA1(x1)
IF_P_1_IN_2_G3(x1, x2, x3)  =  IF_P_1_IN_2_G1(x3)
IF_P_1_IN_1_G2(x1, x2)  =  IF_P_1_IN_1_G1(x2)
P_1_IN_G1(x1)  =  P_1_IN_G1(x1)

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

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

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

GEQ_2_IN_GA2(s_11(X), Y) -> GEQ_2_IN_GA2(X, Y)

The TRS R consists of the following rules:

p_1_in_g1(0_0) -> p_1_out_g1(0_0)
p_1_in_g1(s_11(X)) -> if_p_1_in_1_g2(X, geq_2_in_ga2(X, Y))
geq_2_in_ga2(X, X) -> geq_2_out_ga2(X, X)
geq_2_in_ga2(s_11(X), Y) -> if_geq_2_in_1_ga3(X, Y, geq_2_in_ga2(X, Y))
if_geq_2_in_1_ga3(X, Y, geq_2_out_ga2(X, Y)) -> geq_2_out_ga2(s_11(X), Y)
if_p_1_in_1_g2(X, geq_2_out_ga2(X, Y)) -> if_p_1_in_2_g3(X, Y, p_1_in_g1(Y))
if_p_1_in_2_g3(X, Y, p_1_out_g1(Y)) -> p_1_out_g1(s_11(X))

The argument filtering Pi contains the following mapping:
p_1_in_g1(x1)  =  p_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
p_1_out_g1(x1)  =  p_1_out_g
if_p_1_in_1_g2(x1, x2)  =  if_p_1_in_1_g1(x2)
geq_2_in_ga2(x1, x2)  =  geq_2_in_ga1(x1)
geq_2_out_ga2(x1, x2)  =  geq_2_out_ga1(x2)
if_geq_2_in_1_ga3(x1, x2, x3)  =  if_geq_2_in_1_ga1(x3)
if_p_1_in_2_g3(x1, x2, x3)  =  if_p_1_in_2_g1(x3)
GEQ_2_IN_GA2(x1, x2)  =  GEQ_2_IN_GA1(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:

GEQ_2_IN_GA2(s_11(X), Y) -> GEQ_2_IN_GA2(X, Y)

R is empty.
The argument filtering Pi contains the following mapping:
s_11(x1)  =  s_11(x1)
GEQ_2_IN_GA2(x1, x2)  =  GEQ_2_IN_GA1(x1)

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:

GEQ_2_IN_GA1(s_11(X)) -> GEQ_2_IN_GA1(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {GEQ_2_IN_GA1}.
By using the subterm criterion together with the size-change analysis we have proven that there are no infinite chains for this DP problem.

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



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

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

IF_P_1_IN_1_G2(X, geq_2_out_ga2(X, Y)) -> P_1_IN_G1(Y)
P_1_IN_G1(s_11(X)) -> IF_P_1_IN_1_G2(X, geq_2_in_ga2(X, Y))

The TRS R consists of the following rules:

p_1_in_g1(0_0) -> p_1_out_g1(0_0)
p_1_in_g1(s_11(X)) -> if_p_1_in_1_g2(X, geq_2_in_ga2(X, Y))
geq_2_in_ga2(X, X) -> geq_2_out_ga2(X, X)
geq_2_in_ga2(s_11(X), Y) -> if_geq_2_in_1_ga3(X, Y, geq_2_in_ga2(X, Y))
if_geq_2_in_1_ga3(X, Y, geq_2_out_ga2(X, Y)) -> geq_2_out_ga2(s_11(X), Y)
if_p_1_in_1_g2(X, geq_2_out_ga2(X, Y)) -> if_p_1_in_2_g3(X, Y, p_1_in_g1(Y))
if_p_1_in_2_g3(X, Y, p_1_out_g1(Y)) -> p_1_out_g1(s_11(X))

The argument filtering Pi contains the following mapping:
p_1_in_g1(x1)  =  p_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
p_1_out_g1(x1)  =  p_1_out_g
if_p_1_in_1_g2(x1, x2)  =  if_p_1_in_1_g1(x2)
geq_2_in_ga2(x1, x2)  =  geq_2_in_ga1(x1)
geq_2_out_ga2(x1, x2)  =  geq_2_out_ga1(x2)
if_geq_2_in_1_ga3(x1, x2, x3)  =  if_geq_2_in_1_ga1(x3)
if_p_1_in_2_g3(x1, x2, x3)  =  if_p_1_in_2_g1(x3)
IF_P_1_IN_1_G2(x1, x2)  =  IF_P_1_IN_1_G1(x2)
P_1_IN_G1(x1)  =  P_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:

IF_P_1_IN_1_G2(X, geq_2_out_ga2(X, Y)) -> P_1_IN_G1(Y)
P_1_IN_G1(s_11(X)) -> IF_P_1_IN_1_G2(X, geq_2_in_ga2(X, Y))

The TRS R consists of the following rules:

geq_2_in_ga2(X, X) -> geq_2_out_ga2(X, X)
geq_2_in_ga2(s_11(X), Y) -> if_geq_2_in_1_ga3(X, Y, geq_2_in_ga2(X, Y))
if_geq_2_in_1_ga3(X, Y, geq_2_out_ga2(X, Y)) -> geq_2_out_ga2(s_11(X), Y)

The argument filtering Pi contains the following mapping:
s_11(x1)  =  s_11(x1)
geq_2_in_ga2(x1, x2)  =  geq_2_in_ga1(x1)
geq_2_out_ga2(x1, x2)  =  geq_2_out_ga1(x2)
if_geq_2_in_1_ga3(x1, x2, x3)  =  if_geq_2_in_1_ga1(x3)
IF_P_1_IN_1_G2(x1, x2)  =  IF_P_1_IN_1_G1(x2)
P_1_IN_G1(x1)  =  P_1_IN_G1(x1)

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
                        ↳ RuleRemovalProof

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

IF_P_1_IN_1_G1(geq_2_out_ga1(Y)) -> P_1_IN_G1(Y)
P_1_IN_G1(s_11(X)) -> IF_P_1_IN_1_G1(geq_2_in_ga1(X))

The TRS R consists of the following rules:

geq_2_in_ga1(X) -> geq_2_out_ga1(X)
geq_2_in_ga1(s_11(X)) -> if_geq_2_in_1_ga1(geq_2_in_ga1(X))
if_geq_2_in_1_ga1(geq_2_out_ga1(Y)) -> geq_2_out_ga1(Y)

The set Q consists of the following terms:

geq_2_in_ga1(x0)
if_geq_2_in_1_ga1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {P_1_IN_G1, IF_P_1_IN_1_G1}.
By using a polynomial ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

IF_P_1_IN_1_G1(geq_2_out_ga1(Y)) -> P_1_IN_G1(Y)

Strictly oriented rules of the TRS R:

geq_2_in_ga1(X) -> geq_2_out_ga1(X)
geq_2_in_ga1(s_11(X)) -> if_geq_2_in_1_ga1(geq_2_in_ga1(X))

Used ordering: POLO with Polynomial interpretation:

POL(if_geq_2_in_1_ga1(x1)) = x1   
POL(IF_P_1_IN_1_G1(x1)) = x1   
POL(geq_2_out_ga1(x1)) = 1 + x1   
POL(s_11(x1)) = 2 + x1   
POL(geq_2_in_ga1(x1)) = 2 + x1   
POL(P_1_IN_G1(x1)) = x1   



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

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

P_1_IN_G1(s_11(X)) -> IF_P_1_IN_1_G1(geq_2_in_ga1(X))

The TRS R consists of the following rules:

if_geq_2_in_1_ga1(geq_2_out_ga1(Y)) -> geq_2_out_ga1(Y)

The set Q consists of the following terms:

geq_2_in_ga1(x0)
if_geq_2_in_1_ga1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IF_P_1_IN_1_G1, P_1_IN_G1}.
The approximation of the Dependency Graph contains 0 SCCs with 1 less node.