diff --git a/stage0/src/Lean/Elab/Match.lean b/stage0/src/Lean/Elab/Match.lean index 3ffd894e99..15be12da92 100644 --- a/stage0/src/Lean/Elab/Match.lean +++ b/stage0/src/Lean/Elab/Match.lean @@ -707,6 +707,20 @@ def reportMatcherResultErrors (altLHSS : List AltLHS) (result : MatcherResult) : logError "redundant alternative" i := i + 1 +/-- + If `altLHSS + rhss` is encoding `| PUnit.unit => rhs[0]`, return `rhs[0]` + Otherwise, return none. +-/ +private def isMatchUnit? (altLHSS : List Match.AltLHS) (rhss : Array Expr) : MetaM (Option Expr) := do + assert! altLHSS.length == rhss.size + match altLHSS with + | [ { fvarDecls := [], patterns := [ Pattern.ctor `PUnit.unit .. ], .. } ] => + /- Recall that for alternatives of the form `| PUnit.unit => rhs`, `rhss[0]` is of the form `fun _ : Unit => b`. -/ + match rhss[0] with + | Expr.lam _ _ b _ => return if b.hasLooseBVars then none else b + | _ => return none + | _ => return none + private def elabMatchAux (discrStxs : Array Syntax) (altViews : Array MatchAltView) (matchOptType : Syntax) (expectedType : Expr) : TermElabM Expr := do let (discrs, matchType, altLHSS, rhss) ← commitIfDidNotPostpone do @@ -767,16 +781,19 @@ private def elabMatchAux (discrStxs : Array Syntax) (altViews : Array MatchAltVi throwMVarError m!"invalid match-expression, pattern contains metavariables{indentExpr (← p.toExpr)}" pure altLHS return (discrs, matchType, altLHSS, rhss) - let numDiscrs := discrs.size - let matcherName ← mkAuxName `match - let matcherResult ← mkMatcher matcherName matchType numDiscrs altLHSS - let motive ← forallBoundedTelescope matchType numDiscrs fun xs matchType => mkLambdaFVars xs matchType - reportMatcherResultErrors altLHSS matcherResult - let r := mkApp matcherResult.matcher motive - let r := mkAppN r discrs - let r := mkAppN r rhss - trace[Elab.match]! "result: {r}" - return r + if let some r ← isMatchUnit? altLHSS rhss then + return r + else + let numDiscrs := discrs.size + let matcherName ← mkAuxName `match + let matcherResult ← mkMatcher matcherName matchType numDiscrs altLHSS + let motive ← forallBoundedTelescope matchType numDiscrs fun xs matchType => mkLambdaFVars xs matchType + reportMatcherResultErrors altLHSS matcherResult + let r := mkApp matcherResult.matcher motive + let r := mkAppN r discrs + let r := mkAppN r rhss + trace[Elab.match]! "result: {r}" + return r private def getDiscrs (matchStx : Syntax) : Array Syntax := matchStx[1].getSepArgs diff --git a/stage0/stdlib/Lean/Elab/Do.c b/stage0/stdlib/Lean/Elab/Do.c index 85ac257133..ac32d3ba19 100644 --- a/stage0/stdlib/Lean/Elab/Do.c +++ b/stage0/stdlib/Lean/Elab/Do.c @@ -322,7 +322,6 @@ lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doForToCode___closed__20; lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_expandDoIf_x3f_match__12(lean_object*); lean_object* l_Array_filterMapM___at_Lean_Elab_Term_Do_getPatternVarNames___spec__1___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getMainModule___rarg(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__6; uint8_t l_USize_decLt(size_t, size_t); extern lean_object* l_Lean_Option_myMacro____x40_Lean_Data_Options___hyg_826____closed__9; extern lean_object* l_Lean_Parser_Term_liftMethod___elambda__1___closed__1; @@ -685,6 +684,7 @@ lean_object* l_Lean_Elab_Term_Do_hasExitPointPred_loop(lean_object*, lean_object lean_object* l_Lean_Elab_Term_Do_getDoReassignVars___closed__3; extern lean_object* l_instMonadEST___closed__1; lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_expandDoIf_x3f_match__3___rarg(lean_object*, lean_object*); +extern lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_ToCodeBlock_expandLiftMethodAux___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_doCatchMatch___elambda__1___closed__2; extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_5177____closed__4; @@ -12976,27 +12976,19 @@ return x_80; static lean_object* _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__1() { _start: { -lean_object* x_1; -x_1 = lean_mk_string("PUnit"); -return x_1; +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; } } static lean_object* _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__1; -x_2 = lean_string_utf8_byte_size(x_1); -return x_2; -} -} -static lean_object* _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__1; +x_1 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; x_2 = lean_unsigned_to_nat(0u); -x_3 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; +x_3 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__1; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); @@ -13004,13 +12996,25 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } +static lean_object* _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} static lean_object* _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); +x_2 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); return x_3; } } @@ -13020,18 +13024,6 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); x_2 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -static lean_object* _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__5; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); @@ -13085,10 +13077,10 @@ x_24 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_24, 0, x_5); lean_ctor_set(x_24, 1, x_23); x_25 = lean_array_push(x_10, x_24); -x_26 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_26 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; x_27 = l_Lean_addMacroScope(x_7, x_26, x_6); -x_28 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; -x_29 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__6; +x_28 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; +x_29 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__5; lean_inc(x_5); x_30 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_30, 0, x_5); @@ -13167,10 +13159,10 @@ x_65 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_65, 0, x_45); lean_ctor_set(x_65, 1, x_64); x_66 = lean_array_push(x_51, x_65); -x_67 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_67 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; x_68 = l_Lean_addMacroScope(x_48, x_67, x_47); -x_69 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; -x_70 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__6; +x_69 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; +x_70 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__5; lean_inc(x_45); x_71 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_71, 0, x_45); @@ -13268,7 +13260,7 @@ static lean_object* _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkPureUn _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_1 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; x_2 = l_Lean_instToExprUnit___lambda__1___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; @@ -27298,7 +27290,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_2 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); @@ -28042,11 +28034,11 @@ x_262 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_262, 0, x_240); lean_ctor_set(x_262, 1, x_261); x_263 = lean_array_push(x_246, x_262); -x_264 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_264 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; lean_inc(x_4); lean_inc(x_6); x_265 = l_Lean_addMacroScope(x_6, x_264, x_4); -x_266 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; +x_266 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; x_267 = l_Lean_Elab_Term_Do_ToTerm_actionTerminalToTerm___closed__4; lean_inc(x_240); x_268 = lean_alloc_ctor(3, 4, 0); @@ -28216,11 +28208,11 @@ x_350 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_350, 0, x_327); lean_ctor_set(x_350, 1, x_349); x_351 = lean_array_push(x_334, x_350); -x_352 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_352 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; lean_inc(x_4); lean_inc(x_6); x_353 = l_Lean_addMacroScope(x_6, x_352, x_4); -x_354 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; +x_354 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; x_355 = l_Lean_Elab_Term_Do_ToTerm_actionTerminalToTerm___closed__4; lean_inc(x_327); x_356 = lean_alloc_ctor(3, 4, 0); @@ -28401,11 +28393,11 @@ x_442 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_442, 0, x_420); lean_ctor_set(x_442, 1, x_441); x_443 = lean_array_push(x_426, x_442); -x_444 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_444 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; lean_inc(x_4); lean_inc(x_6); x_445 = l_Lean_addMacroScope(x_6, x_444, x_4); -x_446 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; +x_446 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; x_447 = l_Lean_Elab_Term_Do_ToTerm_actionTerminalToTerm___closed__4; lean_inc(x_420); x_448 = lean_alloc_ctor(3, 4, 0); @@ -28621,11 +28613,11 @@ x_552 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_552, 0, x_529); lean_ctor_set(x_552, 1, x_551); x_553 = lean_array_push(x_536, x_552); -x_554 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_554 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; lean_inc(x_4); lean_inc(x_6); x_555 = l_Lean_addMacroScope(x_6, x_554, x_4); -x_556 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; +x_556 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; x_557 = l_Lean_Elab_Term_Do_ToTerm_actionTerminalToTerm___closed__4; lean_inc(x_529); x_558 = lean_alloc_ctor(3, 4, 0); @@ -30063,11 +30055,11 @@ x_1227 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_1227, 0, x_1203); lean_ctor_set(x_1227, 1, x_1226); x_1228 = lean_array_push(x_1211, x_1227); -x_1229 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_1229 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; lean_inc(x_4); lean_inc(x_1112); x_1230 = l_Lean_addMacroScope(x_1112, x_1229, x_4); -x_1231 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; +x_1231 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; x_1232 = l_Lean_Elab_Term_Do_ToTerm_actionTerminalToTerm___closed__4; lean_inc(x_1203); x_1233 = lean_alloc_ctor(3, 4, 0); @@ -30258,11 +30250,11 @@ x_1320 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_1320, 0, x_1296); lean_ctor_set(x_1320, 1, x_1319); x_1321 = lean_array_push(x_1304, x_1320); -x_1322 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_1322 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; lean_inc(x_4); lean_inc(x_1112); x_1323 = l_Lean_addMacroScope(x_1112, x_1322, x_4); -x_1324 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; +x_1324 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; x_1325 = l_Lean_Elab_Term_Do_ToTerm_actionTerminalToTerm___closed__4; lean_inc(x_1296); x_1326 = lean_alloc_ctor(3, 4, 0); @@ -31124,12 +31116,12 @@ x_34 = lean_ctor_get(x_3, 0); lean_inc(x_34); lean_dec(x_3); x_35 = lean_array_push(x_28, x_34); -x_36 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_36 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; lean_inc(x_5); lean_inc(x_11); x_37 = l_Lean_addMacroScope(x_11, x_36, x_5); -x_38 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; -x_39 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__6; +x_38 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; +x_39 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__5; lean_inc(x_37); lean_inc(x_24); x_40 = lean_alloc_ctor(3, 4, 0); @@ -31651,12 +31643,12 @@ x_268 = lean_ctor_get(x_3, 0); lean_inc(x_268); lean_dec(x_3); x_269 = lean_array_push(x_262, x_268); -x_270 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4; +x_270 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; lean_inc(x_5); lean_inc(x_245); x_271 = l_Lean_addMacroScope(x_245, x_270, x_5); -x_272 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__3; -x_273 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__6; +x_272 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__2; +x_273 = l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__5; lean_inc(x_271); lean_inc(x_258); x_274 = lean_alloc_ctor(3, 4, 0); @@ -64107,8 +64099,6 @@ l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4 = _init_l___pri lean_mark_persistent(l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__4); l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__5 = _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__5(); lean_mark_persistent(l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__5); -l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__6 = _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__6(); -lean_mark_persistent(l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkUnit___closed__6); l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkPureUnit___closed__1 = _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkPureUnit___closed__1(); lean_mark_persistent(l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkPureUnit___closed__1); l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkPureUnit___closed__2 = _init_l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkPureUnit___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Match.c b/stage0/stdlib/Lean/Elab/Match.c index 1ecf3ad00b..4ffc1559a5 100644 --- a/stage0/stdlib/Lean/Elab/Match.c +++ b/stage0/stdlib/Lean/Elab/Match.c @@ -30,6 +30,7 @@ lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabForall__ lean_object* l_Lean_Elab_Term_elabMatch_elabMatchDefault___lambda__2___boxed(lean_object*); size_t l_USize_add(size_t, size_t); extern lean_object* l_Lean_Name_getString_x21___closed__3; +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__2; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_CtorApp_pushNewArg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_14424____closed__12; lean_object* l_Lean_Elab_Term_withDepElimPatterns___rarg___lambda__1___boxed(lean_object*, lean_object*); @@ -120,6 +121,7 @@ lean_object* l_Lean_Elab_Term_expandMacrosInPatterns___boxed__const__1; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_CtorApp_processCtorAppAux_match__3(lean_object*); extern lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Util___hyg_1077____closed__1; extern lean_object* l_Lean_identKind___closed__2; +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__1; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withDepElimPatterns(lean_object*); lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*); @@ -143,6 +145,7 @@ lean_object* lean_environment_find(lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_14424____closed__11; uint8_t l_Array_anyMUnsafe___at_Array_any___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_checkTraceOption(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__1___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__7; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_nameToPattern___closed__8; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___lambda__3___closed__3; @@ -186,6 +189,7 @@ lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_tryPostponeIfDiscrTypeIsMVar_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_forallBoundedTelescope___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_getNumExplicitCtorParams___spec__2(lean_object*); +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__3; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_CollectPatternVars_collect___spec__4(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); @@ -197,6 +201,7 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_waitExpectedType_matc lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___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_MessageData_ofList(lean_object*); lean_object* l_Lean_Elab_Term_ToDepElimPattern_main___closed__1; +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___closed__3; lean_object* l_List_map___at_Lean_Elab_Term_elabMatchAltView___spec__2(lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processId_match__1(lean_object*); @@ -252,6 +257,7 @@ lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_CollectPatternVars_CtorApp_Context_newArgs___default; lean_object* l_Lean_Meta_mkEqRefl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_expandSimpleMatch(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_Match_0__Lean_Elab_Term_isMatchUnit_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_collectPatternVars_match__1(lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_nameToPattern___closed__13; lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Elab_Match_0__Lean_Elab_Term_expandNonAtomicDiscrs_x3f___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -264,6 +270,7 @@ lean_object* l_Lean_Elab_Term_elabMatch_elabMatchDefault___lambda__1___boxed(lea extern lean_object* l_myMacro____x40_Init_Notation___hyg_13855____closed__9; lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_CollectPatternVars_main___spec__3___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* l_Lean_Elab_Term_CollectPatternVars_CtorApp_processCtorApp___lambda__2(uint8_t, lean_object*, lean_object*, 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_instToExprUnit___lambda__1___closed__1; lean_object* l_Lean_mkAppN(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_throwInvalidPattern___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__9___rarg(lean_object*); @@ -345,6 +352,7 @@ lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_CollectPatternVars_CtorApp_processCtorApp_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_nameToPattern___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l___private_Lean_Meta_LevelDefEq_0__Lean_Meta_solveSelfMax___closed__1; extern lean_object* l_Lean_strLitKind; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_nameToPattern___closed__1; lean_object* l_Lean_Elab_Term_ToDepElimPattern_main_match__4(lean_object*); @@ -386,6 +394,7 @@ extern lean_object* l_myMacro____x40_Init_Notation___hyg_12938____closed__10; lean_object* l_Lean_Meta_instantiateLocalDeclMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkMatcher(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_Match_0__Lean_Elab_Term_CollectPatternVars_CtorApp_processCtorAppAux_match__3___rarg(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2(lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processId_match__2(lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_nameToPattern_match__1(lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_CtorApp_isDone___boxed(lean_object*); @@ -415,6 +424,7 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMatchOptType(lean_ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageContextTermElabM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addTrace___at_Lean_Elab_Term_CollectPatternVars_main___spec__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_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Term_quoteAutoTactic___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getHead_x3f_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg___closed__1; @@ -455,6 +465,8 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_alre lean_object* l_Lean_Elab_Term_resolveId_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_tryPostponeIfDiscrTypeIsMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Std_Range_myMacro____x40_Init_Data_Range___hyg_276____closed__2; +extern lean_object* l_Lean_instInhabitedExpr; +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; lean_object* l_Lean_Elab_Term_expandApp(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabInaccessible(lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabDiscrsWitMatchType_match__1(lean_object*); @@ -484,6 +496,7 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_expandNonAtomicDiscrs lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkUserNameFor_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_inaccessible_x3f(lean_object*); lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_1486____closed__2; +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__1(lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_throwInvalidPattern___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_CollectPatternVars_CtorApp_processCtorApp_match__3(lean_object*); @@ -659,6 +672,7 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isPatternVar_match__2 lean_object* l___regBuiltin_Lean_Elab_Term_elabMatch___closed__1; extern lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__8; lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___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* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__5(lean_object*); extern lean_object* l_Lean_initFn____x40_Lean_Parser_Extra___hyg_938____closed__7; lean_object* l_Lean_Elab_throwIllFormedSyntax___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_tryPostponeIfMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -707,6 +721,7 @@ lean_object* l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isPatternVar_match__3(lean_object*); lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isAuxDiscrName___closed__1; +uint8_t l_Lean_Expr_hasLooseBVars(lean_object*); lean_object* l_Lean_Elab_Term_elabMatch_elabMatchDefault___closed__4; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabDiscrsWitMatchType_match__2___rarg(lean_object*, lean_object*); @@ -764,6 +779,7 @@ lean_object* l_Lean_Elab_Term_finalizePatternDecls_match__1(lean_object*); lean_object* l_Lean_Expr_getAppFn(lean_object*); lean_object* l_Lean_Elab_Term_instInhabitedMatchAltView; lean_object* l_Lean_Elab_Term_elabMatchAltView___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*); +extern lean_object* l_Lean_Expr_instantiateBetaRevRange___closed__1; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_withPatternVars(lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwCtorExpected___rarg___closed__2; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___lambda__2___closed__3; @@ -781,6 +797,7 @@ lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l_Lean_Elab_Term_ToDepElimPattern_main___lambda__1___boxed__const__1; lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Elab_Match_0__Lean_Elab_Term_withPatternVars_loop___spec__3(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_lengthAux___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_withElaboratedLHS___rarg(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_Meta_forallBoundedTelescope___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_getNumExplicitCtorParams___spec__2___rarg(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_match_ignoreUnusedAlts; @@ -797,6 +814,7 @@ lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_ToDepElimPattern_main___ lean_object* l_Lean_Elab_Term_reportMatcherResultErrors(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_substCore___lambda__1___closed__3; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_withElaboratedLHS_match__1(lean_object*); +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__5___rarg(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0__Lean_Elab_Term_getMatchAlts___spec__1(lean_object*, size_t, size_t, lean_object*); lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___closed__3; lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -805,7 +823,7 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_withPatternVars_loop_ lean_object* l_Lean_Elab_Term_reportMatcherResultErrors___closed__2; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabDiscrsWitMatchType_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabMVarWithIdKind___closed__1; -lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__4___rarg(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__4___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_CtorApp_processCtorAppAux_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_indentExpr(lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_CtorApp_finalize___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -827,14 +845,15 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__3 lean_object* l_Lean_Elab_Term_isLocalIdent_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__4___lambda__1___closed__1; lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(size_t, size_t, lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_8715_(lean_object*); lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_1486_(lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_8492_(lean_object*); lean_object* l_Lean_Elab_Term_CollectPatternVars_CtorApp_Context_paramDeclIdx___default; lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_5990_(lean_object*); lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_reportMatcherResultErrors___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkSimpleThunk(lean_object*); lean_object* l_Lean_Meta_Match_counterExamplesToMessageData(lean_object*); +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__4; lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___closed__14; lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabDiscrsWitMatchType___spec__1___lambda__1___closed__3; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_withElaboratedLHS___rarg___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*); @@ -873,6 +892,7 @@ lean_object* l_Lean_throwError___at_Lean_Elab_Term_CollectPatternVars_CtorApp_pr lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___closed__1; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__2___rarg(lean_object*); lean_object* l_Lean_Elab_getBetterRef(lean_object*, lean_object*); +uint8_t lean_string_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Syntax_mkLit(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_reportMatcherResultErrors___closed__1; @@ -23059,6 +23079,1611 @@ lean_dec(x_1); return x_10; } } +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 6) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; uint64_t x_7; lean_object* x_8; lean_object* x_9; +lean_dec(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_1, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_1, 2); +lean_inc(x_6); +x_7 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); +lean_dec(x_1); +x_8 = lean_box_uint64(x_7); +x_9 = lean_apply_4(x_2, x_4, x_5, x_6, x_8); +return x_9; +} +else +{ +lean_object* x_10; +lean_dec(x_2); +x_10 = lean_apply_1(x_3, x_1); +return x_10; +} +} +} +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__1___rarg), 3, 0); +return x_2; +} +} +static lean_object* _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("PUnit"); +return x_1; +} +} +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; +lean_dec(x_2); +x_4 = lean_apply_1(x_3, x_1); +return x_4; +} +else +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 1); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; +x_7 = lean_ctor_get(x_5, 2); +lean_inc(x_7); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; +lean_dec(x_5); +lean_dec(x_2); +x_8 = lean_apply_1(x_3, x_1); +return x_8; +} +else +{ +lean_object* x_9; +x_9 = lean_ctor_get(x_7, 0); +lean_inc(x_9); +if (lean_obj_tag(x_9) == 2) +{ +lean_object* x_10; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +if (lean_obj_tag(x_10) == 1) +{ +lean_object* x_11; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +if (lean_obj_tag(x_11) == 1) +{ +lean_object* x_12; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; uint8_t x_14; +x_13 = lean_ctor_get(x_1, 1); +lean_inc(x_13); +x_14 = !lean_is_exclusive(x_5); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; +x_15 = lean_ctor_get(x_5, 0); +x_16 = lean_ctor_get(x_5, 2); +lean_dec(x_16); +x_17 = lean_ctor_get(x_5, 1); +lean_dec(x_17); +x_18 = !lean_is_exclusive(x_7); +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; uint8_t x_21; +x_19 = lean_ctor_get(x_7, 1); +x_20 = lean_ctor_get(x_7, 0); +lean_dec(x_20); +x_21 = !lean_is_exclusive(x_9); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; +x_22 = lean_ctor_get(x_9, 1); +x_23 = lean_ctor_get(x_9, 2); +x_24 = lean_ctor_get(x_9, 3); +x_25 = lean_ctor_get(x_9, 0); +lean_dec(x_25); +x_26 = !lean_is_exclusive(x_10); +if (x_26 == 0) +{ +lean_object* x_27; size_t x_28; lean_object* x_29; uint8_t x_30; +x_27 = lean_ctor_get(x_10, 1); +x_28 = lean_ctor_get_usize(x_10, 2); +x_29 = lean_ctor_get(x_10, 0); +lean_dec(x_29); +x_30 = !lean_is_exclusive(x_11); +if (x_30 == 0) +{ +lean_object* x_31; size_t x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; +x_31 = lean_ctor_get(x_11, 1); +x_32 = lean_ctor_get_usize(x_11, 2); +x_33 = lean_ctor_get(x_11, 0); +lean_dec(x_33); +x_34 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; +x_35 = lean_string_dec_eq(x_31, x_34); +lean_dec(x_31); +if (x_35 == 0) +{ +lean_object* x_36; +lean_free_object(x_11); +lean_free_object(x_10); +lean_dec(x_27); +lean_free_object(x_9); +lean_dec(x_24); +lean_dec(x_23); +lean_dec(x_22); +lean_free_object(x_7); +lean_dec(x_19); +lean_free_object(x_5); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_2); +x_36 = lean_apply_1(x_3, x_1); +return x_36; +} +else +{ +uint8_t x_37; +x_37 = !lean_is_exclusive(x_1); +if (x_37 == 0) +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; +x_38 = lean_ctor_get(x_1, 1); +lean_dec(x_38); +x_39 = lean_ctor_get(x_1, 0); +lean_dec(x_39); +x_40 = l_Lean_instToExprUnit___lambda__1___closed__1; +x_41 = lean_string_dec_eq(x_27, x_40); +if (x_41 == 0) +{ +lean_object* x_42; +lean_dec(x_2); +lean_ctor_set(x_11, 1, x_34); +x_42 = lean_apply_1(x_3, x_1); +return x_42; +} +else +{ +lean_dec(x_27); +if (lean_obj_tag(x_19) == 0) +{ +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +lean_free_object(x_1); +lean_free_object(x_11); +lean_free_object(x_10); +lean_free_object(x_9); +lean_free_object(x_7); +lean_free_object(x_5); +lean_dec(x_3); +x_43 = lean_box_usize(x_32); +x_44 = lean_box_usize(x_28); +x_45 = lean_apply_6(x_2, x_22, x_23, x_24, x_15, x_43, x_44); +return x_45; +} +else +{ +lean_object* x_46; +lean_dec(x_2); +lean_ctor_set(x_11, 1, x_34); +lean_ctor_set(x_10, 1, x_40); +x_46 = lean_apply_1(x_3, x_1); +return x_46; +} +} +else +{ +lean_object* x_47; +lean_dec(x_2); +lean_ctor_set(x_11, 1, x_34); +lean_ctor_set(x_10, 1, x_40); +x_47 = lean_apply_1(x_3, x_1); +return x_47; +} +} +} +else +{ +lean_object* x_48; uint8_t x_49; +lean_dec(x_1); +x_48 = l_Lean_instToExprUnit___lambda__1___closed__1; +x_49 = lean_string_dec_eq(x_27, x_48); +if (x_49 == 0) +{ +lean_object* x_50; lean_object* x_51; +lean_dec(x_2); +lean_ctor_set(x_11, 1, x_34); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_5); +lean_ctor_set(x_50, 1, x_13); +x_51 = lean_apply_1(x_3, x_50); +return x_51; +} +else +{ +lean_dec(x_27); +if (lean_obj_tag(x_19) == 0) +{ +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; +lean_free_object(x_11); +lean_free_object(x_10); +lean_free_object(x_9); +lean_free_object(x_7); +lean_free_object(x_5); +lean_dec(x_3); +x_52 = lean_box_usize(x_32); +x_53 = lean_box_usize(x_28); +x_54 = lean_apply_6(x_2, x_22, x_23, x_24, x_15, x_52, x_53); +return x_54; +} +else +{ +lean_object* x_55; lean_object* x_56; +lean_dec(x_2); +lean_ctor_set(x_11, 1, x_34); +lean_ctor_set(x_10, 1, x_48); +x_55 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_55, 0, x_5); +lean_ctor_set(x_55, 1, x_13); +x_56 = lean_apply_1(x_3, x_55); +return x_56; +} +} +else +{ +lean_object* x_57; lean_object* x_58; +lean_dec(x_2); +lean_ctor_set(x_11, 1, x_34); +lean_ctor_set(x_10, 1, x_48); +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_5); +lean_ctor_set(x_57, 1, x_13); +x_58 = lean_apply_1(x_3, x_57); +return x_58; +} +} +} +} +} +else +{ +lean_object* x_59; size_t x_60; lean_object* x_61; uint8_t x_62; +x_59 = lean_ctor_get(x_11, 1); +x_60 = lean_ctor_get_usize(x_11, 2); +lean_inc(x_59); +lean_dec(x_11); +x_61 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; +x_62 = lean_string_dec_eq(x_59, x_61); +lean_dec(x_59); +if (x_62 == 0) +{ +lean_object* x_63; +lean_free_object(x_10); +lean_dec(x_27); +lean_free_object(x_9); +lean_dec(x_24); +lean_dec(x_23); +lean_dec(x_22); +lean_free_object(x_7); +lean_dec(x_19); +lean_free_object(x_5); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_2); +x_63 = lean_apply_1(x_3, x_1); +return x_63; +} +else +{ +lean_object* x_64; lean_object* x_65; uint8_t x_66; +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + lean_ctor_release(x_1, 1); + x_64 = x_1; +} else { + lean_dec_ref(x_1); + x_64 = lean_box(0); +} +x_65 = l_Lean_instToExprUnit___lambda__1___closed__1; +x_66 = lean_string_dec_eq(x_27, x_65); +if (x_66 == 0) +{ +lean_object* x_67; lean_object* x_68; lean_object* x_69; +lean_dec(x_2); +x_67 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +lean_ctor_set(x_67, 0, x_12); +lean_ctor_set(x_67, 1, x_61); +lean_ctor_set_usize(x_67, 2, x_60); +lean_ctor_set(x_10, 0, x_67); +if (lean_is_scalar(x_64)) { + x_68 = lean_alloc_ctor(1, 2, 0); +} else { + x_68 = x_64; +} +lean_ctor_set(x_68, 0, x_5); +lean_ctor_set(x_68, 1, x_13); +x_69 = lean_apply_1(x_3, x_68); +return x_69; +} +else +{ +lean_dec(x_27); +if (lean_obj_tag(x_19) == 0) +{ +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_70; lean_object* x_71; lean_object* x_72; +lean_dec(x_64); +lean_free_object(x_10); +lean_free_object(x_9); +lean_free_object(x_7); +lean_free_object(x_5); +lean_dec(x_3); +x_70 = lean_box_usize(x_60); +x_71 = lean_box_usize(x_28); +x_72 = lean_apply_6(x_2, x_22, x_23, x_24, x_15, x_70, x_71); +return x_72; +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; +lean_dec(x_2); +x_73 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +lean_ctor_set(x_73, 0, x_12); +lean_ctor_set(x_73, 1, x_61); +lean_ctor_set_usize(x_73, 2, x_60); +lean_ctor_set(x_10, 1, x_65); +lean_ctor_set(x_10, 0, x_73); +if (lean_is_scalar(x_64)) { + x_74 = lean_alloc_ctor(1, 2, 0); +} else { + x_74 = x_64; +} +lean_ctor_set(x_74, 0, x_5); +lean_ctor_set(x_74, 1, x_13); +x_75 = lean_apply_1(x_3, x_74); +return x_75; +} +} +else +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; +lean_dec(x_2); +x_76 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +lean_ctor_set(x_76, 0, x_12); +lean_ctor_set(x_76, 1, x_61); +lean_ctor_set_usize(x_76, 2, x_60); +lean_ctor_set(x_10, 1, x_65); +lean_ctor_set(x_10, 0, x_76); +if (lean_is_scalar(x_64)) { + x_77 = lean_alloc_ctor(1, 2, 0); +} else { + x_77 = x_64; +} +lean_ctor_set(x_77, 0, x_5); +lean_ctor_set(x_77, 1, x_13); +x_78 = lean_apply_1(x_3, x_77); +return x_78; +} +} +} +} +} +else +{ +lean_object* x_79; size_t x_80; lean_object* x_81; size_t x_82; lean_object* x_83; lean_object* x_84; uint8_t x_85; +x_79 = lean_ctor_get(x_10, 1); +x_80 = lean_ctor_get_usize(x_10, 2); +lean_inc(x_79); +lean_dec(x_10); +x_81 = lean_ctor_get(x_11, 1); +lean_inc(x_81); +x_82 = lean_ctor_get_usize(x_11, 2); +if (lean_is_exclusive(x_11)) { + lean_ctor_release(x_11, 0); + lean_ctor_release(x_11, 1); + x_83 = x_11; +} else { + lean_dec_ref(x_11); + x_83 = lean_box(0); +} +x_84 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; +x_85 = lean_string_dec_eq(x_81, x_84); +lean_dec(x_81); +if (x_85 == 0) +{ +lean_object* x_86; +lean_dec(x_83); +lean_dec(x_79); +lean_free_object(x_9); +lean_dec(x_24); +lean_dec(x_23); +lean_dec(x_22); +lean_free_object(x_7); +lean_dec(x_19); +lean_free_object(x_5); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_2); +x_86 = lean_apply_1(x_3, x_1); +return x_86; +} +else +{ +lean_object* x_87; lean_object* x_88; uint8_t x_89; +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + lean_ctor_release(x_1, 1); + x_87 = x_1; +} else { + lean_dec_ref(x_1); + x_87 = lean_box(0); +} +x_88 = l_Lean_instToExprUnit___lambda__1___closed__1; +x_89 = lean_string_dec_eq(x_79, x_88); +if (x_89 == 0) +{ +lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; +lean_dec(x_2); +if (lean_is_scalar(x_83)) { + x_90 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_90 = x_83; +} +lean_ctor_set(x_90, 0, x_12); +lean_ctor_set(x_90, 1, x_84); +lean_ctor_set_usize(x_90, 2, x_82); +x_91 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +lean_ctor_set(x_91, 0, x_90); +lean_ctor_set(x_91, 1, x_79); +lean_ctor_set_usize(x_91, 2, x_80); +lean_ctor_set(x_9, 0, x_91); +if (lean_is_scalar(x_87)) { + x_92 = lean_alloc_ctor(1, 2, 0); +} else { + x_92 = x_87; +} +lean_ctor_set(x_92, 0, x_5); +lean_ctor_set(x_92, 1, x_13); +x_93 = lean_apply_1(x_3, x_92); +return x_93; +} +else +{ +lean_dec(x_79); +if (lean_obj_tag(x_19) == 0) +{ +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; +lean_dec(x_87); +lean_dec(x_83); +lean_free_object(x_9); +lean_free_object(x_7); +lean_free_object(x_5); +lean_dec(x_3); +x_94 = lean_box_usize(x_82); +x_95 = lean_box_usize(x_80); +x_96 = lean_apply_6(x_2, x_22, x_23, x_24, x_15, x_94, x_95); +return x_96; +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; +lean_dec(x_2); +if (lean_is_scalar(x_83)) { + x_97 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_97 = x_83; +} +lean_ctor_set(x_97, 0, x_12); +lean_ctor_set(x_97, 1, x_84); +lean_ctor_set_usize(x_97, 2, x_82); +x_98 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +lean_ctor_set(x_98, 0, x_97); +lean_ctor_set(x_98, 1, x_88); +lean_ctor_set_usize(x_98, 2, x_80); +lean_ctor_set(x_9, 0, x_98); +if (lean_is_scalar(x_87)) { + x_99 = lean_alloc_ctor(1, 2, 0); +} else { + x_99 = x_87; +} +lean_ctor_set(x_99, 0, x_5); +lean_ctor_set(x_99, 1, x_13); +x_100 = lean_apply_1(x_3, x_99); +return x_100; +} +} +else +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; +lean_dec(x_2); +if (lean_is_scalar(x_83)) { + x_101 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_101 = x_83; +} +lean_ctor_set(x_101, 0, x_12); +lean_ctor_set(x_101, 1, x_84); +lean_ctor_set_usize(x_101, 2, x_82); +x_102 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +lean_ctor_set(x_102, 0, x_101); +lean_ctor_set(x_102, 1, x_88); +lean_ctor_set_usize(x_102, 2, x_80); +lean_ctor_set(x_9, 0, x_102); +if (lean_is_scalar(x_87)) { + x_103 = lean_alloc_ctor(1, 2, 0); +} else { + x_103 = x_87; +} +lean_ctor_set(x_103, 0, x_5); +lean_ctor_set(x_103, 1, x_13); +x_104 = lean_apply_1(x_3, x_103); +return x_104; +} +} +} +} +} +else +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; size_t x_109; lean_object* x_110; lean_object* x_111; size_t x_112; lean_object* x_113; lean_object* x_114; uint8_t x_115; +x_105 = lean_ctor_get(x_9, 1); +x_106 = lean_ctor_get(x_9, 2); +x_107 = lean_ctor_get(x_9, 3); +lean_inc(x_107); +lean_inc(x_106); +lean_inc(x_105); +lean_dec(x_9); +x_108 = lean_ctor_get(x_10, 1); +lean_inc(x_108); +x_109 = lean_ctor_get_usize(x_10, 2); +if (lean_is_exclusive(x_10)) { + lean_ctor_release(x_10, 0); + lean_ctor_release(x_10, 1); + x_110 = x_10; +} else { + lean_dec_ref(x_10); + x_110 = lean_box(0); +} +x_111 = lean_ctor_get(x_11, 1); +lean_inc(x_111); +x_112 = lean_ctor_get_usize(x_11, 2); +if (lean_is_exclusive(x_11)) { + lean_ctor_release(x_11, 0); + lean_ctor_release(x_11, 1); + x_113 = x_11; +} else { + lean_dec_ref(x_11); + x_113 = lean_box(0); +} +x_114 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; +x_115 = lean_string_dec_eq(x_111, x_114); +lean_dec(x_111); +if (x_115 == 0) +{ +lean_object* x_116; +lean_dec(x_113); +lean_dec(x_110); +lean_dec(x_108); +lean_dec(x_107); +lean_dec(x_106); +lean_dec(x_105); +lean_free_object(x_7); +lean_dec(x_19); +lean_free_object(x_5); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_2); +x_116 = lean_apply_1(x_3, x_1); +return x_116; +} +else +{ +lean_object* x_117; lean_object* x_118; uint8_t x_119; +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + lean_ctor_release(x_1, 1); + x_117 = x_1; +} else { + lean_dec_ref(x_1); + x_117 = lean_box(0); +} +x_118 = l_Lean_instToExprUnit___lambda__1___closed__1; +x_119 = lean_string_dec_eq(x_108, x_118); +if (x_119 == 0) +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; +lean_dec(x_2); +if (lean_is_scalar(x_113)) { + x_120 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_120 = x_113; +} +lean_ctor_set(x_120, 0, x_12); +lean_ctor_set(x_120, 1, x_114); +lean_ctor_set_usize(x_120, 2, x_112); +if (lean_is_scalar(x_110)) { + x_121 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_121 = x_110; +} +lean_ctor_set(x_121, 0, x_120); +lean_ctor_set(x_121, 1, x_108); +lean_ctor_set_usize(x_121, 2, x_109); +x_122 = lean_alloc_ctor(2, 4, 0); +lean_ctor_set(x_122, 0, x_121); +lean_ctor_set(x_122, 1, x_105); +lean_ctor_set(x_122, 2, x_106); +lean_ctor_set(x_122, 3, x_107); +lean_ctor_set(x_7, 0, x_122); +if (lean_is_scalar(x_117)) { + x_123 = lean_alloc_ctor(1, 2, 0); +} else { + x_123 = x_117; +} +lean_ctor_set(x_123, 0, x_5); +lean_ctor_set(x_123, 1, x_13); +x_124 = lean_apply_1(x_3, x_123); +return x_124; +} +else +{ +lean_dec(x_108); +if (lean_obj_tag(x_19) == 0) +{ +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; +lean_dec(x_117); +lean_dec(x_113); +lean_dec(x_110); +lean_free_object(x_7); +lean_free_object(x_5); +lean_dec(x_3); +x_125 = lean_box_usize(x_112); +x_126 = lean_box_usize(x_109); +x_127 = lean_apply_6(x_2, x_105, x_106, x_107, x_15, x_125, x_126); +return x_127; +} +else +{ +lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; +lean_dec(x_2); +if (lean_is_scalar(x_113)) { + x_128 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_128 = x_113; +} +lean_ctor_set(x_128, 0, x_12); +lean_ctor_set(x_128, 1, x_114); +lean_ctor_set_usize(x_128, 2, x_112); +if (lean_is_scalar(x_110)) { + x_129 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_129 = x_110; +} +lean_ctor_set(x_129, 0, x_128); +lean_ctor_set(x_129, 1, x_118); +lean_ctor_set_usize(x_129, 2, x_109); +x_130 = lean_alloc_ctor(2, 4, 0); +lean_ctor_set(x_130, 0, x_129); +lean_ctor_set(x_130, 1, x_105); +lean_ctor_set(x_130, 2, x_106); +lean_ctor_set(x_130, 3, x_107); +lean_ctor_set(x_7, 0, x_130); +if (lean_is_scalar(x_117)) { + x_131 = lean_alloc_ctor(1, 2, 0); +} else { + x_131 = x_117; +} +lean_ctor_set(x_131, 0, x_5); +lean_ctor_set(x_131, 1, x_13); +x_132 = lean_apply_1(x_3, x_131); +return x_132; +} +} +else +{ +lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; +lean_dec(x_2); +if (lean_is_scalar(x_113)) { + x_133 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_133 = x_113; +} +lean_ctor_set(x_133, 0, x_12); +lean_ctor_set(x_133, 1, x_114); +lean_ctor_set_usize(x_133, 2, x_112); +if (lean_is_scalar(x_110)) { + x_134 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_134 = x_110; +} +lean_ctor_set(x_134, 0, x_133); +lean_ctor_set(x_134, 1, x_118); +lean_ctor_set_usize(x_134, 2, x_109); +x_135 = lean_alloc_ctor(2, 4, 0); +lean_ctor_set(x_135, 0, x_134); +lean_ctor_set(x_135, 1, x_105); +lean_ctor_set(x_135, 2, x_106); +lean_ctor_set(x_135, 3, x_107); +lean_ctor_set(x_7, 0, x_135); +if (lean_is_scalar(x_117)) { + x_136 = lean_alloc_ctor(1, 2, 0); +} else { + x_136 = x_117; +} +lean_ctor_set(x_136, 0, x_5); +lean_ctor_set(x_136, 1, x_13); +x_137 = lean_apply_1(x_3, x_136); +return x_137; +} +} +} +} +} +else +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; size_t x_144; lean_object* x_145; lean_object* x_146; size_t x_147; lean_object* x_148; lean_object* x_149; uint8_t x_150; +x_138 = lean_ctor_get(x_7, 1); +lean_inc(x_138); +lean_dec(x_7); +x_139 = lean_ctor_get(x_9, 1); +lean_inc(x_139); +x_140 = lean_ctor_get(x_9, 2); +lean_inc(x_140); +x_141 = lean_ctor_get(x_9, 3); +lean_inc(x_141); +if (lean_is_exclusive(x_9)) { + lean_ctor_release(x_9, 0); + lean_ctor_release(x_9, 1); + lean_ctor_release(x_9, 2); + lean_ctor_release(x_9, 3); + x_142 = x_9; +} else { + lean_dec_ref(x_9); + x_142 = lean_box(0); +} +x_143 = lean_ctor_get(x_10, 1); +lean_inc(x_143); +x_144 = lean_ctor_get_usize(x_10, 2); +if (lean_is_exclusive(x_10)) { + lean_ctor_release(x_10, 0); + lean_ctor_release(x_10, 1); + x_145 = x_10; +} else { + lean_dec_ref(x_10); + x_145 = lean_box(0); +} +x_146 = lean_ctor_get(x_11, 1); +lean_inc(x_146); +x_147 = lean_ctor_get_usize(x_11, 2); +if (lean_is_exclusive(x_11)) { + lean_ctor_release(x_11, 0); + lean_ctor_release(x_11, 1); + x_148 = x_11; +} else { + lean_dec_ref(x_11); + x_148 = lean_box(0); +} +x_149 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; +x_150 = lean_string_dec_eq(x_146, x_149); +lean_dec(x_146); +if (x_150 == 0) +{ +lean_object* x_151; +lean_dec(x_148); +lean_dec(x_145); +lean_dec(x_143); +lean_dec(x_142); +lean_dec(x_141); +lean_dec(x_140); +lean_dec(x_139); +lean_dec(x_138); +lean_free_object(x_5); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_2); +x_151 = lean_apply_1(x_3, x_1); +return x_151; +} +else +{ +lean_object* x_152; lean_object* x_153; uint8_t x_154; +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + lean_ctor_release(x_1, 1); + x_152 = x_1; +} else { + lean_dec_ref(x_1); + x_152 = lean_box(0); +} +x_153 = l_Lean_instToExprUnit___lambda__1___closed__1; +x_154 = lean_string_dec_eq(x_143, x_153); +if (x_154 == 0) +{ +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_dec(x_2); +if (lean_is_scalar(x_148)) { + x_155 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_155 = x_148; +} +lean_ctor_set(x_155, 0, x_12); +lean_ctor_set(x_155, 1, x_149); +lean_ctor_set_usize(x_155, 2, x_147); +if (lean_is_scalar(x_145)) { + x_156 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_156 = x_145; +} +lean_ctor_set(x_156, 0, x_155); +lean_ctor_set(x_156, 1, x_143); +lean_ctor_set_usize(x_156, 2, x_144); +if (lean_is_scalar(x_142)) { + x_157 = lean_alloc_ctor(2, 4, 0); +} else { + x_157 = x_142; +} +lean_ctor_set(x_157, 0, x_156); +lean_ctor_set(x_157, 1, x_139); +lean_ctor_set(x_157, 2, x_140); +lean_ctor_set(x_157, 3, x_141); +x_158 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_158, 0, x_157); +lean_ctor_set(x_158, 1, x_138); +lean_ctor_set(x_5, 2, x_158); +if (lean_is_scalar(x_152)) { + x_159 = lean_alloc_ctor(1, 2, 0); +} else { + x_159 = x_152; +} +lean_ctor_set(x_159, 0, x_5); +lean_ctor_set(x_159, 1, x_13); +x_160 = lean_apply_1(x_3, x_159); +return x_160; +} +else +{ +lean_dec(x_143); +if (lean_obj_tag(x_138) == 0) +{ +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_161; lean_object* x_162; lean_object* x_163; +lean_dec(x_152); +lean_dec(x_148); +lean_dec(x_145); +lean_dec(x_142); +lean_free_object(x_5); +lean_dec(x_3); +x_161 = lean_box_usize(x_147); +x_162 = lean_box_usize(x_144); +x_163 = lean_apply_6(x_2, x_139, x_140, x_141, x_15, x_161, x_162); +return x_163; +} +else +{ +lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; +lean_dec(x_2); +if (lean_is_scalar(x_148)) { + x_164 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_164 = x_148; +} +lean_ctor_set(x_164, 0, x_12); +lean_ctor_set(x_164, 1, x_149); +lean_ctor_set_usize(x_164, 2, x_147); +if (lean_is_scalar(x_145)) { + x_165 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_165 = x_145; +} +lean_ctor_set(x_165, 0, x_164); +lean_ctor_set(x_165, 1, x_153); +lean_ctor_set_usize(x_165, 2, x_144); +if (lean_is_scalar(x_142)) { + x_166 = lean_alloc_ctor(2, 4, 0); +} else { + x_166 = x_142; +} +lean_ctor_set(x_166, 0, x_165); +lean_ctor_set(x_166, 1, x_139); +lean_ctor_set(x_166, 2, x_140); +lean_ctor_set(x_166, 3, x_141); +x_167 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_167, 0, x_166); +lean_ctor_set(x_167, 1, x_138); +lean_ctor_set(x_5, 2, x_167); +if (lean_is_scalar(x_152)) { + x_168 = lean_alloc_ctor(1, 2, 0); +} else { + x_168 = x_152; +} +lean_ctor_set(x_168, 0, x_5); +lean_ctor_set(x_168, 1, x_13); +x_169 = lean_apply_1(x_3, x_168); +return x_169; +} +} +else +{ +lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; +lean_dec(x_2); +if (lean_is_scalar(x_148)) { + x_170 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_170 = x_148; +} +lean_ctor_set(x_170, 0, x_12); +lean_ctor_set(x_170, 1, x_149); +lean_ctor_set_usize(x_170, 2, x_147); +if (lean_is_scalar(x_145)) { + x_171 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_171 = x_145; +} +lean_ctor_set(x_171, 0, x_170); +lean_ctor_set(x_171, 1, x_153); +lean_ctor_set_usize(x_171, 2, x_144); +if (lean_is_scalar(x_142)) { + x_172 = lean_alloc_ctor(2, 4, 0); +} else { + x_172 = x_142; +} +lean_ctor_set(x_172, 0, x_171); +lean_ctor_set(x_172, 1, x_139); +lean_ctor_set(x_172, 2, x_140); +lean_ctor_set(x_172, 3, x_141); +x_173 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_173, 0, x_172); +lean_ctor_set(x_173, 1, x_138); +lean_ctor_set(x_5, 2, x_173); +if (lean_is_scalar(x_152)) { + x_174 = lean_alloc_ctor(1, 2, 0); +} else { + x_174 = x_152; +} +lean_ctor_set(x_174, 0, x_5); +lean_ctor_set(x_174, 1, x_13); +x_175 = lean_apply_1(x_3, x_174); +return x_175; +} +} +} +} +} +else +{ +lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; size_t x_184; lean_object* x_185; lean_object* x_186; size_t x_187; lean_object* x_188; lean_object* x_189; uint8_t x_190; +x_176 = lean_ctor_get(x_5, 0); +lean_inc(x_176); +lean_dec(x_5); +x_177 = lean_ctor_get(x_7, 1); +lean_inc(x_177); +if (lean_is_exclusive(x_7)) { + lean_ctor_release(x_7, 0); + lean_ctor_release(x_7, 1); + x_178 = x_7; +} else { + lean_dec_ref(x_7); + x_178 = lean_box(0); +} +x_179 = lean_ctor_get(x_9, 1); +lean_inc(x_179); +x_180 = lean_ctor_get(x_9, 2); +lean_inc(x_180); +x_181 = lean_ctor_get(x_9, 3); +lean_inc(x_181); +if (lean_is_exclusive(x_9)) { + lean_ctor_release(x_9, 0); + lean_ctor_release(x_9, 1); + lean_ctor_release(x_9, 2); + lean_ctor_release(x_9, 3); + x_182 = x_9; +} else { + lean_dec_ref(x_9); + x_182 = lean_box(0); +} +x_183 = lean_ctor_get(x_10, 1); +lean_inc(x_183); +x_184 = lean_ctor_get_usize(x_10, 2); +if (lean_is_exclusive(x_10)) { + lean_ctor_release(x_10, 0); + lean_ctor_release(x_10, 1); + x_185 = x_10; +} else { + lean_dec_ref(x_10); + x_185 = lean_box(0); +} +x_186 = lean_ctor_get(x_11, 1); +lean_inc(x_186); +x_187 = lean_ctor_get_usize(x_11, 2); +if (lean_is_exclusive(x_11)) { + lean_ctor_release(x_11, 0); + lean_ctor_release(x_11, 1); + x_188 = x_11; +} else { + lean_dec_ref(x_11); + x_188 = lean_box(0); +} +x_189 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; +x_190 = lean_string_dec_eq(x_186, x_189); +lean_dec(x_186); +if (x_190 == 0) +{ +lean_object* x_191; +lean_dec(x_188); +lean_dec(x_185); +lean_dec(x_183); +lean_dec(x_182); +lean_dec(x_181); +lean_dec(x_180); +lean_dec(x_179); +lean_dec(x_178); +lean_dec(x_177); +lean_dec(x_176); +lean_dec(x_13); +lean_dec(x_2); +x_191 = lean_apply_1(x_3, x_1); +return x_191; +} +else +{ +lean_object* x_192; lean_object* x_193; uint8_t x_194; +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + lean_ctor_release(x_1, 1); + x_192 = x_1; +} else { + lean_dec_ref(x_1); + x_192 = lean_box(0); +} +x_193 = l_Lean_instToExprUnit___lambda__1___closed__1; +x_194 = lean_string_dec_eq(x_183, x_193); +if (x_194 == 0) +{ +lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; +lean_dec(x_2); +if (lean_is_scalar(x_188)) { + x_195 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_195 = x_188; +} +lean_ctor_set(x_195, 0, x_12); +lean_ctor_set(x_195, 1, x_189); +lean_ctor_set_usize(x_195, 2, x_187); +if (lean_is_scalar(x_185)) { + x_196 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_196 = x_185; +} +lean_ctor_set(x_196, 0, x_195); +lean_ctor_set(x_196, 1, x_183); +lean_ctor_set_usize(x_196, 2, x_184); +if (lean_is_scalar(x_182)) { + x_197 = lean_alloc_ctor(2, 4, 0); +} else { + x_197 = x_182; +} +lean_ctor_set(x_197, 0, x_196); +lean_ctor_set(x_197, 1, x_179); +lean_ctor_set(x_197, 2, x_180); +lean_ctor_set(x_197, 3, x_181); +if (lean_is_scalar(x_178)) { + x_198 = lean_alloc_ctor(1, 2, 0); +} else { + x_198 = x_178; +} +lean_ctor_set(x_198, 0, x_197); +lean_ctor_set(x_198, 1, x_177); +x_199 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_199, 0, x_176); +lean_ctor_set(x_199, 1, x_6); +lean_ctor_set(x_199, 2, x_198); +if (lean_is_scalar(x_192)) { + x_200 = lean_alloc_ctor(1, 2, 0); +} else { + x_200 = x_192; +} +lean_ctor_set(x_200, 0, x_199); +lean_ctor_set(x_200, 1, x_13); +x_201 = lean_apply_1(x_3, x_200); +return x_201; +} +else +{ +lean_dec(x_183); +if (lean_obj_tag(x_177) == 0) +{ +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_202; lean_object* x_203; lean_object* x_204; +lean_dec(x_192); +lean_dec(x_188); +lean_dec(x_185); +lean_dec(x_182); +lean_dec(x_178); +lean_dec(x_3); +x_202 = lean_box_usize(x_187); +x_203 = lean_box_usize(x_184); +x_204 = lean_apply_6(x_2, x_179, x_180, x_181, x_176, x_202, x_203); +return x_204; +} +else +{ +lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; +lean_dec(x_2); +if (lean_is_scalar(x_188)) { + x_205 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_205 = x_188; +} +lean_ctor_set(x_205, 0, x_12); +lean_ctor_set(x_205, 1, x_189); +lean_ctor_set_usize(x_205, 2, x_187); +if (lean_is_scalar(x_185)) { + x_206 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_206 = x_185; +} +lean_ctor_set(x_206, 0, x_205); +lean_ctor_set(x_206, 1, x_193); +lean_ctor_set_usize(x_206, 2, x_184); +if (lean_is_scalar(x_182)) { + x_207 = lean_alloc_ctor(2, 4, 0); +} else { + x_207 = x_182; +} +lean_ctor_set(x_207, 0, x_206); +lean_ctor_set(x_207, 1, x_179); +lean_ctor_set(x_207, 2, x_180); +lean_ctor_set(x_207, 3, x_181); +if (lean_is_scalar(x_178)) { + x_208 = lean_alloc_ctor(1, 2, 0); +} else { + x_208 = x_178; +} +lean_ctor_set(x_208, 0, x_207); +lean_ctor_set(x_208, 1, x_177); +x_209 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_209, 0, x_176); +lean_ctor_set(x_209, 1, x_6); +lean_ctor_set(x_209, 2, x_208); +if (lean_is_scalar(x_192)) { + x_210 = lean_alloc_ctor(1, 2, 0); +} else { + x_210 = x_192; +} +lean_ctor_set(x_210, 0, x_209); +lean_ctor_set(x_210, 1, x_13); +x_211 = lean_apply_1(x_3, x_210); +return x_211; +} +} +else +{ +lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; +lean_dec(x_2); +if (lean_is_scalar(x_188)) { + x_212 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_212 = x_188; +} +lean_ctor_set(x_212, 0, x_12); +lean_ctor_set(x_212, 1, x_189); +lean_ctor_set_usize(x_212, 2, x_187); +if (lean_is_scalar(x_185)) { + x_213 = lean_alloc_ctor(1, 2, sizeof(size_t)*1); +} else { + x_213 = x_185; +} +lean_ctor_set(x_213, 0, x_212); +lean_ctor_set(x_213, 1, x_193); +lean_ctor_set_usize(x_213, 2, x_184); +if (lean_is_scalar(x_182)) { + x_214 = lean_alloc_ctor(2, 4, 0); +} else { + x_214 = x_182; +} +lean_ctor_set(x_214, 0, x_213); +lean_ctor_set(x_214, 1, x_179); +lean_ctor_set(x_214, 2, x_180); +lean_ctor_set(x_214, 3, x_181); +if (lean_is_scalar(x_178)) { + x_215 = lean_alloc_ctor(1, 2, 0); +} else { + x_215 = x_178; +} +lean_ctor_set(x_215, 0, x_214); +lean_ctor_set(x_215, 1, x_177); +x_216 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_216, 0, x_176); +lean_ctor_set(x_216, 1, x_6); +lean_ctor_set(x_216, 2, x_215); +if (lean_is_scalar(x_192)) { + x_217 = lean_alloc_ctor(1, 2, 0); +} else { + x_217 = x_192; +} +lean_ctor_set(x_217, 0, x_216); +lean_ctor_set(x_217, 1, x_13); +x_218 = lean_apply_1(x_3, x_217); +return x_218; +} +} +} +} +} +else +{ +lean_object* x_219; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_2); +x_219 = lean_apply_1(x_3, x_1); +return x_219; +} +} +else +{ +lean_object* x_220; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_2); +x_220 = lean_apply_1(x_3, x_1); +return x_220; +} +} +else +{ +lean_object* x_221; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_2); +x_221 = lean_apply_1(x_3, x_1); +return x_221; +} +} +else +{ +lean_object* x_222; +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_2); +x_222 = lean_apply_1(x_3, x_1); +return x_222; +} +} +} +else +{ +lean_object* x_223; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +x_223 = lean_apply_1(x_3, x_1); +return x_223; +} +} +} +} +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg), 3, 0); +return x_2; +} +} +static lean_object* _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("altLHSS.length == rhss.size\n "); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Expr_instantiateBetaRevRange___closed__1; +x_2 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__1; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("_private.Lean.Elab.Match.0.Lean.Elab.Term.isMatchUnit?"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0__Lean_Elab_Term_getMatchAlts___spec__1___closed__1; +x_2 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__3; +x_3 = lean_unsigned_to_nat(715u); +x_4 = lean_unsigned_to_nat(2u); +x_5 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__2; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f(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) { +_start: +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_List_lengthAux___rarg(x_1, x_8); +x_10 = lean_array_get_size(x_2); +x_11 = lean_nat_dec_eq(x_9, x_10); +lean_dec(x_10); +lean_dec(x_9); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_12 = l___private_Lean_Meta_LevelDefEq_0__Lean_Meta_solveSelfMax___closed__1; +x_13 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__4; +x_14 = lean_panic_fn(x_12, x_13); +x_15 = lean_apply_5(x_14, x_3, x_4, x_5, x_6, x_7); +return x_15; +} +else +{ +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_16; lean_object* x_17; +x_16 = lean_box(0); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_7); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; +x_18 = lean_ctor_get(x_1, 0); +x_19 = lean_ctor_get(x_18, 1); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; +x_20 = lean_ctor_get(x_18, 2); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_box(0); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_7); +return x_22; +} +else +{ +lean_object* x_23; +x_23 = lean_ctor_get(x_20, 0); +if (lean_obj_tag(x_23) == 2) +{ +lean_object* x_24; +x_24 = lean_ctor_get(x_23, 0); +if (lean_obj_tag(x_24) == 1) +{ +lean_object* x_25; +x_25 = lean_ctor_get(x_24, 0); +if (lean_obj_tag(x_25) == 1) +{ +lean_object* x_26; +x_26 = lean_ctor_get(x_25, 0); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; +x_27 = lean_ctor_get(x_1, 1); +x_28 = lean_ctor_get(x_20, 1); +x_29 = lean_ctor_get(x_24, 1); +x_30 = lean_ctor_get(x_25, 1); +x_31 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1; +x_32 = lean_string_dec_eq(x_30, x_31); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; +x_33 = lean_box(0); +x_34 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_34, 0, x_33); +lean_ctor_set(x_34, 1, x_7); +return x_34; +} +else +{ +lean_object* x_35; uint8_t x_36; +x_35 = l_Lean_instToExprUnit___lambda__1___closed__1; +x_36 = lean_string_dec_eq(x_29, x_35); +if (x_36 == 0) +{ +lean_object* x_37; lean_object* x_38; +x_37 = lean_box(0); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_7); +return x_38; +} +else +{ +if (lean_obj_tag(x_28) == 0) +{ +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_39; lean_object* x_40; +x_39 = l_Lean_instInhabitedExpr; +x_40 = lean_array_get(x_39, x_2, x_8); +if (lean_obj_tag(x_40) == 6) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_40, 2); +lean_inc(x_41); +lean_dec(x_40); +x_42 = l_Lean_Expr_hasLooseBVars(x_41); +if (x_42 == 0) +{ +lean_object* x_43; lean_object* x_44; +x_43 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_43, 0, x_41); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_43); +lean_ctor_set(x_44, 1, x_7); +return x_44; +} +else +{ +lean_object* x_45; lean_object* x_46; +lean_dec(x_41); +x_45 = lean_box(0); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_46, 1, x_7); +return x_46; +} +} +else +{ +lean_object* x_47; lean_object* x_48; +lean_dec(x_40); +x_47 = lean_box(0); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_7); +return x_48; +} +} +else +{ +lean_object* x_49; lean_object* x_50; +x_49 = lean_box(0); +x_50 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_7); +return x_50; +} +} +else +{ +lean_object* x_51; lean_object* x_52; +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_7); +return x_52; +} +} +} +} +else +{ +lean_object* x_53; lean_object* x_54; +x_53 = lean_box(0); +x_54 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_7); +return x_54; +} +} +else +{ +lean_object* x_55; lean_object* x_56; +x_55 = lean_box(0); +x_56 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_56, 0, x_55); +lean_ctor_set(x_56, 1, x_7); +return x_56; +} +} +else +{ +lean_object* x_57; lean_object* x_58; +x_57 = lean_box(0); +x_58 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_7); +return x_58; +} +} +else +{ +lean_object* x_59; lean_object* x_60; +x_59 = lean_box(0); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_7); +return x_60; +} +} +} +else +{ +lean_object* x_61; lean_object* x_62; +x_61 = lean_box(0); +x_62 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_62, 0, x_61); +lean_ctor_set(x_62, 1, x_7); +return x_62; +} +} +} +} +} +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___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) { +_start: +{ +lean_object* x_8; +x_8 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_2); +lean_dec(x_1); +return x_8; +} +} lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__1___rarg(lean_object* x_1) { _start: { @@ -23137,7 +24762,37 @@ x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_e return x_2; } } -lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__4___rarg(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__4___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; +lean_dec(x_2); +x_4 = lean_apply_1(x_3, x_1); +return x_4; +} +else +{ +lean_object* x_5; lean_object* x_6; +lean_dec(x_3); +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_1(x_2, x_5); +return x_6; +} +} +} +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__4___rarg), 3, 0); +return x_2; +} +} +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__5___rarg(lean_object* x_1, lean_object* x_2) { _start: { 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; @@ -23160,11 +24815,11 @@ x_9 = lean_apply_4(x_2, x_5, x_6, x_7, x_8); return x_9; } } -lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__4(lean_object* x_1) { +lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__5(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__4___rarg), 2, 0); +x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__5___rarg), 2, 0); return x_2; } } @@ -24932,7 +26587,7 @@ lean_inc(x_5); x_15 = l_Lean_Elab_Term_commitIfDidNotPostpone___rarg(x_14, x_5, x_6, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_15) == 0) { -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; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +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; lean_object* x_23; lean_object* x_24; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_16, 1); @@ -24953,191 +26608,207 @@ lean_inc(x_22); x_23 = lean_ctor_get(x_18, 1); lean_inc(x_23); lean_dec(x_18); -x_24 = lean_array_get_size(x_20); -x_25 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_5990____closed__1; -lean_inc(x_5); -x_26 = l_Lean_Elab_Term_mkAuxName(x_25, x_5, x_6, x_7, x_8, x_9, x_10, x_19); -if (lean_obj_tag(x_26) == 0) -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 0); -lean_inc(x_27); -x_28 = lean_ctor_get(x_26, 1); -lean_inc(x_28); -lean_dec(x_26); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); -lean_inc(x_22); -lean_inc(x_24); -lean_inc(x_21); -x_29 = l_Lean_Meta_Match_mkMatcher(x_27, x_21, x_24, x_22, x_7, x_8, x_9, x_10, x_28); +x_24 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f(x_22, x_23, x_7, x_8, x_9, x_10, x_19); +if (lean_obj_tag(x_24) == 0) +{ +lean_object* x_25; +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +x_27 = lean_array_get_size(x_20); +x_28 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_5990____closed__1; +lean_inc(x_5); +x_29 = l_Lean_Elab_Term_mkAuxName(x_28, x_5, x_6, x_7, x_8, x_9, x_10, x_26); if (lean_obj_tag(x_29) == 0) { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +lean_object* x_30; lean_object* x_31; lean_object* 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_alloc_ctor(1, 1, 0); -lean_ctor_set(x_32, 0, x_24); -x_33 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___closed__2; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -x_34 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(x_21, x_32, x_33, x_5, x_6, x_7, x_8, x_9, x_10, x_31); -if (lean_obj_tag(x_34) == 0) +lean_inc(x_22); +lean_inc(x_27); +lean_inc(x_21); +x_32 = l_Lean_Meta_Match_mkMatcher(x_30, x_21, x_27, x_22, x_7, x_8, x_9, x_10, x_31); +if (lean_obj_tag(x_32) == 0) { -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_34, 0); -lean_inc(x_35); -x_36 = lean_ctor_get(x_34, 1); -lean_inc(x_36); -lean_dec(x_34); +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_32, 1); +lean_inc(x_34); +lean_dec(x_32); +x_35 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_35, 0, x_27); +x_36 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___closed__2; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -lean_inc(x_30); -x_37 = l_Lean_Elab_Term_reportMatcherResultErrors(x_22, x_30, x_5, x_6, x_7, x_8, x_9, x_10, x_36); -lean_dec(x_22); +x_37 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(x_21, x_35, x_36, x_5, x_6, x_7, x_8, x_9, x_10, x_34); if (lean_obj_tag(x_37) == 0) { -lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_44; lean_object* x_45; lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; -x_38 = lean_ctor_get(x_37, 1); +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_37, 0); lean_inc(x_38); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - x_39 = x_37; +x_39 = lean_ctor_get(x_37, 1); +lean_inc(x_39); +lean_dec(x_37); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_33); +x_40 = l_Lean_Elab_Term_reportMatcherResultErrors(x_22, x_33, x_5, x_6, x_7, x_8, x_9, x_10, x_39); +lean_dec(x_22); +if (lean_obj_tag(x_40) == 0) +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; lean_object* x_48; lean_object* x_62; lean_object* x_63; lean_object* x_64; uint8_t x_65; +x_41 = lean_ctor_get(x_40, 1); +lean_inc(x_41); +if (lean_is_exclusive(x_40)) { + lean_ctor_release(x_40, 0); + lean_ctor_release(x_40, 1); + x_42 = x_40; } else { - lean_dec_ref(x_37); - x_39 = lean_box(0); + lean_dec_ref(x_40); + x_42 = lean_box(0); } -x_40 = lean_ctor_get(x_30, 0); -lean_inc(x_40); -lean_dec(x_30); -x_41 = l_Lean_mkApp(x_40, x_35); -x_42 = l_Lean_mkAppN(x_41, x_20); -lean_dec(x_20); -x_43 = l_Lean_mkAppN(x_42, x_23); -lean_dec(x_23); -x_59 = lean_st_ref_get(x_10, x_38); -x_60 = lean_ctor_get(x_59, 0); -lean_inc(x_60); -x_61 = lean_ctor_get(x_60, 3); -lean_inc(x_61); -lean_dec(x_60); -x_62 = lean_ctor_get_uint8(x_61, sizeof(void*)*1); -lean_dec(x_61); -if (x_62 == 0) -{ -lean_object* x_63; uint8_t x_64; -x_63 = lean_ctor_get(x_59, 1); -lean_inc(x_63); -lean_dec(x_59); -x_64 = 0; -x_44 = x_64; -x_45 = x_63; -goto block_58; -} -else -{ -lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; -x_65 = lean_ctor_get(x_59, 1); -lean_inc(x_65); -lean_dec(x_59); -x_66 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabDiscrsWitMatchType___spec__1___lambda__1___closed__5; -x_67 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_66, x_5, x_6, x_7, x_8, x_9, x_10, x_65); -x_68 = lean_ctor_get(x_67, 0); -lean_inc(x_68); -x_69 = lean_ctor_get(x_67, 1); -lean_inc(x_69); -lean_dec(x_67); -x_70 = lean_unbox(x_68); -lean_dec(x_68); -x_44 = x_70; -x_45 = x_69; -goto block_58; -} -block_58: -{ -if (x_44 == 0) -{ -lean_object* x_46; -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -if (lean_is_scalar(x_39)) { - x_46 = lean_alloc_ctor(0, 2, 0); -} else { - x_46 = x_39; -} -lean_ctor_set(x_46, 0, x_43); -lean_ctor_set(x_46, 1, x_45); -return x_46; -} -else -{ -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; uint8_t x_54; -lean_dec(x_39); +x_43 = lean_ctor_get(x_33, 0); lean_inc(x_43); -x_47 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_47, 0, x_43); -x_48 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___closed__4; -x_49 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_47); -x_50 = l_Lean_KernelException_toMessageData___closed__15; -x_51 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_51, 0, x_49); -lean_ctor_set(x_51, 1, x_50); -x_52 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabDiscrsWitMatchType___spec__1___lambda__1___closed__5; -x_53 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_52, x_51, x_5, x_6, x_7, x_8, x_9, x_10, x_45); +lean_dec(x_33); +x_44 = l_Lean_mkApp(x_43, x_38); +x_45 = l_Lean_mkAppN(x_44, x_20); +lean_dec(x_20); +x_46 = l_Lean_mkAppN(x_45, x_23); +lean_dec(x_23); +x_62 = lean_st_ref_get(x_10, x_41); +x_63 = lean_ctor_get(x_62, 0); +lean_inc(x_63); +x_64 = lean_ctor_get(x_63, 3); +lean_inc(x_64); +lean_dec(x_63); +x_65 = lean_ctor_get_uint8(x_64, sizeof(void*)*1); +lean_dec(x_64); +if (x_65 == 0) +{ +lean_object* x_66; uint8_t x_67; +x_66 = lean_ctor_get(x_62, 1); +lean_inc(x_66); +lean_dec(x_62); +x_67 = 0; +x_47 = x_67; +x_48 = x_66; +goto block_61; +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73; +x_68 = lean_ctor_get(x_62, 1); +lean_inc(x_68); +lean_dec(x_62); +x_69 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabDiscrsWitMatchType___spec__1___lambda__1___closed__5; +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_5, x_6, x_7, x_8, x_9, x_10, x_68); +x_71 = lean_ctor_get(x_70, 0); +lean_inc(x_71); +x_72 = lean_ctor_get(x_70, 1); +lean_inc(x_72); +lean_dec(x_70); +x_73 = lean_unbox(x_71); +lean_dec(x_71); +x_47 = x_73; +x_48 = x_72; +goto block_61; +} +block_61: +{ +if (x_47 == 0) +{ +lean_object* x_49; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_54 = !lean_is_exclusive(x_53); -if (x_54 == 0) -{ -lean_object* x_55; -x_55 = lean_ctor_get(x_53, 0); -lean_dec(x_55); -lean_ctor_set(x_53, 0, x_43); -return x_53; +if (lean_is_scalar(x_42)) { + x_49 = lean_alloc_ctor(0, 2, 0); +} else { + x_49 = x_42; +} +lean_ctor_set(x_49, 0, x_46); +lean_ctor_set(x_49, 1, x_48); +return x_49; } else { -lean_object* x_56; lean_object* x_57; -x_56 = lean_ctor_get(x_53, 1); -lean_inc(x_56); -lean_dec(x_53); -x_57 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_57, 0, x_43); -lean_ctor_set(x_57, 1, x_56); -return x_57; +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; uint8_t x_57; +lean_dec(x_42); +lean_inc(x_46); +x_50 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_50, 0, x_46); +x_51 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___closed__4; +x_52 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +x_53 = l_Lean_KernelException_toMessageData___closed__15; +x_54 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_53); +x_55 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabDiscrsWitMatchType___spec__1___lambda__1___closed__5; +x_56 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_55, x_54, x_5, x_6, x_7, x_8, x_9, x_10, x_48); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_57 = !lean_is_exclusive(x_56); +if (x_57 == 0) +{ +lean_object* x_58; +x_58 = lean_ctor_get(x_56, 0); +lean_dec(x_58); +lean_ctor_set(x_56, 0, x_46); +return x_56; +} +else +{ +lean_object* x_59; lean_object* x_60; +x_59 = lean_ctor_get(x_56, 1); +lean_inc(x_59); +lean_dec(x_56); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_46); +lean_ctor_set(x_60, 1, x_59); +return x_60; } } } } else { -uint8_t x_71; -lean_dec(x_35); -lean_dec(x_30); +uint8_t x_74; +lean_dec(x_38); +lean_dec(x_33); lean_dec(x_23); lean_dec(x_20); lean_dec(x_10); @@ -25146,63 +26817,63 @@ lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_71 = !lean_is_exclusive(x_37); -if (x_71 == 0) +x_74 = !lean_is_exclusive(x_40); +if (x_74 == 0) +{ +return x_40; +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_75 = lean_ctor_get(x_40, 0); +x_76 = lean_ctor_get(x_40, 1); +lean_inc(x_76); +lean_inc(x_75); +lean_dec(x_40); +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 +{ +uint8_t x_78; +lean_dec(x_33); +lean_dec(x_23); +lean_dec(x_22); +lean_dec(x_20); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_78 = !lean_is_exclusive(x_37); +if (x_78 == 0) { return x_37; } else { -lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_72 = lean_ctor_get(x_37, 0); -x_73 = lean_ctor_get(x_37, 1); -lean_inc(x_73); -lean_inc(x_72); +lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_79 = lean_ctor_get(x_37, 0); +x_80 = lean_ctor_get(x_37, 1); +lean_inc(x_80); +lean_inc(x_79); lean_dec(x_37); -x_74 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_74, 0, x_72); -lean_ctor_set(x_74, 1, x_73); -return x_74; +x_81 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_81, 0, x_79); +lean_ctor_set(x_81, 1, x_80); +return x_81; } } } else { -uint8_t x_75; -lean_dec(x_30); -lean_dec(x_23); -lean_dec(x_22); -lean_dec(x_20); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -x_75 = !lean_is_exclusive(x_34); -if (x_75 == 0) -{ -return x_34; -} -else -{ -lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_76 = lean_ctor_get(x_34, 0); -x_77 = lean_ctor_get(x_34, 1); -lean_inc(x_77); -lean_inc(x_76); -lean_dec(x_34); -x_78 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_78, 0, x_76); -lean_ctor_set(x_78, 1, x_77); -return x_78; -} -} -} -else -{ -uint8_t x_79; -lean_dec(x_24); +uint8_t x_82; +lean_dec(x_27); lean_dec(x_23); lean_dec(x_22); lean_dec(x_21); @@ -25213,30 +26884,63 @@ lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_79 = !lean_is_exclusive(x_29); -if (x_79 == 0) +x_82 = !lean_is_exclusive(x_32); +if (x_82 == 0) +{ +return x_32; +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_83 = lean_ctor_get(x_32, 0); +x_84 = lean_ctor_get(x_32, 1); +lean_inc(x_84); +lean_inc(x_83); +lean_dec(x_32); +x_85 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_85, 0, x_83); +lean_ctor_set(x_85, 1, x_84); +return x_85; +} +} +} +else +{ +uint8_t x_86; +lean_dec(x_27); +lean_dec(x_23); +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_86 = !lean_is_exclusive(x_29); +if (x_86 == 0) { return x_29; } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; -x_80 = lean_ctor_get(x_29, 0); -x_81 = lean_ctor_get(x_29, 1); -lean_inc(x_81); -lean_inc(x_80); +lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_87 = lean_ctor_get(x_29, 0); +x_88 = lean_ctor_get(x_29, 1); +lean_inc(x_88); +lean_inc(x_87); lean_dec(x_29); -x_82 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_82, 0, x_80); -lean_ctor_set(x_82, 1, x_81); -return x_82; +x_89 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_89, 0, x_87); +lean_ctor_set(x_89, 1, x_88); +return x_89; } } } else { -uint8_t x_83; -lean_dec(x_24); +uint8_t x_90; lean_dec(x_23); lean_dec(x_22); lean_dec(x_21); @@ -25247,52 +26951,93 @@ lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_83 = !lean_is_exclusive(x_26); -if (x_83 == 0) +x_90 = !lean_is_exclusive(x_24); +if (x_90 == 0) { -return x_26; +lean_object* x_91; lean_object* x_92; +x_91 = lean_ctor_get(x_24, 0); +lean_dec(x_91); +x_92 = lean_ctor_get(x_25, 0); +lean_inc(x_92); +lean_dec(x_25); +lean_ctor_set(x_24, 0, x_92); +return x_24; } else { -lean_object* x_84; lean_object* x_85; lean_object* x_86; -x_84 = lean_ctor_get(x_26, 0); -x_85 = lean_ctor_get(x_26, 1); -lean_inc(x_85); -lean_inc(x_84); -lean_dec(x_26); -x_86 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_86, 0, x_84); -lean_ctor_set(x_86, 1, x_85); -return x_86; +lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_93 = lean_ctor_get(x_24, 1); +lean_inc(x_93); +lean_dec(x_24); +x_94 = lean_ctor_get(x_25, 0); +lean_inc(x_94); +lean_dec(x_25); +x_95 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_95, 0, x_94); +lean_ctor_set(x_95, 1, x_93); +return x_95; } } } else { -uint8_t x_87; +uint8_t x_96; +lean_dec(x_23); +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_20); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_87 = !lean_is_exclusive(x_15); -if (x_87 == 0) +x_96 = !lean_is_exclusive(x_24); +if (x_96 == 0) +{ +return x_24; +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_97 = lean_ctor_get(x_24, 0); +x_98 = lean_ctor_get(x_24, 1); +lean_inc(x_98); +lean_inc(x_97); +lean_dec(x_24); +x_99 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_99, 0, x_97); +lean_ctor_set(x_99, 1, x_98); +return x_99; +} +} +} +else +{ +uint8_t x_100; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_100 = !lean_is_exclusive(x_15); +if (x_100 == 0) { return x_15; } else { -lean_object* x_88; lean_object* x_89; lean_object* x_90; -x_88 = lean_ctor_get(x_15, 0); -x_89 = lean_ctor_get(x_15, 1); -lean_inc(x_89); -lean_inc(x_88); +lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_101 = lean_ctor_get(x_15, 0); +x_102 = lean_ctor_get(x_15, 1); +lean_inc(x_102); +lean_inc(x_101); lean_dec(x_15); -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; +x_103 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_103, 0, x_101); +lean_ctor_set(x_103, 1, x_102); +return x_103; } } } @@ -28899,7 +30644,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_Match___hyg_8492_(lean_object* x_1) { +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_8715_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -29331,6 +31076,16 @@ l_Lean_Elab_Term_reportMatcherResultErrors___closed__1 = _init_l_Lean_Elab_Term_ lean_mark_persistent(l_Lean_Elab_Term_reportMatcherResultErrors___closed__1); l_Lean_Elab_Term_reportMatcherResultErrors___closed__2 = _init_l_Lean_Elab_Term_reportMatcherResultErrors___closed__2(); lean_mark_persistent(l_Lean_Elab_Term_reportMatcherResultErrors___closed__2); +l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__2___rarg___closed__1); +l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__1 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__1); +l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__2 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__2(); +lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__2); +l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__3 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__3(); +lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__3); +l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__4 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__4(); +lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__4); l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__4___lambda__1___closed__1 = _init_l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__4___lambda__1___closed__1(); lean_mark_persistent(l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__4___lambda__1___closed__1); l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__4___lambda__1___closed__2 = _init_l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__4___lambda__1___closed__2(); @@ -29388,7 +31143,7 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabMatch___closed__1); res = l___regBuiltin_Lean_Elab_Term_elabMatch(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_Match___hyg_8492_(lean_io_mk_world()); +res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_8715_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Elab_Term_elabNoMatch___closed__1 = _init_l_Lean_Elab_Term_elabNoMatch___closed__1();