public static boolean failsAntecedentTypeCheckP(PatternVariable v1, Stella_Object i2) {
    if (((Keyword)(Logic.$TYPE_CHECK_STRATEGY$.get())) == Logic.KWD_LOOKUP) {
      { Surrogate type = v1.skolemType;
        boolean typeisokP = ((((QueryIterator)(Logic.$QUERYITERATOR$.get())) != null) &&
            (((QueryIterator)(Logic.$QUERYITERATOR$.get())).partialMatchStrategy != null)) ||
            Logic.checkStrictTypeP(i2, type, true);

        if ((!typeisokP) &&
            Description.nonInferableP(Logic.surrogateToDescription(type))) {
          return (true);
        }
        else {
          return (false);
        }
      }
    }
    else if (((Keyword)(Logic.$TYPE_CHECK_STRATEGY$.get())) == Logic.KWD_NONE) {
      return (false);
    }
    else {
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        stream000.nativeStream.print("`" + ((Keyword)(Logic.$TYPE_CHECK_STRATEGY$.get())) + "' is not a valid case option");
        throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
      }
    }
  }