Runtime Complexity TRS:
The TRS R consists of the following rules:
top(sent(x)) → top(check(rest(x)))
rest(nil) → sent(nil)
rest(cons(x, y)) → sent(y)
check(sent(x)) → sent(check(x))
check(rest(x)) → rest(check(x))
check(cons(x, y)) → cons(check(x), y)
check(cons(x, y)) → cons(x, check(y))
check(cons(x, y)) → cons(x, y)
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
top'(sent'(x)) → top'(check'(rest'(x)))
rest'(nil') → sent'(nil')
rest'(cons'(x, y)) → sent'(y)
check'(sent'(x)) → sent'(check'(x))
check'(rest'(x)) → rest'(check'(x))
check'(cons'(x, y)) → cons'(check'(x), y)
check'(cons'(x, y)) → cons'(x, check'(y))
check'(cons'(x, y)) → cons'(x, y)
Infered types.
Rules:
top'(sent'(x)) → top'(check'(rest'(x)))
rest'(nil') → sent'(nil')
rest'(cons'(x, y)) → sent'(y)
check'(sent'(x)) → sent'(check'(x))
check'(rest'(x)) → rest'(check'(x))
check'(cons'(x, y)) → cons'(check'(x), y)
check'(cons'(x, y)) → cons'(x, check'(y))
check'(cons'(x, y)) → cons'(x, y)
Types:
top' :: sent':nil':cons' → top'
sent' :: sent':nil':cons' → sent':nil':cons'
check' :: sent':nil':cons' → sent':nil':cons'
rest' :: sent':nil':cons' → sent':nil':cons'
nil' :: sent':nil':cons'
cons' :: sent':nil':cons' → sent':nil':cons' → sent':nil':cons'
_hole_top'1 :: top'
_hole_sent':nil':cons'2 :: sent':nil':cons'
_gen_sent':nil':cons'3 :: Nat → sent':nil':cons'
Heuristically decided to analyse the following defined symbols:
top', check'
They will be analysed ascendingly in the following order:
check' < top'
Rules:
top'(sent'(x)) → top'(check'(rest'(x)))
rest'(nil') → sent'(nil')
rest'(cons'(x, y)) → sent'(y)
check'(sent'(x)) → sent'(check'(x))
check'(rest'(x)) → rest'(check'(x))
check'(cons'(x, y)) → cons'(check'(x), y)
check'(cons'(x, y)) → cons'(x, check'(y))
check'(cons'(x, y)) → cons'(x, y)
Types:
top' :: sent':nil':cons' → top'
sent' :: sent':nil':cons' → sent':nil':cons'
check' :: sent':nil':cons' → sent':nil':cons'
rest' :: sent':nil':cons' → sent':nil':cons'
nil' :: sent':nil':cons'
cons' :: sent':nil':cons' → sent':nil':cons' → sent':nil':cons'
_hole_top'1 :: top'
_hole_sent':nil':cons'2 :: sent':nil':cons'
_gen_sent':nil':cons'3 :: Nat → sent':nil':cons'
Generator Equations:
_gen_sent':nil':cons'3(0) ⇔ nil'
_gen_sent':nil':cons'3(+(x, 1)) ⇔ sent'(_gen_sent':nil':cons'3(x))
The following defined symbols remain to be analysed:
check', top'
They will be analysed ascendingly in the following order:
check' < top'
Proved the following rewrite lemma:
check'(_gen_sent':nil':cons'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
Induction Base:
check'(_gen_sent':nil':cons'3(+(1, 0)))
Induction Step:
check'(_gen_sent':nil':cons'3(+(1, +(_$n6, 1)))) →RΩ(1)
sent'(check'(_gen_sent':nil':cons'3(+(1, _$n6)))) →IH
sent'(_*4)
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
top'(sent'(x)) → top'(check'(rest'(x)))
rest'(nil') → sent'(nil')
rest'(cons'(x, y)) → sent'(y)
check'(sent'(x)) → sent'(check'(x))
check'(rest'(x)) → rest'(check'(x))
check'(cons'(x, y)) → cons'(check'(x), y)
check'(cons'(x, y)) → cons'(x, check'(y))
check'(cons'(x, y)) → cons'(x, y)
Types:
top' :: sent':nil':cons' → top'
sent' :: sent':nil':cons' → sent':nil':cons'
check' :: sent':nil':cons' → sent':nil':cons'
rest' :: sent':nil':cons' → sent':nil':cons'
nil' :: sent':nil':cons'
cons' :: sent':nil':cons' → sent':nil':cons' → sent':nil':cons'
_hole_top'1 :: top'
_hole_sent':nil':cons'2 :: sent':nil':cons'
_gen_sent':nil':cons'3 :: Nat → sent':nil':cons'
Lemmas:
check'(_gen_sent':nil':cons'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
Generator Equations:
_gen_sent':nil':cons'3(0) ⇔ nil'
_gen_sent':nil':cons'3(+(x, 1)) ⇔ sent'(_gen_sent':nil':cons'3(x))
The following defined symbols remain to be analysed:
top'
Could not prove a rewrite lemma for the defined symbol top'.
Rules:
top'(sent'(x)) → top'(check'(rest'(x)))
rest'(nil') → sent'(nil')
rest'(cons'(x, y)) → sent'(y)
check'(sent'(x)) → sent'(check'(x))
check'(rest'(x)) → rest'(check'(x))
check'(cons'(x, y)) → cons'(check'(x), y)
check'(cons'(x, y)) → cons'(x, check'(y))
check'(cons'(x, y)) → cons'(x, y)
Types:
top' :: sent':nil':cons' → top'
sent' :: sent':nil':cons' → sent':nil':cons'
check' :: sent':nil':cons' → sent':nil':cons'
rest' :: sent':nil':cons' → sent':nil':cons'
nil' :: sent':nil':cons'
cons' :: sent':nil':cons' → sent':nil':cons' → sent':nil':cons'
_hole_top'1 :: top'
_hole_sent':nil':cons'2 :: sent':nil':cons'
_gen_sent':nil':cons'3 :: Nat → sent':nil':cons'
Lemmas:
check'(_gen_sent':nil':cons'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
Generator Equations:
_gen_sent':nil':cons'3(0) ⇔ nil'
_gen_sent':nil':cons'3(+(x, 1)) ⇔ sent'(_gen_sent':nil':cons'3(x))
No more defined symbols left to analyse.
The lowerbound Ω(n) was proven with the following lemma:
check'(_gen_sent':nil':cons'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)