chore: update stage0
This commit is contained in:
parent
4f318d3304
commit
f29319647f
9 changed files with 3210 additions and 109 deletions
9
stage0/src/Init/Data/Nat/Div.lean
generated
9
stage0/src/Init/Data/Nat/Div.lean
generated
|
|
@ -18,8 +18,7 @@ protected def div (x y : @& Nat) : Nat :=
|
|||
Nat.div (x - y) y + 1
|
||||
else
|
||||
0
|
||||
decreasing_by
|
||||
decreasing_with apply div_rec_lemma; assumption
|
||||
decreasing_by apply div_rec_lemma; assumption
|
||||
|
||||
instance : Div Nat := ⟨Nat.div⟩
|
||||
|
||||
|
|
@ -37,8 +36,7 @@ theorem div.inductionOn.{u}
|
|||
ind x y h (inductionOn (x - y) y ind base)
|
||||
else
|
||||
base x y h
|
||||
decreasing_by
|
||||
decreasing_with apply div_rec_lemma; assumption
|
||||
decreasing_by apply div_rec_lemma; assumption
|
||||
|
||||
@[extern "lean_nat_mod"]
|
||||
protected def mod (x y : @& Nat) : Nat :=
|
||||
|
|
@ -46,8 +44,7 @@ protected def mod (x y : @& Nat) : Nat :=
|
|||
Nat.mod (x - y) y
|
||||
else
|
||||
x
|
||||
decreasing_by
|
||||
decreasing_with apply div_rec_lemma; assumption
|
||||
decreasing_by apply div_rec_lemma; assumption
|
||||
|
||||
instance : Mod Nat := ⟨Nat.mod⟩
|
||||
|
||||
|
|
|
|||
1
stage0/src/Init/Data/Nat/Log2.lean
generated
1
stage0/src/Init/Data/Nat/Log2.lean
generated
|
|
@ -25,5 +25,4 @@ Computes `⌊max 0 (log₂ n)⌋`.
|
|||
@[extern "lean_nat_log2"]
|
||||
def log2 (n : @& Nat) : Nat :=
|
||||
if h : n ≥ 2 then log2 (n / 2) + 1 else 0
|
||||
termination_by _ n => n
|
||||
decreasing_by exact log2_terminates _ h
|
||||
|
|
|
|||
29
stage0/src/Lean/Elab/PreDefinition/WF/Ite.lean
generated
Normal file
29
stage0/src/Lean/Elab/PreDefinition/WF/Ite.lean
generated
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/-
|
||||
Copyright (c) 2022 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Meta.Transform
|
||||
|
||||
namespace Lean.Meta
|
||||
|
||||
/--
|
||||
Convert `ite` expressions in `e` to `dite`s.
|
||||
It is useful to make this conversion in the `WF` module because the condition is often used in
|
||||
termination proofs. -/
|
||||
def iteToDIte (e : Expr) : MetaM Expr := do
|
||||
-- TODO: move this file to `Meta` if we decide to use it in other places.
|
||||
let post (e : Expr) : MetaM TransformStep := do
|
||||
if e.isAppOfArity ``ite 5 then
|
||||
let f := e.getAppFn
|
||||
let args := e.getAppArgs
|
||||
let c := args[1]
|
||||
let h ← mkFreshUserName `h
|
||||
let args := args.set! 3 (Lean.mkLambda h BinderInfo.default c args[3])
|
||||
let args := args.set! 4 (Lean.mkLambda h BinderInfo.default (mkNot c) args[4])
|
||||
return .done <| mkAppN (mkConst ``dite f.constLevels!) args
|
||||
else
|
||||
return .done e
|
||||
transform e (post := post)
|
||||
|
||||
end Lean.Meta
|
||||
4
stage0/src/Lean/Elab/PreDefinition/WF/Main.lean
generated
4
stage0/src/Lean/Elab/PreDefinition/WF/Main.lean
generated
|
|
@ -10,6 +10,7 @@ import Lean.Elab.PreDefinition.WF.PackMutual
|
|||
import Lean.Elab.PreDefinition.WF.Rel
|
||||
import Lean.Elab.PreDefinition.WF.Fix
|
||||
import Lean.Elab.PreDefinition.WF.Eqns
|
||||
import Lean.Elab.PreDefinition.WF.Ite
|
||||
|
||||
namespace Lean.Elab
|
||||
open WF
|
||||
|
|
@ -84,7 +85,8 @@ def wfRecursion (preDefs : Array PreDefinition) (wf? : Option TerminationWF) (de
|
|||
addAsAxiom preDef
|
||||
let fixedPrefixSize ← getFixedPrefix preDefs
|
||||
trace[Elab.definition.wf] "fixed prefix: {fixedPrefixSize}"
|
||||
let unaryPreDefs ← packDomain fixedPrefixSize preDefs
|
||||
let preDefsDIte ← preDefs.mapM fun preDef => return { preDef with value := (← iteToDIte preDef.value) }
|
||||
let unaryPreDefs ← packDomain fixedPrefixSize preDefsDIte
|
||||
return (← packMutual fixedPrefixSize preDefs unaryPreDefs, fixedPrefixSize)
|
||||
let preDefNonRec ← forallBoundedTelescope unaryPreDef.type fixedPrefixSize fun prefixArgs type => do
|
||||
let packedArgType := type.bindingDomain!
|
||||
|
|
|
|||
4
stage0/stdlib/Lean/Elab/Inductive.c
generated
4
stage0/stdlib/Lean/Elab/Inductive.c
generated
|
|
@ -137,6 +137,7 @@ LEAN_EXPORT lean_object* l_List_mapM___at___private_Lean_Elab_Inductive_0__Lean_
|
|||
LEAN_EXPORT lean_object* l_List_forM___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_collectUsed___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_accLevelAtCtor___closed__1;
|
||||
LEAN_EXPORT lean_object* l_List_mapM___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_levelMVarToParamAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MessageData_ofList(lean_object*);
|
||||
lean_object* l_Lean_Elab_InfoTree_substitute(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_applyAttributesAt(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -450,7 +451,6 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Inducti
|
|||
uint8_t lean_expr_eqv(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_updateResultingUniverse___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkIndFVar2Const___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_transform___at_Lean_Meta_expandCoe___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3;
|
||||
lean_object* l_Std_HashMap_insert___at_Lean_Meta_ForEachExpr_visit___spec__3(lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_withSaveInfoContext___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkInductiveDecl___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -4794,7 +4794,7 @@ x_9 = lean_alloc_closure((void*)(l___private_Lean_Elab_Inductive_0__Lean_Elab_Co
|
|||
lean_closure_set(x_9, 0, x_1);
|
||||
lean_closure_set(x_9, 1, x_2);
|
||||
x_10 = l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_elabCtors_checkParamOccs___closed__1;
|
||||
x_11 = l_Lean_Meta_transform___at_Lean_Meta_expandCoe___spec__1(x_3, x_9, x_10, x_4, x_5, x_6, x_7, x_8);
|
||||
x_11 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_3, x_9, x_10, x_4, x_5, x_6, x_7, x_8);
|
||||
return x_11;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
stage0/stdlib/Lean/Elab/PreDefinition/Main.c
generated
6
stage0/stdlib/Lean/Elab/PreDefinition/Main.c
generated
|
|
@ -86,6 +86,7 @@ lean_object* lean_array_push(lean_object*, lean_object*);
|
|||
lean_object* lean_array_get_size(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__21___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__15___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MessageData_ofList(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial___spec__2___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__21___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -116,7 +117,6 @@ LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_addPreDefinitions
|
|||
LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__20___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_addAndCompileUnsafe(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_uint64_to_usize(uint64_t);
|
||||
lean_object* l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Expr_FindImpl_findUnsafe_x3f(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_addPreDefinitions___closed__7;
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -4036,7 +4036,7 @@ lean_inc(x_8);
|
|||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_24 = l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(x_21, x_22, x_23, x_5, x_6, x_7, x_8, x_9);
|
||||
x_24 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_21, x_22, x_23, x_5, x_6, x_7, x_8, x_9);
|
||||
if (lean_obj_tag(x_24) == 0)
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; size_t x_27; size_t x_28; lean_object* x_29;
|
||||
|
|
@ -4114,7 +4114,7 @@ lean_inc(x_8);
|
|||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_44 = l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(x_41, x_42, x_43, x_5, x_6, x_7, x_8, x_9);
|
||||
x_44 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_41, x_42, x_43, x_5, x_6, x_7, x_8, x_9);
|
||||
if (lean_obj_tag(x_44) == 0)
|
||||
{
|
||||
lean_object* x_45; lean_object* x_46; lean_object* x_47; size_t x_48; size_t x_49; lean_object* x_50;
|
||||
|
|
|
|||
2806
stage0/stdlib/Lean/Elab/PreDefinition/WF/Ite.c
generated
Normal file
2806
stage0/stdlib/Lean/Elab/PreDefinition/WF/Ite.c
generated
Normal file
File diff suppressed because it is too large
Load diff
454
stage0/stdlib/Lean/Elab/PreDefinition/WF/Main.c
generated
454
stage0/stdlib/Lean/Elab/PreDefinition/WF/Main.c
generated
|
|
@ -1,6 +1,6 @@
|
|||
// Lean compiler output
|
||||
// Module: Lean.Elab.PreDefinition.WF.Main
|
||||
// Imports: Init Lean.Elab.PreDefinition.Basic Lean.Elab.PreDefinition.WF.TerminationHint Lean.Elab.PreDefinition.WF.PackDomain Lean.Elab.PreDefinition.WF.PackMutual Lean.Elab.PreDefinition.WF.Rel Lean.Elab.PreDefinition.WF.Fix Lean.Elab.PreDefinition.WF.Eqns
|
||||
// Imports: Init Lean.Elab.PreDefinition.Basic Lean.Elab.PreDefinition.WF.TerminationHint Lean.Elab.PreDefinition.WF.PackDomain Lean.Elab.PreDefinition.WF.PackMutual Lean.Elab.PreDefinition.WF.Rel Lean.Elab.PreDefinition.WF.Fix Lean.Elab.PreDefinition.WF.Eqns Lean.Elab.PreDefinition.WF.Ite
|
||||
#include <lean/lean.h>
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
|
@ -51,13 +51,14 @@ lean_object* lean_array_get_size(lean_object*);
|
|||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope_go___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_string_append(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__6;
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_WF_packMutual(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope(lean_object*);
|
||||
lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_wfRecursion___lambda__1___closed__2;
|
||||
|
|
@ -71,6 +72,7 @@ lean_object* lean_nat_add(lean_object*, lean_object*);
|
|||
LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope_go___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__7;
|
||||
lean_object* l_Lean_mkAppN(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_wfRecursion___closed__3;
|
||||
lean_object* l_Lean_Elab_applyAttributesOf(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_lambdaTelescope___at___private_Lean_Meta_Eqns_0__Lean_Meta_mkSimpleEqThm___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -94,14 +96,17 @@ lean_object* l_Lean_Elab_WF_mkUnaryArg_go___boxed(lean_object*, lean_object*, le
|
|||
lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkLambdaFVars(lean_object*, lean_object*, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1;
|
||||
static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__9;
|
||||
lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_WF_registerEqnsInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Nat_repr(lean_object*);
|
||||
static lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2;
|
||||
lean_object* lean_st_mk_ref(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2032_(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2084_(lean_object*);
|
||||
static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__10;
|
||||
static lean_object* l_Lean_Elab_wfRecursion___closed__5;
|
||||
LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -120,6 +125,7 @@ static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinitio
|
|||
lean_object* l_Lean_Core_transform___at_Lean_Core_betaReduce___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_iteToDIte___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_getFixedPrefix___spec__1(lean_object*, lean_object*, size_t, size_t);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
lean_object* l_Lean_Elab_addAndCompilePartialRec(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -185,6 +191,7 @@ lean_object* l_Lean_Expr_bindingBody_x21(lean_object*);
|
|||
lean_object* l_Lean_Elab_WF_mkFix(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkConst(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_iteToDIte___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__8;
|
||||
static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__7;
|
||||
lean_object* l_Lean_Meta_unfoldDeclsFrom(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -196,7 +203,7 @@ static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinitio
|
|||
static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1;
|
||||
lean_object* l_Lean_Elab_WF_packDomain(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
|
||||
_start:
|
||||
|
|
@ -326,7 +333,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_1 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__4;
|
||||
x_2 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__5;
|
||||
x_3 = lean_unsigned_to_nat(39u);
|
||||
x_3 = lean_unsigned_to_nat(40u);
|
||||
x_4 = lean_unsigned_to_nat(12u);
|
||||
x_5 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__3;
|
||||
x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
|
||||
|
|
@ -706,7 +713,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_1 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__4;
|
||||
x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__1;
|
||||
x_3 = lean_unsigned_to_nat(45u);
|
||||
x_3 = lean_unsigned_to_nat(46u);
|
||||
x_4 = lean_unsigned_to_nat(102u);
|
||||
x_5 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__2;
|
||||
x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
|
||||
|
|
@ -3994,6 +4001,199 @@ return x_24;
|
|||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Meta_iteToDIte___lambda__2___boxed), 6, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Meta_iteToDIte___lambda__1___boxed), 6, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_11;
|
||||
x_11 = lean_usize_dec_lt(x_2, x_1);
|
||||
if (x_11 == 0)
|
||||
{
|
||||
lean_object* x_12;
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
x_12 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_12, 0, x_3);
|
||||
lean_ctor_set(x_12, 1, x_10);
|
||||
return x_12;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16;
|
||||
x_13 = lean_array_uget(x_3, x_2);
|
||||
x_14 = lean_unsigned_to_nat(0u);
|
||||
x_15 = lean_array_uset(x_3, x_2, x_14);
|
||||
x_16 = !lean_is_exclusive(x_13);
|
||||
if (x_16 == 0)
|
||||
{
|
||||
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
x_17 = lean_ctor_get(x_13, 0);
|
||||
x_18 = lean_ctor_get(x_13, 1);
|
||||
x_19 = lean_ctor_get(x_13, 2);
|
||||
x_20 = lean_ctor_get(x_13, 3);
|
||||
x_21 = lean_ctor_get(x_13, 4);
|
||||
x_22 = lean_ctor_get(x_13, 5);
|
||||
x_23 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1;
|
||||
x_24 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2;
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
x_25 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_22, x_23, x_24, x_6, x_7, x_8, x_9, x_10);
|
||||
if (lean_obj_tag(x_25) == 0)
|
||||
{
|
||||
lean_object* x_26; lean_object* x_27; size_t x_28; size_t x_29; lean_object* x_30;
|
||||
x_26 = lean_ctor_get(x_25, 0);
|
||||
lean_inc(x_26);
|
||||
x_27 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_27);
|
||||
lean_dec(x_25);
|
||||
lean_ctor_set(x_13, 5, x_26);
|
||||
x_28 = 1;
|
||||
x_29 = lean_usize_add(x_2, x_28);
|
||||
x_30 = lean_array_uset(x_15, x_2, x_13);
|
||||
x_2 = x_29;
|
||||
x_3 = x_30;
|
||||
x_10 = x_27;
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_32;
|
||||
lean_free_object(x_13);
|
||||
lean_dec(x_21);
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_19);
|
||||
lean_dec(x_18);
|
||||
lean_dec(x_17);
|
||||
lean_dec(x_15);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
x_32 = !lean_is_exclusive(x_25);
|
||||
if (x_32 == 0)
|
||||
{
|
||||
return x_25;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
x_33 = lean_ctor_get(x_25, 0);
|
||||
x_34 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_34);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_25);
|
||||
x_35 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_35, 0, x_33);
|
||||
lean_ctor_set(x_35, 1, x_34);
|
||||
return x_35;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45;
|
||||
x_36 = lean_ctor_get(x_13, 0);
|
||||
x_37 = lean_ctor_get_uint8(x_13, sizeof(void*)*6);
|
||||
x_38 = lean_ctor_get(x_13, 1);
|
||||
x_39 = lean_ctor_get(x_13, 2);
|
||||
x_40 = lean_ctor_get(x_13, 3);
|
||||
x_41 = lean_ctor_get(x_13, 4);
|
||||
x_42 = lean_ctor_get(x_13, 5);
|
||||
lean_inc(x_42);
|
||||
lean_inc(x_41);
|
||||
lean_inc(x_40);
|
||||
lean_inc(x_39);
|
||||
lean_inc(x_38);
|
||||
lean_inc(x_36);
|
||||
lean_dec(x_13);
|
||||
x_43 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1;
|
||||
x_44 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2;
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
x_45 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_42, x_43, x_44, x_6, x_7, x_8, x_9, x_10);
|
||||
if (lean_obj_tag(x_45) == 0)
|
||||
{
|
||||
lean_object* x_46; lean_object* x_47; lean_object* x_48; size_t x_49; size_t x_50; lean_object* x_51;
|
||||
x_46 = lean_ctor_get(x_45, 0);
|
||||
lean_inc(x_46);
|
||||
x_47 = lean_ctor_get(x_45, 1);
|
||||
lean_inc(x_47);
|
||||
lean_dec(x_45);
|
||||
x_48 = lean_alloc_ctor(0, 6, 1);
|
||||
lean_ctor_set(x_48, 0, x_36);
|
||||
lean_ctor_set(x_48, 1, x_38);
|
||||
lean_ctor_set(x_48, 2, x_39);
|
||||
lean_ctor_set(x_48, 3, x_40);
|
||||
lean_ctor_set(x_48, 4, x_41);
|
||||
lean_ctor_set(x_48, 5, x_46);
|
||||
lean_ctor_set_uint8(x_48, sizeof(void*)*6, x_37);
|
||||
x_49 = 1;
|
||||
x_50 = lean_usize_add(x_2, x_49);
|
||||
x_51 = lean_array_uset(x_15, x_2, x_48);
|
||||
x_2 = x_50;
|
||||
x_3 = x_51;
|
||||
x_10 = x_47;
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56;
|
||||
lean_dec(x_41);
|
||||
lean_dec(x_40);
|
||||
lean_dec(x_39);
|
||||
lean_dec(x_38);
|
||||
lean_dec(x_36);
|
||||
lean_dec(x_15);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
x_53 = lean_ctor_get(x_45, 0);
|
||||
lean_inc(x_53);
|
||||
x_54 = lean_ctor_get(x_45, 1);
|
||||
lean_inc(x_54);
|
||||
if (lean_is_exclusive(x_45)) {
|
||||
lean_ctor_release(x_45, 0);
|
||||
lean_ctor_release(x_45, 1);
|
||||
x_55 = x_45;
|
||||
} else {
|
||||
lean_dec_ref(x_45);
|
||||
x_55 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_55)) {
|
||||
x_56 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_56 = x_55;
|
||||
}
|
||||
lean_ctor_set(x_56, 0, x_53);
|
||||
lean_ctor_set(x_56, 1, x_54);
|
||||
return x_56;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_wfRecursion___lambda__1___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -4596,108 +4796,150 @@ return x_46;
|
|||
}
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_11;
|
||||
lean_object* x_13;
|
||||
lean_inc(x_11);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_1);
|
||||
x_11 = l_Lean_Elab_WF_packDomain(x_1, x_2, x_6, x_7, x_8, x_9, x_10);
|
||||
if (lean_obj_tag(x_11) == 0)
|
||||
lean_inc(x_3);
|
||||
x_13 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3(x_1, x_2, x_3, x_6, x_7, x_8, x_9, x_10, x_11, x_12);
|
||||
if (lean_obj_tag(x_13) == 0)
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14;
|
||||
x_12 = lean_ctor_get(x_11, 0);
|
||||
lean_inc(x_12);
|
||||
x_13 = lean_ctor_get(x_11, 1);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_11);
|
||||
lean_inc(x_1);
|
||||
x_14 = l_Lean_Elab_WF_packMutual(x_1, x_2, x_12, x_6, x_7, x_8, x_9, x_13);
|
||||
if (lean_obj_tag(x_14) == 0)
|
||||
lean_object* x_14; lean_object* x_15; lean_object* x_16;
|
||||
x_14 = lean_ctor_get(x_13, 0);
|
||||
lean_inc(x_14);
|
||||
x_15 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_15);
|
||||
lean_dec(x_13);
|
||||
lean_inc(x_11);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_4);
|
||||
x_16 = l_Lean_Elab_WF_packDomain(x_4, x_14, x_8, x_9, x_10, x_11, x_15);
|
||||
if (lean_obj_tag(x_16) == 0)
|
||||
{
|
||||
uint8_t x_15;
|
||||
x_15 = !lean_is_exclusive(x_14);
|
||||
if (x_15 == 0)
|
||||
{
|
||||
lean_object* x_16; lean_object* x_17;
|
||||
x_16 = lean_ctor_get(x_14, 0);
|
||||
x_17 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_17, 0, x_16);
|
||||
lean_ctor_set(x_17, 1, x_1);
|
||||
lean_ctor_set(x_14, 0, x_17);
|
||||
return x_14;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21;
|
||||
x_18 = lean_ctor_get(x_14, 0);
|
||||
x_19 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_19);
|
||||
lean_object* x_17; lean_object* x_18; lean_object* x_19;
|
||||
x_17 = lean_ctor_get(x_16, 0);
|
||||
lean_inc(x_17);
|
||||
x_18 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_14);
|
||||
x_20 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_20, 0, x_18);
|
||||
lean_ctor_set(x_20, 1, x_1);
|
||||
x_21 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_21, 0, x_20);
|
||||
lean_ctor_set(x_21, 1, x_19);
|
||||
return x_21;
|
||||
}
|
||||
lean_dec(x_16);
|
||||
lean_inc(x_4);
|
||||
x_19 = l_Lean_Elab_WF_packMutual(x_4, x_3, x_17, x_8, x_9, x_10, x_11, x_18);
|
||||
if (lean_obj_tag(x_19) == 0)
|
||||
{
|
||||
uint8_t x_20;
|
||||
x_20 = !lean_is_exclusive(x_19);
|
||||
if (x_20 == 0)
|
||||
{
|
||||
lean_object* x_21; lean_object* x_22;
|
||||
x_21 = lean_ctor_get(x_19, 0);
|
||||
x_22 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_22, 0, x_21);
|
||||
lean_ctor_set(x_22, 1, x_4);
|
||||
lean_ctor_set(x_19, 0, x_22);
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_22;
|
||||
lean_dec(x_1);
|
||||
x_22 = !lean_is_exclusive(x_14);
|
||||
if (x_22 == 0)
|
||||
{
|
||||
return x_14;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
x_23 = lean_ctor_get(x_14, 0);
|
||||
x_24 = lean_ctor_get(x_14, 1);
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26;
|
||||
x_23 = lean_ctor_get(x_19, 0);
|
||||
x_24 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_24);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_14);
|
||||
x_25 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_dec(x_19);
|
||||
x_25 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_25, 0, x_23);
|
||||
lean_ctor_set(x_25, 1, x_24);
|
||||
return x_25;
|
||||
lean_ctor_set(x_25, 1, x_4);
|
||||
x_26 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_25);
|
||||
lean_ctor_set(x_26, 1, x_24);
|
||||
return x_26;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_27;
|
||||
lean_dec(x_4);
|
||||
x_27 = !lean_is_exclusive(x_19);
|
||||
if (x_27 == 0)
|
||||
{
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_28 = lean_ctor_get(x_19, 0);
|
||||
x_29 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_29);
|
||||
lean_inc(x_28);
|
||||
lean_dec(x_19);
|
||||
x_30 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_30, 0, x_28);
|
||||
lean_ctor_set(x_30, 1, x_29);
|
||||
return x_30;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_26;
|
||||
uint8_t x_31;
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_26 = !lean_is_exclusive(x_11);
|
||||
if (x_26 == 0)
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_31 = !lean_is_exclusive(x_16);
|
||||
if (x_31 == 0)
|
||||
{
|
||||
return x_11;
|
||||
return x_16;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_27; lean_object* x_28; lean_object* x_29;
|
||||
x_27 = lean_ctor_get(x_11, 0);
|
||||
x_28 = lean_ctor_get(x_11, 1);
|
||||
lean_inc(x_28);
|
||||
lean_inc(x_27);
|
||||
lean_object* x_32; lean_object* x_33; lean_object* x_34;
|
||||
x_32 = lean_ctor_get(x_16, 0);
|
||||
x_33 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_33);
|
||||
lean_inc(x_32);
|
||||
lean_dec(x_16);
|
||||
x_34 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_34, 0, x_32);
|
||||
lean_ctor_set(x_34, 1, x_33);
|
||||
return x_34;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_35;
|
||||
lean_dec(x_11);
|
||||
x_29 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_27);
|
||||
lean_ctor_set(x_29, 1, x_28);
|
||||
return x_29;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_35 = !lean_is_exclusive(x_13);
|
||||
if (x_35 == 0)
|
||||
{
|
||||
return x_13;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_36; lean_object* x_37; lean_object* x_38;
|
||||
x_36 = lean_ctor_get(x_13, 0);
|
||||
x_37 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_37);
|
||||
lean_inc(x_36);
|
||||
lean_dec(x_13);
|
||||
x_38 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_38, 0, x_36);
|
||||
lean_ctor_set(x_38, 1, x_37);
|
||||
return x_38;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4843,7 +5085,7 @@ lean_inc(x_8);
|
|||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_1);
|
||||
x_76 = l_Lean_Elab_wfRecursion___lambda__5(x_71, x_1, x_67, x_4, x_5, x_6, x_7, x_8, x_9, x_75);
|
||||
x_76 = l_Lean_Elab_wfRecursion___lambda__5(x_12, x_13, x_1, x_71, x_67, x_4, x_5, x_6, x_7, x_8, x_9, x_75);
|
||||
if (lean_obj_tag(x_76) == 0)
|
||||
{
|
||||
lean_object* x_77; lean_object* x_78;
|
||||
|
|
@ -4925,7 +5167,7 @@ lean_inc(x_8);
|
|||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_1);
|
||||
x_96 = l_Lean_Elab_wfRecursion___lambda__5(x_71, x_1, x_94, x_4, x_5, x_6, x_7, x_8, x_9, x_95);
|
||||
x_96 = l_Lean_Elab_wfRecursion___lambda__5(x_12, x_13, x_1, x_71, x_94, x_4, x_5, x_6, x_7, x_8, x_9, x_95);
|
||||
lean_dec(x_94);
|
||||
if (lean_obj_tag(x_96) == 0)
|
||||
{
|
||||
|
|
@ -5257,6 +5499,20 @@ lean_dec(x_1);
|
|||
return x_14;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
_start:
|
||||
{
|
||||
size_t x_11; size_t x_12; lean_object* x_13;
|
||||
x_11 = lean_unbox_usize(x_1);
|
||||
lean_dec(x_1);
|
||||
x_12 = lean_unbox_usize(x_2);
|
||||
lean_dec(x_2);
|
||||
x_13 = l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3(x_11, x_12, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
return x_13;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -5288,18 +5544,22 @@ lean_dec(x_6);
|
|||
return x_16;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_11;
|
||||
x_11 = l_Lean_Elab_wfRecursion___lambda__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
|
||||
size_t x_13; size_t x_14; lean_object* x_15;
|
||||
x_13 = lean_unbox_usize(x_1);
|
||||
lean_dec(x_1);
|
||||
x_14 = lean_unbox_usize(x_2);
|
||||
lean_dec(x_2);
|
||||
x_15 = l_Lean_Elab_wfRecursion___lambda__5(x_13, x_14, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
return x_11;
|
||||
return x_15;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2032_(lean_object* x_1) {
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2084_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3;
|
||||
|
|
@ -5316,6 +5576,7 @@ lean_object* initialize_Lean_Elab_PreDefinition_WF_PackMutual(uint8_t builtin, l
|
|||
lean_object* initialize_Lean_Elab_PreDefinition_WF_Rel(uint8_t builtin, lean_object*);
|
||||
lean_object* initialize_Lean_Elab_PreDefinition_WF_Fix(uint8_t builtin, lean_object*);
|
||||
lean_object* initialize_Lean_Elab_PreDefinition_WF_Eqns(uint8_t builtin, lean_object*);
|
||||
lean_object* initialize_Lean_Elab_PreDefinition_WF_Ite(uint8_t builtin, lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
LEAN_EXPORT lean_object* initialize_Lean_Elab_PreDefinition_WF_Main(uint8_t builtin, lean_object* w) {
|
||||
lean_object * res;
|
||||
|
|
@ -5345,6 +5606,9 @@ lean_dec_ref(res);
|
|||
res = initialize_Lean_Elab_PreDefinition_WF_Eqns(builtin, lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Lean_Elab_PreDefinition_WF_Ite(builtin, lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1 = _init_l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1);
|
||||
l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__2 = _init_l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__2();
|
||||
|
|
@ -5413,6 +5677,10 @@ l_Lean_Elab_getFixedPrefix___lambda__2___closed__1 = _init_l_Lean_Elab_getFixedP
|
|||
lean_mark_persistent(l_Lean_Elab_getFixedPrefix___lambda__2___closed__1);
|
||||
l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__1___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__1___closed__1();
|
||||
lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__1___closed__1);
|
||||
l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1 = _init_l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1();
|
||||
lean_mark_persistent(l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__1);
|
||||
l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2 = _init_l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2();
|
||||
lean_mark_persistent(l_Array_mapMUnsafe_map___at_Lean_Elab_wfRecursion___spec__3___closed__2);
|
||||
l_Lean_Elab_wfRecursion___lambda__1___closed__1 = _init_l_Lean_Elab_wfRecursion___lambda__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_wfRecursion___lambda__1___closed__1);
|
||||
l_Lean_Elab_wfRecursion___lambda__1___closed__2 = _init_l_Lean_Elab_wfRecursion___lambda__1___closed__2();
|
||||
|
|
@ -5433,7 +5701,7 @@ l_Lean_Elab_wfRecursion___closed__5 = _init_l_Lean_Elab_wfRecursion___closed__5(
|
|||
lean_mark_persistent(l_Lean_Elab_wfRecursion___closed__5);
|
||||
l_Lean_Elab_wfRecursion___closed__6 = _init_l_Lean_Elab_wfRecursion___closed__6();
|
||||
lean_mark_persistent(l_Lean_Elab_wfRecursion___closed__6);
|
||||
res = l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2032_(lean_io_mk_world());
|
||||
res = l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_2084_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
|
|
|
|||
6
stage0/stdlib/Lean/Elab/Structure.c
generated
6
stage0/stdlib/Lean/Elab/Structure.c
generated
|
|
@ -188,6 +188,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_el
|
|||
lean_object* lean_string_append(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_copyNewFieldsFrom_copyFields_copy___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Command_structureDiamondWarning;
|
||||
lean_object* l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_applyAttributesAt(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_registerStructure___spec__2___closed__4;
|
||||
|
|
@ -277,7 +278,6 @@ LEAN_EXPORT lean_object* l_panic___at___private_Lean_Elab_Structure_0__Lean_Elab
|
|||
static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_elabStructureView___spec__5___closed__4;
|
||||
lean_object* l_Lean_Elab_Term_addAutoBoundImplicits___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_elabModifiers___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_LocalContext_setBinderInfo(lean_object*, lean_object*, uint8_t);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_elabStructureView___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -9993,7 +9993,7 @@ lean_inc(x_7);
|
|||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
x_17 = l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(x_13, x_16, x_15, x_4, x_5, x_6, x_7, x_14);
|
||||
x_17 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_13, x_16, x_15, x_4, x_5, x_6, x_7, x_14);
|
||||
if (lean_obj_tag(x_17) == 0)
|
||||
{
|
||||
uint8_t x_18;
|
||||
|
|
@ -10514,7 +10514,7 @@ lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
|||
x_8 = lean_alloc_closure((void*)(l___private_Lean_Elab_Structure_0__Lean_Elab_Command_reduceProjs___lambda__1), 7, 1);
|
||||
lean_closure_set(x_8, 0, x_2);
|
||||
x_9 = l___private_Lean_Elab_Structure_0__Lean_Elab_Command_getFieldType___lambda__4___closed__1;
|
||||
x_10 = l_Lean_Meta_transform___at_Lean_Meta_Match_unfoldNamedPattern___spec__1(x_1, x_9, x_8, x_3, x_4, x_5, x_6, x_7);
|
||||
x_10 = l_Lean_Meta_transform___at_Lean_Meta_iteToDIte___spec__1(x_1, x_9, x_8, x_3, x_4, x_5, x_6, x_7);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue