public static void buildCaseRule(Surrogate kind) {
    { String ruleName = kind.symbolName + "-match";
      Symbol ruleNameSymbol = Symbol.internSymbol(ruleName);
      List ruleAntecedent = ((List)(Logic.$CASE_ANTECEDENT_TABLE$.lookup(ruleName)));
      List ruleTypes = ((List)(Logic.$CASE_TYPES_TABLE$.lookup(ruleName)));
      Cons rule = Stella.NIL;

      rule = Cons.list$(Cons.cons(Logic.SYM_LOGIC_DEFRULE, Cons.cons(StringWrapper.wrapString(ruleName), Cons.cons(Cons.cons(Cons.list$(Cons.cons(Logic.SYM_STELLA_FORALL, Cons.cons(ruleTypes, Cons.cons(Cons.cons(Cons.list$(Cons.cons(Logic.SYM_STELLA_eg, Cons.cons(Cons.cons(Logic.SYM_STELLA_AND, ruleAntecedent.consify().concatenate(Stella.NIL, Stella.NIL)), Cons.cons(Cons.list$(Cons.cons(Logic.SYM_LOGIC_CASE_MATCH, Cons.cons(Logic.SYM_LOGIC_pX, Cons.cons(Logic.SYM_LOGIC_pY, Cons.cons(Stella.NIL, Stella.NIL))))), Cons.cons(Stella.NIL, Stella.NIL))))), Stella.NIL), Stella.NIL)))), Stella.NIL), Stella.NIL))));
      if (!Logic.$CASE_RULE_NAMES$.memberP(ruleNameSymbol)) {
        Logic.$CASE_RULE_NAMES$.push(ruleNameSymbol);
      }
      if (Logic.$LOG_MATCH_RULES$) {
        System.out.println(rule);
      }
      if (!ruleAntecedent.emptyP()) {
        Logic.evaluateLogicCommand(rule, false);
      }
    }
  }