YES Termination w.r.t. Q proof of AProVE_09_Inductive_mod.ari

(0) Obligation:

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

minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
mod(x, 0) → 0
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)

Q is empty.

(1) Overlay + Local Confluence (EQUIVALENT transformation)

The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.

(2) Obligation:

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

minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
mod(x, 0) → 0
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

(3) DependencyPairsProof (EQUIVALENT transformation)

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

(4) Obligation:

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

MINUS(s(x), y) → IF(gt(s(x), y), x, y)
MINUS(s(x), y) → GT(s(x), y)
IF(true, x, y) → MINUS(x, y)
MOD(x, s(y)) → IF1(lt(x, s(y)), x, s(y))
MOD(x, s(y)) → LT(x, s(y))
IF1(false, x, y) → MOD(minus(x, y), y)
IF1(false, x, y) → MINUS(x, y)
GT(s(x), s(y)) → GT(x, y)
LT(s(x), s(y)) → LT(x, y)

The TRS R consists of the following rules:

minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
mod(x, 0) → 0
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

LT(s(x), s(y)) → LT(x, y)

The TRS R consists of the following rules:

minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
mod(x, 0) → 0
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(8) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(9) Obligation:

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

LT(s(x), s(y)) → LT(x, y)

R is empty.
The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(10) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

(11) Obligation:

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

LT(s(x), s(y)) → LT(x, y)

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

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] 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:

  • LT(s(x), s(y)) → LT(x, y)
    The graph contains the following edges 1 > 1, 2 > 2

(13) YES

(14) Obligation:

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

GT(s(x), s(y)) → GT(x, y)

The TRS R consists of the following rules:

minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
mod(x, 0) → 0
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(15) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(16) Obligation:

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

GT(s(x), s(y)) → GT(x, y)

R is empty.
The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(17) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

(18) Obligation:

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

GT(s(x), s(y)) → GT(x, y)

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

(19) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] 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:

  • GT(s(x), s(y)) → GT(x, y)
    The graph contains the following edges 1 > 1, 2 > 2

(20) YES

(21) Obligation:

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

IF(true, x, y) → MINUS(x, y)
MINUS(s(x), y) → IF(gt(s(x), y), x, y)

The TRS R consists of the following rules:

minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
mod(x, 0) → 0
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(22) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(23) Obligation:

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

IF(true, x, y) → MINUS(x, y)
MINUS(s(x), y) → IF(gt(s(x), y), x, y)

The TRS R consists of the following rules:

gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
gt(0, y) → false

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(24) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

(25) Obligation:

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

IF(true, x, y) → MINUS(x, y)
MINUS(s(x), y) → IF(gt(s(x), y), x, y)

The TRS R consists of the following rules:

gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
gt(0, y) → false

The set Q consists of the following terms:

gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

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

(26) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] 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:

  • MINUS(s(x), y) → IF(gt(s(x), y), x, y)
    The graph contains the following edges 1 > 2, 2 >= 3

  • IF(true, x, y) → MINUS(x, y)
    The graph contains the following edges 2 >= 1, 3 >= 2

(27) YES

(28) Obligation:

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

IF1(false, x, y) → MOD(minus(x, y), y)
MOD(x, s(y)) → IF1(lt(x, s(y)), x, s(y))

The TRS R consists of the following rules:

minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
mod(x, 0) → 0
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(29) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(30) Obligation:

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

IF1(false, x, y) → MOD(minus(x, y), y)
MOD(x, s(y)) → IF1(lt(x, s(y)), x, s(y))

The TRS R consists of the following rules:

lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(31) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

mod(x0, 0)
mod(x0, s(x1))
if1(true, x0, x1)
if1(false, x0, x1)

(32) Obligation:

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

IF1(false, x, y) → MOD(minus(x, y), y)
MOD(x, s(y)) → IF1(lt(x, s(y)), x, s(y))

The TRS R consists of the following rules:

lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(33) TransformationProof (EQUIVALENT transformation)

By narrowing [LPAR04] the rule MOD(x, s(y)) → IF1(lt(x, s(y)), x, s(y)) at position [0] we obtained the following new rules [LPAR04]:

MOD(0, s(x0)) → IF1(true, 0, s(x0)) → MOD(0, s(x0)) → IF1(true, 0, s(x0))
MOD(s(x0), s(x1)) → IF1(lt(x0, x1), s(x0), s(x1)) → MOD(s(x0), s(x1)) → IF1(lt(x0, x1), s(x0), s(x1))

