(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
add0(S(x), x2) → +(S(0), add0(x2, x))
add0(0, x2) → x2
The (relative) TRS S consists of the following rules:
+(x, S(0)) → S(x)
+(S(0), y) → S(y)
Rewrite Strategy: INNERMOST
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
add0(S(x), S(x11_1)) →+ +(S(0), +(S(0), add0(x, x11_1)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1,1].
The pumping substitution is [x / S(x), x11_1 / S(x11_1)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
add0(S(x), x2) → +'(S(0'), add0(x2, x))
add0(0', x2) → x2
The (relative) TRS S consists of the following rules:
+'(x, S(0')) → S(x)
+'(S(0'), y) → S(y)
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
add0(S(x), x2) → +'(S(0'), add0(x2, x))
add0(0', x2) → x2
+'(x, S(0')) → S(x)
+'(S(0'), y) → S(y)
Types:
add0 :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
add0
(8) Obligation:
Innermost TRS:
Rules:
add0(
S(
x),
x2) →
+'(
S(
0'),
add0(
x2,
x))
add0(
0',
x2) →
x2+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
add0 :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
The following defined symbols remain to be analysed:
add0
(9) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol add0.
(10) Obligation:
Innermost TRS:
Rules:
add0(
S(
x),
x2) →
+'(
S(
0'),
add0(
x2,
x))
add0(
0',
x2) →
x2+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
add0 :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
No more defined symbols left to analyse.