(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
double(x) → permute(x, x, a)
permute(x, y, a) → permute(isZero(x), x, b)
permute(false, x, b) → permute(ack(x, x), p(x), c)
permute(true, x, b) → 0
permute(y, x, c) → s(s(permute(x, y, a)))
p(0) → 0
p(s(x)) → x
ack(0, x) → plus(x, s(0))
ack(s(x), 0) → ack(x, s(0))
ack(s(x), s(y)) → ack(x, ack(s(x), y))
plus(0, y) → y
plus(s(x), y) → plus(x, s(y))
plus(x, s(s(y))) → s(plus(s(x), y))
plus(x, s(0)) → s(x)
plus(x, 0) → x
isZero(0) → true
isZero(s(x)) → false
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:
double(x) → permute(x, x, a)
permute(x, y, a) → permute(isZero(x), x, b)
permute(false, x, b) → permute(ack(x, x), p(x), c)
permute(true, x, b) → 0'
permute(y, x, c) → s(s(permute(x, y, a)))
p(0') → 0'
p(s(x)) → x
ack(0', x) → plus(x, s(0'))
ack(s(x), 0') → ack(x, s(0'))
ack(s(x), s(y)) → ack(x, ack(s(x), y))
plus(0', y) → y
plus(s(x), y) → plus(x, s(y))
plus(x, s(s(y))) → s(plus(s(x), y))
plus(x, s(0')) → s(x)
plus(x, 0') → x
isZero(0') → true
isZero(s(x)) → false
S is empty.
Rewrite Strategy: INNERMOST
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
Innermost TRS:
Rules:
double(x) → permute(x, x, a)
permute(x, y, a) → permute(isZero(x), x, b)
permute(false, x, b) → permute(ack(x, x), p(x), c)
permute(true, x, b) → 0'
permute(y, x, c) → s(s(permute(x, y, a)))
p(0') → 0'
p(s(x)) → x
ack(0', x) → plus(x, s(0'))
ack(s(x), 0') → ack(x, s(0'))
ack(s(x), s(y)) → ack(x, ack(s(x), y))
plus(0', y) → y
plus(s(x), y) → plus(x, s(y))
plus(x, s(s(y))) → s(plus(s(x), y))
plus(x, s(0')) → s(x)
plus(x, 0') → x
isZero(0') → true
isZero(s(x)) → false
Types:
double :: false:true:0':s → false:true:0':s
permute :: false:true:0':s → false:true:0':s → a:b:c → false:true:0':s
a :: a:b:c
isZero :: false:true:0':s → false:true:0':s
b :: a:b:c
false :: false:true:0':s
ack :: false:true:0':s → false:true:0':s → false:true:0':s
p :: false:true:0':s → false:true:0':s
c :: a:b:c
true :: false:true:0':s
0' :: false:true:0':s
s :: false:true:0':s → false:true:0':s
plus :: false:true:0':s → false:true:0':s → false:true:0':s
hole_false:true:0':s1_0 :: false:true:0':s
hole_a:b:c2_0 :: a:b:c
gen_false:true:0':s3_0 :: Nat → false:true:0':s
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
permute,
ack,
plusThey will be analysed ascendingly in the following order:
ack < permute
plus < ack
(6) Obligation:
Innermost TRS:
Rules:
double(
x) →
permute(
x,
x,
a)
permute(
x,
y,
a) →
permute(
isZero(
x),
x,
b)
permute(
false,
x,
b) →
permute(
ack(
x,
x),
p(
x),
c)
permute(
true,
x,
b) →
0'permute(
y,
x,
c) →
s(
s(
permute(
x,
y,
a)))
p(
0') →
0'p(
s(
x)) →
xack(
0',
x) →
plus(
x,
s(
0'))
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
ack(
s(
x),
y))
plus(
0',
y) →
yplus(
s(
x),
y) →
plus(
x,
s(
y))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
x,
s(
0')) →
s(
x)
plus(
x,
0') →
xisZero(
0') →
trueisZero(
s(
x)) →
falseTypes:
double :: false:true:0':s → false:true:0':s
permute :: false:true:0':s → false:true:0':s → a:b:c → false:true:0':s
a :: a:b:c
isZero :: false:true:0':s → false:true:0':s
b :: a:b:c
false :: false:true:0':s
ack :: false:true:0':s → false:true:0':s → false:true:0':s
p :: false:true:0':s → false:true:0':s
c :: a:b:c
true :: false:true:0':s
0' :: false:true:0':s
s :: false:true:0':s → false:true:0':s
plus :: false:true:0':s → false:true:0':s → false:true:0':s
hole_false:true:0':s1_0 :: false:true:0':s
hole_a:b:c2_0 :: a:b:c
gen_false:true:0':s3_0 :: Nat → false:true:0':s
Generator Equations:
gen_false:true:0':s3_0(0) ⇔ true
gen_false:true:0':s3_0(+(x, 1)) ⇔ s(gen_false:true:0':s3_0(x))
The following defined symbols remain to be analysed:
plus, permute, ack
They will be analysed ascendingly in the following order:
ack < permute
plus < ack
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
plus(
gen_false:true:0':s3_0(
a),
gen_false:true:0':s3_0(
+(
2,
*(
2,
n5_0)))) →
*4_0, rt ∈ Ω(n5
0)
Induction Base:
plus(gen_false:true:0':s3_0(a), gen_false:true:0':s3_0(+(2, *(2, 0))))
Induction Step:
plus(gen_false:true:0':s3_0(a), gen_false:true:0':s3_0(+(2, *(2, +(n5_0, 1))))) →RΩ(1)
s(plus(s(gen_false:true:0':s3_0(a)), gen_false:true:0':s3_0(+(2, *(2, n5_0))))) →IH
s(*4_0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
Innermost TRS:
Rules:
double(
x) →
permute(
x,
x,
a)
permute(
x,
y,
a) →
permute(
isZero(
x),
x,
b)
permute(
false,
x,
b) →
permute(
ack(
x,
x),
p(
x),
c)
permute(
true,
x,
b) →
0'permute(
y,
x,
c) →
s(
s(
permute(
x,
y,
a)))
p(
0') →
0'p(
s(
x)) →
xack(
0',
x) →
plus(
x,
s(
0'))
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
ack(
s(
x),
y))
plus(
0',
y) →
yplus(
s(
x),
y) →
plus(
x,
s(
y))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
x,
s(
0')) →
s(
x)
plus(
x,
0') →
xisZero(
0') →
trueisZero(
s(
x)) →
falseTypes:
double :: false:true:0':s → false:true:0':s
permute :: false:true:0':s → false:true:0':s → a:b:c → false:true:0':s
a :: a:b:c
isZero :: false:true:0':s → false:true:0':s
b :: a:b:c
false :: false:true:0':s
ack :: false:true:0':s → false:true:0':s → false:true:0':s
p :: false:true:0':s → false:true:0':s
c :: a:b:c
true :: false:true:0':s
0' :: false:true:0':s
s :: false:true:0':s → false:true:0':s
plus :: false:true:0':s → false:true:0':s → false:true:0':s
hole_false:true:0':s1_0 :: false:true:0':s
hole_a:b:c2_0 :: a:b:c
gen_false:true:0':s3_0 :: Nat → false:true:0':s
Lemmas:
plus(gen_false:true:0':s3_0(a), gen_false:true:0':s3_0(+(2, *(2, n5_0)))) → *4_0, rt ∈ Ω(n50)
Generator Equations:
gen_false:true:0':s3_0(0) ⇔ true
gen_false:true:0':s3_0(+(x, 1)) ⇔ s(gen_false:true:0':s3_0(x))
The following defined symbols remain to be analysed:
ack, permute
They will be analysed ascendingly in the following order:
ack < permute
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
ack(
gen_false:true:0':s3_0(
1),
gen_false:true:0':s3_0(
+(
1,
n2884_0))) →
*4_0, rt ∈ Ω(n2884
0)
Induction Base:
ack(gen_false:true:0':s3_0(1), gen_false:true:0':s3_0(+(1, 0)))
Induction Step:
ack(gen_false:true:0':s3_0(1), gen_false:true:0':s3_0(+(1, +(n2884_0, 1)))) →RΩ(1)
ack(gen_false:true:0':s3_0(0), ack(s(gen_false:true:0':s3_0(0)), gen_false:true:0':s3_0(+(1, n2884_0)))) →IH
ack(gen_false:true:0':s3_0(0), *4_0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
Innermost TRS:
Rules:
double(
x) →
permute(
x,
x,
a)
permute(
x,
y,
a) →
permute(
isZero(
x),
x,
b)
permute(
false,
x,
b) →
permute(
ack(
x,
x),
p(
x),
c)
permute(
true,
x,
b) →
0'permute(
y,
x,
c) →
s(
s(
permute(
x,
y,
a)))
p(
0') →
0'p(
s(
x)) →
xack(
0',
x) →
plus(
x,
s(
0'))
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
ack(
s(
x),
y))
plus(
0',
y) →
yplus(
s(
x),
y) →
plus(
x,
s(
y))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
x,
s(
0')) →
s(
x)
plus(
x,
0') →
xisZero(
0') →
trueisZero(
s(
x)) →
falseTypes:
double :: false:true:0':s → false:true:0':s
permute :: false:true:0':s → false:true:0':s → a:b:c → false:true:0':s
a :: a:b:c
isZero :: false:true:0':s → false:true:0':s
b :: a:b:c
false :: false:true:0':s
ack :: false:true:0':s → false:true:0':s → false:true:0':s
p :: false:true:0':s → false:true:0':s
c :: a:b:c
true :: false:true:0':s
0' :: false:true:0':s
s :: false:true:0':s → false:true:0':s
plus :: false:true:0':s → false:true:0':s → false:true:0':s
hole_false:true:0':s1_0 :: false:true:0':s
hole_a:b:c2_0 :: a:b:c
gen_false:true:0':s3_0 :: Nat → false:true:0':s
Lemmas:
plus(gen_false:true:0':s3_0(a), gen_false:true:0':s3_0(+(2, *(2, n5_0)))) → *4_0, rt ∈ Ω(n50)
ack(gen_false:true:0':s3_0(1), gen_false:true:0':s3_0(+(1, n2884_0))) → *4_0, rt ∈ Ω(n28840)
Generator Equations:
gen_false:true:0':s3_0(0) ⇔ true
gen_false:true:0':s3_0(+(x, 1)) ⇔ s(gen_false:true:0':s3_0(x))
The following defined symbols remain to be analysed:
permute
(13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol permute.
(14) Obligation:
Innermost TRS:
Rules:
double(
x) →
permute(
x,
x,
a)
permute(
x,
y,
a) →
permute(
isZero(
x),
x,
b)
permute(
false,
x,
b) →
permute(
ack(
x,
x),
p(
x),
c)
permute(
true,
x,
b) →
0'permute(
y,
x,
c) →
s(
s(
permute(
x,
y,
a)))
p(
0') →
0'p(
s(
x)) →
xack(
0',
x) →
plus(
x,
s(
0'))
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
ack(
s(
x),
y))
plus(
0',
y) →
yplus(
s(
x),
y) →
plus(
x,
s(
y))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
x,
s(
0')) →
s(
x)
plus(
x,
0') →
xisZero(
0') →
trueisZero(
s(
x)) →
falseTypes:
double :: false:true:0':s → false:true:0':s
permute :: false:true:0':s → false:true:0':s → a:b:c → false:true:0':s
a :: a:b:c
isZero :: false:true:0':s → false:true:0':s
b :: a:b:c
false :: false:true:0':s
ack :: false:true:0':s → false:true:0':s → false:true:0':s
p :: false:true:0':s → false:true:0':s
c :: a:b:c
true :: false:true:0':s
0' :: false:true:0':s
s :: false:true:0':s → false:true:0':s
plus :: false:true:0':s → false:true:0':s → false:true:0':s
hole_false:true:0':s1_0 :: false:true:0':s
hole_a:b:c2_0 :: a:b:c
gen_false:true:0':s3_0 :: Nat → false:true:0':s
Lemmas:
plus(gen_false:true:0':s3_0(a), gen_false:true:0':s3_0(+(2, *(2, n5_0)))) → *4_0, rt ∈ Ω(n50)
ack(gen_false:true:0':s3_0(1), gen_false:true:0':s3_0(+(1, n2884_0))) → *4_0, rt ∈ Ω(n28840)
Generator Equations:
gen_false:true:0':s3_0(0) ⇔ true
gen_false:true:0':s3_0(+(x, 1)) ⇔ s(gen_false:true:0':s3_0(x))
No more defined symbols left to analyse.
(15) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_false:true:0':s3_0(a), gen_false:true:0':s3_0(+(2, *(2, n5_0)))) → *4_0, rt ∈ Ω(n50)
(16) BOUNDS(n^1, INF)
(17) Obligation:
Innermost TRS:
Rules:
double(
x) →
permute(
x,
x,
a)
permute(
x,
y,
a) →
permute(
isZero(
x),
x,
b)
permute(
false,
x,
b) →
permute(
ack(
x,
x),
p(
x),
c)
permute(
true,
x,
b) →
0'permute(
y,
x,
c) →
s(
s(
permute(
x,
y,
a)))
p(
0') →
0'p(
s(
x)) →
xack(
0',
x) →
plus(
x,
s(
0'))
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
ack(
s(
x),
y))
plus(
0',
y) →
yplus(
s(
x),
y) →
plus(
x,
s(
y))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
x,
s(
0')) →
s(
x)
plus(
x,
0') →
xisZero(
0') →
trueisZero(
s(
x)) →
falseTypes:
double :: false:true:0':s → false:true:0':s
permute :: false:true:0':s → false:true:0':s → a:b:c → false:true:0':s
a :: a:b:c
isZero :: false:true:0':s → false:true:0':s
b :: a:b:c
false :: false:true:0':s
ack :: false:true:0':s → false:true:0':s → false:true:0':s
p :: false:true:0':s → false:true:0':s
c :: a:b:c
true :: false:true:0':s
0' :: false:true:0':s
s :: false:true:0':s → false:true:0':s
plus :: false:true:0':s → false:true:0':s → false:true:0':s
hole_false:true:0':s1_0 :: false:true:0':s
hole_a:b:c2_0 :: a:b:c
gen_false:true:0':s3_0 :: Nat → false:true:0':s
Lemmas:
plus(gen_false:true:0':s3_0(a), gen_false:true:0':s3_0(+(2, *(2, n5_0)))) → *4_0, rt ∈ Ω(n50)
ack(gen_false:true:0':s3_0(1), gen_false:true:0':s3_0(+(1, n2884_0))) → *4_0, rt ∈ Ω(n28840)
Generator Equations:
gen_false:true:0':s3_0(0) ⇔ true
gen_false:true:0':s3_0(+(x, 1)) ⇔ s(gen_false:true:0':s3_0(x))
No more defined symbols left to analyse.
(18) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_false:true:0':s3_0(a), gen_false:true:0':s3_0(+(2, *(2, n5_0)))) → *4_0, rt ∈ Ω(n50)
(19) BOUNDS(n^1, INF)
(20) Obligation:
Innermost TRS:
Rules:
double(
x) →
permute(
x,
x,
a)
permute(
x,
y,
a) →
permute(
isZero(
x),
x,
b)
permute(
false,
x,
b) →
permute(
ack(
x,
x),
p(
x),
c)
permute(
true,
x,
b) →
0'permute(
y,
x,
c) →
s(
s(
permute(
x,
y,
a)))
p(
0') →
0'p(
s(
x)) →
xack(
0',
x) →
plus(
x,
s(
0'))
ack(
s(
x),
0') →
ack(
x,
s(
0'))
ack(
s(
x),
s(
y)) →
ack(
x,
ack(
s(
x),
y))
plus(
0',
y) →
yplus(
s(
x),
y) →
plus(
x,
s(
y))
plus(
x,
s(
s(
y))) →
s(
plus(
s(
x),
y))
plus(
x,
s(
0')) →
s(
x)
plus(
x,
0') →
xisZero(
0') →
trueisZero(
s(
x)) →
falseTypes:
double :: false:true:0':s → false:true:0':s
permute :: false:true:0':s → false:true:0':s → a:b:c → false:true:0':s
a :: a:b:c
isZero :: false:true:0':s → false:true:0':s
b :: a:b:c
false :: false:true:0':s
ack :: false:true:0':s → false:true:0':s → false:true:0':s
p :: false:true:0':s → false:true:0':s
c :: a:b:c
true :: false:true:0':s
0' :: false:true:0':s
s :: false:true:0':s → false:true:0':s
plus :: false:true:0':s → false:true:0':s → false:true:0':s
hole_false:true:0':s1_0 :: false:true:0':s
hole_a:b:c2_0 :: a:b:c
gen_false:true:0':s3_0 :: Nat → false:true:0':s
Lemmas:
plus(gen_false:true:0':s3_0(a), gen_false:true:0':s3_0(+(2, *(2, n5_0)))) → *4_0, rt ∈ Ω(n50)
Generator Equations:
gen_false:true:0':s3_0(0) ⇔ true
gen_false:true:0':s3_0(+(x, 1)) ⇔ s(gen_false:true:0':s3_0(x))
No more defined symbols left to analyse.
(21) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_false:true:0':s3_0(a), gen_false:true:0':s3_0(+(2, *(2, n5_0)))) → *4_0, rt ∈ Ω(n50)
(22) BOUNDS(n^1, INF)