+def drop_dependent(vs):
+ r"""
+ Return the largest linearly-independent subset of ``vs``.
+ """
+ if len(vs) == 0:
+ # ...for lazy enough definitions of linearly-independent
+ return vs
+
+ result = []
+ old_V = VectorSpace(vs[0].parent().base_field(), 0)
+
+ for v in vs:
+ new_V = span(result + [v])
+ if new_V.dimension() > old_V.dimension():
+ result.append(v)
+ old_V = new_V
+
+ return result
+
+
+def basically_the_same(K1,K2):
+ r"""
+ ``True`` if ``K1`` and ``K2`` are basically the same, and ``False``
+ otherwise.
+ """
+ if K1.lattice_dim() != K2.lattice_dim():
+ return False
+
+ if K1.nrays() != K2.nrays():
+ return False
+
+ if K1.dim() != K2.dim():
+ return False
+
+ if lineality(K1) != lineality(K2):
+ return False
+
+ if K1.is_solid() != K2.is_solid():
+ return False
+
+ if K1.is_strictly_convex() != K2.is_strictly_convex():
+ return False
+
+ if len(LL(K1)) != len(LL(K2)):
+ return False
+
+ C_of_K1 = discrete_complementarity_set(K1)
+ C_of_K2 = discrete_complementarity_set(K2)
+ if len(C_of_K1) != len(C_of_K2):
+ return False
+
+ if len(K1.facets()) != len(K2.facets()):
+ return False
+
+ return True
+
+
+