(0) Obligation:

The Runtime Complexity (full) 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: FULL

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

Converted rc-obligation to irc-obligation.

The duplicating contexts are:
mem([], union(y, z))

The defined contexts are:
or([], x1)
or(x0, [])

As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc.

(2) 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

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

Converted Cpx (relative) TRS to CDT

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

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

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

Removed 5 trailing nodes:

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

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

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

Removed 1 trailing tuple parts

(8) 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

(9) 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))

(10) 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

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

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   

(12) 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

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

The set S is empty

(14) BOUNDS(1, 1)