(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
lcm(x, y) → lcmIter(x, y, 0, times(x, y))
lcmIter(x, y, z, u) → if(or(ge(0, x), ge(z, u)), x, y, z, u)
if(true, x, y, z, u) → z
if(false, x, y, z, u) → if2(divisible(z, y), x, y, z, u)
if2(true, x, y, z, u) → z
if2(false, x, y, z, u) → lcmIter(x, y, plus(x, z), u)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → ifTimes(ge(0, x), x, y)
ifTimes(true, x, y) → 0
ifTimes(false, x, y) → plus(y, times(y, p(x)))
p(s(x)) → x
p(0) → s(s(0))
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
or(true, y) → true
or(false, y) → y
divisible(0, s(y)) → true
divisible(s(x), s(y)) → div(s(x), s(y), s(y))
div(x, y, 0) → divisible(x, y)
div(0, y, s(z)) → false
div(s(x), y, s(z)) → div(x, y, z)
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:
lcm(x, y) → lcmIter(x, y, 0', times(x, y))
lcmIter(x, y, z, u) → if(or(ge(0', x), ge(z, u)), x, y, z, u)
if(true, x, y, z, u) → z
if(false, x, y, z, u) → if2(divisible(z, y), x, y, z, u)
if2(true, x, y, z, u) → z
if2(false, x, y, z, u) → lcmIter(x, y, plus(x, z), u)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → ifTimes(ge(0', x), x, y)
ifTimes(true, x, y) → 0'
ifTimes(false, x, y) → plus(y, times(y, p(x)))
p(s(x)) → x
p(0') → s(s(0'))
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
or(true, y) → true
or(false, y) → y
divisible(0', s(y)) → true
divisible(s(x), s(y)) → div(s(x), s(y), s(y))
div(x, y, 0') → divisible(x, y)
div(0', y, s(z)) → false
div(s(x), y, s(z)) → div(x, y, z)
a → b
a → c
S is empty.
Rewrite Strategy: INNERMOST
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
Innermost TRS:
Rules:
lcm(x, y) → lcmIter(x, y, 0', times(x, y))
lcmIter(x, y, z, u) → if(or(ge(0', x), ge(z, u)), x, y, z, u)
if(true, x, y, z, u) → z
if(false, x, y, z, u) → if2(divisible(z, y), x, y, z, u)
if2(true, x, y, z, u) → z
if2(false, x, y, z, u) → lcmIter(x, y, plus(x, z), u)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → ifTimes(ge(0', x), x, y)
ifTimes(true, x, y) → 0'
ifTimes(false, x, y) → plus(y, times(y, p(x)))
p(s(x)) → x
p(0') → s(s(0'))
ge(x, 0') → true
ge(0', s(y)) → false
ge(s(x), s(y)) → ge(x, y)
or(true, y) → true
or(false, y) → y
divisible(0', s(y)) → true
divisible(s(x), s(y)) → div(s(x), s(y), s(y))
div(x, y, 0') → divisible(x, y)
div(0', y, s(z)) → false
div(s(x), y, s(z)) → div(x, y, z)
a → b
a → c
Types:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
lcmIter,
times,
ge,
divisible,
plus,
divThey will be analysed ascendingly in the following order:
ge < lcmIter
divisible < lcmIter
plus < lcmIter
ge < times
plus < times
divisible = div
(6) Obligation:
Innermost TRS:
Rules:
lcm(
x,
y) →
lcmIter(
x,
y,
0',
times(
x,
y))
lcmIter(
x,
y,
z,
u) →
if(
or(
ge(
0',
x),
ge(
z,
u)),
x,
y,
z,
u)
if(
true,
x,
y,
z,
u) →
zif(
false,
x,
y,
z,
u) →
if2(
divisible(
z,
y),
x,
y,
z,
u)
if2(
true,
x,
y,
z,
u) →
zif2(
false,
x,
y,
z,
u) →
lcmIter(
x,
y,
plus(
x,
z),
u)
plus(
0',
y) →
yplus(
s(
x),
y) →
s(
plus(
x,
y))
times(
x,
y) →
ifTimes(
ge(
0',
x),
x,
y)
ifTimes(
true,
x,
y) →
0'ifTimes(
false,
x,
y) →
plus(
y,
times(
y,
p(
x)))
p(
s(
x)) →
xp(
0') →
s(
s(
0'))
ge(
x,
0') →
truege(
0',
s(
y)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
or(
true,
y) →
trueor(
false,
y) →
ydivisible(
0',
s(
y)) →
truedivisible(
s(
x),
s(
y)) →
div(
s(
x),
s(
y),
s(
y))
div(
x,
y,
0') →
divisible(
x,
y)
div(
0',
y,
s(
z)) →
falsediv(
s(
x),
y,
s(
z)) →
div(
x,
y,
z)
a →
ba →
cTypes:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
ge, lcmIter, times, divisible, plus, div
They will be analysed ascendingly in the following order:
ge < lcmIter
divisible < lcmIter
plus < lcmIter
ge < times
plus < times
divisible = div
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
ge(
gen_0':s4_0(
n6_0),
gen_0':s4_0(
n6_0)) →
true, rt ∈ Ω(1 + n6
0)
Induction Base:
ge(gen_0':s4_0(0), gen_0':s4_0(0)) →RΩ(1)
true
Induction Step:
ge(gen_0':s4_0(+(n6_0, 1)), gen_0':s4_0(+(n6_0, 1))) →RΩ(1)
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) →IH
true
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
Innermost TRS:
Rules:
lcm(
x,
y) →
lcmIter(
x,
y,
0',
times(
x,
y))
lcmIter(
x,
y,
z,
u) →
if(
or(
ge(
0',
x),
ge(
z,
u)),
x,
y,
z,
u)
if(
true,
x,
y,
z,
u) →
zif(
false,
x,
y,
z,
u) →
if2(
divisible(
z,
y),
x,
y,
z,
u)
if2(
true,
x,
y,
z,
u) →
zif2(
false,
x,
y,
z,
u) →
lcmIter(
x,
y,
plus(
x,
z),
u)
plus(
0',
y) →
yplus(
s(
x),
y) →
s(
plus(
x,
y))
times(
x,
y) →
ifTimes(
ge(
0',
x),
x,
y)
ifTimes(
true,
x,
y) →
0'ifTimes(
false,
x,
y) →
plus(
y,
times(
y,
p(
x)))
p(
s(
x)) →
xp(
0') →
s(
s(
0'))
ge(
x,
0') →
truege(
0',
s(
y)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
or(
true,
y) →
trueor(
false,
y) →
ydivisible(
0',
s(
y)) →
truedivisible(
s(
x),
s(
y)) →
div(
s(
x),
s(
y),
s(
y))
div(
x,
y,
0') →
divisible(
x,
y)
div(
0',
y,
s(
z)) →
falsediv(
s(
x),
y,
s(
z)) →
div(
x,
y,
z)
a →
ba →
cTypes:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
Lemmas:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
plus, lcmIter, times, divisible, div
They will be analysed ascendingly in the following order:
divisible < lcmIter
plus < lcmIter
plus < times
divisible = div
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
plus(
gen_0':s4_0(
n445_0),
gen_0':s4_0(
b)) →
gen_0':s4_0(
+(
n445_0,
b)), rt ∈ Ω(1 + n445
0)
Induction Base:
plus(gen_0':s4_0(0), gen_0':s4_0(b)) →RΩ(1)
gen_0':s4_0(b)
Induction Step:
plus(gen_0':s4_0(+(n445_0, 1)), gen_0':s4_0(b)) →RΩ(1)
s(plus(gen_0':s4_0(n445_0), gen_0':s4_0(b))) →IH
s(gen_0':s4_0(+(b, c446_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
Innermost TRS:
Rules:
lcm(
x,
y) →
lcmIter(
x,
y,
0',
times(
x,
y))
lcmIter(
x,
y,
z,
u) →
if(
or(
ge(
0',
x),
ge(
z,
u)),
x,
y,
z,
u)
if(
true,
x,
y,
z,
u) →
zif(
false,
x,
y,
z,
u) →
if2(
divisible(
z,
y),
x,
y,
z,
u)
if2(
true,
x,
y,
z,
u) →
zif2(
false,
x,
y,
z,
u) →
lcmIter(
x,
y,
plus(
x,
z),
u)
plus(
0',
y) →
yplus(
s(
x),
y) →
s(
plus(
x,
y))
times(
x,
y) →
ifTimes(
ge(
0',
x),
x,
y)
ifTimes(
true,
x,
y) →
0'ifTimes(
false,
x,
y) →
plus(
y,
times(
y,
p(
x)))
p(
s(
x)) →
xp(
0') →
s(
s(
0'))
ge(
x,
0') →
truege(
0',
s(
y)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
or(
true,
y) →
trueor(
false,
y) →
ydivisible(
0',
s(
y)) →
truedivisible(
s(
x),
s(
y)) →
div(
s(
x),
s(
y),
s(
y))
div(
x,
y,
0') →
divisible(
x,
y)
div(
0',
y,
s(
z)) →
falsediv(
s(
x),
y,
s(
z)) →
div(
x,
y,
z)
a →
ba →
cTypes:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
Lemmas:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s4_0(n445_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n445_0, b)), rt ∈ Ω(1 + n4450)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
times, lcmIter, divisible, div
They will be analysed ascendingly in the following order:
divisible < lcmIter
divisible = div
(13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol times.
(14) Obligation:
Innermost TRS:
Rules:
lcm(
x,
y) →
lcmIter(
x,
y,
0',
times(
x,
y))
lcmIter(
x,
y,
z,
u) →
if(
or(
ge(
0',
x),
ge(
z,
u)),
x,
y,
z,
u)
if(
true,
x,
y,
z,
u) →
zif(
false,
x,
y,
z,
u) →
if2(
divisible(
z,
y),
x,
y,
z,
u)
if2(
true,
x,
y,
z,
u) →
zif2(
false,
x,
y,
z,
u) →
lcmIter(
x,
y,
plus(
x,
z),
u)
plus(
0',
y) →
yplus(
s(
x),
y) →
s(
plus(
x,
y))
times(
x,
y) →
ifTimes(
ge(
0',
x),
x,
y)
ifTimes(
true,
x,
y) →
0'ifTimes(
false,
x,
y) →
plus(
y,
times(
y,
p(
x)))
p(
s(
x)) →
xp(
0') →
s(
s(
0'))
ge(
x,
0') →
truege(
0',
s(
y)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
or(
true,
y) →
trueor(
false,
y) →
ydivisible(
0',
s(
y)) →
truedivisible(
s(
x),
s(
y)) →
div(
s(
x),
s(
y),
s(
y))
div(
x,
y,
0') →
divisible(
x,
y)
div(
0',
y,
s(
z)) →
falsediv(
s(
x),
y,
s(
z)) →
div(
x,
y,
z)
a →
ba →
cTypes:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
Lemmas:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s4_0(n445_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n445_0, b)), rt ∈ Ω(1 + n4450)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
div, lcmIter, divisible
They will be analysed ascendingly in the following order:
divisible < lcmIter
divisible = div
(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
div(
gen_0':s4_0(
n1386_0),
gen_0':s4_0(
b),
gen_0':s4_0(
+(
1,
n1386_0))) →
false, rt ∈ Ω(1 + n1386
0)
Induction Base:
div(gen_0':s4_0(0), gen_0':s4_0(b), gen_0':s4_0(+(1, 0))) →RΩ(1)
false
Induction Step:
div(gen_0':s4_0(+(n1386_0, 1)), gen_0':s4_0(b), gen_0':s4_0(+(1, +(n1386_0, 1)))) →RΩ(1)
div(gen_0':s4_0(n1386_0), gen_0':s4_0(b), gen_0':s4_0(+(1, n1386_0))) →IH
false
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(16) Complex Obligation (BEST)
(17) Obligation:
Innermost TRS:
Rules:
lcm(
x,
y) →
lcmIter(
x,
y,
0',
times(
x,
y))
lcmIter(
x,
y,
z,
u) →
if(
or(
ge(
0',
x),
ge(
z,
u)),
x,
y,
z,
u)
if(
true,
x,
y,
z,
u) →
zif(
false,
x,
y,
z,
u) →
if2(
divisible(
z,
y),
x,
y,
z,
u)
if2(
true,
x,
y,
z,
u) →
zif2(
false,
x,
y,
z,
u) →
lcmIter(
x,
y,
plus(
x,
z),
u)
plus(
0',
y) →
yplus(
s(
x),
y) →
s(
plus(
x,
y))
times(
x,
y) →
ifTimes(
ge(
0',
x),
x,
y)
ifTimes(
true,
x,
y) →
0'ifTimes(
false,
x,
y) →
plus(
y,
times(
y,
p(
x)))
p(
s(
x)) →
xp(
0') →
s(
s(
0'))
ge(
x,
0') →
truege(
0',
s(
y)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
or(
true,
y) →
trueor(
false,
y) →
ydivisible(
0',
s(
y)) →
truedivisible(
s(
x),
s(
y)) →
div(
s(
x),
s(
y),
s(
y))
div(
x,
y,
0') →
divisible(
x,
y)
div(
0',
y,
s(
z)) →
falsediv(
s(
x),
y,
s(
z)) →
div(
x,
y,
z)
a →
ba →
cTypes:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
Lemmas:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s4_0(n445_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n445_0, b)), rt ∈ Ω(1 + n4450)
div(gen_0':s4_0(n1386_0), gen_0':s4_0(b), gen_0':s4_0(+(1, n1386_0))) → false, rt ∈ Ω(1 + n13860)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
divisible, lcmIter
They will be analysed ascendingly in the following order:
divisible < lcmIter
divisible = div
(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol divisible.
(19) Obligation:
Innermost TRS:
Rules:
lcm(
x,
y) →
lcmIter(
x,
y,
0',
times(
x,
y))
lcmIter(
x,
y,
z,
u) →
if(
or(
ge(
0',
x),
ge(
z,
u)),
x,
y,
z,
u)
if(
true,
x,
y,
z,
u) →
zif(
false,
x,
y,
z,
u) →
if2(
divisible(
z,
y),
x,
y,
z,
u)
if2(
true,
x,
y,
z,
u) →
zif2(
false,
x,
y,
z,
u) →
lcmIter(
x,
y,
plus(
x,
z),
u)
plus(
0',
y) →
yplus(
s(
x),
y) →
s(
plus(
x,
y))
times(
x,
y) →
ifTimes(
ge(
0',
x),
x,
y)
ifTimes(
true,
x,
y) →
0'ifTimes(
false,
x,
y) →
plus(
y,
times(
y,
p(
x)))
p(
s(
x)) →
xp(
0') →
s(
s(
0'))
ge(
x,
0') →
truege(
0',
s(
y)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
or(
true,
y) →
trueor(
false,
y) →
ydivisible(
0',
s(
y)) →
truedivisible(
s(
x),
s(
y)) →
div(
s(
x),
s(
y),
s(
y))
div(
x,
y,
0') →
divisible(
x,
y)
div(
0',
y,
s(
z)) →
falsediv(
s(
x),
y,
s(
z)) →
div(
x,
y,
z)
a →
ba →
cTypes:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
Lemmas:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s4_0(n445_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n445_0, b)), rt ∈ Ω(1 + n4450)
div(gen_0':s4_0(n1386_0), gen_0':s4_0(b), gen_0':s4_0(+(1, n1386_0))) → false, rt ∈ Ω(1 + n13860)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
lcmIter
(20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol lcmIter.
(21) Obligation:
Innermost TRS:
Rules:
lcm(
x,
y) →
lcmIter(
x,
y,
0',
times(
x,
y))
lcmIter(
x,
y,
z,
u) →
if(
or(
ge(
0',
x),
ge(
z,
u)),
x,
y,
z,
u)
if(
true,
x,
y,
z,
u) →
zif(
false,
x,
y,
z,
u) →
if2(
divisible(
z,
y),
x,
y,
z,
u)
if2(
true,
x,
y,
z,
u) →
zif2(
false,
x,
y,
z,
u) →
lcmIter(
x,
y,
plus(
x,
z),
u)
plus(
0',
y) →
yplus(
s(
x),
y) →
s(
plus(
x,
y))
times(
x,
y) →
ifTimes(
ge(
0',
x),
x,
y)
ifTimes(
true,
x,
y) →
0'ifTimes(
false,
x,
y) →
plus(
y,
times(
y,
p(
x)))
p(
s(
x)) →
xp(
0') →
s(
s(
0'))
ge(
x,
0') →
truege(
0',
s(
y)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
or(
true,
y) →
trueor(
false,
y) →
ydivisible(
0',
s(
y)) →
truedivisible(
s(
x),
s(
y)) →
div(
s(
x),
s(
y),
s(
y))
div(
x,
y,
0') →
divisible(
x,
y)
div(
0',
y,
s(
z)) →
falsediv(
s(
x),
y,
s(
z)) →
div(
x,
y,
z)
a →
ba →
cTypes:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
Lemmas:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s4_0(n445_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n445_0, b)), rt ∈ Ω(1 + n4450)
div(gen_0':s4_0(n1386_0), gen_0':s4_0(b), gen_0':s4_0(+(1, n1386_0))) → false, rt ∈ Ω(1 + n13860)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(22) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
(23) BOUNDS(n^1, INF)
(24) Obligation:
Innermost TRS:
Rules:
lcm(
x,
y) →
lcmIter(
x,
y,
0',
times(
x,
y))
lcmIter(
x,
y,
z,
u) →
if(
or(
ge(
0',
x),
ge(
z,
u)),
x,
y,
z,
u)
if(
true,
x,
y,
z,
u) →
zif(
false,
x,
y,
z,
u) →
if2(
divisible(
z,
y),
x,
y,
z,
u)
if2(
true,
x,
y,
z,
u) →
zif2(
false,
x,
y,
z,
u) →
lcmIter(
x,
y,
plus(
x,
z),
u)
plus(
0',
y) →
yplus(
s(
x),
y) →
s(
plus(
x,
y))
times(
x,
y) →
ifTimes(
ge(
0',
x),
x,
y)
ifTimes(
true,
x,
y) →
0'ifTimes(
false,
x,
y) →
plus(
y,
times(
y,
p(
x)))
p(
s(
x)) →
xp(
0') →
s(
s(
0'))
ge(
x,
0') →
truege(
0',
s(
y)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
or(
true,
y) →
trueor(
false,
y) →
ydivisible(
0',
s(
y)) →
truedivisible(
s(
x),
s(
y)) →
div(
s(
x),
s(
y),
s(
y))
div(
x,
y,
0') →
divisible(
x,
y)
div(
0',
y,
s(
z)) →
falsediv(
s(
x),
y,
s(
z)) →
div(
x,
y,
z)
a →
ba →
cTypes:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
Lemmas:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s4_0(n445_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n445_0, b)), rt ∈ Ω(1 + n4450)
div(gen_0':s4_0(n1386_0), gen_0':s4_0(b), gen_0':s4_0(+(1, n1386_0))) → false, rt ∈ Ω(1 + n13860)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(25) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
(26) BOUNDS(n^1, INF)
(27) Obligation:
Innermost TRS:
Rules:
lcm(
x,
y) →
lcmIter(
x,
y,
0',
times(
x,
y))
lcmIter(
x,
y,
z,
u) →
if(
or(
ge(
0',
x),
ge(
z,
u)),
x,
y,
z,
u)
if(
true,
x,
y,
z,
u) →
zif(
false,
x,
y,
z,
u) →
if2(
divisible(
z,
y),
x,
y,
z,
u)
if2(
true,
x,
y,
z,
u) →
zif2(
false,
x,
y,
z,
u) →
lcmIter(
x,
y,
plus(
x,
z),
u)
plus(
0',
y) →
yplus(
s(
x),
y) →
s(
plus(
x,
y))
times(
x,
y) →
ifTimes(
ge(
0',
x),
x,
y)
ifTimes(
true,
x,
y) →
0'ifTimes(
false,
x,
y) →
plus(
y,
times(
y,
p(
x)))
p(
s(
x)) →
xp(
0') →
s(
s(
0'))
ge(
x,
0') →
truege(
0',
s(
y)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
or(
true,
y) →
trueor(
false,
y) →
ydivisible(
0',
s(
y)) →
truedivisible(
s(
x),
s(
y)) →
div(
s(
x),
s(
y),
s(
y))
div(
x,
y,
0') →
divisible(
x,
y)
div(
0',
y,
s(
z)) →
falsediv(
s(
x),
y,
s(
z)) →
div(
x,
y,
z)
a →
ba →
cTypes:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
Lemmas:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
plus(gen_0':s4_0(n445_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n445_0, b)), rt ∈ Ω(1 + n4450)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(28) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
(29) BOUNDS(n^1, INF)
(30) Obligation:
Innermost TRS:
Rules:
lcm(
x,
y) →
lcmIter(
x,
y,
0',
times(
x,
y))
lcmIter(
x,
y,
z,
u) →
if(
or(
ge(
0',
x),
ge(
z,
u)),
x,
y,
z,
u)
if(
true,
x,
y,
z,
u) →
zif(
false,
x,
y,
z,
u) →
if2(
divisible(
z,
y),
x,
y,
z,
u)
if2(
true,
x,
y,
z,
u) →
zif2(
false,
x,
y,
z,
u) →
lcmIter(
x,
y,
plus(
x,
z),
u)
plus(
0',
y) →
yplus(
s(
x),
y) →
s(
plus(
x,
y))
times(
x,
y) →
ifTimes(
ge(
0',
x),
x,
y)
ifTimes(
true,
x,
y) →
0'ifTimes(
false,
x,
y) →
plus(
y,
times(
y,
p(
x)))
p(
s(
x)) →
xp(
0') →
s(
s(
0'))
ge(
x,
0') →
truege(
0',
s(
y)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
or(
true,
y) →
trueor(
false,
y) →
ydivisible(
0',
s(
y)) →
truedivisible(
s(
x),
s(
y)) →
div(
s(
x),
s(
y),
s(
y))
div(
x,
y,
0') →
divisible(
x,
y)
div(
0',
y,
s(
z)) →
falsediv(
s(
x),
y,
s(
z)) →
div(
x,
y,
z)
a →
ba →
cTypes:
lcm :: 0':s → 0':s → 0':s
lcmIter :: 0':s → 0':s → 0':s → 0':s → 0':s
0' :: 0':s
times :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
or :: true:false → true:false → true:false
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
divisible :: 0':s → 0':s → true:false
plus :: 0':s → 0':s → 0':s
s :: 0':s → 0':s
ifTimes :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
div :: 0':s → 0':s → 0':s → true:false
a :: b:c
b :: b:c
c :: b:c
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
hole_b:c3_0 :: b:c
gen_0':s4_0 :: Nat → 0':s
Lemmas:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(31) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) → true, rt ∈ Ω(1 + n60)
(32) BOUNDS(n^1, INF)