(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:

or(true, y) → true
or(x, true) → true
or(false, false) → false
mem(x, nil) → false
mem(x, set(y)) → =(x, y)
mem(x, union(y, z)) → or(mem(x, y), mem(x, z))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

or(true, z0) → true
or(z0, true) → true
or(false, false) → false
mem(z0, nil) → false
mem(z0, set(z1)) → =(z0, z1)
mem(z0, union(z1, z2)) → or(mem(z0, z1), mem(z0, z2))
Tuples:

OR(true, z0) → c
OR(z0, true) → c1
OR(false, false) → c2
MEM(z0, nil) → c3
MEM(z0, set(z1)) → c4
MEM(z0, union(z1, z2)) → c5(OR(mem(z0, z1), mem(z0, z2)), MEM(z0, z1), MEM(z0, z2))
S tuples:

OR(true, z0) → c
OR(z0, true) → c1
OR(false, false) → c2
MEM(z0, nil) → c3
MEM(z0, set(z1)) → c4
MEM(z0, union(z1, z2)) → c5(OR(mem(z0, z1), mem(z0, z2)), MEM(z0, z1), MEM(z0, z2))
K tuples:none
Defined Rule Symbols:

or, mem

Defined Pair Symbols:

OR, MEM

Compound Symbols:

c, c1, c2, c3, c4, c5

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 5 trailing nodes:

MEM(z0, nil) → c3
OR(z0, true) → c1
OR(true, z0) → c
MEM(z0, set(z1)) → c4
OR(false, false) → c2

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

or(true, z0) → true
or(z0, true) → true
or(false, false) → false
mem(z0, nil) → false
mem(z0, set(z1)) → =(z0, z1)
mem(z0, union(z1, z2)) → or(mem(z0, z1), mem(z0, z2))
Tuples:

MEM(z0, union(z1, z2)) → c5(OR(mem(z0, z1), mem(z0, z2)), MEM(z0, z1), MEM(z0, z2))
S tuples:

MEM(z0, union(z1, z2)) → c5(OR(mem(z0, z1), mem(z0, z2)), MEM(z0, z1), MEM(z0, z2))
K tuples:none
Defined Rule Symbols:

or, mem

Defined Pair Symbols:

MEM

Compound Symbols:

c5

(5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

or(true, z0) → true
or(z0, true) → true
or(false, false) → false
mem(z0, nil) → false
mem(z0, set(z1)) → =(z0, z1)
mem(z0, union(z1, z2)) → or(mem(z0, z1), mem(z0, z2))
Tuples:

MEM(z0, union(z1, z2)) → c5(MEM(z0, z1), MEM(z0, z2))
S tuples:

MEM(z0, union(z1, z2)) → c5(MEM(z0, z1), MEM(z0, z2))
K tuples:none
Defined Rule Symbols:

or, mem

Defined Pair Symbols:

MEM

Compound Symbols:

c5

(7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

or(true, z0) → true
or(z0, true) → true
or(false, false) → false
mem(z0, nil) → false
mem(z0, set(z1)) → =(z0, z1)
mem(z0, union(z1, z2)) → or(mem(z0, z1), mem(z0, z2))

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

MEM(z0, union(z1, z2)) → c5(MEM(z0, z1), MEM(z0, z2))
S tuples:

MEM(z0, union(z1, z2)) → c5(MEM(z0, z1), MEM(z0, z2))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

MEM

Compound Symbols:

c5

(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.

MEM(z0, union(z1, z2)) → c5(MEM(z0, z1), MEM(z0, z2))
We considered the (Usable) Rules:none
And the Tuples:

MEM(z0, union(z1, z2)) → c5(MEM(z0, z1), MEM(z0, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(MEM(x1, x2)) = x2   
POL(c5(x1, x2)) = x1 + x2   
POL(union(x1, x2)) = [1] + x1 + x2   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

MEM(z0, union(z1, z2)) → c5(MEM(z0, z1), MEM(z0, z2))
S tuples:none
K tuples:

MEM(z0, union(z1, z2)) → c5(MEM(z0, z1), MEM(z0, z2))
Defined Rule Symbols:none

Defined Pair Symbols:

MEM

Compound Symbols:

c5

(11) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(12) BOUNDS(1, 1)