From f29319647f75d87de995f0ad7ffa7dee89737dea Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sat, 19 Mar 2022 11:16:24 -0700 Subject: [PATCH] chore: update stage0 --- stage0/src/Init/Data/Nat/Div.lean | 9 +- stage0/src/Init/Data/Nat/Log2.lean | 1 - .../src/Lean/Elab/PreDefinition/WF/Ite.lean | 29 + .../src/Lean/Elab/PreDefinition/WF/Main.lean | 4 +- stage0/stdlib/Lean/Elab/Inductive.c | 4 +- stage0/stdlib/Lean/Elab/PreDefinition/Main.c | 6 +- .../stdlib/Lean/Elab/PreDefinition/WF/Ite.c | 2806 +++++++++++++++++ .../stdlib/Lean/Elab/PreDefinition/WF/Main.c | 454 ++- stage0/stdlib/Lean/Elab/Structure.c | 6 +- 9 files changed, 3210 insertions(+), 109 deletions(-) create mode 100644 stage0/src/Lean/Elab/PreDefinition/WF/Ite.lean create mode 100644 stage0/stdlib/Lean/Elab/PreDefinition/WF/Ite.c diff --git a/stage0/src/Init/Data/Nat/Div.lean b/stage0/src/Init/Data/Nat/Div.lean index 352139deea..3dc3165300 100644 --- a/stage0/src/Init/Data/Nat/Div.lean +++ b/stage0/src/Init/Data/Nat/Div.lean @@ -18,8 +18,7 @@ protected def div (x y : @& Nat) : Nat := Nat.div (x - y) y + 1 else 0 -decreasing_by - decreasing_with apply div_rec_lemma; assumption +decreasing_by apply div_rec_lemma; assumption instance : Div Nat := ⟨Nat.div⟩ @@ -37,8 +36,7 @@ theorem div.inductionOn.{u} ind x y h (inductionOn (x - y) y ind base) else base x y h -decreasing_by - decreasing_with apply div_rec_lemma; assumption +decreasing_by apply div_rec_lemma; assumption @[extern "lean_nat_mod"] protected def mod (x y : @& Nat) : Nat := @@ -46,8 +44,7 @@ protected def mod (x y : @& Nat) : Nat := Nat.mod (x - y) y else x -decreasing_by - decreasing_with apply div_rec_lemma; assumption +decreasing_by apply div_rec_lemma; assumption instance : Mod Nat := ⟨Nat.mod⟩ diff --git a/stage0/src/Init/Data/Nat/Log2.lean b/stage0/src/Init/Data/Nat/Log2.lean index 82269f5c84..315a60694b 100644 --- a/stage0/src/Init/Data/Nat/Log2.lean +++ b/stage0/src/Init/Data/Nat/Log2.lean @@ -25,5 +25,4 @@ Computes `⌊max 0 (log₂ n)⌋`. @[extern "lean_nat_log2"] def log2 (n : @& Nat) : Nat := if h : n ≥ 2 then log2 (n / 2) + 1 else 0 -termination_by _ n => n decreasing_by exact log2_terminates _ h diff --git a/stage0/src/Lean/Elab/PreDefinition/WF/Ite.lean b/stage0/src/Lean/Elab/PreDefinition/WF/Ite.lean new file mode 100644 index 0000000000..d83357d7a4 --- /dev/null +++ b/stage0/src/Lean/Elab/PreDefinition/WF/Ite.lean @@ -0,0 +1,29 @@ +/- +Copyright (c) 2022 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Leonardo de Moura +-/ +import Lean.Meta.Transform + +namespace Lean.Meta + +/-- + Convert `ite` expressions in `e` to `dite`s. + It is useful to make this conversion in the `WF` module because the condition is often used in + termination proofs. -/ +def iteToDIte (e : Expr) : MetaM Expr := do + -- TODO: move this file to `Meta` if we decide to use it in other places. + let post (e : Expr) : MetaM TransformStep := do + if e.isAppOfArity ``ite 5 then + let f := e.getAppFn + let args := e.getAppArgs + let c := args[1] + let h ← mkFreshUserName `h + let args := args.set! 3 (Lean.mkLambda h BinderInfo.default c args[3]) + let args := args.set! 4 (Lean.mkLambda h BinderInfo.default (mkNot c) args[4]) + return .done <| mkAppN (mkConst ``dite f.constLevels!) args + else + return .done e + transform e (post := post) + +end Lean.Meta diff --git a/stage0/src/Lean/Elab/PreDefinition/WF/Main.lean b/stage0/src/Lean/Elab/PreDefinition/WF/Main.lean index e069e45a1f..105697abca 100644 --- a/stage0/src/Lean/Elab/PreDefinition/WF/Main.lean +++ b/stage0/src/Lean/Elab/PreDefinition/WF/Main.lean @@ -10,6 +10,7 @@ import Lean.Elab.PreDefinition.WF.PackMutual import Lean.Elab.PreDefinition.WF.Rel import Lean.Elab.PreDefinition.WF.Fix import Lean.Elab.PreDefinition.WF.Eqns +import Lean.Elab.PreDefinition.WF.Ite namespace Lean.Elab open WF @@ -84,7 +85,8 @@ def wfRecursion (preDefs : Array PreDefinition) (wf? : Option TerminationWF) (de addAsAxiom preDef let fixedPrefixSize ← getFixedPrefix preDefs trace[Elab.definition.wf] "fixed prefix: {fixedPrefixSize}" - let unaryPreDefs ← packDomain fixedPrefixSize preDefs + let preDefsDIte ← preDefs.mapM fun preDef => return { preDef with value := (← iteToDIte preDef.value) } + let unaryPreDefs ← packDomain fixedPrefixSize preDefsDIte return (← packMutual fixedPrefixSize preDefs unaryPreDefs, fixedPrefixSize) let preDefNonRec ← forallBoundedTelescope unaryPreDef.type fixedPrefixSize fun prefixArgs type => do let packedArgType := type.bindingDomain! diff --git a/stage0/stdlib/Lean/Elab/Inductive.c b/stage0/stdlib/Lean/Elab/Inductive.c index 807d92af82..b2cbc19035 100644 --- a/stage0/stdlib/Lean/Elab/Inductive.c +++ b/stage0/stdlib/Lean/Elab/Inductive.c @@ -137,6 +137,7 @@ LEAN_EXPORT lean_object* l_List_mapM___at___private_Lean_Elab_Inductive_0__Lean_ LEAN_EXPORT lean_object* l_List_forM___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_collectUsed___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Command_accLevelAtCtor___closed__1; LEAN_EXPORT lean_object* l_List_mapM___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_levelMVarToParamAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(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_InfoTree_substitute(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_applyAttributesAt(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -450,7 +451,6 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Inducti uint8_t lean_expr_eqv(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_updateResultingUniverse___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_EXPORT lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkIndFVar2Const___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_transform___at_Lean_Meta_expandCoe___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3; lean_object* l_Std_HashMap_insert___at_Lean_Meta_ForEachExpr_visit___spec__3(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_withSaveInfoContext___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkInductiveDecl___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -4794,7 +4794,7 @@ x_9 = lean_alloc_closure((void*)(l___private_Lean_Elab_Inductive_0__Lean_Elab_Co lean_closure_set(x_9, 0, x_1); lean_closure_set(x_9, 1, x_2); x_10 = l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_elabCtors_checkParamOccs___closed__1; -x_11 = l_Lean_Meta_transform___at_Lean_Meta_expandCoe___spec__1(x_3, x_9, x_10, x_4, x_5, x_6, x_7, x_8); +x_11 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_3, x_9, x_10, x_4, x_5, x_6, x_7, x_8); return x_11; } } diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/Main.c b/stage0/stdlib/Lean/Elab/PreDefinition/Main.c index db524592af..11a2f7f86b 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/Main.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/Main.c @@ -86,6 +86,7 @@ lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__21___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*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__15___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(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_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial___spec__2___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__21___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -116,7 +117,6 @@ LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_addPreDefinitions LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__20___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_addAndCompileUnsafe(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_uint64_to_usize(uint64_t); -lean_object* l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_FindImpl_findUnsafe_x3f(lean_object*, lean_object*); static lean_object* l_Lean_Elab_addPreDefinitions___closed__7; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -4036,7 +4036,7 @@ lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -x_24 = l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(x_21, x_22, x_23, x_5, x_6, x_7, x_8, x_9); +x_24 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_21, x_22, x_23, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_24) == 0) { lean_object* x_25; lean_object* x_26; size_t x_27; size_t x_28; lean_object* x_29; @@ -4114,7 +4114,7 @@ lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -x_44 = l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(x_41, x_42, x_43, x_5, x_6, x_7, x_8, x_9); +x_44 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_41, x_42, x_43, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_44) == 0) { lean_object* x_45; lean_object* x_46; lean_object* x_47; size_t x_48; size_t x_49; lean_object* x_50; diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/WF/Ite.c b/stage0/stdlib/Lean/Elab/PreDefinition/WF/Ite.c new file mode 100644 index 0000000000..890d893e71 --- /dev/null +++ b/stage0/stdlib/Lean/Elab/PreDefinition/WF/Ite.c @@ -0,0 +1,2806 @@ +// Lean compiler output +// Module: Lean.Elab.PreDefinition.WF.Ite +// Imports: Init Lean.Meta.Transform +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8(lean_object*, lean_object*); +lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); +size_t lean_usize_add(size_t, size_t); +lean_object* lean_mk_empty_array_with_capacity(lean_object*); +lean_object* l_Lean_mkSort(lean_object*); +lean_object* l_Lean_Meta_mkForallFVars(lean_object*, lean_object*, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8___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_name_mk_string(lean_object*, lean_object*); +lean_object* lean_array_uget(lean_object*, size_t); +lean_object* lean_expr_update_mdata(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_Meta_iteToDIte___spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_iteToDIte___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_maxRecDepthErrorMessage; +lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +static lean_object* l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__1; +lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withLocalDeclImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_st_ref_get(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitForall___at_Lean_Meta_iteToDIte___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* lean_array_get_size(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_iteToDIte___lambda__1___closed__3; +LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_iteToDIte___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withLetDecl___at_Lean_Meta_iteToDIte___spec__9___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_usize_dec_lt(size_t, size_t); +static lean_object* l_Lean_Meta_iteToDIte___lambda__1___closed__5; +extern lean_object* l_Lean_levelZero; +lean_object* lean_nat_add(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__2; +static lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__1; +static lean_object* l_Lean_Meta_iteToDIte___closed__2; +lean_object* l_Lean_mkAppN(lean_object*, lean_object*); +lean_object* l_StateRefT_x27_lift___rarg___boxed(lean_object*, lean_object*); +lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__2; +lean_object* l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withLetDecl___at_Lean_Meta_iteToDIte___spec__9(lean_object*, lean_object*); +lean_object* lean_nat_sub(lean_object*, lean_object*); +lean_object* l_Lean_Expr_constLevels_x21(lean_object*); +LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__2; +lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkLambdaFVars(lean_object*, lean_object*, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_ST_Prim_Ref_get___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_mkHashMapImp___rarg(lean_object*); +static lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__1; +LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7(lean_object*, lean_object*); +lean_object* lean_st_mk_ref(lean_object*, lean_object*); +static lean_object* l_Lean_Meta_iteToDIte___lambda__1___closed__2; +LEAN_EXPORT lean_object* l_Lean_Meta_iteToDIte___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_instInhabitedExpr; +LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___boxed(lean_object*, lean_object*); +lean_object* l_Lean_mkLambda(lean_object*, uint8_t, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitLet___at_Lean_Meta_iteToDIte___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_iteToDIte___lambda__1___closed__1; +static lean_object* l_Lean_Meta_iteToDIte___closed__1; +LEAN_EXPORT lean_object* l_Lean_Meta_iteToDIte___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Expr_Data_binderInfo(uint64_t); +size_t lean_usize_of_nat(lean_object*); +lean_object* lean_expr_update_proj(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_iteToDIte(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_iteToDIte___lambda__1___closed__6; +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withIncRecDepth___at_Lean_Meta_iteToDIte___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withIncRecDepth___at_Lean_Meta_iteToDIte___spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkNot(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_ReaderT_bind___at_Lean_Meta_iteToDIte___spec__12(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitLet___at_Lean_Meta_iteToDIte___spec__6___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8___boxed(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_iteToDIte___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_ST_Prim_Ref_modifyGetUnsafe___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_instantiate_rev(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitLambda___at_Lean_Meta_iteToDIte___spec__4___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_mk_array(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitForall___at_Lean_Meta_iteToDIte___spec__5___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_iteToDIte___lambda__1___closed__4; +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitLambda___at_Lean_Meta_iteToDIte___spec__4(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_EXPORT lean_object* l_Lean_Meta_withLetDecl___at_Lean_Meta_iteToDIte___spec__9___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Expr_getAppFn(lean_object*); +lean_object* l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___boxed(lean_object*, lean_object*); +lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withLetDeclImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkConst(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__2(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_iteToDIte___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_ReaderT_bind___at_Lean_Meta_iteToDIte___spec__12___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +lean_object* x_12; +lean_inc(x_2); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_12 = lean_apply_6(x_2, x_5, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +if (lean_obj_tag(x_13) == 0) +{ +uint8_t x_14; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_14 = !lean_is_exclusive(x_12); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_ctor_get(x_12, 0); +lean_dec(x_15); +x_16 = lean_ctor_get(x_13, 0); +lean_inc(x_16); +lean_dec(x_13); +lean_ctor_set(x_12, 0, x_16); +return x_12; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_12, 1); +lean_inc(x_17); +lean_dec(x_12); +x_18 = lean_ctor_get(x_13, 0); +lean_inc(x_18); +lean_dec(x_13); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_17); +return x_19; +} +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 1); +lean_inc(x_20); +lean_dec(x_12); +x_21 = lean_ctor_get(x_13, 0); +lean_inc(x_21); +lean_dec(x_13); +x_22 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_21, x_6, x_7, x_8, x_9, x_10, x_20); +return x_22; +} +} +else +{ +uint8_t x_23; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_23 = !lean_is_exclusive(x_12); +if (x_23 == 0) +{ +return x_12; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_12, 0); +x_25 = lean_ctor_get(x_12, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_12); +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = lean_apply_7(x_1, x_3, x_2, x_4, x_5, x_6, x_7, x_8); +return x_9; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_alloc_closure((void*)(l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg___lambda__1), 8, 2); +lean_closure_set(x_11, 0, x_4); +lean_closure_set(x_11, 1, x_5); +x_12 = l___private_Lean_Meta_Basic_0__Lean_Meta_withLocalDeclImp___rarg(x_1, x_2, x_3, x_11, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +return x_12; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_12, 0); +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_12); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +else +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_12); +if (x_17 == 0) +{ +return x_12; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_12, 0); +x_19 = lean_ctor_get(x_12, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_12); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg___boxed), 10, 0); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitLambda___at_Lean_Meta_iteToDIte___spec__4___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_array_push(x_1, x_7); +x_15 = l_Lean_Meta_transform_visit_visitLambda___at_Lean_Meta_iteToDIte___spec__4(x_2, x_3, x_4, x_5, x_14, x_6, x_8, x_9, x_10, x_11, x_12, x_13); +return x_15; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitLambda___at_Lean_Meta_iteToDIte___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +_start: +{ +if (lean_obj_tag(x_6) == 6) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; uint64_t x_16; lean_object* x_17; lean_object* x_18; +x_13 = lean_ctor_get(x_6, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_6, 1); +lean_inc(x_14); +x_15 = lean_ctor_get(x_6, 2); +lean_inc(x_15); +x_16 = lean_ctor_get_uint64(x_6, sizeof(void*)*3); +lean_dec(x_6); +x_17 = lean_expr_instantiate_rev(x_14, x_5); +lean_dec(x_14); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_18 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_17, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +x_21 = (uint8_t)((x_16 << 24) >> 61); +x_22 = lean_alloc_closure((void*)(l_Lean_Meta_transform_visit_visitLambda___at_Lean_Meta_iteToDIte___spec__4___lambda__1), 13, 6); +lean_closure_set(x_22, 0, x_5); +lean_closure_set(x_22, 1, x_1); +lean_closure_set(x_22, 2, x_2); +lean_closure_set(x_22, 3, x_3); +lean_closure_set(x_22, 4, x_4); +lean_closure_set(x_22, 5, x_15); +x_23 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg(x_13, x_21, x_19, x_22, x_7, x_8, x_9, x_10, x_11, x_20); +return x_23; +} +else +{ +uint8_t x_24; +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_24 = !lean_is_exclusive(x_18); +if (x_24 == 0) +{ +return x_18; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_18, 0); +x_26 = lean_ctor_get(x_18, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_18); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_26); +return x_27; +} +} +} +else +{ +lean_object* x_28; lean_object* x_29; +x_28 = lean_expr_instantiate_rev(x_6, x_5); +lean_dec(x_6); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_29 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_28, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; uint8_t x_32; uint8_t x_33; lean_object* x_34; +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 = 0; +x_33 = 1; +x_34 = l_Lean_Meta_mkLambdaFVars(x_5, x_30, x_32, x_32, x_33, x_8, x_9, x_10, x_11, x_31); +if (lean_obj_tag(x_34) == 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); +x_37 = l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(x_1, x_2, x_3, x_4, x_35, x_7, x_8, x_9, x_10, x_11, x_36); +return x_37; +} +else +{ +uint8_t x_38; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_38 = !lean_is_exclusive(x_34); +if (x_38 == 0) +{ +return x_34; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_34, 0); +x_40 = lean_ctor_get(x_34, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_34); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +return x_41; +} +} +} +else +{ +uint8_t x_42; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_42 = !lean_is_exclusive(x_29); +if (x_42 == 0) +{ +return x_29; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_29, 0); +x_44 = lean_ctor_get(x_29, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_29); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8___rarg(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_alloc_closure((void*)(l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg___lambda__1), 8, 2); +lean_closure_set(x_11, 0, x_4); +lean_closure_set(x_11, 1, x_5); +x_12 = l___private_Lean_Meta_Basic_0__Lean_Meta_withLocalDeclImp___rarg(x_1, x_2, x_3, x_11, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +return x_12; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_12, 0); +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_12); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +else +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_12); +if (x_17 == 0) +{ +return x_12; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_12, 0); +x_19 = lean_ctor_get(x_12, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_12); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8___rarg___boxed), 10, 0); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitForall___at_Lean_Meta_iteToDIte___spec__5___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_array_push(x_1, x_7); +x_15 = l_Lean_Meta_transform_visit_visitForall___at_Lean_Meta_iteToDIte___spec__5(x_2, x_3, x_4, x_5, x_14, x_6, x_8, x_9, x_10, x_11, x_12, x_13); +return x_15; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitForall___at_Lean_Meta_iteToDIte___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +_start: +{ +if (lean_obj_tag(x_6) == 7) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; uint64_t x_16; lean_object* x_17; lean_object* x_18; +x_13 = lean_ctor_get(x_6, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_6, 1); +lean_inc(x_14); +x_15 = lean_ctor_get(x_6, 2); +lean_inc(x_15); +x_16 = lean_ctor_get_uint64(x_6, sizeof(void*)*3); +lean_dec(x_6); +x_17 = lean_expr_instantiate_rev(x_14, x_5); +lean_dec(x_14); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_18 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_17, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +x_21 = (uint8_t)((x_16 << 24) >> 61); +x_22 = lean_alloc_closure((void*)(l_Lean_Meta_transform_visit_visitForall___at_Lean_Meta_iteToDIte___spec__5___lambda__1), 13, 6); +lean_closure_set(x_22, 0, x_5); +lean_closure_set(x_22, 1, x_1); +lean_closure_set(x_22, 2, x_2); +lean_closure_set(x_22, 3, x_3); +lean_closure_set(x_22, 4, x_4); +lean_closure_set(x_22, 5, x_15); +x_23 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8___rarg(x_13, x_21, x_19, x_22, x_7, x_8, x_9, x_10, x_11, x_20); +return x_23; +} +else +{ +uint8_t x_24; +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_24 = !lean_is_exclusive(x_18); +if (x_24 == 0) +{ +return x_18; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_18, 0); +x_26 = lean_ctor_get(x_18, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_18); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_26); +return x_27; +} +} +} +else +{ +lean_object* x_28; lean_object* x_29; +x_28 = lean_expr_instantiate_rev(x_6, x_5); +lean_dec(x_6); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_29 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_28, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; uint8_t x_32; uint8_t x_33; lean_object* x_34; +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 = 0; +x_33 = 1; +x_34 = l_Lean_Meta_mkForallFVars(x_5, x_30, x_32, x_32, x_33, x_8, x_9, x_10, x_11, x_31); +if (lean_obj_tag(x_34) == 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); +x_37 = l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(x_1, x_2, x_3, x_4, x_35, x_7, x_8, x_9, x_10, x_11, x_36); +return x_37; +} +else +{ +uint8_t x_38; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_38 = !lean_is_exclusive(x_34); +if (x_38 == 0) +{ +return x_34; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_34, 0); +x_40 = lean_ctor_get(x_34, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_34); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +return x_41; +} +} +} +else +{ +uint8_t x_42; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_42 = !lean_is_exclusive(x_29); +if (x_42 == 0) +{ +return x_29; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_29, 0); +x_44 = lean_ctor_get(x_29, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_29); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLetDecl___at_Lean_Meta_iteToDIte___spec__9___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_alloc_closure((void*)(l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg___lambda__1), 8, 2); +lean_closure_set(x_11, 0, x_4); +lean_closure_set(x_11, 1, x_5); +x_12 = l___private_Lean_Meta_Basic_0__Lean_Meta_withLetDeclImp___rarg(x_1, x_2, x_3, x_11, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +return x_12; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_12, 0); +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_12); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +else +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_12); +if (x_17 == 0) +{ +return x_12; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_12, 0); +x_19 = lean_ctor_get(x_12, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_12); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLetDecl___at_Lean_Meta_iteToDIte___spec__9(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Lean_Meta_withLetDecl___at_Lean_Meta_iteToDIte___spec__9___rarg), 10, 0); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitLet___at_Lean_Meta_iteToDIte___spec__6___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_array_push(x_1, x_7); +x_15 = l_Lean_Meta_transform_visit_visitLet___at_Lean_Meta_iteToDIte___spec__6(x_2, x_3, x_4, x_5, x_14, x_6, x_8, x_9, x_10, x_11, x_12, x_13); +return x_15; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitLet___at_Lean_Meta_iteToDIte___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +_start: +{ +if (lean_obj_tag(x_6) == 8) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_13 = lean_ctor_get(x_6, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_6, 1); +lean_inc(x_14); +x_15 = lean_ctor_get(x_6, 2); +lean_inc(x_15); +x_16 = lean_ctor_get(x_6, 3); +lean_inc(x_16); +lean_dec(x_6); +x_17 = lean_expr_instantiate_rev(x_14, x_5); +lean_dec(x_14); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_18 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_17, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +x_21 = lean_expr_instantiate_rev(x_15, x_5); +lean_dec(x_15); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_22 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_21, x_7, x_8, x_9, x_10, x_11, x_20); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +x_25 = lean_alloc_closure((void*)(l_Lean_Meta_transform_visit_visitLet___at_Lean_Meta_iteToDIte___spec__6___lambda__1), 13, 6); +lean_closure_set(x_25, 0, x_5); +lean_closure_set(x_25, 1, x_1); +lean_closure_set(x_25, 2, x_2); +lean_closure_set(x_25, 3, x_3); +lean_closure_set(x_25, 4, x_4); +lean_closure_set(x_25, 5, x_16); +x_26 = l_Lean_Meta_withLetDecl___at_Lean_Meta_iteToDIte___spec__9___rarg(x_13, x_19, x_23, x_25, x_7, x_8, x_9, x_10, x_11, x_24); +return x_26; +} +else +{ +uint8_t x_27; +lean_dec(x_19); +lean_dec(x_16); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_27 = !lean_is_exclusive(x_22); +if (x_27 == 0) +{ +return x_22; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_22, 0); +x_29 = lean_ctor_get(x_22, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_22); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +else +{ +uint8_t x_31; +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_31 = !lean_is_exclusive(x_18); +if (x_31 == 0) +{ +return x_18; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_18, 0); +x_33 = lean_ctor_get(x_18, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_18); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; +} +} +} +else +{ +lean_object* x_35; lean_object* x_36; +x_35 = lean_expr_instantiate_rev(x_6, x_5); +lean_dec(x_6); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_36 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_35, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; lean_object* x_38; uint8_t x_39; uint8_t x_40; lean_object* x_41; +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_36, 1); +lean_inc(x_38); +lean_dec(x_36); +x_39 = 0; +x_40 = 1; +x_41 = l_Lean_Meta_mkLambdaFVars(x_5, x_37, x_39, x_39, x_40, x_8, x_9, x_10, x_11, x_38); +if (lean_obj_tag(x_41) == 0) +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_41, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_41, 1); +lean_inc(x_43); +lean_dec(x_41); +x_44 = l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(x_1, x_2, x_3, x_4, x_42, x_7, x_8, x_9, x_10, x_11, x_43); +return x_44; +} +else +{ +uint8_t x_45; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_45 = !lean_is_exclusive(x_41); +if (x_45 == 0) +{ +return x_41; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_41, 0); +x_47 = lean_ctor_get(x_41, 1); +lean_inc(x_47); +lean_inc(x_46); +lean_dec(x_41); +x_48 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_48, 0, x_46); +lean_ctor_set(x_48, 1, x_47); +return x_48; +} +} +} +else +{ +uint8_t x_49; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_49 = !lean_is_exclusive(x_36); +if (x_49 == 0) +{ +return x_36; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_36, 0); +x_51 = lean_ctor_get(x_36, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_36); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_iteToDIte___spec__10(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +uint8_t x_14; +x_14 = lean_usize_dec_lt(x_6, x_5); +if (x_14 == 0) +{ +lean_object* x_15; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_7); +lean_ctor_set(x_15, 1, x_13); +return x_15; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_16 = lean_array_uget(x_7, x_6); +x_17 = lean_unsigned_to_nat(0u); +x_18 = lean_array_uset(x_7, x_6, x_17); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_19 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_16, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = 1; +x_23 = lean_usize_add(x_6, x_22); +x_24 = lean_array_uset(x_18, x_6, x_20); +x_6 = x_23; +x_7 = x_24; +x_13 = x_21; +goto _start; +} +else +{ +uint8_t x_26; +lean_dec(x_18); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_26 = !lean_is_exclusive(x_19); +if (x_26 == 0) +{ +return x_19; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_19, 0); +x_28 = lean_ctor_get(x_19, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_19); +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +return x_29; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_Meta_iteToDIte___spec__11(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +if (lean_obj_tag(x_5) == 5) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_14 = lean_ctor_get(x_5, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_5, 1); +lean_inc(x_15); +lean_dec(x_5); +x_16 = lean_array_set(x_6, x_7, x_15); +x_17 = lean_unsigned_to_nat(1u); +x_18 = lean_nat_sub(x_7, x_17); +lean_dec(x_7); +x_5 = x_14; +x_6 = x_16; +x_7 = x_18; +goto _start; +} +else +{ +lean_object* x_20; +lean_dec(x_7); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_20 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; size_t x_24; size_t x_25; lean_object* x_26; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +x_23 = lean_array_get_size(x_6); +x_24 = lean_usize_of_nat(x_23); +lean_dec(x_23); +x_25 = 0; +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_26 = l_Array_mapMUnsafe_map___at_Lean_Meta_iteToDIte___spec__10(x_1, x_2, x_3, x_4, x_24, x_25, x_6, x_8, x_9, x_10, x_11, x_12, x_22); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +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); +x_29 = l_Lean_mkAppN(x_21, x_27); +x_30 = l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(x_1, x_2, x_3, x_4, x_29, x_8, x_9, x_10, x_11, x_12, x_28); +return x_30; +} +else +{ +uint8_t x_31; +lean_dec(x_21); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_31 = !lean_is_exclusive(x_26); +if (x_31 == 0) +{ +return x_26; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_26, 0); +x_33 = lean_ctor_get(x_26, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_26); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; +} +} +} +else +{ +uint8_t x_35; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_35 = !lean_is_exclusive(x_20); +if (x_35 == 0) +{ +return x_20; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_20, 0); +x_37 = lean_ctor_get(x_20, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_20); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} +} +} +} +} +LEAN_EXPORT lean_object* l_ReaderT_bind___at_Lean_Meta_iteToDIte___spec__12___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_9 = lean_apply_6(x_1, x_3, x_4, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_apply_7(x_2, x_10, x_3, x_4, x_5, x_6, x_7, x_11); +return x_12; +} +else +{ +uint8_t x_13; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_13 = !lean_is_exclusive(x_9); +if (x_13 == 0) +{ +return x_9; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_9, 0); +x_15 = lean_ctor_get(x_9, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_9); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +} +} +LEAN_EXPORT lean_object* l_ReaderT_bind___at_Lean_Meta_iteToDIte___spec__12(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_iteToDIte___spec__12___rarg), 8, 0); +return x_3; +} +} +static lean_object* _init_l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_maxRecDepthErrorMessage; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__1; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__2; +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_1); +lean_ctor_set(x_8, 1, x_7); +x_9 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_6); +return x_9; +} +} +LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___boxed), 6, 0); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withIncRecDepth___at_Lean_Meta_iteToDIte___spec__13(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_10 = lean_ctor_get(x_7, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_7, 1); +lean_inc(x_11); +x_12 = lean_ctor_get(x_7, 2); +lean_inc(x_12); +x_13 = lean_ctor_get(x_7, 3); +lean_inc(x_13); +x_14 = lean_ctor_get(x_7, 4); +lean_inc(x_14); +x_15 = lean_ctor_get(x_7, 5); +lean_inc(x_15); +x_16 = lean_ctor_get(x_7, 6); +lean_inc(x_16); +x_17 = lean_ctor_get(x_7, 7); +lean_inc(x_17); +x_18 = lean_ctor_get(x_7, 8); +lean_inc(x_18); +x_19 = lean_nat_dec_eq(x_11, x_12); +if (x_19 == 0) +{ +uint8_t x_20; +x_20 = !lean_is_exclusive(x_7); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_21 = lean_ctor_get(x_7, 8); +lean_dec(x_21); +x_22 = lean_ctor_get(x_7, 7); +lean_dec(x_22); +x_23 = lean_ctor_get(x_7, 6); +lean_dec(x_23); +x_24 = lean_ctor_get(x_7, 5); +lean_dec(x_24); +x_25 = lean_ctor_get(x_7, 4); +lean_dec(x_25); +x_26 = lean_ctor_get(x_7, 3); +lean_dec(x_26); +x_27 = lean_ctor_get(x_7, 2); +lean_dec(x_27); +x_28 = lean_ctor_get(x_7, 1); +lean_dec(x_28); +x_29 = lean_ctor_get(x_7, 0); +lean_dec(x_29); +x_30 = lean_unsigned_to_nat(1u); +x_31 = lean_nat_add(x_11, x_30); +lean_dec(x_11); +lean_ctor_set(x_7, 1, x_31); +x_32 = lean_apply_6(x_3, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_32) == 0) +{ +uint8_t x_33; +x_33 = !lean_is_exclusive(x_32); +if (x_33 == 0) +{ +return x_32; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_32, 0); +x_35 = lean_ctor_get(x_32, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_32); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +else +{ +uint8_t x_37; +x_37 = !lean_is_exclusive(x_32); +if (x_37 == 0) +{ +return x_32; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_32, 0); +x_39 = lean_ctor_get(x_32, 1); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_32); +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +return x_40; +} +} +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +lean_dec(x_7); +x_41 = lean_unsigned_to_nat(1u); +x_42 = lean_nat_add(x_11, x_41); +lean_dec(x_11); +x_43 = lean_alloc_ctor(0, 9, 0); +lean_ctor_set(x_43, 0, x_10); +lean_ctor_set(x_43, 1, x_42); +lean_ctor_set(x_43, 2, x_12); +lean_ctor_set(x_43, 3, x_13); +lean_ctor_set(x_43, 4, x_14); +lean_ctor_set(x_43, 5, x_15); +lean_ctor_set(x_43, 6, x_16); +lean_ctor_set(x_43, 7, x_17); +lean_ctor_set(x_43, 8, x_18); +x_44 = lean_apply_6(x_3, x_4, x_5, x_6, x_43, x_8, x_9); +if (lean_obj_tag(x_44) == 0) +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_45 = lean_ctor_get(x_44, 0); +lean_inc(x_45); +x_46 = lean_ctor_get(x_44, 1); +lean_inc(x_46); +if (lean_is_exclusive(x_44)) { + lean_ctor_release(x_44, 0); + lean_ctor_release(x_44, 1); + x_47 = x_44; +} else { + lean_dec_ref(x_44); + x_47 = lean_box(0); +} +if (lean_is_scalar(x_47)) { + x_48 = lean_alloc_ctor(0, 2, 0); +} else { + x_48 = x_47; +} +lean_ctor_set(x_48, 0, x_45); +lean_ctor_set(x_48, 1, x_46); +return x_48; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_49 = lean_ctor_get(x_44, 0); +lean_inc(x_49); +x_50 = lean_ctor_get(x_44, 1); +lean_inc(x_50); +if (lean_is_exclusive(x_44)) { + lean_ctor_release(x_44, 0); + lean_ctor_release(x_44, 1); + x_51 = x_44; +} else { + lean_dec_ref(x_44); + x_51 = lean_box(0); +} +if (lean_is_scalar(x_51)) { + x_52 = lean_alloc_ctor(1, 2, 0); +} else { + x_52 = x_51; +} +lean_ctor_set(x_52, 0, x_49); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +} +else +{ +lean_object* x_53; uint8_t x_54; +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +x_53 = l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg(x_13, x_5, x_6, x_7, x_8, 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) +{ +return x_53; +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_53, 0); +x_56 = lean_ctor_get(x_53, 1); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_53); +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_55); +lean_ctor_set(x_57, 1, x_56); +return x_57; +} +} +} +} +static lean_object* _init_l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_levelZero; +x_2 = l_Lean_mkSort(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_12; lean_object* x_13; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_12 = lean_ctor_get(x_5, 0); +lean_inc(x_12); +lean_dec(x_5); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_11); +return x_13; +} +else +{ +lean_object* x_14; +x_14 = lean_ctor_get(x_5, 0); +lean_inc(x_14); +lean_dec(x_5); +switch (lean_obj_tag(x_14)) { +case 5: +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_15 = lean_unsigned_to_nat(0u); +x_16 = l_Lean_Expr_getAppNumArgsAux(x_14, x_15); +x_17 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__1; +lean_inc(x_16); +x_18 = lean_mk_array(x_16, x_17); +x_19 = lean_unsigned_to_nat(1u); +x_20 = lean_nat_sub(x_16, x_19); +lean_dec(x_16); +x_21 = l_Lean_Expr_withAppAux___at_Lean_Meta_iteToDIte___spec__11(x_1, x_2, x_3, x_4, x_14, x_18, x_20, x_6, x_7, x_8, x_9, x_10, x_11); +return x_21; +} +case 6: +{ +lean_object* x_22; lean_object* x_23; +x_22 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__2; +x_23 = l_Lean_Meta_transform_visit_visitLambda___at_Lean_Meta_iteToDIte___spec__4(x_1, x_2, x_3, x_4, x_22, x_14, x_6, x_7, x_8, x_9, x_10, x_11); +return x_23; +} +case 7: +{ +lean_object* x_24; lean_object* x_25; +x_24 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__2; +x_25 = l_Lean_Meta_transform_visit_visitForall___at_Lean_Meta_iteToDIte___spec__5(x_1, x_2, x_3, x_4, x_24, x_14, x_6, x_7, x_8, x_9, x_10, x_11); +return x_25; +} +case 8: +{ +lean_object* x_26; lean_object* x_27; +x_26 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__2; +x_27 = l_Lean_Meta_transform_visit_visitLet___at_Lean_Meta_iteToDIte___spec__6(x_1, x_2, x_3, x_4, x_26, x_14, x_6, x_7, x_8, x_9, x_10, x_11); +return x_27; +} +case 10: +{ +uint8_t x_28; +x_28 = !lean_is_exclusive(x_14); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_14, 0); +x_30 = lean_ctor_get(x_14, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_30); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_31 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_30, x_6, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_31) == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +lean_dec(x_31); +x_34 = lean_expr_update_mdata(x_14, x_32); +x_35 = l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(x_1, x_2, x_3, x_4, x_34, x_6, x_7, x_8, x_9, x_10, x_33); +return x_35; +} +else +{ +uint8_t x_36; +lean_free_object(x_14); +lean_dec(x_30); +lean_dec(x_29); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_36 = !lean_is_exclusive(x_31); +if (x_36 == 0) +{ +return x_31; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_31, 0); +x_38 = lean_ctor_get(x_31, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_31); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +return x_39; +} +} +} +else +{ +lean_object* x_40; lean_object* x_41; uint64_t x_42; lean_object* x_43; +x_40 = lean_ctor_get(x_14, 0); +x_41 = lean_ctor_get(x_14, 1); +x_42 = lean_ctor_get_uint64(x_14, sizeof(void*)*2); +lean_inc(x_41); +lean_inc(x_40); +lean_dec(x_14); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_41); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_43 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_41, x_6, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_43) == 0) +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_44 = lean_ctor_get(x_43, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_43, 1); +lean_inc(x_45); +lean_dec(x_43); +x_46 = lean_alloc_ctor(10, 2, 8); +lean_ctor_set(x_46, 0, x_40); +lean_ctor_set(x_46, 1, x_41); +lean_ctor_set_uint64(x_46, sizeof(void*)*2, x_42); +x_47 = lean_expr_update_mdata(x_46, x_44); +x_48 = l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(x_1, x_2, x_3, x_4, x_47, x_6, x_7, x_8, x_9, x_10, x_45); +return x_48; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +lean_dec(x_41); +lean_dec(x_40); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_49 = lean_ctor_get(x_43, 0); +lean_inc(x_49); +x_50 = lean_ctor_get(x_43, 1); +lean_inc(x_50); +if (lean_is_exclusive(x_43)) { + lean_ctor_release(x_43, 0); + lean_ctor_release(x_43, 1); + x_51 = x_43; +} else { + lean_dec_ref(x_43); + x_51 = lean_box(0); +} +if (lean_is_scalar(x_51)) { + x_52 = lean_alloc_ctor(1, 2, 0); +} else { + x_52 = x_51; +} +lean_ctor_set(x_52, 0, x_49); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +} +case 11: +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_14); +if (x_53 == 0) +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_54 = lean_ctor_get(x_14, 0); +x_55 = lean_ctor_get(x_14, 1); +x_56 = lean_ctor_get(x_14, 2); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_56); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_57 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_56, x_6, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_57) == 0) +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_58 = lean_ctor_get(x_57, 0); +lean_inc(x_58); +x_59 = lean_ctor_get(x_57, 1); +lean_inc(x_59); +lean_dec(x_57); +x_60 = lean_expr_update_proj(x_14, x_58); +x_61 = l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(x_1, x_2, x_3, x_4, x_60, x_6, x_7, x_8, x_9, x_10, x_59); +return x_61; +} +else +{ +uint8_t x_62; +lean_free_object(x_14); +lean_dec(x_56); +lean_dec(x_55); +lean_dec(x_54); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_62 = !lean_is_exclusive(x_57); +if (x_62 == 0) +{ +return x_57; +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_63 = lean_ctor_get(x_57, 0); +x_64 = lean_ctor_get(x_57, 1); +lean_inc(x_64); +lean_inc(x_63); +lean_dec(x_57); +x_65 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_65, 0, x_63); +lean_ctor_set(x_65, 1, x_64); +return x_65; +} +} +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; uint64_t x_69; lean_object* x_70; +x_66 = lean_ctor_get(x_14, 0); +x_67 = lean_ctor_get(x_14, 1); +x_68 = lean_ctor_get(x_14, 2); +x_69 = lean_ctor_get_uint64(x_14, sizeof(void*)*3); +lean_inc(x_68); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_14); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_68); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_70 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_1, x_2, x_3, x_4, x_68, x_6, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_70) == 0) +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +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_alloc_ctor(11, 3, 8); +lean_ctor_set(x_73, 0, x_66); +lean_ctor_set(x_73, 1, x_67); +lean_ctor_set(x_73, 2, x_68); +lean_ctor_set_uint64(x_73, sizeof(void*)*3, x_69); +x_74 = lean_expr_update_proj(x_73, x_71); +x_75 = l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(x_1, x_2, x_3, x_4, x_74, x_6, x_7, x_8, x_9, x_10, x_72); +return x_75; +} +else +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; +lean_dec(x_68); +lean_dec(x_67); +lean_dec(x_66); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_76 = lean_ctor_get(x_70, 0); +lean_inc(x_76); +x_77 = lean_ctor_get(x_70, 1); +lean_inc(x_77); +if (lean_is_exclusive(x_70)) { + lean_ctor_release(x_70, 0); + lean_ctor_release(x_70, 1); + x_78 = x_70; +} else { + lean_dec_ref(x_70); + x_78 = lean_box(0); +} +if (lean_is_scalar(x_78)) { + x_79 = lean_alloc_ctor(1, 2, 0); +} else { + x_79 = x_78; +} +lean_ctor_set(x_79, 0, x_76); +lean_ctor_set(x_79, 1, x_77); +return x_79; +} +} +} +default: +{ +lean_object* x_80; +x_80 = l_Lean_Meta_transform_visit_visitPost___at_Lean_Meta_iteToDIte___spec__3(x_1, x_2, x_3, x_4, x_14, x_6, x_7, x_8, x_9, x_10, x_11); +return x_80; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_3, x_1, x_2); +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_4); +return x_6; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +lean_object* x_12; lean_object* x_13; +lean_inc(x_6); +x_12 = lean_alloc_closure((void*)(l_ST_Prim_Ref_get___boxed), 4, 3); +lean_closure_set(x_12, 0, lean_box(0)); +lean_closure_set(x_12, 1, lean_box(0)); +lean_closure_set(x_12, 2, x_6); +lean_inc(x_4); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_13 = lean_apply_7(x_4, lean_box(0), x_12, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_13) == 0) +{ +uint8_t x_14; +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_13, 0); +x_16 = lean_ctor_get(x_13, 1); +lean_inc(x_5); +x_17 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_15, x_5); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_free_object(x_13); +lean_inc(x_1); +lean_inc(x_5); +x_18 = lean_apply_1(x_1, x_5); +x_19 = lean_alloc_closure((void*)(l_StateRefT_x27_lift___rarg___boxed), 2, 1); +lean_closure_set(x_19, 0, x_18); +lean_inc(x_4); +lean_inc(x_3); +x_20 = lean_alloc_closure((void*)(l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1), 11, 4); +lean_closure_set(x_20, 0, x_1); +lean_closure_set(x_20, 1, x_2); +lean_closure_set(x_20, 2, x_3); +lean_closure_set(x_20, 3, x_4); +x_21 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_iteToDIte___spec__12___rarg), 8, 2); +lean_closure_set(x_21, 0, x_19); +lean_closure_set(x_21, 1, x_20); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_22 = l_Lean_Meta_withIncRecDepth___at_Lean_Meta_iteToDIte___spec__13(x_3, lean_box(0), x_21, x_6, x_7, x_8, x_9, x_10, x_16); +lean_dec(x_3); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +lean_inc(x_23); +x_25 = lean_alloc_closure((void*)(l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__2), 3, 2); +lean_closure_set(x_25, 0, x_5); +lean_closure_set(x_25, 1, x_23); +x_26 = lean_alloc_closure((void*)(l_ST_Prim_Ref_modifyGetUnsafe___rarg___boxed), 3, 2); +lean_closure_set(x_26, 0, x_6); +lean_closure_set(x_26, 1, x_25); +x_27 = lean_apply_7(x_4, lean_box(0), x_26, x_7, x_8, x_9, x_10, x_24); +if (lean_obj_tag(x_27) == 0) +{ +uint8_t x_28; +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +lean_object* x_29; +x_29 = lean_ctor_get(x_27, 0); +lean_dec(x_29); +lean_ctor_set(x_27, 0, x_23); +return x_27; +} +else +{ +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_27, 1); +lean_inc(x_30); +lean_dec(x_27); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_23); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +else +{ +uint8_t x_32; +lean_dec(x_23); +x_32 = !lean_is_exclusive(x_27); +if (x_32 == 0) +{ +return x_27; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_27, 0); +x_34 = lean_ctor_get(x_27, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_27); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; +} +} +} +else +{ +uint8_t x_36; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_36 = !lean_is_exclusive(x_22); +if (x_36 == 0) +{ +return x_22; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_22, 0); +x_38 = lean_ctor_get(x_22, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_22); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +return x_39; +} +} +} +else +{ +lean_object* x_40; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_40 = lean_ctor_get(x_17, 0); +lean_inc(x_40); +lean_dec(x_17); +lean_ctor_set(x_13, 0, x_40); +return x_13; +} +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_13, 0); +x_42 = lean_ctor_get(x_13, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_13); +lean_inc(x_5); +x_43 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_41, x_5); +if (lean_obj_tag(x_43) == 0) +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +lean_inc(x_1); +lean_inc(x_5); +x_44 = lean_apply_1(x_1, x_5); +x_45 = lean_alloc_closure((void*)(l_StateRefT_x27_lift___rarg___boxed), 2, 1); +lean_closure_set(x_45, 0, x_44); +lean_inc(x_4); +lean_inc(x_3); +x_46 = lean_alloc_closure((void*)(l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1), 11, 4); +lean_closure_set(x_46, 0, x_1); +lean_closure_set(x_46, 1, x_2); +lean_closure_set(x_46, 2, x_3); +lean_closure_set(x_46, 3, x_4); +x_47 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_iteToDIte___spec__12___rarg), 8, 2); +lean_closure_set(x_47, 0, x_45); +lean_closure_set(x_47, 1, x_46); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_48 = l_Lean_Meta_withIncRecDepth___at_Lean_Meta_iteToDIte___spec__13(x_3, lean_box(0), x_47, x_6, x_7, x_8, x_9, x_10, x_42); +lean_dec(x_3); +if (lean_obj_tag(x_48) == 0) +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_49 = lean_ctor_get(x_48, 0); +lean_inc(x_49); +x_50 = lean_ctor_get(x_48, 1); +lean_inc(x_50); +lean_dec(x_48); +lean_inc(x_49); +x_51 = lean_alloc_closure((void*)(l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__2), 3, 2); +lean_closure_set(x_51, 0, x_5); +lean_closure_set(x_51, 1, x_49); +x_52 = lean_alloc_closure((void*)(l_ST_Prim_Ref_modifyGetUnsafe___rarg___boxed), 3, 2); +lean_closure_set(x_52, 0, x_6); +lean_closure_set(x_52, 1, x_51); +x_53 = lean_apply_7(x_4, lean_box(0), x_52, x_7, x_8, x_9, x_10, x_50); +if (lean_obj_tag(x_53) == 0) +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_53, 1); +lean_inc(x_54); +if (lean_is_exclusive(x_53)) { + lean_ctor_release(x_53, 0); + lean_ctor_release(x_53, 1); + x_55 = x_53; +} else { + lean_dec_ref(x_53); + x_55 = lean_box(0); +} +if (lean_is_scalar(x_55)) { + x_56 = lean_alloc_ctor(0, 2, 0); +} else { + x_56 = x_55; +} +lean_ctor_set(x_56, 0, x_49); +lean_ctor_set(x_56, 1, x_54); +return x_56; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +lean_dec(x_49); +x_57 = lean_ctor_get(x_53, 0); +lean_inc(x_57); +x_58 = lean_ctor_get(x_53, 1); +lean_inc(x_58); +if (lean_is_exclusive(x_53)) { + lean_ctor_release(x_53, 0); + lean_ctor_release(x_53, 1); + x_59 = x_53; +} else { + lean_dec_ref(x_53); + x_59 = lean_box(0); +} +if (lean_is_scalar(x_59)) { + x_60 = lean_alloc_ctor(1, 2, 0); +} else { + x_60 = x_59; +} +lean_ctor_set(x_60, 0, x_57); +lean_ctor_set(x_60, 1, x_58); +return x_60; +} +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_61 = lean_ctor_get(x_48, 0); +lean_inc(x_61); +x_62 = lean_ctor_get(x_48, 1); +lean_inc(x_62); +if (lean_is_exclusive(x_48)) { + lean_ctor_release(x_48, 0); + lean_ctor_release(x_48, 1); + x_63 = x_48; +} else { + lean_dec_ref(x_48); + x_63 = lean_box(0); +} +if (lean_is_scalar(x_63)) { + x_64 = lean_alloc_ctor(1, 2, 0); +} else { + x_64 = x_63; +} +lean_ctor_set(x_64, 0, x_61); +lean_ctor_set(x_64, 1, x_62); +return x_64; +} +} +else +{ +lean_object* x_65; lean_object* x_66; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_65 = lean_ctor_get(x_43, 0); +lean_inc(x_65); +lean_dec(x_43); +x_66 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_66, 0, x_65); +lean_ctor_set(x_66, 1, x_42); +return x_66; +} +} +} +else +{ +uint8_t x_67; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_67 = !lean_is_exclusive(x_13); +if (x_67 == 0) +{ +return x_13; +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_13, 0); +x_69 = lean_ctor_get(x_13, 1); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_13); +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 1, x_69); +return x_70; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_8 = lean_st_ref_get(x_6, x_7); +x_9 = lean_ctor_get(x_8, 1); +lean_inc(x_9); +lean_dec(x_8); +x_10 = lean_apply_1(x_2, x_9); +x_11 = !lean_is_exclusive(x_10); +if (x_11 == 0) +{ +return x_10; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_10, 0); +x_13 = lean_ctor_get(x_10, 1); +lean_inc(x_13); +lean_inc(x_12); +lean_dec(x_10); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_12); +lean_ctor_set(x_14, 1, x_13); +return x_14; +} +} +} +static lean_object* _init_l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Std_mkHashMapImp___rarg(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___lambda__1___boxed), 7, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_9 = lean_box(0); +x_10 = lean_st_ref_get(x_7, x_8); +x_11 = lean_ctor_get(x_10, 1); +lean_inc(x_11); +lean_dec(x_10); +x_12 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__1; +x_13 = lean_st_mk_ref(x_12, x_11); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__2; +lean_inc(x_7); +lean_inc(x_14); +x_17 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2(x_2, x_3, x_9, x_16, x_1, x_14, x_4, x_5, x_6, x_7, x_15); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_dec(x_17); +x_20 = lean_st_ref_get(x_7, x_19); +lean_dec(x_7); +x_21 = lean_ctor_get(x_20, 1); +lean_inc(x_21); +lean_dec(x_20); +x_22 = lean_st_ref_get(x_14, x_21); +lean_dec(x_14); +x_23 = !lean_is_exclusive(x_22); +if (x_23 == 0) +{ +lean_object* x_24; +x_24 = lean_ctor_get(x_22, 0); +lean_dec(x_24); +lean_ctor_set(x_22, 0, x_18); +return x_22; +} +else +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_22, 1); +lean_inc(x_25); +lean_dec(x_22); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_18); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +else +{ +uint8_t x_27; +lean_dec(x_14); +lean_dec(x_7); +x_27 = !lean_is_exclusive(x_17); +if (x_27 == 0) +{ +return x_17; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_17, 0); +x_29 = lean_ctor_get(x_17, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_17); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +} +static lean_object* _init_l_Lean_Meta_iteToDIte___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("ite"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_iteToDIte___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Meta_iteToDIte___lambda__1___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Meta_iteToDIte___lambda__1___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("h"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_iteToDIte___lambda__1___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Meta_iteToDIte___lambda__1___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Meta_iteToDIte___lambda__1___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("dite"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_iteToDIte___lambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Meta_iteToDIte___lambda__1___closed__5; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_iteToDIte___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; uint8_t x_9; +x_7 = l_Lean_Meta_iteToDIte___lambda__1___closed__2; +x_8 = lean_unsigned_to_nat(5u); +x_9 = l_Lean_Expr_isAppOfArity(x_1, x_7, x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_10, 0, x_1); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_6); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_12 = l_Lean_Expr_getAppFn(x_1); +x_13 = lean_unsigned_to_nat(0u); +x_14 = l_Lean_Expr_getAppNumArgsAux(x_1, x_13); +x_15 = l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__1; +lean_inc(x_14); +x_16 = lean_mk_array(x_14, x_15); +x_17 = lean_unsigned_to_nat(1u); +x_18 = lean_nat_sub(x_14, x_17); +lean_dec(x_14); +x_19 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_1, x_16, x_18); +x_20 = l_Lean_instInhabitedExpr; +x_21 = lean_array_get(x_20, x_19, x_17); +x_22 = l_Lean_Meta_iteToDIte___lambda__1___closed__4; +x_23 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_22, x_4, x_5, x_6); +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_25 = lean_ctor_get(x_23, 0); +x_26 = lean_unsigned_to_nat(3u); +x_27 = lean_array_get(x_20, x_19, x_26); +x_28 = 0; +lean_inc(x_21); +lean_inc(x_25); +x_29 = l_Lean_mkLambda(x_25, x_28, x_21, x_27); +x_30 = lean_array_set(x_19, x_26, x_29); +x_31 = l_Lean_mkNot(x_21); +x_32 = lean_unsigned_to_nat(4u); +x_33 = lean_array_get(x_20, x_30, x_32); +x_34 = l_Lean_mkLambda(x_25, x_28, x_31, x_33); +x_35 = lean_array_set(x_30, x_32, x_34); +x_36 = l_Lean_Expr_constLevels_x21(x_12); +x_37 = l_Lean_Meta_iteToDIte___lambda__1___closed__6; +x_38 = l_Lean_mkConst(x_37, x_36); +x_39 = l_Lean_mkAppN(x_38, x_35); +x_40 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_23, 0, x_40); +return x_23; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_41 = lean_ctor_get(x_23, 0); +x_42 = lean_ctor_get(x_23, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_23); +x_43 = lean_unsigned_to_nat(3u); +x_44 = lean_array_get(x_20, x_19, x_43); +x_45 = 0; +lean_inc(x_21); +lean_inc(x_41); +x_46 = l_Lean_mkLambda(x_41, x_45, x_21, x_44); +x_47 = lean_array_set(x_19, x_43, x_46); +x_48 = l_Lean_mkNot(x_21); +x_49 = lean_unsigned_to_nat(4u); +x_50 = lean_array_get(x_20, x_47, x_49); +x_51 = l_Lean_mkLambda(x_41, x_45, x_48, x_50); +x_52 = lean_array_set(x_47, x_49, x_51); +x_53 = l_Lean_Expr_constLevels_x21(x_12); +x_54 = l_Lean_Meta_iteToDIte___lambda__1___closed__6; +x_55 = l_Lean_mkConst(x_54, x_53); +x_56 = l_Lean_mkAppN(x_55, x_52); +x_57 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_57, 0, x_56); +x_58 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_42); +return x_58; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_iteToDIte___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_7, 0, x_1); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_7); +lean_ctor_set(x_8, 1, x_6); +return x_8; +} +} +static lean_object* _init_l_Lean_Meta_iteToDIte___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_iteToDIte___lambda__2___boxed), 6, 0); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_iteToDIte___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_iteToDIte___lambda__1___boxed), 6, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_iteToDIte(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = l_Lean_Meta_iteToDIte___closed__1; +x_8 = l_Lean_Meta_iteToDIte___closed__2; +x_9 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_1, x_7, x_8, x_2, x_3, x_4, x_5, x_6); +return x_9; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +uint8_t x_11; lean_object* x_12; +x_11 = lean_unbox(x_2); +lean_dec(x_2); +x_12 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___rarg(x_1, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__7(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +uint8_t x_11; lean_object* x_12; +x_11 = lean_unbox(x_2); +lean_dec(x_2); +x_12 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8___rarg(x_1, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_iteToDIte___spec__8(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withLetDecl___at_Lean_Meta_iteToDIte___spec__9___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Meta_withLetDecl___at_Lean_Meta_iteToDIte___spec__9(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_iteToDIte___spec__10___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +size_t x_14; size_t x_15; lean_object* x_16; +x_14 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_15 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_16 = l_Array_mapMUnsafe_map___at_Lean_Meta_iteToDIte___spec__10(x_1, x_2, x_3, x_4, x_14, x_15, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +return x_16; +} +} +LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___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) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_withIncRecDepth___at_Lean_Meta_iteToDIte___spec__13___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; +x_10 = l_Lean_Meta_withIncRecDepth___at_Lean_Meta_iteToDIte___spec__13(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_1); +return x_10; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_8; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_iteToDIte___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_Meta_iteToDIte___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_iteToDIte___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_Meta_iteToDIte___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_Meta_Transform(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_Lean_Elab_PreDefinition_WF_Ite(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Meta_Transform(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__1 = _init_l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__1(); +lean_mark_persistent(l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__1); +l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__2 = _init_l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__2(); +lean_mark_persistent(l_Lean_throwMaxRecDepthAt___at_Lean_Meta_iteToDIte___spec__14___rarg___closed__2); +l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__1 = _init_l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__1); +l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__2 = _init_l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_Meta_transform_visit___at_Lean_Meta_iteToDIte___spec__2___lambda__1___closed__2); +l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__1 = _init_l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__1(); +lean_mark_persistent(l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__1); +l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__2 = _init_l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__2(); +lean_mark_persistent(l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1___closed__2); +l_Lean_Meta_iteToDIte___lambda__1___closed__1 = _init_l_Lean_Meta_iteToDIte___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Meta_iteToDIte___lambda__1___closed__1); +l_Lean_Meta_iteToDIte___lambda__1___closed__2 = _init_l_Lean_Meta_iteToDIte___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_Meta_iteToDIte___lambda__1___closed__2); +l_Lean_Meta_iteToDIte___lambda__1___closed__3 = _init_l_Lean_Meta_iteToDIte___lambda__1___closed__3(); +lean_mark_persistent(l_Lean_Meta_iteToDIte___lambda__1___closed__3); +l_Lean_Meta_iteToDIte___lambda__1___closed__4 = _init_l_Lean_Meta_iteToDIte___lambda__1___closed__4(); +lean_mark_persistent(l_Lean_Meta_iteToDIte___lambda__1___closed__4); +l_Lean_Meta_iteToDIte___lambda__1___closed__5 = _init_l_Lean_Meta_iteToDIte___lambda__1___closed__5(); +lean_mark_persistent(l_Lean_Meta_iteToDIte___lambda__1___closed__5); +l_Lean_Meta_iteToDIte___lambda__1___closed__6 = _init_l_Lean_Meta_iteToDIte___lambda__1___closed__6(); +lean_mark_persistent(l_Lean_Meta_iteToDIte___lambda__1___closed__6); +l_Lean_Meta_iteToDIte___closed__1 = _init_l_Lean_Meta_iteToDIte___closed__1(); +lean_mark_persistent(l_Lean_Meta_iteToDIte___closed__1); +l_Lean_Meta_iteToDIte___closed__2 = _init_l_Lean_Meta_iteToDIte___closed__2(); +lean_mark_persistent(l_Lean_Meta_iteToDIte___closed__2); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/WF/Main.c b/stage0/stdlib/Lean/Elab/PreDefinition/WF/Main.c index 02464d62e4..a9f7b75274 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/WF/Main.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/WF/Main.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Elab.PreDefinition.WF.Main -// Imports: Init Lean.Elab.PreDefinition.Basic Lean.Elab.PreDefinition.WF.TerminationHint Lean.Elab.PreDefinition.WF.PackDomain Lean.Elab.PreDefinition.WF.PackMutual Lean.Elab.PreDefinition.WF.Rel Lean.Elab.PreDefinition.WF.Fix Lean.Elab.PreDefinition.WF.Eqns +// Imports: Init Lean.Elab.PreDefinition.Basic Lean.Elab.PreDefinition.WF.TerminationHint Lean.Elab.PreDefinition.WF.PackDomain Lean.Elab.PreDefinition.WF.PackMutual Lean.Elab.PreDefinition.WF.Rel Lean.Elab.PreDefinition.WF.Fix Lean.Elab.PreDefinition.WF.Eqns Lean.Elab.PreDefinition.WF.Ite #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -51,13 +51,14 @@ lean_object* lean_array_get_size(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope_go___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__6; LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_WF_packMutual(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope(lean_object*); lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_wfRecursion___lambda__1___closed__2; @@ -71,6 +72,7 @@ lean_object* lean_nat_add(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope_go___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__7; lean_object* l_Lean_mkAppN(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_wfRecursion___closed__3; lean_object* l_Lean_Elab_applyAttributesOf(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_lambdaTelescope___at___private_Lean_Meta_Eqns_0__Lean_Meta_mkSimpleEqThm___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -94,14 +96,17 @@ lean_object* l_Lean_Elab_WF_mkUnaryArg_go___boxed(lean_object*, lean_object*, le lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkLambdaFVars(lean_object*, lean_object*, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1; static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__9; lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_WF_registerEqnsInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_repr(lean_object*); +static lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2; lean_object* lean_st_mk_ref(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2032_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2084_(lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__10; static lean_object* l_Lean_Elab_wfRecursion___closed__5; LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2(lean_object*, 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*, lean_object*); @@ -120,6 +125,7 @@ static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinitio lean_object* l_Lean_Core_transform___at_Lean_Core_betaReduce___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___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*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_iteToDIte___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_getFixedPrefix___spec__1(lean_object*, lean_object*, size_t, size_t); size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_Elab_addAndCompilePartialRec(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -185,6 +191,7 @@ lean_object* l_Lean_Expr_bindingBody_x21(lean_object*); lean_object* l_Lean_Elab_WF_mkFix(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_mkConst(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__2___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_Meta_iteToDIte___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__8; static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__7; lean_object* l_Lean_Meta_unfoldDeclsFrom(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -196,7 +203,7 @@ static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinitio static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1; lean_object* l_Lean_Elab_WF_packDomain(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5(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_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: @@ -326,7 +333,7 @@ _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_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__4; x_2 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__5; -x_3 = lean_unsigned_to_nat(39u); +x_3 = lean_unsigned_to_nat(40u); x_4 = lean_unsigned_to_nat(12u); x_5 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -706,7 +713,7 @@ _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_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__4; x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__1; -x_3 = lean_unsigned_to_nat(45u); +x_3 = lean_unsigned_to_nat(46u); x_4 = lean_unsigned_to_nat(102u); x_5 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -3994,6 +4001,199 @@ return x_24; } } } +static lean_object* _init_l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_iteToDIte___lambda__2___boxed), 6, 0); +return x_1; +} +} +static lean_object* _init_l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_iteToDIte___lambda__1___boxed), 6, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +uint8_t x_11; +x_11 = lean_usize_dec_lt(x_2, x_1); +if (x_11 == 0) +{ +lean_object* x_12; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_3); +lean_ctor_set(x_12, 1, x_10); +return x_12; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_13 = lean_array_uget(x_3, x_2); +x_14 = lean_unsigned_to_nat(0u); +x_15 = lean_array_uset(x_3, x_2, x_14); +x_16 = !lean_is_exclusive(x_13); +if (x_16 == 0) +{ +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; +x_17 = lean_ctor_get(x_13, 0); +x_18 = lean_ctor_get(x_13, 1); +x_19 = lean_ctor_get(x_13, 2); +x_20 = lean_ctor_get(x_13, 3); +x_21 = lean_ctor_get(x_13, 4); +x_22 = lean_ctor_get(x_13, 5); +x_23 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1; +x_24 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2; +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_25 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_22, x_23, x_24, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; size_t x_28; size_t x_29; lean_object* x_30; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +lean_ctor_set(x_13, 5, x_26); +x_28 = 1; +x_29 = lean_usize_add(x_2, x_28); +x_30 = lean_array_uset(x_15, x_2, x_13); +x_2 = x_29; +x_3 = x_30; +x_10 = x_27; +goto _start; +} +else +{ +uint8_t x_32; +lean_free_object(x_13); +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_15); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_32 = !lean_is_exclusive(x_25); +if (x_32 == 0) +{ +return x_25; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_25, 0); +x_34 = lean_ctor_get(x_25, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_25); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; +} +} +} +else +{ +lean_object* x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_36 = lean_ctor_get(x_13, 0); +x_37 = lean_ctor_get_uint8(x_13, sizeof(void*)*6); +x_38 = lean_ctor_get(x_13, 1); +x_39 = lean_ctor_get(x_13, 2); +x_40 = lean_ctor_get(x_13, 3); +x_41 = lean_ctor_get(x_13, 4); +x_42 = lean_ctor_get(x_13, 5); +lean_inc(x_42); +lean_inc(x_41); +lean_inc(x_40); +lean_inc(x_39); +lean_inc(x_38); +lean_inc(x_36); +lean_dec(x_13); +x_43 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1; +x_44 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2; +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_45 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_42, x_43, x_44, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_45) == 0) +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; size_t x_49; size_t x_50; lean_object* x_51; +x_46 = lean_ctor_get(x_45, 0); +lean_inc(x_46); +x_47 = lean_ctor_get(x_45, 1); +lean_inc(x_47); +lean_dec(x_45); +x_48 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_48, 0, x_36); +lean_ctor_set(x_48, 1, x_38); +lean_ctor_set(x_48, 2, x_39); +lean_ctor_set(x_48, 3, x_40); +lean_ctor_set(x_48, 4, x_41); +lean_ctor_set(x_48, 5, x_46); +lean_ctor_set_uint8(x_48, sizeof(void*)*6, x_37); +x_49 = 1; +x_50 = lean_usize_add(x_2, x_49); +x_51 = lean_array_uset(x_15, x_2, x_48); +x_2 = x_50; +x_3 = x_51; +x_10 = x_47; +goto _start; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +lean_dec(x_41); +lean_dec(x_40); +lean_dec(x_39); +lean_dec(x_38); +lean_dec(x_36); +lean_dec(x_15); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_53 = lean_ctor_get(x_45, 0); +lean_inc(x_53); +x_54 = lean_ctor_get(x_45, 1); +lean_inc(x_54); +if (lean_is_exclusive(x_45)) { + lean_ctor_release(x_45, 0); + lean_ctor_release(x_45, 1); + x_55 = x_45; +} else { + lean_dec_ref(x_45); + x_55 = lean_box(0); +} +if (lean_is_scalar(x_55)) { + x_56 = lean_alloc_ctor(1, 2, 0); +} else { + x_56 = x_55; +} +lean_ctor_set(x_56, 0, x_53); +lean_ctor_set(x_56, 1, x_54); +return x_56; +} +} +} +} +} static lean_object* _init_l_Lean_Elab_wfRecursion___lambda__1___closed__1() { _start: { @@ -4596,108 +4796,150 @@ return x_46; } } } -LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { -lean_object* x_11; +lean_object* x_13; +lean_inc(x_11); +lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_2); -lean_inc(x_1); -x_11 = l_Lean_Elab_WF_packDomain(x_1, x_2, x_6, x_7, x_8, x_9, x_10); -if (lean_obj_tag(x_11) == 0) +lean_inc(x_3); +x_13 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3(x_1, x_2, x_3, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_13) == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_11, 1); -lean_inc(x_13); -lean_dec(x_11); -lean_inc(x_1); -x_14 = l_Lean_Elab_WF_packMutual(x_1, x_2, x_12, x_6, x_7, x_8, x_9, x_13); -if (lean_obj_tag(x_14) == 0) +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +x_16 = l_Lean_Elab_WF_packDomain(x_4, x_14, x_8, x_9, x_10, x_11, x_15); +if (lean_obj_tag(x_16) == 0) { -uint8_t x_15; -x_15 = !lean_is_exclusive(x_14); -if (x_15 == 0) -{ -lean_object* x_16; lean_object* x_17; -x_16 = lean_ctor_get(x_14, 0); -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_16); -lean_ctor_set(x_17, 1, x_1); -lean_ctor_set(x_14, 0, x_17); -return x_14; -} -else -{ -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_18 = lean_ctor_get(x_14, 0); -x_19 = lean_ctor_get(x_14, 1); -lean_inc(x_19); +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_16, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); -lean_dec(x_14); -x_20 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_20, 0, x_18); -lean_ctor_set(x_20, 1, x_1); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_20); -lean_ctor_set(x_21, 1, x_19); -return x_21; -} +lean_dec(x_16); +lean_inc(x_4); +x_19 = l_Lean_Elab_WF_packMutual(x_4, x_3, x_17, x_8, x_9, x_10, x_11, x_18); +if (lean_obj_tag(x_19) == 0) +{ +uint8_t x_20; +x_20 = !lean_is_exclusive(x_19); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_19, 0); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_4); +lean_ctor_set(x_19, 0, x_22); +return x_19; } else { -uint8_t x_22; -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_14); -if (x_22 == 0) -{ -return x_14; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_14, 0); -x_24 = lean_ctor_get(x_14, 1); +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_23 = lean_ctor_get(x_19, 0); +x_24 = lean_ctor_get(x_19, 1); lean_inc(x_24); lean_inc(x_23); -lean_dec(x_14); -x_25 = lean_alloc_ctor(1, 2, 0); +lean_dec(x_19); +x_25 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); -return x_25; +lean_ctor_set(x_25, 1, x_4); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_24); +return x_26; +} +} +else +{ +uint8_t x_27; +lean_dec(x_4); +x_27 = !lean_is_exclusive(x_19); +if (x_27 == 0) +{ +return x_19; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_19, 0); +x_29 = lean_ctor_get(x_19, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_19); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; } } } else { -uint8_t x_26; +uint8_t x_31; +lean_dec(x_11); +lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_2); -lean_dec(x_1); -x_26 = !lean_is_exclusive(x_11); -if (x_26 == 0) +lean_dec(x_4); +lean_dec(x_3); +x_31 = !lean_is_exclusive(x_16); +if (x_31 == 0) { -return x_11; +return x_16; } else { -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_11, 0); -x_28 = lean_ctor_get(x_11, 1); -lean_inc(x_28); -lean_inc(x_27); +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_16, 0); +x_33 = lean_ctor_get(x_16, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_16); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; +} +} +} +else +{ +uint8_t x_35; lean_dec(x_11); -x_29 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -return x_29; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_4); +lean_dec(x_3); +x_35 = !lean_is_exclusive(x_13); +if (x_35 == 0) +{ +return x_13; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_13, 0); +x_37 = lean_ctor_get(x_13, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_13); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; } } } @@ -4843,7 +5085,7 @@ lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_1); -x_76 = l_Lean_Elab_wfRecursion___lambda__5(x_71, x_1, x_67, x_4, x_5, x_6, x_7, x_8, x_9, x_75); +x_76 = l_Lean_Elab_wfRecursion___lambda__5(x_12, x_13, x_1, x_71, x_67, x_4, x_5, x_6, x_7, x_8, x_9, x_75); if (lean_obj_tag(x_76) == 0) { lean_object* x_77; lean_object* x_78; @@ -4925,7 +5167,7 @@ lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_1); -x_96 = l_Lean_Elab_wfRecursion___lambda__5(x_71, x_1, x_94, x_4, x_5, x_6, x_7, x_8, x_9, x_95); +x_96 = l_Lean_Elab_wfRecursion___lambda__5(x_12, x_13, x_1, x_71, x_94, x_4, x_5, x_6, x_7, x_8, x_9, x_95); lean_dec(x_94); if (lean_obj_tag(x_96) == 0) { @@ -5257,6 +5499,20 @@ lean_dec(x_1); return x_14; } } +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +size_t x_11; size_t x_12; lean_object* x_13; +x_11 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_12 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_13 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3(x_11, x_12, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_5); +lean_dec(x_4); +return x_13; +} +} LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { @@ -5288,18 +5544,22 @@ lean_dec(x_6); return x_16; } } -LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { -lean_object* x_11; -x_11 = l_Lean_Elab_wfRecursion___lambda__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +size_t x_13; size_t x_14; lean_object* x_15; +x_13 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_14 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_15 = l_Lean_Elab_wfRecursion___lambda__5(x_13, x_14, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -return x_11; +return x_15; } } -LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2032_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2084_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -5316,6 +5576,7 @@ lean_object* initialize_Lean_Elab_PreDefinition_WF_PackMutual(uint8_t builtin, l lean_object* initialize_Lean_Elab_PreDefinition_WF_Rel(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Elab_PreDefinition_WF_Fix(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Elab_PreDefinition_WF_Eqns(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_Elab_PreDefinition_WF_Ite(uint8_t builtin, lean_object*); static bool _G_initialized = false; LEAN_EXPORT lean_object* initialize_Lean_Elab_PreDefinition_WF_Main(uint8_t builtin, lean_object* w) { lean_object * res; @@ -5345,6 +5606,9 @@ lean_dec_ref(res); res = initialize_Lean_Elab_PreDefinition_WF_Eqns(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Elab_PreDefinition_WF_Ite(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1 = _init_l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1(); lean_mark_persistent(l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1); l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__2 = _init_l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__2(); @@ -5413,6 +5677,10 @@ l_Lean_Elab_getFixedPrefix___lambda__2___closed__1 = _init_l_Lean_Elab_getFixedP lean_mark_persistent(l_Lean_Elab_getFixedPrefix___lambda__2___closed__1); l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__1___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__1___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__1___closed__1); +l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1 = _init_l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1(); +lean_mark_persistent(l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1); +l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2 = _init_l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2(); +lean_mark_persistent(l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2); l_Lean_Elab_wfRecursion___lambda__1___closed__1 = _init_l_Lean_Elab_wfRecursion___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Elab_wfRecursion___lambda__1___closed__1); l_Lean_Elab_wfRecursion___lambda__1___closed__2 = _init_l_Lean_Elab_wfRecursion___lambda__1___closed__2(); @@ -5433,7 +5701,7 @@ l_Lean_Elab_wfRecursion___closed__5 = _init_l_Lean_Elab_wfRecursion___closed__5( lean_mark_persistent(l_Lean_Elab_wfRecursion___closed__5); l_Lean_Elab_wfRecursion___closed__6 = _init_l_Lean_Elab_wfRecursion___closed__6(); lean_mark_persistent(l_Lean_Elab_wfRecursion___closed__6); -res = l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2032_(lean_io_mk_world()); +res = l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2084_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Elab/Structure.c b/stage0/stdlib/Lean/Elab/Structure.c index d28c11c2c4..da0404150c 100644 --- a/stage0/stdlib/Lean/Elab/Structure.c +++ b/stage0/stdlib/Lean/Elab/Structure.c @@ -188,6 +188,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_el lean_object* lean_string_append(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_copyNewFieldsFrom_copyFields_copy___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Command_structureDiamondWarning; +lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_applyAttributesAt(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); static lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_registerStructure___spec__2___closed__4; @@ -277,7 +278,6 @@ LEAN_EXPORT lean_object* l_panic___at___private_Lean_Elab_Structure_0__Lean_Elab static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_elabStructureView___spec__5___closed__4; lean_object* l_Lean_Elab_Term_addAutoBoundImplicits___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_elabModifiers___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_setBinderInfo(lean_object*, lean_object*, uint8_t); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_elabStructureView___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -9993,7 +9993,7 @@ lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_17 = l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(x_13, x_16, x_15, x_4, x_5, x_6, x_7, x_14); +x_17 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_13, x_16, x_15, x_4, x_5, x_6, x_7, x_14); if (lean_obj_tag(x_17) == 0) { uint8_t x_18; @@ -10514,7 +10514,7 @@ lean_object* x_8; lean_object* x_9; lean_object* x_10; x_8 = lean_alloc_closure((void*)(l___private_Lean_Elab_Structure_0__Lean_Elab_Command_reduceProjs___lambda__1), 7, 1); lean_closure_set(x_8, 0, x_2); x_9 = l___private_Lean_Elab_Structure_0__Lean_Elab_Command_getFieldType___lambda__4___closed__1; -x_10 = l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(x_1, x_9, x_8, x_3, x_4, x_5, x_6, x_7); +x_10 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_1, x_9, x_8, x_3, x_4, x_5, x_6, x_7); return x_10; } }