/** Test Weyl sequential twosided GBase is always 1. */
  public void testWeylSequentialTSGBase() {

    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);

    // System.out.println("La = " + L );
    L = sbb.twosidedGB(L);
    // System.out.println("L = " + L );
    assertTrue("isTwosidedGB( { a } )", sbb.isTwosidedGB(L));

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

    L = sbb.twosidedGB(L);
    // System.out.println("L = " + L );
    assertTrue("isTwosidedGB( { a, b } )", sbb.isTwosidedGB(L));

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

    L = sbb.twosidedGB(L);
    // System.out.println("L = " + L );
    assertTrue("isTwosidedGB( { a, b, c } )", sbb.isTwosidedGB(L));

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

    L = sbb.twosidedGB(L);
    // System.out.println("L = " + L );
    assertTrue("isTwosidedGB( { a, b, c, d } )", sbb.isTwosidedGB(L));

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

    L = sbb.twosidedGB(L);
    // System.out.println("L = " + L );
    assertTrue("isTwosidedGB( { a, b, c, d, e } )", sbb.isTwosidedGB(L));
  }
  /** Test sequential twosided GBase. */
  public void testSequentialTSGBase() {

    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.twosidedGB(L);
    // System.out.println("L = " + L.size() );
    assertTrue("isTwosidedGB( { a } )", sbb.isTwosidedGB(L));

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

    L = sbb.twosidedGB(L);
    // System.out.println("L = " + L.size() );
    assertTrue("isTwosidedGB( { a, b } )", sbb.isTwosidedGB(L));

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

    L = sbb.twosidedGB(L);
    // System.out.println("L = " + L.size() );
    assertTrue("isTwosidedGB( { a, b, c } )", sbb.isTwosidedGB(L));

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

    L = sbb.twosidedGB(L);
    // System.out.println("L = " + L.size() );
    assertTrue("isTwosidedGB( { a, b, c, d } )", sbb.isTwosidedGB(L));

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

    L = sbb.twosidedGB(L);
    // System.out.println("L = " + L.size() );
    assertTrue("isTwosidedGB( { a, b, c, d, e } )", sbb.isTwosidedGB(L));
  }