Term Rewriting System R:
[y, x]
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

LE(s(x), s(y)) -> LE(x, y)
MINUS(s(x), s(y)) -> MINUS(x, y)
GCD(s(x), s(y)) -> IFGCD(le(y, x), s(x), s(y))
GCD(s(x), s(y)) -> LE(y, x)
IFGCD(true, x, y) -> GCD(minus(x, y), y)
IFGCD(true, x, y) -> MINUS(x, y)
IFGCD(false, x, y) -> GCD(minus(y, x), x)
IFGCD(false, x, y) -> MINUS(y, x)

Furthermore, R contains three SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
Nar


Dependency Pair:

LE(s(x), s(y)) -> LE(x, y)


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




The following dependency pair can be strictly oriented:

LE(s(x), s(y)) -> LE(x, y)


There are no usable rules for innermost that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
LE(x1, x2) -> LE(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 4
Dependency Graph
       →DP Problem 2
AFS
       →DP Problem 3
Nar


Dependency Pair:


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




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
Nar


Dependency Pair:

MINUS(s(x), s(y)) -> MINUS(x, y)


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




The following dependency pair can be strictly oriented:

MINUS(s(x), s(y)) -> MINUS(x, y)


There are no usable rules for innermost that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
MINUS(x1, x2) -> MINUS(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 5
Dependency Graph
       →DP Problem 3
Nar


Dependency Pair:


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Narrowing Transformation


Dependency Pairs:

IFGCD(false, x, y) -> GCD(minus(y, x), x)
IFGCD(true, x, y) -> GCD(minus(x, y), y)
GCD(s(x), s(y)) -> IFGCD(le(y, x), s(x), s(y))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

GCD(s(x), s(y)) -> IFGCD(le(y, x), s(x), s(y))
three new Dependency Pairs are created:

GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
GCD(s(0), s(s(x''))) -> IFGCD(false, s(0), s(s(x'')))
GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Nar
           →DP Problem 6
Narrowing Transformation


Dependency Pairs:

GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))
GCD(s(0), s(s(x''))) -> IFGCD(false, s(0), s(s(x'')))
IFGCD(true, x, y) -> GCD(minus(x, y), y)
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
IFGCD(false, x, y) -> GCD(minus(y, x), x)


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

IFGCD(true, x, y) -> GCD(minus(x, y), y)
three new Dependency Pairs are created:

IFGCD(true, x'', 0) -> GCD(x'', 0)
IFGCD(true, 0, y') -> GCD(0, y')
IFGCD(true, s(x''), s(y'')) -> GCD(minus(x'', y''), s(y''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 7
Narrowing Transformation


Dependency Pairs:

GCD(s(0), s(s(x''))) -> IFGCD(false, s(0), s(s(x'')))
IFGCD(true, s(x''), s(y'')) -> GCD(minus(x'', y''), s(y''))
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
IFGCD(false, x, y) -> GCD(minus(y, x), x)
GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

IFGCD(false, x, y) -> GCD(minus(y, x), x)
three new Dependency Pairs are created:

IFGCD(false, 0, y') -> GCD(y', 0)
IFGCD(false, x'', 0) -> GCD(0, x'')
IFGCD(false, s(y''), s(x'')) -> GCD(minus(x'', y''), s(y''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 8
Instantiation Transformation


Dependency Pairs:

GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))
IFGCD(true, s(x''), s(y'')) -> GCD(minus(x'', y''), s(y''))
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
IFGCD(false, s(y''), s(x'')) -> GCD(minus(x'', y''), s(y''))
GCD(s(0), s(s(x''))) -> IFGCD(false, s(0), s(s(x'')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFGCD(true, s(x''), s(y'')) -> GCD(minus(x'', y''), s(y''))
two new Dependency Pairs are created:

IFGCD(true, s(x''''), s(0)) -> GCD(minus(x'''', 0), s(0))
IFGCD(true, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(y''''), s(x'''')), s(s(x'''')))

The transformation is resulting in two new DP problems:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 9
Argument Filtering and Ordering


Dependency Pairs:

IFGCD(true, s(x''''), s(0)) -> GCD(minus(x'''', 0), s(0))
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




The following dependency pairs can be strictly oriented:

IFGCD(true, s(x''''), s(0)) -> GCD(minus(x'''', 0), s(0))
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))


The following usable rules for innermost can be oriented:

minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
{GCD, IFGCD} > s > 0
{GCD, IFGCD} > s > minus

resulting in one new DP problem.
Used Argument Filtering System:
GCD(x1, x2) -> GCD(x1, x2)
IFGCD(x1, x2, x3) -> IFGCD(x2)
s(x1) -> s(x1)
minus(x1, x2) -> minus(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 12
Dependency Graph


Dependency Pair:


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 10
Instantiation Transformation


Dependency Pairs:

IFGCD(true, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(y''''), s(x'''')), s(s(x'''')))
GCD(s(0), s(s(x''))) -> IFGCD(false, s(0), s(s(x'')))
IFGCD(false, s(y''), s(x'')) -> GCD(minus(x'', y''), s(y''))
GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFGCD(false, s(y''), s(x'')) -> GCD(minus(x'', y''), s(y''))
two new Dependency Pairs are created:

IFGCD(false, s(0), s(s(x''''))) -> GCD(minus(s(x''''), 0), s(0))
IFGCD(false, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(x''''), s(y'''')), s(s(y'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 11
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

IFGCD(false, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(x''''), s(y'''')), s(s(y'''')))
GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))
IFGCD(true, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(y''''), s(x'''')), s(s(x'''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)


Strategy:

innermost



Innermost Termination of R could not be shown.
Duration:
0:19 minutes