diff --git a/stage0/src/Lean/Compiler/InitAttr.lean b/stage0/src/Lean/Compiler/InitAttr.lean index 460b23abaa..b7a3d8b168 100644 --- a/stage0/src/Lean/Compiler/InitAttr.lean +++ b/stage0/src/Lean/Compiler/InitAttr.lean @@ -57,18 +57,26 @@ getInitFnNameForCore? env builtinInitAttr fn def getRegularInitFnNameFor? (env : Environment) (fn : Name) : Option Name := getInitFnNameForCore? env regularInitAttr fn --- Only used -def isIOUnitInitFn (env : Environment) (fn : Name) : Bool := -let aux (attr : ParametricAttribute Name) : Bool := - match attr.getParam env fn with - | some Name.anonymous => true - | _ => false -aux builtinInitAttr || aux regularInitAttr - @[export lean_get_init_fn_name_for] def getInitFnNameFor? (env : Environment) (fn : Name) : Option Name := getBuiltinInitFnNameFor? env fn <|> getRegularInitFnNameFor? env fn +def isIOUnitInitFnCore (env : Environment) (attr : ParametricAttribute Name) (fn : Name) : Bool := +match attr.getParam env fn with +| some Name.anonymous => true +| _ => false + +@[export lean_is_io_unit_regular_init_fn] +def isIOUnitRegularInitFn (env : Environment) (fn : Name) : Bool := +isIOUnitInitFnCore env regularInitAttr fn + +@[export lean_is_io_unit_builtin_init_fn] +def isIOUnitBuiltinInitFn (env : Environment) (fn : Name) : Bool := +isIOUnitInitFnCore env builtinInitAttr fn + +def isIOUnitInitFn (env : Environment) (fn : Name) : Bool := +isIOUnitBuiltinInitFn env fn || isIOUnitRegularInitFn env fn + def hasInitAttr (env : Environment) (fn : Name) : Bool := (getInitFnNameFor? env fn).isSome diff --git a/stage0/src/Lean/Meta/AbstractNestedProofs.lean b/stage0/src/Lean/Meta/AbstractNestedProofs.lean index e543bcbd6e..977ba9fd33 100644 --- a/stage0/src/Lean/Meta/AbstractNestedProofs.lean +++ b/stage0/src/Lean/Meta/AbstractNestedProofs.lean @@ -1,3 +1,4 @@ +#lang lean4 /- Copyright (c) 2020 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. @@ -5,13 +6,15 @@ Authors: Leonardo de Moura -/ import Lean.Meta.Closure -namespace Lean -namespace Meta +namespace Lean.Meta namespace AbstractNestedProofs -def isNonTrivialProof (e : Expr) : MetaM Bool := -condM (not <$> isProof e) (pure false) $ e.withApp fun f args => - pure $ !f.isAtomic || args.any fun arg => !arg.isAtomic +def isNonTrivialProof (e : Expr) : MetaM Bool := do +if ! (← isProof e) then + pure false +else + e.withApp fun f args => + pure $ !f.isAtomic || args.any fun arg => !arg.isAtomic structure Context := (baseName : Name) @@ -22,40 +25,40 @@ structure State := abbrev M := ReaderT Context $ MonadCacheT Expr Expr $ StateRefT State $ MetaM private def mkAuxLemma (e : Expr) : M Expr := do -ctx ← read; -s ← get; -lemmaName ← mkAuxName (ctx.baseName ++ `proof) s.nextIdx; -modify fun s => { s with nextIdx := s.nextIdx + 1 }; +let ctx ← read +let s ← get +let lemmaName ← mkAuxName (ctx.baseName ++ `proof) s.nextIdx +modify fun s => { s with nextIdx := s.nextIdx + 1 } mkAuxDefinitionFor lemmaName e -partial def visit : Expr → M Expr -| e => - if e.isAtomic then pure e - else do - let visitBinders (xs : Array Expr) (k : M Expr) : M Expr := do { - localInstances ← getLocalInstances; - lctx ← getLCtx; - lctx ← xs.foldlM - (fun (lctx : LocalContext) x => do - let xFVarId := x.fvarId!; - localDecl ← getLocalDecl xFVarId; - type ← visit localDecl.type; - let localDecl := localDecl.setType type; - localDecl ← match localDecl.value? with - | some value => do value ← visit value; pure $ localDecl.setValue value - | none => pure localDecl; - pure $ lctx.modifyLocalDecl xFVarId fun _ => localDecl) - lctx; - withLCtx lctx localInstances k - }; - checkCache e fun e => condM (liftM $ isNonTrivialProof e) (mkAuxLemma e) $ match e with - | Expr.lam _ _ _ _ => lambdaLetTelescope e fun xs b => visitBinders xs do b ← visit b; mkLambdaFVars xs b - | Expr.letE _ _ _ _ _ => lambdaLetTelescope e fun xs b => visitBinders xs do b ← visit b; mkLambdaFVars xs b - | Expr.forallE _ _ _ _ => forallTelescope e fun xs b => visitBinders xs do b ← visit b; mkForallFVars xs b - | Expr.mdata _ b _ => do b ← visit b; pure $ e.updateMData! b - | Expr.proj _ _ b _ => do b ← visit b; pure $ e.updateProj! b - | Expr.app _ _ _ => e.withApp fun f args => do args ← args.mapM visit; pure $ mkAppN f args - | _ => pure e +partial def visit (e : Expr) : M Expr := do +if e.isAtomic then + pure e +else + let visitBinders (xs : Array Expr) (k : M Expr) : M Expr := do + let localInstances ← getLocalInstances + let lctx ← getLCtx + for x in xs do + let xFVarId := x.fvarId! + let localDecl ← getLocalDecl xFVarId + let type ← visit localDecl.type + let localDecl := localDecl.setType type + let localDecl ← match localDecl.value? with + | some value => do let value ← visit value; pure $ localDecl.setValue value + | none => pure localDecl + lctx :=lctx.modifyLocalDecl xFVarId fun _ => localDecl + withLCtx lctx localInstances k + checkCache e fun e => + if (← isNonTrivialProof e) then + mkAuxLemma e + else match e with + | Expr.lam _ _ _ _ => lambdaLetTelescope e fun xs b => visitBinders xs do mkLambdaFVars xs (← visit b) + | Expr.letE _ _ _ _ _ => lambdaLetTelescope e fun xs b => visitBinders xs do mkLambdaFVars xs (← visit b) + | Expr.forallE _ _ _ _ => forallTelescope e fun xs b => visitBinders xs do mkForallFVars xs (← visit b) + | Expr.mdata _ b _ => do pure $ e.updateMData! (← visit b) + | Expr.proj _ _ b _ => do pure $ e.updateProj! (← visit b) + | Expr.app _ _ _ => e.withApp fun f args => do pure $ mkAppN f (← args.mapM visit) + | _ => pure e end AbstractNestedProofs @@ -63,5 +66,4 @@ end AbstractNestedProofs def abstractNestedProofs (mainDeclName : Name) (e : Expr) : MetaM Expr := (((AbstractNestedProofs.visit e).run { baseName := mainDeclName }).run).run' { nextIdx := 1 } -end Meta -end Lean +end Lean.Meta diff --git a/stage0/src/Lean/Meta/GeneralizeTelescope.lean b/stage0/src/Lean/Meta/GeneralizeTelescope.lean index 79eecf72fe..390ac3f32a 100644 --- a/stage0/src/Lean/Meta/GeneralizeTelescope.lean +++ b/stage0/src/Lean/Meta/GeneralizeTelescope.lean @@ -1,3 +1,4 @@ +#lang lean4 /- Copyright (c) 2020 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. @@ -5,8 +6,7 @@ Authors: Leonardo de Moura -/ import Lean.Meta.KAbstract -namespace Lean -namespace Meta +namespace Lean.Meta namespace GeneralizeTelescope structure Entry := @@ -14,40 +14,40 @@ structure Entry := (type : Expr) (modified : Bool) -partial def updateTypes (e newE : Expr) : Array Entry → Nat → MetaM (Array Entry) +partial def updateTypes (e eNew : Expr) : Array Entry → Nat → MetaM (Array Entry) | entries, i => if h : i < entries.size then - let entry := entries.get ⟨i, h⟩; + let entry := entries.get ⟨i, h⟩ match entry with | ⟨_, type, _⟩ => do - typeAbst ← kabstract type e; + let typeAbst ← kabstract type e if typeAbst.hasLooseBVars then do - let typeNew := typeAbst.instantiate1 newE; - let entries := entries.set ⟨i, h⟩ { entry with type := typeNew, modified := true }; - updateTypes entries (i+1) + let typeNew := typeAbst.instantiate1 eNew + let entries := entries.set ⟨i, h⟩ { entry with type := typeNew, modified := true } + updateTypes e eNew entries (i+1) else - updateTypes entries (i+1) + updateTypes e eNew entries (i+1) else pure entries partial def generalizeTelescopeAux {α} (prefixForNewVars : Name) (k : Array Expr → MetaM α) : Array Entry → Nat → Nat → Array Expr → MetaM α -| entries, i, nextVarIdx, fvars => +| entries, i, nextVarIdx, fvars => do if h : i < entries.size then - let replace (e : Expr) (type : Expr) : MetaM α := do { - let userName := prefixForNewVars.appendIndexAfter nextVarIdx; - withLocalDeclD userName type $ fun x => do - entries ← updateTypes e x entries (i+1); - generalizeTelescopeAux entries (i+1) (nextVarIdx+1) (fvars.push x) - }; + let replace (e : Expr) (type : Expr) : MetaM α := do + let userName := prefixForNewVars.appendIndexAfter nextVarIdx + withLocalDeclD userName type fun x => do + entries ← updateTypes e x entries (i+1) + generalizeTelescopeAux prefixForNewVars k entries (i+1) (nextVarIdx+1) (fvars.push x) match entries.get ⟨i, h⟩ with - | ⟨e@(Expr.fvar fvarId _), type, false⟩ => do - localDecl ← getLocalDecl fvarId; + | ⟨e@(Expr.fvar fvarId _), type, false⟩ => + let localDecl ← getLocalDecl fvarId match localDecl with - | LocalDecl.cdecl _ _ _ _ _ => generalizeTelescopeAux entries (i+1) nextVarIdx (fvars.push e) - | LocalDecl.ldecl _ _ _ _ _ _ => replace e type - | ⟨e, type, modified⟩ => do - when modified $ unlessM (isTypeCorrect type) $ - throwError $ "failed to create telescope generalizing " ++ (entries.map Entry.expr); + | LocalDecl.cdecl .. => generalizeTelescopeAux prefixForNewVars k entries (i+1) nextVarIdx (fvars.push e) + | LocalDecl.ldecl .. => replace e type + | ⟨e, type, modified⟩ => + if modified then + unless (← isTypeCorrect type) do + throwError! "failed to create telescope generalizing {entries.map Entry.expr}" replace e type else k fvars @@ -88,12 +88,10 @@ open GeneralizeTelescope ``` and the type for the new variable abstracting `h` is `xs = aux_2` which is not type correct. -/ def generalizeTelescope {α} (es : Array Expr) (prefixForNewVars : Name) (k : Array Expr → MetaM α) : MetaM α := do -es ← es.mapM $ fun e => do { - type ← inferType e; - type ← instantiateMVars type; +let es ← es.mapM fun e => do + let type ← inferType e + let type ← instantiateMVars type pure { expr := e, type := type, modified := false : Entry } -}; generalizeTelescopeAux prefixForNewVars k es 0 1 #[] -end Meta -end Lean +end Lean.Meta diff --git a/stage0/stdlib/Lean/Compiler/InitAttr.c b/stage0/stdlib/Lean/Compiler/InitAttr.c index 611efd5fd7..7b8bfbd260 100644 --- a/stage0/stdlib/Lean/Compiler/InitAttr.c +++ b/stage0/stdlib/Lean/Compiler/InitAttr.c @@ -30,6 +30,7 @@ extern lean_object* l_Lean_registerInternalExceptionId___closed__2; lean_object* l_Lean_EnvExtensionInterfaceUnsafe_registerExt___rarg(lean_object*, lean_object*); lean_object* l_Lean_registerInitAttr___lambda__1___closed__7; lean_object* l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(lean_object*, lean_object*); +uint8_t lean_is_io_unit_regular_init_fn(lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* lean_environment_find(lean_object*, lean_object*); lean_object* l_Lean_getConstInfo___at_Lean_registerInitAttr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -44,11 +45,11 @@ lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_registerInitAttr(lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_Lean_registerInitAttr___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_isIOUnitInitFn_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerInitAttr___lambda__1___closed__10; extern lean_object* l_Lean_Name_inhabited; extern lean_object* l_String_splitAux___main___closed__1; lean_object* l_Lean_resolveGlobalConst___at_Lean_registerInitAttr___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_isIOUnitInitFnCore_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerInitAttr_match__3(lean_object*); lean_object* l_Lean_resolveGlobalConst___at_Lean_registerInitAttr___spec__4___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Compiler_InitAttr_0__Lean_getIOTypeArg___boxed(lean_object*); @@ -66,6 +67,7 @@ lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_throwUnknownConstant___at_Lean_registerInitAttr___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_get_init_fn_name_for(lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +uint8_t l_Lean_isIOUnitInitFnCore(lean_object*, lean_object*, lean_object*); lean_object* l_Array_qsortAux___main___at_Lean_registerInitAttr___spec__9(lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); @@ -82,6 +84,7 @@ lean_object* l_Std_RBNode_fold___main___at_Lean_registerInitAttr___spec__8(lean_ lean_object* l_Lean_throwUnknownConstant___at_Lean_registerInitAttr___spec__6(lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_initFn____x40_Lean_Compiler_InitAttr___hyg_378____closed__1; +lean_object* l_Lean_isIOUnitInitFnCore_match__1(lean_object*); lean_object* l_Lean_registerParametricAttribute___rarg___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* l_Lean_throwUnknownConstant___at_Lean_registerInitAttr___spec__6___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_registerInitAttr___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -92,7 +95,7 @@ lean_object* l_Lean_registerInitAttr___lambda__2(lean_object*, lean_object*, lea lean_object* l_Lean_getInitFnNameForCore_x3f___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_resolveGlobalName___at_Lean_registerInitAttr___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); -lean_object* l_Lean_isIOUnitInitFn_match__1(lean_object*); +lean_object* l_Lean_isIOUnitBuiltinInitFn___boxed(lean_object*, lean_object*); lean_object* l_Array_binSearchAux___main___at_Lean_getInitFnNameForCore_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_hasInitAttr___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; @@ -107,6 +110,7 @@ lean_object* l_Lean_throwError___at_Lean_registerInitAttr___spec__2(lean_object* extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l_Lean_ParametricAttribute_getParam___at_Lean_getInitFnNameForCore_x3f___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_is_io_unit_builtin_init_fn(lean_object*, lean_object*); lean_object* l___private_Lean_Compiler_InitAttr_0__Lean_getIOTypeArg_match__1(lean_object*); lean_object* l_Lean_registerInitAttr___lambda__1___closed__13; extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__4; @@ -129,8 +133,10 @@ uint8_t l___private_Lean_Compiler_InitAttr_0__Lean_isIOUnit(lean_object*); lean_object* l_Lean_registerParametricAttribute___at_Lean_registerInitAttr___spec__7___lambda__1___boxed(lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_Lean_AddMessageContext___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_isIOUnitInitFnCore___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerInitAttr___lambda__1___closed__8; uint8_t lean_nat_dec_le(lean_object*, lean_object*); +lean_object* l_Lean_isIOUnitRegularInitFn___boxed(lean_object*, lean_object*); lean_object* l_Lean_registerInitAttr___lambda__1___closed__2; lean_object* l_Lean_ParametricAttribute_getParam___at_Lean_getInitFnNameForCore_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerInitAttr___lambda__1___closed__1; @@ -2954,7 +2960,30 @@ lean_dec(x_1); return x_4; } } -lean_object* l_Lean_isIOUnitInitFn_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* lean_get_init_fn_name_for(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; +x_3 = l_Lean_builtinInitAttr; +lean_inc(x_2); +x_4 = l_Lean_getInitFnNameForCore_x3f(x_1, x_3, x_2); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = l_Lean_regularInitAttr; +x_6 = l_Lean_getInitFnNameForCore_x3f(x_1, x_5, x_2); +lean_dec(x_1); +return x_6; +} +else +{ +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} +} +lean_object* l_Lean_isIOUnitInitFnCore_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 0) @@ -2989,82 +3018,116 @@ return x_8; } } } -lean_object* l_Lean_isIOUnitInitFn_match__1(lean_object* x_1) { +lean_object* l_Lean_isIOUnitInitFnCore_match__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_isIOUnitInitFn_match__1___rarg), 3, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_isIOUnitInitFnCore_match__1___rarg), 3, 0); return x_2; } } +uint8_t l_Lean_isIOUnitInitFnCore(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_ParametricAttribute_getParam___at_Lean_getInitFnNameForCore_x3f___spec__1(x_2, x_1, x_3); +if (lean_obj_tag(x_4) == 0) +{ +uint8_t x_5; +x_5 = 0; +return x_5; +} +else +{ +lean_object* x_6; +x_6 = lean_ctor_get(x_4, 0); +lean_inc(x_6); +lean_dec(x_4); +if (lean_obj_tag(x_6) == 0) +{ +uint8_t x_7; +x_7 = 1; +return x_7; +} +else +{ +uint8_t x_8; +lean_dec(x_6); +x_8 = 0; +return x_8; +} +} +} +} +lean_object* l_Lean_isIOUnitInitFnCore___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = l_Lean_isIOUnitInitFnCore(x_1, x_2, x_3); +lean_dec(x_2); +lean_dec(x_1); +x_5 = lean_box(x_4); +return x_5; +} +} +uint8_t lean_is_io_unit_regular_init_fn(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; uint8_t x_4; +x_3 = l_Lean_regularInitAttr; +x_4 = l_Lean_isIOUnitInitFnCore(x_1, x_3, x_2); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_isIOUnitRegularInitFn___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = lean_is_io_unit_regular_init_fn(x_1, x_2); +x_4 = lean_box(x_3); +return x_4; +} +} +uint8_t lean_is_io_unit_builtin_init_fn(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; uint8_t x_4; +x_3 = l_Lean_builtinInitAttr; +x_4 = l_Lean_isIOUnitInitFnCore(x_1, x_3, x_2); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_isIOUnitBuiltinInitFn___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = lean_is_io_unit_builtin_init_fn(x_1, x_2); +x_4 = lean_box(x_3); +return x_4; +} +} uint8_t l_Lean_isIOUnitInitFn(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_11; lean_object* x_12; -x_11 = l_Lean_builtinInitAttr; +lean_object* x_3; uint8_t x_4; +x_3 = l_Lean_builtinInitAttr; lean_inc(x_2); -x_12 = l_Lean_ParametricAttribute_getParam___at_Lean_getInitFnNameForCore_x3f___spec__1(x_11, x_1, x_2); -if (lean_obj_tag(x_12) == 0) +x_4 = l_Lean_isIOUnitInitFnCore(x_1, x_3, x_2); +if (x_4 == 0) { -lean_object* x_13; -x_13 = lean_box(0); -x_3 = x_13; -goto block_10; -} -else -{ -lean_object* x_14; -x_14 = lean_ctor_get(x_12, 0); -lean_inc(x_14); -lean_dec(x_12); -if (lean_obj_tag(x_14) == 0) -{ -uint8_t x_15; -lean_dec(x_2); -x_15 = 1; -return x_15; -} -else -{ -lean_object* x_16; -lean_dec(x_14); -x_16 = lean_box(0); -x_3 = x_16; -goto block_10; -} -} -block_10: -{ -lean_object* x_4; lean_object* x_5; -lean_dec(x_3); -x_4 = l_Lean_regularInitAttr; -x_5 = l_Lean_ParametricAttribute_getParam___at_Lean_getInitFnNameForCore_x3f___spec__1(x_4, x_1, x_2); -if (lean_obj_tag(x_5) == 0) -{ -uint8_t x_6; -x_6 = 0; +lean_object* x_5; uint8_t x_6; +x_5 = l_Lean_regularInitAttr; +x_6 = l_Lean_isIOUnitInitFnCore(x_1, x_5, x_2); return x_6; } else { -lean_object* x_7; -x_7 = lean_ctor_get(x_5, 0); -lean_inc(x_7); -lean_dec(x_5); -if (lean_obj_tag(x_7) == 0) -{ -uint8_t x_8; -x_8 = 1; -return x_8; -} -else -{ -uint8_t x_9; -lean_dec(x_7); -x_9 = 0; -return x_9; -} -} +uint8_t x_7; +lean_dec(x_2); +x_7 = 1; +return x_7; } } } @@ -3078,29 +3141,6 @@ x_4 = lean_box(x_3); return x_4; } } -lean_object* lean_get_init_fn_name_for(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = l_Lean_builtinInitAttr; -lean_inc(x_2); -x_4 = l_Lean_getInitFnNameForCore_x3f(x_1, x_3, x_2); -if (lean_obj_tag(x_4) == 0) -{ -lean_object* x_5; lean_object* x_6; -x_5 = l_Lean_regularInitAttr; -x_6 = l_Lean_getInitFnNameForCore_x3f(x_1, x_5, x_2); -lean_dec(x_1); -return x_6; -} -else -{ -lean_dec(x_2); -lean_dec(x_1); -return x_4; -} -} -} uint8_t l_Lean_hasInitAttr(lean_object* x_1, lean_object* x_2) { _start: { diff --git a/stage0/stdlib/Lean/Meta/AbstractNestedProofs.c b/stage0/stdlib/Lean/Meta/AbstractNestedProofs.c index 9039df0e99..310879c436 100644 --- a/stage0/stdlib/Lean/Meta/AbstractNestedProofs.c +++ b/stage0/stdlib/Lean/Meta/AbstractNestedProofs.c @@ -14,213 +14,112 @@ extern "C" { #endif lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___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* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__9(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_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__2(lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___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* l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +size_t l_USize_add(size_t, size_t); +lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9___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* l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___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_array_uget(lean_object*, size_t); lean_object* lean_expr_update_mdata(lean_object*, lean_object*); -lean_object* l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___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* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__7(lean_object*); extern lean_object* l_Std_HashMap_inhabited___closed__1; +lean_object* l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___spec__8(lean_object*); +lean_object* l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_31__withLocalContextImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_AbstractNestedProofs_visit___main(lean_object*, 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_object* l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isProofImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__7___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_AbstractNestedProofs_visit___main___closed__1; -lean_object* l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Expr_getAppArgs___closed__1; -lean_object* l_Lean_Meta_AbstractNestedProofs_visit___main___closed__2; +lean_object* l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_USize_decLt(size_t, size_t); lean_object* l_Lean_Meta_setMCtx___at___private_Lean_Meta_Basic_6__liftMkBindingM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___spec__4(lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); -lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_AbstractNestedProofs_visit_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Meta_Basic_6__liftMkBindingM___rarg___closed__3; lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractNestedProofs_visit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_19__forallTelescopeImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__2; +lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___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* l_Lean_Name_append___main(lean_object*, lean_object*); +uint8_t l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__11___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_headBeta(lean_object*); -lean_object* l_Array_umapMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__8(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_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); +lean_object* l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__2; lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_MonadEnv_1__mkAuxNameAux___main(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_set___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_setValue(lean_object*, lean_object*); lean_object* lean_st_mk_ref(lean_object*, lean_object*); -lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__12(lean_object*); +lean_object* l_Lean_Meta_AbstractNestedProofs_visit_match__2(lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); -lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__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_object* l_Lean_Meta_AbstractNestedProofs_visit___main___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_isProof___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_visit___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_isEmpty___rarg(lean_object*); -lean_object* l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_AbstractNestedProofs_visit_match__1(lean_object*); +size_t lean_usize_of_nat(lean_object*); +lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_update_proj(lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_mkWHNFRef___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_fvarId(lean_object*); -lean_object* l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__1; +lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_type(lean_object*); lean_object* l_Lean_LocalDecl_value_x3f(lean_object*); -lean_object* l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_index(lean_object*); -lean_object* l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_AbstractNestedProofs_visit___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at___private_Lean_MetavarContext_2__visit___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__6(lean_object*); lean_object* l_Lean_Meta_abstractNestedProofs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___spec__10(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_throwUnknownFVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___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* l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__1; -lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___spec__8___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkAuxDefinition___at_Lean_Meta_mkAuxDefinitionFor___spec__2(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_AbstractNestedProofs_isNonTrivialProof(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___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_st_ref_set(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__7___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* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_MkBinding_mkBinding(uint8_t, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*); lean_object* l_Lean_Meta_inferType___at_Lean_Meta_mkAuxDefinitionFor___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___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_mk_array(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAtomic(lean_object*); -lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__12___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_AbstractNestedProofs_visit_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_isProof___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_setType(lean_object*, lean_object*); -lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_local_ctx_find(lean_object*, lean_object*); -lean_object* l_Lean_Meta_AbstractNestedProofs_visit___main___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__11(lean_object*); +lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_AbstractNestedProofs_State_nextIdx___default; +lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9(lean_object*); +lean_object* l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_AbstractNestedProofs_visit___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_23__lambdaTelescopeImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_AbstractNestedProofs_visit___closed__2; +lean_object* l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -uint8_t l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__1(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; -x_6 = lean_nat_dec_lt(x_5, x_4); -if (x_6 == 0) -{ -uint8_t x_7; -lean_dec(x_5); -x_7 = 0; -return x_7; -} -else -{ -lean_object* x_8; uint8_t x_9; -x_8 = lean_array_fget(x_3, x_5); -x_9 = l_Lean_Expr_isAtomic(x_8); -lean_dec(x_8); -if (x_9 == 0) -{ -uint8_t x_10; -lean_dec(x_5); -x_10 = 1; -return x_10; -} -else -{ -if (x_1 == 0) -{ -lean_object* x_11; lean_object* x_12; -x_11 = lean_unsigned_to_nat(1u); -x_12 = lean_nat_add(x_5, x_11); -lean_dec(x_5); -x_5 = x_12; -goto _start; -} -else -{ -lean_dec(x_5); -return x_1; -} -} -} -} -} -lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2(uint8_t 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: -{ -if (lean_obj_tag(x_2) == 5) -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_10 = lean_ctor_get(x_2, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_2, 1); -lean_inc(x_11); -lean_dec(x_2); -x_12 = lean_array_set(x_3, x_4, x_11); -x_13 = lean_unsigned_to_nat(1u); -x_14 = lean_nat_sub(x_4, x_13); -lean_dec(x_4); -x_2 = x_10; -x_3 = x_12; -x_4 = x_14; -goto _start; -} -else -{ -uint8_t x_16; -lean_dec(x_4); -x_16 = l_Lean_Expr_isAtomic(x_2); -lean_dec(x_2); -if (x_16 == 0) -{ -uint8_t x_17; lean_object* x_18; lean_object* x_19; -lean_dec(x_3); -x_17 = 1; -x_18 = lean_box(x_17); -x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_18); -lean_ctor_set(x_19, 1, x_9); -return x_19; -} -else -{ -if (x_1 == 0) -{ -lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_24; -x_20 = lean_array_get_size(x_3); -x_21 = lean_unsigned_to_nat(0u); -x_22 = l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__1(x_1, x_3, x_3, x_20, x_21); -lean_dec(x_20); -lean_dec(x_3); -x_23 = lean_box(x_22); -x_24 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_24, 0, x_23); -lean_ctor_set(x_24, 1, x_9); -return x_24; -} -else -{ -uint8_t x_25; lean_object* x_26; lean_object* x_27; -lean_dec(x_3); -x_25 = 1; -x_26 = lean_box(x_25); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_9); -return x_27; -} -} -} -} -} -lean_object* l_Lean_Meta_isProof___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___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* l_Lean_Meta_AbstractNestedProofs_visit___closed__1; +lean_object* l_Lean_Meta_isProof___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___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) { _start: { lean_object* x_7; @@ -228,140 +127,346 @@ x_7 = l___private_Lean_Meta_InferType_0__Lean_Meta_isProofImp(x_1, x_2, x_3, x_4 return x_7; } } -lean_object* l_Lean_Meta_AbstractNestedProofs_isNonTrivialProof(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +uint8_t l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -uint8_t x_7; lean_object* x_8; lean_object* x_20; -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_1); -x_20 = l___private_Lean_Meta_InferType_0__Lean_Meta_isProofImp(x_1, x_2, x_3, x_4, x_5, x_6); -if (lean_obj_tag(x_20) == 0) +uint8_t x_5; +x_5 = lean_nat_dec_lt(x_4, x_3); +if (x_5 == 0) { -lean_object* x_21; uint8_t x_22; -x_21 = lean_ctor_get(x_20, 0); -lean_inc(x_21); -x_22 = lean_unbox(x_21); -lean_dec(x_21); -if (x_22 == 0) -{ -lean_object* x_23; uint8_t x_24; -x_23 = lean_ctor_get(x_20, 1); -lean_inc(x_23); -lean_dec(x_20); -x_24 = 1; -x_7 = x_24; -x_8 = x_23; -goto block_19; -} -else -{ -lean_object* x_25; uint8_t x_26; -x_25 = lean_ctor_get(x_20, 1); -lean_inc(x_25); -lean_dec(x_20); -x_26 = 0; -x_7 = x_26; -x_8 = x_25; -goto block_19; -} -} -else -{ -uint8_t x_27; -lean_dec(x_5); +uint8_t x_6; lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_27 = !lean_is_exclusive(x_20); -if (x_27 == 0) -{ -return x_20; +x_6 = 0; +return x_6; } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_20, 0); -x_29 = lean_ctor_get(x_20, 1); -lean_inc(x_29); -lean_inc(x_28); -lean_dec(x_20); -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; +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_fget(x_2, x_4); +x_8 = l_Lean_Expr_isAtomic(x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +uint8_t x_9; +lean_dec(x_4); +x_9 = 1; +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_4, x_10); +lean_dec(x_4); +x_4 = x_11; +goto _start; } } -block_19: +} +} +lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___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) { +_start: { -if (x_7 == 0) +if (lean_obj_tag(x_1) == 5) { -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; -x_9 = lean_unsigned_to_nat(0u); -x_10 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_9); -x_11 = l_Lean_Expr_getAppArgs___closed__1; +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_1, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_1, 1); lean_inc(x_10); -x_12 = lean_mk_array(x_10, x_11); -x_13 = lean_unsigned_to_nat(1u); -x_14 = lean_nat_sub(x_10, x_13); -lean_dec(x_10); -x_15 = l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2(x_7, x_1, x_12, x_14, x_2, x_3, x_4, x_5, x_8); -lean_dec(x_5); -lean_dec(x_4); +lean_dec(x_1); +x_11 = lean_array_set(x_2, x_3, x_10); +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_sub(x_3, x_12); lean_dec(x_3); -lean_dec(x_2); -return x_15; +x_1 = x_9; +x_2 = x_11; +x_3 = x_13; +goto _start; } else { +uint8_t x_15; +lean_dec(x_3); +x_15 = l_Lean_Expr_isAtomic(x_1); +lean_dec(x_1); +if (x_15 == 0) +{ uint8_t x_16; lean_object* x_17; lean_object* x_18; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); lean_dec(x_2); -lean_dec(x_1); -x_16 = 0; +x_16 = 1; x_17 = lean_box(x_16); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_8); return x_18; } +else +{ +lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; +x_19 = lean_array_get_size(x_2); +x_20 = lean_unsigned_to_nat(0u); +x_21 = l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2(x_2, x_2, x_19, x_20); +lean_dec(x_19); +lean_dec(x_2); +x_22 = lean_box(x_21); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_8); +return x_23; } } } -lean_object* l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +} +uint8_t l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -uint8_t x_6; uint8_t x_7; lean_object* x_8; -x_6 = lean_unbox(x_1); +uint8_t x_5; +x_5 = lean_nat_dec_lt(x_4, x_3); +if (x_5 == 0) +{ +uint8_t x_6; +lean_dec(x_4); +x_6 = 0; +return x_6; +} +else +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_fget(x_2, x_4); +x_8 = l_Lean_Expr_isAtomic(x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +uint8_t x_9; +lean_dec(x_4); +x_9 = 1; +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_4, x_10); +lean_dec(x_4); +x_4 = x_11; +goto _start; +} +} +} +} +lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___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) { +_start: +{ +if (lean_obj_tag(x_1) == 5) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_1, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); lean_dec(x_1); -x_7 = l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__1(x_6, x_2, x_3, x_4, x_5); +x_11 = lean_array_set(x_2, x_3, x_10); +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_sub(x_3, x_12); +lean_dec(x_3); +x_1 = x_9; +x_2 = x_11; +x_3 = x_13; +goto _start; +} +else +{ +uint8_t x_15; +lean_dec(x_3); +x_15 = l_Lean_Expr_isAtomic(x_1); +lean_dec(x_1); +if (x_15 == 0) +{ +uint8_t x_16; lean_object* x_17; lean_object* x_18; +lean_dec(x_2); +x_16 = 1; +x_17 = lean_box(x_16); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_8); +return x_18; +} +else +{ +lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; +x_19 = lean_array_get_size(x_2); +x_20 = lean_unsigned_to_nat(0u); +x_21 = l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__4(x_2, x_2, x_19, x_20); +lean_dec(x_19); +lean_dec(x_2); +x_22 = lean_box(x_21); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_8); +return x_23; +} +} +} +} +lean_object* l_Lean_Meta_AbstractNestedProofs_isNonTrivialProof(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_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_7 = l___private_Lean_Meta_InferType_0__Lean_Meta_isProofImp(x_1, x_2, x_3, x_4, x_5, x_6); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; uint8_t x_9; +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +x_9 = lean_unbox(x_8); +lean_dec(x_8); +if (x_9 == 0) +{ +uint8_t x_10; +lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_8 = lean_box(x_7); -return x_8; +lean_dec(x_1); +x_10 = !lean_is_exclusive(x_7); +if (x_10 == 0) +{ +lean_object* x_11; uint8_t x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_7, 0); +lean_dec(x_11); +x_12 = 0; +x_13 = lean_box(x_12); +lean_ctor_set(x_7, 0, x_13); +return x_7; +} +else +{ +lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; +x_14 = lean_ctor_get(x_7, 1); +lean_inc(x_14); +lean_dec(x_7); +x_15 = 0; +x_16 = lean_box(x_15); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_14); +return x_17; } } -lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +else +{ +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_18 = lean_ctor_get(x_7, 1); +lean_inc(x_18); +lean_dec(x_7); +x_19 = lean_unsigned_to_nat(0u); +x_20 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_19); +x_21 = l_Lean_Expr_getAppArgs___closed__1; +lean_inc(x_20); +x_22 = lean_mk_array(x_20, x_21); +x_23 = lean_unsigned_to_nat(1u); +x_24 = lean_nat_sub(x_20, x_23); +lean_dec(x_20); +x_25 = l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__5(x_1, x_22, x_24, x_2, x_3, x_4, x_5, x_18); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_25; +} +} +else +{ +uint8_t x_26; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_26 = !lean_is_exclusive(x_7); +if (x_26 == 0) +{ +return x_7; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_7, 0); +x_28 = lean_ctor_get(x_7, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_7); +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_object* l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -uint8_t x_10; lean_object* x_11; -x_10 = lean_unbox(x_1); +uint8_t x_5; lean_object* x_6; +x_5 = l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); -x_11 = l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__2(x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -lean_dec(x_8); +x_6 = lean_box(x_5); +return x_6; +} +} +lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___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) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -return x_11; +lean_dec(x_4); +return x_9; } } -lean_object* l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___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, lean_object* x_9, lean_object* x_10) { +lean_object* l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_6; +x_5 = l_Array_anyRangeMAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__4(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_6 = lean_box(x_5); +return x_6; +} +} +lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__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) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_isNonTrivialProof___spec__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +return x_9; +} +} +static lean_object* _init_l_Lean_Meta_AbstractNestedProofs_State_nextIdx___default() { +_start: +{ +lean_object* x_1; +x_1 = lean_unsigned_to_nat(1u); +return x_1; +} +} +lean_object* l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___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, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; uint8_t x_12; @@ -397,7 +502,7 @@ return x_20; } } } -lean_object* l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___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* l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___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) { _start: { lean_object* x_11; @@ -450,7 +555,7 @@ return x_20; } } } -static lean_object* _init_l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__1() { +static lean_object* _init_l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__1() { _start: { lean_object* x_1; @@ -458,17 +563,17 @@ x_1 = lean_mk_string("proof"); return x_1; } } -static lean_object* _init_l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__2() { +static lean_object* _init_l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__1; +x_2 = l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma(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* l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma(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; 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; @@ -478,9 +583,9 @@ lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); -x_13 = l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__2; +x_13 = l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__2; x_14 = l_Lean_Name_append___main(x_2, x_13); -x_15 = l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___spec__1(x_14, x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_12); +x_15 = l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___spec__1(x_14, x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_12); x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); @@ -499,15 +604,15 @@ x_23 = lean_st_ref_set(x_4, x_22, x_20); x_24 = lean_ctor_get(x_23, 1); lean_inc(x_24); lean_dec(x_23); -x_25 = l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___spec__2(x_16, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_24); +x_25 = l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___spec__2(x_16, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_24); return x_25; } } -lean_object* l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; -x_11 = l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_11 = l_Lean_mkAuxName___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -518,29 +623,388 @@ lean_dec(x_3); return x_11; } } -lean_object* l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; -x_11 = l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_11 = l_Lean_Meta_mkAuxDefinitionFor___at___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); return x_11; } } -lean_object* l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___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* l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___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___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +x_10 = l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_10; } } -lean_object* l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___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, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_Meta_AbstractNestedProofs_visit_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; lean_object* x_5; +lean_dec(x_2); +x_4 = lean_box(0); +x_5 = lean_apply_1(x_3, x_4); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_3); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_apply_1(x_2, x_6); +return x_7; +} +} +} +lean_object* l_Lean_Meta_AbstractNestedProofs_visit_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractNestedProofs_visit_match__1___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_AbstractNestedProofs_visit_match__2___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: +{ +switch (lean_obj_tag(x_1)) { +case 5: +{ +lean_object* x_9; lean_object* x_10; uint64_t x_11; lean_object* x_12; lean_object* x_13; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_9 = lean_ctor_get(x_1, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +x_11 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); +lean_dec(x_1); +x_12 = lean_box_uint64(x_11); +x_13 = lean_apply_3(x_7, x_9, x_10, x_12); +return x_13; +} +case 6: +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; uint64_t x_17; lean_object* x_18; lean_object* x_19; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_14 = lean_ctor_get(x_1, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_1, 1); +lean_inc(x_15); +x_16 = lean_ctor_get(x_1, 2); +lean_inc(x_16); +x_17 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); +lean_dec(x_1); +x_18 = lean_box_uint64(x_17); +x_19 = lean_apply_4(x_2, x_14, x_15, x_16, x_18); +return x_19; +} +case 7: +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; uint64_t x_23; lean_object* x_24; lean_object* x_25; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +x_20 = lean_ctor_get(x_1, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_1, 1); +lean_inc(x_21); +x_22 = lean_ctor_get(x_1, 2); +lean_inc(x_22); +x_23 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); +lean_dec(x_1); +x_24 = lean_box_uint64(x_23); +x_25 = lean_apply_4(x_4, x_20, x_21, x_22, x_24); +return x_25; +} +case 8: +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint64_t x_30; lean_object* x_31; lean_object* x_32; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_26 = lean_ctor_get(x_1, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_1, 1); +lean_inc(x_27); +x_28 = lean_ctor_get(x_1, 2); +lean_inc(x_28); +x_29 = lean_ctor_get(x_1, 3); +lean_inc(x_29); +x_30 = lean_ctor_get_uint64(x_1, sizeof(void*)*4); +lean_dec(x_1); +x_31 = lean_box_uint64(x_30); +x_32 = lean_apply_5(x_3, x_26, x_27, x_28, x_29, x_31); +return x_32; +} +case 10: +{ +lean_object* x_33; lean_object* x_34; uint64_t x_35; lean_object* x_36; lean_object* x_37; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_33 = lean_ctor_get(x_1, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_1, 1); +lean_inc(x_34); +x_35 = lean_ctor_get_uint64(x_1, sizeof(void*)*2); +lean_dec(x_1); +x_36 = lean_box_uint64(x_35); +x_37 = lean_apply_3(x_5, x_33, x_34, x_36); +return x_37; +} +case 11: +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; uint64_t x_41; lean_object* x_42; lean_object* x_43; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_38 = lean_ctor_get(x_1, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_1, 1); +lean_inc(x_39); +x_40 = lean_ctor_get(x_1, 2); +lean_inc(x_40); +x_41 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); +lean_dec(x_1); +x_42 = lean_box_uint64(x_41); +x_43 = lean_apply_4(x_6, x_38, x_39, x_40, x_42); +return x_43; +} +default: +{ +lean_object* x_44; +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_44 = lean_apply_1(x_8, x_1); +return x_44; +} +} +} +} +lean_object* l_Lean_Meta_AbstractNestedProofs_visit_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractNestedProofs_visit_match__2___rarg), 8, 0); +return x_2; +} +} +lean_object* l_Array_umapMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___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, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; uint8_t x_12; +x_11 = lean_array_get_size(x_2); +x_12 = lean_nat_dec_lt(x_1, x_11); +lean_dec(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; +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_1); +x_13 = x_2; +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_10); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_15 = lean_array_fget(x_2, x_1); +x_16 = lean_unsigned_to_nat(0u); +x_17 = lean_array_fset(x_2, x_1, x_16); +x_18 = x_15; +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_19 = l_Lean_Meta_AbstractNestedProofs_visit(x_18, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +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 = lean_unsigned_to_nat(1u); +x_23 = lean_nat_add(x_1, x_22); +x_24 = x_20; +x_25 = lean_array_fset(x_17, x_1, x_24); +lean_dec(x_1); +x_1 = x_23; +x_2 = x_25; +x_10 = x_21; +goto _start; +} +else +{ +uint8_t x_27; +lean_dec(x_17); +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_1); +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; +} +} +} +} +} +lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_visit___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: +{ +if (lean_obj_tag(x_1) == 5) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_12 = lean_ctor_get(x_1, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_1, 1); +lean_inc(x_13); +lean_dec(x_1); +x_14 = lean_array_set(x_2, x_3, x_13); +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_sub(x_3, x_15); +lean_dec(x_3); +x_1 = x_12; +x_2 = x_14; +x_3 = x_16; +goto _start; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_dec(x_3); +x_18 = x_2; +x_19 = lean_unsigned_to_nat(0u); +x_20 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___spec__1), 10, 2); +lean_closure_set(x_20, 0, x_19); +lean_closure_set(x_20, 1, x_18); +x_21 = x_20; +x_22 = lean_apply_8(x_21, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_22) == 0) +{ +uint8_t x_23; +x_23 = !lean_is_exclusive(x_22); +if (x_23 == 0) +{ +lean_object* x_24; lean_object* x_25; +x_24 = lean_ctor_get(x_22, 0); +x_25 = l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(x_24, x_24, x_19, x_1); +lean_dec(x_24); +lean_ctor_set(x_22, 0, x_25); +return x_22; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_26 = lean_ctor_get(x_22, 0); +x_27 = lean_ctor_get(x_22, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_22); +x_28 = l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(x_26, x_26, x_19, x_1); +lean_dec(x_26); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_27); +return x_29; +} +} +else +{ +uint8_t x_30; +lean_dec(x_1); +x_30 = !lean_is_exclusive(x_22); +if (x_30 == 0) +{ +return x_22; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_22, 0); +x_32 = lean_ctor_get(x_22, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_22); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; +} +} +} +} +} +lean_object* l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___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) { _start: { uint8_t x_11; @@ -751,7 +1215,7 @@ return x_76; } } } -lean_object* l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__2___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) { +lean_object* l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___spec__4___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; @@ -806,15 +1270,15 @@ return x_18; } } } -lean_object* l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__2(lean_object* x_1, lean_object* x_2) { +lean_object* l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___spec__4(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_AbstractNestedProofs_visit___main___spec__2___rarg), 10, 0); +x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___spec__4___rarg), 10, 0); return x_3; } } -lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; @@ -826,15 +1290,15 @@ lean_ctor_set(x_7, 1, x_5); return x_7; } } -lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3___rarg___boxed), 5, 0); +x_4 = lean_alloc_closure((void*)(l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5___rarg___boxed), 5, 0); return x_4; } } -lean_object* l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___main___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* l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___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) { _start: { lean_object* x_10; lean_object* x_11; @@ -864,306 +1328,336 @@ return x_14; } } } -lean_object* l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___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) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7___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: { -lean_object* x_13; uint8_t x_14; -x_13 = lean_array_get_size(x_2); -x_14 = lean_nat_dec_lt(x_3, x_13); +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_2, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_2, 1); +lean_inc(x_13); +lean_inc(x_2); +x_14 = lean_local_ctx_find(x_2, x_1); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_dec(x_13); -if (x_14 == 0) -{ -lean_object* x_15; -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); +lean_dec(x_12); lean_dec(x_3); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_4); -lean_ctor_set(x_15, 1, x_12); -return x_15; +x_15 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_15, 0, x_2); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_11); +return x_16; } else { -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_51; -x_16 = lean_array_fget(x_2, x_3); -x_17 = lean_unsigned_to_nat(1u); -x_18 = lean_nat_add(x_3, x_17); -lean_dec(x_3); -x_19 = l_Lean_Expr_fvarId_x21(x_16); -lean_dec(x_16); -lean_inc(x_8); -lean_inc(x_19); -x_51 = l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__4(x_19, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -if (lean_obj_tag(x_51) == 0) +uint8_t x_17; +x_17 = !lean_is_exclusive(x_2); +if (x_17 == 0) { -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_52 = lean_ctor_get(x_51, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_51, 1); -lean_inc(x_53); -lean_dec(x_51); -x_54 = l_Lean_LocalDecl_type(x_52); -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_5); -x_55 = l_Lean_Meta_AbstractNestedProofs_visit___main(x_54, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_53); -if (lean_obj_tag(x_55) == 0) -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_56 = lean_ctor_get(x_55, 0); -lean_inc(x_56); -x_57 = lean_ctor_get(x_55, 1); -lean_inc(x_57); -lean_dec(x_55); -x_58 = l_Lean_LocalDecl_setType(x_52, x_56); -x_59 = l_Lean_LocalDecl_value_x3f(x_58); -if (lean_obj_tag(x_59) == 0) -{ -x_20 = x_58; -x_21 = x_57; -goto block_50; -} -else -{ -lean_object* x_60; lean_object* x_61; -x_60 = lean_ctor_get(x_59, 0); -lean_inc(x_60); -lean_dec(x_59); -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_5); -x_61 = l_Lean_Meta_AbstractNestedProofs_visit___main(x_60, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_57); -if (lean_obj_tag(x_61) == 0) -{ -lean_object* x_62; lean_object* x_63; lean_object* x_64; -x_62 = lean_ctor_get(x_61, 0); -lean_inc(x_62); -x_63 = lean_ctor_get(x_61, 1); -lean_inc(x_63); -lean_dec(x_61); -x_64 = l_Lean_LocalDecl_setValue(x_58, x_62); -x_20 = x_64; -x_21 = x_63; -goto block_50; -} -else -{ -uint8_t x_65; -lean_dec(x_58); -lean_dec(x_19); +lean_object* x_18; lean_object* x_19; uint8_t x_20; +x_18 = lean_ctor_get(x_2, 1); lean_dec(x_18); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_65 = !lean_is_exclusive(x_61); -if (x_65 == 0) -{ -return x_61; -} -else -{ -lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_66 = lean_ctor_get(x_61, 0); -x_67 = lean_ctor_get(x_61, 1); -lean_inc(x_67); -lean_inc(x_66); -lean_dec(x_61); -x_68 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_68, 0, x_66); -lean_ctor_set(x_68, 1, x_67); -return x_68; -} -} -} -} -else -{ -uint8_t x_69; -lean_dec(x_52); +x_19 = lean_ctor_get(x_2, 0); lean_dec(x_19); -lean_dec(x_18); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_69 = !lean_is_exclusive(x_55); -if (x_69 == 0) +x_20 = !lean_is_exclusive(x_14); +if (x_20 == 0) { -return x_55; -} -else -{ -lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_70 = lean_ctor_get(x_55, 0); -x_71 = lean_ctor_get(x_55, 1); -lean_inc(x_71); -lean_inc(x_70); -lean_dec(x_55); -x_72 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_72, 0, x_70); -lean_ctor_set(x_72, 1, x_71); -return x_72; -} -} -} -else -{ -uint8_t x_73; -lean_dec(x_19); -lean_dec(x_18); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_73 = !lean_is_exclusive(x_51); -if (x_73 == 0) -{ -return x_51; -} -else -{ -lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_74 = lean_ctor_get(x_51, 0); -x_75 = lean_ctor_get(x_51, 1); -lean_inc(x_75); -lean_inc(x_74); -lean_dec(x_51); -x_76 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_76, 0, x_74); -lean_ctor_set(x_76, 1, x_75); -return x_76; -} -} -block_50: -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_22 = lean_ctor_get(x_4, 0); -lean_inc(x_22); -x_23 = lean_ctor_get(x_4, 1); -lean_inc(x_23); -lean_inc(x_4); -x_24 = lean_local_ctx_find(x_4, x_19); -if (lean_obj_tag(x_24) == 0) -{ -lean_dec(x_23); -lean_dec(x_22); -lean_dec(x_20); -x_3 = x_18; -x_12 = x_21; -goto _start; -} -else -{ -uint8_t x_26; -x_26 = !lean_is_exclusive(x_4); -if (x_26 == 0) -{ -lean_object* x_27; lean_object* x_28; uint8_t x_29; -x_27 = lean_ctor_get(x_4, 1); -lean_dec(x_27); -x_28 = lean_ctor_get(x_4, 0); -lean_dec(x_28); -x_29 = !lean_is_exclusive(x_24); -if (x_29 == 0) -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_30 = lean_ctor_get(x_24, 0); -lean_dec(x_30); -x_31 = l_Lean_LocalDecl_fvarId(x_20); -lean_inc(x_20); -x_32 = l_Std_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_22, x_31, x_20); -x_33 = l_Lean_LocalDecl_index(x_20); -lean_ctor_set(x_24, 0, x_20); -x_34 = l_Std_PersistentArray_set___rarg(x_23, x_33, x_24); -lean_dec(x_33); -lean_ctor_set(x_4, 1, x_34); -lean_ctor_set(x_4, 0, x_32); -x_3 = x_18; -x_12 = x_21; -goto _start; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +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; +x_21 = lean_ctor_get(x_14, 0); +lean_dec(x_21); +x_22 = l_Lean_LocalDecl_fvarId(x_3); +lean_inc(x_3); +x_23 = l_Std_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_12, x_22, x_3); +x_24 = l_Lean_LocalDecl_index(x_3); +lean_ctor_set(x_14, 0, x_3); +x_25 = l_Std_PersistentArray_set___rarg(x_13, x_24, x_14); lean_dec(x_24); -x_36 = l_Lean_LocalDecl_fvarId(x_20); -lean_inc(x_20); -x_37 = l_Std_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_22, x_36, x_20); -x_38 = l_Lean_LocalDecl_index(x_20); -x_39 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_39, 0, x_20); -x_40 = l_Std_PersistentArray_set___rarg(x_23, x_38, x_39); -lean_dec(x_38); -lean_ctor_set(x_4, 1, x_40); -lean_ctor_set(x_4, 0, x_37); -x_3 = x_18; -x_12 = x_21; -goto _start; +lean_ctor_set(x_2, 1, x_25); +lean_ctor_set(x_2, 0, x_23); +x_26 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_26, 0, x_2); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_11); +return x_27; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +lean_dec(x_14); +x_28 = l_Lean_LocalDecl_fvarId(x_3); +lean_inc(x_3); +x_29 = l_Std_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_12, x_28, x_3); +x_30 = l_Lean_LocalDecl_index(x_3); +x_31 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_31, 0, x_3); +x_32 = l_Std_PersistentArray_set___rarg(x_13, x_30, x_31); +lean_dec(x_30); +lean_ctor_set(x_2, 1, x_32); +lean_ctor_set(x_2, 0, x_29); +x_33 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_33, 0, x_2); +x_34 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_34, 0, x_33); +lean_ctor_set(x_34, 1, x_11); +return x_34; } } else { -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -lean_dec(x_4); -if (lean_is_exclusive(x_24)) { - lean_ctor_release(x_24, 0); - x_42 = x_24; +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +lean_dec(x_2); +if (lean_is_exclusive(x_14)) { + lean_ctor_release(x_14, 0); + x_35 = x_14; } else { - lean_dec_ref(x_24); - x_42 = lean_box(0); + lean_dec_ref(x_14); + x_35 = lean_box(0); } -x_43 = l_Lean_LocalDecl_fvarId(x_20); -lean_inc(x_20); -x_44 = l_Std_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_22, x_43, x_20); -x_45 = l_Lean_LocalDecl_index(x_20); -if (lean_is_scalar(x_42)) { - x_46 = lean_alloc_ctor(1, 1, 0); +x_36 = l_Lean_LocalDecl_fvarId(x_3); +lean_inc(x_3); +x_37 = l_Std_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_12, x_36, x_3); +x_38 = l_Lean_LocalDecl_index(x_3); +if (lean_is_scalar(x_35)) { + x_39 = lean_alloc_ctor(1, 1, 0); } else { - x_46 = x_42; + x_39 = x_35; } -lean_ctor_set(x_46, 0, x_20); -x_47 = l_Std_PersistentArray_set___rarg(x_23, x_45, x_46); -lean_dec(x_45); -x_48 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_48, 0, x_44); -lean_ctor_set(x_48, 1, x_47); -x_3 = x_18; -x_4 = x_48; -x_12 = x_21; +lean_ctor_set(x_39, 0, x_3); +x_40 = l_Std_PersistentArray_set___rarg(x_13, x_38, x_39); +lean_dec(x_38); +x_41 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_41, 0, x_37); +lean_ctor_set(x_41, 1, x_40); +x_42 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_42, 0, x_41); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_11); +return x_43; +} +} +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7(lean_object* x_1, size_t x_2, size_t 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: +{ +uint8_t x_13; +x_13 = x_3 < x_2; +if (x_13 == 0) +{ +lean_object* x_14; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_4); +lean_ctor_set(x_14, 1, x_12); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_array_uget(x_1, x_3); +x_16 = l_Lean_Expr_fvarId_x21(x_15); +lean_dec(x_15); +lean_inc(x_8); +lean_inc(x_16); +x_17 = l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___spec__6(x_16, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +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 = l_Lean_LocalDecl_type(x_18); +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_5); +x_21 = l_Lean_Meta_AbstractNestedProofs_visit(x_20, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_19); +if (lean_obj_tag(x_21) == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_21, 1); +lean_inc(x_23); +lean_dec(x_21); +x_24 = l_Lean_LocalDecl_setType(x_18, x_22); +x_25 = l_Lean_LocalDecl_value_x3f(x_24); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; size_t x_30; size_t x_31; +x_26 = l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7___lambda__1(x_16, x_4, x_24, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_23); +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 = lean_ctor_get(x_27, 0); +lean_inc(x_29); +lean_dec(x_27); +x_30 = 1; +x_31 = x_3 + x_30; +x_3 = x_31; +x_4 = x_29; +x_12 = x_28; goto _start; } +else +{ +lean_object* x_33; lean_object* x_34; +x_33 = lean_ctor_get(x_25, 0); +lean_inc(x_33); +lean_dec(x_25); +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_5); +x_34 = l_Lean_Meta_AbstractNestedProofs_visit(x_33, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_23); +if (lean_obj_tag(x_34) == 0) +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; size_t x_42; size_t x_43; +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_LocalDecl_setValue(x_24, x_35); +x_38 = l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7___lambda__1(x_16, x_4, x_37, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_36); +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_38, 1); +lean_inc(x_40); +lean_dec(x_38); +x_41 = lean_ctor_get(x_39, 0); +lean_inc(x_41); +lean_dec(x_39); +x_42 = 1; +x_43 = x_3 + x_42; +x_3 = x_43; +x_4 = x_41; +x_12 = x_40; +goto _start; +} +else +{ +uint8_t x_45; +lean_dec(x_24); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_45 = !lean_is_exclusive(x_34); +if (x_45 == 0) +{ +return x_34; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_34, 0); +x_47 = lean_ctor_get(x_34, 1); +lean_inc(x_47); +lean_inc(x_46); +lean_dec(x_34); +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_18); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_49 = !lean_is_exclusive(x_21); +if (x_49 == 0) +{ +return x_21; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_21, 0); +x_51 = lean_ctor_get(x_21, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_21); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +else +{ +uint8_t x_53; +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_53 = !lean_is_exclusive(x_17); +if (x_53 == 0) +{ +return x_17; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_17, 0); +x_55 = lean_ctor_get(x_17, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_17); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; } } } } } -lean_object* l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__6___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, lean_object* x_11) { +lean_object* l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___spec__8___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, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_13; @@ -1215,15 +1709,15 @@ return x_21; } } } -lean_object* l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__6(lean_object* x_1) { +lean_object* l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___spec__8(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__6___rarg), 11, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___spec__8___rarg), 11, 0); return x_2; } } -lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9___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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; @@ -1231,11 +1725,11 @@ x_12 = lean_apply_10(x_1, x_5, x_6, x_2, x_3, x_4, x_7, x_8, x_9, x_10, x_11); return x_12; } } -lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__7___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) { +lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___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; uint8_t x_12; lean_object* x_13; -x_11 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__7___rarg___lambda__1), 11, 4); +x_11 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9___rarg___lambda__1), 11, 4); lean_closure_set(x_11, 0, x_2); lean_closure_set(x_11, 1, x_3); lean_closure_set(x_11, 2, x_4); @@ -1288,192 +1782,15 @@ return x_21; } } } -lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__7(lean_object* x_1) { +lean_object* l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__7___rarg), 10, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9___rarg), 10, 0); return x_2; } } -lean_object* l_Array_umapMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__8(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; uint8_t x_12; -x_11 = lean_array_get_size(x_2); -x_12 = lean_nat_dec_lt(x_1, x_11); -lean_dec(x_11); -if (x_12 == 0) -{ -lean_object* x_13; lean_object* x_14; -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_1); -x_13 = x_2; -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_10); -return x_14; -} -else -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_15 = lean_array_fget(x_2, x_1); -x_16 = lean_unsigned_to_nat(0u); -x_17 = lean_array_fset(x_2, x_1, x_16); -x_18 = x_15; -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -x_19 = l_Lean_Meta_AbstractNestedProofs_visit___main(x_18, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; -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 = lean_unsigned_to_nat(1u); -x_23 = lean_nat_add(x_1, x_22); -x_24 = x_20; -x_25 = lean_array_fset(x_17, x_1, x_24); -lean_dec(x_1); -x_1 = x_23; -x_2 = x_25; -x_10 = x_21; -goto _start; -} -else -{ -uint8_t x_27; -lean_dec(x_17); -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_1); -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; -} -} -} -} -} -lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__9(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_1) == 5) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_12 = lean_ctor_get(x_1, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_1, 1); -lean_inc(x_13); -lean_dec(x_1); -x_14 = lean_array_set(x_2, x_3, x_13); -x_15 = lean_unsigned_to_nat(1u); -x_16 = lean_nat_sub(x_3, x_15); -lean_dec(x_3); -x_1 = x_12; -x_2 = x_14; -x_3 = x_16; -goto _start; -} -else -{ -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -lean_dec(x_3); -x_18 = x_2; -x_19 = lean_unsigned_to_nat(0u); -x_20 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__8), 10, 2); -lean_closure_set(x_20, 0, x_19); -lean_closure_set(x_20, 1, x_18); -x_21 = x_20; -x_22 = lean_apply_8(x_21, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_22) == 0) -{ -uint8_t x_23; -x_23 = !lean_is_exclusive(x_22); -if (x_23 == 0) -{ -lean_object* x_24; lean_object* x_25; -x_24 = lean_ctor_get(x_22, 0); -x_25 = l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(x_24, x_24, x_19, x_1); -lean_dec(x_24); -lean_ctor_set(x_22, 0, x_25); -return x_22; -} -else -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_26 = lean_ctor_get(x_22, 0); -x_27 = lean_ctor_get(x_22, 1); -lean_inc(x_27); -lean_inc(x_26); -lean_dec(x_22); -x_28 = l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(x_26, x_26, x_19, x_1); -lean_dec(x_26); -x_29 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_29, 0, x_28); -lean_ctor_set(x_29, 1, x_27); -return x_29; -} -} -else -{ -uint8_t x_30; -lean_dec(x_1); -x_30 = !lean_is_exclusive(x_22); -if (x_30 == 0) -{ -return x_22; -} -else -{ -lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_22, 0); -x_32 = lean_ctor_get(x_22, 1); -lean_inc(x_32); -lean_inc(x_31); -lean_dec(x_22); -x_33 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_32); -return x_33; -} -} -} -} -} -lean_object* l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__10(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* l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___spec__10(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; @@ -1683,310 +2000,11 @@ return x_75; } } } -lean_object* l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___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) { -_start: -{ -lean_object* x_13; uint8_t x_14; -x_13 = lean_array_get_size(x_2); -x_14 = lean_nat_dec_lt(x_3, x_13); -lean_dec(x_13); -if (x_14 == 0) -{ -lean_object* x_15; -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_4); -lean_ctor_set(x_15, 1, x_12); -return x_15; -} -else -{ -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_51; -x_16 = lean_array_fget(x_2, x_3); -x_17 = lean_unsigned_to_nat(1u); -x_18 = lean_nat_add(x_3, x_17); -lean_dec(x_3); -x_19 = l_Lean_Expr_fvarId_x21(x_16); -lean_dec(x_16); -lean_inc(x_8); -lean_inc(x_19); -x_51 = l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__4(x_19, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -if (lean_obj_tag(x_51) == 0) -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_52 = lean_ctor_get(x_51, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_51, 1); -lean_inc(x_53); -lean_dec(x_51); -x_54 = l_Lean_LocalDecl_type(x_52); -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_5); -x_55 = l_Lean_Meta_AbstractNestedProofs_visit___main(x_54, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_53); -if (lean_obj_tag(x_55) == 0) -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_56 = lean_ctor_get(x_55, 0); -lean_inc(x_56); -x_57 = lean_ctor_get(x_55, 1); -lean_inc(x_57); -lean_dec(x_55); -x_58 = l_Lean_LocalDecl_setType(x_52, x_56); -x_59 = l_Lean_LocalDecl_value_x3f(x_58); -if (lean_obj_tag(x_59) == 0) -{ -x_20 = x_58; -x_21 = x_57; -goto block_50; -} -else -{ -lean_object* x_60; lean_object* x_61; -x_60 = lean_ctor_get(x_59, 0); -lean_inc(x_60); -lean_dec(x_59); -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_5); -x_61 = l_Lean_Meta_AbstractNestedProofs_visit___main(x_60, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_57); -if (lean_obj_tag(x_61) == 0) -{ -lean_object* x_62; lean_object* x_63; lean_object* x_64; -x_62 = lean_ctor_get(x_61, 0); -lean_inc(x_62); -x_63 = lean_ctor_get(x_61, 1); -lean_inc(x_63); -lean_dec(x_61); -x_64 = l_Lean_LocalDecl_setValue(x_58, x_62); -x_20 = x_64; -x_21 = x_63; -goto block_50; -} -else -{ -uint8_t x_65; -lean_dec(x_58); -lean_dec(x_19); -lean_dec(x_18); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_65 = !lean_is_exclusive(x_61); -if (x_65 == 0) -{ -return x_61; -} -else -{ -lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_66 = lean_ctor_get(x_61, 0); -x_67 = lean_ctor_get(x_61, 1); -lean_inc(x_67); -lean_inc(x_66); -lean_dec(x_61); -x_68 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_68, 0, x_66); -lean_ctor_set(x_68, 1, x_67); -return x_68; -} -} -} -} -else -{ -uint8_t x_69; -lean_dec(x_52); -lean_dec(x_19); -lean_dec(x_18); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_69 = !lean_is_exclusive(x_55); -if (x_69 == 0) -{ -return x_55; -} -else -{ -lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_70 = lean_ctor_get(x_55, 0); -x_71 = lean_ctor_get(x_55, 1); -lean_inc(x_71); -lean_inc(x_70); -lean_dec(x_55); -x_72 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_72, 0, x_70); -lean_ctor_set(x_72, 1, x_71); -return x_72; -} -} -} -else -{ -uint8_t x_73; -lean_dec(x_19); -lean_dec(x_18); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_73 = !lean_is_exclusive(x_51); -if (x_73 == 0) -{ -return x_51; -} -else -{ -lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_74 = lean_ctor_get(x_51, 0); -x_75 = lean_ctor_get(x_51, 1); -lean_inc(x_75); -lean_inc(x_74); -lean_dec(x_51); -x_76 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_76, 0, x_74); -lean_ctor_set(x_76, 1, x_75); -return x_76; -} -} -block_50: -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_22 = lean_ctor_get(x_4, 0); -lean_inc(x_22); -x_23 = lean_ctor_get(x_4, 1); -lean_inc(x_23); -lean_inc(x_4); -x_24 = lean_local_ctx_find(x_4, x_19); -if (lean_obj_tag(x_24) == 0) -{ -lean_dec(x_23); -lean_dec(x_22); -lean_dec(x_20); -x_3 = x_18; -x_12 = x_21; -goto _start; -} -else -{ -uint8_t x_26; -x_26 = !lean_is_exclusive(x_4); -if (x_26 == 0) -{ -lean_object* x_27; lean_object* x_28; uint8_t x_29; -x_27 = lean_ctor_get(x_4, 1); -lean_dec(x_27); -x_28 = lean_ctor_get(x_4, 0); -lean_dec(x_28); -x_29 = !lean_is_exclusive(x_24); -if (x_29 == 0) -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_30 = lean_ctor_get(x_24, 0); -lean_dec(x_30); -x_31 = l_Lean_LocalDecl_fvarId(x_20); -lean_inc(x_20); -x_32 = l_Std_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_22, x_31, x_20); -x_33 = l_Lean_LocalDecl_index(x_20); -lean_ctor_set(x_24, 0, x_20); -x_34 = l_Std_PersistentArray_set___rarg(x_23, x_33, x_24); -lean_dec(x_33); -lean_ctor_set(x_4, 1, x_34); -lean_ctor_set(x_4, 0, x_32); -x_3 = x_18; -x_12 = x_21; -goto _start; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -lean_dec(x_24); -x_36 = l_Lean_LocalDecl_fvarId(x_20); -lean_inc(x_20); -x_37 = l_Std_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_22, x_36, x_20); -x_38 = l_Lean_LocalDecl_index(x_20); -x_39 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_39, 0, x_20); -x_40 = l_Std_PersistentArray_set___rarg(x_23, x_38, x_39); -lean_dec(x_38); -lean_ctor_set(x_4, 1, x_40); -lean_ctor_set(x_4, 0, x_37); -x_3 = x_18; -x_12 = x_21; -goto _start; -} -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -lean_dec(x_4); -if (lean_is_exclusive(x_24)) { - lean_ctor_release(x_24, 0); - x_42 = x_24; -} else { - lean_dec_ref(x_24); - x_42 = lean_box(0); -} -x_43 = l_Lean_LocalDecl_fvarId(x_20); -lean_inc(x_20); -x_44 = l_Std_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_22, x_43, x_20); -x_45 = l_Lean_LocalDecl_index(x_20); -if (lean_is_scalar(x_42)) { - x_46 = lean_alloc_ctor(1, 1, 0); -} else { - x_46 = x_42; -} -lean_ctor_set(x_46, 0, x_20); -x_47 = l_Std_PersistentArray_set___rarg(x_23, x_45, x_46); -lean_dec(x_45); -x_48 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_48, 0, x_44); -lean_ctor_set(x_48, 1, x_47); -x_3 = x_18; -x_4 = x_48; -x_12 = x_21; -goto _start; -} -} -} -} -} -} -lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___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, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__11___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_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__7___rarg___lambda__1), 11, 4); +x_11 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9___rarg___lambda__1), 11, 4); lean_closure_set(x_11, 0, x_2); lean_closure_set(x_11, 1, x_3); lean_closure_set(x_11, 2, x_4); @@ -2038,27 +2056,27 @@ return x_20; } } } -lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__12(lean_object* x_1) { +lean_object* l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__11(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__12___rarg), 10, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__11___rarg), 10, 0); return x_2; } } -lean_object* l_Lean_Meta_AbstractNestedProofs_visit___main___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* l_Lean_Meta_AbstractNestedProofs_visit___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_11; lean_object* x_12; 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; -x_11 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractNestedProofs_visit___main), 9, 1); +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; size_t x_19; size_t x_20; lean_object* x_21; +x_11 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractNestedProofs_visit), 9, 1); lean_closure_set(x_11, 0, x_2); lean_inc(x_1); -x_12 = lean_alloc_closure((void*)(l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__1___boxed), 10, 1); +x_12 = lean_alloc_closure((void*)(l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___spec__3___boxed), 10, 1); lean_closure_set(x_12, 0, x_1); -x_13 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__2___rarg), 10, 2); +x_13 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___spec__4___rarg), 10, 2); lean_closure_set(x_13, 0, x_11); lean_closure_set(x_13, 1, x_12); -x_14 = l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3___rarg(x_6, x_7, x_8, x_9, x_10); +x_14 = l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5___rarg(x_6, x_7, x_8, x_9, x_10); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_14, 1); @@ -2066,7 +2084,10 @@ lean_inc(x_16); lean_dec(x_14); x_17 = lean_ctor_get(x_6, 1); lean_inc(x_17); -x_18 = lean_unsigned_to_nat(0u); +x_18 = lean_array_get_size(x_1); +x_19 = lean_usize_of_nat(x_18); +lean_dec(x_18); +x_20 = 0; lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); @@ -2074,22 +2095,22 @@ lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); -x_19 = l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__5(x_1, x_1, x_18, x_17, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_16); +x_21 = l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7(x_1, x_19, x_20, x_17, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_16); lean_dec(x_1); -if (lean_obj_tag(x_19) == 0) +if (lean_obj_tag(x_21) == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; -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 = l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__6___rarg(x_20, x_15, x_13, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_21); -return x_22; +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_21, 1); +lean_inc(x_23); +lean_dec(x_21); +x_24 = l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___spec__8___rarg(x_22, x_15, x_13, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_23); +return x_24; } else { -uint8_t x_23; +uint8_t x_25; lean_dec(x_15); lean_dec(x_13); lean_dec(x_9); @@ -2099,40 +2120,40 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -x_23 = !lean_is_exclusive(x_19); -if (x_23 == 0) +x_25 = !lean_is_exclusive(x_21); +if (x_25 == 0) { -return x_19; +return x_21; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_19, 0); -x_25 = lean_ctor_get(x_19, 1); -lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_19); -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_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_21, 0); +x_27 = lean_ctor_get(x_21, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_21); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; } } } } -lean_object* l_Lean_Meta_AbstractNestedProofs_visit___main___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_Meta_AbstractNestedProofs_visit___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_11; lean_object* x_12; 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; -x_11 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractNestedProofs_visit___main), 9, 1); +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; size_t x_19; size_t x_20; lean_object* x_21; +x_11 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractNestedProofs_visit), 9, 1); lean_closure_set(x_11, 0, x_2); lean_inc(x_1); -x_12 = lean_alloc_closure((void*)(l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__10___boxed), 10, 1); +x_12 = lean_alloc_closure((void*)(l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___spec__10___boxed), 10, 1); lean_closure_set(x_12, 0, x_1); -x_13 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__2___rarg), 10, 2); +x_13 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_AbstractNestedProofs_visit___spec__4___rarg), 10, 2); lean_closure_set(x_13, 0, x_11); lean_closure_set(x_13, 1, x_12); -x_14 = l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3___rarg(x_6, x_7, x_8, x_9, x_10); +x_14 = l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5___rarg(x_6, x_7, x_8, x_9, x_10); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_ctor_get(x_14, 1); @@ -2140,7 +2161,10 @@ lean_inc(x_16); lean_dec(x_14); x_17 = lean_ctor_get(x_6, 1); lean_inc(x_17); -x_18 = lean_unsigned_to_nat(0u); +x_18 = lean_array_get_size(x_1); +x_19 = lean_usize_of_nat(x_18); +lean_dec(x_18); +x_20 = 0; lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); @@ -2148,22 +2172,22 @@ lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); -x_19 = l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__11(x_1, x_1, x_18, x_17, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_16); +x_21 = l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7(x_1, x_19, x_20, x_17, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_16); lean_dec(x_1); -if (lean_obj_tag(x_19) == 0) +if (lean_obj_tag(x_21) == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; -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 = l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__6___rarg(x_20, x_15, x_13, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_21); -return x_22; +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_21, 1); +lean_inc(x_23); +lean_dec(x_21); +x_24 = l_Lean_Meta_withLCtx___at_Lean_Meta_AbstractNestedProofs_visit___spec__8___rarg(x_22, x_15, x_13, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_23); +return x_24; } else { -uint8_t x_23; +uint8_t x_25; lean_dec(x_15); lean_dec(x_13); lean_dec(x_9); @@ -2173,791 +2197,1120 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -x_23 = !lean_is_exclusive(x_19); -if (x_23 == 0) +x_25 = !lean_is_exclusive(x_21); +if (x_25 == 0) { -return x_19; +return x_21; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_19, 0); -x_25 = lean_ctor_get(x_19, 1); -lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_19); -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_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_21, 0); +x_27 = lean_ctor_get(x_21, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_21); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; } } } } -static lean_object* _init_l_Lean_Meta_AbstractNestedProofs_visit___main___closed__1() { +static lean_object* _init_l_Lean_Meta_AbstractNestedProofs_visit___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractNestedProofs_visit___main___lambda__1), 10, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractNestedProofs_visit___lambda__1), 10, 0); return x_1; } } -static lean_object* _init_l_Lean_Meta_AbstractNestedProofs_visit___main___closed__2() { +static lean_object* _init_l_Lean_Meta_AbstractNestedProofs_visit___closed__2() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractNestedProofs_visit___main___lambda__2), 10, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_AbstractNestedProofs_visit___lambda__2), 10, 0); return x_1; } } -lean_object* l_Lean_Meta_AbstractNestedProofs_visit___main(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* l_Lean_Meta_AbstractNestedProofs_visit(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; uint8_t x_22; x_22 = l_Lean_Expr_isAtomic(x_1); if (x_22 == 0) { -lean_object* x_23; uint8_t x_24; -x_23 = lean_st_ref_get(x_3, x_9); -x_24 = !lean_is_exclusive(x_23); -if (x_24 == 0) -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_25 = lean_ctor_get(x_23, 0); -x_26 = lean_ctor_get(x_23, 1); -x_27 = l_Std_HashMapImp_find_x3f___at___private_Lean_MetavarContext_2__visit___spec__1(x_25, x_1); -lean_dec(x_25); -if (lean_obj_tag(x_27) == 0) -{ -lean_object* x_28; -lean_free_object(x_23); +lean_object* x_23; lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_1); -x_28 = l_Lean_Meta_AbstractNestedProofs_isNonTrivialProof(x_1, x_5, x_6, x_7, x_8, x_26); -if (lean_obj_tag(x_28) == 0) +x_23 = l_Lean_Meta_AbstractNestedProofs_isNonTrivialProof(x_1, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_23) == 0) { -lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_41; -x_29 = lean_ctor_get(x_28, 0); -lean_inc(x_29); -x_30 = lean_ctor_get(x_28, 1); -lean_inc(x_30); +lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +x_26 = lean_st_ref_get(x_3, x_25); +x_27 = !lean_is_exclusive(x_26); +if (x_27 == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_26, 0); +x_29 = lean_ctor_get(x_26, 1); +x_30 = l_Std_HashMapImp_find_x3f___at___private_Lean_MetavarContext_2__visit___spec__1(x_28, x_1); lean_dec(x_28); -x_41 = lean_unbox(x_29); -lean_dec(x_29); -if (x_41 == 0) +if (lean_obj_tag(x_30) == 0) +{ +uint8_t x_31; +lean_free_object(x_26); +x_31 = lean_unbox(x_24); +lean_dec(x_24); +if (x_31 == 0) { switch (lean_obj_tag(x_1)) { case 5: { -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_42 = lean_unsigned_to_nat(0u); -x_43 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_42); -x_44 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_43); -x_45 = lean_mk_array(x_43, x_44); -x_46 = lean_unsigned_to_nat(1u); -x_47 = lean_nat_sub(x_43, x_46); -lean_dec(x_43); +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; +x_32 = lean_unsigned_to_nat(0u); +x_33 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_32); +x_34 = l_Lean_Expr_getAppArgs___closed__1; +lean_inc(x_33); +x_35 = lean_mk_array(x_33, x_34); +x_36 = lean_unsigned_to_nat(1u); +x_37 = lean_nat_sub(x_33, x_36); +lean_dec(x_33); lean_inc(x_3); lean_inc(x_1); -x_48 = l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__9(x_1, x_45, x_47, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_30); -if (lean_obj_tag(x_48) == 0) +x_38 = l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_visit___spec__2(x_1, x_35, x_37, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_29); +if (lean_obj_tag(x_38) == 0) { -lean_object* x_49; lean_object* x_50; -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); -x_10 = x_49; -x_11 = x_50; -goto block_21; +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; uint8_t x_46; +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_38, 1); +lean_inc(x_40); +lean_dec(x_38); +x_41 = lean_st_ref_take(x_3, x_40); +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); +lean_inc(x_39); +x_44 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_42, x_1, x_39); +x_45 = lean_st_ref_set(x_3, x_44, x_43); +lean_dec(x_3); +x_46 = !lean_is_exclusive(x_45); +if (x_46 == 0) +{ +lean_object* x_47; +x_47 = lean_ctor_get(x_45, 0); +lean_dec(x_47); +lean_ctor_set(x_45, 0, x_39); +return x_45; } else { -uint8_t x_51; +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_45, 1); +lean_inc(x_48); +lean_dec(x_45); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_39); +lean_ctor_set(x_49, 1, x_48); +return x_49; +} +} +else +{ +uint8_t x_50; lean_dec(x_3); lean_dec(x_1); -x_51 = !lean_is_exclusive(x_48); -if (x_51 == 0) +x_50 = !lean_is_exclusive(x_38); +if (x_50 == 0) { -return x_48; +return x_38; } else { -lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_52 = lean_ctor_get(x_48, 0); -x_53 = lean_ctor_get(x_48, 1); -lean_inc(x_53); +lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_51 = lean_ctor_get(x_38, 0); +x_52 = lean_ctor_get(x_38, 1); lean_inc(x_52); -lean_dec(x_48); -x_54 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_54, 0, x_52); -lean_ctor_set(x_54, 1, x_53); -return x_54; +lean_inc(x_51); +lean_dec(x_38); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_51); +lean_ctor_set(x_53, 1, x_52); +return x_53; } } } case 6: { -lean_object* x_55; -x_55 = lean_box(0); -x_31 = x_55; -goto block_40; +lean_object* x_54; lean_object* x_55; +x_54 = l_Lean_Meta_AbstractNestedProofs_visit___closed__1; +lean_inc(x_3); +lean_inc(x_1); +x_55 = l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9___rarg(x_1, x_54, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_29); +if (lean_obj_tag(x_55) == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; +x_56 = lean_ctor_get(x_55, 0); +lean_inc(x_56); +x_57 = lean_ctor_get(x_55, 1); +lean_inc(x_57); +lean_dec(x_55); +x_58 = lean_st_ref_take(x_3, x_57); +x_59 = lean_ctor_get(x_58, 0); +lean_inc(x_59); +x_60 = lean_ctor_get(x_58, 1); +lean_inc(x_60); +lean_dec(x_58); +lean_inc(x_56); +x_61 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_59, x_1, x_56); +x_62 = lean_st_ref_set(x_3, x_61, x_60); +lean_dec(x_3); +x_63 = !lean_is_exclusive(x_62); +if (x_63 == 0) +{ +lean_object* x_64; +x_64 = lean_ctor_get(x_62, 0); +lean_dec(x_64); +lean_ctor_set(x_62, 0, x_56); +return x_62; +} +else +{ +lean_object* x_65; lean_object* x_66; +x_65 = lean_ctor_get(x_62, 1); +lean_inc(x_65); +lean_dec(x_62); +x_66 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_66, 0, x_56); +lean_ctor_set(x_66, 1, x_65); +return x_66; +} +} +else +{ +uint8_t x_67; +lean_dec(x_3); +lean_dec(x_1); +x_67 = !lean_is_exclusive(x_55); +if (x_67 == 0) +{ +return x_55; +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_55, 0); +x_69 = lean_ctor_get(x_55, 1); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_55); +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; +} +} } case 7: { -lean_object* x_56; lean_object* x_57; -x_56 = l_Lean_Meta_AbstractNestedProofs_visit___main___closed__2; +lean_object* x_71; lean_object* x_72; +x_71 = l_Lean_Meta_AbstractNestedProofs_visit___closed__2; lean_inc(x_3); lean_inc(x_1); -x_57 = l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__12___rarg(x_1, x_56, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_30); -if (lean_obj_tag(x_57) == 0) +x_72 = l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__11___rarg(x_1, x_71, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_29); +if (lean_obj_tag(x_72) == 0) { -lean_object* x_58; lean_object* x_59; -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_10 = x_58; -x_11 = x_59; -goto block_21; -} -else -{ -uint8_t x_60; -lean_dec(x_3); -lean_dec(x_1); -x_60 = !lean_is_exclusive(x_57); -if (x_60 == 0) -{ -return x_57; -} -else -{ -lean_object* x_61; lean_object* x_62; lean_object* x_63; -x_61 = lean_ctor_get(x_57, 0); -x_62 = lean_ctor_get(x_57, 1); -lean_inc(x_62); -lean_inc(x_61); -lean_dec(x_57); -x_63 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_63, 0, x_61); -lean_ctor_set(x_63, 1, x_62); -return x_63; -} -} -} -case 8: -{ -lean_object* x_64; -x_64 = lean_box(0); -x_31 = x_64; -goto block_40; -} -case 10: -{ -lean_object* x_65; lean_object* x_66; -x_65 = lean_ctor_get(x_1, 1); -lean_inc(x_65); -lean_inc(x_3); -x_66 = l_Lean_Meta_AbstractNestedProofs_visit___main(x_65, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_30); -if (lean_obj_tag(x_66) == 0) -{ -lean_object* x_67; lean_object* x_68; lean_object* x_69; -x_67 = lean_ctor_get(x_66, 0); -lean_inc(x_67); -x_68 = lean_ctor_get(x_66, 1); -lean_inc(x_68); -lean_dec(x_66); -lean_inc(x_1); -x_69 = lean_expr_update_mdata(x_1, x_67); -x_10 = x_69; -x_11 = x_68; -goto block_21; -} -else -{ -uint8_t x_70; -lean_dec(x_3); -lean_dec(x_1); -x_70 = !lean_is_exclusive(x_66); -if (x_70 == 0) -{ -return x_66; -} -else -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; -x_71 = lean_ctor_get(x_66, 0); -x_72 = lean_ctor_get(x_66, 1); -lean_inc(x_72); -lean_inc(x_71); -lean_dec(x_66); -x_73 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_73, 0, x_71); -lean_ctor_set(x_73, 1, x_72); -return x_73; -} -} -} -case 11: -{ -lean_object* x_74; lean_object* x_75; -x_74 = lean_ctor_get(x_1, 2); +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; uint8_t x_80; +x_73 = lean_ctor_get(x_72, 0); +lean_inc(x_73); +x_74 = lean_ctor_get(x_72, 1); lean_inc(x_74); -lean_inc(x_3); -x_75 = l_Lean_Meta_AbstractNestedProofs_visit___main(x_74, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_30); -if (lean_obj_tag(x_75) == 0) -{ -lean_object* x_76; lean_object* x_77; lean_object* x_78; +lean_dec(x_72); +x_75 = lean_st_ref_take(x_3, x_74); x_76 = lean_ctor_get(x_75, 0); lean_inc(x_76); x_77 = lean_ctor_get(x_75, 1); lean_inc(x_77); lean_dec(x_75); -lean_inc(x_1); -x_78 = lean_expr_update_proj(x_1, x_76); -x_10 = x_78; -x_11 = x_77; -goto block_21; -} -else -{ -uint8_t x_79; +lean_inc(x_73); +x_78 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_76, x_1, x_73); +x_79 = lean_st_ref_set(x_3, x_78, x_77); lean_dec(x_3); -lean_dec(x_1); -x_79 = !lean_is_exclusive(x_75); -if (x_79 == 0) +x_80 = !lean_is_exclusive(x_79); +if (x_80 == 0) { -return x_75; +lean_object* x_81; +x_81 = lean_ctor_get(x_79, 0); +lean_dec(x_81); +lean_ctor_set(x_79, 0, x_73); +return x_79; } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; -x_80 = lean_ctor_get(x_75, 0); -x_81 = lean_ctor_get(x_75, 1); -lean_inc(x_81); -lean_inc(x_80); -lean_dec(x_75); -x_82 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_82, 0, x_80); -lean_ctor_set(x_82, 1, x_81); -return x_82; -} -} -} -default: -{ -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_inc(x_1); -x_10 = x_1; -x_11 = x_30; -goto block_21; -} -} -} -else -{ -lean_object* x_83; -lean_inc(x_1); -x_83 = l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_30); -lean_dec(x_4); -lean_dec(x_2); -if (lean_obj_tag(x_83) == 0) -{ -lean_object* x_84; lean_object* x_85; -x_84 = lean_ctor_get(x_83, 0); -lean_inc(x_84); -x_85 = lean_ctor_get(x_83, 1); -lean_inc(x_85); -lean_dec(x_83); -x_10 = x_84; -x_11 = x_85; -goto block_21; -} -else -{ -uint8_t x_86; -lean_dec(x_3); -lean_dec(x_1); -x_86 = !lean_is_exclusive(x_83); -if (x_86 == 0) -{ +lean_object* x_82; lean_object* x_83; +x_82 = lean_ctor_get(x_79, 1); +lean_inc(x_82); +lean_dec(x_79); +x_83 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_83, 0, x_73); +lean_ctor_set(x_83, 1, x_82); return x_83; } -else -{ -lean_object* x_87; lean_object* x_88; lean_object* x_89; -x_87 = lean_ctor_get(x_83, 0); -x_88 = lean_ctor_get(x_83, 1); -lean_inc(x_88); -lean_inc(x_87); -lean_dec(x_83); -x_89 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_89, 0, x_87); -lean_ctor_set(x_89, 1, x_88); -return x_89; -} -} -} -block_40: -{ -lean_object* x_32; lean_object* x_33; -lean_dec(x_31); -x_32 = l_Lean_Meta_AbstractNestedProofs_visit___main___closed__1; -lean_inc(x_3); -lean_inc(x_1); -x_33 = l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__7___rarg(x_1, x_32, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_object* x_34; lean_object* x_35; -x_34 = lean_ctor_get(x_33, 0); -lean_inc(x_34); -x_35 = lean_ctor_get(x_33, 1); -lean_inc(x_35); -lean_dec(x_33); -x_10 = x_34; -x_11 = x_35; -goto block_21; } else { -uint8_t x_36; +uint8_t x_84; lean_dec(x_3); lean_dec(x_1); -x_36 = !lean_is_exclusive(x_33); -if (x_36 == 0) +x_84 = !lean_is_exclusive(x_72); +if (x_84 == 0) { -return x_33; +return x_72; } else { -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_33, 0); -x_38 = lean_ctor_get(x_33, 1); -lean_inc(x_38); -lean_inc(x_37); -lean_dec(x_33); -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; +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_72, 0); +x_86 = lean_ctor_get(x_72, 1); +lean_inc(x_86); +lean_inc(x_85); +lean_dec(x_72); +x_87 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_87, 0, x_85); +lean_ctor_set(x_87, 1, x_86); +return x_87; } } } -} -else -{ -uint8_t x_90; -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_90 = !lean_is_exclusive(x_28); -if (x_90 == 0) -{ -return x_28; -} -else -{ -lean_object* x_91; lean_object* x_92; lean_object* x_93; -x_91 = lean_ctor_get(x_28, 0); -x_92 = lean_ctor_get(x_28, 1); -lean_inc(x_92); -lean_inc(x_91); -lean_dec(x_28); -x_93 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_93, 0, x_91); -lean_ctor_set(x_93, 1, x_92); -return x_93; -} -} -} -else -{ -lean_object* x_94; -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_94 = lean_ctor_get(x_27, 0); -lean_inc(x_94); -lean_dec(x_27); -lean_ctor_set(x_23, 0, x_94); -return x_23; -} -} -else -{ -lean_object* x_95; lean_object* x_96; lean_object* x_97; -x_95 = lean_ctor_get(x_23, 0); -x_96 = lean_ctor_get(x_23, 1); -lean_inc(x_96); -lean_inc(x_95); -lean_dec(x_23); -x_97 = l_Std_HashMapImp_find_x3f___at___private_Lean_MetavarContext_2__visit___spec__1(x_95, x_1); -lean_dec(x_95); -if (lean_obj_tag(x_97) == 0) -{ -lean_object* x_98; -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_1); -x_98 = l_Lean_Meta_AbstractNestedProofs_isNonTrivialProof(x_1, x_5, x_6, x_7, x_8, x_96); -if (lean_obj_tag(x_98) == 0) -{ -lean_object* x_99; lean_object* x_100; lean_object* x_101; uint8_t x_111; -x_99 = lean_ctor_get(x_98, 0); -lean_inc(x_99); -x_100 = lean_ctor_get(x_98, 1); -lean_inc(x_100); -lean_dec(x_98); -x_111 = lean_unbox(x_99); -lean_dec(x_99); -if (x_111 == 0) -{ -switch (lean_obj_tag(x_1)) { -case 5: -{ -lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; -x_112 = lean_unsigned_to_nat(0u); -x_113 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_112); -x_114 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_113); -x_115 = lean_mk_array(x_113, x_114); -x_116 = lean_unsigned_to_nat(1u); -x_117 = lean_nat_sub(x_113, x_116); -lean_dec(x_113); -lean_inc(x_3); -lean_inc(x_1); -x_118 = l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__9(x_1, x_115, x_117, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_100); -if (lean_obj_tag(x_118) == 0) -{ -lean_object* x_119; lean_object* x_120; -x_119 = lean_ctor_get(x_118, 0); -lean_inc(x_119); -x_120 = lean_ctor_get(x_118, 1); -lean_inc(x_120); -lean_dec(x_118); -x_10 = x_119; -x_11 = x_120; -goto block_21; -} -else -{ -lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; -lean_dec(x_3); -lean_dec(x_1); -x_121 = lean_ctor_get(x_118, 0); -lean_inc(x_121); -x_122 = lean_ctor_get(x_118, 1); -lean_inc(x_122); -if (lean_is_exclusive(x_118)) { - lean_ctor_release(x_118, 0); - lean_ctor_release(x_118, 1); - x_123 = x_118; -} else { - lean_dec_ref(x_118); - x_123 = lean_box(0); -} -if (lean_is_scalar(x_123)) { - x_124 = lean_alloc_ctor(1, 2, 0); -} else { - x_124 = x_123; -} -lean_ctor_set(x_124, 0, x_121); -lean_ctor_set(x_124, 1, x_122); -return x_124; -} -} -case 6: -{ -lean_object* x_125; -x_125 = lean_box(0); -x_101 = x_125; -goto block_110; -} -case 7: -{ -lean_object* x_126; lean_object* x_127; -x_126 = l_Lean_Meta_AbstractNestedProofs_visit___main___closed__2; -lean_inc(x_3); -lean_inc(x_1); -x_127 = l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__12___rarg(x_1, x_126, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_100); -if (lean_obj_tag(x_127) == 0) -{ -lean_object* x_128; lean_object* x_129; -x_128 = lean_ctor_get(x_127, 0); -lean_inc(x_128); -x_129 = lean_ctor_get(x_127, 1); -lean_inc(x_129); -lean_dec(x_127); -x_10 = x_128; -x_11 = x_129; -goto block_21; -} -else -{ -lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; -lean_dec(x_3); -lean_dec(x_1); -x_130 = lean_ctor_get(x_127, 0); -lean_inc(x_130); -x_131 = lean_ctor_get(x_127, 1); -lean_inc(x_131); -if (lean_is_exclusive(x_127)) { - lean_ctor_release(x_127, 0); - lean_ctor_release(x_127, 1); - x_132 = x_127; -} else { - lean_dec_ref(x_127); - x_132 = lean_box(0); -} -if (lean_is_scalar(x_132)) { - x_133 = lean_alloc_ctor(1, 2, 0); -} else { - x_133 = x_132; -} -lean_ctor_set(x_133, 0, x_130); -lean_ctor_set(x_133, 1, x_131); -return x_133; -} -} case 8: { -lean_object* x_134; -x_134 = lean_box(0); -x_101 = x_134; -goto block_110; +lean_object* x_88; lean_object* x_89; +x_88 = l_Lean_Meta_AbstractNestedProofs_visit___closed__1; +lean_inc(x_3); +lean_inc(x_1); +x_89 = l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9___rarg(x_1, x_88, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_29); +if (lean_obj_tag(x_89) == 0) +{ +lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; uint8_t x_97; +x_90 = lean_ctor_get(x_89, 0); +lean_inc(x_90); +x_91 = lean_ctor_get(x_89, 1); +lean_inc(x_91); +lean_dec(x_89); +x_92 = lean_st_ref_take(x_3, x_91); +x_93 = lean_ctor_get(x_92, 0); +lean_inc(x_93); +x_94 = lean_ctor_get(x_92, 1); +lean_inc(x_94); +lean_dec(x_92); +lean_inc(x_90); +x_95 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_93, x_1, x_90); +x_96 = lean_st_ref_set(x_3, x_95, x_94); +lean_dec(x_3); +x_97 = !lean_is_exclusive(x_96); +if (x_97 == 0) +{ +lean_object* x_98; +x_98 = lean_ctor_get(x_96, 0); +lean_dec(x_98); +lean_ctor_set(x_96, 0, x_90); +return x_96; +} +else +{ +lean_object* x_99; lean_object* x_100; +x_99 = lean_ctor_get(x_96, 1); +lean_inc(x_99); +lean_dec(x_96); +x_100 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_100, 0, x_90); +lean_ctor_set(x_100, 1, x_99); +return x_100; +} +} +else +{ +uint8_t x_101; +lean_dec(x_3); +lean_dec(x_1); +x_101 = !lean_is_exclusive(x_89); +if (x_101 == 0) +{ +return x_89; +} +else +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_102 = lean_ctor_get(x_89, 0); +x_103 = lean_ctor_get(x_89, 1); +lean_inc(x_103); +lean_inc(x_102); +lean_dec(x_89); +x_104 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_104, 0, x_102); +lean_ctor_set(x_104, 1, x_103); +return x_104; +} +} } case 10: { -lean_object* x_135; lean_object* x_136; -x_135 = lean_ctor_get(x_1, 1); -lean_inc(x_135); +lean_object* x_105; lean_object* x_106; +x_105 = lean_ctor_get(x_1, 1); +lean_inc(x_105); lean_inc(x_3); -x_136 = l_Lean_Meta_AbstractNestedProofs_visit___main(x_135, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_100); -if (lean_obj_tag(x_136) == 0) +x_106 = l_Lean_Meta_AbstractNestedProofs_visit(x_105, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_29); +if (lean_obj_tag(x_106) == 0) { -lean_object* x_137; lean_object* x_138; lean_object* x_139; -x_137 = lean_ctor_get(x_136, 0); -lean_inc(x_137); -x_138 = lean_ctor_get(x_136, 1); -lean_inc(x_138); -lean_dec(x_136); +lean_object* x_107; lean_object* x_108; lean_object* x_109; +x_107 = lean_ctor_get(x_106, 0); +lean_inc(x_107); +x_108 = lean_ctor_get(x_106, 1); +lean_inc(x_108); +lean_dec(x_106); lean_inc(x_1); -x_139 = lean_expr_update_mdata(x_1, x_137); -x_10 = x_139; -x_11 = x_138; +x_109 = lean_expr_update_mdata(x_1, x_107); +x_10 = x_109; +x_11 = x_108; goto block_21; } else { -lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; +uint8_t x_110; lean_dec(x_3); lean_dec(x_1); -x_140 = lean_ctor_get(x_136, 0); -lean_inc(x_140); -x_141 = lean_ctor_get(x_136, 1); -lean_inc(x_141); -if (lean_is_exclusive(x_136)) { - lean_ctor_release(x_136, 0); - lean_ctor_release(x_136, 1); - x_142 = x_136; -} else { - lean_dec_ref(x_136); - x_142 = lean_box(0); +x_110 = !lean_is_exclusive(x_106); +if (x_110 == 0) +{ +return x_106; } -if (lean_is_scalar(x_142)) { - x_143 = lean_alloc_ctor(1, 2, 0); -} else { - x_143 = x_142; +else +{ +lean_object* x_111; lean_object* x_112; lean_object* x_113; +x_111 = lean_ctor_get(x_106, 0); +x_112 = lean_ctor_get(x_106, 1); +lean_inc(x_112); +lean_inc(x_111); +lean_dec(x_106); +x_113 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_113, 0, x_111); +lean_ctor_set(x_113, 1, x_112); +return x_113; } -lean_ctor_set(x_143, 0, x_140); -lean_ctor_set(x_143, 1, x_141); -return x_143; } } case 11: { -lean_object* x_144; lean_object* x_145; -x_144 = lean_ctor_get(x_1, 2); -lean_inc(x_144); +lean_object* x_114; lean_object* x_115; +x_114 = lean_ctor_get(x_1, 2); +lean_inc(x_114); lean_inc(x_3); -x_145 = l_Lean_Meta_AbstractNestedProofs_visit___main(x_144, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_100); -if (lean_obj_tag(x_145) == 0) +x_115 = l_Lean_Meta_AbstractNestedProofs_visit(x_114, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_29); +if (lean_obj_tag(x_115) == 0) { -lean_object* x_146; lean_object* x_147; lean_object* x_148; -x_146 = lean_ctor_get(x_145, 0); -lean_inc(x_146); -x_147 = lean_ctor_get(x_145, 1); -lean_inc(x_147); -lean_dec(x_145); +lean_object* x_116; lean_object* x_117; lean_object* x_118; +x_116 = lean_ctor_get(x_115, 0); +lean_inc(x_116); +x_117 = lean_ctor_get(x_115, 1); +lean_inc(x_117); +lean_dec(x_115); lean_inc(x_1); -x_148 = lean_expr_update_proj(x_1, x_146); -x_10 = x_148; -x_11 = x_147; +x_118 = lean_expr_update_proj(x_1, x_116); +x_10 = x_118; +x_11 = x_117; goto block_21; } else { -lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; +uint8_t x_119; lean_dec(x_3); lean_dec(x_1); -x_149 = lean_ctor_get(x_145, 0); -lean_inc(x_149); -x_150 = lean_ctor_get(x_145, 1); -lean_inc(x_150); -if (lean_is_exclusive(x_145)) { - lean_ctor_release(x_145, 0); - lean_ctor_release(x_145, 1); - x_151 = x_145; -} else { - lean_dec_ref(x_145); - x_151 = lean_box(0); +x_119 = !lean_is_exclusive(x_115); +if (x_119 == 0) +{ +return x_115; } -if (lean_is_scalar(x_151)) { - x_152 = lean_alloc_ctor(1, 2, 0); -} else { - x_152 = x_151; +else +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; +x_120 = lean_ctor_get(x_115, 0); +x_121 = lean_ctor_get(x_115, 1); +lean_inc(x_121); +lean_inc(x_120); +lean_dec(x_115); +x_122 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_122, 0, x_120); +lean_ctor_set(x_122, 1, x_121); +return x_122; } -lean_ctor_set(x_152, 0, x_149); -lean_ctor_set(x_152, 1, x_150); -return x_152; } } default: { +lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; uint8_t x_128; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -lean_inc(x_1); -x_10 = x_1; -x_11 = x_100; -goto block_21; +x_123 = lean_st_ref_take(x_3, x_29); +x_124 = lean_ctor_get(x_123, 0); +lean_inc(x_124); +x_125 = lean_ctor_get(x_123, 1); +lean_inc(x_125); +lean_dec(x_123); +lean_inc_n(x_1, 2); +x_126 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_124, x_1, x_1); +x_127 = lean_st_ref_set(x_3, x_126, x_125); +lean_dec(x_3); +x_128 = !lean_is_exclusive(x_127); +if (x_128 == 0) +{ +lean_object* x_129; +x_129 = lean_ctor_get(x_127, 0); +lean_dec(x_129); +lean_ctor_set(x_127, 0, x_1); +return x_127; +} +else +{ +lean_object* x_130; lean_object* x_131; +x_130 = lean_ctor_get(x_127, 1); +lean_inc(x_130); +lean_dec(x_127); +x_131 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_131, 0, x_1); +lean_ctor_set(x_131, 1, x_130); +return x_131; +} } } } else { -lean_object* x_153; +lean_object* x_132; lean_inc(x_1); -x_153 = l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_100); +x_132 = l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_29); lean_dec(x_4); lean_dec(x_2); -if (lean_obj_tag(x_153) == 0) +if (lean_obj_tag(x_132) == 0) { -lean_object* x_154; lean_object* x_155; -x_154 = lean_ctor_get(x_153, 0); -lean_inc(x_154); -x_155 = lean_ctor_get(x_153, 1); -lean_inc(x_155); -lean_dec(x_153); -x_10 = x_154; -x_11 = x_155; -goto block_21; +lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; uint8_t x_140; +x_133 = lean_ctor_get(x_132, 0); +lean_inc(x_133); +x_134 = lean_ctor_get(x_132, 1); +lean_inc(x_134); +lean_dec(x_132); +x_135 = lean_st_ref_take(x_3, x_134); +x_136 = lean_ctor_get(x_135, 0); +lean_inc(x_136); +x_137 = lean_ctor_get(x_135, 1); +lean_inc(x_137); +lean_dec(x_135); +lean_inc(x_133); +x_138 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_136, x_1, x_133); +x_139 = lean_st_ref_set(x_3, x_138, x_137); +lean_dec(x_3); +x_140 = !lean_is_exclusive(x_139); +if (x_140 == 0) +{ +lean_object* x_141; +x_141 = lean_ctor_get(x_139, 0); +lean_dec(x_141); +lean_ctor_set(x_139, 0, x_133); +return x_139; } else { -lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; +lean_object* x_142; lean_object* x_143; +x_142 = lean_ctor_get(x_139, 1); +lean_inc(x_142); +lean_dec(x_139); +x_143 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_143, 0, x_133); +lean_ctor_set(x_143, 1, x_142); +return x_143; +} +} +else +{ +uint8_t x_144; lean_dec(x_3); lean_dec(x_1); -x_156 = lean_ctor_get(x_153, 0); -lean_inc(x_156); -x_157 = lean_ctor_get(x_153, 1); -lean_inc(x_157); -if (lean_is_exclusive(x_153)) { - lean_ctor_release(x_153, 0); - lean_ctor_release(x_153, 1); - x_158 = x_153; -} else { - lean_dec_ref(x_153); - x_158 = lean_box(0); -} -if (lean_is_scalar(x_158)) { - x_159 = lean_alloc_ctor(1, 2, 0); -} else { - x_159 = x_158; -} -lean_ctor_set(x_159, 0, x_156); -lean_ctor_set(x_159, 1, x_157); -return x_159; -} -} -block_110: +x_144 = !lean_is_exclusive(x_132); +if (x_144 == 0) { -lean_object* x_102; lean_object* x_103; -lean_dec(x_101); -x_102 = l_Lean_Meta_AbstractNestedProofs_visit___main___closed__1; +return x_132; +} +else +{ +lean_object* x_145; lean_object* x_146; lean_object* x_147; +x_145 = lean_ctor_get(x_132, 0); +x_146 = lean_ctor_get(x_132, 1); +lean_inc(x_146); +lean_inc(x_145); +lean_dec(x_132); +x_147 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_147, 0, x_145); +lean_ctor_set(x_147, 1, x_146); +return x_147; +} +} +} +} +else +{ +lean_object* x_148; +lean_dec(x_24); +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_148 = lean_ctor_get(x_30, 0); +lean_inc(x_148); +lean_dec(x_30); +lean_ctor_set(x_26, 0, x_148); +return x_26; +} +} +else +{ +lean_object* x_149; lean_object* x_150; lean_object* x_151; +x_149 = lean_ctor_get(x_26, 0); +x_150 = lean_ctor_get(x_26, 1); +lean_inc(x_150); +lean_inc(x_149); +lean_dec(x_26); +x_151 = l_Std_HashMapImp_find_x3f___at___private_Lean_MetavarContext_2__visit___spec__1(x_149, x_1); +lean_dec(x_149); +if (lean_obj_tag(x_151) == 0) +{ +uint8_t x_152; +x_152 = lean_unbox(x_24); +lean_dec(x_24); +if (x_152 == 0) +{ +switch (lean_obj_tag(x_1)) { +case 5: +{ +lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; +x_153 = lean_unsigned_to_nat(0u); +x_154 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_153); +x_155 = l_Lean_Expr_getAppArgs___closed__1; +lean_inc(x_154); +x_156 = lean_mk_array(x_154, x_155); +x_157 = lean_unsigned_to_nat(1u); +x_158 = lean_nat_sub(x_154, x_157); +lean_dec(x_154); lean_inc(x_3); lean_inc(x_1); -x_103 = l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__7___rarg(x_1, x_102, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_100); -if (lean_obj_tag(x_103) == 0) +x_159 = l_Lean_Expr_withAppAux___main___at_Lean_Meta_AbstractNestedProofs_visit___spec__2(x_1, x_156, x_158, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_150); +if (lean_obj_tag(x_159) == 0) { -lean_object* x_104; lean_object* x_105; -x_104 = lean_ctor_get(x_103, 0); -lean_inc(x_104); -x_105 = lean_ctor_get(x_103, 1); -lean_inc(x_105); -lean_dec(x_103); -x_10 = x_104; -x_11 = x_105; +lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; +x_160 = lean_ctor_get(x_159, 0); +lean_inc(x_160); +x_161 = lean_ctor_get(x_159, 1); +lean_inc(x_161); +lean_dec(x_159); +x_162 = lean_st_ref_take(x_3, x_161); +x_163 = lean_ctor_get(x_162, 0); +lean_inc(x_163); +x_164 = lean_ctor_get(x_162, 1); +lean_inc(x_164); +lean_dec(x_162); +lean_inc(x_160); +x_165 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_163, x_1, x_160); +x_166 = lean_st_ref_set(x_3, x_165, x_164); +lean_dec(x_3); +x_167 = lean_ctor_get(x_166, 1); +lean_inc(x_167); +if (lean_is_exclusive(x_166)) { + lean_ctor_release(x_166, 0); + lean_ctor_release(x_166, 1); + x_168 = x_166; +} else { + lean_dec_ref(x_166); + x_168 = lean_box(0); +} +if (lean_is_scalar(x_168)) { + x_169 = lean_alloc_ctor(0, 2, 0); +} else { + x_169 = x_168; +} +lean_ctor_set(x_169, 0, x_160); +lean_ctor_set(x_169, 1, x_167); +return x_169; +} +else +{ +lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; +lean_dec(x_3); +lean_dec(x_1); +x_170 = lean_ctor_get(x_159, 0); +lean_inc(x_170); +x_171 = lean_ctor_get(x_159, 1); +lean_inc(x_171); +if (lean_is_exclusive(x_159)) { + lean_ctor_release(x_159, 0); + lean_ctor_release(x_159, 1); + x_172 = x_159; +} else { + lean_dec_ref(x_159); + x_172 = lean_box(0); +} +if (lean_is_scalar(x_172)) { + x_173 = lean_alloc_ctor(1, 2, 0); +} else { + x_173 = x_172; +} +lean_ctor_set(x_173, 0, x_170); +lean_ctor_set(x_173, 1, x_171); +return x_173; +} +} +case 6: +{ +lean_object* x_174; lean_object* x_175; +x_174 = l_Lean_Meta_AbstractNestedProofs_visit___closed__1; +lean_inc(x_3); +lean_inc(x_1); +x_175 = l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9___rarg(x_1, x_174, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_150); +if (lean_obj_tag(x_175) == 0) +{ +lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; +x_176 = lean_ctor_get(x_175, 0); +lean_inc(x_176); +x_177 = lean_ctor_get(x_175, 1); +lean_inc(x_177); +lean_dec(x_175); +x_178 = lean_st_ref_take(x_3, x_177); +x_179 = lean_ctor_get(x_178, 0); +lean_inc(x_179); +x_180 = lean_ctor_get(x_178, 1); +lean_inc(x_180); +lean_dec(x_178); +lean_inc(x_176); +x_181 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_179, x_1, x_176); +x_182 = lean_st_ref_set(x_3, x_181, x_180); +lean_dec(x_3); +x_183 = lean_ctor_get(x_182, 1); +lean_inc(x_183); +if (lean_is_exclusive(x_182)) { + lean_ctor_release(x_182, 0); + lean_ctor_release(x_182, 1); + x_184 = x_182; +} else { + lean_dec_ref(x_182); + x_184 = lean_box(0); +} +if (lean_is_scalar(x_184)) { + x_185 = lean_alloc_ctor(0, 2, 0); +} else { + x_185 = x_184; +} +lean_ctor_set(x_185, 0, x_176); +lean_ctor_set(x_185, 1, x_183); +return x_185; +} +else +{ +lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; +lean_dec(x_3); +lean_dec(x_1); +x_186 = lean_ctor_get(x_175, 0); +lean_inc(x_186); +x_187 = lean_ctor_get(x_175, 1); +lean_inc(x_187); +if (lean_is_exclusive(x_175)) { + lean_ctor_release(x_175, 0); + lean_ctor_release(x_175, 1); + x_188 = x_175; +} else { + lean_dec_ref(x_175); + x_188 = lean_box(0); +} +if (lean_is_scalar(x_188)) { + x_189 = lean_alloc_ctor(1, 2, 0); +} else { + x_189 = x_188; +} +lean_ctor_set(x_189, 0, x_186); +lean_ctor_set(x_189, 1, x_187); +return x_189; +} +} +case 7: +{ +lean_object* x_190; lean_object* x_191; +x_190 = l_Lean_Meta_AbstractNestedProofs_visit___closed__2; +lean_inc(x_3); +lean_inc(x_1); +x_191 = l_Lean_Meta_forallTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__11___rarg(x_1, x_190, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_150); +if (lean_obj_tag(x_191) == 0) +{ +lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; +x_192 = lean_ctor_get(x_191, 0); +lean_inc(x_192); +x_193 = lean_ctor_get(x_191, 1); +lean_inc(x_193); +lean_dec(x_191); +x_194 = lean_st_ref_take(x_3, x_193); +x_195 = lean_ctor_get(x_194, 0); +lean_inc(x_195); +x_196 = lean_ctor_get(x_194, 1); +lean_inc(x_196); +lean_dec(x_194); +lean_inc(x_192); +x_197 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_195, x_1, x_192); +x_198 = lean_st_ref_set(x_3, x_197, x_196); +lean_dec(x_3); +x_199 = lean_ctor_get(x_198, 1); +lean_inc(x_199); +if (lean_is_exclusive(x_198)) { + lean_ctor_release(x_198, 0); + lean_ctor_release(x_198, 1); + x_200 = x_198; +} else { + lean_dec_ref(x_198); + x_200 = lean_box(0); +} +if (lean_is_scalar(x_200)) { + x_201 = lean_alloc_ctor(0, 2, 0); +} else { + x_201 = x_200; +} +lean_ctor_set(x_201, 0, x_192); +lean_ctor_set(x_201, 1, x_199); +return x_201; +} +else +{ +lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; +lean_dec(x_3); +lean_dec(x_1); +x_202 = lean_ctor_get(x_191, 0); +lean_inc(x_202); +x_203 = lean_ctor_get(x_191, 1); +lean_inc(x_203); +if (lean_is_exclusive(x_191)) { + lean_ctor_release(x_191, 0); + lean_ctor_release(x_191, 1); + x_204 = x_191; +} else { + lean_dec_ref(x_191); + x_204 = lean_box(0); +} +if (lean_is_scalar(x_204)) { + x_205 = lean_alloc_ctor(1, 2, 0); +} else { + x_205 = x_204; +} +lean_ctor_set(x_205, 0, x_202); +lean_ctor_set(x_205, 1, x_203); +return x_205; +} +} +case 8: +{ +lean_object* x_206; lean_object* x_207; +x_206 = l_Lean_Meta_AbstractNestedProofs_visit___closed__1; +lean_inc(x_3); +lean_inc(x_1); +x_207 = l_Lean_Meta_lambdaLetTelescope___at_Lean_Meta_AbstractNestedProofs_visit___spec__9___rarg(x_1, x_206, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_150); +if (lean_obj_tag(x_207) == 0) +{ +lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; +x_208 = lean_ctor_get(x_207, 0); +lean_inc(x_208); +x_209 = lean_ctor_get(x_207, 1); +lean_inc(x_209); +lean_dec(x_207); +x_210 = lean_st_ref_take(x_3, x_209); +x_211 = lean_ctor_get(x_210, 0); +lean_inc(x_211); +x_212 = lean_ctor_get(x_210, 1); +lean_inc(x_212); +lean_dec(x_210); +lean_inc(x_208); +x_213 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_211, x_1, x_208); +x_214 = lean_st_ref_set(x_3, x_213, x_212); +lean_dec(x_3); +x_215 = lean_ctor_get(x_214, 1); +lean_inc(x_215); +if (lean_is_exclusive(x_214)) { + lean_ctor_release(x_214, 0); + lean_ctor_release(x_214, 1); + x_216 = x_214; +} else { + lean_dec_ref(x_214); + x_216 = lean_box(0); +} +if (lean_is_scalar(x_216)) { + x_217 = lean_alloc_ctor(0, 2, 0); +} else { + x_217 = x_216; +} +lean_ctor_set(x_217, 0, x_208); +lean_ctor_set(x_217, 1, x_215); +return x_217; +} +else +{ +lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; +lean_dec(x_3); +lean_dec(x_1); +x_218 = lean_ctor_get(x_207, 0); +lean_inc(x_218); +x_219 = lean_ctor_get(x_207, 1); +lean_inc(x_219); +if (lean_is_exclusive(x_207)) { + lean_ctor_release(x_207, 0); + lean_ctor_release(x_207, 1); + x_220 = x_207; +} else { + lean_dec_ref(x_207); + x_220 = lean_box(0); +} +if (lean_is_scalar(x_220)) { + x_221 = lean_alloc_ctor(1, 2, 0); +} else { + x_221 = x_220; +} +lean_ctor_set(x_221, 0, x_218); +lean_ctor_set(x_221, 1, x_219); +return x_221; +} +} +case 10: +{ +lean_object* x_222; lean_object* x_223; +x_222 = lean_ctor_get(x_1, 1); +lean_inc(x_222); +lean_inc(x_3); +x_223 = l_Lean_Meta_AbstractNestedProofs_visit(x_222, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_150); +if (lean_obj_tag(x_223) == 0) +{ +lean_object* x_224; lean_object* x_225; lean_object* x_226; +x_224 = lean_ctor_get(x_223, 0); +lean_inc(x_224); +x_225 = lean_ctor_get(x_223, 1); +lean_inc(x_225); +lean_dec(x_223); +lean_inc(x_1); +x_226 = lean_expr_update_mdata(x_1, x_224); +x_10 = x_226; +x_11 = x_225; goto block_21; } else { -lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; +lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_dec(x_3); lean_dec(x_1); -x_106 = lean_ctor_get(x_103, 0); -lean_inc(x_106); -x_107 = lean_ctor_get(x_103, 1); -lean_inc(x_107); -if (lean_is_exclusive(x_103)) { - lean_ctor_release(x_103, 0); - lean_ctor_release(x_103, 1); - x_108 = x_103; +x_227 = lean_ctor_get(x_223, 0); +lean_inc(x_227); +x_228 = lean_ctor_get(x_223, 1); +lean_inc(x_228); +if (lean_is_exclusive(x_223)) { + lean_ctor_release(x_223, 0); + lean_ctor_release(x_223, 1); + x_229 = x_223; } else { - lean_dec_ref(x_103); - x_108 = lean_box(0); + lean_dec_ref(x_223); + x_229 = lean_box(0); } -if (lean_is_scalar(x_108)) { - x_109 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_229)) { + x_230 = lean_alloc_ctor(1, 2, 0); } else { - x_109 = x_108; + x_230 = x_229; } -lean_ctor_set(x_109, 0, x_106); -lean_ctor_set(x_109, 1, x_107); -return x_109; +lean_ctor_set(x_230, 0, x_227); +lean_ctor_set(x_230, 1, x_228); +return x_230; +} +} +case 11: +{ +lean_object* x_231; lean_object* x_232; +x_231 = lean_ctor_get(x_1, 2); +lean_inc(x_231); +lean_inc(x_3); +x_232 = l_Lean_Meta_AbstractNestedProofs_visit(x_231, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_150); +if (lean_obj_tag(x_232) == 0) +{ +lean_object* x_233; lean_object* x_234; lean_object* x_235; +x_233 = lean_ctor_get(x_232, 0); +lean_inc(x_233); +x_234 = lean_ctor_get(x_232, 1); +lean_inc(x_234); +lean_dec(x_232); +lean_inc(x_1); +x_235 = lean_expr_update_proj(x_1, x_233); +x_10 = x_235; +x_11 = x_234; +goto block_21; +} +else +{ +lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; +lean_dec(x_3); +lean_dec(x_1); +x_236 = lean_ctor_get(x_232, 0); +lean_inc(x_236); +x_237 = lean_ctor_get(x_232, 1); +lean_inc(x_237); +if (lean_is_exclusive(x_232)) { + lean_ctor_release(x_232, 0); + lean_ctor_release(x_232, 1); + x_238 = x_232; +} else { + lean_dec_ref(x_232); + x_238 = lean_box(0); +} +if (lean_is_scalar(x_238)) { + x_239 = lean_alloc_ctor(1, 2, 0); +} else { + x_239 = x_238; +} +lean_ctor_set(x_239, 0, x_236); +lean_ctor_set(x_239, 1, x_237); +return x_239; +} +} +default: +{ +lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_240 = lean_st_ref_take(x_3, x_150); +x_241 = lean_ctor_get(x_240, 0); +lean_inc(x_241); +x_242 = lean_ctor_get(x_240, 1); +lean_inc(x_242); +lean_dec(x_240); +lean_inc_n(x_1, 2); +x_243 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_241, x_1, x_1); +x_244 = lean_st_ref_set(x_3, x_243, x_242); +lean_dec(x_3); +x_245 = lean_ctor_get(x_244, 1); +lean_inc(x_245); +if (lean_is_exclusive(x_244)) { + lean_ctor_release(x_244, 0); + lean_ctor_release(x_244, 1); + x_246 = x_244; +} else { + lean_dec_ref(x_244); + x_246 = lean_box(0); +} +if (lean_is_scalar(x_246)) { + x_247 = lean_alloc_ctor(0, 2, 0); +} else { + x_247 = x_246; +} +lean_ctor_set(x_247, 0, x_1); +lean_ctor_set(x_247, 1, x_245); +return x_247; } } } else { -lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; +lean_object* x_248; +lean_inc(x_1); +x_248 = l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_150); +lean_dec(x_4); +lean_dec(x_2); +if (lean_obj_tag(x_248) == 0) +{ +lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; +x_249 = lean_ctor_get(x_248, 0); +lean_inc(x_249); +x_250 = lean_ctor_get(x_248, 1); +lean_inc(x_250); +lean_dec(x_248); +x_251 = lean_st_ref_take(x_3, x_250); +x_252 = lean_ctor_get(x_251, 0); +lean_inc(x_252); +x_253 = lean_ctor_get(x_251, 1); +lean_inc(x_253); +lean_dec(x_251); +lean_inc(x_249); +x_254 = l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(x_252, x_1, x_249); +x_255 = lean_st_ref_set(x_3, x_254, x_253); +lean_dec(x_3); +x_256 = lean_ctor_get(x_255, 1); +lean_inc(x_256); +if (lean_is_exclusive(x_255)) { + lean_ctor_release(x_255, 0); + lean_ctor_release(x_255, 1); + x_257 = x_255; +} else { + lean_dec_ref(x_255); + x_257 = lean_box(0); +} +if (lean_is_scalar(x_257)) { + x_258 = lean_alloc_ctor(0, 2, 0); +} else { + x_258 = x_257; +} +lean_ctor_set(x_258, 0, x_249); +lean_ctor_set(x_258, 1, x_256); +return x_258; +} +else +{ +lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; +lean_dec(x_3); +lean_dec(x_1); +x_259 = lean_ctor_get(x_248, 0); +lean_inc(x_259); +x_260 = lean_ctor_get(x_248, 1); +lean_inc(x_260); +if (lean_is_exclusive(x_248)) { + lean_ctor_release(x_248, 0); + lean_ctor_release(x_248, 1); + x_261 = x_248; +} else { + lean_dec_ref(x_248); + x_261 = lean_box(0); +} +if (lean_is_scalar(x_261)) { + x_262 = lean_alloc_ctor(1, 2, 0); +} else { + x_262 = x_261; +} +lean_ctor_set(x_262, 0, x_259); +lean_ctor_set(x_262, 1, x_260); +return x_262; +} +} +} +else +{ +lean_object* x_263; lean_object* x_264; +lean_dec(x_24); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); @@ -2966,31 +3319,19 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_160 = lean_ctor_get(x_98, 0); -lean_inc(x_160); -x_161 = lean_ctor_get(x_98, 1); -lean_inc(x_161); -if (lean_is_exclusive(x_98)) { - lean_ctor_release(x_98, 0); - lean_ctor_release(x_98, 1); - x_162 = x_98; -} else { - lean_dec_ref(x_98); - x_162 = lean_box(0); +x_263 = lean_ctor_get(x_151, 0); +lean_inc(x_263); +lean_dec(x_151); +x_264 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_264, 0, x_263); +lean_ctor_set(x_264, 1, x_150); +return x_264; } -if (lean_is_scalar(x_162)) { - x_163 = lean_alloc_ctor(1, 2, 0); -} else { - x_163 = x_162; -} -lean_ctor_set(x_163, 0, x_160); -lean_ctor_set(x_163, 1, x_161); -return x_163; } } else { -lean_object* x_164; lean_object* x_165; +uint8_t x_265; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); @@ -2999,19 +3340,29 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_164 = lean_ctor_get(x_97, 0); -lean_inc(x_164); -lean_dec(x_97); -x_165 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_165, 0, x_164); -lean_ctor_set(x_165, 1, x_96); -return x_165; +x_265 = !lean_is_exclusive(x_23); +if (x_265 == 0) +{ +return x_23; +} +else +{ +lean_object* x_266; lean_object* x_267; lean_object* x_268; +x_266 = lean_ctor_get(x_23, 0); +x_267 = lean_ctor_get(x_23, 1); +lean_inc(x_267); +lean_inc(x_266); +lean_dec(x_23); +x_268 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_268, 0, x_266); +lean_ctor_set(x_268, 1, x_267); +return x_268; } } } else { -lean_object* x_166; +lean_object* x_269; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); @@ -3019,10 +3370,10 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_166 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_166, 0, x_1); -lean_ctor_set(x_166, 1, x_9); -return x_166; +x_269 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_269, 0, x_1); +lean_ctor_set(x_269, 1, x_9); +return x_269; } block_21: { @@ -3060,11 +3411,11 @@ return x_20; } } } -lean_object* l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___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: { lean_object* x_11; -x_11 = l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_11 = l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_AbstractNestedProofs_visit___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -3074,11 +3425,11 @@ lean_dec(x_3); return x_11; } } -lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; -x_6 = l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3___rarg(x_1, x_2, x_3, x_4, x_5); +x_6 = l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5___rarg(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); @@ -3086,22 +3437,22 @@ lean_dec(x_1); return x_6; } } -lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__3(x_1, x_2, x_3); +x_4 = l_Lean_Meta_getLocalInstances___at_Lean_Meta_AbstractNestedProofs_visit___spec__5(x_1, x_2, x_3); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } -lean_object* l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__4___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* l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___spec__6___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_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__4(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +x_10 = l_Lean_Meta_getLocalDecl___at_Lean_Meta_AbstractNestedProofs_visit___spec__6(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); @@ -3111,21 +3462,39 @@ lean_dec(x_2); return x_10; } } -lean_object* l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__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) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7___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) { _start: { -lean_object* x_13; -x_13 = l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +lean_object* x_12; +x_12 = l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +return x_12; +} +} +lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7___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: +{ +size_t x_13; size_t x_14; lean_object* x_15; +x_13 = lean_unbox_usize(x_2); lean_dec(x_2); +x_14 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_15 = l_Array_forInUnsafe_loop___at_Lean_Meta_AbstractNestedProofs_visit___spec__7(x_1, x_13, x_14, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); lean_dec(x_1); -return x_13; +return x_15; } } -lean_object* l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___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* l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___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) { _start: { lean_object* x_11; -x_11 = l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__10(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_11 = l_Lean_Meta_mkForallFVars___at_Lean_Meta_AbstractNestedProofs_visit___spec__10(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -3135,24 +3504,6 @@ lean_dec(x_3); return x_11; } } -lean_object* l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__11___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_13; -x_13 = l_Array_iterateMAux___main___at_Lean_Meta_AbstractNestedProofs_visit___main___spec__11(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -lean_dec(x_2); -lean_dec(x_1); -return x_13; -} -} -lean_object* l_Lean_Meta_AbstractNestedProofs_visit(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_AbstractNestedProofs_visit___main(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -return x_10; -} -} lean_object* l_Lean_Meta_abstractNestedProofs(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: { @@ -3173,7 +3524,7 @@ lean_inc(x_15); lean_dec(x_13); lean_inc(x_10); lean_inc(x_14); -x_16 = l_Lean_Meta_AbstractNestedProofs_visit___main(x_2, x_1, x_14, x_10, x_3, x_4, x_5, x_6, x_15); +x_16 = l_Lean_Meta_AbstractNestedProofs_visit(x_2, x_1, x_14, x_10, x_3, x_4, x_5, x_6, x_15); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; @@ -3249,14 +3600,16 @@ lean_dec_ref(res); res = initialize_Lean_Meta_Closure(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__1 = _init_l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__1(); -lean_mark_persistent(l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__1); -l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__2 = _init_l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__2(); -lean_mark_persistent(l___private_Lean_Meta_AbstractNestedProofs_1__mkAuxLemma___closed__2); -l_Lean_Meta_AbstractNestedProofs_visit___main___closed__1 = _init_l_Lean_Meta_AbstractNestedProofs_visit___main___closed__1(); -lean_mark_persistent(l_Lean_Meta_AbstractNestedProofs_visit___main___closed__1); -l_Lean_Meta_AbstractNestedProofs_visit___main___closed__2 = _init_l_Lean_Meta_AbstractNestedProofs_visit___main___closed__2(); -lean_mark_persistent(l_Lean_Meta_AbstractNestedProofs_visit___main___closed__2); +l_Lean_Meta_AbstractNestedProofs_State_nextIdx___default = _init_l_Lean_Meta_AbstractNestedProofs_State_nextIdx___default(); +lean_mark_persistent(l_Lean_Meta_AbstractNestedProofs_State_nextIdx___default); +l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__1 = _init_l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__1(); +lean_mark_persistent(l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__1); +l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__2 = _init_l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__2(); +lean_mark_persistent(l___private_Lean_Meta_AbstractNestedProofs_0__Lean_Meta_AbstractNestedProofs_mkAuxLemma___closed__2); +l_Lean_Meta_AbstractNestedProofs_visit___closed__1 = _init_l_Lean_Meta_AbstractNestedProofs_visit___closed__1(); +lean_mark_persistent(l_Lean_Meta_AbstractNestedProofs_visit___closed__1); +l_Lean_Meta_AbstractNestedProofs_visit___closed__2 = _init_l_Lean_Meta_AbstractNestedProofs_visit___closed__2(); +lean_mark_persistent(l_Lean_Meta_AbstractNestedProofs_visit___closed__2); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Meta/GeneralizeTelescope.c b/stage0/stdlib/Lean/Meta/GeneralizeTelescope.c index 24a5c899a0..b2c38efd2d 100644 --- a/stage0/stdlib/Lean/Meta/GeneralizeTelescope.c +++ b/stage0/stdlib/Lean/Meta/GeneralizeTelescope.c @@ -13,60 +13,111 @@ #ifdef __cplusplus extern "C" { #endif +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__2(lean_object*); +lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* l___private_Lean_Meta_Basic_27__withLocalDeclImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; +lean_object* l_Lean_MetavarContext_instantiateMVars(lean_object*, lean_object*); +lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_HeadIndex_1__headNumArgsAux___main(lean_object*, lean_object*); +lean_object* l_Lean_Meta_inferType___at___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1(lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* lean_st_ref_get(lean_object*, lean_object*); -lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_instantiateMVars___at_Lean_Meta_generalizeTelescope___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_instantiate1(lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +lean_object* l_Lean_MessageData_ofList(lean_object*); lean_object* l_Lean_Meta_isTypeCorrect(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at_Lean_Meta_generalizeTelescope___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_umapMAux___main___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__2(lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__3; +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__1; lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Occurrences_beq(lean_object*, lean_object*); -uint8_t lean_nat_dec_eq(lean_object*, lean_object*); -lean_object* l_Lean_Meta_inferType___at_Lean_Meta_generalizeTelescope___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__2; +lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* l_Lean_Expr_toHeadIndex___main(lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___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_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_appendIndexAfter(lean_object*, lean_object*); -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___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*); -extern lean_object* l_Lean_Meta_inferTypeRef; +lean_object* l_Lean_throwError___at___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__2(lean_object*, lean_object*); lean_object* lean_st_mk_ref(lean_object*, lean_object*); -lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___main___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_MessageData_hasCoeOfArrayExpr___closed__2; -lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_throwError___at_Lean_Meta_mkWHNFRef___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___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_object* l_Lean_Meta_getLocalDecl___at_Lean_Meta_getFVarLocalDecl___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main(lean_object*); -lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_instantiateMVars___at_Lean_Meta_generalizeTelescope___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_getLocalDecl___at___private_Lean_Meta_WHNF_0__Lean_Meta_whnfCoreImp___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes_match__1___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes_match__2(lean_object*); +uint8_t l_Lean_Expr_hasMVar(lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__3(lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___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_object*); lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__1; -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__2; +extern lean_object* l_Array_iterateMAux___main___at_Lean_withNestedTraces___spec__4___closed__1; +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_kabstract_visit(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_st_ref_set(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isFVar(lean_object*); lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes_match__2___rarg(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_hasLooseBVars(lean_object*); +lean_object* l_Array_toList___rarg(lean_object*); +lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_abstract(lean_object*, lean_object*); -lean_object* l_Lean_Meta_instantiateMVars___at_Lean_Meta_instantiateLocalDeclMVars___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_generalizeTelescope(lean_object*); +lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_mkOptionalNode___closed__2; +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__1(lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__2___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(lean_object*); lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___main___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___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_object*, lean_object*); +lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes_match__1(lean_object*); lean_object* l_Lean_Meta_generalizeTelescope___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux(lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1(lean_object*); -lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___main___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) { +lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes_match__1___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +x_5 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); +lean_dec(x_1); +x_6 = lean_box(x_5); +x_7 = lean_apply_3(x_2, x_3, x_4, x_6); +return x_7; +} +} +lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_updateTypes_match__1___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_apply_2(x_3, x_1, x_2); +return x_4; +} +} +lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_updateTypes_match__2___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___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: { uint8_t x_9; uint8_t x_34; @@ -179,7 +230,7 @@ return x_32; } } } -lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes___main(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* l_Lean_Meta_GeneralizeTelescope_updateTypes(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; uint8_t x_11; @@ -216,7 +267,7 @@ lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_1); -x_18 = l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___main___spec__1(x_16, x_1, x_17, x_5, x_6, x_7, x_8, x_9); +x_18 = l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___spec__1(x_16, x_1, x_17, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; lean_object* x_20; uint8_t x_21; @@ -303,7 +354,7 @@ lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_1); -x_38 = l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___main___spec__1(x_36, x_1, x_37, x_5, x_6, x_7, x_8, x_9); +x_38 = l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___spec__1(x_36, x_1, x_37, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_38) == 0) { lean_object* x_39; lean_object* x_40; uint8_t x_41; @@ -381,32 +432,15 @@ return x_55; } } } -lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___main___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; -x_9 = l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___main___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +x_9 = l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_3); return x_9; } } -lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes___main___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_GeneralizeTelescope_updateTypes___main(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes(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_GeneralizeTelescope_updateTypes___main(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -return x_10; -} -} lean_object* l_Lean_Meta_GeneralizeTelescope_updateTypes___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: { @@ -416,7 +450,132 @@ lean_dec(x_2); return x_10; } } -lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1___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* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; +lean_dec(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_1, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_1, 2); +lean_inc(x_6); +x_7 = lean_ctor_get(x_1, 3); +lean_inc(x_7); +x_8 = lean_ctor_get_uint8(x_1, sizeof(void*)*4); +lean_dec(x_1); +x_9 = lean_box(x_8); +x_10 = lean_apply_5(x_2, x_4, x_5, x_6, x_7, x_9); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; +lean_dec(x_2); +x_11 = lean_ctor_get(x_1, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +x_13 = lean_ctor_get(x_1, 2); +lean_inc(x_13); +x_14 = lean_ctor_get(x_1, 3); +lean_inc(x_14); +x_15 = lean_ctor_get(x_1, 4); +lean_inc(x_15); +x_16 = lean_ctor_get_uint8(x_1, sizeof(void*)*5); +lean_dec(x_1); +x_17 = lean_box(x_16); +x_18 = lean_apply_6(x_3, x_11, x_12, x_13, x_14, x_15, x_17); +return x_18; +} +} +} +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__1___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +if (lean_obj_tag(x_4) == 1) +{ +uint8_t x_5; +x_5 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; uint64_t x_8; lean_object* x_9; lean_object* x_10; +lean_dec(x_3); +x_6 = lean_ctor_get(x_1, 1); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 0); +lean_inc(x_7); +x_8 = lean_ctor_get_uint64(x_4, sizeof(void*)*1); +x_9 = lean_box_uint64(x_8); +x_10 = lean_apply_4(x_2, x_4, x_7, x_9, x_6); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +lean_dec(x_2); +x_11 = lean_ctor_get(x_1, 1); +lean_inc(x_11); +lean_dec(x_1); +x_12 = lean_box(x_5); +x_13 = lean_apply_3(x_3, x_4, x_11, x_12); +return x_13; +} +} +else +{ +lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; +lean_dec(x_2); +x_14 = lean_ctor_get(x_1, 1); +lean_inc(x_14); +x_15 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); +lean_dec(x_1); +x_16 = lean_box(x_15); +x_17 = lean_apply_3(x_3, x_4, x_14, x_16); +return x_17; +} +} +} +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__2___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__3___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = lean_apply_4(x_5, x_1, x_2, x_3, x_4); +return x_6; +} +} +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__3(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux_match__3___rarg), 5, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___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) { _start: { lean_object* x_10; @@ -467,15 +626,15 @@ return x_18; } } } -lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1(lean_object* x_1) { +lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1___rarg___boxed), 9, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg___boxed), 9, 0); return x_2; } } -lean_object* l_Array_umapMAux___main___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__2(lean_object* x_1, lean_object* x_2) { +lean_object* l_Array_umapMAux___main___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; @@ -510,7 +669,7 @@ goto _start; } } } -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___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, 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; lean_object* x_16; @@ -521,7 +680,7 @@ lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_15); -x_16 = l_Lean_Meta_GeneralizeTelescope_updateTypes___main(x_2, x_8, x_3, x_15, x_9, x_10, x_11, x_12, x_13); +x_16 = l_Lean_Meta_GeneralizeTelescope_updateTypes(x_2, x_8, x_3, x_15, x_9, x_10, x_11, x_12, x_13); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; @@ -532,7 +691,7 @@ lean_inc(x_18); lean_dec(x_16); x_19 = lean_nat_add(x_4, x_14); x_20 = lean_array_push(x_5, x_8); -x_21 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg(x_6, x_7, x_17, x_15, x_19, x_20, x_9, x_10, x_11, x_12, x_18); +x_21 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg(x_6, x_7, x_17, x_15, x_19, x_20, x_9, x_10, x_11, x_12, x_18); return x_21; } else @@ -568,7 +727,27 @@ return x_25; } } } -static lean_object* _init_l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__1() { +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +_start: +{ +lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; +lean_inc(x_2); +lean_inc(x_1); +x_15 = l_Lean_Name_appendIndexAfter(x_1, x_2); +x_16 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___lambda__1___boxed), 13, 7); +lean_closure_set(x_16, 0, x_3); +lean_closure_set(x_16, 1, x_4); +lean_closure_set(x_16, 2, x_5); +lean_closure_set(x_16, 3, x_2); +lean_closure_set(x_16, 4, x_6); +lean_closure_set(x_16, 5, x_1); +lean_closure_set(x_16, 6, x_7); +x_17 = 0; +x_18 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg(x_15, x_17, x_8, x_16, x_10, x_11, x_12, x_13, x_14); +return x_18; +} +} +static lean_object* _init_l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__1() { _start: { lean_object* x_1; @@ -576,27 +755,16 @@ x_1 = lean_mk_string("failed to create telescope generalizing "); return x_1; } } -static lean_object* _init_l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__2() { +static lean_object* _init_l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); +x_1 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___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, lean_object* x_11) { +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___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, lean_object* x_11) { _start: { lean_object* x_12; uint8_t x_13; @@ -615,72 +783,73 @@ return x_14; } else { -lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_25; +lean_object* x_15; lean_object* x_16; x_15 = lean_array_fget(x_3, x_4); x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); -x_17 = lean_ctor_get(x_15, 1); -lean_inc(x_17); -x_18 = lean_ctor_get_uint8(x_15, sizeof(void*)*2); -lean_dec(x_15); if (lean_obj_tag(x_16) == 1) { -if (x_18 == 0) +uint8_t x_17; +x_17 = lean_ctor_get_uint8(x_15, sizeof(void*)*2); +if (x_17 == 0) { -lean_object* x_49; lean_object* x_50; -x_49 = lean_ctor_get(x_16, 0); -lean_inc(x_49); +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_15, 1); +lean_inc(x_18); +lean_dec(x_15); +x_19 = lean_ctor_get(x_16, 0); +lean_inc(x_19); lean_inc(x_7); -x_50 = l_Lean_Meta_getLocalDecl___at_Lean_Meta_getFVarLocalDecl___spec__1(x_49, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_50) == 0) +x_20 = l_Lean_Meta_getLocalDecl___at___private_Lean_Meta_WHNF_0__Lean_Meta_whnfCoreImp___spec__5(x_19, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_20) == 0) { -lean_object* x_51; -x_51 = lean_ctor_get(x_50, 0); -lean_inc(x_51); -if (lean_obj_tag(x_51) == 0) +lean_object* x_21; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +if (lean_obj_tag(x_21) == 0) { -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -lean_dec(x_51); -lean_dec(x_17); -x_52 = lean_ctor_get(x_50, 1); -lean_inc(x_52); -lean_dec(x_50); -x_53 = lean_unsigned_to_nat(1u); -x_54 = lean_nat_add(x_4, x_53); +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +lean_dec(x_21); +lean_dec(x_18); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +x_23 = lean_unsigned_to_nat(1u); +x_24 = lean_nat_add(x_4, x_23); lean_dec(x_4); -x_55 = lean_array_push(x_6, x_16); -x_4 = x_54; -x_6 = x_55; -x_11 = x_52; +x_25 = lean_array_push(x_6, x_16); +x_4 = x_24; +x_6 = x_25; +x_11 = x_22; goto _start; } else { -lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60; lean_object* x_61; -lean_dec(x_51); -x_57 = lean_ctor_get(x_50, 1); -lean_inc(x_57); -lean_dec(x_50); +lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; +lean_dec(x_21); +x_27 = lean_ctor_get(x_20, 1); +lean_inc(x_27); +lean_dec(x_20); lean_inc(x_5); lean_inc(x_1); -x_58 = l_Lean_Name_appendIndexAfter(x_1, x_5); -x_59 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___lambda__1___boxed), 13, 7); -lean_closure_set(x_59, 0, x_4); -lean_closure_set(x_59, 1, x_16); -lean_closure_set(x_59, 2, x_3); -lean_closure_set(x_59, 3, x_5); -lean_closure_set(x_59, 4, x_6); -lean_closure_set(x_59, 5, x_1); -lean_closure_set(x_59, 6, x_2); -x_60 = 0; -x_61 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1___rarg(x_58, x_60, x_17, x_59, x_7, x_8, x_9, x_10, x_57); -return x_61; +x_28 = l_Lean_Name_appendIndexAfter(x_1, x_5); +x_29 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___lambda__1___boxed), 13, 7); +lean_closure_set(x_29, 0, x_4); +lean_closure_set(x_29, 1, x_16); +lean_closure_set(x_29, 2, x_3); +lean_closure_set(x_29, 3, x_5); +lean_closure_set(x_29, 4, x_6); +lean_closure_set(x_29, 5, x_1); +lean_closure_set(x_29, 6, x_2); +x_30 = 0; +x_31 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg(x_28, x_30, x_18, x_29, x_7, x_8, x_9, x_10, x_27); +return x_31; } } else { -uint8_t x_62; -lean_dec(x_17); +uint8_t x_32; +lean_dec(x_18); lean_dec(x_16); lean_dec(x_10); lean_dec(x_9); @@ -692,189 +861,205 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_62 = !lean_is_exclusive(x_50); -if (x_62 == 0) +x_32 = !lean_is_exclusive(x_20); +if (x_32 == 0) { -return x_50; +return x_20; } else { -lean_object* x_63; lean_object* x_64; lean_object* x_65; -x_63 = lean_ctor_get(x_50, 0); -x_64 = lean_ctor_get(x_50, 1); -lean_inc(x_64); -lean_inc(x_63); -lean_dec(x_50); -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; +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_20, 0); +x_34 = lean_ctor_get(x_20, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_20); +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_66; -x_66 = lean_box(0); -x_25 = x_66; -goto block_48; -} -} -else -{ -lean_object* x_67; -x_67 = lean_box(0); -x_25 = x_67; -goto block_48; -} -block_24: -{ -lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; -lean_inc(x_5); -lean_inc(x_1); -x_20 = l_Lean_Name_appendIndexAfter(x_1, x_5); -x_21 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___lambda__1___boxed), 13, 7); -lean_closure_set(x_21, 0, x_4); -lean_closure_set(x_21, 1, x_16); -lean_closure_set(x_21, 2, x_3); -lean_closure_set(x_21, 3, x_5); -lean_closure_set(x_21, 4, x_6); -lean_closure_set(x_21, 5, x_1); -lean_closure_set(x_21, 6, x_2); -x_22 = 0; -x_23 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1___rarg(x_20, x_22, x_17, x_21, x_7, x_8, x_9, x_10, x_19); -return x_23; -} -block_48: -{ -lean_dec(x_25); -if (x_18 == 0) -{ -lean_object* x_26; lean_object* x_27; uint8_t x_28; lean_object* x_29; -lean_inc(x_5); -lean_inc(x_1); -x_26 = l_Lean_Name_appendIndexAfter(x_1, x_5); -x_27 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___lambda__1___boxed), 13, 7); -lean_closure_set(x_27, 0, x_4); -lean_closure_set(x_27, 1, x_16); -lean_closure_set(x_27, 2, x_3); -lean_closure_set(x_27, 3, x_5); -lean_closure_set(x_27, 4, x_6); -lean_closure_set(x_27, 5, x_1); -lean_closure_set(x_27, 6, x_2); -x_28 = 0; -x_29 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1___rarg(x_26, x_28, x_17, x_27, x_7, x_8, x_9, x_10, x_11); -return x_29; -} -else -{ -lean_object* x_30; lean_object* x_31; uint8_t x_32; +lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; +x_36 = lean_ctor_get(x_15, 1); +lean_inc(x_36); +lean_dec(x_15); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); -lean_inc(x_17); -x_30 = l_Lean_Meta_isTypeCorrect(x_17, x_7, x_8, x_9, x_10, x_11); -x_31 = lean_ctor_get(x_30, 0); -lean_inc(x_31); -x_32 = lean_unbox(x_31); -lean_dec(x_31); -if (x_32 == 0) +lean_inc(x_36); +x_37 = l_Lean_Meta_isTypeCorrect(x_36, x_7, x_8, x_9, x_10, x_11); +x_38 = lean_ctor_get(x_37, 0); +lean_inc(x_38); +x_39 = lean_unbox(x_38); +lean_dec(x_38); +if (x_39 == 0) { -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; -lean_dec(x_17); +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; +lean_dec(x_36); lean_dec(x_16); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_33 = lean_ctor_get(x_30, 1); -lean_inc(x_33); -lean_dec(x_30); -x_34 = x_3; -x_35 = lean_unsigned_to_nat(0u); -x_36 = l_Array_umapMAux___main___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__2(x_35, x_34); -x_37 = x_36; -x_38 = l_Lean_MessageData_hasCoeOfArrayExpr___closed__2; -x_39 = l_Lean_MessageData_arrayExpr_toMessageData___main(x_37, x_35, x_38); +x_40 = lean_ctor_get(x_37, 1); +lean_inc(x_40); lean_dec(x_37); -x_40 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__3; -x_41 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_41, 0, x_40); -lean_ctor_set(x_41, 1, x_39); -x_42 = l_Lean_throwError___at_Lean_Meta_mkWHNFRef___spec__1___rarg(x_41, x_7, x_8, x_9, x_10, x_33); +x_41 = x_3; +x_42 = lean_unsigned_to_nat(0u); +x_43 = l_Array_umapMAux___main___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__2(x_42, x_41); +x_44 = x_43; +x_45 = l_Array_toList___rarg(x_44); +lean_dec(x_44); +x_46 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_45); +x_47 = l_Lean_MessageData_ofList(x_46); +lean_dec(x_46); +x_48 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__2; +x_49 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_47); +x_50 = l_Array_iterateMAux___main___at_Lean_withNestedTraces___spec__4___closed__1; +x_51 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +x_52 = l_Lean_throwError___at___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType___spec__2___rarg(x_51, x_7, x_8, x_9, x_10, x_40); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); -x_43 = !lean_is_exclusive(x_42); -if (x_43 == 0) +x_53 = !lean_is_exclusive(x_52); +if (x_53 == 0) { -return x_42; +return x_52; } else { -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_42, 0); -x_45 = lean_ctor_get(x_42, 1); -lean_inc(x_45); -lean_inc(x_44); -lean_dec(x_42); -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_44); -lean_ctor_set(x_46, 1, x_45); -return x_46; +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_52, 0); +x_55 = lean_ctor_get(x_52, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_52); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; } } else { -lean_object* x_47; -x_47 = lean_ctor_get(x_30, 1); -lean_inc(x_47); -lean_dec(x_30); -x_19 = x_47; -goto block_24; +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_37, 1); +lean_inc(x_57); +lean_dec(x_37); +x_58 = lean_box(0); +x_59 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___lambda__2(x_1, x_5, x_4, x_16, x_3, x_6, x_2, x_36, x_58, x_7, x_8, x_9, x_10, x_57); +return x_59; } } } -} -} -} -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main(lean_object* x_1) { -_start: +else { -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg), 11, 0); -return x_2; -} -} -lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1___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) { -_start: +uint8_t x_60; +x_60 = lean_ctor_get_uint8(x_15, sizeof(void*)*2); +if (x_60 == 0) { -uint8_t x_10; lean_object* x_11; -x_10 = lean_unbox(x_2); -lean_dec(x_2); -x_11 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___spec__1___rarg(x_1, x_10, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -return x_11; +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_15, 1); +lean_inc(x_61); +lean_dec(x_15); +x_62 = lean_box(0); +x_63 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___lambda__2(x_1, x_5, x_4, x_16, x_3, x_6, x_2, x_61, x_62, x_7, x_8, x_9, x_10, x_11); +return x_63; } -} -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___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) { -_start: +else { -lean_object* x_14; -x_14 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_object* x_64; lean_object* x_65; lean_object* x_66; uint8_t x_67; +x_64 = lean_ctor_get(x_15, 1); +lean_inc(x_64); +lean_dec(x_15); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_64); +x_65 = l_Lean_Meta_isTypeCorrect(x_64, x_7, x_8, x_9, x_10, x_11); +x_66 = lean_ctor_get(x_65, 0); +lean_inc(x_66); +x_67 = lean_unbox(x_66); +lean_dec(x_66); +if (x_67 == 0) +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; uint8_t x_81; +lean_dec(x_64); +lean_dec(x_16); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); +lean_dec(x_2); lean_dec(x_1); -return x_14; -} -} -lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___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, lean_object* x_11) { -_start: +x_68 = lean_ctor_get(x_65, 1); +lean_inc(x_68); +lean_dec(x_65); +x_69 = x_3; +x_70 = lean_unsigned_to_nat(0u); +x_71 = l_Array_umapMAux___main___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__2(x_70, x_69); +x_72 = x_71; +x_73 = l_Array_toList___rarg(x_72); +lean_dec(x_72); +x_74 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_73); +x_75 = l_Lean_MessageData_ofList(x_74); +lean_dec(x_74); +x_76 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__2; +x_77 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_75); +x_78 = l_Array_iterateMAux___main___at_Lean_withNestedTraces___spec__4___closed__1; +x_79 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +x_80 = l_Lean_throwError___at___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType___spec__2___rarg(x_79, x_7, x_8, x_9, x_10, x_68); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_81 = !lean_is_exclusive(x_80); +if (x_81 == 0) { -lean_object* x_12; -x_12 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -return x_12; +return x_80; +} +else +{ +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_80, 0); +x_83 = lean_ctor_get(x_80, 1); +lean_inc(x_83); +lean_inc(x_82); +lean_dec(x_80); +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +return x_84; +} +} +else +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_65, 1); +lean_inc(x_85); +lean_dec(x_65); +x_86 = lean_box(0); +x_87 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___lambda__2(x_1, x_5, x_4, x_16, x_3, x_6, x_2, x_64, x_86, x_7, x_8, x_9, x_10, x_85); +return x_87; +} +} +} +} } } lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux(lean_object* x_1) { @@ -885,102 +1070,130 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Meta_GeneralizeTelescope_generalizeTeles return x_2; } } -lean_object* l_Lean_Meta_inferType___at_Lean_Meta_generalizeTelescope___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* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___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) { _start: { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; -x_7 = lean_ctor_get(x_4, 0); -lean_inc(x_7); -x_8 = lean_ctor_get(x_4, 1); -lean_inc(x_8); -x_9 = lean_ctor_get(x_4, 2); -lean_inc(x_9); -x_10 = lean_ctor_get(x_4, 3); -lean_inc(x_10); -x_11 = lean_nat_dec_eq(x_8, x_9); -if (x_11 == 0) +uint8_t x_10; lean_object* x_11; +x_10 = lean_unbox(x_2); +lean_dec(x_2); +x_11 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg(x_1, x_10, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +return x_11; +} +} +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___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) { +_start: { -uint8_t x_12; -x_12 = !lean_is_exclusive(x_4); +lean_object* x_14; +x_14 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_4); +lean_dec(x_1); +return x_14; +} +} +lean_object* l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +_start: +{ +lean_object* x_15; +x_15 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +lean_dec(x_9); +return x_15; +} +} +lean_object* l_Lean_Meta_instantiateMVars___at_Lean_Meta_generalizeTelescope___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) { +_start: +{ +uint8_t x_7; +x_7 = l_Lean_Expr_hasMVar(x_1); +if (x_7 == 0) +{ +lean_object* x_8; +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_1); +lean_ctor_set(x_8, 1, x_6); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_9 = lean_st_ref_take(x_3, x_6); +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_is_exclusive(x_10); if (x_12 == 0) { -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; -x_13 = lean_ctor_get(x_4, 3); -lean_dec(x_13); -x_14 = lean_ctor_get(x_4, 2); +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; +x_13 = lean_ctor_get(x_10, 0); +x_14 = l_Lean_MetavarContext_instantiateMVars(x_13, x_1); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); lean_dec(x_14); -x_15 = lean_ctor_get(x_4, 1); -lean_dec(x_15); -x_16 = lean_ctor_get(x_4, 0); -lean_dec(x_16); -x_17 = lean_unsigned_to_nat(1u); -x_18 = lean_nat_add(x_8, x_17); -lean_dec(x_8); -lean_ctor_set(x_4, 1, x_18); -x_19 = l_Lean_Meta_inferTypeRef; -x_20 = lean_st_ref_get(x_19, x_6); -x_21 = lean_ctor_get(x_20, 0); -lean_inc(x_21); -x_22 = lean_ctor_get(x_20, 1); +lean_ctor_set(x_10, 0, x_16); +x_17 = lean_st_ref_set(x_3, x_10, x_11); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +lean_object* x_19; +x_19 = lean_ctor_get(x_17, 0); +lean_dec(x_19); +lean_ctor_set(x_17, 0, x_15); +return x_17; +} +else +{ +lean_object* x_20; lean_object* x_21; +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_dec(x_17); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_15); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +else +{ +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_22 = lean_ctor_get(x_10, 0); +x_23 = lean_ctor_get(x_10, 1); +x_24 = lean_ctor_get(x_10, 2); +lean_inc(x_24); +lean_inc(x_23); lean_inc(x_22); -lean_dec(x_20); -x_23 = lean_apply_6(x_21, x_1, x_2, x_3, x_4, x_5, x_22); -return x_23; -} -else -{ -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_dec(x_4); -x_24 = lean_unsigned_to_nat(1u); -x_25 = lean_nat_add(x_8, x_24); -lean_dec(x_8); -x_26 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_26, 0, x_7); -lean_ctor_set(x_26, 1, x_25); -lean_ctor_set(x_26, 2, x_9); -lean_ctor_set(x_26, 3, x_10); -x_27 = l_Lean_Meta_inferTypeRef; -x_28 = lean_st_ref_get(x_27, x_6); -x_29 = lean_ctor_get(x_28, 0); -lean_inc(x_29); -x_30 = lean_ctor_get(x_28, 1); -lean_inc(x_30); -lean_dec(x_28); -x_31 = lean_apply_6(x_29, x_1, x_2, x_3, x_26, x_5, x_30); -return x_31; -} -} -else -{ -lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_1); -x_32 = l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; -x_33 = l_Lean_throwError___at_Lean_Meta_mkWHNFRef___spec__1___rarg(x_32, 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); -x_34 = !lean_is_exclusive(x_33); -if (x_34 == 0) -{ -return x_33; +x_25 = l_Lean_MetavarContext_instantiateMVars(x_22, x_1); +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +x_28 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_23); +lean_ctor_set(x_28, 2, x_24); +x_29 = lean_st_ref_set(x_3, x_28, x_11); +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); } -else -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_33, 0); -x_36 = lean_ctor_get(x_33, 1); -lean_inc(x_36); -lean_inc(x_35); -lean_dec(x_33); -x_37 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_37, 0, x_35); -lean_ctor_set(x_37, 1, x_36); -return x_37; +if (lean_is_scalar(x_31)) { + x_32 = lean_alloc_ctor(0, 2, 0); +} else { + x_32 = x_31; +} +lean_ctor_set(x_32, 0, x_26); +lean_ctor_set(x_32, 1, x_30); +return x_32; } } } @@ -1018,7 +1231,7 @@ lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_15); -x_16 = l_Lean_Meta_inferType___at_Lean_Meta_generalizeTelescope___spec__1(x_15, x_3, x_4, x_5, x_6, x_7); +x_16 = l_Lean_Meta_inferType___at___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType___spec__1(x_15, x_3, x_4, x_5, x_6, x_7); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; @@ -1027,7 +1240,7 @@ lean_inc(x_17); x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); lean_dec(x_16); -x_19 = l_Lean_Meta_instantiateMVars___at_Lean_Meta_instantiateLocalDeclMVars___spec__1(x_17, x_3, x_4, x_5, x_6, x_18); +x_19 = l_Lean_Meta_instantiateMVars___at_Lean_Meta_generalizeTelescope___spec__1(x_17, x_3, x_4, x_5, x_6, x_18); x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_19, 1); @@ -1105,7 +1318,7 @@ lean_inc(x_15); lean_dec(x_13); x_16 = lean_unsigned_to_nat(1u); x_17 = l_Array_empty___closed__1; -x_18 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg(x_2, x_3, x_14, x_10, x_16, x_17, x_4, x_5, x_6, x_7, x_15); +x_18 = l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg(x_2, x_3, x_14, x_10, x_16, x_17, x_4, x_5, x_6, x_7, x_15); return x_18; } else @@ -1146,6 +1359,18 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Meta_generalizeTelescope___rarg), 8, 0); return x_2; } } +lean_object* l_Lean_Meta_instantiateMVars___at_Lean_Meta_generalizeTelescope___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_Meta_instantiateMVars___at_Lean_Meta_generalizeTelescope___spec__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_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Meta_KAbstract(lean_object*); static bool _G_initialized = false; @@ -1159,12 +1384,10 @@ lean_dec_ref(res); res = initialize_Lean_Meta_KAbstract(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__1 = _init_l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__1(); -lean_mark_persistent(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__1); -l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__2 = _init_l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__2(); -lean_mark_persistent(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__2); -l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__3 = _init_l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__3(); -lean_mark_persistent(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___main___rarg___closed__3); +l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__1 = _init_l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__1(); +lean_mark_persistent(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__1); +l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__2 = _init_l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__2(); +lean_mark_persistent(l_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___rarg___closed__2); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Meta/Match/Match.c b/stage0/stdlib/Lean/Meta/Match/Match.c index efa3d3966d..e15f868e3e 100644 --- a/stage0/stdlib/Lean/Meta/Match/Match.c +++ b/stage0/stdlib/Lean/Meta/Match/Match.c @@ -82,7 +82,6 @@ lean_object* l___private_Lean_Expr_3__getAppArgsAux___main(lean_object*, lean_ob lean_object* l_Lean_Meta_isExprDefEq___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processValue___spec__5___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_isExprDefEq___at_Lean_Meta_isExprDefEqGuarded___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_MatcherApp_addArg___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_throwInductiveTypeExpected(lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_updateAlts___lambda__3___closed__2; extern lean_object* l_Lean_MessageData_ofList___closed__3; @@ -107,7 +106,6 @@ lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processArrayLit___closed__1; lean_object* l_Lean_Meta_Match_Unify_unify___closed__3; uint8_t lean_name_eq(lean_object*, lean_object*); -lean_object* l___private_Lean_HeadIndex_1__headNumArgsAux___main(lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_3__checkTraceOptionM___at_Lean_Meta_Match_Unify_assign___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Meta_Match_Extension_mkExtension___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processValue___spec__3___boxed(lean_object*, lean_object*); @@ -131,6 +129,7 @@ extern lean_object* l_Lean_registerInternalExceptionId___closed__2; extern lean_object* l_Prod_HasRepr___rarg___closed__1; lean_object* l_Array_extract___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processConstructor_match__5(lean_object*); +lean_object* l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at_Lean_Meta_Match_mkMatcher___spec__3(lean_object*, lean_object*); lean_object* l_Lean_EnvExtensionInterfaceUnsafe_registerExt___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_mkMatcher___lambda__1___closed__7; @@ -161,7 +160,6 @@ lean_object* l_List_append___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_getUElimPos_x3f___closed__3; lean_object* l_Array_iterateMAux___main___at_Lean_Meta_Match_Extension_mkExtension___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_checkNumPatterns(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__4(lean_object*); lean_object* l_Lean_Expr_constructorApp_x3f(lean_object*, lean_object*); lean_object* l_List_map___main___at_Lean_Meta_Match_Example_applyFVarSubst___spec__2___boxed(lean_object*, lean_object*); lean_object* l_List_map___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processConstructor___spec__3(lean_object*); @@ -263,7 +261,6 @@ uint8_t l_List_foldr___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Ma lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_withAltsAux(lean_object*); lean_object* l_Lean_Meta_Match_Unify_State_fvarSubst___default; extern lean_object* l_Lean_levelZero; -lean_object* l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Example_toMessageData_match__1(lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_Meta_Match_Extension_mkExtension___spec__4(lean_object*, lean_object*); @@ -290,7 +287,6 @@ uint8_t l_List_foldr___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Ma uint8_t l_List_elem___main___at_Lean_Occurrences_contains___spec__1(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_updateAlts___closed__3; lean_object* l_List_map___main___at_Lean_Meta_Match_Pattern_applyFVarSubst___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_MatcherApp_addArg___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Match_Match___hyg_7756_(lean_object*); lean_object* l_List_map___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processArrayLit___spec__4(lean_object*, lean_object*, lean_object*); lean_object* l_List_map___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processConstructor___spec__4(lean_object*, lean_object*, lean_object*); @@ -333,7 +329,6 @@ lean_object* l___private_Lean_Util_Trace_3__checkTraceOptionM___at_Lean_Meta_Mat lean_object* l_List_map___main___at_Lean_Meta_Match_processInaccessibleAsCtor___spec__1(lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_collectArraySizes_match__1(lean_object*); extern lean_object* l_Lean_Meta_isExprDefEq___rarg___closed__2; -uint8_t l_Lean_Occurrences_beq(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_isFirstPatternVar_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_filterMapMAux___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processConstructor___spec__8___closed__1; extern lean_object* l_Lean_Expr_Inhabited___closed__1; @@ -390,7 +385,6 @@ lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_getInductiveVa extern lean_object* l___private_Lean_Meta_RecursorInfo_0__Lean_Meta_getMajorPosDepElim___closed__8; lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_expandVarIntoArrayLit___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processSkipInaccessible___spec__1(lean_object*); -lean_object* l_Lean_Expr_toHeadIndex___main(lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_traceStep___closed__3; lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_expandVarIntoArrayLit_loop_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_3__checkTraceOptionM___at___private_Lean_Meta_WHNF_0__Lean_Meta_whnfCoreImp___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -453,7 +447,6 @@ lean_object* l_Lean_Meta_Match_Extension_State_map___default___closed__1; lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_hasRecursiveType_match__1(lean_object*); size_t l_Lean_Name_hash(lean_object*); lean_object* l_List_map___main___at_Lean_Meta_Match_Example_replaceFVarId___spec__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___main___at_Lean_Meta_Match_Example_replaceFVarId___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_toMessageData___closed__8; uint8_t l_List_foldr___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_hasCtorPattern___spec__1(uint8_t, lean_object*); @@ -471,7 +464,6 @@ lean_object* l_List_map___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta extern lean_object* l_Lean_MessageData_nil___closed__1; lean_object* l_Lean_Meta_Match_Extension_extension; extern lean_object* l_List_map___main___at_Lean_Meta_DiscrTree_Trie_format___spec__2___rarg___closed__2; -lean_object* l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Unify_assign(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insert___at_Lean_Meta_Match_Extension_State_addEntry___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Unify_occurs_match__1(lean_object*); @@ -500,6 +492,7 @@ lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processAsPatte lean_object* l_List_filterAux___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processValue___spec__4(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_expandVarIntoArrayLit_loop_match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_29__withExistingLocalDeclsImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_mkMatcher___lambda__1___closed__1; lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_hasCtorPattern_match__1(lean_object*); @@ -512,6 +505,7 @@ lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processNonVari extern lean_object* l_IO_Error_Inhabited___closed__1; lean_object* l_Lean_Meta_Match_Example_toMessageData_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Alt_toMessageData___closed__2; +lean_object* l_Lean_Meta_instantiateMVars___at_Lean_Meta_generalizeTelescope___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_addMatcherInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___main___at_Lean_Meta_Match_Example_applyFVarSubst___spec__2(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Closure_1__mkAuxDefinitionImp___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -523,6 +517,7 @@ lean_object* l_Lean_Meta_Match_Example_toMessageData___closed__4; extern lean_object* l_Lean_Literal_type___closed__2; lean_object* l_Array_umapMAux___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processArrayLit___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_modn(size_t, lean_object*); +lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_filterAux___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processConstructor___spec__6___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_isConstructorTransition___boxed(lean_object*); lean_object* l_List_map___main___at_Lean_Meta_Match_Pattern_toMessageData___spec__2(lean_object*); @@ -541,6 +536,7 @@ lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processConstru lean_object* l_Lean_Meta_Match_Extension_extension___closed__4; uint8_t l_Array_isEmpty___rarg(lean_object*); lean_object* l_Lean_Meta_Match_Alt_toMessageData___closed__1; +lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__3(lean_object*); lean_object* l_Lean_LocalDecl_toExpr(lean_object*); lean_object* l_Lean_Meta_Match_Unify_unify___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isExprDefEq___at_Lean_Meta_Match_Unify_unify___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -694,7 +690,6 @@ lean_object* l_Lean_Meta_Match_Extension_extension___elambda__1___boxed(lean_obj lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_hasCtorPattern___boxed(lean_object*); lean_object* l_Lean_Meta_matchMatcherApp_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_MatcherApp_addArg___lambda__4___closed__1; -lean_object* l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addTrace___at_Lean_Meta_isLevelDefEq___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processValue_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processSkipInaccessible_match__2___rarg(lean_object*, lean_object*, lean_object*); @@ -750,15 +745,12 @@ lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_traceState(lea lean_object* l_Lean_Meta_Match_Example_varsToUnderscore_match__1(lean_object*); extern lean_object* l_Lean_ResolveName_resolveNamespaceUsingScope___closed__3; lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processArrayLit_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwErrorAt___at_Lean_Meta_Match_Alt_checkAndReplaceFVarId___spec__1(lean_object*); -lean_object* l_Lean_Meta_kabstract_visit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_isNatValueTransition(lean_object*); lean_object* l_List_foldr___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_hasAsPattern___spec__1___boxed(lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_hasAsPattern___boxed(lean_object*); lean_object* l_Lean_Meta_caseValues(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_Expr_isFVar(lean_object*); lean_object* l_List_foldl___main___at_Lean_Meta_Match_Pattern_toMessageData___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Example_replaceFVarId(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processNonVariable___closed__1; @@ -790,7 +782,6 @@ lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_getUElimPos_x3 lean_object* l_List_replace___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processLeaf___spec__5___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withMVarContext___at_Lean_Meta_revert___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_isValueTransition___boxed(lean_object*); -lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__6___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_updateAlts___lambda__3___closed__1; lean_object* l_Lean_Meta_Match_withGoalOf___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__1; @@ -818,7 +809,7 @@ lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_collectValues_ lean_object* l_Lean_Meta_Match_Unify_occurs___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_traceStep___closed__1; lean_object* l_List_mapM___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_expandVarIntoArrayLit_loop___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_expr_abstract(lean_object*, lean_object*); +lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_matchMatcherApp_x3f_match__1(lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_hasAsPattern_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_expandVarIntoArrayLit___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -873,6 +864,7 @@ lean_object* l_Lean_Meta_Match_processInaccessibleAsCtor_match__1___rarg(lean_ob lean_object* l_Lean_Meta_mkAuxDefinition___at_Lean_Meta_Match_mkMatcher___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_toArrayAux___main___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processConstructor_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_foldl___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processLeaf___spec__4(lean_object*, lean_object*); extern lean_object* l_Nat_Inhabited; lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processSkipInaccessible_match__1___rarg(lean_object*, lean_object*, lean_object*); @@ -919,7 +911,6 @@ lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_withAltsAux___ lean_object* l_Lean_Meta_MatcherApp_addArg___lambda__2___closed__2; lean_object* l_Lean_throwError___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_process___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_filterMapMAux___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processNonVariable___spec__1___closed__2; -lean_object* l_Lean_Meta_instantiateMVars___at_Lean_Meta_abstractMVars___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Extension_extension___elambda__2___boxed(lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_hasAsPattern_match__1(lean_object*); lean_object* l_Std_AssocList_foldlM___at_Lean_Meta_Match_Extension_State_addEntry___spec__10(lean_object*, lean_object*); @@ -953,6 +944,7 @@ lean_object* l_Lean_Meta_Match_Extension_extension___elambda__2(lean_object*); lean_object* l_Lean_Meta_Match_Unify_isAltVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_hasArrayLitPattern_match__1(lean_object*); lean_object* l_List_foldr___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_inLocalDecls___spec__1___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_Match_Extension_getMatcherInfo_x3f___spec__6___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Unify_expandIfVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_process___closed__2; @@ -983,6 +975,7 @@ lean_object* l_Lean_Meta_MatcherApp_addArg___lambda__2___closed__1; lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_throwNonSupported___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Example_replaceFVarId_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_filterAux___main___at___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_expandVarIntoCtor_x3f___spec__2(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___spec__2(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_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_processVariable_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_updateAlts___lambda__2___closed__1; @@ -6450,7 +6443,7 @@ lean_closure_set(x_48, 9, x_1); lean_closure_set(x_48, 10, x_14); lean_closure_set(x_48, 11, x_5); x_49 = 0; -x_50 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__6___rarg(x_44, x_49, x_38, x_48, x_6, x_7, x_8, x_9, x_46); +x_50 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg(x_44, x_49, x_38, x_48, x_6, x_7, x_8, x_9, x_46); return x_50; } else @@ -6493,7 +6486,7 @@ lean_closure_set(x_62, 9, x_1); lean_closure_set(x_62, 10, x_14); lean_closure_set(x_62, 11, x_5); x_63 = 0; -x_64 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__6___rarg(x_44, x_63, x_38, x_62, x_6, x_7, x_8, x_9, x_60); +x_64 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg(x_44, x_63, x_38, x_62, x_6, x_7, x_8, x_9, x_60); return x_64; } } @@ -14034,13 +14027,13 @@ lean_object* l___private_Lean_Meta_Match_Match_0__Lean_Meta_Match_unify_x3f(lean _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; lean_object* x_18; lean_object* x_19; -x_9 = l_Lean_Meta_instantiateMVars___at_Lean_Meta_abstractMVars___spec__1(x_2, x_4, x_5, x_6, x_7, x_8); +x_9 = l_Lean_Meta_instantiateMVars___at_Lean_Meta_generalizeTelescope___spec__1(x_2, x_4, x_5, x_6, x_7, x_8); 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 = l_Lean_Meta_instantiateMVars___at_Lean_Meta_abstractMVars___spec__1(x_3, x_4, x_5, x_6, x_7, x_11); +x_12 = l_Lean_Meta_instantiateMVars___at_Lean_Meta_generalizeTelescope___spec__1(x_3, x_4, x_5, x_6, x_7, x_11); x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); @@ -21059,7 +21052,7 @@ lean_closure_set(x_18, 3, x_3); lean_closure_set(x_18, 4, x_4); lean_closure_set(x_18, 5, x_15); x_19 = 0; -x_20 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__6___rarg(x_17, x_19, x_3, x_18, x_7, x_8, x_9, x_10, x_11); +x_20 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg(x_17, x_19, x_3, x_18, x_7, x_8, x_9, x_10, x_11); return x_20; } else @@ -30172,7 +30165,7 @@ lean_closure_set(x_16, 5, x_5); lean_closure_set(x_16, 6, x_14); x_17 = l_Lean_Meta_Match_mkMatcher___lambda__3___closed__2; x_18 = 0; -x_19 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__6___rarg(x_17, x_18, x_14, x_16, x_7, x_8, x_9, x_10, x_15); +x_19 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___rarg(x_17, x_18, x_14, x_16, x_7, x_8, x_9, x_10, x_15); return x_19; } else @@ -31517,120 +31510,7 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Meta_MatcherApp_addArg_match__2___rarg), return x_2; } } -lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_MatcherApp_addArg___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: -{ -uint8_t x_9; uint8_t x_34; -x_34 = l_Lean_Expr_isFVar(x_2); -if (x_34 == 0) -{ -uint8_t x_35; -x_35 = 0; -x_9 = x_35; -goto block_33; -} -else -{ -lean_object* x_36; uint8_t x_37; -x_36 = lean_box(0); -x_37 = l_Lean_Occurrences_beq(x_3, x_36); -x_9 = x_37; -goto block_33; -} -block_33: -{ -if (x_9 == 0) -{ -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_10 = l_Lean_Expr_toHeadIndex___main(x_2); -x_11 = lean_unsigned_to_nat(0u); -x_12 = l___private_Lean_HeadIndex_1__headNumArgsAux___main(x_2, x_11); -x_13 = lean_unsigned_to_nat(1u); -x_14 = lean_st_mk_ref(x_13, x_8); -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); -lean_inc(x_16); -lean_dec(x_14); -x_17 = l_Lean_Meta_kabstract_visit(x_2, x_3, x_10, x_12, x_1, x_11, x_15, x_4, x_5, x_6, x_7, x_16); -lean_dec(x_12); -lean_dec(x_10); -if (lean_obj_tag(x_17) == 0) -{ -lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; -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_15, x_19); -lean_dec(x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; -x_22 = lean_ctor_get(x_20, 0); -lean_dec(x_22); -lean_ctor_set(x_20, 0, x_18); -return x_20; -} -else -{ -lean_object* x_23; lean_object* x_24; -x_23 = lean_ctor_get(x_20, 1); -lean_inc(x_23); -lean_dec(x_20); -x_24 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_24, 0, x_18); -lean_ctor_set(x_24, 1, x_23); -return x_24; -} -} -else -{ -uint8_t x_25; -lean_dec(x_15); -x_25 = !lean_is_exclusive(x_17); -if (x_25 == 0) -{ -return x_17; -} -else -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_17, 0); -x_27 = lean_ctor_get(x_17, 1); -lean_inc(x_27); -lean_inc(x_26); -lean_dec(x_17); -x_28 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_28, 0, x_26); -lean_ctor_set(x_28, 1, x_27); -return x_28; -} -} -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_29 = l_Lean_mkOptionalNode___closed__2; -x_30 = lean_array_push(x_29, x_2); -x_31 = lean_expr_abstract(x_1, x_30); -lean_dec(x_30); -lean_dec(x_1); -x_32 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_8); -return x_32; -} -} -} -} -lean_object* l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___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* l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___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, lean_object* x_9) { _start: { lean_object* x_10; uint8_t x_11; @@ -31651,7 +31531,7 @@ lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -x_19 = l_Lean_Meta_kabstract___at_Lean_Meta_MatcherApp_addArg___spec__1(x_4, x_17, x_18, x_5, x_6, x_7, x_8, x_9); +x_19 = l_Lean_Meta_kabstract___at_Lean_Meta_GeneralizeTelescope_updateTypes___spec__1(x_4, x_17, x_18, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; lean_object* x_22; @@ -31712,7 +31592,7 @@ return x_28; } } } -lean_object* l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___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* l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___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) { _start: { lean_object* x_8; lean_object* x_9; uint8_t x_10; @@ -31745,7 +31625,7 @@ return x_18; } } } -lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__4___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* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__3___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) { _start: { uint8_t x_8; lean_object* x_9; @@ -31797,11 +31677,11 @@ return x_17; } } } -lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__4(lean_object* x_1) { +lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__3(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__4___rarg), 7, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__3___rarg), 7, 0); return x_2; } } @@ -32243,7 +32123,7 @@ lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -x_16 = l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___spec__2(x_2, x_3, x_15, x_12, x_6, x_7, x_8, x_9, x_13); +x_16 = l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___spec__1(x_2, x_3, x_15, x_12, x_6, x_7, x_8, x_9, x_13); if (lean_obj_tag(x_16) == 0) { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; @@ -32252,7 +32132,7 @@ lean_inc(x_17); x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); lean_dec(x_16); -x_19 = l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___spec__3(x_17, x_4, x_6, x_7, x_8, x_9, x_18); +x_19 = l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___spec__2(x_17, x_4, x_6, x_7, x_8, x_9, x_18); x_20 = lean_ctor_get(x_2, 2); lean_inc(x_20); if (lean_obj_tag(x_20) == 0) @@ -32487,34 +32367,25 @@ lean_inc(x_8); x_9 = lean_alloc_closure((void*)(l_Lean_Meta_MatcherApp_addArg___lambda__4), 9, 2); lean_closure_set(x_9, 0, x_2); lean_closure_set(x_9, 1, x_1); -x_10 = l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__4___rarg(x_8, x_9, x_3, x_4, x_5, x_6, x_7); +x_10 = l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__3___rarg(x_8, x_9, x_3, x_4, x_5, x_6, x_7); return x_10; } } -lean_object* l_Lean_Meta_kabstract___at_Lean_Meta_MatcherApp_addArg___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; -x_9 = l_Lean_Meta_kabstract___at_Lean_Meta_MatcherApp_addArg___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_3); -return x_9; -} -} -lean_object* l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +lean_object* l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; -x_10 = l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +x_10 = l_Nat_foldRevMAux___main___at_Lean_Meta_MatcherApp_addArg___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_2); lean_dec(x_1); return x_10; } } -lean_object* l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___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* l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; -x_8 = l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +x_8 = l_Lean_Meta_mkArrow___at_Lean_Meta_MatcherApp_addArg___spec__2(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);