Something like this could work, but since we don't know what you want to do with the vector space with elements deleted, it's hard to give any specifics.

```
class DeletedVectorSpace():
def __init__(self, vector_space, deleted):
"""
INPUT:
``vector_space`` -- ambient vector space
``deleted`` -- list of vectors to be removed
"""
self._vector_space = vector_space
self._deleted = deleted
def method1(self):
now do stuff with self._vector_space and self._deleted
def method2(self):
now do stuff with self._vector_space and self._deleted
def method3(self):
now do stuff with self._vector_space and self._deleted
```

After you delete vectors from

`V`

,`V`

will likely no longer be a vector space, so to do this properly, you would need to define a new class, say`DeletedVectorSpace`

, and implement whatever methods you wanted for it. Obviously a vector space over the rationals, for example, does not come equipped with a list of all of its elements, so you can't just delete one; you would need to keep track of the original vector space and the list of vectors deleted from it. So I guess that's the start of an answer: begin with the data`(V, E)`

.As John Palmieri pointed out, deleting a vector $V$ from its vector space $S$ is about meaningless.

However, there is a possible meaning : finding a subspace $S'$ of $S$ which does not contain V,

i. e.no linear combination of elements of $S$ is equal to $V$. In other words, $S'$ is orthogonal to $V$. Is that what you mean ?Under this interpretation, your problem is therefore to find $S''$ orthogonal to each of your vectors $V_i$. An immediate example comes to mind : in $\mathbb{R}^3$, $(0, 0, 1)$ is orthogonal to both $(1, 0, 0)$ and $(0, 1, 0)$. So the thing is not

in principleimpossible.I hope that this hint is enough to get you started on what looks to be your homework...

Please provide sample input and output, so we have some idea of what you hope to achieve.

q = 2 ; m = 229; n = 83; r = 8

Fqm = GF(q^m)

def gen_vec_space(t): # generate a vector space of dimension t over Fqm.

E = gen_vec_space(r)

DeleteE = [E.random_element() for i in range(n)]

This a simple example about low-dimension E.

I want to know a universal and efficient code --- how to delete vectors in DeleteE from the vector space E with any dimension r (<m)?< p="">

You

couldcreate a list of all elements in`E`

and then delete some of them, but that's basically impossible:`E`

could be huge, so huge that it would be impossible to list its elements in the first place, let alone have an efficient way of deleting any. (With the example where`E`

is an 8-dimensional vector space over`GF(2^229)`

, evaluate`E.cardinality()`

to see how large`E`

is. Since it's more than the number of particles in the universe, we probably can't store it in computer memory.) So again, what are you trying to achieve? What calculations are you hoping to do with`E`

with some vectors deleted? Why can't you perform them by keeping track of`E`

and the list of deleted vectors?