### (0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

purge(nil) → nil
purge(.(x, y)) → .(x, purge(remove(x, y)))
remove(x, nil) → nil
remove(x, .(y, z)) → if(=(x, y), remove(x, z), .(y, remove(x, z)))

Rewrite Strategy: FULL

### (1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(2n):
The rewrite sequence
remove(x, .(y, z)) →+ if(=(x, y), remove(x, z), .(y, remove(x, z)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1].
The pumping substitution is [z / .(y, z)].
The result substitution is [ ].

The rewrite sequence
remove(x, .(y, z)) →+ if(=(x, y), remove(x, z), .(y, remove(x, z)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [2,1].
The pumping substitution is [z / .(y, z)].
The result substitution is [ ].

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

purge(nil) → nil
purge(.(x, y)) → .(x, purge(remove(x, y)))
remove(x, nil) → nil
remove(x, .(y, z)) → if(='(x, y), remove(x, z), .(y, remove(x, z)))

S is empty.
Rewrite Strategy: FULL

### (5) SlicingProof (LOWER BOUND(ID) transformation)

Sliced the following arguments:
./0
remove/0
if/0
='/0
='/1

### (6) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

purge(nil) → nil
purge(.(y)) → .(purge(remove(y)))
remove(nil) → nil
remove(.(z)) → if(remove(z), .(y, remove(z)))

S is empty.
Rewrite Strategy: FULL

Infered types.

### (8) Obligation:

TRS:
Rules:
purge(nil) → nil
purge(.(y)) → .(purge(remove(y)))
remove(nil) → nil
remove(.(z)) → if(remove(z), .(y, remove(z)))

Types:
purge :: nil:.:if → nil:.:if
nil :: nil:.:if
. :: nil:.:if → nil:.:if
remove :: nil:.:if → nil:.:if
if :: nil:.:if → . → nil:.:if
. :: y → nil:.:if → .
y :: y
hole_nil:.:if1_0 :: nil:.:if
hole_.2_0 :: .
hole_y3_0 :: y
gen_nil:.:if4_0 :: Nat → nil:.:if

### (9) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
purge, remove

They will be analysed ascendingly in the following order:
remove < purge

### (10) Obligation:

TRS:
Rules:
purge(nil) → nil
purge(.(y)) → .(purge(remove(y)))
remove(nil) → nil
remove(.(z)) → if(remove(z), .(y, remove(z)))

Types:
purge :: nil:.:if → nil:.:if
nil :: nil:.:if
. :: nil:.:if → nil:.:if
remove :: nil:.:if → nil:.:if
if :: nil:.:if → . → nil:.:if
. :: y → nil:.:if → .
y :: y
hole_nil:.:if1_0 :: nil:.:if
hole_.2_0 :: .
hole_y3_0 :: y
gen_nil:.:if4_0 :: Nat → nil:.:if

Generator Equations:
gen_nil:.:if4_0(0) ⇔ nil
gen_nil:.:if4_0(+(x, 1)) ⇔ .(gen_nil:.:if4_0(x))

The following defined symbols remain to be analysed:
remove, purge

They will be analysed ascendingly in the following order:
remove < purge

### (11) RewriteLemmaProof (EQUIVALENT transformation)

Proved the following rewrite lemma:
remove(gen_nil:.:if4_0(+(1, n6_0))) → *5_0, rt ∈ Ω(2n)

Induction Base:
remove(gen_nil:.:if4_0(+(1, 0)))

Induction Step:
remove(gen_nil:.:if4_0(+(1, +(n6_0, 1)))) →RΩ(1)
if(remove(gen_nil:.:if4_0(+(1, n6_0))), .(y, remove(gen_nil:.:if4_0(+(1, n6_0))))) →IH
if(*5_0, .(y, remove(gen_nil:.:if4_0(+(1, n6_0))))) →IH
if(*5_0, .(y, *5_0))

We have rt ∈ Ω(2n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(2n)