Runtime Complexity TRS:
The TRS R consists of the following rules:
f(a, g(y)) → g(g(y))
f(g(x), a) → f(x, g(a))
f(g(x), g(y)) → h(g(y), x, g(y))
h(g(x), y, z) → f(y, h(x, y, z))
h(a, y, z) → z
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
f'(a', g'(y)) → g'(g'(y))
f'(g'(x), a') → f'(x, g'(a'))
f'(g'(x), g'(y)) → h'(g'(y), x, g'(y))
h'(g'(x), y, z) → f'(y, h'(x, y, z))
h'(a', y, z) → z
Infered types.
Rules:
f'(a', g'(y)) → g'(g'(y))
f'(g'(x), a') → f'(x, g'(a'))
f'(g'(x), g'(y)) → h'(g'(y), x, g'(y))
h'(g'(x), y, z) → f'(y, h'(x, y, z))
h'(a', y, z) → z
Types:
f' :: a':g' → a':g' → a':g'
a' :: a':g'
g' :: a':g' → a':g'
h' :: a':g' → a':g' → a':g' → a':g'
_hole_a':g'1 :: a':g'
_gen_a':g'2 :: Nat → a':g'
Heuristically decided to analyse the following defined symbols:
f', h'
They will be analysed ascendingly in the following order:
f' = h'
Rules:
f'(a', g'(y)) → g'(g'(y))
f'(g'(x), a') → f'(x, g'(a'))
f'(g'(x), g'(y)) → h'(g'(y), x, g'(y))
h'(g'(x), y, z) → f'(y, h'(x, y, z))
h'(a', y, z) → z
Types:
f' :: a':g' → a':g' → a':g'
a' :: a':g'
g' :: a':g' → a':g'
h' :: a':g' → a':g' → a':g' → a':g'
_hole_a':g'1 :: a':g'
_gen_a':g'2 :: Nat → a':g'
Generator Equations:
_gen_a':g'2(0) ⇔ a'
_gen_a':g'2(+(x, 1)) ⇔ g'(_gen_a':g'2(x))
The following defined symbols remain to be analysed:
h', f'
They will be analysed ascendingly in the following order:
f' = h'
Proved the following rewrite lemma:
h'(_gen_a':g'2(_n4), _gen_a':g'2(0), _gen_a':g'2(1)) → _gen_a':g'2(+(1, _n4)), rt ∈ Ω(1 + n4)
Induction Base:
h'(_gen_a':g'2(0), _gen_a':g'2(0), _gen_a':g'2(1)) →RΩ(1)
_gen_a':g'2(1)
Induction Step:
h'(_gen_a':g'2(+(_$n5, 1)), _gen_a':g'2(0), _gen_a':g'2(1)) →RΩ(1)
f'(_gen_a':g'2(0), h'(_gen_a':g'2(_$n5), _gen_a':g'2(0), _gen_a':g'2(1))) →IH
f'(_gen_a':g'2(0), _gen_a':g'2(+(1, _$n5))) →RΩ(1)
g'(g'(_gen_a':g'2(_$n5)))
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
f'(a', g'(y)) → g'(g'(y))
f'(g'(x), a') → f'(x, g'(a'))
f'(g'(x), g'(y)) → h'(g'(y), x, g'(y))
h'(g'(x), y, z) → f'(y, h'(x, y, z))
h'(a', y, z) → z
Types:
f' :: a':g' → a':g' → a':g'
a' :: a':g'
g' :: a':g' → a':g'
h' :: a':g' → a':g' → a':g' → a':g'
_hole_a':g'1 :: a':g'
_gen_a':g'2 :: Nat → a':g'
Lemmas:
h'(_gen_a':g'2(_n4), _gen_a':g'2(0), _gen_a':g'2(1)) → _gen_a':g'2(+(1, _n4)), rt ∈ Ω(1 + n4)
Generator Equations:
_gen_a':g'2(0) ⇔ a'
_gen_a':g'2(+(x, 1)) ⇔ g'(_gen_a':g'2(x))
The following defined symbols remain to be analysed:
f'
They will be analysed ascendingly in the following order:
f' = h'
Could not prove a rewrite lemma for the defined symbol f'.
Rules:
f'(a', g'(y)) → g'(g'(y))
f'(g'(x), a') → f'(x, g'(a'))
f'(g'(x), g'(y)) → h'(g'(y), x, g'(y))
h'(g'(x), y, z) → f'(y, h'(x, y, z))
h'(a', y, z) → z
Types:
f' :: a':g' → a':g' → a':g'
a' :: a':g'
g' :: a':g' → a':g'
h' :: a':g' → a':g' → a':g' → a':g'
_hole_a':g'1 :: a':g'
_gen_a':g'2 :: Nat → a':g'
Lemmas:
h'(_gen_a':g'2(_n4), _gen_a':g'2(0), _gen_a':g'2(1)) → _gen_a':g'2(+(1, _n4)), rt ∈ Ω(1 + n4)
Generator Equations:
_gen_a':g'2(0) ⇔ a'
_gen_a':g'2(+(x, 1)) ⇔ g'(_gen_a':g'2(x))
No more defined symbols left to analyse.
The lowerbound Ω(n) was proven with the following lemma:
h'(_gen_a':g'2(_n4), _gen_a':g'2(0), _gen_a':g'2(1)) → _gen_a':g'2(+(1, _n4)), rt ∈ Ω(1 + n4)