diff --git a/stage0/src/Lean/Elab/App.lean b/stage0/src/Lean/Elab/App.lean index b39dee70e8..eddea11666 100644 --- a/stage0/src/Lean/Elab/App.lean +++ b/stage0/src/Lean/Elab/App.lean @@ -480,7 +480,7 @@ private def propagateExpectedTypeFor (f : Expr) : TermElabM Bool := | Expr.const declName .. => return !hasElabWithoutExpectedType (← getEnv) declName | _ => return true -private def elabAppArgs (f : Expr) (namedArgs : Array NamedArg) (args : Array Arg) +def elabAppArgs (f : Expr) (namedArgs : Array NamedArg) (args : Array Arg) (expectedType? : Option Expr) (explicit ellipsis : Bool) : TermElabM Expr := do let fType ← inferType f let fType ← instantiateMVars fType @@ -928,6 +928,7 @@ private def elabAtom : TermElab := fun stx expectedType? => @[builtinTermElab binrel] def elabBinRel : TermElab := fun stx expectedType? => do match (← resolveId? stx[1]) with | some f => + let s ← saveAllState let (lhs, rhs) ← withSynthesize (mayPostpone := true) do let mut lhs ← elabTerm stx[2] none let mut rhs ← elabTerm stx[3] none @@ -941,11 +942,17 @@ private def elabAtom : TermElab := fun stx expectedType? => let (lhs, rhs) ← try pure (lhs, ← withRef stx[3] do ensureHasType lhsType rhs) - catch ex => + catch _ => try pure (← withRef stx[2] do ensureHasType rhsType lhs, rhs) catch _ => - throw ex + s.restore + -- Use default approach + let lhs ← elabTerm stx[2] none + let rhs ← elabTerm stx[3] none + let lhsType ← inferType lhs + let rhsType ← inferType rhs + pure (lhs, ← withRef stx[3] do ensureHasType lhsType rhs) elabAppArgs f #[] #[Arg.expr lhs, Arg.expr rhs] expectedType? (explicit := false) (ellipsis := false) | none => throwUnknownConstant stx[1].getId diff --git a/stage0/stdlib/Lean/Elab/App.c b/stage0/stdlib/Lean/Elab/App.c index 45cdcfb6d2..7b3c9af197 100644 --- a/stage0/stdlib/Lean/Elab/App.c +++ b/stage0/stdlib/Lean/Elab/App.c @@ -45,7 +45,6 @@ lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_App_0__Lean_Elab_Te lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* l_Lean_Elab_Term_synthesizeAppInstMVars_match__1___rarg(lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValAux___closed__6; -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__3; lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_getForallBody_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkSort(lean_object*); lean_object* l_Std_fmt___at_Lean_Position_instToFormatPosition___spec__1(lean_object*); @@ -223,7 +222,6 @@ lean_object* l_Lean_Meta_getPostponed___rarg(lean_object*, lean_object*, lean_ob lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_propagateExpectedType___closed__5; lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_processExplictArg_match__2___rarg(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppLVals___closed__1; -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___boxed(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*); lean_object* lean_nat_add(lean_object*, lean_object*); 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*); @@ -234,7 +232,6 @@ lean_object* l_Lean_Elab_Term_expandApp_match__1(lean_object*); extern lean_object* l_Lean_Name_replacePrefix___closed__3; lean_object* l_Lean_throwError___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_synthesizePendingAndNormalizeFunType___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__1; lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_App_0__Lean_Elab_Term_addLValArg___spec__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*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instToStringArg_match__1(lean_object*); lean_object* l_Lean_Elab_Term_hasElabWithoutExpectedType___boxed(lean_object*, lean_object*); @@ -259,6 +256,7 @@ lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValAux___closed extern lean_object* l_Lean_Parser_Term_byTactic___elambda__1___closed__2; lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Term_expandApp___spec__4___boxed(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_elabAppArgs___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*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Util_0__Lean_Elab_evalSyntaxConstantUnsafe(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_getArgExpectedType___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppLValsAux_loop___closed__2; @@ -282,7 +280,6 @@ lean_object* l_List_map___at___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppFn lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValLoop___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___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppLVals___boxed(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*, lean_object*); lean_object* l_Lean_mkProj(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabArrayRef(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabNamedPattern___closed__1; @@ -329,7 +326,6 @@ lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_toMessageData_match__1_ lean_object* l___private_Lean_Meta_WHNF_0__Lean_Meta_whnfEasyCases___at_Lean_Meta_whnfCore___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_normalizeFunType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValAux___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*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_App_0__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_List_forIn_loop___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_synthesizePendingAndNormalizeFunType___spec__6(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_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_Meta_withoutPostponingUniverseConstraintsImp___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -361,10 +357,10 @@ lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_synthesizeP lean_object* l_Array_foldlMUnsafe___at___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppFn___spec__4___boxed(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_Std_Range_forIn_loop___at___private_Lean_Elab_App_0__Lean_Elab_Term_addLValArg___spec__2___lambda__5___boxed(lean_object**); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppFnId___boxed(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_Elab_logException___at___private_Lean_Elab_Term_0__Lean_Elab_Term_exceptionToSorry___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_expandApp_match__3___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValAux___lambda__1___closed__4; -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__4; lean_object* l___private_Lean_Meta_LevelDefEq_0__Lean_Meta_getResetPostponed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_addLValArg(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*); 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*); @@ -408,7 +404,6 @@ lean_object* l_List_forIn_loop___at___private_Lean_Elab_App_0__Lean_Elab_Term_El lean_object* l_List_forIn_loop___at___private_Lean_Elab_App_0__Lean_Elab_Term_mkBaseProjections___spec__1___closed__2; lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_toMessageData(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__2; lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValLoop_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_ElabAppArgs_synthesizeAppInstMVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_ElabAppArgs_State_instMVars___default; @@ -569,9 +564,9 @@ lean_object* l_Lean_Elab_Term_expandApp_match__1___rarg(lean_object*, lean_objec lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_addLValArg_match__3(lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_mkApp(lean_object*, 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_Lean_mkPrivateName(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_tryCoeFun_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___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*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_instMonadControlT___rarg(lean_object*, 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___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_propagateExpectedType_match__1___rarg(lean_object*, lean_object*, lean_object*); @@ -637,7 +632,7 @@ lean_object* l_Lean_Elab_getRefPos___at___private_Lean_Elab_App_0__Lean_Elab_Ter lean_object* l___regBuiltin_Lean_Elab_Term_elabChoice___closed__1; lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_finalize___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___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_getForallBody___lambda__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_9043_(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_9135_(lean_object*); lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_4_(lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppAux(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_propagateExpectedTypeFor___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -647,6 +642,7 @@ lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppLValsAux_loop(le 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*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppLValsAux_loop_match__2(lean_object*); +lean_object* l_Lean_Elab_Term_elabAppArgs___closed__4; lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_addLValArg___lambda__1___closed__4; lean_object* l_Lean_Meta_mkArrow(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; @@ -700,6 +696,7 @@ lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_synthesizeP lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppFn___boxed(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*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_synthesizePendingAndNormalizeFunType___closed__3; lean_object* l_Lean_throwError___at_Lean_Elab_Term_throwInvalidNamedArg___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabAppArgs___boxed(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*); lean_object* l_Lean_indentD(lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_hasOptAutoParams___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_Std_fmt___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__2(uint8_t); @@ -712,8 +709,10 @@ lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_App_0__Lean_Elab_Te lean_object* l_Lean_Elab_Term_registerMVarErrorImplicitArgInfo(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_Elab_Term_instMonadQuotationTermElabM___closed__1; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_App_0__Lean_Elab_Term_mergeFailures___spec__1___closed__2; +lean_object* l_Lean_Elab_Term_elabAppArgs___closed__1; lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_propagateExpectedType___closed__8; extern lean_object* l_prec_x28___x29___closed__3; +lean_object* l_Lean_Elab_Term_elabAppArgs___closed__2; lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppLValsAux___boxed(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*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_synthesizePendingAndNormalizeFunType___spec__12(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___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_anyNamedArgDependsOnCurrent___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -724,6 +723,7 @@ lean_object* l_Lean_Elab_Term_elabExplicitUnivs___lambda__1___boxed(lean_object* lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppFn___closed__1; lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_isNextArgHole_match__1(lean_object*); lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_addEtaArg___spec__1(lean_object*); +lean_object* l_Lean_Elab_Term_elabAppArgs___closed__3; lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_processExplictArg___spec__2___rarg___boxed(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*); @@ -758,6 +758,7 @@ extern lean_object* l_myMacro____x40_Init_Notation___hyg_12938____closed__13; lean_object* l_Lean_Elab_Term_expandApp___lambda__1___closed__1; lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_getForallBody_match__2(lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ensureArgType(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_elabAppArgs___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, 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_throwInvalidNamedArg___spec__1(lean_object*); lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_synthesizePendingAndNormalizeFunType_match__3___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_substCore___lambda__1___closed__3; @@ -16014,7 +16015,7 @@ lean_dec(x_1); return x_9; } } -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5, uint8_t 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, lean_object* x_13, lean_object* x_14, lean_object* x_15) { +lean_object* l_Lean_Elab_Term_elabAppArgs___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5, uint8_t 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, lean_object* x_13, lean_object* x_14, lean_object* x_15) { _start: { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t 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; @@ -16116,7 +16117,7 @@ return x_42; } } } -static lean_object* _init_l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__1() { +static lean_object* _init_l_Lean_Elab_Term_elabAppArgs___closed__1() { _start: { lean_object* x_1; @@ -16124,17 +16125,17 @@ x_1 = lean_mk_string("args"); return x_1; } } -static lean_object* _init_l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__2() { +static lean_object* _init_l_Lean_Elab_Term_elabAppArgs___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_propagateExpectedType___closed__1; -x_2 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__1; +x_2 = l_Lean_Elab_Term_elabAppArgs___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__3() { +static lean_object* _init_l_Lean_Elab_Term_elabAppArgs___closed__3() { _start: { lean_object* x_1; @@ -16142,16 +16143,16 @@ x_1 = lean_mk_string("explicit: "); return x_1; } } -static lean_object* _init_l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__4() { +static lean_object* _init_l_Lean_Elab_Term_elabAppArgs___closed__4() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__3; +x_1 = l_Lean_Elab_Term_elabAppArgs___closed__3; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, uint8_t 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, lean_object* x_13) { +lean_object* l_Lean_Elab_Term_elabAppArgs(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, uint8_t 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, lean_object* x_13) { _start: { lean_object* x_14; @@ -16207,7 +16208,7 @@ lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean x_68 = lean_ctor_get(x_62, 1); lean_inc(x_68); lean_dec(x_62); -x_69 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__2; +x_69 = l_Lean_Elab_Term_elabAppArgs___closed__2; x_70 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_69, x_7, x_8, x_9, x_10, x_11, x_12, x_68); x_71 = lean_ctor_get(x_70, 0); lean_inc(x_71); @@ -16241,7 +16242,7 @@ lean_inc(x_23); x_24 = lean_ctor_get(x_22, 1); lean_inc(x_24); lean_dec(x_22); -x_25 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___lambda__1(x_1, x_3, x_2, x_5, x_18, x_6, x_4, x_23, x_7, x_8, x_9, x_10, x_11, x_12, x_24); +x_25 = l_Lean_Elab_Term_elabAppArgs___lambda__1(x_1, x_3, x_2, x_5, x_18, x_6, x_4, x_23, x_7, x_8, x_9, x_10, x_11, x_12, x_24); lean_dec(x_23); return x_25; } @@ -16300,7 +16301,7 @@ lean_inc(x_32); x_33 = lean_ctor_get(x_31, 1); lean_inc(x_33); lean_dec(x_31); -x_34 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___lambda__1(x_1, x_3, x_2, x_5, x_18, x_6, x_4, x_32, x_7, x_8, x_9, x_10, x_11, x_12, x_33); +x_34 = l_Lean_Elab_Term_elabAppArgs___lambda__1(x_1, x_3, x_2, x_5, x_18, x_6, x_4, x_32, x_7, x_8, x_9, x_10, x_11, x_12, x_33); lean_dec(x_32); return x_34; } @@ -16342,7 +16343,7 @@ else { lean_object* x_39; lean_object* x_40; x_39 = lean_box(0); -x_40 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___lambda__1(x_1, x_3, x_2, x_5, x_18, x_6, x_4, x_39, x_7, x_8, x_9, x_10, x_11, x_12, x_20); +x_40 = l_Lean_Elab_Term_elabAppArgs___lambda__1(x_1, x_3, x_2, x_5, x_18, x_6, x_4, x_39, x_7, x_8, x_9, x_10, x_11, x_12, x_20); return x_40; } } @@ -16360,7 +16361,7 @@ lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean x_44 = l_Std_fmt___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___spec__2(x_5); x_45 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_45, 0, x_44); -x_46 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__4; +x_46 = l_Lean_Elab_Term_elabAppArgs___closed__4; x_47 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_45); @@ -16388,7 +16389,7 @@ x_56 = l_Lean_KernelException_toMessageData___closed__15; x_57 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_57, 0, x_55); lean_ctor_set(x_57, 1, x_56); -x_58 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__2; +x_58 = l_Lean_Elab_Term_elabAppArgs___closed__2; x_59 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_58, x_57, x_7, x_8, x_9, x_10, x_11, x_12, x_43); x_60 = lean_ctor_get(x_59, 1); lean_inc(x_60); @@ -16465,7 +16466,7 @@ return x_81; } } } -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___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, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { +lean_object* l_Lean_Elab_Term_elabAppArgs___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, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { _start: { uint8_t x_16; uint8_t x_17; lean_object* x_18; @@ -16473,12 +16474,12 @@ x_16 = lean_unbox(x_4); lean_dec(x_4); x_17 = lean_unbox(x_6); lean_dec(x_6); -x_18 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___lambda__1(x_1, x_2, x_3, x_16, x_5, x_17, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +x_18 = l_Lean_Elab_Term_elabAppArgs___lambda__1(x_1, x_2, x_3, x_16, x_5, x_17, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15); lean_dec(x_8); return x_18; } } -lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___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, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +lean_object* l_Lean_Elab_Term_elabAppArgs___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, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { uint8_t x_14; uint8_t x_15; lean_object* x_16; @@ -16486,7 +16487,7 @@ x_14 = lean_unbox(x_5); lean_dec(x_5); x_15 = lean_unbox(x_6); lean_dec(x_6); -x_16 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_1, x_2, x_3, x_4, x_14, x_15, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +x_16 = l_Lean_Elab_Term_elabAppArgs(x_1, x_2, x_3, x_4, x_14, x_15, x_7, x_8, x_9, x_10, x_11, x_12, x_13); return x_16; } } @@ -19681,7 +19682,7 @@ lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); -x_26 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_15, x_22, x_24, x_23, x_25, x_25, x_3, x_4, x_5, x_6, x_7, x_8, x_16); +x_26 = l_Lean_Elab_Term_elabAppArgs(x_15, x_22, x_24, x_23, x_25, x_25, x_3, x_4, x_5, x_6, x_7, x_8, x_16); if (lean_obj_tag(x_26) == 0) { lean_object* x_27; lean_object* x_28; @@ -22193,7 +22194,7 @@ lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); -x_32 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_20, x_30, x_28, x_29, x_31, x_31, x_11, x_12, x_13, x_14, x_15, x_16, x_24); +x_32 = l_Lean_Elab_Term_elabAppArgs(x_20, x_30, x_28, x_29, x_31, x_31, x_11, x_12, x_13, x_14, x_15, x_16, x_24); if (lean_obj_tag(x_32) == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; @@ -22276,7 +22277,7 @@ lean_inc(x_46); x_47 = lean_ctor_get(x_44, 1); lean_inc(x_47); lean_dec(x_44); -x_48 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_20, x_47, x_46, x_6, x_7, x_8, x_11, x_12, x_13, x_14, x_15, x_16, x_45); +x_48 = l_Lean_Elab_Term_elabAppArgs(x_20, x_47, x_46, x_6, x_7, x_8, x_11, x_12, x_13, x_14, x_15, x_16, x_45); return x_48; } else @@ -22408,7 +22409,7 @@ _start: if (lean_obj_tag(x_7) == 0) { lean_object* x_15; -x_15 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_6, x_1, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +x_15 = l_Lean_Elab_Term_elabAppArgs(x_6, x_1, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_14); return x_15; } else @@ -22509,7 +22510,7 @@ lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); -x_47 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_32, x_43, x_45, x_44, x_46, x_46, x_8, x_9, x_10, x_11, x_12, x_13, x_36); +x_47 = l_Lean_Elab_Term_elabAppArgs(x_32, x_43, x_45, x_44, x_46, x_46, x_8, x_9, x_10, x_11, x_12, x_13, x_36); if (lean_obj_tag(x_47) == 0) { lean_object* x_48; lean_object* x_49; @@ -22578,7 +22579,7 @@ lean_inc(x_60); x_61 = lean_ctor_get(x_59, 1); lean_inc(x_61); lean_dec(x_59); -x_62 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_32, x_60, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_61); +x_62 = l_Lean_Elab_Term_elabAppArgs(x_32, x_60, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_61); return x_62; } else @@ -22838,7 +22839,7 @@ lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); -x_114 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_103, x_112, x_110, x_111, x_113, x_113, x_8, x_9, x_10, x_11, x_12, x_13, x_106); +x_114 = l_Lean_Elab_Term_elabAppArgs(x_103, x_112, x_110, x_111, x_113, x_113, x_8, x_9, x_10, x_11, x_12, x_13, x_106); if (lean_obj_tag(x_114) == 0) { lean_object* x_115; lean_object* x_116; @@ -22923,7 +22924,7 @@ lean_inc(x_128); x_129 = lean_ctor_get(x_126, 1); lean_inc(x_129); lean_dec(x_126); -x_130 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_103, x_129, x_128, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_127); +x_130 = l_Lean_Elab_Term_elabAppArgs(x_103, x_129, x_128, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_127); return x_130; } else @@ -23057,7 +23058,7 @@ lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); -x_164 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_145, x_160, x_162, x_161, x_163, x_163, x_8, x_9, x_10, x_11, x_12, x_13, x_149); +x_164 = l_Lean_Elab_Term_elabAppArgs(x_145, x_160, x_162, x_161, x_163, x_163, x_8, x_9, x_10, x_11, x_12, x_13, x_149); if (lean_obj_tag(x_164) == 0) { lean_object* x_165; lean_object* x_166; @@ -23143,7 +23144,7 @@ lean_inc(x_183); x_184 = lean_ctor_get(x_182, 1); lean_inc(x_184); lean_dec(x_182); -x_185 = l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs(x_145, x_183, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_184); +x_185 = l_Lean_Elab_Term_elabAppArgs(x_145, x_183, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_184); return x_185; } else @@ -30421,7 +30422,7 @@ 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___private_Lean_Elab_App_0__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); +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; } } @@ -30470,800 +30471,856 @@ 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; uint8_t 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_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 = lean_unsigned_to_nat(2u); -x_22 = l_Lean_Syntax_getArg(x_1, x_21); -x_23 = lean_box(0); -x_24 = 1; -x_25 = lean_box(x_24); +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_26 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTerm___boxed), 10, 3); -lean_closure_set(x_26, 0, x_22); -lean_closure_set(x_26, 1, x_23); -lean_closure_set(x_26, 2, x_25); +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_27 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinRel___lambda__2___boxed), 10, 2); -lean_closure_set(x_27, 0, x_1); -lean_closure_set(x_27, 1, x_23); -x_28 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); -lean_closure_set(x_28, 0, x_26); -lean_closure_set(x_28, 1, x_27); +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_29 = l_Lean_Elab_Term_withSynthesize___rarg(x_28, x_24, x_3, x_4, x_5, x_6, x_7, x_8, x_18); -if (lean_obj_tag(x_29) == 0) +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_30; lean_object* x_31; uint8_t x_32; -x_30 = lean_ctor_get(x_29, 0); -lean_inc(x_30); -x_31 = lean_ctor_get(x_29, 1); -lean_inc(x_31); -lean_dec(x_29); -x_32 = !lean_is_exclusive(x_30); -if (x_32 == 0) -{ -lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_33 = lean_ctor_get(x_30, 0); -x_34 = lean_ctor_get(x_30, 1); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); +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_35 = l_Lean_Meta_inferType(x_33, x_5, x_6, x_7, x_8, x_31); -if (lean_obj_tag(x_35) == 0) +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_35, 0); -lean_inc(x_36); -x_37 = lean_ctor_get(x_35, 1); -lean_inc(x_37); -lean_dec(x_35); +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_34); -x_38 = l_Lean_Meta_inferType(x_34, x_5, x_6, x_7, x_8, x_37); +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; 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_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); -x_41 = lean_unsigned_to_nat(3u); -x_42 = l_Lean_Syntax_getArg(x_1, x_41); -lean_dec(x_1); -lean_ctor_set(x_14, 0, x_36); -x_43 = lean_ctor_get(x_7, 0); -lean_inc(x_43); -x_44 = lean_ctor_get(x_7, 1); -lean_inc(x_44); -x_45 = lean_ctor_get(x_7, 2); -lean_inc(x_45); -x_46 = lean_ctor_get(x_7, 3); -lean_inc(x_46); -x_47 = lean_ctor_get(x_7, 4); -lean_inc(x_47); -x_48 = lean_ctor_get(x_7, 5); -lean_inc(x_48); -x_49 = lean_ctor_get(x_7, 6); -lean_inc(x_49); -x_50 = lean_ctor_get(x_7, 7); -lean_inc(x_50); -x_51 = l_Lean_replaceRef(x_42, x_46); -lean_dec(x_42); -lean_inc(x_50); -lean_inc(x_49); -lean_inc(x_48); -lean_inc(x_47); -lean_inc(x_45); -lean_inc(x_44); -lean_inc(x_43); -x_52 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_52, 0, x_43); -lean_ctor_set(x_52, 1, x_44); -lean_ctor_set(x_52, 2, x_45); -lean_ctor_set(x_52, 3, x_51); -lean_ctor_set(x_52, 4, x_47); -lean_ctor_set(x_52, 5, x_48); -lean_ctor_set(x_52, 6, x_49); -lean_ctor_set(x_52, 7, x_50); 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_34); -x_53 = l_Lean_Elab_Term_ensureHasType(x_14, x_34, x_23, x_3, x_4, x_5, x_6, x_52, x_8, x_40); -if (lean_obj_tag(x_53) == 0) +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_54; lean_object* x_55; lean_object* x_56; +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_44); -lean_dec(x_43); -lean_dec(x_39); -lean_dec(x_34); +lean_dec(x_42); +lean_dec(x_37); +lean_dec(x_25); lean_dec(x_22); -x_54 = lean_ctor_get(x_53, 0); -lean_inc(x_54); -x_55 = lean_ctor_get(x_53, 1); -lean_inc(x_55); -lean_dec(x_53); -lean_ctor_set(x_30, 1, x_54); -x_56 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_20, x_2, x_30, x_3, x_4, x_5, x_6, x_7, x_8, x_55); -lean_dec(x_30); -return x_56; +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_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_57 = lean_ctor_get(x_53, 0); -lean_inc(x_57); -x_58 = lean_ctor_get(x_53, 1); -lean_inc(x_58); -lean_dec(x_53); -x_59 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_59, 0, x_39); -x_60 = l_Lean_replaceRef(x_22, x_46); -lean_dec(x_46); -lean_dec(x_22); -x_61 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_61, 0, x_43); -lean_ctor_set(x_61, 1, x_44); -lean_ctor_set(x_61, 2, x_45); -lean_ctor_set(x_61, 3, x_60); -lean_ctor_set(x_61, 4, x_47); -lean_ctor_set(x_61, 5, x_48); -lean_ctor_set(x_61, 6, x_49); -lean_ctor_set(x_61, 7, x_50); +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_62 = l_Lean_Elab_Term_ensureHasType(x_59, x_33, x_23, x_3, x_4, x_5, x_6, x_61, x_8, x_58); -if (lean_obj_tag(x_62) == 0) +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_63; lean_object* x_64; lean_object* x_65; -lean_dec(x_57); -x_63 = lean_ctor_get(x_62, 0); -lean_inc(x_63); -x_64 = lean_ctor_get(x_62, 1); -lean_inc(x_64); -lean_dec(x_62); -lean_ctor_set(x_30, 0, x_63); -x_65 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_20, x_2, x_30, x_3, x_4, x_5, x_6, x_7, x_8, x_64); -lean_dec(x_30); -return x_65; +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 { -uint8_t x_66; -lean_free_object(x_30); -lean_dec(x_34); -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_66 = !lean_is_exclusive(x_62); -if (x_66 == 0) -{ -lean_object* x_67; -x_67 = lean_ctor_get(x_62, 0); -lean_dec(x_67); -lean_ctor_set(x_62, 0, x_57); -return x_62; -} -else -{ -lean_object* x_68; lean_object* x_69; -x_68 = lean_ctor_get(x_62, 1); +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_62); -x_69 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_69, 0, x_57); -lean_ctor_set(x_69, 1, x_68); -return x_69; -} -} -} -} -else -{ -uint8_t x_70; -lean_dec(x_36); -lean_free_object(x_30); -lean_dec(x_34); -lean_dec(x_33); -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_70 = !lean_is_exclusive(x_38); -if (x_70 == 0) -{ -return x_38; -} -else -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; -x_71 = lean_ctor_get(x_38, 0); -x_72 = lean_ctor_get(x_38, 1); -lean_inc(x_72); -lean_inc(x_71); -lean_dec(x_38); -x_73 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_73, 0, x_71); -lean_ctor_set(x_73, 1, x_72); -return x_73; -} -} -} -else -{ -uint8_t x_74; -lean_free_object(x_30); -lean_dec(x_34); -lean_dec(x_33); -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_74 = !lean_is_exclusive(x_35); -if (x_74 == 0) -{ -return x_35; -} -else -{ -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_35, 0); -x_76 = lean_ctor_get(x_35, 1); -lean_inc(x_76); -lean_inc(x_75); -lean_dec(x_35); -x_77 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_77, 0, x_75); -lean_ctor_set(x_77, 1, x_76); -return x_77; -} -} -} -else -{ -lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_78 = lean_ctor_get(x_30, 0); -x_79 = lean_ctor_get(x_30, 1); -lean_inc(x_79); -lean_inc(x_78); -lean_dec(x_30); +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_80 = l_Lean_Meta_inferType(x_78, x_5, x_6, x_7, x_8, x_31); +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, 0); +x_81 = lean_ctor_get(x_80, 1); lean_inc(x_81); -x_82 = lean_ctor_get(x_80, 1); -lean_inc(x_82); 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_7); lean_inc(x_6); lean_inc(x_5); -lean_inc(x_79); -x_83 = l_Lean_Meta_inferType(x_79, x_5, x_6, x_7, x_8, x_82); +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; lean_object* x_87; lean_object* 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; +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); -x_86 = lean_unsigned_to_nat(3u); -x_87 = l_Lean_Syntax_getArg(x_1, x_86); -lean_dec(x_1); -lean_ctor_set(x_14, 0, x_81); -x_88 = lean_ctor_get(x_7, 0); -lean_inc(x_88); -x_89 = lean_ctor_get(x_7, 1); -lean_inc(x_89); -x_90 = lean_ctor_get(x_7, 2); -lean_inc(x_90); -x_91 = lean_ctor_get(x_7, 3); -lean_inc(x_91); -x_92 = lean_ctor_get(x_7, 4); -lean_inc(x_92); -x_93 = lean_ctor_get(x_7, 5); -lean_inc(x_93); -x_94 = lean_ctor_get(x_7, 6); -lean_inc(x_94); -x_95 = lean_ctor_get(x_7, 7); -lean_inc(x_95); -x_96 = l_Lean_replaceRef(x_87, x_91); -lean_dec(x_87); -lean_inc(x_95); -lean_inc(x_94); -lean_inc(x_93); -lean_inc(x_92); -lean_inc(x_90); -lean_inc(x_89); -lean_inc(x_88); -x_97 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_97, 0, x_88); -lean_ctor_set(x_97, 1, x_89); -lean_ctor_set(x_97, 2, x_90); -lean_ctor_set(x_97, 3, x_96); -lean_ctor_set(x_97, 4, x_92); -lean_ctor_set(x_97, 5, x_93); -lean_ctor_set(x_97, 6, x_94); -lean_ctor_set(x_97, 7, x_95); -lean_inc(x_8); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_79); -x_98 = l_Lean_Elab_Term_ensureHasType(x_14, x_79, x_23, x_3, x_4, x_5, x_6, x_97, x_8, x_85); -if (lean_obj_tag(x_98) == 0) +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 { -lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; -lean_dec(x_95); -lean_dec(x_94); -lean_dec(x_93); -lean_dec(x_92); -lean_dec(x_91); -lean_dec(x_90); -lean_dec(x_89); -lean_dec(x_88); -lean_dec(x_84); -lean_dec(x_79); -lean_dec(x_22); -x_99 = lean_ctor_get(x_98, 0); -lean_inc(x_99); -x_100 = lean_ctor_get(x_98, 1); +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_98); -x_101 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_101, 0, x_78); -lean_ctor_set(x_101, 1, x_99); -x_102 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_20, x_2, x_101, x_3, x_4, x_5, x_6, x_7, x_8, x_100); -lean_dec(x_101); +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 { -lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; -x_103 = lean_ctor_get(x_98, 0); -lean_inc(x_103); -x_104 = lean_ctor_get(x_98, 1); +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_98); -x_105 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_105, 0, x_84); -x_106 = l_Lean_replaceRef(x_22, x_91); -lean_dec(x_91); +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); -x_107 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_107, 0, x_88); -lean_ctor_set(x_107, 1, x_89); -lean_ctor_set(x_107, 2, x_90); -lean_ctor_set(x_107, 3, x_106); -lean_ctor_set(x_107, 4, x_92); -lean_ctor_set(x_107, 5, x_93); -lean_ctor_set(x_107, 6, x_94); -lean_ctor_set(x_107, 7, x_95); +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_4); -lean_inc(x_3); -x_108 = l_Lean_Elab_Term_ensureHasType(x_105, x_78, x_23, x_3, x_4, x_5, x_6, x_107, x_8, x_104); -if (lean_obj_tag(x_108) == 0) +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_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; -lean_dec(x_103); -x_109 = lean_ctor_get(x_108, 0); -lean_inc(x_109); -x_110 = lean_ctor_get(x_108, 1); -lean_inc(x_110); -lean_dec(x_108); -x_111 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_111, 0, x_109); -lean_ctor_set(x_111, 1, x_79); -x_112 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_20, x_2, x_111, x_3, x_4, x_5, x_6, x_7, x_8, x_110); -lean_dec(x_111); -return x_112; -} -else -{ -lean_object* x_113; lean_object* x_114; lean_object* x_115; -lean_dec(x_79); -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_113 = lean_ctor_get(x_108, 1); -lean_inc(x_113); -if (lean_is_exclusive(x_108)) { - lean_ctor_release(x_108, 0); - lean_ctor_release(x_108, 1); - x_114 = x_108; -} else { - lean_dec_ref(x_108); - x_114 = lean_box(0); -} -if (lean_is_scalar(x_114)) { - x_115 = lean_alloc_ctor(1, 2, 0); -} else { - x_115 = x_114; -} -lean_ctor_set(x_115, 0, x_103); -lean_ctor_set(x_115, 1, x_113); -return x_115; -} -} -} -else -{ -lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; -lean_dec(x_81); -lean_dec(x_79); -lean_dec(x_78); -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_116 = lean_ctor_get(x_83, 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_117 = lean_ctor_get(x_83, 1); -lean_inc(x_117); -if (lean_is_exclusive(x_83)) { - lean_ctor_release(x_83, 0); - lean_ctor_release(x_83, 1); - x_118 = x_83; -} else { - lean_dec_ref(x_83); - x_118 = lean_box(0); -} -if (lean_is_scalar(x_118)) { - x_119 = lean_alloc_ctor(1, 2, 0); -} else { - x_119 = x_118; -} -lean_ctor_set(x_119, 0, x_116); -lean_ctor_set(x_119, 1, x_117); -return x_119; -} -} -else +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_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; -lean_dec(x_79); -lean_dec(x_78); -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_120 = lean_ctor_get(x_80, 0); -lean_inc(x_120); -x_121 = lean_ctor_get(x_80, 1); +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); -if (lean_is_exclusive(x_80)) { - lean_ctor_release(x_80, 0); - lean_ctor_release(x_80, 1); - x_122 = x_80; -} else { - lean_dec_ref(x_80); - x_122 = lean_box(0); -} -if (lean_is_scalar(x_122)) { - x_123 = lean_alloc_ctor(1, 2, 0); -} else { - x_123 = x_122; -} -lean_ctor_set(x_123, 0, x_120); -lean_ctor_set(x_123, 1, x_121); -return x_123; -} -} -} -else -{ -uint8_t x_124; -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); +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); -x_124 = !lean_is_exclusive(x_29); -if (x_124 == 0) -{ -return x_29; -} -else -{ -lean_object* x_125; lean_object* x_126; lean_object* x_127; -x_125 = lean_ctor_get(x_29, 0); -x_126 = lean_ctor_get(x_29, 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); -lean_dec(x_29); -x_127 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_127, 0, x_125); -lean_ctor_set(x_127, 1, x_126); -return x_127; -} -} -} -else -{ -lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; uint8_t x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; -x_128 = lean_ctor_get(x_14, 0); -lean_inc(x_128); -lean_dec(x_14); -x_129 = lean_unsigned_to_nat(2u); -x_130 = l_Lean_Syntax_getArg(x_1, x_129); -x_131 = lean_box(0); -x_132 = 1; -x_133 = lean_box(x_132); -lean_inc(x_130); -x_134 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTerm___boxed), 10, 3); -lean_closure_set(x_134, 0, x_130); -lean_closure_set(x_134, 1, x_131); -lean_closure_set(x_134, 2, x_133); -lean_inc(x_1); -x_135 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinRel___lambda__2___boxed), 10, 2); -lean_closure_set(x_135, 0, x_1); -lean_closure_set(x_135, 1, x_131); -x_136 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg), 9, 2); -lean_closure_set(x_136, 0, x_134); -lean_closure_set(x_136, 1, x_135); +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_7); +lean_inc(x_134); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); -x_137 = l_Lean_Elab_Term_withSynthesize___rarg(x_136, x_132, x_3, x_4, x_5, x_6, x_7, x_8, x_18); -if (lean_obj_tag(x_137) == 0) +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_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; -x_138 = lean_ctor_get(x_137, 0); -lean_inc(x_138); -x_139 = lean_ctor_get(x_137, 1); -lean_inc(x_139); -lean_dec(x_137); -x_140 = lean_ctor_get(x_138, 0); -lean_inc(x_140); -x_141 = lean_ctor_get(x_138, 1); -lean_inc(x_141); -if (lean_is_exclusive(x_138)) { - lean_ctor_release(x_138, 0); - lean_ctor_release(x_138, 1); - x_142 = x_138; -} else { - lean_dec_ref(x_138); - x_142 = lean_box(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_7); lean_inc(x_6); lean_inc(x_5); -lean_inc(x_140); -x_143 = l_Lean_Meta_inferType(x_140, x_5, x_6, x_7, x_8, x_139); -if (lean_obj_tag(x_143) == 0) +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_144; lean_object* x_145; lean_object* x_146; -x_144 = lean_ctor_get(x_143, 0); -lean_inc(x_144); -x_145 = lean_ctor_get(x_143, 1); +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); -lean_dec(x_143); +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_141); -x_146 = l_Lean_Meta_inferType(x_141, x_5, x_6, x_7, x_8, x_145); -if (lean_obj_tag(x_146) == 0) +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_147; lean_object* x_148; lean_object* x_149; lean_object* 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; lean_object* x_161; lean_object* x_162; -x_147 = lean_ctor_get(x_146, 0); -lean_inc(x_147); -x_148 = lean_ctor_get(x_146, 1); -lean_inc(x_148); -lean_dec(x_146); -x_149 = lean_unsigned_to_nat(3u); -x_150 = l_Lean_Syntax_getArg(x_1, x_149); -lean_dec(x_1); -x_151 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_151, 0, x_144); -x_152 = lean_ctor_get(x_7, 0); -lean_inc(x_152); -x_153 = lean_ctor_get(x_7, 1); +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_7, 2); +x_154 = lean_ctor_get(x_152, 1); lean_inc(x_154); -x_155 = lean_ctor_get(x_7, 3); -lean_inc(x_155); -x_156 = lean_ctor_get(x_7, 4); +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_7, 5); +x_157 = lean_ctor_get(x_155, 1); lean_inc(x_157); -x_158 = lean_ctor_get(x_7, 6); -lean_inc(x_158); -x_159 = lean_ctor_get(x_7, 7); -lean_inc(x_159); -x_160 = l_Lean_replaceRef(x_150, x_155); -lean_dec(x_150); -lean_inc(x_159); -lean_inc(x_158); -lean_inc(x_157); -lean_inc(x_156); -lean_inc(x_154); +lean_dec(x_155); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); lean_inc(x_153); -lean_inc(x_152); -x_161 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_161, 0, x_152); -lean_ctor_set(x_161, 1, x_153); -lean_ctor_set(x_161, 2, x_154); -lean_ctor_set(x_161, 3, x_160); -lean_ctor_set(x_161, 4, x_156); -lean_ctor_set(x_161, 5, x_157); -lean_ctor_set(x_161, 6, x_158); -lean_ctor_set(x_161, 7, x_159); +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); -lean_inc(x_141); -x_162 = l_Lean_Elab_Term_ensureHasType(x_151, x_141, x_131, x_3, x_4, x_5, x_6, x_161, x_8, x_148); -if (lean_obj_tag(x_162) == 0) +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_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; -lean_dec(x_159); -lean_dec(x_158); -lean_dec(x_157); -lean_dec(x_156); -lean_dec(x_155); -lean_dec(x_154); -lean_dec(x_153); -lean_dec(x_152); -lean_dec(x_147); -lean_dec(x_141); -lean_dec(x_130); -x_163 = lean_ctor_get(x_162, 0); -lean_inc(x_163); -x_164 = lean_ctor_get(x_162, 1); -lean_inc(x_164); -lean_dec(x_162); -if (lean_is_scalar(x_142)) { - x_165 = lean_alloc_ctor(0, 2, 0); -} else { - x_165 = x_142; -} -lean_ctor_set(x_165, 0, x_140); -lean_ctor_set(x_165, 1, x_163); -x_166 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_128, x_2, x_165, x_3, x_4, x_5, x_6, x_7, x_8, x_164); -lean_dec(x_165); -return x_166; +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_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; -x_167 = lean_ctor_get(x_162, 0); -lean_inc(x_167); -x_168 = lean_ctor_get(x_162, 1); -lean_inc(x_168); -lean_dec(x_162); -x_169 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_169, 0, x_147); -x_170 = l_Lean_replaceRef(x_130, x_155); -lean_dec(x_155); -lean_dec(x_130); -x_171 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_171, 0, x_152); -lean_ctor_set(x_171, 1, x_153); -lean_ctor_set(x_171, 2, x_154); -lean_ctor_set(x_171, 3, x_170); -lean_ctor_set(x_171, 4, x_156); -lean_ctor_set(x_171, 5, x_157); -lean_ctor_set(x_171, 6, x_158); -lean_ctor_set(x_171, 7, x_159); -lean_inc(x_8); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -x_172 = l_Lean_Elab_Term_ensureHasType(x_169, x_140, x_131, x_3, x_4, x_5, x_6, x_171, x_8, x_168); -if (lean_obj_tag(x_172) == 0) +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_167); -x_173 = lean_ctor_get(x_172, 0); +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_172, 1); +x_174 = lean_ctor_get(x_161, 1); lean_inc(x_174); -lean_dec(x_172); -if (lean_is_scalar(x_142)) { - x_175 = lean_alloc_ctor(0, 2, 0); +if (lean_is_exclusive(x_161)) { + lean_ctor_release(x_161, 0); + lean_ctor_release(x_161, 1); + x_175 = x_161; } else { - x_175 = x_142; + lean_dec_ref(x_161); + x_175 = lean_box(0); } -lean_ctor_set(x_175, 0, x_173); -lean_ctor_set(x_175, 1, x_141); -x_176 = l_Lean_Elab_Term_elabBinRel___lambda__3(x_128, x_2, x_175, x_3, x_4, x_5, x_6, x_7, x_8, x_174); -lean_dec(x_175); +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_dec(x_142); -lean_dec(x_141); -lean_dec(x_128); +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); @@ -31271,36 +31328,34 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_177 = lean_ctor_get(x_172, 1); +x_177 = lean_ctor_get(x_158, 0); lean_inc(x_177); -if (lean_is_exclusive(x_172)) { - lean_ctor_release(x_172, 0); - lean_ctor_release(x_172, 1); - x_178 = x_172; +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_172); - x_178 = lean_box(0); + lean_dec_ref(x_158); + x_179 = lean_box(0); } -if (lean_is_scalar(x_178)) { - x_179 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_179)) { + x_180 = lean_alloc_ctor(1, 2, 0); } else { - x_179 = x_178; -} -lean_ctor_set(x_179, 0, x_167); -lean_ctor_set(x_179, 1, x_177); -return x_179; + 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_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; -lean_dec(x_144); -lean_dec(x_142); -lean_dec(x_141); -lean_dec(x_140); -lean_dec(x_130); -lean_dec(x_128); +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); @@ -31308,37 +31363,34 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -lean_dec(x_1); -x_180 = lean_ctor_get(x_146, 0); -lean_inc(x_180); -x_181 = lean_ctor_get(x_146, 1); +x_181 = lean_ctor_get(x_155, 0); lean_inc(x_181); -if (lean_is_exclusive(x_146)) { - lean_ctor_release(x_146, 0); - lean_ctor_release(x_146, 1); - x_182 = x_146; +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_146); - x_182 = lean_box(0); + lean_dec_ref(x_155); + x_183 = lean_box(0); } -if (lean_is_scalar(x_182)) { - x_183 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_183)) { + x_184 = lean_alloc_ctor(1, 2, 0); } else { - x_183 = x_182; + x_184 = x_183; } -lean_ctor_set(x_183, 0, x_180); -lean_ctor_set(x_183, 1, x_181); -return 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_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; -lean_dec(x_142); -lean_dec(x_141); -lean_dec(x_140); -lean_dec(x_130); -lean_dec(x_128); +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); @@ -31346,34 +31398,40 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -lean_dec(x_1); -x_184 = lean_ctor_get(x_143, 0); -lean_inc(x_184); -x_185 = lean_ctor_get(x_143, 1); +x_185 = lean_ctor_get(x_152, 0); lean_inc(x_185); -if (lean_is_exclusive(x_143)) { - lean_ctor_release(x_143, 0); - lean_ctor_release(x_143, 1); - x_186 = x_143; +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_143); - x_186 = lean_box(0); + lean_dec_ref(x_152); + x_187 = lean_box(0); } -if (lean_is_scalar(x_186)) { - x_187 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_187)) { + x_188 = lean_alloc_ctor(1, 2, 0); } else { - x_187 = x_186; + x_188 = x_187; +} +lean_ctor_set(x_188, 0, x_185); +lean_ctor_set(x_188, 1, x_186); +return x_188; +} } -lean_ctor_set(x_187, 0, x_184); -lean_ctor_set(x_187, 1, x_185); -return x_187; } } else { -lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; -lean_dec(x_130); -lean_dec(x_128); +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); @@ -31382,33 +31440,712 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_188 = lean_ctor_get(x_137, 0); -lean_inc(x_188); -x_189 = lean_ctor_get(x_137, 1); +x_189 = lean_ctor_get(x_120, 0); lean_inc(x_189); -if (lean_is_exclusive(x_137)) { - lean_ctor_release(x_137, 0); - lean_ctor_release(x_137, 1); - x_190 = x_137; +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_137); - x_190 = lean_box(0); + lean_dec_ref(x_120); + x_191 = lean_box(0); } -if (lean_is_scalar(x_190)) { - x_191 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_191)) { + x_192 = lean_alloc_ctor(1, 2, 0); } else { - x_191 = x_190; + x_192 = x_191; } -lean_ctor_set(x_191, 0, x_188); -lean_ctor_set(x_191, 1, x_189); -return 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 { -uint8_t x_192; +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); @@ -31418,23 +32155,23 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_192 = !lean_is_exclusive(x_13); -if (x_192 == 0) +x_304 = !lean_is_exclusive(x_13); +if (x_304 == 0) { return x_13; } else { -lean_object* x_193; lean_object* x_194; lean_object* x_195; -x_193 = lean_ctor_get(x_13, 0); -x_194 = lean_ctor_get(x_13, 1); -lean_inc(x_194); -lean_inc(x_193); +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_195 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_195, 0, x_193); -lean_ctor_set(x_195, 1, x_194); -return x_195; +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; } } } @@ -31504,7 +32241,7 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_9043_(lean_object* x_1) { +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_9135_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -31644,14 +32381,14 @@ l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_processExplictArg___clos lean_mark_persistent(l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_processExplictArg___closed__4); l_Lean_Elab_Term_ElabAppArgs_main___closed__1 = _init_l_Lean_Elab_Term_ElabAppArgs_main___closed__1(); lean_mark_persistent(l_Lean_Elab_Term_ElabAppArgs_main___closed__1); -l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__1 = _init_l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__1(); -lean_mark_persistent(l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__1); -l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__2 = _init_l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__2(); -lean_mark_persistent(l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__2); -l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__3 = _init_l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__3(); -lean_mark_persistent(l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__3); -l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__4 = _init_l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__4(); -lean_mark_persistent(l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppArgs___closed__4); +l_Lean_Elab_Term_elabAppArgs___closed__1 = _init_l_Lean_Elab_Term_elabAppArgs___closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_elabAppArgs___closed__1); +l_Lean_Elab_Term_elabAppArgs___closed__2 = _init_l_Lean_Elab_Term_elabAppArgs___closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_elabAppArgs___closed__2); +l_Lean_Elab_Term_elabAppArgs___closed__3 = _init_l_Lean_Elab_Term_elabAppArgs___closed__3(); +lean_mark_persistent(l_Lean_Elab_Term_elabAppArgs___closed__3); +l_Lean_Elab_Term_elabAppArgs___closed__4 = _init_l_Lean_Elab_Term_elabAppArgs___closed__4(); +lean_mark_persistent(l_Lean_Elab_Term_elabAppArgs___closed__4); l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValAux___lambda__1___closed__1 = _init_l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValAux___lambda__1___closed__1(); lean_mark_persistent(l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValAux___lambda__1___closed__1); l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValAux___lambda__1___closed__2 = _init_l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValAux___lambda__1___closed__2(); @@ -31848,7 +32585,7 @@ 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); -res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_9043_(lean_io_mk_world()); +res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_9135_(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));