public static Cons combineAxiomLists(Cons oldaxioms, Stella_Object newaxioms) {
    if (oldaxioms == null) {
      oldaxioms = Stella.NIL;
    }
    if (newaxioms == null) {
      newaxioms = Stella.NIL;
    }
    { Cons normalizednewaxioms = Stella.NIL;

      if (Stella_Object.safePrimaryType(newaxioms) == Logic.SGT_STELLA_CONS) {
        { Cons newaxioms000 = ((Cons)(newaxioms));

          { boolean alwaysP000 = true;

            { Stella_Object elt = null;
              Cons iter000 = newaxioms000;

              loop000 : for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
                elt = iter000.value;
                if (!Stella_Object.consP(elt)) {
                  alwaysP000 = false;
                  break loop000;
                }
              }
            }
            if (alwaysP000) {
              {
                normalizednewaxioms = newaxioms000;
              }
            }
            else {
              if (newaxioms000.value == Logic.SYM_STELLA_AND) {
                {
                  normalizednewaxioms = newaxioms000.rest;
                }
              }
              else {
                {
                  normalizednewaxioms = Cons.cons(newaxioms000, Stella.NIL);
                }
              }
            }
          }
        }
      }
      else {
        normalizednewaxioms = Cons.cons(newaxioms, Stella.NIL);
      }
      return (oldaxioms.concatenate(normalizednewaxioms, Stella.NIL));
    }
  }