/** Test Weyl sequential GBase. */
  public void testWeylSequentialGBase() {

    int rloc = 4;
    ring = new GenSolvablePolynomialRing<BigRational>(cfac, rloc);

    WeylRelations<BigRational> wl = new WeylRelations<BigRational>(ring);
    wl.generate();
    table = ring.table;

    a = ring.random(kl, ll, el, q);
    b = ring.random(kl, ll, el, q);
    c = ring.random(kl, ll, el, q);
    d = ring.random(kl, ll, el, q);
    e = d; // ring.random(kl, ll, el, q );

    if (a.isZERO() || b.isZERO() || c.isZERO() || d.isZERO()) {
      return;
    }

    assertTrue("not isZERO( a )", !a.isZERO());

    L = new ArrayList<GenSolvablePolynomial<BigRational>>();
    L.add(a);

    L = sbb.leftGB(L);
    assertTrue("isLeftGB( { a } )", sbb.isLeftGB(L));

    assertTrue("not isZERO( b )", !b.isZERO());
    L.add(b);
    // System.out.println("L = " + L.size() );

    L = sbb.leftGB(L);
    assertTrue("isLeftGB( { a, b } )", sbb.isLeftGB(L));

    assertTrue("not isZERO( c )", !c.isZERO());
    L.add(c);

    L = sbb.leftGB(L);
    assertTrue("isLeftGB( { a, b, c } )", sbb.isLeftGB(L));

    assertTrue("not isZERO( d )", !d.isZERO());
    L.add(d);

    L = sbb.leftGB(L);
    assertTrue("isLeftGB( { a, b, c, d } )", sbb.isLeftGB(L));

    assertTrue("not isZERO( e )", !e.isZERO());
    L.add(e);

    L = sbb.leftGB(L);
    assertTrue("isLeftGB( { a, b, c, d, e } )", sbb.isLeftGB(L));
  }
  /** Test sequential GBase. */
  public void testSequentialGBase() {

    if (a.isZERO() || b.isZERO() || c.isZERO() || d.isZERO()) {
      return;
    }

    assertTrue("not isZERO( a )", !a.isZERO());

    L = new ArrayList<GenSolvablePolynomial<BigRational>>();
    L.add(a);

    L = sbb.leftGB(L);
    assertTrue("isLeftGB( { a } )", sbb.isLeftGB(L));

    assertTrue("not isZERO( b )", !b.isZERO());
    L.add(b);
    // System.out.println("L = " + L.size() );

    L = sbb.leftGB(L);
    assertTrue("isLeftGB( { a, b } )", sbb.isLeftGB(L));

    assertTrue("not isZERO( c )", !c.isZERO());
    L.add(c);

    L = sbb.leftGB(L);
    assertTrue("isLeftGB( { a, b, c } )", sbb.isLeftGB(L));

    assertTrue("not isZERO( d )", !d.isZERO());
    L.add(d);

    L = sbb.leftGB(L);
    assertTrue("isLeftGB( { a, b, c, d } )", sbb.isLeftGB(L));

    assertTrue("not isZERO( e )", !e.isZERO());
    L.add(e);

    L = sbb.leftGB(L);
    assertTrue("isLeftGB( { a, b, c, d, e } )", sbb.isLeftGB(L));
  }