(0) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, n^1).
The TRS R consists of the following rules:
norm(nil) → 0
norm(g(x, y)) → s(norm(x))
f(x, nil) → g(nil, x)
f(x, g(y, z)) → g(f(x, y), z)
rem(nil, y) → nil
rem(g(x, y), 0) → g(x, y)
rem(g(x, y), s(z)) → rem(x, z)
Rewrite Strategy: INNERMOST
(1) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)
A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 1.
The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3]
transitions:
nil0() → 0
00() → 0
g0(0, 0) → 0
s0(0) → 0
norm0(0) → 1
f0(0, 0) → 2
rem0(0, 0) → 3
01() → 1
norm1(0) → 4
s1(4) → 1
nil1() → 5
g1(5, 0) → 2
f1(0, 0) → 6
g1(6, 0) → 2
nil1() → 3
g1(0, 0) → 3
rem1(0, 0) → 3
01() → 4
s1(4) → 4
g1(5, 0) → 6
g1(6, 0) → 6
(2) BOUNDS(1, n^1)
(3) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
norm(nil) → 0
norm(g(z0, z1)) → s(norm(z0))
f(z0, nil) → g(nil, z0)
f(z0, g(z1, z2)) → g(f(z0, z1), z2)
rem(nil, z0) → nil
rem(g(z0, z1), 0) → g(z0, z1)
rem(g(z0, z1), s(z2)) → rem(z0, z2)
Tuples:
NORM(nil) → c
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, nil) → c2
F(z0, g(z1, z2)) → c3(F(z0, z1))
REM(nil, z0) → c4
REM(g(z0, z1), 0) → c5
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
S tuples:
NORM(nil) → c
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, nil) → c2
F(z0, g(z1, z2)) → c3(F(z0, z1))
REM(nil, z0) → c4
REM(g(z0, z1), 0) → c5
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
K tuples:none
Defined Rule Symbols:
norm, f, rem
Defined Pair Symbols:
NORM, F, REM
Compound Symbols:
c, c1, c2, c3, c4, c5, c6
(5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 4 trailing nodes:
NORM(nil) → c
F(z0, nil) → c2
REM(g(z0, z1), 0) → c5
REM(nil, z0) → c4
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
norm(nil) → 0
norm(g(z0, z1)) → s(norm(z0))
f(z0, nil) → g(nil, z0)
f(z0, g(z1, z2)) → g(f(z0, z1), z2)
rem(nil, z0) → nil
rem(g(z0, z1), 0) → g(z0, z1)
rem(g(z0, z1), s(z2)) → rem(z0, z2)
Tuples:
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
S tuples:
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
K tuples:none
Defined Rule Symbols:
norm, f, rem
Defined Pair Symbols:
NORM, F, REM
Compound Symbols:
c1, c3, c6
(7) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
norm(nil) → 0
norm(g(z0, z1)) → s(norm(z0))
f(z0, nil) → g(nil, z0)
f(z0, g(z1, z2)) → g(f(z0, z1), z2)
rem(nil, z0) → nil
rem(g(z0, z1), 0) → g(z0, z1)
rem(g(z0, z1), s(z2)) → rem(z0, z2)
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
S tuples:
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
K tuples:none
Defined Rule Symbols:none
Defined Pair Symbols:
NORM, F, REM
Compound Symbols:
c1, c3, c6
(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
We considered the (Usable) Rules:none
And the Tuples:
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(F(x1, x2)) = 0
POL(NORM(x1)) = 0
POL(REM(x1, x2)) = x2
POL(c1(x1)) = x1
POL(c3(x1)) = x1
POL(c6(x1)) = x1
POL(g(x1, x2)) = 0
POL(s(x1)) = [1] + x1
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
S tuples:
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
K tuples:
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
Defined Rule Symbols:none
Defined Pair Symbols:
NORM, F, REM
Compound Symbols:
c1, c3, c6
(11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(F(x1, x2)) = [2]x2
POL(NORM(x1)) = x1
POL(REM(x1, x2)) = 0
POL(c1(x1)) = x1
POL(c3(x1)) = x1
POL(c6(x1)) = x1
POL(g(x1, x2)) = [1] + x1
POL(s(x1)) = 0
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
S tuples:none
K tuples:
REM(g(z0, z1), s(z2)) → c6(REM(z0, z2))
NORM(g(z0, z1)) → c1(NORM(z0))
F(z0, g(z1, z2)) → c3(F(z0, z1))
Defined Rule Symbols:none
Defined Pair Symbols:
NORM, F, REM
Compound Symbols:
c1, c3, c6
(13) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(14) BOUNDS(1, 1)