text: // Lean compiler output
  // Module: Lean.Elab.Extra
  // Imports: Init Lean.Elab.App
  #include <lean/lean.h>
  #if defined(__clang__)
  #pragma clang diagnostic ignored "-Wunused-parameter"
  #pragma clang diagnostic ignored "-Wunused-label"
  #elif defined(__GNUC__) && !defined(__CLANG__)
  #pragma GCC diagnostic ignored "-Wunused-parameter"
  #pragma GCC diagnostic ignored "-Wunused-label"
  #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
  #endif
  #ifdef __cplusplus
  extern "C" {
  #endif
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad_match__1___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabForall___spec__1___rarg(lean_object*);
  extern lean_object* l_myMacro____x40_Init_Notation___hyg_14424____closed__12;
  lean_object* l_Lean_Elab_Term_elabForIn___lambda__1___closed__1;
  lean_object* l_Lean_Elab_Term_elabForIn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad___closed__4;
  lean_object* l_Lean_stringToMessageData(lean_object*);
  lean_object* l_Lean_mkSort(lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn___lambda__1___closed__4;
  lean_object* lean_name_mk_string(lean_object*, lean_object*);
  lean_object* l_Lean_Meta_mkAppM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabBinRel_match__1(lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn_match__2___rarg(lean_object*, lean_object*, lean_object*);
  extern lean_object* l_myMacro____x40_Init_Notation___hyg_14424____closed__6;
  lean_object* l_Lean_Elab_Term_elabForIn___lambda__1___closed__3;
  extern lean_object* l_Array_empty___closed__1;
  extern lean_object* l_myMacro____x40_Init_Notation___hyg_14424____closed__11;
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad___closed__5;
  lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_quoteAutoTactic___spec__3___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* lean_array_push(lean_object*, lean_object*);
  lean_object* l___regBuiltin_Lean_Elab_Term_elabForIn___closed__1;
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad___closed__3;
  lean_object* l_Lean_Elab_Term_elabForIn_throwFailure___closed__2;
  lean_object* lean_string_utf8_byte_size(lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn_match__2(lean_object*);
  lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_getMainModule___rarg(lean_object*, lean_object*);
  extern lean_object* l_Lean_Meta_mkNumeral___closed__3;
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_ensureHasType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__2;
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad_match__1(lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  extern lean_object* l_myMacro____x40_Init_Notation___hyg_14424____closed__4;
  lean_object* l_Lean_Elab_Term_elabForIn_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad_match__2___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_tryPostponeIfNoneOrMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn___lambda__1___closed__2;
  lean_object* l_Lean_Elab_Term_elabForIn_match__1(lean_object*);
  extern lean_object* l_term___u2218_____closed__5;
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_replaceRef(lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabForIn___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabAppArgs(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabBinRel___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__2___closed__1;
  extern lean_object* l_myMacro____x40_Init_Notation___hyg_14424____closed__1;
  lean_object* l_Lean_Syntax_getId(lean_object*);
  lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageContextTermElabM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  extern lean_object* l_Lean_Parser_Term_forInMacro___elambda__1___closed__2;
  extern lean_object* l_myMacro____x40_Init_Notation___hyg_14424____closed__2;
  lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_resolveId_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad___closed__2;
  extern lean_object* l_Lean_KernelException_toMessageData___closed__15;
  lean_object* l_Lean_Elab_Term_elabForIn___closed__1;
  lean_object* l_Lean_Elab_Term_elabBinRel_match__3(lean_object*);
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabBinRel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabBinRel_match__2(lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn___closed__2;
  extern lean_object* l_Lean_KernelException_toMessageData___closed__3;
  extern lean_object* l_Lean_Syntax_mkAntiquotNode___closed__9;
  lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn___closed__9;
  lean_object* l_Lean_Elab_Term_mkConst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  extern lean_object* l_Lean_nullKind___closed__2;
  extern lean_object* l_Lean_Elab_Term_termElabAttribute;
  lean_object* l_Lean_Elab_Term_elabBinRel_match__3___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn_throwFailure___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn___closed__4;
  lean_object* l_Lean_Elab_Term_elabForIn_throwFailure___closed__1;
  lean_object* l_Lean_Elab_Term_elabForIn___closed__8;
  extern lean_object* l_Lean_Syntax_mkApp___closed__1;
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_trySynthInstance(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_mkLevelSucc(lean_object*);
  lean_object* l_Lean_Elab_Term_saveAllState___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___regBuiltin_Lean_Elab_Term_elabForIn(lean_object*);
  lean_object* l_Lean_Elab_Term_SavedState_restore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabBinRel_match__1___rarg(lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn___closed__6;
  lean_object* l_Lean_Elab_Term_elabBinRel_match__2___rarg(lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_isTypeApp_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabTerm___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn___closed__3;
  lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_withSynthesize___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  extern lean_object* l_myMacro____x40_Init_Notation___hyg_7052____closed__2;
  lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel(lean_object*);
  lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_mkFreshExprMVarImpl(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  extern lean_object* l_myMacro____x40_Init_Notation___hyg_1398____closed__8;
  uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*);
  lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabBinRel___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_tryPostpone(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_mkFreshLevelMVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad_match__2(lean_object*);
  lean_object* l_Lean_indentExpr(lean_object*);
  lean_object* l_Lean_Elab_Term_isLocalIdent_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_mkConst(lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabForIn___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn___closed__7;
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad___closed__1;
  lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__1;
  lean_object* l_Lean_Elab_Term_elabForIn_throwFailure(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabForIn___closed__5;
  lean_object* l_Lean_Elab_getBetterRef(lean_object*, lean_object*);
  lean_object* l_Lean_Elab_Term_elabBinRel_match__1___rarg(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_3 = lean_ctor_get(x_1, 0);
  lean_inc(x_3);
  x_4 = lean_ctor_get(x_1, 1);
  lean_inc(x_4);
  lean_dec(x_1);
  x_5 = lean_apply_2(x_2, x_3, x_4);
  return x_5;
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinRel_match__1___rarg), 2, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel_match__2___rarg(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_3 = lean_ctor_get(x_1, 0);
  lean_inc(x_3);
  x_4 = lean_ctor_get(x_1, 1);
  lean_inc(x_4);
  lean_dec(x_1);
  x_5 = lean_apply_2(x_2, x_3, x_4);
  return x_5;
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel_match__2(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinRel_match__2___rarg), 2, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel_match__3___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  lean_object* x_4; lean_object* x_5; 
  lean_dec(x_2);
  x_4 = lean_box(0);
  x_5 = lean_apply_1(x_3, x_4);
  return x_5;
  }
  else
  {
  lean_object* x_6; lean_object* x_7; 
  lean_dec(x_3);
  x_6 = lean_ctor_get(x_1, 0);
  lean_inc(x_6);
  lean_dec(x_1);
  x_7 = lean_apply_1(x_2, x_6);
  return x_7;
  }
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel_match__3(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinRel_match__3___rarg), 3, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabBinRel___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; 
  x_9 = lean_box(0);
  x_10 = l_Lean_mkConst(x_1, x_9);
  x_11 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_11, 0, x_10);
  x_12 = l_Lean_throwUnknownConstant___rarg___closed__2;
  x_13 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_13, 0, x_12);
  lean_ctor_set(x_13, 1, x_11);
  x_14 = l_Lean_KernelException_toMessageData___closed__3;
  x_15 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_15, 0, x_13);
  lean_ctor_set(x_15, 1, x_14);
  x_16 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_15, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  return x_16;
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
  _start:
  {
  lean_object* x_11; lean_object* x_12; 
  x_11 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_11, 0, x_1);
  lean_ctor_set(x_11, 1, x_2);
  x_12 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_12, 0, x_11);
  lean_ctor_set(x_12, 1, x_10);
  return x_12;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabBinRel___lambda__2___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinRel___lambda__1___boxed), 10, 0);
  return x_1;
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
  _start:
  {
  lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; 
  x_11 = lean_unsigned_to_nat(3u);
  x_12 = l_Lean_Syntax_getArg(x_1, x_11);
  x_13 = 1;
  lean_inc(x_9);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_2);
  x_14 = l_Lean_Elab_Term_elabTerm(x_12, x_2, x_13, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
  if (lean_obj_tag(x_14) == 0)
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; 
  x_15 = lean_ctor_get(x_14, 0);
  lean_inc(x_15);
  x_16 = lean_ctor_get(x_14, 1);
  lean_inc(x_16);
  lean_dec(x_14);
  x_17 = l_Lean_Elab_Term_elabBinRel___lambda__2___closed__1;
  x_18 = l_Lean_Meta_mkNumeral___closed__3;
  x_19 = l_Lean_Expr_isAppOfArity(x_3, x_18, x_11);
  if (x_19 == 0)
  {
  uint8_t x_20; 
  x_20 = l_Lean_Expr_isAppOfArity(x_15, x_18, x_11);
  if (x_20 == 0)
  {
  lean_object* x_21; lean_object* x_22; 
  lean_dec(x_2);
  x_21 = lean_box(0);
  x_22 = lean_apply_10(x_17, x_3, x_15, x_21, x_4, x_5, x_6, x_7, x_8, x_9, x_16);
  return x_22;
  }
  else
  {
  lean_object* x_23; 
  lean_inc(x_9);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_3);
  x_23 = l_Lean_Meta_inferType(x_3, x_6, x_7, x_8, x_9, x_16);
  if (lean_obj_tag(x_23) == 0)
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; 
  x_24 = lean_ctor_get(x_23, 0);
  lean_inc(x_24);
  x_25 = lean_ctor_get(x_23, 1);
  lean_inc(x_25);
  lean_dec(x_23);
  x_26 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_26, 0, x_24);
  lean_inc(x_9);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  x_27 = l_Lean_Elab_Term_ensureHasType(x_26, x_15, x_2, x_4, x_5, x_6, x_7, x_8, x_9, x_25);
  if (lean_obj_tag(x_27) == 0)
  {
  lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  x_28 = lean_ctor_get(x_27, 0);
  lean_inc(x_28);
  x_29 = lean_ctor_get(x_27, 1);
  lean_inc(x_29);
  lean_dec(x_27);
  x_30 = lean_box(0);
  x_31 = lean_apply_10(x_17, x_3, x_28, x_30, x_4, x_5, x_6, x_7, x_8, x_9, x_29);
  return x_31;
  }
  else
  {
  uint8_t x_32; 
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_32 = !lean_is_exclusive(x_27);
  if (x_32 == 0)
  {
  return x_27;
  }
  else
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; 
  x_33 = lean_ctor_get(x_27, 0);
  x_34 = lean_ctor_get(x_27, 1);
  lean_inc(x_34);
  lean_inc(x_33);
  lean_dec(x_27);
  x_35 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_35, 0, x_33);
  lean_ctor_set(x_35, 1, x_34);
  return x_35;
  }
  }
  }
  else
  {
  uint8_t x_36; 
  lean_dec(x_15);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_36 = !lean_is_exclusive(x_23);
  if (x_36 == 0)
  {
  return x_23;
  }
  else
  {
  lean_object* x_37; lean_object* x_38; lean_object* x_39; 
  x_37 = lean_ctor_get(x_23, 0);
  x_38 = lean_ctor_get(x_23, 1);
  lean_inc(x_38);
  lean_inc(x_37);
  lean_dec(x_23);
  x_39 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_39, 0, x_37);
  lean_ctor_set(x_39, 1, x_38);
  return x_39;
  }
  }
  }
  }
  else
  {
  lean_object* x_40; 
  lean_inc(x_9);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_15);
  x_40 = l_Lean_Meta_inferType(x_15, x_6, x_7, x_8, x_9, x_16);
  if (lean_obj_tag(x_40) == 0)
  {
  lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; 
  x_41 = lean_ctor_get(x_40, 0);
  lean_inc(x_41);
  x_42 = lean_ctor_get(x_40, 1);
  lean_inc(x_42);
  lean_dec(x_40);
  x_43 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_43, 0, x_41);
  lean_inc(x_9);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  x_44 = l_Lean_Elab_Term_ensureHasType(x_43, x_3, x_2, x_4, x_5, x_6, x_7, x_8, x_9, x_42);
  if (lean_obj_tag(x_44) == 0)
  {
  lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; 
  x_45 = lean_ctor_get(x_44, 0);
  lean_inc(x_45);
  x_46 = lean_ctor_get(x_44, 1);
  lean_inc(x_46);
  lean_dec(x_44);
  x_47 = lean_box(0);
  x_48 = lean_apply_10(x_17, x_45, x_15, x_47, x_4, x_5, x_6, x_7, x_8, x_9, x_46);
  return x_48;
  }
  else
  {
  uint8_t x_49; 
  lean_dec(x_15);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_49 = !lean_is_exclusive(x_44);
  if (x_49 == 0)
  {
  return x_44;
  }
  else
  {
  lean_object* x_50; lean_object* x_51; lean_object* x_52; 
  x_50 = lean_ctor_get(x_44, 0);
  x_51 = lean_ctor_get(x_44, 1);
  lean_inc(x_51);
  lean_inc(x_50);
  lean_dec(x_44);
  x_52 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_52, 0, x_50);
  lean_ctor_set(x_52, 1, x_51);
  return x_52;
  }
  }
  }
  else
  {
  uint8_t x_53; 
  lean_dec(x_15);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_53 = !lean_is_exclusive(x_40);
  if (x_53 == 0)
  {
  return x_40;
  }
  else
  {
  lean_object* x_54; lean_object* x_55; lean_object* x_56; 
  x_54 = lean_ctor_get(x_40, 0);
  x_55 = lean_ctor_get(x_40, 1);
  lean_inc(x_55);
  lean_inc(x_54);
  lean_dec(x_40);
  x_56 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_56, 0, x_54);
  lean_ctor_set(x_56, 1, x_55);
  return x_56;
  }
  }
  }
  }
  else
  {
  uint8_t x_57; 
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_57 = !lean_is_exclusive(x_14);
  if (x_57 == 0)
  {
  return x_14;
  }
  else
  {
  lean_object* x_58; lean_object* x_59; lean_object* x_60; 
  x_58 = lean_ctor_get(x_14, 0);
  x_59 = lean_ctor_get(x_14, 1);
  lean_inc(x_59);
  lean_inc(x_58);
  lean_dec(x_14);
  x_60 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_60, 0, x_58);
  lean_ctor_set(x_60, 1, x_59);
  return x_60;
  }
  }
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
  _start:
  {
  lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* x_20; 
  x_11 = lean_ctor_get(x_3, 0);
  x_12 = lean_ctor_get(x_3, 1);
  lean_inc(x_11);
  x_13 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_13, 0, x_11);
  lean_inc(x_12);
  x_14 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_14, 0, x_12);
  x_15 = l_Lean_Syntax_mkApp___closed__1;
  x_16 = lean_array_push(x_15, x_13);
  x_17 = lean_array_push(x_16, x_14);
  x_18 = l_Array_empty___closed__1;
  x_19 = 0;
  x_20 = l_Lean_Elab_Term_elabAppArgs(x_1, x_18, x_17, x_2, x_19, x_19, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
  return x_20;
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 
  x_10 = lean_unsigned_to_nat(1u);
  x_11 = l_Lean_Syntax_getArg(x_1, x_10);
  x_12 = l_term___u2218_____closed__5;
  lean_inc(x_7);
  lean_inc(x_5);
  lean_inc(x_3);
  lean_inc(x_11);
  x_13 = l_Lean_Elab_Term_resolveId_x3f(x_11, x_12, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
  if (lean_obj_tag(x_13) == 0)
  {
  lean_object* x_14; 
  x_14 = lean_ctor_get(x_13, 0);
  lean_inc(x_14);
  if (lean_obj_tag(x_14) == 0)
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_15 = lean_ctor_get(x_13, 1);
  lean_inc(x_15);
  lean_dec(x_13);
  x_16 = l_Lean_Syntax_getId(x_11);
  lean_dec(x_11);
  x_17 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabBinRel___spec__1(x_16, x_3, x_4, x_5, x_6, x_7, x_8, x_15);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_17;
  }
  else
  {
  lean_object* x_18; uint8_t x_19; 
  lean_dec(x_11);
  x_18 = lean_ctor_get(x_13, 1);
  lean_inc(x_18);
  lean_dec(x_13);
  x_19 = !lean_is_exclusive(x_14);
  if (x_19 == 0)
  {
  lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; 
  x_20 = lean_ctor_get(x_14, 0);
  x_21 = l_Lean_Elab_Term_saveAllState___rarg(x_4, x_5, x_6, x_7, x_8, x_18);
  x_22 = lean_ctor_get(x_21, 0);
  lean_inc(x_22);
  x_23 = lean_ctor_get(x_21, 1);
  lean_inc(x_23);
  lean_dec(x_21);
  x_24 = lean_unsigned_to_nat(2u);
  x_25 = l_Lean_Syntax_getArg(x_1, x_24);
  x_26 = lean_box(0);
  x_27 = 1;
  x_28 = lean_box(x_27);
  lean_inc(x_25);
  x_29 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTerm___boxed), 10, 3);
  lean_closure_set(x_29, 0, x_25);
  lean_closure_set(x_29, 1, x_26);
  lean_closure_set(x_29, 2, x_28);
  lean_inc(x_1);
  x_30 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinRel___lambda__2___boxed), 10, 2);
  lean_closure_set(x_30, 0, x_1);
  lean_closure_set(x_30, 1, x_26);
  x_31 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2);
  lean_closure_set(x_31, 0, x_29);
  lean_closure_set(x_31, 1, x_30);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_32 = l_Lean_Elab_Term_withSynthesize___rarg(x_31, x_27, x_3, x_4, x_5, x_6, x_7, x_8, x_23);
  if (lean_obj_tag(x_32) == 0)
  {
  lean_object* x_33; lean_object* x_34; uint8_t x_35; 
  x_33 = lean_ctor_get(x_32, 0);
  lean_inc(x_33);
  x_34 = lean_ctor_get(x_32, 1);
  lean_inc(x_34);
  lean_dec(x_32);
  x_35 = !lean_is_exclusive(x_33);
  if (x_35 == 0)
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  x_36 = lean_ctor_get(x_33, 0);
  x_37 = lean_ctor_get(x_33, 1);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_36);
  x_38 = l_Lean_Meta_inferType(x_36, x_5, x_6, x_7, x_8, x_34);
  if (lean_obj_tag(x_38) == 0)
  {
  lean_object* x_39; lean_object* x_40; lean_object* x_41; 
  x_39 = lean_ctor_get(x_38, 0);
  lean_inc(x_39);
  x_40 = lean_ctor_get(x_38, 1);
  lean_inc(x_40);
  lean_dec(x_38);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_37);
  x_41 = l_Lean_Meta_inferType(x_37, x_5, x_6, x_7, x_8, x_40);
  if (lean_obj_tag(x_41) == 0)
  {
  lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; 
  x_42 = lean_ctor_get(x_41, 0);
  lean_inc(x_42);
  x_43 = lean_ctor_get(x_41, 1);
  lean_inc(x_43);
  lean_dec(x_41);
  x_44 = lean_unsigned_to_nat(3u);
  x_45 = l_Lean_Syntax_getArg(x_1, x_44);
  lean_dec(x_1);
  lean_ctor_set(x_14, 0, x_39);
  x_46 = lean_ctor_get(x_7, 0);
  lean_inc(x_46);
  x_47 = lean_ctor_get(x_7, 1);
  lean_inc(x_47);
  x_48 = lean_ctor_get(x_7, 2);
  lean_inc(x_48);
  x_49 = lean_ctor_get(x_7, 3);
  lean_inc(x_49);
  x_50 = lean_ctor_get(x_7, 4);
  lean_inc(x_50);
  x_51 = lean_ctor_get(x_7, 5);
  lean_inc(x_51);
  x_52 = lean_ctor_get(x_7, 6);
  lean_inc(x_52);
  x_53 = lean_ctor_get(x_7, 7);
  lean_inc(x_53);
  x_54 = l_Lean_replaceRef(x_45, x_49);
  lean_inc(x_53);
  lean_inc(x_52);
  lean_inc(x_51);
  lean_inc(x_50);
  lean_inc(x_48);
  lean_inc(x_47);
  lean_inc(x_46);
  x_55 = lean_alloc_ctor(0, 8, 0);
  lean_ctor_set(x_55, 0, x_46);
  lean_ctor_set(x_55, 1, x_47);
  lean_ctor_set(x_55, 2, x_48);
  lean_ctor_set(x_55, 3, x_54);
  lean_ctor_set(x_55, 4, x_50);
  lean_ctor_set(x_55, 5, x_51);
  lean_ctor_set(x_55, 6, x_52);
  lean_ctor_set(x_55, 7, x_53);
  lean_inc(x_8);
  lean_inc(x_55);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_37);
  x_56 = l_Lean_Elab_Term_ensureHasType(x_14, x_37, x_26, x_3, x_4, x_5, x_6, x_55, x_8, x_43);
  if (lean_obj_tag(x_56) == 0)
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; 
  lean_dec(x_55);
  lean_dec(x_53);
  lean_dec(x_52);
  lean_dec(x_51);
  lean_dec(x_50);
  lean_dec(x_49);
  lean_dec(x_48);
  lean_dec(x_47);
  lean_dec(x_46);
  lean_dec(x_45);
  lean_dec(x_42);
  lean_dec(x_37);
  lean_dec(x_25);
  lean_dec(x_22);
  x_57 = lean_ctor_get(x_56, 0);
  lean_inc(x_57);
  x_58 = lean_ctor_get(x_56, 1);
  lean_inc(x_58);
  lean_dec(x_56);
  lean_ctor_set(x_33, 1, x_57);
  x_59 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_20, x_2, x_33, x_3, x_4, x_5, x_6, x_7, x_8, x_58);
  lean_dec(x_33);
  return x_59;
  }
  else
  {
  lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; 
  x_60 = lean_ctor_get(x_56, 1);
  lean_inc(x_60);
  lean_dec(x_56);
  x_61 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_61, 0, x_42);
  x_62 = l_Lean_replaceRef(x_25, x_49);
  lean_dec(x_49);
  x_63 = lean_alloc_ctor(0, 8, 0);
  lean_ctor_set(x_63, 0, x_46);
  lean_ctor_set(x_63, 1, x_47);
  lean_ctor_set(x_63, 2, x_48);
  lean_ctor_set(x_63, 3, x_62);
  lean_ctor_set(x_63, 4, x_50);
  lean_ctor_set(x_63, 5, x_51);
  lean_ctor_set(x_63, 6, x_52);
  lean_ctor_set(x_63, 7, x_53);
  lean_inc(x_8);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_64 = l_Lean_Elab_Term_ensureHasType(x_61, x_36, x_26, x_3, x_4, x_5, x_6, x_63, x_8, x_60);
  if (lean_obj_tag(x_64) == 0)
  {
  lean_object* x_65; lean_object* x_66; lean_object* x_67; 
  lean_dec(x_55);
  lean_dec(x_45);
  lean_dec(x_25);
  lean_dec(x_22);
  x_65 = lean_ctor_get(x_64, 0);
  lean_inc(x_65);
  x_66 = lean_ctor_get(x_64, 1);
  lean_inc(x_66);
  lean_dec(x_64);
  lean_ctor_set(x_33, 0, x_65);
  x_67 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_20, x_2, x_33, x_3, x_4, x_5, x_6, x_7, x_8, x_66);
  lean_dec(x_33);
  return x_67;
  }
  else
  {
  lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; 
  lean_dec(x_37);
  x_68 = lean_ctor_get(x_64, 1);
  lean_inc(x_68);
  lean_dec(x_64);
  x_69 = l_Lean_Elab_Term_SavedState_restore(x_22, x_3, x_4, x_5, x_6, x_7, x_8, x_68);
  x_70 = lean_ctor_get(x_69, 1);
  lean_inc(x_70);
  lean_dec(x_69);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_71 = l_Lean_Elab_Term_elabTerm(x_25, x_26, x_27, x_3, x_4, x_5, x_6, x_7, x_8, x_70);
  if (lean_obj_tag(x_71) == 0)
  {
  lean_object* x_72; lean_object* x_73; lean_object* x_74; 
  x_72 = lean_ctor_get(x_71, 0);
  lean_inc(x_72);
  x_73 = lean_ctor_get(x_71, 1);
  lean_inc(x_73);
  lean_dec(x_71);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_74 = l_Lean_Elab_Term_elabTerm(x_45, x_26, x_27, x_3, x_4, x_5, x_6, x_7, x_8, x_73);
  if (lean_obj_tag(x_74) == 0)
  {
  lean_object* x_75; lean_object* x_76; lean_object* x_77; 
  x_75 = lean_ctor_get(x_74, 0);
  lean_inc(x_75);
  x_76 = lean_ctor_get(x_74, 1);
  lean_inc(x_76);
  lean_dec(x_74);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_72);
  x_77 = l_Lean_Meta_inferType(x_72, x_5, x_6, x_7, x_8, x_76);
  if (lean_obj_tag(x_77) == 0)
  {
  lean_object* x_78; lean_object* x_79; lean_object* x_80; 
  x_78 = lean_ctor_get(x_77, 0);
  lean_inc(x_78);
  x_79 = lean_ctor_get(x_77, 1);
  lean_inc(x_79);
  lean_dec(x_77);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_75);
  x_80 = l_Lean_Meta_inferType(x_75, x_5, x_6, x_7, x_8, x_79);
  if (lean_obj_tag(x_80) == 0)
  {
  lean_object* x_81; lean_object* x_82; lean_object* x_83; 
  x_81 = lean_ctor_get(x_80, 1);
  lean_inc(x_81);
  lean_dec(x_80);
  x_82 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_82, 0, x_78);
  lean_inc(x_8);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_83 = l_Lean_Elab_Term_ensureHasType(x_82, x_75, x_26, x_3, x_4, x_5, x_6, x_55, x_8, x_81);
  if (lean_obj_tag(x_83) == 0)
  {
  lean_object* x_84; lean_object* x_85; lean_object* x_86; 
  x_84 = lean_ctor_get(x_83, 0);
  lean_inc(x_84);
  x_85 = lean_ctor_get(x_83, 1);
  lean_inc(x_85);
  lean_dec(x_83);
  lean_ctor_set(x_33, 1, x_84);
  lean_ctor_set(x_33, 0, x_72);
  x_86 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_20, x_2, x_33, x_3, x_4, x_5, x_6, x_7, x_8, x_85);
  lean_dec(x_33);
  return x_86;
  }
  else
  {
  uint8_t x_87; 
  lean_dec(x_72);
  lean_free_object(x_33);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_87 = !lean_is_exclusive(x_83);
  if (x_87 == 0)
  {
  return x_83;
  }
  else
  {
  lean_object* x_88; lean_object* x_89; lean_object* x_90; 
  x_88 = lean_ctor_get(x_83, 0);
  x_89 = lean_ctor_get(x_83, 1);
  lean_inc(x_89);
  lean_inc(x_88);
  lean_dec(x_83);
  x_90 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_90, 0, x_88);
  lean_ctor_set(x_90, 1, x_89);
  return x_90;
  }
  }
  }
  else
  {
  uint8_t x_91; 
  lean_dec(x_78);
  lean_dec(x_75);
  lean_dec(x_72);
  lean_dec(x_55);
  lean_free_object(x_33);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_91 = !lean_is_exclusive(x_80);
  if (x_91 == 0)
  {
  return x_80;
  }
  else
  {
  lean_object* x_92; lean_object* x_93; lean_object* x_94; 
  x_92 = lean_ctor_get(x_80, 0);
  x_93 = lean_ctor_get(x_80, 1);
  lean_inc(x_93);
  lean_inc(x_92);
  lean_dec(x_80);
  x_94 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_94, 0, x_92);
  lean_ctor_set(x_94, 1, x_93);
  return x_94;
  }
  }
  }
  else
  {
  uint8_t x_95; 
  lean_dec(x_75);
  lean_dec(x_72);
  lean_dec(x_55);
  lean_free_object(x_33);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_95 = !lean_is_exclusive(x_77);
  if (x_95 == 0)
  {
  return x_77;
  }
  else
  {
  lean_object* x_96; lean_object* x_97; lean_object* x_98; 
  x_96 = lean_ctor_get(x_77, 0);
  x_97 = lean_ctor_get(x_77, 1);
  lean_inc(x_97);
  lean_inc(x_96);
  lean_dec(x_77);
  x_98 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_98, 0, x_96);
  lean_ctor_set(x_98, 1, x_97);
  return x_98;
  }
  }
  }
  else
  {
  uint8_t x_99; 
  lean_dec(x_72);
  lean_dec(x_55);
  lean_free_object(x_33);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_99 = !lean_is_exclusive(x_74);
  if (x_99 == 0)
  {
  return x_74;
  }
  else
  {
  lean_object* x_100; lean_object* x_101; lean_object* x_102; 
  x_100 = lean_ctor_get(x_74, 0);
  x_101 = lean_ctor_get(x_74, 1);
  lean_inc(x_101);
  lean_inc(x_100);
  lean_dec(x_74);
  x_102 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_102, 0, x_100);
  lean_ctor_set(x_102, 1, x_101);
  return x_102;
  }
  }
  }
  else
  {
  uint8_t x_103; 
  lean_dec(x_55);
  lean_dec(x_45);
  lean_free_object(x_33);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_103 = !lean_is_exclusive(x_71);
  if (x_103 == 0)
  {
  return x_71;
  }
  else
  {
  lean_object* x_104; lean_object* x_105; lean_object* x_106; 
  x_104 = lean_ctor_get(x_71, 0);
  x_105 = lean_ctor_get(x_71, 1);
  lean_inc(x_105);
  lean_inc(x_104);
  lean_dec(x_71);
  x_106 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_106, 0, x_104);
  lean_ctor_set(x_106, 1, x_105);
  return x_106;
  }
  }
  }
  }
  }
  else
  {
  uint8_t x_107; 
  lean_dec(x_39);
  lean_free_object(x_33);
  lean_dec(x_37);
  lean_dec(x_36);
  lean_dec(x_25);
  lean_dec(x_22);
  lean_free_object(x_14);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_107 = !lean_is_exclusive(x_41);
  if (x_107 == 0)
  {
  return x_41;
  }
  else
  {
  lean_object* x_108; lean_object* x_109; lean_object* x_110; 
  x_108 = lean_ctor_get(x_41, 0);
  x_109 = lean_ctor_get(x_41, 1);
  lean_inc(x_109);
  lean_inc(x_108);
  lean_dec(x_41);
  x_110 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_110, 0, x_108);
  lean_ctor_set(x_110, 1, x_109);
  return x_110;
  }
  }
  }
  else
  {
  uint8_t x_111; 
  lean_free_object(x_33);
  lean_dec(x_37);
  lean_dec(x_36);
  lean_dec(x_25);
  lean_dec(x_22);
  lean_free_object(x_14);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_111 = !lean_is_exclusive(x_38);
  if (x_111 == 0)
  {
  return x_38;
  }
  else
  {
  lean_object* x_112; lean_object* x_113; lean_object* x_114; 
  x_112 = lean_ctor_get(x_38, 0);
  x_113 = lean_ctor_get(x_38, 1);
  lean_inc(x_113);
  lean_inc(x_112);
  lean_dec(x_38);
  x_114 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_114, 0, x_112);
  lean_ctor_set(x_114, 1, x_113);
  return x_114;
  }
  }
  }
  else
  {
  lean_object* x_115; lean_object* x_116; lean_object* x_117; 
  x_115 = lean_ctor_get(x_33, 0);
  x_116 = lean_ctor_get(x_33, 1);
  lean_inc(x_116);
  lean_inc(x_115);
  lean_dec(x_33);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_115);
  x_117 = l_Lean_Meta_inferType(x_115, x_5, x_6, x_7, x_8, x_34);
  if (lean_obj_tag(x_117) == 0)
  {
  lean_object* x_118; lean_object* x_119; lean_object* x_120; 
  x_118 = lean_ctor_get(x_117, 0);
  lean_inc(x_118);
  x_119 = lean_ctor_get(x_117, 1);
  lean_inc(x_119);
  lean_dec(x_117);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_116);
  x_120 = l_Lean_Meta_inferType(x_116, x_5, x_6, x_7, x_8, x_119);
  if (lean_obj_tag(x_120) == 0)
  {
  lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; 
  x_121 = lean_ctor_get(x_120, 0);
  lean_inc(x_121);
  x_122 = lean_ctor_get(x_120, 1);
  lean_inc(x_122);
  lean_dec(x_120);
  x_123 = lean_unsigned_to_nat(3u);
  x_124 = l_Lean_Syntax_getArg(x_1, x_123);
  lean_dec(x_1);
  lean_ctor_set(x_14, 0, x_118);
  x_125 = lean_ctor_get(x_7, 0);
  lean_inc(x_125);
  x_126 = lean_ctor_get(x_7, 1);
  lean_inc(x_126);
  x_127 = lean_ctor_get(x_7, 2);
  lean_inc(x_127);
  x_128 = lean_ctor_get(x_7, 3);
  lean_inc(x_128);
  x_129 = lean_ctor_get(x_7, 4);
  lean_inc(x_129);
  x_130 = lean_ctor_get(x_7, 5);
  lean_inc(x_130);
  x_131 = lean_ctor_get(x_7, 6);
  lean_inc(x_131);
  x_132 = lean_ctor_get(x_7, 7);
  lean_inc(x_132);
  x_133 = l_Lean_replaceRef(x_124, x_128);
  lean_inc(x_132);
  lean_inc(x_131);
  lean_inc(x_130);
  lean_inc(x_129);
  lean_inc(x_127);
  lean_inc(x_126);
  lean_inc(x_125);
  x_134 = lean_alloc_ctor(0, 8, 0);
  lean_ctor_set(x_134, 0, x_125);
  lean_ctor_set(x_134, 1, x_126);
  lean_ctor_set(x_134, 2, x_127);
  lean_ctor_set(x_134, 3, x_133);
  lean_ctor_set(x_134, 4, x_129);
  lean_ctor_set(x_134, 5, x_130);
  lean_ctor_set(x_134, 6, x_131);
  lean_ctor_set(x_134, 7, x_132);
  lean_inc(x_8);
  lean_inc(x_134);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_116);
  x_135 = l_Lean_Elab_Term_ensureHasType(x_14, x_116, x_26, x_3, x_4, x_5, x_6, x_134, x_8, x_122);
  if (lean_obj_tag(x_135) == 0)
  {
  lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; 
  lean_dec(x_134);
  lean_dec(x_132);
  lean_dec(x_131);
  lean_dec(x_130);
  lean_dec(x_129);
  lean_dec(x_128);
  lean_dec(x_127);
  lean_dec(x_126);
  lean_dec(x_125);
  lean_dec(x_124);
  lean_dec(x_121);
  lean_dec(x_116);
  lean_dec(x_25);
  lean_dec(x_22);
  x_136 = lean_ctor_get(x_135, 0);
  lean_inc(x_136);
  x_137 = lean_ctor_get(x_135, 1);
  lean_inc(x_137);
  lean_dec(x_135);
  x_138 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_138, 0, x_115);
  lean_ctor_set(x_138, 1, x_136);
  x_139 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_20, x_2, x_138, x_3, x_4, x_5, x_6, x_7, x_8, x_137);
  lean_dec(x_138);
  return x_139;
  }
  else
  {
  lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; 
  x_140 = lean_ctor_get(x_135, 1);
  lean_inc(x_140);
  lean_dec(x_135);
  x_141 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_141, 0, x_121);
  x_142 = l_Lean_replaceRef(x_25, x_128);
  lean_dec(x_128);
  x_143 = lean_alloc_ctor(0, 8, 0);
  lean_ctor_set(x_143, 0, x_125);
  lean_ctor_set(x_143, 1, x_126);
  lean_ctor_set(x_143, 2, x_127);
  lean_ctor_set(x_143, 3, x_142);
  lean_ctor_set(x_143, 4, x_129);
  lean_ctor_set(x_143, 5, x_130);
  lean_ctor_set(x_143, 6, x_131);
  lean_ctor_set(x_143, 7, x_132);
  lean_inc(x_8);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_144 = l_Lean_Elab_Term_ensureHasType(x_141, x_115, x_26, x_3, x_4, x_5, x_6, x_143, x_8, x_140);
  if (lean_obj_tag(x_144) == 0)
  {
  lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; 
  lean_dec(x_134);
  lean_dec(x_124);
  lean_dec(x_25);
  lean_dec(x_22);
  x_145 = lean_ctor_get(x_144, 0);
  lean_inc(x_145);
  x_146 = lean_ctor_get(x_144, 1);
  lean_inc(x_146);
  lean_dec(x_144);
  x_147 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_147, 0, x_145);
  lean_ctor_set(x_147, 1, x_116);
  x_148 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_20, x_2, x_147, x_3, x_4, x_5, x_6, x_7, x_8, x_146);
  lean_dec(x_147);
  return x_148;
  }
  else
  {
  lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; 
  lean_dec(x_116);
  x_149 = lean_ctor_get(x_144, 1);
  lean_inc(x_149);
  lean_dec(x_144);
  x_150 = l_Lean_Elab_Term_SavedState_restore(x_22, x_3, x_4, x_5, x_6, x_7, x_8, x_149);
  x_151 = lean_ctor_get(x_150, 1);
  lean_inc(x_151);
  lean_dec(x_150);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_152 = l_Lean_Elab_Term_elabTerm(x_25, x_26, x_27, x_3, x_4, x_5, x_6, x_7, x_8, x_151);
  if (lean_obj_tag(x_152) == 0)
  {
  lean_object* x_153; lean_object* x_154; lean_object* x_155; 
  x_153 = lean_ctor_get(x_152, 0);
  lean_inc(x_153);
  x_154 = lean_ctor_get(x_152, 1);
  lean_inc(x_154);
  lean_dec(x_152);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_155 = l_Lean_Elab_Term_elabTerm(x_124, x_26, x_27, x_3, x_4, x_5, x_6, x_7, x_8, x_154);
  if (lean_obj_tag(x_155) == 0)
  {
  lean_object* x_156; lean_object* x_157; lean_object* x_158; 
  x_156 = lean_ctor_get(x_155, 0);
  lean_inc(x_156);
  x_157 = lean_ctor_get(x_155, 1);
  lean_inc(x_157);
  lean_dec(x_155);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_153);
  x_158 = l_Lean_Meta_inferType(x_153, x_5, x_6, x_7, x_8, x_157);
  if (lean_obj_tag(x_158) == 0)
  {
  lean_object* x_159; lean_object* x_160; lean_object* x_161; 
  x_159 = lean_ctor_get(x_158, 0);
  lean_inc(x_159);
  x_160 = lean_ctor_get(x_158, 1);
  lean_inc(x_160);
  lean_dec(x_158);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_156);
  x_161 = l_Lean_Meta_inferType(x_156, x_5, x_6, x_7, x_8, x_160);
  if (lean_obj_tag(x_161) == 0)
  {
  lean_object* x_162; lean_object* x_163; lean_object* x_164; 
  x_162 = lean_ctor_get(x_161, 1);
  lean_inc(x_162);
  lean_dec(x_161);
  x_163 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_163, 0, x_159);
  lean_inc(x_8);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_164 = l_Lean_Elab_Term_ensureHasType(x_163, x_156, x_26, x_3, x_4, x_5, x_6, x_134, x_8, x_162);
  if (lean_obj_tag(x_164) == 0)
  {
  lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; 
  x_165 = lean_ctor_get(x_164, 0);
  lean_inc(x_165);
  x_166 = lean_ctor_get(x_164, 1);
  lean_inc(x_166);
  lean_dec(x_164);
  x_167 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_167, 0, x_153);
  lean_ctor_set(x_167, 1, x_165);
  x_168 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_20, x_2, x_167, x_3, x_4, x_5, x_6, x_7, x_8, x_166);
  lean_dec(x_167);
  return x_168;
  }
  else
  {
  lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; 
  lean_dec(x_153);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_169 = lean_ctor_get(x_164, 0);
  lean_inc(x_169);
  x_170 = lean_ctor_get(x_164, 1);
  lean_inc(x_170);
  if (lean_is_exclusive(x_164)) {
   lean_ctor_release(x_164, 0);
   lean_ctor_release(x_164, 1);
   x_171 = x_164;
  } else {
   lean_dec_ref(x_164);
   x_171 = lean_box(0);
  }
  if (lean_is_scalar(x_171)) {
   x_172 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_172 = x_171;
  }
  lean_ctor_set(x_172, 0, x_169);
  lean_ctor_set(x_172, 1, x_170);
  return x_172;
  }
  }
  else
  {
  lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; 
  lean_dec(x_159);
  lean_dec(x_156);
  lean_dec(x_153);
  lean_dec(x_134);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_173 = lean_ctor_get(x_161, 0);
  lean_inc(x_173);
  x_174 = lean_ctor_get(x_161, 1);
  lean_inc(x_174);
  if (lean_is_exclusive(x_161)) {
   lean_ctor_release(x_161, 0);
   lean_ctor_release(x_161, 1);
   x_175 = x_161;
  } else {
   lean_dec_ref(x_161);
   x_175 = lean_box(0);
  }
  if (lean_is_scalar(x_175)) {
   x_176 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_176 = x_175;
  }
  lean_ctor_set(x_176, 0, x_173);
  lean_ctor_set(x_176, 1, x_174);
  return x_176;
  }
  }
  else
  {
  lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; 
  lean_dec(x_156);
  lean_dec(x_153);
  lean_dec(x_134);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_177 = lean_ctor_get(x_158, 0);
  lean_inc(x_177);
  x_178 = lean_ctor_get(x_158, 1);
  lean_inc(x_178);
  if (lean_is_exclusive(x_158)) {
   lean_ctor_release(x_158, 0);
   lean_ctor_release(x_158, 1);
   x_179 = x_158;
  } else {
   lean_dec_ref(x_158);
   x_179 = lean_box(0);
  }
  if (lean_is_scalar(x_179)) {
   x_180 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_180 = x_179;
  }
  lean_ctor_set(x_180, 0, x_177);
  lean_ctor_set(x_180, 1, x_178);
  return x_180;
  }
  }
  else
  {
  lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; 
  lean_dec(x_153);
  lean_dec(x_134);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_181 = lean_ctor_get(x_155, 0);
  lean_inc(x_181);
  x_182 = lean_ctor_get(x_155, 1);
  lean_inc(x_182);
  if (lean_is_exclusive(x_155)) {
   lean_ctor_release(x_155, 0);
   lean_ctor_release(x_155, 1);
   x_183 = x_155;
  } else {
   lean_dec_ref(x_155);
   x_183 = lean_box(0);
  }
  if (lean_is_scalar(x_183)) {
   x_184 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_184 = x_183;
  }
  lean_ctor_set(x_184, 0, x_181);
  lean_ctor_set(x_184, 1, x_182);
  return x_184;
  }
  }
  else
  {
  lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; 
  lean_dec(x_134);
  lean_dec(x_124);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_185 = lean_ctor_get(x_152, 0);
  lean_inc(x_185);
  x_186 = lean_ctor_get(x_152, 1);
  lean_inc(x_186);
  if (lean_is_exclusive(x_152)) {
   lean_ctor_release(x_152, 0);
   lean_ctor_release(x_152, 1);
   x_187 = x_152;
  } else {
   lean_dec_ref(x_152);
   x_187 = lean_box(0);
  }
  if (lean_is_scalar(x_187)) {
   x_188 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_188 = x_187;
  }
  lean_ctor_set(x_188, 0, x_185);
  lean_ctor_set(x_188, 1, x_186);
  return x_188;
  }
  }
  }
  }
  else
  {
  lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; 
  lean_dec(x_118);
  lean_dec(x_116);
  lean_dec(x_115);
  lean_dec(x_25);
  lean_dec(x_22);
  lean_free_object(x_14);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_189 = lean_ctor_get(x_120, 0);
  lean_inc(x_189);
  x_190 = lean_ctor_get(x_120, 1);
  lean_inc(x_190);
  if (lean_is_exclusive(x_120)) {
   lean_ctor_release(x_120, 0);
   lean_ctor_release(x_120, 1);
   x_191 = x_120;
  } else {
   lean_dec_ref(x_120);
   x_191 = lean_box(0);
  }
  if (lean_is_scalar(x_191)) {
   x_192 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_192 = x_191;
  }
  lean_ctor_set(x_192, 0, x_189);
  lean_ctor_set(x_192, 1, x_190);
  return x_192;
  }
  }
  else
  {
  lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; 
  lean_dec(x_116);
  lean_dec(x_115);
  lean_dec(x_25);
  lean_dec(x_22);
  lean_free_object(x_14);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_193 = lean_ctor_get(x_117, 0);
  lean_inc(x_193);
  x_194 = lean_ctor_get(x_117, 1);
  lean_inc(x_194);
  if (lean_is_exclusive(x_117)) {
   lean_ctor_release(x_117, 0);
   lean_ctor_release(x_117, 1);
   x_195 = x_117;
  } else {
   lean_dec_ref(x_117);
   x_195 = lean_box(0);
  }
  if (lean_is_scalar(x_195)) {
   x_196 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_196 = x_195;
  }
  lean_ctor_set(x_196, 0, x_193);
  lean_ctor_set(x_196, 1, x_194);
  return x_196;
  }
  }
  }
  else
  {
  uint8_t x_197; 
  lean_dec(x_25);
  lean_dec(x_22);
  lean_free_object(x_14);
  lean_dec(x_20);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_197 = !lean_is_exclusive(x_32);
  if (x_197 == 0)
  {
  return x_32;
  }
  else
  {
  lean_object* x_198; lean_object* x_199; lean_object* x_200; 
  x_198 = lean_ctor_get(x_32, 0);
  x_199 = lean_ctor_get(x_32, 1);
  lean_inc(x_199);
  lean_inc(x_198);
  lean_dec(x_32);
  x_200 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_200, 0, x_198);
  lean_ctor_set(x_200, 1, x_199);
  return x_200;
  }
  }
  }
  else
  {
  lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; uint8_t x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; 
  x_201 = lean_ctor_get(x_14, 0);
  lean_inc(x_201);
  lean_dec(x_14);
  x_202 = l_Lean_Elab_Term_saveAllState___rarg(x_4, x_5, x_6, x_7, x_8, x_18);
  x_203 = lean_ctor_get(x_202, 0);
  lean_inc(x_203);
  x_204 = lean_ctor_get(x_202, 1);
  lean_inc(x_204);
  lean_dec(x_202);
  x_205 = lean_unsigned_to_nat(2u);
  x_206 = l_Lean_Syntax_getArg(x_1, x_205);
  x_207 = lean_box(0);
  x_208 = 1;
  x_209 = lean_box(x_208);
  lean_inc(x_206);
  x_210 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTerm___boxed), 10, 3);
  lean_closure_set(x_210, 0, x_206);
  lean_closure_set(x_210, 1, x_207);
  lean_closure_set(x_210, 2, x_209);
  lean_inc(x_1);
  x_211 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinRel___lambda__2___boxed), 10, 2);
  lean_closure_set(x_211, 0, x_1);
  lean_closure_set(x_211, 1, x_207);
  x_212 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2);
  lean_closure_set(x_212, 0, x_210);
  lean_closure_set(x_212, 1, x_211);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_213 = l_Lean_Elab_Term_withSynthesize___rarg(x_212, x_208, x_3, x_4, x_5, x_6, x_7, x_8, x_204);
  if (lean_obj_tag(x_213) == 0)
  {
  lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; 
  x_214 = lean_ctor_get(x_213, 0);
  lean_inc(x_214);
  x_215 = lean_ctor_get(x_213, 1);
  lean_inc(x_215);
  lean_dec(x_213);
  x_216 = lean_ctor_get(x_214, 0);
  lean_inc(x_216);
  x_217 = lean_ctor_get(x_214, 1);
  lean_inc(x_217);
  if (lean_is_exclusive(x_214)) {
   lean_ctor_release(x_214, 0);
   lean_ctor_release(x_214, 1);
   x_218 = x_214;
  } else {
   lean_dec_ref(x_214);
   x_218 = lean_box(0);
  }
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_216);
  x_219 = l_Lean_Meta_inferType(x_216, x_5, x_6, x_7, x_8, x_215);
  if (lean_obj_tag(x_219) == 0)
  {
  lean_object* x_220; lean_object* x_221; lean_object* x_222; 
  x_220 = lean_ctor_get(x_219, 0);
  lean_inc(x_220);
  x_221 = lean_ctor_get(x_219, 1);
  lean_inc(x_221);
  lean_dec(x_219);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_217);
  x_222 = l_Lean_Meta_inferType(x_217, x_5, x_6, x_7, x_8, x_221);
  if (lean_obj_tag(x_222) == 0)
  {
  lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; 
  x_223 = lean_ctor_get(x_222, 0);
  lean_inc(x_223);
  x_224 = lean_ctor_get(x_222, 1);
  lean_inc(x_224);
  lean_dec(x_222);
  x_225 = lean_unsigned_to_nat(3u);
  x_226 = l_Lean_Syntax_getArg(x_1, x_225);
  lean_dec(x_1);
  x_227 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_227, 0, x_220);
  x_228 = lean_ctor_get(x_7, 0);
  lean_inc(x_228);
  x_229 = lean_ctor_get(x_7, 1);
  lean_inc(x_229);
  x_230 = lean_ctor_get(x_7, 2);
  lean_inc(x_230);
  x_231 = lean_ctor_get(x_7, 3);
  lean_inc(x_231);
  x_232 = lean_ctor_get(x_7, 4);
  lean_inc(x_232);
  x_233 = lean_ctor_get(x_7, 5);
  lean_inc(x_233);
  x_234 = lean_ctor_get(x_7, 6);
  lean_inc(x_234);
  x_235 = lean_ctor_get(x_7, 7);
  lean_inc(x_235);
  x_236 = l_Lean_replaceRef(x_226, x_231);
  lean_inc(x_235);
  lean_inc(x_234);
  lean_inc(x_233);
  lean_inc(x_232);
  lean_inc(x_230);
  lean_inc(x_229);
  lean_inc(x_228);
  x_237 = lean_alloc_ctor(0, 8, 0);
  lean_ctor_set(x_237, 0, x_228);
  lean_ctor_set(x_237, 1, x_229);
  lean_ctor_set(x_237, 2, x_230);
  lean_ctor_set(x_237, 3, x_236);
  lean_ctor_set(x_237, 4, x_232);
  lean_ctor_set(x_237, 5, x_233);
  lean_ctor_set(x_237, 6, x_234);
  lean_ctor_set(x_237, 7, x_235);
  lean_inc(x_8);
  lean_inc(x_237);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_217);
  x_238 = l_Lean_Elab_Term_ensureHasType(x_227, x_217, x_207, x_3, x_4, x_5, x_6, x_237, x_8, x_224);
  if (lean_obj_tag(x_238) == 0)
  {
  lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; 
  lean_dec(x_237);
  lean_dec(x_235);
  lean_dec(x_234);
  lean_dec(x_233);
  lean_dec(x_232);
  lean_dec(x_231);
  lean_dec(x_230);
  lean_dec(x_229);
  lean_dec(x_228);
  lean_dec(x_226);
  lean_dec(x_223);
  lean_dec(x_217);
  lean_dec(x_206);
  lean_dec(x_203);
  x_239 = lean_ctor_get(x_238, 0);
  lean_inc(x_239);
  x_240 = lean_ctor_get(x_238, 1);
  lean_inc(x_240);
  lean_dec(x_238);
  if (lean_is_scalar(x_218)) {
   x_241 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_241 = x_218;
  }
  lean_ctor_set(x_241, 0, x_216);
  lean_ctor_set(x_241, 1, x_239);
  x_242 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_201, x_2, x_241, x_3, x_4, x_5, x_6, x_7, x_8, x_240);
  lean_dec(x_241);
  return x_242;
  }
  else
  {
  lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; 
  x_243 = lean_ctor_get(x_238, 1);
  lean_inc(x_243);
  lean_dec(x_238);
  x_244 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_244, 0, x_223);
  x_245 = l_Lean_replaceRef(x_206, x_231);
  lean_dec(x_231);
  x_246 = lean_alloc_ctor(0, 8, 0);
  lean_ctor_set(x_246, 0, x_228);
  lean_ctor_set(x_246, 1, x_229);
  lean_ctor_set(x_246, 2, x_230);
  lean_ctor_set(x_246, 3, x_245);
  lean_ctor_set(x_246, 4, x_232);
  lean_ctor_set(x_246, 5, x_233);
  lean_ctor_set(x_246, 6, x_234);
  lean_ctor_set(x_246, 7, x_235);
  lean_inc(x_8);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_247 = l_Lean_Elab_Term_ensureHasType(x_244, x_216, x_207, x_3, x_4, x_5, x_6, x_246, x_8, x_243);
  if (lean_obj_tag(x_247) == 0)
  {
  lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; 
  lean_dec(x_237);
  lean_dec(x_226);
  lean_dec(x_206);
  lean_dec(x_203);
  x_248 = lean_ctor_get(x_247, 0);
  lean_inc(x_248);
  x_249 = lean_ctor_get(x_247, 1);
  lean_inc(x_249);
  lean_dec(x_247);
  if (lean_is_scalar(x_218)) {
   x_250 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_250 = x_218;
  }
  lean_ctor_set(x_250, 0, x_248);
  lean_ctor_set(x_250, 1, x_217);
  x_251 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_201, x_2, x_250, x_3, x_4, x_5, x_6, x_7, x_8, x_249);
  lean_dec(x_250);
  return x_251;
  }
  else
  {
  lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; 
  lean_dec(x_217);
  x_252 = lean_ctor_get(x_247, 1);
  lean_inc(x_252);
  lean_dec(x_247);
  x_253 = l_Lean_Elab_Term_SavedState_restore(x_203, x_3, x_4, x_5, x_6, x_7, x_8, x_252);
  x_254 = lean_ctor_get(x_253, 1);
  lean_inc(x_254);
  lean_dec(x_253);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_255 = l_Lean_Elab_Term_elabTerm(x_206, x_207, x_208, x_3, x_4, x_5, x_6, x_7, x_8, x_254);
  if (lean_obj_tag(x_255) == 0)
  {
  lean_object* x_256; lean_object* x_257; lean_object* x_258; 
  x_256 = lean_ctor_get(x_255, 0);
  lean_inc(x_256);
  x_257 = lean_ctor_get(x_255, 1);
  lean_inc(x_257);
  lean_dec(x_255);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_258 = l_Lean_Elab_Term_elabTerm(x_226, x_207, x_208, x_3, x_4, x_5, x_6, x_7, x_8, x_257);
  if (lean_obj_tag(x_258) == 0)
  {
  lean_object* x_259; lean_object* x_260; lean_object* x_261; 
  x_259 = lean_ctor_get(x_258, 0);
  lean_inc(x_259);
  x_260 = lean_ctor_get(x_258, 1);
  lean_inc(x_260);
  lean_dec(x_258);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_256);
  x_261 = l_Lean_Meta_inferType(x_256, x_5, x_6, x_7, x_8, x_260);
  if (lean_obj_tag(x_261) == 0)
  {
  lean_object* x_262; lean_object* x_263; lean_object* x_264; 
  x_262 = lean_ctor_get(x_261, 0);
  lean_inc(x_262);
  x_263 = lean_ctor_get(x_261, 1);
  lean_inc(x_263);
  lean_dec(x_261);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_259);
  x_264 = l_Lean_Meta_inferType(x_259, x_5, x_6, x_7, x_8, x_263);
  if (lean_obj_tag(x_264) == 0)
  {
  lean_object* x_265; lean_object* x_266; lean_object* x_267; 
  x_265 = lean_ctor_get(x_264, 1);
  lean_inc(x_265);
  lean_dec(x_264);
  x_266 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_266, 0, x_262);
  lean_inc(x_8);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_267 = l_Lean_Elab_Term_ensureHasType(x_266, x_259, x_207, x_3, x_4, x_5, x_6, x_237, x_8, x_265);
  if (lean_obj_tag(x_267) == 0)
  {
  lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; 
  x_268 = lean_ctor_get(x_267, 0);
  lean_inc(x_268);
  x_269 = lean_ctor_get(x_267, 1);
  lean_inc(x_269);
  lean_dec(x_267);
  if (lean_is_scalar(x_218)) {
   x_270 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_270 = x_218;
  }
  lean_ctor_set(x_270, 0, x_256);
  lean_ctor_set(x_270, 1, x_268);
  x_271 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_201, x_2, x_270, x_3, x_4, x_5, x_6, x_7, x_8, x_269);
  lean_dec(x_270);
  return x_271;
  }
  else
  {
  lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; 
  lean_dec(x_256);
  lean_dec(x_218);
  lean_dec(x_201);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_272 = lean_ctor_get(x_267, 0);
  lean_inc(x_272);
  x_273 = lean_ctor_get(x_267, 1);
  lean_inc(x_273);
  if (lean_is_exclusive(x_267)) {
   lean_ctor_release(x_267, 0);
   lean_ctor_release(x_267, 1);
   x_274 = x_267;
  } else {
   lean_dec_ref(x_267);
   x_274 = lean_box(0);
  }
  if (lean_is_scalar(x_274)) {
   x_275 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_275 = x_274;
  }
  lean_ctor_set(x_275, 0, x_272);
  lean_ctor_set(x_275, 1, x_273);
  return x_275;
  }
  }
  else
  {
  lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; 
  lean_dec(x_262);
  lean_dec(x_259);
  lean_dec(x_256);
  lean_dec(x_237);
  lean_dec(x_218);
  lean_dec(x_201);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_276 = lean_ctor_get(x_264, 0);
  lean_inc(x_276);
  x_277 = lean_ctor_get(x_264, 1);
  lean_inc(x_277);
  if (lean_is_exclusive(x_264)) {
   lean_ctor_release(x_264, 0);
   lean_ctor_release(x_264, 1);
   x_278 = x_264;
  } else {
   lean_dec_ref(x_264);
   x_278 = lean_box(0);
  }
  if (lean_is_scalar(x_278)) {
   x_279 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_279 = x_278;
  }
  lean_ctor_set(x_279, 0, x_276);
  lean_ctor_set(x_279, 1, x_277);
  return x_279;
  }
  }
  else
  {
  lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; 
  lean_dec(x_259);
  lean_dec(x_256);
  lean_dec(x_237);
  lean_dec(x_218);
  lean_dec(x_201);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_280 = lean_ctor_get(x_261, 0);
  lean_inc(x_280);
  x_281 = lean_ctor_get(x_261, 1);
  lean_inc(x_281);
  if (lean_is_exclusive(x_261)) {
   lean_ctor_release(x_261, 0);
   lean_ctor_release(x_261, 1);
   x_282 = x_261;
  } else {
   lean_dec_ref(x_261);
   x_282 = lean_box(0);
  }
  if (lean_is_scalar(x_282)) {
   x_283 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_283 = x_282;
  }
  lean_ctor_set(x_283, 0, x_280);
  lean_ctor_set(x_283, 1, x_281);
  return x_283;
  }
  }
  else
  {
  lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; 
  lean_dec(x_256);
  lean_dec(x_237);
  lean_dec(x_218);
  lean_dec(x_201);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_284 = lean_ctor_get(x_258, 0);
  lean_inc(x_284);
  x_285 = lean_ctor_get(x_258, 1);
  lean_inc(x_285);
  if (lean_is_exclusive(x_258)) {
   lean_ctor_release(x_258, 0);
   lean_ctor_release(x_258, 1);
   x_286 = x_258;
  } else {
   lean_dec_ref(x_258);
   x_286 = lean_box(0);
  }
  if (lean_is_scalar(x_286)) {
   x_287 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_287 = x_286;
  }
  lean_ctor_set(x_287, 0, x_284);
  lean_ctor_set(x_287, 1, x_285);
  return x_287;
  }
  }
  else
  {
  lean_object* x_288; lean_object* x_289; lean_object* x_290; lean_object* x_291; 
  lean_dec(x_237);
  lean_dec(x_226);
  lean_dec(x_218);
  lean_dec(x_201);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_288 = lean_ctor_get(x_255, 0);
  lean_inc(x_288);
  x_289 = lean_ctor_get(x_255, 1);
  lean_inc(x_289);
  if (lean_is_exclusive(x_255)) {
   lean_ctor_release(x_255, 0);
   lean_ctor_release(x_255, 1);
   x_290 = x_255;
  } else {
   lean_dec_ref(x_255);
   x_290 = lean_box(0);
  }
  if (lean_is_scalar(x_290)) {
   x_291 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_291 = x_290;
  }
  lean_ctor_set(x_291, 0, x_288);
  lean_ctor_set(x_291, 1, x_289);
  return x_291;
  }
  }
  }
  }
  else
  {
  lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_object* x_295; 
  lean_dec(x_220);
  lean_dec(x_218);
  lean_dec(x_217);
  lean_dec(x_216);
  lean_dec(x_206);
  lean_dec(x_203);
  lean_dec(x_201);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_292 = lean_ctor_get(x_222, 0);
  lean_inc(x_292);
  x_293 = lean_ctor_get(x_222, 1);
  lean_inc(x_293);
  if (lean_is_exclusive(x_222)) {
   lean_ctor_release(x_222, 0);
   lean_ctor_release(x_222, 1);
   x_294 = x_222;
  } else {
   lean_dec_ref(x_222);
   x_294 = lean_box(0);
  }
  if (lean_is_scalar(x_294)) {
   x_295 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_295 = x_294;
  }
  lean_ctor_set(x_295, 0, x_292);
  lean_ctor_set(x_295, 1, x_293);
  return x_295;
  }
  }
  else
  {
  lean_object* x_296; lean_object* x_297; lean_object* x_298; lean_object* x_299; 
  lean_dec(x_218);
  lean_dec(x_217);
  lean_dec(x_216);
  lean_dec(x_206);
  lean_dec(x_203);
  lean_dec(x_201);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_296 = lean_ctor_get(x_219, 0);
  lean_inc(x_296);
  x_297 = lean_ctor_get(x_219, 1);
  lean_inc(x_297);
  if (lean_is_exclusive(x_219)) {
   lean_ctor_release(x_219, 0);
   lean_ctor_release(x_219, 1);
   x_298 = x_219;
  } else {
   lean_dec_ref(x_219);
   x_298 = lean_box(0);
  }
  if (lean_is_scalar(x_298)) {
   x_299 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_299 = x_298;
  }
  lean_ctor_set(x_299, 0, x_296);
  lean_ctor_set(x_299, 1, x_297);
  return x_299;
  }
  }
  else
  {
  lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303; 
  lean_dec(x_206);
  lean_dec(x_203);
  lean_dec(x_201);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_300 = lean_ctor_get(x_213, 0);
  lean_inc(x_300);
  x_301 = lean_ctor_get(x_213, 1);
  lean_inc(x_301);
  if (lean_is_exclusive(x_213)) {
   lean_ctor_release(x_213, 0);
   lean_ctor_release(x_213, 1);
   x_302 = x_213;
  } else {
   lean_dec_ref(x_213);
   x_302 = lean_box(0);
  }
  if (lean_is_scalar(x_302)) {
   x_303 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_303 = x_302;
  }
  lean_ctor_set(x_303, 0, x_300);
  lean_ctor_set(x_303, 1, x_301);
  return x_303;
  }
  }
  }
  }
  else
  {
  uint8_t x_304; 
  lean_dec(x_11);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_304 = !lean_is_exclusive(x_13);
  if (x_304 == 0)
  {
  return x_13;
  }
  else
  {
  lean_object* x_305; lean_object* x_306; lean_object* x_307; 
  x_305 = lean_ctor_get(x_13, 0);
  x_306 = lean_ctor_get(x_13, 1);
  lean_inc(x_306);
  lean_inc(x_305);
  lean_dec(x_13);
  x_307 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_307, 0, x_305);
  lean_ctor_set(x_307, 1, x_306);
  return x_307;
  }
  }
  }
  }
  lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabBinRel___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  x_9 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabBinRel___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_9;
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
  _start:
  {
  lean_object* x_11; 
  x_11 = l_Lean_Elab_Term_elabBinRel___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_11;
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
  _start:
  {
  lean_object* x_11; 
  x_11 = l_Lean_Elab_Term_elabBinRel___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
  lean_dec(x_1);
  return x_11;
  }
  }
  lean_object* l_Lean_Elab_Term_elabBinRel___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
  _start:
  {
  lean_object* x_11; 
  x_11 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
  lean_dec(x_3);
  return x_11;
  }
  }
  static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinRel), 9, 0);
  return x_1;
  }
  }
  lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_2 = l_Lean_Elab_Term_termElabAttribute;
  x_3 = l_myMacro____x40_Init_Notation___hyg_7052____closed__2;
  x_4 = l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__1;
  x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
  return x_5;
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  lean_object* x_4; lean_object* x_5; 
  lean_dec(x_2);
  x_4 = lean_box(0);
  x_5 = lean_apply_1(x_3, x_4);
  return x_5;
  }
  else
  {
  lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
  lean_dec(x_3);
  x_6 = lean_ctor_get(x_1, 0);
  lean_inc(x_6);
  lean_dec(x_1);
  x_7 = lean_ctor_get(x_6, 0);
  lean_inc(x_7);
  x_8 = lean_ctor_get(x_6, 1);
  lean_inc(x_8);
  lean_dec(x_6);
  x_9 = lean_apply_2(x_2, x_7, x_8);
  return x_9;
  }
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabForIn_getMonad_match__1___rarg), 3, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  lean_object* x_4; lean_object* x_5; 
  lean_dec(x_3);
  x_4 = lean_box(0);
  x_5 = lean_apply_1(x_2, x_4);
  return x_5;
  }
  else
  {
  lean_object* x_6; lean_object* x_7; 
  lean_dec(x_2);
  x_6 = lean_ctor_get(x_1, 0);
  lean_inc(x_6);
  lean_dec(x_1);
  x_7 = lean_apply_1(x_3, x_6);
  return x_7;
  }
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad_match__2(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabForIn_getMonad_match__2___rarg), 3, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  switch (lean_obj_tag(x_1)) {
  case 0:
  {
  lean_object* x_5; lean_object* x_6; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_5 = lean_box(0);
  x_6 = lean_apply_1(x_4, x_5);
  return x_6;
  }
  case 1:
  {
  lean_object* x_7; lean_object* x_8; 
  lean_dec(x_4);
  lean_dec(x_3);
  x_7 = lean_ctor_get(x_1, 0);
  lean_inc(x_7);
  lean_dec(x_1);
  x_8 = lean_apply_1(x_2, x_7);
  return x_8;
  }
  default: 
  {
  lean_object* x_9; lean_object* x_10; 
  lean_dec(x_4);
  lean_dec(x_2);
  x_9 = lean_box(0);
  x_10 = lean_apply_1(x_3, x_9);
  return x_10;
  }
  }
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabForIn_match__1___rarg), 4, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  lean_object* x_4; lean_object* x_5; 
  lean_dec(x_3);
  x_4 = lean_box(0);
  x_5 = lean_apply_1(x_2, x_4);
  return x_5;
  }
  else
  {
  lean_object* x_6; lean_object* x_7; 
  lean_dec(x_2);
  x_6 = lean_ctor_get(x_1, 0);
  lean_inc(x_6);
  lean_dec(x_1);
  x_7 = lean_apply_1(x_3, x_6);
  return x_7;
  }
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_match__2(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabForIn_match__2___rarg), 3, 0);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn_getMonad___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("invalid 'forIn!' notation, expected type is not available");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn_getMonad___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Elab_Term_elabForIn_getMonad___closed__1;
  x_2 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_2, 0, x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn_getMonad___closed__3() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Elab_Term_elabForIn_getMonad___closed__2;
  x_2 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_2, 0, x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn_getMonad___closed__4() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("invalid 'forIn!' notation, expected type is not of of the form `M α`");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn_getMonad___closed__5() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Elab_Term_elabForIn_getMonad___closed__4;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  lean_object* x_9; lean_object* x_10; 
  x_9 = l_Lean_Elab_Term_elabForIn_getMonad___closed__3;
  x_10 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_9, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_10;
  }
  else
  {
  lean_object* x_11; lean_object* x_12; 
  x_11 = lean_ctor_get(x_1, 0);
  lean_inc(x_11);
  lean_dec(x_1);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_11);
  x_12 = l_Lean_Elab_Term_isTypeApp_x3f(x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  if (lean_obj_tag(x_12) == 0)
  {
  lean_object* x_13; 
  x_13 = lean_ctor_get(x_12, 0);
  lean_inc(x_13);
  if (lean_obj_tag(x_13) == 0)
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; 
  x_14 = lean_ctor_get(x_12, 1);
  lean_inc(x_14);
  lean_dec(x_12);
  x_15 = l_Lean_indentExpr(x_11);
  x_16 = l_Lean_Elab_Term_elabForIn_getMonad___closed__5;
  x_17 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_17, 0, x_16);
  lean_ctor_set(x_17, 1, x_15);
  x_18 = l_Lean_KernelException_toMessageData___closed__15;
  x_19 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_19, 0, x_17);
  lean_ctor_set(x_19, 1, x_18);
  x_20 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_19, x_2, x_3, x_4, x_5, x_6, x_7, x_14);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_20;
  }
  else
  {
  lean_object* x_21; uint8_t x_22; 
  lean_dec(x_11);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  x_21 = lean_ctor_get(x_13, 0);
  lean_inc(x_21);
  lean_dec(x_13);
  x_22 = !lean_is_exclusive(x_12);
  if (x_22 == 0)
  {
  lean_object* x_23; lean_object* x_24; 
  x_23 = lean_ctor_get(x_12, 0);
  lean_dec(x_23);
  x_24 = lean_ctor_get(x_21, 0);
  lean_inc(x_24);
  lean_dec(x_21);
  lean_ctor_set(x_12, 0, x_24);
  return x_12;
  }
  else
  {
  lean_object* x_25; lean_object* x_26; lean_object* x_27; 
  x_25 = lean_ctor_get(x_12, 1);
  lean_inc(x_25);
  lean_dec(x_12);
  x_26 = lean_ctor_get(x_21, 0);
  lean_inc(x_26);
  lean_dec(x_21);
  x_27 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_27, 0, x_26);
  lean_ctor_set(x_27, 1, x_25);
  return x_27;
  }
  }
  }
  else
  {
  uint8_t x_28; 
  lean_dec(x_11);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  x_28 = !lean_is_exclusive(x_12);
  if (x_28 == 0)
  {
  return x_12;
  }
  else
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  x_29 = lean_ctor_get(x_12, 0);
  x_30 = lean_ctor_get(x_12, 1);
  lean_inc(x_30);
  lean_inc(x_29);
  lean_dec(x_12);
  x_31 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_31, 0, x_29);
  lean_ctor_set(x_31, 1, x_30);
  return x_31;
  }
  }
  }
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_getMonad___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  x_9 = l_Lean_Elab_Term_elabForIn_getMonad(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_3);
  return x_9;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn_throwFailure___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("failed to synthesize instance for 'forIn!' notation");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn_throwFailure___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Elab_Term_elabForIn_throwFailure___closed__1;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_throwFailure(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
  x_9 = l_Lean_indentExpr(x_1);
  x_10 = l_Lean_Elab_Term_elabForIn_throwFailure___closed__2;
  x_11 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_11, 0, x_10);
  lean_ctor_set(x_11, 1, x_9);
  x_12 = l_Lean_KernelException_toMessageData___closed__15;
  x_13 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_13, 0, x_11);
  lean_ctor_set(x_13, 1, x_12);
  x_14 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_13, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  return x_14;
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn_throwFailure___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  x_9 = l_Lean_Elab_Term_elabForIn_throwFailure(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_9;
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabForIn___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; 
  x_9 = lean_ctor_get(x_6, 3);
  x_10 = lean_ctor_get(x_2, 3);
  lean_inc(x_10);
  lean_inc(x_10);
  x_11 = l_Lean_Elab_getBetterRef(x_9, x_10);
  x_12 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_4, x_5, x_6, x_7, x_8);
  x_13 = lean_ctor_get(x_12, 0);
  lean_inc(x_13);
  x_14 = lean_ctor_get(x_12, 1);
  lean_inc(x_14);
  lean_dec(x_12);
  x_15 = l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageContextTermElabM___spec__1(x_13, x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_14);
  lean_dec(x_2);
  lean_dec(x_10);
  x_16 = !lean_is_exclusive(x_15);
  if (x_16 == 0)
  {
  lean_object* x_17; lean_object* x_18; 
  x_17 = lean_ctor_get(x_15, 0);
  x_18 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_18, 0, x_11);
  lean_ctor_set(x_18, 1, x_17);
  lean_ctor_set_tag(x_15, 1);
  lean_ctor_set(x_15, 0, x_18);
  return x_15;
  }
  else
  {
  lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
  x_19 = lean_ctor_get(x_15, 0);
  x_20 = lean_ctor_get(x_15, 1);
  lean_inc(x_20);
  lean_inc(x_19);
  lean_dec(x_15);
  x_21 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_21, 0, x_11);
  lean_ctor_set(x_21, 1, x_19);
  x_22 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_22, 0, x_21);
  lean_ctor_set(x_22, 1, x_20);
  return x_22;
  }
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___lambda__1___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("ForIn");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___lambda__1___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = l_Lean_Elab_Term_elabForIn___lambda__1___closed__1;
  x_3 = lean_name_mk_string(x_1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___lambda__1___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("forIn");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___lambda__1___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l_Lean_Elab_Term_elabForIn___lambda__1___closed__2;
  x_2 = l_Lean_Elab_Term_elabForIn___lambda__1___closed__3;
  x_3 = lean_name_mk_string(x_1, x_2);
  return x_3;
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) {
  _start:
  {
  lean_object* x_13; lean_object* x_14; 
  x_13 = lean_box(0);
  lean_inc(x_11);
  lean_inc(x_10);
  lean_inc(x_9);
  lean_inc(x_8);
  lean_inc(x_5);
  x_14 = l_Lean_Meta_trySynthInstance(x_5, x_13, x_8, x_9, x_10, x_11, x_12);
  if (lean_obj_tag(x_14) == 0)
  {
  lean_object* x_15; 
  x_15 = lean_ctor_get(x_14, 0);
  lean_inc(x_15);
  switch (lean_obj_tag(x_15)) {
  case 0:
  {
  lean_object* x_16; lean_object* x_17; 
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_16 = lean_ctor_get(x_14, 1);
  lean_inc(x_16);
  lean_dec(x_14);
  x_17 = l_Lean_Elab_Term_elabForIn_throwFailure(x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_16);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  return x_17;
  }
  case 1:
  {
  lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
  lean_dec(x_15);
  lean_dec(x_5);
  x_18 = lean_ctor_get(x_14, 1);
  lean_inc(x_18);
  lean_dec(x_14);
  x_19 = lean_box(0);
  x_20 = l_Lean_Elab_Term_elabForIn___lambda__1___closed__4;
  lean_inc(x_6);
  x_21 = l_Lean_Elab_Term_mkConst(x_20, x_19, x_6, x_7, x_8, x_9, x_10, x_11, x_18);
  if (lean_obj_tag(x_21) == 0)
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; lean_object* x_33; 
  x_22 = lean_ctor_get(x_21, 0);
  lean_inc(x_22);
  x_23 = lean_ctor_get(x_21, 1);
  lean_inc(x_23);
  lean_dec(x_21);
  x_24 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_24, 0, x_1);
  x_25 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_25, 0, x_2);
  x_26 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_26, 0, x_3);
  x_27 = l_Lean_Syntax_mkAntiquotNode___closed__9;
  x_28 = lean_array_push(x_27, x_24);
  x_29 = lean_array_push(x_28, x_25);
  x_30 = lean_array_push(x_29, x_26);
  x_31 = l_Array_empty___closed__1;
  x_32 = 0;
  x_33 = l_Lean_Elab_Term_elabAppArgs(x_22, x_31, x_30, x_4, x_32, x_32, x_6, x_7, x_8, x_9, x_10, x_11, x_23);
  return x_33;
  }
  else
  {
  uint8_t x_34; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_34 = !lean_is_exclusive(x_21);
  if (x_34 == 0)
  {
  return x_21;
  }
  else
  {
  lean_object* x_35; lean_object* x_36; lean_object* x_37; 
  x_35 = lean_ctor_get(x_21, 0);
  x_36 = lean_ctor_get(x_21, 1);
  lean_inc(x_36);
  lean_inc(x_35);
  lean_dec(x_21);
  x_37 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_37, 0, x_35);
  lean_ctor_set(x_37, 1, x_36);
  return x_37;
  }
  }
  }
  default: 
  {
  lean_object* x_38; lean_object* x_39; 
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_38 = lean_ctor_get(x_14, 1);
  lean_inc(x_38);
  lean_dec(x_14);
  x_39 = l_Lean_Elab_Term_tryPostpone(x_6, x_7, x_8, x_9, x_10, x_11, x_38);
  if (lean_obj_tag(x_39) == 0)
  {
  lean_object* x_40; lean_object* x_41; 
  x_40 = lean_ctor_get(x_39, 1);
  lean_inc(x_40);
  lean_dec(x_39);
  x_41 = l_Lean_Elab_Term_elabForIn_throwFailure(x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_40);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  return x_41;
  }
  else
  {
  uint8_t x_42; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  x_42 = !lean_is_exclusive(x_39);
  if (x_42 == 0)
  {
  return x_39;
  }
  else
  {
  lean_object* x_43; lean_object* x_44; lean_object* x_45; 
  x_43 = lean_ctor_get(x_39, 0);
  x_44 = lean_ctor_get(x_39, 1);
  lean_inc(x_44);
  lean_inc(x_43);
  lean_dec(x_39);
  x_45 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_45, 0, x_43);
  lean_ctor_set(x_45, 1, x_44);
  return x_45;
  }
  }
  }
  }
  }
  else
  {
  uint8_t x_46; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_46 = !lean_is_exclusive(x_14);
  if (x_46 == 0)
  {
  return x_14;
  }
  else
  {
  lean_object* x_47; lean_object* x_48; lean_object* x_49; 
  x_47 = lean_ctor_get(x_14, 0);
  x_48 = lean_ctor_get(x_14, 1);
  lean_inc(x_48);
  lean_inc(x_47);
  lean_dec(x_14);
  x_49 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_49, 0, x_47);
  lean_ctor_set(x_49, 1, x_48);
  return x_49;
  }
  }
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("col");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Elab_Term_elabForIn___closed__1;
  x_2 = lean_string_utf8_byte_size(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___closed__3() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; 
  x_1 = l_Lean_Elab_Term_elabForIn___closed__1;
  x_2 = lean_unsigned_to_nat(0u);
  x_3 = l_Lean_Elab_Term_elabForIn___closed__2;
  x_4 = lean_alloc_ctor(0, 3, 0);
  lean_ctor_set(x_4, 0, x_1);
  lean_ctor_set(x_4, 1, x_2);
  lean_ctor_set(x_4, 2, x_3);
  return x_4;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = l_Lean_Elab_Term_elabForIn___closed__1;
  x_3 = lean_name_mk_string(x_1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___closed__5() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("forIn!");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___closed__6() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("failed to construct 'ForIn' instance for collection");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___closed__7() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Elab_Term_elabForIn___closed__6;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___closed__8() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("\nand monad");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Elab_Term_elabForIn___closed__9() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Elab_Term_elabForIn___closed__8;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  lean_object* l_Lean_Elab_Term_elabForIn(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  lean_object* x_10; uint8_t x_11; 
  x_10 = l_Lean_Parser_Term_forInMacro___elambda__1___closed__2;
  lean_inc(x_1);
  x_11 = l_Lean_Syntax_isOfKind(x_1, x_10);
  if (x_11 == 0)
  {
  lean_object* x_12; 
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_12 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabForall___spec__1___rarg(x_9);
  return x_12;
  }
  else
  {
  lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; 
  x_13 = lean_unsigned_to_nat(1u);
  x_14 = l_Lean_Syntax_getArg(x_1, x_13);
  x_15 = lean_unsigned_to_nat(2u);
  x_16 = l_Lean_Syntax_getArg(x_1, x_15);
  x_17 = lean_unsigned_to_nat(3u);
  x_18 = l_Lean_Syntax_getArg(x_1, x_17);
  lean_dec(x_1);
  lean_inc(x_5);
  lean_inc(x_14);
  x_19 = l_Lean_Elab_Term_isLocalIdent_x3f(x_14, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
  x_20 = lean_ctor_get(x_19, 0);
  lean_inc(x_20);
  if (lean_obj_tag(x_20) == 0)
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; lean_object* x_71; 
  x_21 = lean_ctor_get(x_19, 1);
  lean_inc(x_21);
  lean_dec(x_19);
  x_22 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_quoteAutoTactic___spec__3___rarg(x_7, x_8, x_21);
  x_23 = lean_ctor_get(x_22, 0);
  lean_inc(x_23);
  x_24 = lean_ctor_get(x_22, 1);
  lean_inc(x_24);
  lean_dec(x_22);
  x_25 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_24);
  x_26 = lean_ctor_get(x_25, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get(x_25, 1);
  lean_inc(x_27);
  lean_dec(x_25);
  x_28 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_27);
  x_29 = lean_ctor_get(x_28, 0);
  lean_inc(x_29);
  x_30 = lean_ctor_get(x_28, 1);
  lean_inc(x_30);
  lean_dec(x_28);
  x_31 = l_myMacro____x40_Init_Notation___hyg_14424____closed__1;
  lean_inc(x_23);
  x_32 = lean_alloc_ctor(2, 2, 0);
  lean_ctor_set(x_32, 0, x_23);
  lean_ctor_set(x_32, 1, x_31);
  x_33 = l_Array_empty___closed__1;
  x_34 = lean_array_push(x_33, x_32);
  x_35 = l_Lean_Elab_Term_elabForIn___closed__4;
  x_36 = l_Lean_addMacroScope(x_29, x_35, x_26);
  x_37 = lean_box(0);
  x_38 = l_Lean_Elab_Term_elabForIn___closed__3;
  lean_inc(x_23);
  x_39 = lean_alloc_ctor(3, 4, 0);
  lean_ctor_set(x_39, 0, x_23);
  lean_ctor_set(x_39, 1, x_38);
  lean_ctor_set(x_39, 2, x_36);
  lean_ctor_set(x_39, 3, x_37);
  lean_inc(x_39);
  x_40 = lean_array_push(x_33, x_39);
  x_41 = l_myMacro____x40_Init_Notation___hyg_1398____closed__8;
  x_42 = lean_array_push(x_40, x_41);
  x_43 = lean_array_push(x_42, x_41);
  x_44 = l_myMacro____x40_Init_Notation___hyg_14424____closed__11;
  lean_inc(x_23);
  x_45 = lean_alloc_ctor(2, 2, 0);
  lean_ctor_set(x_45, 0, x_23);
  lean_ctor_set(x_45, 1, x_44);
  x_46 = lean_array_push(x_43, x_45);
  x_47 = lean_array_push(x_46, x_14);
  x_48 = l_myMacro____x40_Init_Notation___hyg_14424____closed__6;
  x_49 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_49, 0, x_48);
  lean_ctor_set(x_49, 1, x_47);
  x_50 = lean_array_push(x_33, x_49);
  x_51 = l_myMacro____x40_Init_Notation___hyg_14424____closed__4;
  x_52 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_52, 0, x_51);
  lean_ctor_set(x_52, 1, x_50);
  x_53 = lean_array_push(x_34, x_52);
  x_54 = l_myMacro____x40_Init_Notation___hyg_14424____closed__12;
  lean_inc(x_23);
  x_55 = lean_alloc_ctor(2, 2, 0);
  lean_ctor_set(x_55, 0, x_23);
  lean_ctor_set(x_55, 1, x_54);
  x_56 = lean_array_push(x_33, x_55);
  x_57 = l_Lean_nullKind___closed__2;
  x_58 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_58, 0, x_57);
  lean_ctor_set(x_58, 1, x_56);
  x_59 = lean_array_push(x_53, x_58);
  x_60 = l_Lean_Elab_Term_elabForIn___closed__5;
  x_61 = lean_alloc_ctor(2, 2, 0);
  lean_ctor_set(x_61, 0, x_23);
  lean_ctor_set(x_61, 1, x_60);
  x_62 = lean_array_push(x_33, x_61);
  x_63 = lean_array_push(x_62, x_39);
  x_64 = lean_array_push(x_63, x_16);
  x_65 = lean_array_push(x_64, x_18);
  x_66 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_66, 0, x_10);
  lean_ctor_set(x_66, 1, x_65);
  x_67 = lean_array_push(x_59, x_66);
  x_68 = l_myMacro____x40_Init_Notation___hyg_14424____closed__2;
  x_69 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_69, 0, x_68);
  lean_ctor_set(x_69, 1, x_67);
  x_70 = 1;
  x_71 = l_Lean_Elab_Term_elabTerm(x_69, x_2, x_70, x_3, x_4, x_5, x_6, x_7, x_8, x_30);
  return x_71;
  }
  else
  {
  lean_object* x_72; uint8_t x_73; 
  x_72 = lean_ctor_get(x_19, 1);
  lean_inc(x_72);
  lean_dec(x_19);
  x_73 = !lean_is_exclusive(x_20);
  if (x_73 == 0)
  {
  lean_object* x_74; lean_object* x_75; 
  x_74 = lean_ctor_get(x_20, 0);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_2);
  x_75 = l_Lean_Elab_Term_tryPostponeIfNoneOrMVar(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_72);
  if (lean_obj_tag(x_75) == 0)
  {
  lean_object* x_76; lean_object* x_77; 
  x_76 = lean_ctor_get(x_75, 1);
  lean_inc(x_76);
  lean_dec(x_75);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_3);
  lean_inc(x_2);
  x_77 = l_Lean_Elab_Term_elabForIn_getMonad(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_76);
  if (lean_obj_tag(x_77) == 0)
  {
  lean_object* x_78; lean_object* x_79; lean_object* x_80; 
  x_78 = lean_ctor_get(x_77, 0);
  lean_inc(x_78);
  x_79 = lean_ctor_get(x_77, 1);
  lean_inc(x_79);
  lean_dec(x_77);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  x_80 = l_Lean_Meta_inferType(x_74, x_5, x_6, x_7, x_8, x_79);
  if (lean_obj_tag(x_80) == 0)
  {
  lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; uint8_t x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; 
  x_81 = lean_ctor_get(x_80, 0);
  lean_inc(x_81);
  x_82 = lean_ctor_get(x_80, 1);
  lean_inc(x_82);
  lean_dec(x_80);
  x_83 = l_Lean_Meta_mkFreshLevelMVar___rarg(x_6, x_7, x_8, x_82);
  x_84 = lean_ctor_get(x_83, 0);
  lean_inc(x_84);
  x_85 = lean_ctor_get(x_83, 1);
  lean_inc(x_85);
  lean_dec(x_83);
  x_86 = l_Lean_mkLevelSucc(x_84);
  x_87 = l_Lean_mkSort(x_86);
  lean_ctor_set(x_20, 0, x_87);
  x_88 = 0;
  x_89 = lean_box(0);
  lean_inc(x_5);
  x_90 = l___private_Lean_Meta_Basic_0__Lean_Meta_mkFreshExprMVarImpl(x_20, x_88, x_89, x_5, x_6, x_7, x_8, x_85);
  x_91 = lean_ctor_get(x_90, 0);
  lean_inc(x_91);
  x_92 = lean_ctor_get(x_90, 1);
  lean_inc(x_92);
  lean_dec(x_90);
  x_93 = l_Lean_Syntax_mkAntiquotNode___closed__9;
  lean_inc(x_78);
  x_94 = lean_array_push(x_93, x_78);
  lean_inc(x_81);
  x_95 = lean_array_push(x_94, x_81);
  x_96 = lean_array_push(x_95, x_91);
  x_97 = l_Lean_Elab_Term_elabForIn___lambda__1___closed__2;
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  x_98 = l_Lean_Meta_mkAppM(x_97, x_96, x_5, x_6, x_7, x_8, x_92);
  if (lean_obj_tag(x_98) == 0)
  {
  lean_object* x_99; lean_object* x_100; lean_object* x_101; 
  lean_dec(x_81);
  lean_dec(x_78);
  x_99 = lean_ctor_get(x_98, 0);
  lean_inc(x_99);
  x_100 = lean_ctor_get(x_98, 1);
  lean_inc(x_100);
  lean_dec(x_98);
  x_101 = l_Lean_Elab_Term_elabForIn___lambda__1(x_14, x_16, x_18, x_2, x_99, x_3, x_4, x_5, x_6, x_7, x_8, x_100);
  return x_101;
  }
  else
  {
  lean_object* x_102; lean_object* x_103; 
  lean_dec(x_18);
  lean_dec(x_16);
  lean_dec(x_14);
  lean_dec(x_2);
  x_102 = lean_ctor_get(x_98, 1);
  lean_inc(x_102);
  lean_dec(x_98);
  x_103 = l_Lean_Elab_Term_tryPostpone(x_3, x_4, x_5, x_6, x_7, x_8, x_102);
  if (lean_obj_tag(x_103) == 0)
  {
  lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; uint8_t x_115; 
  x_104 = lean_ctor_get(x_103, 1);
  lean_inc(x_104);
  lean_dec(x_103);
  x_105 = l_Lean_indentExpr(x_81);
  x_106 = l_Lean_Elab_Term_elabForIn___closed__7;
  x_107 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_107, 0, x_106);
  lean_ctor_set(x_107, 1, x_105);
  x_108 = l_Lean_Elab_Term_elabForIn___closed__9;
  x_109 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_109, 0, x_107);
  lean_ctor_set(x_109, 1, x_108);
  x_110 = l_Lean_indentExpr(x_78);
  x_111 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_111, 0, x_109);
  lean_ctor_set(x_111, 1, x_110);
  x_112 = l_Lean_KernelException_toMessageData___closed__15;
  x_113 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_113, 0, x_111);
  lean_ctor_set(x_113, 1, x_112);
  x_114 = l_Lean_throwError___at_Lean_Elab_Term_elabForIn___spec__1(x_113, x_3, x_4, x_5, x_6, x_7, x_8, x_104);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_115 = !lean_is_exclusive(x_114);
  if (x_115 == 0)
  {
  return x_114;
  }
  else
  {
  lean_object* x_116; lean_object* x_117; lean_object* x_118; 
  x_116 = lean_ctor_get(x_114, 0);
  x_117 = lean_ctor_get(x_114, 1);
  lean_inc(x_117);
  lean_inc(x_116);
  lean_dec(x_114);
  x_118 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_118, 0, x_116);
  lean_ctor_set(x_118, 1, x_117);
  return x_118;
  }
  }
  else
  {
  uint8_t x_119; 
  lean_dec(x_81);
  lean_dec(x_78);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_119 = !lean_is_exclusive(x_103);
  if (x_119 == 0)
  {
  return x_103;
  }
  else
  {
  lean_object* x_120; lean_object* x_121; lean_object* x_122; 
  x_120 = lean_ctor_get(x_103, 0);
  x_121 = lean_ctor_get(x_103, 1);
  lean_inc(x_121);
  lean_inc(x_120);
  lean_dec(x_103);
  x_122 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_122, 0, x_120);
  lean_ctor_set(x_122, 1, x_121);
  return x_122;
  }
  }
  }
  }
  else
  {
  uint8_t x_123; 
  lean_dec(x_78);
  lean_free_object(x_20);
  lean_dec(x_18);
  lean_dec(x_16);
  lean_dec(x_14);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_123 = !lean_is_exclusive(x_80);
  if (x_123 == 0)
  {
  return x_80;
  }
  else
  {
  lean_object* x_124; lean_object* x_125; lean_object* x_126; 
  x_124 = lean_ctor_get(x_80, 0);
  x_125 = lean_ctor_get(x_80, 1);
  lean_inc(x_125);
  lean_inc(x_124);
  lean_dec(x_80);
  x_126 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_126, 0, x_124);
  lean_ctor_set(x_126, 1, x_125);
  return x_126;
  }
  }
  }
  else
  {
  uint8_t x_127; 
  lean_free_object(x_20);
  lean_dec(x_74);
  lean_dec(x_18);
  lean_dec(x_16);
  lean_dec(x_14);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_127 = !lean_is_exclusive(x_77);
  if (x_127 == 0)
  {
  return x_77;
  }
  else
  {
  lean_object* x_128; lean_object* x_129; lean_object* x_130; 
  x_128 = lean_ctor_get(x_77, 0);
  x_129 = lean_ctor_get(x_77, 1);
  lean_inc(x_129);
  lean_inc(x_128);
  lean_dec(x_77);
  x_130 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_130, 0, x_128);
  lean_ctor_set(x_130, 1, x_129);
  return x_130;
  }
  }
  }
  else
  {
  uint8_t x_131; 
  lean_free_object(x_20);
  lean_dec(x_74);
  lean_dec(x_18);
  lean_dec(x_16);
  lean_dec(x_14);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_131 = !lean_is_exclusive(x_75);
  if (x_131 == 0)
  {
  return x_75;
  }
  else
  {
  lean_object* x_132; lean_object* x_133; lean_object* x_134; 
  x_132 = lean_ctor_get(x_75, 0);
  x_133 = lean_ctor_get(x_75, 1);
  lean_inc(x_133);
  lean_inc(x_132);
  lean_dec(x_75);
  x_134 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_134, 0, x_132);
  lean_ctor_set(x_134, 1, x_133);
  return x_134;
  }
  }
  }
  else
  {
  lean_object* x_135; lean_object* x_136; 
  x_135 = lean_ctor_get(x_20, 0);
  lean_inc(x_135);
  lean_dec(x_20);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_2);
  x_136 = l_Lean_Elab_Term_tryPostponeIfNoneOrMVar(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_72);
  if (lean_obj_tag(x_136) == 0)
  {
  lean_object* x_137; lean_object* x_138; 
  x_137 = lean_ctor_get(x_136, 1);
  lean_inc(x_137);
  lean_dec(x_136);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_3);
  lean_inc(x_2);
  x_138 = l_Lean_Elab_Term_elabForIn_getMonad(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_137);
  if (lean_obj_tag(x_138) == 0)
  {
  lean_object* x_139; lean_object* x_140; lean_object* x_141; 
  x_139 = lean_ctor_get(x_138, 0);
  lean_inc(x_139);
  x_140 = lean_ctor_get(x_138, 1);
  lean_inc(x_140);
  lean_dec(x_138);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  x_141 = l_Lean_Meta_inferType(x_135, x_5, x_6, x_7, x_8, x_140);
  if (lean_obj_tag(x_141) == 0)
  {
  lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; uint8_t x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; 
  x_142 = lean_ctor_get(x_141, 0);
  lean_inc(x_142);
  x_143 = lean_ctor_get(x_141, 1);
  lean_inc(x_143);
  lean_dec(x_141);
  x_144 = l_Lean_Meta_mkFreshLevelMVar___rarg(x_6, x_7, x_8, x_143);
  x_145 = lean_ctor_get(x_144, 0);
  lean_inc(x_145);
  x_146 = lean_ctor_get(x_144, 1);
  lean_inc(x_146);
  lean_dec(x_144);
  x_147 = l_Lean_mkLevelSucc(x_145);
  x_148 = l_Lean_mkSort(x_147);
  x_149 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_149, 0, x_148);
  x_150 = 0;
  x_151 = lean_box(0);
  lean_inc(x_5);
  x_152 = l___private_Lean_Meta_Basic_0__Lean_Meta_mkFreshExprMVarImpl(x_149, x_150, x_151, x_5, x_6, x_7, x_8, x_146);
  x_153 = lean_ctor_get(x_152, 0);
  lean_inc(x_153);
  x_154 = lean_ctor_get(x_152, 1);
  lean_inc(x_154);
  lean_dec(x_152);
  x_155 = l_Lean_Syntax_mkAntiquotNode___closed__9;
  lean_inc(x_139);
  x_156 = lean_array_push(x_155, x_139);
  lean_inc(x_142);
  x_157 = lean_array_push(x_156, x_142);
  x_158 = lean_array_push(x_157, x_153);
  x_159 = l_Lean_Elab_Term_elabForIn___lambda__1___closed__2;
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  x_160 = l_Lean_Meta_mkAppM(x_159, x_158, x_5, x_6, x_7, x_8, x_154);
  if (lean_obj_tag(x_160) == 0)
  {
  lean_object* x_161; lean_object* x_162; lean_object* x_163; 
  lean_dec(x_142);
  lean_dec(x_139);
  x_161 = lean_ctor_get(x_160, 0);
  lean_inc(x_161);
  x_162 = lean_ctor_get(x_160, 1);
  lean_inc(x_162);
  lean_dec(x_160);
  x_163 = l_Lean_Elab_Term_elabForIn___lambda__1(x_14, x_16, x_18, x_2, x_161, x_3, x_4, x_5, x_6, x_7, x_8, x_162);
  return x_163;
  }
  else
  {
  lean_object* x_164; lean_object* x_165; 
  lean_dec(x_18);
  lean_dec(x_16);
  lean_dec(x_14);
  lean_dec(x_2);
  x_164 = lean_ctor_get(x_160, 1);
  lean_inc(x_164);
  lean_dec(x_160);
  x_165 = l_Lean_Elab_Term_tryPostpone(x_3, x_4, x_5, x_6, x_7, x_8, x_164);
  if (lean_obj_tag(x_165) == 0)
  {
  lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; 
  x_166 = lean_ctor_get(x_165, 1);
  lean_inc(x_166);
  lean_dec(x_165);
  x_167 = l_Lean_indentExpr(x_142);
  x_168 = l_Lean_Elab_Term_elabForIn___closed__7;
  x_169 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_169, 0, x_168);
  lean_ctor_set(x_169, 1, x_167);
  x_170 = l_Lean_Elab_Term_elabForIn___closed__9;
  x_171 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_171, 0, x_169);
  lean_ctor_set(x_171, 1, x_170);
  x_172 = l_Lean_indentExpr(x_139);
  x_173 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_173, 0, x_171);
  lean_ctor_set(x_173, 1, x_172);
  x_174 = l_Lean_KernelException_toMessageData___closed__15;
  x_175 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_175, 0, x_173);
  lean_ctor_set(x_175, 1, x_174);
  x_176 = l_Lean_throwError___at_Lean_Elab_Term_elabForIn___spec__1(x_175, x_3, x_4, x_5, x_6, x_7, x_8, x_166);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_177 = lean_ctor_get(x_176, 0);
  lean_inc(x_177);
  x_178 = lean_ctor_get(x_176, 1);
  lean_inc(x_178);
  if (lean_is_exclusive(x_176)) {
   lean_ctor_release(x_176, 0);
   lean_ctor_release(x_176, 1);
   x_179 = x_176;
  } else {
   lean_dec_ref(x_176);
   x_179 = lean_box(0);
  }
  if (lean_is_scalar(x_179)) {
   x_180 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_180 = x_179;
  }
  lean_ctor_set(x_180, 0, x_177);
  lean_ctor_set(x_180, 1, x_178);
  return x_180;
  }
  else
  {
  lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; 
  lean_dec(x_142);
  lean_dec(x_139);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_181 = lean_ctor_get(x_165, 0);
  lean_inc(x_181);
  x_182 = lean_ctor_get(x_165, 1);
  lean_inc(x_182);
  if (lean_is_exclusive(x_165)) {
   lean_ctor_release(x_165, 0);
   lean_ctor_release(x_165, 1);
   x_183 = x_165;
  } else {
   lean_dec_ref(x_165);
   x_183 = lean_box(0);
  }
  if (lean_is_scalar(x_183)) {
   x_184 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_184 = x_183;
  }
  lean_ctor_set(x_184, 0, x_181);
  lean_ctor_set(x_184, 1, x_182);
  return x_184;
  }
  }
  }
  else
  {
  lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; 
  lean_dec(x_139);
  lean_dec(x_18);
  lean_dec(x_16);
  lean_dec(x_14);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_185 = lean_ctor_get(x_141, 0);
  lean_inc(x_185);
  x_186 = lean_ctor_get(x_141, 1);
  lean_inc(x_186);
  if (lean_is_exclusive(x_141)) {
   lean_ctor_release(x_141, 0);
   lean_ctor_release(x_141, 1);
   x_187 = x_141;
  } else {
   lean_dec_ref(x_141);
   x_187 = lean_box(0);
  }
  if (lean_is_scalar(x_187)) {
   x_188 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_188 = x_187;
  }
  lean_ctor_set(x_188, 0, x_185);
  lean_ctor_set(x_188, 1, x_186);
  return x_188;
  }
  }
  else
  {
  lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; 
  lean_dec(x_135);
  lean_dec(x_18);
  lean_dec(x_16);
  lean_dec(x_14);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_189 = lean_ctor_get(x_138, 0);
  lean_inc(x_189);
  x_190 = lean_ctor_get(x_138, 1);
  lean_inc(x_190);
  if (lean_is_exclusive(x_138)) {
   lean_ctor_release(x_138, 0);
   lean_ctor_release(x_138, 1);
   x_191 = x_138;
  } else {
   lean_dec_ref(x_138);
   x_191 = lean_box(0);
  }
  if (lean_is_scalar(x_191)) {
   x_192 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_192 = x_191;
  }
  lean_ctor_set(x_192, 0, x_189);
  lean_ctor_set(x_192, 1, x_190);
  return x_192;
  }
  }
  else
  {
  lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; 
  lean_dec(x_135);
  lean_dec(x_18);
  lean_dec(x_16);
  lean_dec(x_14);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_193 = lean_ctor_get(x_136, 0);
  lean_inc(x_193);
  x_194 = lean_ctor_get(x_136, 1);
  lean_inc(x_194);
  if (lean_is_exclusive(x_136)) {
   lean_ctor_release(x_136, 0);
   lean_ctor_release(x_136, 1);
   x_195 = x_136;
  } else {
   lean_dec_ref(x_136);
   x_195 = lean_box(0);
  }
  if (lean_is_scalar(x_195)) {
   x_196 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_196 = x_195;
  }
  lean_ctor_set(x_196, 0, x_193);
  lean_ctor_set(x_196, 1, x_194);
  return x_196;
  }
  }
  }
  }
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabForIn___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  x_9 = l_Lean_throwError___at_Lean_Elab_Term_elabForIn___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_9;
  }
  }
  static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabForIn___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabForIn), 9, 0);
  return x_1;
  }
  }
  lean_object* l___regBuiltin_Lean_Elab_Term_elabForIn(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_2 = l_Lean_Elab_Term_termElabAttribute;
  x_3 = l_Lean_Parser_Term_forInMacro___elambda__1___closed__2;
  x_4 = l___regBuiltin_Lean_Elab_Term_elabForIn___closed__1;
  x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
  return x_5;
  }
  }
  lean_object* initialize_Init(lean_object*);
  lean_object* initialize_Lean_Elab_App(lean_object*);
  static bool _G_initialized = false;
  lean_object* initialize_Lean_Elab_Extra(lean_object* w) {
  lean_object * res;
  if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
  _G_initialized = true;
  res = initialize_Init(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Elab_App(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  l_Lean_Elab_Term_elabBinRel___lambda__2___closed__1 = _init_l_Lean_Elab_Term_elabBinRel___lambda__2___closed__1();
  lean_mark_persistent(l_Lean_Elab_Term_elabBinRel___lambda__2___closed__1);
  l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__1();
  lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__1);
  res = l___regBuiltin_Lean_Elab_Term_elabBinRel(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  l_Lean_Elab_Term_elabForIn_getMonad___closed__1 = _init_l_Lean_Elab_Term_elabForIn_getMonad___closed__1();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn_getMonad___closed__1);
  l_Lean_Elab_Term_elabForIn_getMonad___closed__2 = _init_l_Lean_Elab_Term_elabForIn_getMonad___closed__2();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn_getMonad___closed__2);
  l_Lean_Elab_Term_elabForIn_getMonad___closed__3 = _init_l_Lean_Elab_Term_elabForIn_getMonad___closed__3();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn_getMonad___closed__3);
  l_Lean_Elab_Term_elabForIn_getMonad___closed__4 = _init_l_Lean_Elab_Term_elabForIn_getMonad___closed__4();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn_getMonad___closed__4);
  l_Lean_Elab_Term_elabForIn_getMonad___closed__5 = _init_l_Lean_Elab_Term_elabForIn_getMonad___closed__5();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn_getMonad___closed__5);
  l_Lean_Elab_Term_elabForIn_throwFailure___closed__1 = _init_l_Lean_Elab_Term_elabForIn_throwFailure___closed__1();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn_throwFailure___closed__1);
  l_Lean_Elab_Term_elabForIn_throwFailure___closed__2 = _init_l_Lean_Elab_Term_elabForIn_throwFailure___closed__2();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn_throwFailure___closed__2);
  l_Lean_Elab_Term_elabForIn___lambda__1___closed__1 = _init_l_Lean_Elab_Term_elabForIn___lambda__1___closed__1();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___lambda__1___closed__1);
  l_Lean_Elab_Term_elabForIn___lambda__1___closed__2 = _init_l_Lean_Elab_Term_elabForIn___lambda__1___closed__2();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___lambda__1___closed__2);
  l_Lean_Elab_Term_elabForIn___lambda__1___closed__3 = _init_l_Lean_Elab_Term_elabForIn___lambda__1___closed__3();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___lambda__1___closed__3);
  l_Lean_Elab_Term_elabForIn___lambda__1___closed__4 = _init_l_Lean_Elab_Term_elabForIn___lambda__1___closed__4();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___lambda__1___closed__4);
  l_Lean_Elab_Term_elabForIn___closed__1 = _init_l_Lean_Elab_Term_elabForIn___closed__1();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___closed__1);
  l_Lean_Elab_Term_elabForIn___closed__2 = _init_l_Lean_Elab_Term_elabForIn___closed__2();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___closed__2);
  l_Lean_Elab_Term_elabForIn___closed__3 = _init_l_Lean_Elab_Term_elabForIn___closed__3();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___closed__3);
  l_Lean_Elab_Term_elabForIn___closed__4 = _init_l_Lean_Elab_Term_elabForIn___closed__4();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___closed__4);
  l_Lean_Elab_Term_elabForIn___closed__5 = _init_l_Lean_Elab_Term_elabForIn___closed__5();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___closed__5);
  l_Lean_Elab_Term_elabForIn___closed__6 = _init_l_Lean_Elab_Term_elabForIn___closed__6();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___closed__6);
  l_Lean_Elab_Term_elabForIn___closed__7 = _init_l_Lean_Elab_Term_elabForIn___closed__7();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___closed__7);
  l_Lean_Elab_Term_elabForIn___closed__8 = _init_l_Lean_Elab_Term_elabForIn___closed__8();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___closed__8);
  l_Lean_Elab_Term_elabForIn___closed__9 = _init_l_Lean_Elab_Term_elabForIn___closed__9();
  lean_mark_persistent(l_Lean_Elab_Term_elabForIn___closed__9);
  l___regBuiltin_Lean_Elab_Term_elabForIn___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_elabForIn___closed__1();
  lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabForIn___closed__1);
  res = l___regBuiltin_Lean_Elab_Term_elabForIn(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  return lean_io_result_mk_ok(lean_box(0));
  }
  #ifdef __cplusplus
  }
  #endif
  