(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
Rewrite Strategy: INNERMOST
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
S is empty.
Rewrite Strategy: INNERMOST
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
pair/0
pair/1
result/0
neededIterations/0
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
S is empty.
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
a → b
a → c
Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
gcd2,
le,
inc,
minusThey will be analysed ascendingly in the following order:
le < gcd2
inc < gcd2
minus < gcd2
(8) Obligation:
Innermost TRS:
Rules:
gcd(
x,
y) →
gcd2(
x,
y,
0')
gcd2(
x,
y,
i) →
if1(
le(
x,
0'),
le(
y,
0'),
le(
x,
y),
le(
y,
x),
x,
y,
inc(
i))
if1(
true,
b1,
b2,
b3,
x,
y,
i) →
pairif1(
false,
b1,
b2,
b3,
x,
y,
i) →
if2(
b1,
b2,
b3,
x,
y,
i)
if2(
true,
b2,
b3,
x,
y,
i) →
pairif2(
false,
b2,
b3,
x,
y,
i) →
if3(
b2,
b3,
x,
y,
i)
if3(
false,
b3,
x,
y,
i) →
gcd2(
minus(
x,
y),
y,
i)
if3(
true,
b3,
x,
y,
i) →
if4(
b3,
x,
y,
i)
if4(
false,
x,
y,
i) →
gcd2(
x,
minus(
y,
x),
i)
if4(
true,
x,
y,
i) →
pairinc(
0') →
0'inc(
s(
i)) →
s(
inc(
i))
le(
s(
x),
0') →
falsele(
0',
y) →
truele(
s(
x),
s(
y)) →
le(
x,
y)
minus(
x,
0') →
xminus(
0',
y) →
0'minus(
s(
x),
s(
y)) →
minus(
x,
y)
a →
ba →
cTypes:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
le, gcd2, inc, minus
They will be analysed ascendingly in the following order:
le < gcd2
inc < gcd2
minus < gcd2
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
le(
gen_0':s5_0(
+(
1,
n7_0)),
gen_0':s5_0(
n7_0)) →
false, rt ∈ Ω(1 + n7
0)
Induction Base:
le(gen_0':s5_0(+(1, 0)), gen_0':s5_0(0)) →RΩ(1)
false
Induction Step:
le(gen_0':s5_0(+(1, +(n7_0, 1))), gen_0':s5_0(+(n7_0, 1))) →RΩ(1)
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) →IH
false
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
gcd(
x,
y) →
gcd2(
x,
y,
0')
gcd2(
x,
y,
i) →
if1(
le(
x,
0'),
le(
y,
0'),
le(
x,
y),
le(
y,
x),
x,
y,
inc(
i))
if1(
true,
b1,
b2,
b3,
x,
y,
i) →
pairif1(
false,
b1,
b2,
b3,
x,
y,
i) →
if2(
b1,
b2,
b3,
x,
y,
i)
if2(
true,
b2,
b3,
x,
y,
i) →
pairif2(
false,
b2,
b3,
x,
y,
i) →
if3(
b2,
b3,
x,
y,
i)
if3(
false,
b3,
x,
y,
i) →
gcd2(
minus(
x,
y),
y,
i)
if3(
true,
b3,
x,
y,
i) →
if4(
b3,
x,
y,
i)
if4(
false,
x,
y,
i) →
gcd2(
x,
minus(
y,
x),
i)
if4(
true,
x,
y,
i) →
pairinc(
0') →
0'inc(
s(
i)) →
s(
inc(
i))
le(
s(
x),
0') →
falsele(
0',
y) →
truele(
s(
x),
s(
y)) →
le(
x,
y)
minus(
x,
0') →
xminus(
0',
y) →
0'minus(
s(
x),
s(
y)) →
minus(
x,
y)
a →
ba →
cTypes:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s
Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
inc, gcd2, minus
They will be analysed ascendingly in the following order:
inc < gcd2
minus < gcd2
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
inc(
gen_0':s5_0(
n368_0)) →
gen_0':s5_0(
n368_0), rt ∈ Ω(1 + n368
0)
Induction Base:
inc(gen_0':s5_0(0)) →RΩ(1)
0'
Induction Step:
inc(gen_0':s5_0(+(n368_0, 1))) →RΩ(1)
s(inc(gen_0':s5_0(n368_0))) →IH
s(gen_0':s5_0(c369_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
Innermost TRS:
Rules:
gcd(
x,
y) →
gcd2(
x,
y,
0')
gcd2(
x,
y,
i) →
if1(
le(
x,
0'),
le(
y,
0'),
le(
x,
y),
le(
y,
x),
x,
y,
inc(
i))
if1(
true,
b1,
b2,
b3,
x,
y,
i) →
pairif1(
false,
b1,
b2,
b3,
x,
y,
i) →
if2(
b1,
b2,
b3,
x,
y,
i)
if2(
true,
b2,
b3,
x,
y,
i) →
pairif2(
false,
b2,
b3,
x,
y,
i) →
if3(
b2,
b3,
x,
y,
i)
if3(
false,
b3,
x,
y,
i) →
gcd2(
minus(
x,
y),
y,
i)
if3(
true,
b3,
x,
y,
i) →
if4(
b3,
x,
y,
i)
if4(
false,
x,
y,
i) →
gcd2(
x,
minus(
y,
x),
i)
if4(
true,
x,
y,
i) →
pairinc(
0') →
0'inc(
s(
i)) →
s(
inc(
i))
le(
s(
x),
0') →
falsele(
0',
y) →
truele(
s(
x),
s(
y)) →
le(
x,
y)
minus(
x,
0') →
xminus(
0',
y) →
0'minus(
s(
x),
s(
y)) →
minus(
x,
y)
a →
ba →
cTypes:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s
Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n368_0)) → gen_0':s5_0(n368_0), rt ∈ Ω(1 + n3680)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
minus, gcd2
They will be analysed ascendingly in the following order:
minus < gcd2
(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
minus(
gen_0':s5_0(
n618_0),
gen_0':s5_0(
n618_0)) →
gen_0':s5_0(
0), rt ∈ Ω(1 + n618
0)
Induction Base:
minus(gen_0':s5_0(0), gen_0':s5_0(0)) →RΩ(1)
gen_0':s5_0(0)
Induction Step:
minus(gen_0':s5_0(+(n618_0, 1)), gen_0':s5_0(+(n618_0, 1))) →RΩ(1)
minus(gen_0':s5_0(n618_0), gen_0':s5_0(n618_0)) →IH
gen_0':s5_0(0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(16) Complex Obligation (BEST)
(17) Obligation:
Innermost TRS:
Rules:
gcd(
x,
y) →
gcd2(
x,
y,
0')
gcd2(
x,
y,
i) →
if1(
le(
x,
0'),
le(
y,
0'),
le(
x,
y),
le(
y,
x),
x,
y,
inc(
i))
if1(
true,
b1,
b2,
b3,
x,
y,
i) →
pairif1(
false,
b1,
b2,
b3,
x,
y,
i) →
if2(
b1,
b2,
b3,
x,
y,
i)
if2(
true,
b2,
b3,
x,
y,
i) →
pairif2(
false,
b2,
b3,
x,
y,
i) →
if3(
b2,
b3,
x,
y,
i)
if3(
false,
b3,
x,
y,
i) →
gcd2(
minus(
x,
y),
y,
i)
if3(
true,
b3,
x,
y,
i) →
if4(
b3,
x,
y,
i)
if4(
false,
x,
y,
i) →
gcd2(
x,
minus(
y,
x),
i)
if4(
true,
x,
y,
i) →
pairinc(
0') →
0'inc(
s(
i)) →
s(
inc(
i))
le(
s(
x),
0') →
falsele(
0',
y) →
truele(
s(
x),
s(
y)) →
le(
x,
y)
minus(
x,
0') →
xminus(
0',
y) →
0'minus(
s(
x),
s(
y)) →
minus(
x,
y)
a →
ba →
cTypes:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s
Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n368_0)) → gen_0':s5_0(n368_0), rt ∈ Ω(1 + n3680)
minus(gen_0':s5_0(n618_0), gen_0':s5_0(n618_0)) → gen_0':s5_0(0), rt ∈ Ω(1 + n6180)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
gcd2
(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol gcd2.
(19) Obligation:
Innermost TRS:
Rules:
gcd(
x,
y) →
gcd2(
x,
y,
0')
gcd2(
x,
y,
i) →
if1(
le(
x,
0'),
le(
y,
0'),
le(
x,
y),
le(
y,
x),
x,
y,
inc(
i))
if1(
true,
b1,
b2,
b3,
x,
y,
i) →
pairif1(
false,
b1,
b2,
b3,
x,
y,
i) →
if2(
b1,
b2,
b3,
x,
y,
i)
if2(
true,
b2,
b3,
x,
y,
i) →
pairif2(
false,
b2,
b3,
x,
y,
i) →
if3(
b2,
b3,
x,
y,
i)
if3(
false,
b3,
x,
y,
i) →
gcd2(
minus(
x,
y),
y,
i)
if3(
true,
b3,
x,
y,
i) →
if4(
b3,
x,
y,
i)
if4(
false,
x,
y,
i) →
gcd2(
x,
minus(
y,
x),
i)
if4(
true,
x,
y,
i) →
pairinc(
0') →
0'inc(
s(
i)) →
s(
inc(
i))
le(
s(
x),
0') →
falsele(
0',
y) →
truele(
s(
x),
s(
y)) →
le(
x,
y)
minus(
x,
0') →
xminus(
0',
y) →
0'minus(
s(
x),
s(
y)) →
minus(
x,
y)
a →
ba →
cTypes:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s
Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n368_0)) → gen_0':s5_0(n368_0), rt ∈ Ω(1 + n3680)
minus(gen_0':s5_0(n618_0), gen_0':s5_0(n618_0)) → gen_0':s5_0(0), rt ∈ Ω(1 + n6180)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(20) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
(21) BOUNDS(n^1, INF)
(22) Obligation:
Innermost TRS:
Rules:
gcd(
x,
y) →
gcd2(
x,
y,
0')
gcd2(
x,
y,
i) →
if1(
le(
x,
0'),
le(
y,
0'),
le(
x,
y),
le(
y,
x),
x,
y,
inc(
i))
if1(
true,
b1,
b2,
b3,
x,
y,
i) →
pairif1(
false,
b1,
b2,
b3,
x,
y,
i) →
if2(
b1,
b2,
b3,
x,
y,
i)
if2(
true,
b2,
b3,
x,
y,
i) →
pairif2(
false,
b2,
b3,
x,
y,
i) →
if3(
b2,
b3,
x,
y,
i)
if3(
false,
b3,
x,
y,
i) →
gcd2(
minus(
x,
y),
y,
i)
if3(
true,
b3,
x,
y,
i) →
if4(
b3,
x,
y,
i)
if4(
false,
x,
y,
i) →
gcd2(
x,
minus(
y,
x),
i)
if4(
true,
x,
y,
i) →
pairinc(
0') →
0'inc(
s(
i)) →
s(
inc(
i))
le(
s(
x),
0') →
falsele(
0',
y) →
truele(
s(
x),
s(
y)) →
le(
x,
y)
minus(
x,
0') →
xminus(
0',
y) →
0'minus(
s(
x),
s(
y)) →
minus(
x,
y)
a →
ba →
cTypes:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s
Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n368_0)) → gen_0':s5_0(n368_0), rt ∈ Ω(1 + n3680)
minus(gen_0':s5_0(n618_0), gen_0':s5_0(n618_0)) → gen_0':s5_0(0), rt ∈ Ω(1 + n6180)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(23) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
(24) BOUNDS(n^1, INF)
(25) Obligation:
Innermost TRS:
Rules:
gcd(
x,
y) →
gcd2(
x,
y,
0')
gcd2(
x,
y,
i) →
if1(
le(
x,
0'),
le(
y,
0'),
le(
x,
y),
le(
y,
x),
x,
y,
inc(
i))
if1(
true,
b1,
b2,
b3,
x,
y,
i) →
pairif1(
false,
b1,
b2,
b3,
x,
y,
i) →
if2(
b1,
b2,
b3,
x,
y,
i)
if2(
true,
b2,
b3,
x,
y,
i) →
pairif2(
false,
b2,
b3,
x,
y,
i) →
if3(
b2,
b3,
x,
y,
i)
if3(
false,
b3,
x,
y,
i) →
gcd2(
minus(
x,
y),
y,
i)
if3(
true,
b3,
x,
y,
i) →
if4(
b3,
x,
y,
i)
if4(
false,
x,
y,
i) →
gcd2(
x,
minus(
y,
x),
i)
if4(
true,
x,
y,
i) →
pairinc(
0') →
0'inc(
s(
i)) →
s(
inc(
i))
le(
s(
x),
0') →
falsele(
0',
y) →
truele(
s(
x),
s(
y)) →
le(
x,
y)
minus(
x,
0') →
xminus(
0',
y) →
0'minus(
s(
x),
s(
y)) →
minus(
x,
y)
a →
ba →
cTypes:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s
Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n368_0)) → gen_0':s5_0(n368_0), rt ∈ Ω(1 + n3680)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(26) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
(27) BOUNDS(n^1, INF)
(28) Obligation:
Innermost TRS:
Rules:
gcd(
x,
y) →
gcd2(
x,
y,
0')
gcd2(
x,
y,
i) →
if1(
le(
x,
0'),
le(
y,
0'),
le(
x,
y),
le(
y,
x),
x,
y,
inc(
i))
if1(
true,
b1,
b2,
b3,
x,
y,
i) →
pairif1(
false,
b1,
b2,
b3,
x,
y,
i) →
if2(
b1,
b2,
b3,
x,
y,
i)
if2(
true,
b2,
b3,
x,
y,
i) →
pairif2(
false,
b2,
b3,
x,
y,
i) →
if3(
b2,
b3,
x,
y,
i)
if3(
false,
b3,
x,
y,
i) →
gcd2(
minus(
x,
y),
y,
i)
if3(
true,
b3,
x,
y,
i) →
if4(
b3,
x,
y,
i)
if4(
false,
x,
y,
i) →
gcd2(
x,
minus(
y,
x),
i)
if4(
true,
x,
y,
i) →
pairinc(
0') →
0'inc(
s(
i)) →
s(
inc(
i))
le(
s(
x),
0') →
falsele(
0',
y) →
truele(
s(
x),
s(
y)) →
le(
x,
y)
minus(
x,
0') →
xminus(
0',
y) →
0'minus(
s(
x),
s(
y)) →
minus(
x,
y)
a →
ba →
cTypes:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: pair
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_b:c4_0 :: b:c
gen_0':s5_0 :: Nat → 0':s
Lemmas:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(29) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s5_0(+(1, n7_0)), gen_0':s5_0(n7_0)) → false, rt ∈ Ω(1 + n70)
(30) BOUNDS(n^1, INF)