How can I compute **F** from **G** according to the following text? (I implemented this but I need a more efficient implementation.)

Given a set **G** of polynomials which are a subset of **k[U, X] **and a monomial order with **U << X**, we want to comput set **F** from **G** s.t.

1. **F** is subset of **G** and for any two distinct **f1, f2** in **F** , neither **lpp (f1)** is a multiple of **lpp (f2)** nor **lpp (f2)** is a multiple of **lpp (f1).**

2. for every polynomial **g** in **G**, there is some polynomial **f** in **F** such that **lpp (g)** is a multiple of

**lpp (f )**, i.e. **⟨lpp (F )⟩ = ⟨lpp (G)⟩**,

--------------------------------------------------------------------------------------

It is worth nothing that F is not unique.

**Example: **Let us consider** G = {ax^2 − y, ay^2 − 1, ax − 1, (a + 1)x − y, (a + 1)y − a} ⊂ Q[a, x, y], **with the lexicographic order on terms with **a < y < x. **

Then** F = {ax − 1, (a + 1)y − a} **and** F ′ = {(a + 1)x − y, (a + 1)y − a} **are both considered set.

please not that **K[U,X]** is a parametric polynomial ring (**U** is e sequence of parameters and **X** is a sequence of variables).

**lpp(f)** is leading monomial of **f** w.r.t. variables **X**. For example **lpp(a*x^2+b*y)= x^2**.