(34) Obligation:

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

IF1(false, x, y) → MOD(minus(x, y), y)
MOD(0, s(x0)) → IF1(true, 0, s(x0))
MOD(s(x0), s(x1)) → IF1(lt(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(35) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(36) Obligation:

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

MOD(s(x0), s(x1)) → IF1(lt(x0, x1), s(x0), s(x1))
IF1(false, x, y) → MOD(minus(x, y), y)

The TRS R consists of the following rules:

lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(37) TransformationProof (EQUIVALENT transformation)

By narrowing [LPAR04] the rule IF1(false, x, y) → MOD(minus(x, y), y) at position [0] we obtained the following new rules [LPAR04]:

IF1(false, 0, x0) → MOD(0, x0) → IF1(false, 0, x0) → MOD(0, x0)
IF1(false, s(x0), x1) → MOD(if(gt(s(x0), x1), x0, x1), x1) → IF1(false, s(x0), x1) → MOD(if(gt(s(x0), x1), x0, x1), x1)

(38) Obligation:

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

MOD(s(x0), s(x1)) → IF1(lt(x0, x1), s(x0), s(x1))
IF1(false, 0, x0) → MOD(0, x0)
IF1(false, s(x0), x1) → MOD(if(gt(s(x0), x1), x0, x1), x1)

The TRS R consists of the following rules:

lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(39) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(40) Obligation:

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

IF1(false, s(x0), x1) → MOD(if(gt(s(x0), x1), x0, x1), x1)
MOD(s(x0), s(x1)) → IF1(lt(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(41) TransformationProof (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF1(false, s(x0), x1) → MOD(if(gt(s(x0), x1), x0, x1), x1) we obtained the following new rules [LPAR04]:

IF1(false, s(z0), s(z1)) → MOD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1)) → IF1(false, s(z0), s(z1)) → MOD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1))

(42) Obligation:

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

MOD(s(x0), s(x1)) → IF1(lt(x0, x1), s(x0), s(x1))
IF1(false, s(z0), s(z1)) → MOD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1))

The TRS R consists of the following rules:

lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(43) TransformationProof (EQUIVALENT transformation)

By rewriting [LPAR04] the rule IF1(false, s(z0), s(z1)) → MOD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1)) at position [0,0] we obtained the following new rules [LPAR04]:

IF1(false, s(z0), s(z1)) → MOD(if(gt(z0, z1), z0, s(z1)), s(z1)) → IF1(false, s(z0), s(z1)) → MOD(if(gt(z0, z1), z0, s(z1)), s(z1))

(44) Obligation:

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

MOD(s(x0), s(x1)) → IF1(lt(x0, x1), s(x0), s(x1))
IF1(false, s(z0), s(z1)) → MOD(if(gt(z0, z1), z0, s(z1)), s(z1))

The TRS R consists of the following rules:

lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(45) Induction-Processor (SOUND transformation)


This DP could be deleted by the Induction-Processor:
IF1(false_renamed, s(z0), s(z1)) → MOD(if(gt(z0, z1), z0, s(z1)), s(z1))


