public static void simplifyConjunction(Proposition andproposition) {
    { List conjunctslist = List.newList();
      Cons cursor = null;
      int cursorpos = 0;

      { Stella_Object arg = null;
        Vector vector000 = andproposition.arguments;
        int index000 = 0;
        int length000 = vector000.length();

        for (;index000 < length000; index000 = index000 + 1) {
          arg = (vector000.theArray)[index000];
          conjunctslist.push(((Proposition)(arg)));
        }
      }
      cursor = conjunctslist.theConsList;
      while (!(cursor == Stella.NIL)) {
        { Proposition conjunct = ((Proposition)(cursor.value));

          { Keyword testValue000 = conjunct.kind;

            if (testValue000 == Logic.KWD_EQUIVALENT) {
              if (Stella_Object.eqlP((conjunct.arguments.theArray)[0], (conjunct.arguments.theArray)[1]) ||
                  (Stella_Object.eqlP(Logic.valueOf((conjunct.arguments.theArray)[0]), Logic.valueOf((conjunct.arguments.theArray)[1])) &&
                   (Stella_Object.isaP((conjunct.arguments.theArray)[0], Logic.SGT_LOGIC_PATTERN_VARIABLE) &&
                    Stella_Object.isaP((conjunct.arguments.theArray)[1], Logic.SGT_LOGIC_PATTERN_VARIABLE)))) {
                { Stella_Object arg = null;
                  Vector vector001 = conjunct.arguments;
                  int index001 = 0;
                  int length001 = vector001.length();

                  for (;index001 < length001; index001 = index001 + 1) {
                    arg = (vector001.theArray)[index001];
                    Logic.removeDependentPropositionLink(arg, conjunct);
                  }
                }
                cursor.value = Logic.TRUE_PROPOSITION;
              }
            }
            else if (testValue000 == Logic.KWD_ISA) {
              { Proposition value000 = null;

                { Proposition otherconj = null;
                  Cons iter000 = conjunctslist.theConsList;
                  int i = Stella.NULL_INTEGER;
                  int iter001 = 0;

                  loop003 : for (;!(iter000 == Stella.NIL); iter000 = iter000.rest, iter001 = iter001 + 1) {
                    otherconj = ((Proposition)(iter000.value));
                    i = iter001;
                    if ((!(i == cursorpos)) &&
                        Proposition.conjunctCancelsIsaPropositionP(conjunct, otherconj)) {
                      value000 = otherconj;
                      break loop003;
                    }
                  }
                }
                { Proposition dominatingconjunct = value000;

                  if ((((Surrogate)(conjunct.operator)) == Logic.SGT_STELLA_THING) ||
                      (dominatingconjunct != null)) {
                    if (!(conjunct == dominatingconjunct)) {
                      { Stella_Object arg = null;
                        Vector vector002 = conjunct.arguments;
                        int index002 = 0;
                        int length002 = vector002.length();

                        for (;index002 < length002; index002 = index002 + 1) {
                          arg = (vector002.theArray)[index002];
                          Logic.removeDependentPropositionLink(arg, conjunct);
                        }
                      }
                    }
                    cursor.value = Logic.TRUE_PROPOSITION;
                  }
                }
              }
            }
            else if (testValue000 == Logic.KWD_AND) {
              Proposition.simplifyConjunction(((Proposition)(cursor.value)));
            }
            else {
            }
          }
        }
        cursor = cursor.rest;
        cursorpos = cursorpos + 1;
      }
      if (conjunctslist.memberP(Logic.TRUE_PROPOSITION)) {
        conjunctslist.remove(Logic.TRUE_PROPOSITION);
        conjunctslist.reverse();
        switch (conjunctslist.length()) {
          case 0: 
            Proposition.overlayWithConstantProposition(andproposition, Logic.TRUE_PROPOSITION);
          break;
          case 1: 
            Proposition.overlayProposition(andproposition, ((Proposition)(conjunctslist.first())));
            { Stella_Object arg = null;
              Vector vector003 = andproposition.arguments;
              int index003 = 0;
              int length003 = vector003.length();

              for (;index003 < length003; index003 = index003 + 1) {
                arg = (vector003.theArray)[index003];
                Logic.addDependentPropositionLink(arg, andproposition);
              }
            }
          break;
          default:
            andproposition.arguments = Logic.copyListToArgumentsVector(conjunctslist);
          break;
        }
        conjunctslist.free();
      }
    }
  }