Runtime Complexity TRS:
The TRS R consists of the following rules:
a__and(tt, X) → mark(X)
a__plus(N, 0) → mark(N)
a__plus(N, s(M)) → s(a__plus(mark(N), mark(M)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(plus(X1, X2)) → a__plus(mark(X1), mark(X2))
mark(tt) → tt
mark(0) → 0
mark(s(X)) → s(mark(X))
a__and(X1, X2) → and(X1, X2)
a__plus(X1, X2) → plus(X1, X2)
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
a__and'(tt', X) → mark'(X)
a__plus'(N, 0') → mark'(N)
a__plus'(N, s'(M)) → s'(a__plus'(mark'(N), mark'(M)))
mark'(and'(X1, X2)) → a__and'(mark'(X1), X2)
mark'(plus'(X1, X2)) → a__plus'(mark'(X1), mark'(X2))
mark'(tt') → tt'
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__and'(X1, X2) → and'(X1, X2)
a__plus'(X1, X2) → plus'(X1, X2)
Infered types.
Rules:
a__and'(tt', X) → mark'(X)
a__plus'(N, 0') → mark'(N)
a__plus'(N, s'(M)) → s'(a__plus'(mark'(N), mark'(M)))
mark'(and'(X1, X2)) → a__and'(mark'(X1), X2)
mark'(plus'(X1, X2)) → a__plus'(mark'(X1), mark'(X2))
mark'(tt') → tt'
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__and'(X1, X2) → and'(X1, X2)
a__plus'(X1, X2) → plus'(X1, X2)
Types:
a__and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
tt' :: tt':0':s':and':plus'
mark' :: tt':0':s':and':plus' → tt':0':s':and':plus'
a__plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
0' :: tt':0':s':and':plus'
s' :: tt':0':s':and':plus' → tt':0':s':and':plus'
and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
_hole_tt':0':s':and':plus'1 :: tt':0':s':and':plus'
_gen_tt':0':s':and':plus'2 :: Nat → tt':0':s':and':plus'
Heuristically decided to analyse the following defined symbols:
mark', a__plus'
They will be analysed ascendingly in the following order:
mark' = a__plus'
Rules:
a__and'(tt', X) → mark'(X)
a__plus'(N, 0') → mark'(N)
a__plus'(N, s'(M)) → s'(a__plus'(mark'(N), mark'(M)))
mark'(and'(X1, X2)) → a__and'(mark'(X1), X2)
mark'(plus'(X1, X2)) → a__plus'(mark'(X1), mark'(X2))
mark'(tt') → tt'
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__and'(X1, X2) → and'(X1, X2)
a__plus'(X1, X2) → plus'(X1, X2)
Types:
a__and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
tt' :: tt':0':s':and':plus'
mark' :: tt':0':s':and':plus' → tt':0':s':and':plus'
a__plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
0' :: tt':0':s':and':plus'
s' :: tt':0':s':and':plus' → tt':0':s':and':plus'
and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
_hole_tt':0':s':and':plus'1 :: tt':0':s':and':plus'
_gen_tt':0':s':and':plus'2 :: Nat → tt':0':s':and':plus'
Generator Equations:
_gen_tt':0':s':and':plus'2(0) ⇔ tt'
_gen_tt':0':s':and':plus'2(+(x, 1)) ⇔ s'(_gen_tt':0':s':and':plus'2(x))
The following defined symbols remain to be analysed:
a__plus', mark'
They will be analysed ascendingly in the following order:
mark' = a__plus'
Could not prove a rewrite lemma for the defined symbol a__plus'.
Rules:
a__and'(tt', X) → mark'(X)
a__plus'(N, 0') → mark'(N)
a__plus'(N, s'(M)) → s'(a__plus'(mark'(N), mark'(M)))
mark'(and'(X1, X2)) → a__and'(mark'(X1), X2)
mark'(plus'(X1, X2)) → a__plus'(mark'(X1), mark'(X2))
mark'(tt') → tt'
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__and'(X1, X2) → and'(X1, X2)
a__plus'(X1, X2) → plus'(X1, X2)
Types:
a__and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
tt' :: tt':0':s':and':plus'
mark' :: tt':0':s':and':plus' → tt':0':s':and':plus'
a__plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
0' :: tt':0':s':and':plus'
s' :: tt':0':s':and':plus' → tt':0':s':and':plus'
and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
_hole_tt':0':s':and':plus'1 :: tt':0':s':and':plus'
_gen_tt':0':s':and':plus'2 :: Nat → tt':0':s':and':plus'
Generator Equations:
_gen_tt':0':s':and':plus'2(0) ⇔ tt'
_gen_tt':0':s':and':plus'2(+(x, 1)) ⇔ s'(_gen_tt':0':s':and':plus'2(x))
The following defined symbols remain to be analysed:
mark'
They will be analysed ascendingly in the following order:
mark' = a__plus'
Proved the following rewrite lemma:
mark'(_gen_tt':0':s':and':plus'2(_n15025)) → _gen_tt':0':s':and':plus'2(_n15025), rt ∈ Ω(1 + n15025)
Induction Base:
mark'(_gen_tt':0':s':and':plus'2(0)) →RΩ(1)
tt'
Induction Step:
mark'(_gen_tt':0':s':and':plus'2(+(_$n15026, 1))) →RΩ(1)
s'(mark'(_gen_tt':0':s':and':plus'2(_$n15026))) →IH
s'(_gen_tt':0':s':and':plus'2(_$n15026))
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
a__and'(tt', X) → mark'(X)
a__plus'(N, 0') → mark'(N)
a__plus'(N, s'(M)) → s'(a__plus'(mark'(N), mark'(M)))
mark'(and'(X1, X2)) → a__and'(mark'(X1), X2)
mark'(plus'(X1, X2)) → a__plus'(mark'(X1), mark'(X2))
mark'(tt') → tt'
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__and'(X1, X2) → and'(X1, X2)
a__plus'(X1, X2) → plus'(X1, X2)
Types:
a__and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
tt' :: tt':0':s':and':plus'
mark' :: tt':0':s':and':plus' → tt':0':s':and':plus'
a__plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
0' :: tt':0':s':and':plus'
s' :: tt':0':s':and':plus' → tt':0':s':and':plus'
and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
_hole_tt':0':s':and':plus'1 :: tt':0':s':and':plus'
_gen_tt':0':s':and':plus'2 :: Nat → tt':0':s':and':plus'
Lemmas:
mark'(_gen_tt':0':s':and':plus'2(_n15025)) → _gen_tt':0':s':and':plus'2(_n15025), rt ∈ Ω(1 + n15025)
Generator Equations:
_gen_tt':0':s':and':plus'2(0) ⇔ tt'
_gen_tt':0':s':and':plus'2(+(x, 1)) ⇔ s'(_gen_tt':0':s':and':plus'2(x))
The following defined symbols remain to be analysed:
a__plus'
They will be analysed ascendingly in the following order:
mark' = a__plus'
Proved the following rewrite lemma:
a__plus'(_gen_tt':0':s':and':plus'2(a), _gen_tt':0':s':and':plus'2(+(1, _n15548))) → _*3, rt ∈ Ω(a16056·n15548 + n15548 + n155482)
Induction Base:
a__plus'(_gen_tt':0':s':and':plus'2(a), _gen_tt':0':s':and':plus'2(+(1, 0)))
Induction Step:
a__plus'(_gen_tt':0':s':and':plus'2(_a16056), _gen_tt':0':s':and':plus'2(+(1, +(_$n15549, 1)))) →RΩ(1)
s'(a__plus'(mark'(_gen_tt':0':s':and':plus'2(_a16056)), mark'(_gen_tt':0':s':and':plus'2(+(1, _$n15549))))) →LΩ(1 + a16056)
s'(a__plus'(_gen_tt':0':s':and':plus'2(_a16056), mark'(_gen_tt':0':s':and':plus'2(+(1, _$n15549))))) →LΩ(2 + $n15549)
s'(a__plus'(_gen_tt':0':s':and':plus'2(_a16056), _gen_tt':0':s':and':plus'2(+(1, _$n15549)))) →IH
s'(_*3)
We have rt ∈ Ω(n2) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n2).
Rules:
a__and'(tt', X) → mark'(X)
a__plus'(N, 0') → mark'(N)
a__plus'(N, s'(M)) → s'(a__plus'(mark'(N), mark'(M)))
mark'(and'(X1, X2)) → a__and'(mark'(X1), X2)
mark'(plus'(X1, X2)) → a__plus'(mark'(X1), mark'(X2))
mark'(tt') → tt'
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__and'(X1, X2) → and'(X1, X2)
a__plus'(X1, X2) → plus'(X1, X2)
Types:
a__and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
tt' :: tt':0':s':and':plus'
mark' :: tt':0':s':and':plus' → tt':0':s':and':plus'
a__plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
0' :: tt':0':s':and':plus'
s' :: tt':0':s':and':plus' → tt':0':s':and':plus'
and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
_hole_tt':0':s':and':plus'1 :: tt':0':s':and':plus'
_gen_tt':0':s':and':plus'2 :: Nat → tt':0':s':and':plus'
Lemmas:
mark'(_gen_tt':0':s':and':plus'2(_n15025)) → _gen_tt':0':s':and':plus'2(_n15025), rt ∈ Ω(1 + n15025)
a__plus'(_gen_tt':0':s':and':plus'2(a), _gen_tt':0':s':and':plus'2(+(1, _n15548))) → _*3, rt ∈ Ω(a16056·n15548 + n15548 + n155482)
Generator Equations:
_gen_tt':0':s':and':plus'2(0) ⇔ tt'
_gen_tt':0':s':and':plus'2(+(x, 1)) ⇔ s'(_gen_tt':0':s':and':plus'2(x))
The following defined symbols remain to be analysed:
mark'
They will be analysed ascendingly in the following order:
mark' = a__plus'
Proved the following rewrite lemma:
mark'(_gen_tt':0':s':and':plus'2(_n18169)) → _gen_tt':0':s':and':plus'2(_n18169), rt ∈ Ω(1 + n18169)
Induction Base:
mark'(_gen_tt':0':s':and':plus'2(0)) →RΩ(1)
tt'
Induction Step:
mark'(_gen_tt':0':s':and':plus'2(+(_$n18170, 1))) →RΩ(1)
s'(mark'(_gen_tt':0':s':and':plus'2(_$n18170))) →IH
s'(_gen_tt':0':s':and':plus'2(_$n18170))
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
a__and'(tt', X) → mark'(X)
a__plus'(N, 0') → mark'(N)
a__plus'(N, s'(M)) → s'(a__plus'(mark'(N), mark'(M)))
mark'(and'(X1, X2)) → a__and'(mark'(X1), X2)
mark'(plus'(X1, X2)) → a__plus'(mark'(X1), mark'(X2))
mark'(tt') → tt'
mark'(0') → 0'
mark'(s'(X)) → s'(mark'(X))
a__and'(X1, X2) → and'(X1, X2)
a__plus'(X1, X2) → plus'(X1, X2)
Types:
a__and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
tt' :: tt':0':s':and':plus'
mark' :: tt':0':s':and':plus' → tt':0':s':and':plus'
a__plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
0' :: tt':0':s':and':plus'
s' :: tt':0':s':and':plus' → tt':0':s':and':plus'
and' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
plus' :: tt':0':s':and':plus' → tt':0':s':and':plus' → tt':0':s':and':plus'
_hole_tt':0':s':and':plus'1 :: tt':0':s':and':plus'
_gen_tt':0':s':and':plus'2 :: Nat → tt':0':s':and':plus'
Lemmas:
mark'(_gen_tt':0':s':and':plus'2(_n18169)) → _gen_tt':0':s':and':plus'2(_n18169), rt ∈ Ω(1 + n18169)
a__plus'(_gen_tt':0':s':and':plus'2(a), _gen_tt':0':s':and':plus'2(+(1, _n15548))) → _*3, rt ∈ Ω(a16056·n15548 + n15548 + n155482)
Generator Equations:
_gen_tt':0':s':and':plus'2(0) ⇔ tt'
_gen_tt':0':s':and':plus'2(+(x, 1)) ⇔ s'(_gen_tt':0':s':and':plus'2(x))
No more defined symbols left to analyse.
The lowerbound Ω(n2) was proven with the following lemma:
a__plus'(_gen_tt':0':s':and':plus'2(a), _gen_tt':0':s':and':plus'2(+(1, _n15548))) → _*3, rt ∈ Ω(a16056·n15548 + n15548 + n155482)