0 QTRS
↳1 Overlay + Local Confluence (⇔)
↳2 QTRS
↳3 DependencyPairsProof (⇔)
↳4 QDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 QDP
↳8 UsableRulesProof (⇔)
↳9 QDP
↳10 QReductionProof (⇔)
↳11 QDP
↳12 QDPSizeChangeProof (⇔)
↳13 YES
↳14 QDP
↳15 UsableRulesProof (⇔)
↳16 QDP
↳17 QReductionProof (⇔)
↳18 QDP
↳19 QDPSizeChangeProof (⇔)
↳20 YES
↳21 QDP
↳22 UsableRulesProof (⇔)
↳23 QDP
↳24 QReductionProof (⇔)
↳25 QDP
↳26 Narrowing (⇔)
↳27 QDP
↳28 DependencyGraphProof (⇔)
↳29 QDP
↳30 Narrowing (⇔)
↳31 QDP
↳32 DependencyGraphProof (⇔)
↳33 QDP
↳34 QDPOrderProof (⇔)
↳35 QDP
↳36 DependencyGraphProof (⇔)
↳37 TRUE
↳38 QDP
↳39 UsableRulesProof (⇔)
↳40 QDP
↳41 QReductionProof (⇔)
↳42 QDP
↳43 Rewriting (⇔)
↳44 QDP
↳45 Rewriting (⇔)
↳46 QDP
↳47 Rewriting (⇔)
↳48 QDP
↳49 Rewriting (⇔)
↳50 QDP
↳51 Narrowing (⇔)
↳52 QDP
↳53 Rewriting (⇔)
↳54 QDP
↳55 Rewriting (⇔)
↳56 QDP
↳57 Rewriting (⇔)
↳58 QDP
↳59 Rewriting (⇔)
↳60 QDP
↳61 Rewriting (⇔)
↳62 QDP
↳63 Rewriting (⇔)
↳64 QDP
↳65 Rewriting (⇔)
↳66 QDP
↳67 Rewriting (⇔)
↳68 QDP
↳69 Rewriting (⇔)
↳70 QDP
↳71 Rewriting (⇔)
↳72 QDP
↳73 Rewriting (⇔)
↳74 QDP
↳75 Rewriting (⇔)
↳76 QDP
↳77 Rewriting (⇔)
↳78 QDP
↳79 Rewriting (⇔)
↳80 QDP
↳81 Rewriting (⇔)
↳82 QDP
↳83 Rewriting (⇔)
↳84 QDP
↳85 Rewriting (⇔)
↳86 QDP
↳87 Rewriting (⇔)
↳88 QDP
↳89 Rewriting (⇔)
↳90 QDP
↳91 Rewriting (⇔)
↳92 QDP
↳93 Rewriting (⇔)
↳94 QDP
↳95 Narrowing (⇔)
↳96 QDP
↳97 Rewriting (⇔)
↳98 QDP
↳99 Rewriting (⇔)
↳100 QDP
↳101 Rewriting (⇔)
↳102 QDP
↳103 Rewriting (⇔)
↳104 QDP
↳105 Rewriting (⇔)
↳106 QDP
↳107 Rewriting (⇔)
↳108 QDP
↳109 Rewriting (⇔)
↳110 QDP
↳111 Rewriting (⇔)
↳112 QDP
↳113 Rewriting (⇔)
↳114 QDP
↳115 Rewriting (⇔)
↳116 QDP
↳117 Rewriting (⇔)
↳118 QDP
↳119 Rewriting (⇔)
↳120 QDP
↳121 Rewriting (⇔)
↳122 QDP
↳123 Rewriting (⇔)
↳124 QDP
↳125 Rewriting (⇔)
↳126 QDP
↳127 Rewriting (⇔)
↳128 QDP
↳129 Rewriting (⇔)
↳130 QDP
↳131 Rewriting (⇔)
↳132 QDP
↳133 Narrowing (⇔)
↳134 QDP
↳135 Rewriting (⇔)
↳136 QDP
↳137 Rewriting (⇔)
↳138 QDP
↳139 Rewriting (⇔)
↳140 QDP
↳141 Rewriting (⇔)
↳142 QDP
↳143 Rewriting (⇔)
↳144 QDP
↳145 Rewriting (⇔)
↳146 QDP
↳147 Rewriting (⇔)
↳148 QDP
↳149 Rewriting (⇔)
↳150 QDP
↳151 DependencyGraphProof (⇔)
↳152 AND
↳153 QDP
↳154 Narrowing (⇔)
↳155 QDP
↳156 Rewriting (⇔)
↳157 QDP
↳158 Rewriting (⇔)
↳159 QDP
↳160 Rewriting (⇔)
↳161 QDP
↳162 Rewriting (⇔)
↳163 QDP
↳164 Rewriting (⇔)
↳165 QDP
↳166 DependencyGraphProof (⇔)
↳167 QDP
↳168 Rewriting (⇔)
↳169 QDP
↳170 Rewriting (⇔)
↳171 QDP
↳172 Rewriting (⇔)
↳173 QDP
↳174 Rewriting (⇔)
↳175 QDP
↳176 Rewriting (⇔)
↳177 QDP
↳178 DependencyGraphProof (⇔)
↳179 QDP
↳180 Rewriting (⇔)
↳181 QDP
↳182 Rewriting (⇔)
↳183 QDP
↳184 Rewriting (⇔)
↳185 QDP
↳186 Rewriting (⇔)
↳187 QDP
↳188 Rewriting (⇔)
↳189 QDP
↳190 Rewriting (⇔)
↳191 QDP
↳192 Rewriting (⇔)
↳193 QDP
↳194 Rewriting (⇔)
↳195 QDP
↳196 Rewriting (⇔)
↳197 QDP
↳198 QDPOrderProof (⇔)
↳199 QDP
↳200 PisEmptyProof (⇔)
↳201 YES
↳202 QDP
↳203 Rewriting (⇔)
↳204 QDP
↳205 Rewriting (⇔)
↳206 QDP
↳207 Rewriting (⇔)
↳208 QDP
↳209 Rewriting (⇔)
↳210 QDP
↳211 Rewriting (⇔)
↳212 QDP
↳213 Rewriting (⇔)
↳214 QDP
↳215 DependencyGraphProof (⇔)
↳216 AND
↳217 QDP
↳218 QDPOrderProof (⇔)
↳219 QDP
↳220 PisEmptyProof (⇔)
↳221 YES
↳222 QDP
↳223 QDPOrderProof (⇔)
↳224 QDP
↳225 QDPOrderProof (⇔)
↳226 QDP
↳227 MNOCProof (⇔)
↳228 QDP
↳229 MNOCProof (⇔)
↳230 QDP
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
if(false, x, y) → mod(minus(x, y), y)
gcd(x, 0) → x
gcd(0, s(y)) → s(y)
gcd(s(x), s(y)) → gcd(mod(s(x), s(y)), mod(s(y), s(x)))
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
if(false, x, y) → mod(minus(x, y), y)
gcd(x, 0) → x
gcd(0, s(y)) → s(y)
gcd(s(x), s(y)) → gcd(mod(s(x), s(y)), mod(s(y), s(x)))
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
MINUS(s(x), s(y)) → MINUS(x, y)
MOD(x, s(y)) → IF(lt(x, s(y)), x, s(y))
MOD(x, s(y)) → LT(x, s(y))
IF(false, x, y) → MOD(minus(x, y), y)
IF(false, x, y) → MINUS(x, y)
GCD(s(x), s(y)) → GCD(mod(s(x), s(y)), mod(s(y), s(x)))
GCD(s(x), s(y)) → MOD(s(x), s(y))
GCD(s(x), s(y)) → MOD(s(y), s(x))
LT(s(x), s(y)) → LT(x, y)
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
if(false, x, y) → mod(minus(x, y), y)
gcd(x, 0) → x
gcd(0, s(y)) → s(y)
gcd(s(x), s(y)) → gcd(mod(s(x), s(y)), mod(s(y), s(x)))
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
LT(s(x), s(y)) → LT(x, y)
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
if(false, x, y) → mod(minus(x, y), y)
gcd(x, 0) → x
gcd(0, s(y)) → s(y)
gcd(s(x), s(y)) → gcd(mod(s(x), s(y)), mod(s(y), s(x)))
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
LT(s(x), s(y)) → LT(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
LT(s(x), s(y)) → LT(x, y)
From the DPs we obtained the following set of size-change graphs:
MINUS(s(x), s(y)) → MINUS(x, y)
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
if(false, x, y) → mod(minus(x, y), y)
gcd(x, 0) → x
gcd(0, s(y)) → s(y)
gcd(s(x), s(y)) → gcd(mod(s(x), s(y)), mod(s(y), s(x)))
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
MINUS(s(x), s(y)) → MINUS(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
MINUS(s(x), s(y)) → MINUS(x, y)
From the DPs we obtained the following set of size-change graphs:
IF(false, x, y) → MOD(minus(x, y), y)
MOD(x, s(y)) → IF(lt(x, s(y)), x, s(y))
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
if(false, x, y) → mod(minus(x, y), y)
gcd(x, 0) → x
gcd(0, s(y)) → s(y)
gcd(s(x), s(y)) → gcd(mod(s(x), s(y)), mod(s(y), s(x)))
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
IF(false, x, y) → MOD(minus(x, y), y)
MOD(x, s(y)) → IF(lt(x, s(y)), x, s(y))
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
IF(false, x, y) → MOD(minus(x, y), y)
MOD(x, s(y)) → IF(lt(x, s(y)), x, s(y))
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
MOD(0, s(x0)) → IF(true, 0, s(x0))
MOD(s(x0), s(x1)) → IF(lt(x0, x1), s(x0), s(x1))
IF(false, x, y) → MOD(minus(x, y), y)
MOD(0, s(x0)) → IF(true, 0, s(x0))
MOD(s(x0), s(x1)) → IF(lt(x0, x1), s(x0), s(x1))
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
MOD(s(x0), s(x1)) → IF(lt(x0, x1), s(x0), s(x1))
IF(false, x, y) → MOD(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
IF(false, 0, x0) → MOD(0, x0)
IF(false, s(x0), 0) → MOD(s(x0), 0)
IF(false, s(x0), s(x1)) → MOD(minus(x0, x1), s(x1))
MOD(s(x0), s(x1)) → IF(lt(x0, x1), s(x0), s(x1))
IF(false, 0, x0) → MOD(0, x0)
IF(false, s(x0), 0) → MOD(s(x0), 0)
IF(false, s(x0), s(x1)) → MOD(minus(x0, x1), s(x1))
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
IF(false, s(x0), s(x1)) → MOD(minus(x0, x1), s(x1))
MOD(s(x0), s(x1)) → IF(lt(x0, x1), s(x0), s(x1))
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
MOD(s(x0), s(x1)) → IF(lt(x0, x1), s(x0), s(x1))
POL(0) = 0
POL(IF(x1, x2, x3)) = x2 + x3
POL(MOD(x1, x2)) = 1 + x1 + x2
POL(false) = 0
POL(lt(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(s(x1)) = 1 + x1
POL(true) = 0
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
IF(false, s(x0), s(x1)) → MOD(minus(x0, x1), s(x1))
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
lt(x, 0) → false
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(x), s(y)) → GCD(mod(s(x), s(y)), mod(s(y), s(x)))
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
if(false, x, y) → mod(minus(x, y), y)
gcd(x, 0) → x
gcd(0, s(y)) → s(y)
gcd(s(x), s(y)) → gcd(mod(s(x), s(y)), mod(s(y), s(x)))
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(x), s(y)) → GCD(mod(s(x), s(y)), mod(s(y), s(x)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
gcd(x0, 0)
gcd(0, s(x0))
gcd(s(x0), s(x1))
GCD(s(x), s(y)) → GCD(mod(s(x), s(y)), mod(s(y), s(x)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(x), s(y)) → GCD(if(lt(s(x), s(y)), s(x), s(y)), mod(s(y), s(x)))
GCD(s(x), s(y)) → GCD(if(lt(s(x), s(y)), s(x), s(y)), mod(s(y), s(x)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(x), s(y)) → GCD(if(lt(x, y), s(x), s(y)), mod(s(y), s(x)))
GCD(s(x), s(y)) → GCD(if(lt(x, y), s(x), s(y)), mod(s(y), s(x)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(x), s(y)) → GCD(if(lt(x, y), s(x), s(y)), if(lt(s(y), s(x)), s(y), s(x)))
GCD(s(x), s(y)) → GCD(if(lt(x, y), s(x), s(y)), if(lt(s(y), s(x)), s(y), s(x)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(x), s(y)) → GCD(if(lt(x, y), s(x), s(y)), if(lt(y, x), s(y), s(x)))
GCD(s(x), s(y)) → GCD(if(lt(x, y), s(x), s(y)), if(lt(y, x), s(y), s(x)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(if(true, s(0), s(s(x0))), if(lt(s(x0), 0), s(s(x0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(s(x1), s(x0)), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(false, s(x0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(if(true, s(0), s(s(x0))), if(lt(s(x0), 0), s(s(x0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(s(x1), s(x0)), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(false, s(x0), s(0)), if(lt(0, x0), s(0), s(x0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(s(x0), 0), s(s(x0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(s(x1), s(x0)), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(false, s(x0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(s(x0), 0), s(s(x0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(false, s(x0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(s(x0), 0), s(s(x0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(x0), s(0)) → GCD(mod(minus(s(x0), s(0)), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(s(x0), 0), s(s(x0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(mod(minus(s(x0), s(0)), s(0)), if(lt(0, x0), s(0), s(x0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(false, s(s(x0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(mod(minus(s(x0), s(0)), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(false, s(s(x0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(x0), s(0)) → GCD(if(lt(minus(s(x0), s(0)), s(0)), minus(s(x0), s(0)), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(0), s(s(x0))) → GCD(s(0), if(false, s(s(x0)), s(0)))
GCD(s(x0), s(0)) → GCD(if(lt(minus(s(x0), s(0)), s(0)), minus(s(x0), s(0)), s(0)), if(lt(0, x0), s(0), s(x0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), mod(minus(s(s(x0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(s(x0), s(0)), s(0)), minus(s(x0), s(0)), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), mod(minus(s(s(x0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(0), s(s(x0))) → GCD(s(0), mod(minus(s(s(x0)), s(0)), s(0)))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)), if(lt(0, x0), s(0), s(x0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(s(s(x0)), s(0)), s(0)), minus(s(s(x0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(s(s(x0)), s(0)), s(0)), minus(s(s(x0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(s(s(x0)), s(0)), s(0)), minus(s(s(x0)), s(0)), s(0)))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(s(x0), 0), s(0)), minus(s(s(x0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(s(x0), 0), s(0)), minus(s(s(x0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(s(x0), s(0)), minus(s(s(x0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(s(x0), s(0)), minus(s(s(x0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(x0, 0), minus(s(s(x0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(x0, 0), minus(s(s(x0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(false, minus(s(s(x0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(false, minus(s(s(x0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), mod(minus(minus(s(s(x0)), s(0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), mod(minus(minus(s(s(x0)), s(0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(minus(s(s(x0)), s(0)), s(0)), s(0)), minus(minus(s(s(x0)), s(0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(minus(s(s(x0)), s(0)), s(0)), s(0)), minus(minus(s(s(x0)), s(0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(minus(s(x0), 0), s(0)), s(0)), minus(minus(s(s(x0)), s(0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(minus(s(x0), 0), s(0)), s(0)), minus(minus(s(s(x0)), s(0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(s(x0), s(0)), s(0)), minus(minus(s(s(x0)), s(0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(s(x0), s(0)), s(0)), minus(minus(s(s(x0)), s(0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(minus(s(s(x0)), s(0)), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(minus(s(s(x0)), s(0)), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(x0)), s(s(x1))) → GCD(if(lt(x0, x1), s(s(x0)), s(s(x1))), if(lt(x1, x0), s(s(x1)), s(s(x0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(s(x0), 0), s(s(s(x0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(s(x1), s(x0)), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(false, s(s(x0)), s(s(0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(s(x0), 0), s(s(s(x0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(s(x1), s(x0)), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(false, s(s(x0)), s(s(0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(false, s(s(s(x0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(s(x1), s(x0)), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(false, s(s(x0)), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(false, s(s(s(x0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(false, s(s(x0)), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(false, s(s(s(x0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), mod(minus(s(s(x0)), s(s(0))), s(s(0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(false, s(s(s(x0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), mod(minus(s(s(x0)), s(s(0))), s(s(0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(mod(minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), mod(minus(s(s(x0)), s(s(0))), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(mod(minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(s(s(x0)), s(s(0))), s(s(0))), minus(s(s(x0)), s(s(0))), s(s(0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(s(x0))), s(s(0))) → GCD(mod(minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(s(s(x0)), s(s(0))), s(s(0))), minus(s(s(x0)), s(s(0))), s(s(0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(minus(s(s(s(x0))), s(s(0))), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(s(s(x0)), s(s(0))), s(s(0))), minus(s(s(x0)), s(s(0))), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(minus(s(s(s(x0))), s(s(0))), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(s(x0), s(0)), s(s(0))), minus(s(s(x0)), s(s(0))), s(s(0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(minus(s(s(s(x0))), s(s(0))), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(s(x0), s(0)), s(s(0))), minus(s(s(x0)), s(s(0))), s(s(0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(minus(s(s(x0)), s(0)), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(s(x0), s(0)), s(s(0))), minus(s(s(x0)), s(s(0))), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(minus(s(s(x0)), s(0)), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(s(s(x0)), s(s(0))), s(s(0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(minus(s(s(x0)), s(0)), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(s(s(x0)), s(s(0))), s(s(0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(minus(s(x0), 0), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(s(s(x0)), s(s(0))), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(minus(s(x0), 0), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(s(x0), s(0)), s(s(0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(minus(s(x0), 0), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(s(x0), s(0)), s(s(0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(s(x0), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(s(x0), s(0)), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(s(x0), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(s(x0), s(s(0))), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), minus(s(s(s(x0))), s(s(0))), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), minus(s(s(x0)), s(0)), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), minus(s(s(x0)), s(0)), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), minus(s(x0), 0), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), minus(s(x0), 0), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), if(true, s(s(0)), s(s(s(x0)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(x0), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(lt(0, x0), s(0), s(x0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(s(x0), 0), s(0)), minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
GCD(s(0), s(0)) → GCD(if(lt(minus(0, 0), s(0)), minus(0, 0), s(0)), if(false, s(0), s(0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(s(x0), 0), s(0)), minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
GCD(s(0), s(0)) → GCD(if(lt(minus(0, 0), s(0)), minus(0, 0), s(0)), if(false, s(0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(lt(s(x0), s(0)), minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(0), s(0)) → GCD(if(lt(minus(0, 0), s(0)), minus(0, 0), s(0)), if(false, s(0), s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(s(x0), s(0)), minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(0)) → GCD(if(lt(0, s(0)), minus(0, 0), s(0)), if(false, s(0), s(0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(s(x0), s(0)), minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
GCD(s(0), s(0)) → GCD(if(lt(0, s(0)), minus(0, 0), s(0)), if(false, s(0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(lt(x0, 0), minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(0), s(0)) → GCD(if(lt(0, s(0)), minus(0, 0), s(0)), if(false, s(0), s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(x0, 0), minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(0)) → GCD(if(true, minus(0, 0), s(0)), if(false, s(0), s(0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(x0, 0), minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
GCD(s(0), s(0)) → GCD(if(true, minus(0, 0), s(0)), if(false, s(0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(false, minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(0), s(0)) → GCD(if(true, minus(0, 0), s(0)), if(false, s(0), s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(false, minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(0)) → GCD(minus(0, 0), if(false, s(0), s(0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(false, minus(s(x0), 0), s(0)), if(true, s(0), s(s(x0))))
GCD(s(0), s(0)) → GCD(minus(0, 0), if(false, s(0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(mod(minus(minus(s(x0), 0), s(0)), s(0)), if(true, s(0), s(s(x0))))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(0), s(0)) → GCD(minus(0, 0), if(false, s(0), s(0)))
GCD(s(s(x0)), s(0)) → GCD(mod(minus(minus(s(x0), 0), s(0)), s(0)), if(true, s(0), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(0)) → GCD(0, if(false, s(0), s(0)))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(mod(minus(minus(s(x0), 0), s(0)), s(0)), if(true, s(0), s(s(x0))))
GCD(s(0), s(0)) → GCD(0, if(false, s(0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(x0))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(0, s(0)), minus(0, 0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(s(x0), s(0)), minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(minus(0, 0), s(0)), 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), 0), s(0)), s(x0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(0, s(0)), minus(0, 0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(s(x0), s(0)), minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(minus(0, 0), s(0)), 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), 0), s(0)), s(x0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(0))) → GCD(s(0), if(true, minus(0, 0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(s(x0), s(0)), minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(minus(0, 0), s(0)), 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), 0), s(0)), s(x0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(true, minus(0, 0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(minus(0, 0), s(0)), 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), 0), s(0)), s(x0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(true, minus(0, 0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), minus(s(x0), 0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(0, s(0)), 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), 0), s(0)), s(x0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(true, minus(0, 0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(0, s(0)), 0, s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(s(x0), s(0)), s(x0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(true, minus(0, 0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(0, s(0)), 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(s(x0), s(0)), s(x0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(0))) → GCD(s(0), minus(0, 0))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(0, s(0)), 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(s(x0), s(0)), s(x0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), minus(0, 0))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(0, s(0)), 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(s(x0), s(0)), s(x0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(false, minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(lt(0, s(0)), 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(s(x0), s(0)), s(x0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(false, minus(s(x0), 0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(0))) → GCD(s(0), if(true, 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(s(x0), s(0)), s(x0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(false, minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(true, 0, s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), s(x0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(false, minus(s(x0), 0), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(true, 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), s(x0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), mod(minus(minus(s(x0), 0), s(0)), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), if(true, 0, s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), s(x0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), mod(minus(minus(s(x0), 0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(0))) → GCD(s(0), 0)
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), s(x0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), mod(minus(minus(s(x0), 0), s(0)), s(0)))
GCD(s(0), s(s(0))) → GCD(s(0), 0)
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(x0, 0), s(x0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), mod(minus(minus(s(x0), 0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(false, s(x0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), mod(minus(minus(s(x0), 0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(false, s(x0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(minus(s(x0), 0), s(0)), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(false, s(x0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(minus(s(x0), 0), s(0)), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), mod(minus(s(x0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(minus(s(x0), 0), s(0)), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), mod(minus(s(x0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), s(0)), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), mod(minus(s(x0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), s(0)), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), s(0)), s(0)), minus(s(x0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), s(0)), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), s(0)), s(0)), minus(s(x0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(s(x0), s(0)), s(0)), minus(s(x0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(minus(s(x0), 0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
GCD(s(0), s(s(s(x0)))) → GCD(s(0), if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)))
POL(0) = 0
POL(GCD(x1, x2)) = x2
POL(false) = 0
POL(if(x1, x2, x3)) = x2
POL(lt(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(mod(x1, x2)) = x1
POL(s(x1)) = 1 + x1
POL(true) = 0
minus(0, x) → 0
minus(s(x), 0) → s(x)
if(false, x, y) → mod(minus(x, y), y)
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(mod(minus(minus(s(x0), 0), s(0)), s(0)), if(true, s(0), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(minus(s(x0), 0), s(0)), s(0)), minus(minus(s(x0), 0), s(0)), s(0)), if(true, s(0), s(s(x0))))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(minus(s(x0), 0), s(0)), s(0)), minus(minus(s(x0), 0), s(0)), s(0)), if(true, s(0), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(s(x0), s(0)), s(0)), minus(minus(s(x0), 0), s(0)), s(0)), if(true, s(0), s(s(x0))))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(s(x0), s(0)), s(0)), minus(minus(s(x0), 0), s(0)), s(0)), if(true, s(0), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(minus(s(x0), 0), s(0)), s(0)), if(true, s(0), s(s(x0))))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(minus(s(x0), 0), s(0)), s(0)), if(true, s(0), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)), if(true, s(0), s(s(x0))))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(s(x0), s(0)), s(0)), if(true, s(0), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(true, s(0), s(s(x0))))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), if(true, s(0), s(s(x0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), s(0))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), s(0))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), s(0))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
GCD(s(s(x0)), s(0)) → GCD(if(lt(minus(x0, 0), s(0)), minus(x0, 0), s(0)), s(0))
POL(0) = 0
POL(GCD(x1, x2)) = x1
POL(false) = 0
POL(if(x1, x2, x3)) = x2
POL(lt(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(mod(x1, x2)) = x1
POL(s(x1)) = 1 + x1
POL(true) = 0
minus(0, x) → 0
minus(s(x), 0) → s(x)
if(false, x, y) → mod(minus(x, y), y)
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
GCD(s(s(s(x0))), s(s(0))) → GCD(if(lt(x0, s(0)), s(x0), s(s(0))), s(s(0)))
POL(0) = 0
POL(GCD(x1, x2)) = x1
POL(false) = 0
POL(if(x1, x2, x3)) = x2
POL(lt(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(mod(x1, x2)) = x1
POL(s(x1)) = 1 + x1
POL(true) = 0
if(false, x, y) → mod(minus(x, y), y)
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
GCD(s(s(0)), s(s(x0))) → GCD(if(lt(0, x0), s(s(0)), s(s(x0))), if(lt(minus(x0, 0), s(s(0))), minus(x0, 0), s(s(0))))
POL(0) = 0
POL(GCD(x1, x2)) = x1 + x2
POL(false) = 0
POL(if(x1, x2, x3)) = x2
POL(lt(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(mod(x1, x2)) = x1
POL(s(x1)) = 1 + x1
POL(true) = 0
if(false, x, y) → mod(minus(x, y), y)
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
minus(0, x0)
minus(s(x0), 0)
minus(s(x0), s(x1))
mod(x0, 0)
mod(x0, s(x1))
if(true, x0, x1)
if(false, x0, x1)
lt(x0, 0)
lt(0, s(x0))
lt(s(x0), s(x1))
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false
GCD(s(s(s(x1))), s(s(s(x0)))) → GCD(if(lt(x1, x0), s(s(s(x1))), s(s(s(x0)))), if(lt(x0, x1), s(s(s(x0))), s(s(s(x1)))))
mod(x, s(y)) → if(lt(x, s(y)), x, s(y))
if(false, x, y) → mod(minus(x, y), y)
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
minus(0, x) → 0
minus(s(x), 0) → s(x)
minus(s(x), s(y)) → minus(x, y)
mod(x, 0) → 0
lt(x, 0) → false