public static void invertImpliesProposition(Proposition self) {
    { Vector arguments = self.arguments;
      Stella_Object arg1Value = (Stella_Object.surrogateP((arguments.theArray)[0]) ? Logic.getDescription(((Surrogate)((arguments.theArray)[0]))) : (arguments.theArray)[0]);
      Stella_Object arg2Value = (Stella_Object.surrogateP((arguments.theArray)[1]) ? Logic.getDescription(((Surrogate)((arguments.theArray)[1]))) : (arguments.theArray)[1]);

      if (!(Stella_Object.isaP(arg1Value, Logic.SGT_LOGIC_DESCRIPTION) &&
          Stella_Object.isaP(arg2Value, Logic.SGT_LOGIC_DESCRIPTION))) {
        Proposition.invertAtomicProposition(self);
        return;
      }
      { Description subset = ((Description)(arg1Value));
        Description superset = ((Description)(arg2Value));
        Proposition subsetprop = null;
        Proposition supersetprop = null;
        KeyValueMap mapping = KeyValueMap.newKeyValueMap();
        Vector newarguments = Vector.newVector(1);

        self.kind = Logic.KWD_EXISTS;
        self.operator = Logic.SGT_LOGIC_EXISTS;
        KeyValueList.setDynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_IO_VARIABLES, Logic.copyVariablesVector(subset.ioVariables, mapping), null);
        { PatternVariable iovar = null;
          Vector vector000 = ((Vector)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_IO_VARIABLES, null)));
          int index000 = 0;
          int length000 = vector000.length();
          PatternVariable supvar = null;
          Vector vector001 = superset.ioVariables;
          int index001 = 0;
          int length001 = vector001.length();

          for (;(index000 < length000) &&
                    (index001 < length001); index000 = index000 + 1, index001 = index001 + 1) {
            iovar = ((PatternVariable)((vector000.theArray)[index000]));
            supvar = ((PatternVariable)((vector001.theArray)[index001]));
            mapping.insertAt(supvar, iovar);
          }
        }
        subsetprop = Description.extractProposition(subset, mapping);
        supersetprop = Description.extractProposition(superset, mapping);
        KeyValueList.setDynamicSlotValue(supersetprop.dynamicSlots, Logic.SYM_LOGIC_VARIABLE_TYPEp, null, null);
        Proposition.invertProposition(supersetprop);
        (newarguments.theArray)[0] = (Proposition.conjoinTwoPropositions(subsetprop, supersetprop));
        self.arguments = newarguments;
        Proposition.normalizeProposition(self);
      }
    }
  }