```* Step 1: ToInnermost WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
max(L(x)) -> x
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1} / {0/0,L/1,N/2,s/1}
- Obligation:
runtime complexity wrt. defined symbols {max} and constructors {0,L,N,s}
+ Applied Processor:
ToInnermost
+ Details:
switch to innermost, as the system is overlay and right linear and does not contain weak rules
* Step 2: DependencyPairs WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
max(L(x)) -> x
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1} / {0/0,L/1,N/2,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max} and constructors {0,L,N,s}
+ Applied Processor:
DependencyPairs {dpKind_ = DT}
+ Details:
We add the following dependency tuples:

Strict DPs
max#(L(x)) -> c_1()
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
max#(N(L(0()),L(y))) -> c_3()
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
Weak DPs

and mark the set of starting terms.
* Step 3: UsableRules WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
max#(L(x)) -> c_1()
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
max#(N(L(0()),L(y))) -> c_3()
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
- Weak TRS:
max(L(x)) -> x
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
max#(L(x)) -> c_1()
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
max#(N(L(0()),L(y))) -> c_3()
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
* Step 4: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
max#(L(x)) -> c_1()
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
max#(N(L(0()),L(y))) -> c_3()
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{1,3}
by application of
Pre({1,3}) = {2,4}.
Here rules are labelled as follows:
1: max#(L(x)) -> c_1()
2: max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
3: max#(N(L(0()),L(y))) -> c_3()
4: max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
* Step 5: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
- Weak DPs:
max#(L(x)) -> c_1()
max#(N(L(0()),L(y))) -> c_3()
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
-->_2 max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))):2
-->_1 max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))):2
-->_2 max#(N(L(0()),L(y))) -> c_3():4
-->_1 max#(N(L(0()),L(y))) -> c_3():4
-->_2 max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))):1

2:S:max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
-->_1 max#(N(L(0()),L(y))) -> c_3():4
-->_1 max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))):2

3:W:max#(L(x)) -> c_1()

4:W:max#(N(L(0()),L(y))) -> c_3()

The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
3: max#(L(x)) -> c_1()
4: max#(N(L(0()),L(y))) -> c_3()
* Step 6: DecomposeDG WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
DecomposeDG {onSelection = all below first cut in WDG, onUpper = Just someStrategy, onLower = Nothing}
+ Details:
We decompose the input problem according to the dependency graph into the upper component
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
and a lower component
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
Further, following extension rules are added to the lower component.
max#(N(L(x),N(y,z))) -> max#(N(y,z))
max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z)))))
** Step 6.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 2, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 2, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))

The strictly oriented rules are moved into the weak component.
*** Step 6.a:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
NaturalMI {miDimension = 2, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a matrix interpretation of kind constructor based matrix interpretation (containing no more than 1 non-zero interpretation-entries in the diagonal of the component-wise maxima):
The following argument positions are considered usable:
uargs(c_2) = {1,2}

Following symbols are considered usable:
{max#}
TcT has computed the following interpretation:
p(0) = [1]
[0]
p(L) = [0]
[0]
p(N) = [0 2] x2 + [0]
[0 1]      [1]
p(max) = [1 1] x1 + [3]
[1 2]      [0]
p(s) = [0]
[0]
p(max#) = [2 0] x1 + [0]
[0 3]      [0]
p(c_1) = [0]
[1]
p(c_2) = [1 0] x1 + [1 0] x2 + [0]
[0 0]      [0 0]      [2]
p(c_3) = [0]
[0]
p(c_4) = [0 0] x1 + [0]
[1 0]      [0]

Following rules are strictly oriented:
max#(N(L(x),N(y,z))) = [0 4] z + [4]
[0 3]     [6]
> [0 4] z + [0]
[0 0]     [2]
= c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))

Following rules are (at-least) weakly oriented:

*** Step 6.a:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()

*** Step 6.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
-->_2 max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))):1

The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z)))
*** Step 6.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).

** Step 6.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
- Weak DPs:
max#(N(L(x),N(y,z))) -> max#(N(y,z))
max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z)))))
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))

The strictly oriented rules are moved into the weak component.
*** Step 6.b:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
- Weak DPs:
max#(N(L(x),N(y,z))) -> max#(N(y,z))
max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z)))))
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(c_4) = {1}

Following symbols are considered usable:
{max,max#}
TcT has computed the following interpretation:
p(0) = [5]
p(L) = [1] x1 + [0]
p(N) = [1] x2 + [0]
p(max) = [1] x1 + [0]
p(s) = [1] x1 + [4]
p(max#) = [1] x1 + [1]
p(c_1) = [0]
p(c_2) = [4] x1 + [0]
p(c_3) = [8]
p(c_4) = [1] x1 + [1]

Following rules are strictly oriented:
max#(N(L(s(x)),L(s(y)))) = [1] y + [5]
> [1] y + [2]
= c_4(max#(N(L(x),L(y))))

Following rules are (at-least) weakly oriented:
max#(N(L(x),N(y,z))) =  [1] z + [1]
>= [1] z + [1]
=  max#(N(y,z))

max#(N(L(x),N(y,z))) =  [1] z + [1]
>= [1] z + [1]
=  max#(N(L(x),L(max(N(y,z)))))

max(N(L(x),N(y,z))) =  [1] z + [0]
>= [1] z + [0]
=  max(N(L(x),L(max(N(y,z)))))

max(N(L(0()),L(y))) =  [1] y + [0]
>= [1] y + [0]
=  y

max(N(L(s(x)),L(s(y)))) =  [1] y + [4]
>= [1] y + [4]
=  s(max(N(L(x),L(y))))

*** Step 6.b:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
max#(N(L(x),N(y,z))) -> max#(N(y,z))
max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z)))))
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()

*** Step 6.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
max#(N(L(x),N(y,z))) -> max#(N(y,z))
max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z)))))
max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:max#(N(L(x),N(y,z))) -> max#(N(y,z))
-->_1 max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))):3
-->_1 max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z))))):2
-->_1 max#(N(L(x),N(y,z))) -> max#(N(y,z)):1

2:W:max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z)))))
-->_1 max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))):3

3:W:max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
-->_1 max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))):3

The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: max#(N(L(x),N(y,z))) -> max#(N(y,z))
2: max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z)))))
3: max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y))))
*** Step 6.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z)))))
max(N(L(0()),L(y))) -> y
max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y))))
- Signature:
{max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).

WORST_CASE(?,O(n^2))
```