This order was computed:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(IF1(x1, x2, x3)) = x1 + x2   
POL(MOD(x1, x2)) = x1   
POL(false_renamed) = 0   
POL(gt(x1, x2)) = 1 + x2   
POL(if(x1, x2, x3)) = 1 + x2   
POL(lt(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = 1 + x1   
POL(true_renamed) = 0   

At least one of these decreasing rules is always used after the deleted DP:
if(false_renamed, x5, y1) → 0


The following formula is valid:
z0:sort[a22],z1:sort[a22].if'(gt(z0 , z1 ), z0 , s(z1 ))=true


The transformed set:
if'(true_renamed, x4, y'') → minus'(x4, y'')
if'(false_renamed, x5, y1) → true
minus'(0, y3) → false
minus'(s(x6), y4) → if'(gt(s(x6), y4), x6, y4)
lt(0, s(x)) → true_renamed
lt(s(x'), s(y)) → lt(x', y)
lt(x'', 0) → false_renamed
gt(s(x2), 0) → true_renamed
gt(s(x3), s(y')) → gt(x3, y')
if(true_renamed, x4, y'') → s(minus(x4, y''))
if(false_renamed, x5, y1) → 0
gt(0, y2) → false_renamed
minus(0, y3) → 0
minus(s(x6), y4) → if(gt(s(x6), y4), x6, y4)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a22](0, 0) → true
equal_sort[a22](0, s(v30)) → false
equal_sort[a22](s(v31), 0) → false
equal_sort[a22](s(v31), s(v32)) → equal_sort[a22](v31, v32)
equal_sort[a21](true_renamed, true_renamed) → true
equal_sort[a21](true_renamed, false_renamed) → false
equal_sort[a21](false_renamed, true_renamed) → false
equal_sort[a21](false_renamed, false_renamed) → true
equal_sort[a39](witness_sort[a39], witness_sort[a39]) → true


The proof given by the theorem prover:
The following output was given by the internal theorem prover:
proof of internal
# AProVE Commit ID: 3a20a6ef7432c3f292db1a8838479c42bf5e3b22 root 20240618 unpublished


Partial correctness of the following Program

   [x, v30, v31, v32, x5, y1, y'', x6, y3, y4, x', y, x'', x2, x3, y', y2]
   equal_bool(true, false) -> false
   equal_bool(false, true) -> false
   equal_bool(true, true) -> true
   equal_bool(false, false) -> true
   true and x -> x
   false and x -> false
   true or x -> true
   false or x -> x
   not(false) -> true
   not(true) -> false
   isa_true(true) -> true
   isa_true(false) -> false
   isa_false(true) -> false
   isa_false(false) -> true
   equal_sort[a22](0, 0) -> true
   equal_sort[a22](0, s(v30)) -> false
   equal_sort[a22](s(v31), 0) -> false
   equal_sort[a22](s(v31), s(v32)) -> equal_sort[a22](v31, v32)
   equal_sort[a21](true_renamed, true_renamed) -> true
   equal_sort[a21](true_renamed, false_renamed) -> false
   equal_sort[a21](false_renamed, true_renamed) -> false
   equal_sort[a21](false_renamed, false_renamed) -> true
   equal_sort[a39](witness_sort[a39], witness_sort[a39]) -> true
   if'(false_renamed, x5, y1) -> true
   if'(true_renamed, 0, y'') -> false
   if'(true_renamed, s(x6), y'') -> if'(gt(s(x6), y''), x6, y'')
   minus'(0, y3) -> false
   equal_sort[a21](gt(s(x6), y4), true_renamed) -> true | minus'(s(x6), y4) -> minus'(x6, y4)
   equal_sort[a21](gt(s(x6), y4), true_renamed) -> false | minus'(s(x6), y4) -> true
   lt(0, s(x)) -> true_renamed
   lt(s(x'), s(y)) -> lt(x', y)
   lt(x'', 0) -> false_renamed
   gt(s(x2), 0) -> true_renamed
   gt(s(x3), s(y')) -> gt(x3, y')
   gt(0, y2) -> false_renamed
   if(false_renamed, x5, y1) -> 0
   if(true_renamed, 0, y'') -> s(0)
   if(true_renamed, s(x6), y'') -> s(if(gt(s(x6), y''), x6, y''))
   minus(0, y3) -> 0
   equal_sort[a21](gt(s(x6), y4), true_renamed) -> true | minus(s(x6), y4) -> s(minus(x6, y4))
   equal_sort[a21](gt(s(x6), y4), true_renamed) -> false | minus(s(x6), y4) -> 0

using the following formula:
z0:sort[a22],z1:sort[a22].if'(gt(z0, z1), z0, s(z1))=true

could be successfully shown:
(0) Formula
(1) Induction by algorithm [EQUIVALENT, 0 ms]
(2) AND
    (3) Formula
        (4) Symbolic evaluation [EQUIVALENT, 0 ms]
        (5) Formula
        (6) Induction by data structure [EQUIVALENT, 0 ms]
        (7) AND
            (8) Formula
                (9) Symbolic evaluation [EQUIVALENT, 0 ms]
                (10) YES
            (11) Formula
                (12) Symbolic evaluation under hypothesis [EQUIVALENT, 0 ms]
                (13) YES
    (14) Formula
        (15) Symbolic evaluation [EQUIVALENT, 0 ms]
        (16) YES
    (17) Formula
        (18) Symbolic evaluation [EQUIVALENT, 0 ms]
        (19) Formula
        (20) Hypothesis Lifting [EQUIVALENT, 0 ms]
        (21) Formula
        (22) Inverse Substitution [SOUND, 0 ms]
        (23) Formula
        (24) Inverse Substitution [SOUND, 0 ms]
        (25) Formula
        (26) Induction by algorithm [EQUIVALENT, 0 ms]
        (27) AND
            (28) Formula
                (29) Symbolic evaluation [EQUIVALENT, 0 ms]
                (30) YES
            (31) Formula
                (32) Symbolic evaluation [EQUIVALENT, 0 ms]
                (33) YES
            (34) Formula
                (35) Symbolic evaluation under hypothesis [EQUIVALENT, 0 ms]
                (36) YES


----------------------------------------

(0)
Obligation:
Formula:
z0:sort[a22],z1:sort[a22].if'(gt(z0, z1), z0, s(z1))=true

There are no hypotheses.




----------------------------------------

(1) Induction by algorithm (EQUIVALENT)
Induction by algorithm gt(z0, z1) generates the following cases:

1. Base Case:
Formula:
x2:sort[a22].if'(gt(s(x2), 0), s(x2), s(0))=true

There are no hypotheses.





2. Base Case:
Formula:
y2:sort[a22].if'(gt(0, y2), 0, s(y2))=true

There are no hypotheses.





1. Step Case:
Formula:
x3:sort[a22],y':sort[a22].if'(gt(s(x3), s(y')), s(x3), s(s(y')))=true

Hypotheses:
x3:sort[a22],y':sort[a22].if'(gt(x3, y'), x3, s(y'))=true






----------------------------------------

(2)
Complex Obligation (AND)

----------------------------------------

(3)
Obligation:
Formula:
x2:sort[a22].if'(gt(s(x2), 0), s(x2), s(0))=true

There are no hypotheses.




----------------------------------------

(4) Symbolic evaluation (EQUIVALENT)
Could be shown by simple symbolic evaluation.
----------------------------------------

(5)
Obligation:
Formula:
x2:sort[a22].if'(gt(x2, 0), x2, s(0))=true

There are no hypotheses.




----------------------------------------

(6) Induction by data structure (EQUIVALENT)
Induction by data structure sort[a22] generates the following cases:



1. Base Case:
Formula:
if'(gt(0, 0), 0, s(0))=true

There are no hypotheses.





1. Step Case:
Formula:
n:sort[a22].if'(gt(s(n), 0), s(n), s(0))=true

Hypotheses:
n:sort[a22].if'(gt(n, 0), n, s(0))=true






----------------------------------------

(7)
Complex Obligation (AND)

----------------------------------------

(8)
Obligation:
Formula:
if'(gt(0, 0), 0, s(0))=true

There are no hypotheses.




----------------------------------------

(9) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(10)
YES

----------------------------------------

(11)
Obligation:
Formula:
n:sort[a22].if'(gt(s(n), 0), s(n), s(0))=true

Hypotheses:
n:sort[a22].if'(gt(n, 0), n, s(0))=true




----------------------------------------

(12) Symbolic evaluation under hypothesis (EQUIVALENT)
Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses:

n:sort[a22].if'(gt(n, 0), n, s(0))=true

----------------------------------------

(13)
YES

----------------------------------------

(14)
Obligation:
Formula:
y2:sort[a22].if'(gt(0, y2), 0, s(y2))=true

There are no hypotheses.




----------------------------------------

(15) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(16)
YES

----------------------------------------

(17)
Obligation:
Formula:
x3:sort[a22],y':sort[a22].if'(gt(s(x3), s(y')), s(x3), s(s(y')))=true

Hypotheses:
x3:sort[a22],y':sort[a22].if'(gt(x3, y'), x3, s(y'))=true




----------------------------------------

(18) Symbolic evaluation (EQUIVALENT)
Could be shown by simple symbolic evaluation.
----------------------------------------

(19)
Obligation:
Formula:
x3:sort[a22],y':sort[a22].if'(gt(x3, y'), s(x3), s(s(y')))=true

Hypotheses:
x3:sort[a22],y':sort[a22].if'(gt(x3, y'), x3, s(y'))=true




----------------------------------------

(20) Hypothesis Lifting (EQUIVALENT)
Formula could be generalised by hypothesis lifting to the following new obligation:
Formula:
x3:sort[a22],y':sort[a22].(if'(gt(x3, y'), x3, s(y'))=true->if'(gt(x3, y'), s(x3), s(s(y')))=true)

There are no hypotheses.




----------------------------------------

(21)
Obligation:
Formula:
x3:sort[a22],y':sort[a22].(if'(gt(x3, y'), x3, s(y'))=true->if'(gt(x3, y'), s(x3), s(s(y')))=true)

There are no hypotheses.




----------------------------------------

(22) Inverse Substitution (SOUND)
The formula could be generalised by inverse substitution to:
n:sort[a21],x3:sort[a22],y':sort[a22].(if'(n, x3, s(y'))=true->if'(n, s(x3), s(s(y')))=true)

Inverse substitution used:
[gt(x3, y')/n]


----------------------------------------

(23)
Obligation:
Formula:
n:sort[a21],x3:sort[a22],y':sort[a22].(if'(n, x3, s(y'))=true->if'(n, s(x3), s(s(y')))=true)

There are no hypotheses.




----------------------------------------

(24) Inverse Substitution (SOUND)
The formula could be generalised by inverse substitution to:
n:sort[a21],x3:sort[a22],n':sort[a22].(if'(n, x3, n')=true->if'(n, s(x3), s(n'))=true)

Inverse substitution used:
[s(y')/n']


----------------------------------------

(25)
Obligation:
Formula:
n:sort[a21],x3:sort[a22],n':sort[a22].(if'(n, x3, n')=true->if'(n, s(x3), s(n'))=true)

There are no hypotheses.




----------------------------------------

(26) Induction by algorithm (EQUIVALENT)
Induction by algorithm if'(n, x3, n') generates the following cases:

1. Base Case:
Formula:
x5:sort[a22],y1:sort[a22].(if'(false_renamed, x5, y1)=true->if'(false_renamed, s(x5), s(y1))=true)

There are no hypotheses.





2. Base Case:
Formula:
y'':sort[a22].(if'(true_renamed, 0, y'')=true->if'(true_renamed, s(0), s(y''))=true)

There are no hypotheses.





1. Step Case:
Formula:
x6:sort[a22],y'':sort[a22].(if'(true_renamed, s(x6), y'')=true->if'(true_renamed, s(s(x6)), s(y''))=true)

Hypotheses:
x6:sort[a22],y'':sort[a22].(if'(gt(s(x6), y''), x6, y'')=true->if'(gt(s(x6), y''), s(x6), s(y''))=true)






----------------------------------------

(27)
Complex Obligation (AND)

----------------------------------------

(28)
Obligation:
Formula:
x5:sort[a22],y1:sort[a22].(if'(false_renamed, x5, y1)=true->if'(false_renamed, s(x5), s(y1))=true)

There are no hypotheses.




----------------------------------------

(29) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(30)
YES

----------------------------------------

(31)
Obligation:
Formula:
y'':sort[a22].(if'(true_renamed, 0, y'')=true->if'(true_renamed, s(0), s(y''))=true)

There are no hypotheses.




----------------------------------------

(32) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(33)
YES

----------------------------------------

(34)
Obligation:
Formula:
x6:sort[a22],y'':sort[a22].(if'(true_renamed, s(x6), y'')=true->if'(true_renamed, s(s(x6)), s(y''))=true)

Hypotheses:
x6:sort[a22],y'':sort[a22].(if'(gt(s(x6), y''), x6, y'')=true->if'(gt(s(x6), y''), s(x6), s(y''))=true)




----------------------------------------

(35) Symbolic evaluation under hypothesis (EQUIVALENT)
Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses:

x6:sort[a22],y'':sort[a22].(if'(gt(s(x6), y''), x6, y'')=true->if'(gt(s(x6), y''), s(x6), s(y''))=true)

----------------------------------------

(36)
YES

(46) Complex Obligation (AND)

(47) Obligation:

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

MOD(s(x0), s(x1)) → IF1(lt(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false

The set Q consists of the following terms:

minus(0, x0)
minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))

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

(48) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(49) TRUE

(50) Obligation:

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

if'(true_renamed, x4, y'') → minus'(x4, y'')
if'(false_renamed, x5, y1) → true
minus'(0, y3) → false
minus'(s(x6), y4) → if'(gt(s(x6), y4), x6, y4)
lt(0, s(x)) → true_renamed
lt(s(x'), s(y)) → lt(x', y)
lt(x'', 0) → false_renamed
gt(s(x2), 0) → true_renamed
gt(s(x3), s(y')) → gt(x3, y')
if(true_renamed, x4, y'') → s(minus(x4, y''))
if(false_renamed, x5, y1) → 0
gt(0, y2) → false_renamed
minus(0, y3) → 0
minus(s(x6), y4) → if(gt(s(x6), y4), x6, y4)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a22](0, 0) → true
equal_sort[a22](0, s(v30)) → false
equal_sort[a22](s(v31), 0) → false
equal_sort[a22](s(v31), s(v32)) → equal_sort[a22](v31, v32)
equal_sort[a21](true_renamed, true_renamed) → true
equal_sort[a21](true_renamed, false_renamed) → false
equal_sort[a21](false_renamed, true_renamed) → false
equal_sort[a21](false_renamed, false_renamed) → true
equal_sort[a39](witness_sort[a39], witness_sort[a39]) → true

Q is empty.

(51) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Combined order from the following AFS and order.
if'(x1, x2, x3)  =  if'(x1, x2, x3)
true_renamed  =  true_renamed
minus'(x1, x2)  =  minus'(x1, x2)
false_renamed  =  false_renamed
true  =  true
0  =  0
false  =  false
s(x1)  =  s(x1)
gt(x1, x2)  =  gt(x1, x2)
lt(x1, x2)  =  lt(x1, x2)
if(x1, x2, x3)  =  if(x1, x2, x3)
minus(x1, x2)  =  minus(x1, x2)
equal_bool(x1, x2)  =  equal_bool(x1, x2)
and(x1, x2)  =  and(x1, x2)
or(x1, x2)  =  or(x1, x2)
not(x1)  =  not(x1)
isa_true(x1)  =  x1
isa_false(x1)  =  isa_false(x1)
equal_sort[a22](x1, x2)  =  equal_sort[a22](x1, x2)
equal_sort[a21](x1, x2)  =  equal_sort[a21](x1, x2)
equal_sort[a39](x1, x2)  =  equal_sort[a39](x1, x2)
witness_sort[a39]  =  witness_sort[a39]

Recursive path order with status [RPO].
Quasi-Precedence:
[if3, minus2] > [if'3, minus'2, s1] > gt2 > truerenamed
[if3, minus2] > [falserenamed, true, 0, false, lt2, equalsort[a22]2, equalsort[a39]2, witnesssort[a39]] > truerenamed
equalbool2 > truerenamed
and2 > truerenamed
or2 > truerenamed
not1 > [falserenamed, true, 0, false, lt2, equalsort[a22]2, equalsort[a39]2, witnesssort[a39]] > truerenamed
isafalse1 > [falserenamed, true, 0, false, lt2, equalsort[a22]2, equalsort[a39]2, witnesssort[a39]] > truerenamed
equalsort[a21]2 > [falserenamed, true, 0, false, lt2, equalsort[a22]2, equalsort[a39]2, witnesssort[a39]] > truerenamed

Status:
if'3: [2,3,1]
truerenamed: multiset
minus'2: [1,2]
falserenamed: multiset
true: multiset
0: multiset
false: multiset
s1: multiset
gt2: [1,2]
lt2: [1,2]
if3: [3,2,1]
minus2: [2,1]
equalbool2: multiset
and2: multiset
or2: multiset
not1: [1]
isafalse1: multiset
equalsort[a22]2: multiset
equalsort[a21]2: multiset
equalsort[a39]2: multiset
witnesssort[a39]: multiset

With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

if'(true_renamed, x4, y'') → minus'(x4, y'')
if'(false_renamed, x5, y1) → true
minus'(0, y3) → false
minus'(s(x6), y4) → if'(gt(s(x6), y4), x6, y4)
lt(0, s(x)) → true_renamed
lt(s(x'), s(y)) → lt(x', y)
lt(x'', 0) → false_renamed
gt(s(x2), 0) → true_renamed
gt(s(x3), s(y')) → gt(x3, y')
if(true_renamed, x4, y'') → s(minus(x4, y''))
if(false_renamed, x5, y1) → 0
gt(0, y2) → false_renamed
minus(0, y3) → 0
minus(s(x6), y4) → if(gt(s(x6), y4), x6, y4)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a22](0, 0) → true
equal_sort[a22](0, s(v30)) → false
equal_sort[a22](s(v31), 0) → false
equal_sort[a22](s(v31), s(v32)) → equal_sort[a22](v31, v32)
equal_sort[a21](true_renamed, true_renamed) → true
equal_sort[a21](true_renamed, false_renamed) → false
equal_sort[a21](false_renamed, true_renamed) → false
equal_sort[a21](false_renamed, false_renamed) → true
equal_sort[a39](witness_sort[a39], witness_sort[a39]) → true


(52) Obligation:

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

isa_true(true) → true
isa_true(false) → false

Q is empty.

(53) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Knuth-Bendix order [KBO] with precedence:
isatrue1 > false > true

and weight map:

true=1
false=1
isa_true_1=0

The variable weight is 1With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

isa_true(true) → true
isa_true(false) → false


(54) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(55) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(56) YES