From 74fbca56631d12f30b62af781d6d105cec0e1f4f Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Wed, 13 Jan 2021 16:34:31 -0800 Subject: [PATCH] chore: update stage0 --- stage0/src/Lean/Elab/PreDefinition/Main.lean | 2 +- stage0/src/Lean/Meta/ExprDefEq.lean | 2 +- stage0/src/Lean/Meta/SynthInstance.lean | 14 +- stage0/stdlib/Lean/Elab/PreDefinition/Main.c | 1030 ++++++------ stage0/stdlib/Lean/Meta/ExprDefEq.c | 1498 ++++++++++-------- stage0/stdlib/Lean/Meta/SynthInstance.c | 134 +- 6 files changed, 1477 insertions(+), 1203 deletions(-) diff --git a/stage0/src/Lean/Elab/PreDefinition/Main.lean b/stage0/src/Lean/Elab/PreDefinition/Main.lean index 540c8d6b0b..d5b94e69b0 100644 --- a/stage0/src/Lean/Elab/PreDefinition/Main.lean +++ b/stage0/src/Lean/Elab/PreDefinition/Main.lean @@ -68,7 +68,7 @@ def addPreDefinitions (preDefs : Array PreDefinition) : TermElabM Unit := do addAndCompileUnsafe preDefs else if preDefs.any (·.modifiers.isPartial) then addAndCompilePartial preDefs - else + else withRef (preDefs[0].ref) do mapError (orelseMergeErrors (structuralRecursion preDefs) diff --git a/stage0/src/Lean/Meta/ExprDefEq.lean b/stage0/src/Lean/Meta/ExprDefEq.lean index bf80ec3681..d1617f86cc 100644 --- a/stage0/src/Lean/Meta/ExprDefEq.lean +++ b/stage0/src/Lean/Meta/ExprDefEq.lean @@ -1287,7 +1287,7 @@ end @[specialize] private def unstuckMVar (e : Expr) (successK : Expr → MetaM Bool) (failK : MetaM Bool): MetaM Bool := do match (← getStuckMVar? e) with | some mvarId => - trace[Meta.isDefEq.stuckMVar]! "found stuck MVar {mkMVar mvarId}" + trace[Meta.isDefEq.stuckMVar]! "found stuck MVar {mkMVar mvarId} : {← inferType (mkMVar mvarId)}" if (← Meta.synthPending mvarId) then let e ← instantiateMVars e successK e diff --git a/stage0/src/Lean/Meta/SynthInstance.lean b/stage0/src/Lean/Meta/SynthInstance.lean index a560e70553..30f5ac7ff1 100644 --- a/stage0/src/Lean/Meta/SynthInstance.lean +++ b/stage0/src/Lean/Meta/SynthInstance.lean @@ -17,11 +17,11 @@ namespace SynthInstance open Std (HashMap) -builtin_initialize inferTCGoalsLRAttr : TagAttribute ← - registerTagAttribute `inferTCGoalsLR "instruct type class resolution procedure to solve goals from left to right for this instance" +builtin_initialize inferTCGoalsRLAttr : TagAttribute ← + registerTagAttribute `inferTCGoalsRL "instruct type class resolution procedure to solve goals from right to left for this instance" -def hasInferTCGoalsLRAttribute (env : Environment) (constName : Name) : Bool := - inferTCGoalsLRAttr.hasTag env constName +def hasInferTCGoalsRLAttribute (env : Environment) (constName : Name) : Bool := + inferTCGoalsRLAttr.hasTag env constName structure GeneratorNode where mvar : Expr @@ -287,10 +287,10 @@ def getSubgoals (lctx : LocalContext) (localInsts : LocalInstances) (xs : Array match inst.getAppFn with | Expr.const constName _ _ => let env ← getEnv - if hasInferTCGoalsLRAttribute env constName then - pure { result with subgoals := result.subgoals.reverse } - else + if hasInferTCGoalsRLAttribute env constName then pure result + else + pure { result with subgoals := result.subgoals.reverse } | _ => pure result def tryResolveCore (mvar : Expr) (inst : Expr) : MetaM (Option (MetavarContext × List Expr)) := do diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/Main.c b/stage0/stdlib/Lean/Elab/PreDefinition/Main.c index 02a8aa0fd1..6da1e395d6 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/Main.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/Main.c @@ -88,6 +88,7 @@ lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_addSCC_add___at___private_Lea lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8(lean_object*, size_t, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__1___closed__3; uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__5(lean_object*, size_t, size_t); +lean_object* l_Lean_replaceRef(lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial___spec__1(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -3562,568 +3563,667 @@ return x_3; lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t 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_122; lean_object* x_123; lean_object* x_139; lean_object* x_140; lean_object* x_141; uint8_t x_142; -x_139 = lean_st_ref_get(x_8, x_9); -x_140 = lean_ctor_get(x_139, 0); -lean_inc(x_140); -x_141 = lean_ctor_get(x_140, 3); -lean_inc(x_141); -lean_dec(x_140); -x_142 = lean_ctor_get_uint8(x_141, sizeof(void*)*1); -lean_dec(x_141); -if (x_142 == 0) +lean_object* x_10; uint8_t x_149; lean_object* x_150; lean_object* x_166; lean_object* x_167; lean_object* x_168; uint8_t x_169; +x_166 = lean_st_ref_get(x_8, x_9); +x_167 = lean_ctor_get(x_166, 0); +lean_inc(x_167); +x_168 = lean_ctor_get(x_167, 3); +lean_inc(x_168); +lean_dec(x_167); +x_169 = lean_ctor_get_uint8(x_168, sizeof(void*)*1); +lean_dec(x_168); +if (x_169 == 0) { -lean_object* x_143; uint8_t x_144; -x_143 = lean_ctor_get(x_139, 1); -lean_inc(x_143); -lean_dec(x_139); -x_144 = 0; -x_122 = x_144; -x_123 = x_143; -goto block_138; +lean_object* x_170; uint8_t x_171; +x_170 = lean_ctor_get(x_166, 1); +lean_inc(x_170); +lean_dec(x_166); +x_171 = 0; +x_149 = x_171; +x_150 = x_170; +goto block_165; } else { -lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; uint8_t x_150; -x_145 = lean_ctor_get(x_139, 1); -lean_inc(x_145); -lean_dec(x_139); -x_146 = l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__3___closed__2; -x_147 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_146, x_2, x_3, x_5, x_6, x_7, x_8, x_145); -x_148 = lean_ctor_get(x_147, 0); -lean_inc(x_148); -x_149 = lean_ctor_get(x_147, 1); -lean_inc(x_149); -lean_dec(x_147); -x_150 = lean_unbox(x_148); -lean_dec(x_148); -x_122 = x_150; -x_123 = x_149; -goto block_138; +lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; uint8_t x_177; +x_172 = lean_ctor_get(x_166, 1); +lean_inc(x_172); +lean_dec(x_166); +x_173 = l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__3___closed__2; +x_174 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_173, x_2, x_3, x_5, x_6, x_7, x_8, x_172); +x_175 = lean_ctor_get(x_174, 0); +lean_inc(x_175); +x_176 = lean_ctor_get(x_174, 1); +lean_inc(x_176); +lean_dec(x_174); +x_177 = lean_unbox(x_175); +lean_dec(x_175); +x_149 = x_177; +x_150 = x_176; +goto block_165; } -block_121: +block_148: { -lean_object* x_11; lean_object* x_28; lean_object* x_29; lean_object* x_50; uint8_t x_51; -x_28 = lean_array_get_size(x_1); -x_50 = lean_unsigned_to_nat(1u); -x_51 = lean_nat_dec_eq(x_28, x_50); -if (x_51 == 0) -{ -lean_object* x_52; uint8_t x_53; -x_52 = lean_unsigned_to_nat(0u); -x_53 = lean_nat_dec_lt(x_52, x_28); -if (x_53 == 0) -{ -lean_object* x_54; -x_54 = lean_box(0); -x_29 = x_54; -goto block_49; -} -else -{ -uint8_t x_55; -x_55 = lean_nat_dec_le(x_28, x_28); -if (x_55 == 0) -{ -lean_object* x_56; -x_56 = lean_box(0); -x_29 = x_56; -goto block_49; -} -else -{ -size_t x_57; uint8_t x_58; -x_57 = lean_usize_of_nat(x_28); -x_58 = l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__5(x_1, x_4, x_57); -if (x_58 == 0) -{ -lean_object* x_59; -x_59 = lean_box(0); -x_29 = x_59; -goto block_49; -} -else -{ -uint8_t x_60; lean_object* x_61; -lean_dec(x_28); -x_60 = 0; -x_61 = l_Lean_Elab_addAndCompileUnsafe(x_1, x_60, x_2, x_3, x_5, x_6, x_7, x_8, x_10); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -if (lean_obj_tag(x_61) == 0) -{ -uint8_t x_62; -x_62 = !lean_is_exclusive(x_61); -if (x_62 == 0) -{ -lean_object* x_63; lean_object* x_64; -x_63 = lean_ctor_get(x_61, 0); -lean_dec(x_63); -x_64 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -lean_ctor_set(x_61, 0, x_64); -return x_61; -} -else -{ -lean_object* x_65; lean_object* x_66; lean_object* x_67; -x_65 = lean_ctor_get(x_61, 1); -lean_inc(x_65); -lean_dec(x_61); -x_66 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -x_67 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_67, 0, x_66); -lean_ctor_set(x_67, 1, x_65); -return x_67; -} -} -else -{ -uint8_t x_68; -x_68 = !lean_is_exclusive(x_61); -if (x_68 == 0) -{ -return x_61; -} -else -{ -lean_object* x_69; lean_object* x_70; lean_object* x_71; -x_69 = lean_ctor_get(x_61, 0); -x_70 = lean_ctor_get(x_61, 1); -lean_inc(x_70); -lean_inc(x_69); -lean_dec(x_61); -x_71 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_71, 0, x_69); -lean_ctor_set(x_71, 1, x_70); -return x_71; -} -} -} -} -} -} -else -{ -lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; -x_72 = l_Lean_Elab_instInhabitedPreDefinition; -x_73 = lean_unsigned_to_nat(0u); -x_74 = lean_array_get(x_72, x_1, x_73); -lean_inc(x_74); -x_75 = l___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_isNonRecursive(x_74); -if (x_75 == 0) -{ -uint8_t x_76; -lean_dec(x_74); -x_76 = lean_nat_dec_lt(x_73, x_28); -if (x_76 == 0) -{ -lean_object* x_77; -x_77 = lean_box(0); -x_29 = x_77; -goto block_49; -} -else -{ -uint8_t x_78; -x_78 = lean_nat_dec_le(x_28, x_28); +lean_object* x_11; lean_object* x_55; lean_object* x_56; lean_object* x_77; uint8_t x_78; +x_55 = lean_array_get_size(x_1); +x_77 = lean_unsigned_to_nat(1u); +x_78 = lean_nat_dec_eq(x_55, x_77); if (x_78 == 0) { -lean_object* x_79; -x_79 = lean_box(0); -x_29 = x_79; -goto block_49; +lean_object* x_79; uint8_t x_80; +x_79 = lean_unsigned_to_nat(0u); +x_80 = lean_nat_dec_lt(x_79, x_55); +if (x_80 == 0) +{ +lean_object* x_81; +x_81 = lean_box(0); +x_56 = x_81; +goto block_76; } else { -size_t x_80; uint8_t x_81; -x_80 = lean_usize_of_nat(x_28); -x_81 = l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__5(x_1, x_4, x_80); -if (x_81 == 0) +uint8_t x_82; +x_82 = lean_nat_dec_le(x_55, x_55); +if (x_82 == 0) { -lean_object* x_82; -x_82 = lean_box(0); -x_29 = x_82; -goto block_49; +lean_object* x_83; +x_83 = lean_box(0); +x_56 = x_83; +goto block_76; } else { -uint8_t x_83; lean_object* x_84; -lean_dec(x_28); -x_83 = 0; -x_84 = l_Lean_Elab_addAndCompileUnsafe(x_1, x_83, x_2, x_3, x_5, x_6, x_7, x_8, x_10); +size_t x_84; uint8_t x_85; +x_84 = lean_usize_of_nat(x_55); +x_85 = l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__5(x_1, x_4, x_84); +if (x_85 == 0) +{ +lean_object* x_86; +x_86 = lean_box(0); +x_56 = x_86; +goto block_76; +} +else +{ +uint8_t x_87; lean_object* x_88; +lean_dec(x_55); +x_87 = 0; +x_88 = l_Lean_Elab_addAndCompileUnsafe(x_1, x_87, x_2, x_3, x_5, x_6, x_7, x_8, x_10); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); -if (lean_obj_tag(x_84) == 0) +if (lean_obj_tag(x_88) == 0) { -uint8_t x_85; -x_85 = !lean_is_exclusive(x_84); -if (x_85 == 0) +uint8_t x_89; +x_89 = !lean_is_exclusive(x_88); +if (x_89 == 0) { -lean_object* x_86; lean_object* x_87; -x_86 = lean_ctor_get(x_84, 0); -lean_dec(x_86); -x_87 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -lean_ctor_set(x_84, 0, x_87); -return x_84; -} -else -{ -lean_object* x_88; lean_object* x_89; lean_object* x_90; -x_88 = lean_ctor_get(x_84, 1); -lean_inc(x_88); -lean_dec(x_84); -x_89 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -x_90 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_90, 0, x_89); -lean_ctor_set(x_90, 1, x_88); -return x_90; -} -} -else -{ -uint8_t x_91; -x_91 = !lean_is_exclusive(x_84); -if (x_91 == 0) -{ -return x_84; +lean_object* x_90; lean_object* x_91; +x_90 = lean_ctor_get(x_88, 0); +lean_dec(x_90); +x_91 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +lean_ctor_set(x_88, 0, x_91); +return x_88; } else { lean_object* x_92; lean_object* x_93; lean_object* x_94; -x_92 = lean_ctor_get(x_84, 0); -x_93 = lean_ctor_get(x_84, 1); -lean_inc(x_93); +x_92 = lean_ctor_get(x_88, 1); lean_inc(x_92); -lean_dec(x_84); -x_94 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_94, 0, x_92); -lean_ctor_set(x_94, 1, x_93); +lean_dec(x_88); +x_93 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +x_94 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_94, 0, x_93); +lean_ctor_set(x_94, 1, x_92); return x_94; } } -} -} -} +else +{ +uint8_t x_95; +x_95 = !lean_is_exclusive(x_88); +if (x_95 == 0) +{ +return x_88; } else { -lean_object* x_95; uint8_t x_96; -lean_dec(x_28); -lean_dec(x_1); -x_95 = lean_ctor_get(x_74, 2); -lean_inc(x_95); -x_96 = lean_ctor_get_uint8(x_95, sizeof(void*)*2 + 1); -lean_dec(x_95); -if (x_96 == 0) -{ -uint8_t x_97; lean_object* x_98; -x_97 = 1; -x_98 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux(x_74, x_97, x_2, x_3, x_5, x_6, x_7, x_8, x_10); -lean_dec(x_3); -if (lean_obj_tag(x_98) == 0) -{ -uint8_t x_99; -x_99 = !lean_is_exclusive(x_98); -if (x_99 == 0) -{ -lean_object* x_100; lean_object* x_101; -x_100 = lean_ctor_get(x_98, 0); -lean_dec(x_100); -x_101 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -lean_ctor_set(x_98, 0, x_101); +lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_96 = lean_ctor_get(x_88, 0); +x_97 = lean_ctor_get(x_88, 1); +lean_inc(x_97); +lean_inc(x_96); +lean_dec(x_88); +x_98 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_98, 0, x_96); +lean_ctor_set(x_98, 1, x_97); return x_98; } +} +} +} +} +} else { -lean_object* x_102; lean_object* x_103; lean_object* x_104; -x_102 = lean_ctor_get(x_98, 1); -lean_inc(x_102); -lean_dec(x_98); -x_103 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -x_104 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_104, 0, x_103); -lean_ctor_set(x_104, 1, x_102); -return x_104; -} +lean_object* x_99; lean_object* x_100; lean_object* x_101; uint8_t x_102; +x_99 = l_Lean_Elab_instInhabitedPreDefinition; +x_100 = lean_unsigned_to_nat(0u); +x_101 = lean_array_get(x_99, x_1, x_100); +lean_inc(x_101); +x_102 = l___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_isNonRecursive(x_101); +if (x_102 == 0) +{ +uint8_t x_103; +lean_dec(x_101); +x_103 = lean_nat_dec_lt(x_100, x_55); +if (x_103 == 0) +{ +lean_object* x_104; +x_104 = lean_box(0); +x_56 = x_104; +goto block_76; } else { uint8_t x_105; -x_105 = !lean_is_exclusive(x_98); +x_105 = lean_nat_dec_le(x_55, x_55); if (x_105 == 0) { -return x_98; +lean_object* x_106; +x_106 = lean_box(0); +x_56 = x_106; +goto block_76; } else { -lean_object* x_106; lean_object* x_107; lean_object* x_108; -x_106 = lean_ctor_get(x_98, 0); -x_107 = lean_ctor_get(x_98, 1); -lean_inc(x_107); -lean_inc(x_106); -lean_dec(x_98); -x_108 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_108, 0, x_106); -lean_ctor_set(x_108, 1, x_107); -return x_108; -} -} +size_t x_107; uint8_t x_108; +x_107 = lean_usize_of_nat(x_55); +x_108 = l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__5(x_1, x_4, x_107); +if (x_108 == 0) +{ +lean_object* x_109; +x_109 = lean_box(0); +x_56 = x_109; +goto block_76; } else { -uint8_t x_109; lean_object* x_110; -x_109 = 0; -x_110 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux(x_74, x_109, x_2, x_3, x_5, x_6, x_7, x_8, x_10); +uint8_t x_110; lean_object* x_111; +lean_dec(x_55); +x_110 = 0; +x_111 = l_Lean_Elab_addAndCompileUnsafe(x_1, x_110, x_2, x_3, x_5, x_6, x_7, x_8, x_10); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_3); -if (lean_obj_tag(x_110) == 0) +if (lean_obj_tag(x_111) == 0) { -uint8_t x_111; -x_111 = !lean_is_exclusive(x_110); -if (x_111 == 0) +uint8_t x_112; +x_112 = !lean_is_exclusive(x_111); +if (x_112 == 0) { -lean_object* x_112; lean_object* x_113; -x_112 = lean_ctor_get(x_110, 0); -lean_dec(x_112); -x_113 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -lean_ctor_set(x_110, 0, x_113); -return x_110; +lean_object* x_113; lean_object* x_114; +x_113 = lean_ctor_get(x_111, 0); +lean_dec(x_113); +x_114 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +lean_ctor_set(x_111, 0, x_114); +return x_111; } else { -lean_object* x_114; lean_object* x_115; lean_object* x_116; -x_114 = lean_ctor_get(x_110, 1); -lean_inc(x_114); -lean_dec(x_110); -x_115 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -x_116 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_116, 0, x_115); -lean_ctor_set(x_116, 1, x_114); -return x_116; +lean_object* x_115; lean_object* x_116; lean_object* x_117; +x_115 = lean_ctor_get(x_111, 1); +lean_inc(x_115); +lean_dec(x_111); +x_116 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +x_117 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_117, 0, x_116); +lean_ctor_set(x_117, 1, x_115); +return x_117; } } else { -uint8_t x_117; -x_117 = !lean_is_exclusive(x_110); -if (x_117 == 0) +uint8_t x_118; +x_118 = !lean_is_exclusive(x_111); +if (x_118 == 0) { -return x_110; +return x_111; } else { -lean_object* x_118; lean_object* x_119; lean_object* x_120; -x_118 = lean_ctor_get(x_110, 0); -x_119 = lean_ctor_get(x_110, 1); +lean_object* x_119; lean_object* x_120; lean_object* x_121; +x_119 = lean_ctor_get(x_111, 0); +x_120 = lean_ctor_get(x_111, 1); +lean_inc(x_120); lean_inc(x_119); -lean_inc(x_118); -lean_dec(x_110); -x_120 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_120, 0, x_118); -lean_ctor_set(x_120, 1, x_119); -return x_120; +lean_dec(x_111); +x_121 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_121, 0, x_119); +lean_ctor_set(x_121, 1, x_120); +return x_121; } } } } } -block_27: +} +else { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +lean_object* x_122; uint8_t x_123; +lean_dec(x_55); +lean_dec(x_1); +x_122 = lean_ctor_get(x_101, 2); +lean_inc(x_122); +x_123 = lean_ctor_get_uint8(x_122, sizeof(void*)*2 + 1); +lean_dec(x_122); +if (x_123 == 0) +{ +uint8_t x_124; lean_object* x_125; +x_124 = 1; +x_125 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux(x_101, x_124, x_2, x_3, x_5, x_6, x_7, x_8, x_10); +lean_dec(x_3); +if (lean_obj_tag(x_125) == 0) +{ +uint8_t x_126; +x_126 = !lean_is_exclusive(x_125); +if (x_126 == 0) +{ +lean_object* x_127; lean_object* x_128; +x_127 = lean_ctor_get(x_125, 0); +lean_dec(x_127); +x_128 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +lean_ctor_set(x_125, 0, x_128); +return x_125; +} +else +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; +x_129 = lean_ctor_get(x_125, 1); +lean_inc(x_129); +lean_dec(x_125); +x_130 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +x_131 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_131, 0, x_130); +lean_ctor_set(x_131, 1, x_129); +return x_131; +} +} +else +{ +uint8_t x_132; +x_132 = !lean_is_exclusive(x_125); +if (x_132 == 0) +{ +return x_125; +} +else +{ +lean_object* x_133; lean_object* x_134; lean_object* x_135; +x_133 = lean_ctor_get(x_125, 0); +x_134 = lean_ctor_get(x_125, 1); +lean_inc(x_134); +lean_inc(x_133); +lean_dec(x_125); +x_135 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_135, 0, x_133); +lean_ctor_set(x_135, 1, x_134); +return x_135; +} +} +} +else +{ +uint8_t x_136; lean_object* x_137; +x_136 = 0; +x_137 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux(x_101, x_136, x_2, x_3, x_5, x_6, x_7, x_8, x_10); +lean_dec(x_3); +if (lean_obj_tag(x_137) == 0) +{ +uint8_t x_138; +x_138 = !lean_is_exclusive(x_137); +if (x_138 == 0) +{ +lean_object* x_139; lean_object* x_140; +x_139 = lean_ctor_get(x_137, 0); +lean_dec(x_139); +x_140 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +lean_ctor_set(x_137, 0, x_140); +return x_137; +} +else +{ +lean_object* x_141; lean_object* x_142; lean_object* x_143; +x_141 = lean_ctor_get(x_137, 1); +lean_inc(x_141); +lean_dec(x_137); +x_142 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +x_143 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_143, 0, x_142); +lean_ctor_set(x_143, 1, x_141); +return x_143; +} +} +else +{ +uint8_t x_144; +x_144 = !lean_is_exclusive(x_137); +if (x_144 == 0) +{ +return x_137; +} +else +{ +lean_object* x_145; lean_object* x_146; lean_object* x_147; +x_145 = lean_ctor_get(x_137, 0); +x_146 = lean_ctor_get(x_137, 1); +lean_inc(x_146); +lean_inc(x_145); +lean_dec(x_137); +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; +} +} +} +} +} +block_54: +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_dec(x_11); +x_12 = l_Lean_Elab_instInhabitedPreDefinition; +x_13 = lean_unsigned_to_nat(0u); +x_14 = lean_array_get(x_12, x_1, x_13); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +lean_dec(x_14); lean_inc(x_1); -x_12 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__1), 2, 1); -lean_closure_set(x_12, 0, x_1); -x_13 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__2), 8, 3); -lean_closure_set(x_13, 0, x_1); -lean_closure_set(x_13, 1, x_2); -lean_closure_set(x_13, 2, x_3); -x_14 = l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___lambda__2___closed__1; -x_15 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); -lean_closure_set(x_15, 0, x_13); -lean_closure_set(x_15, 1, x_14); -x_16 = l_Lean_Meta_mapErrorImp___rarg(x_15, x_12, x_5, x_6, x_7, x_8, x_10); -if (lean_obj_tag(x_16) == 0) -{ -uint8_t x_17; -x_17 = !lean_is_exclusive(x_16); +x_16 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__1), 2, 1); +lean_closure_set(x_16, 0, x_1); +x_17 = !lean_is_exclusive(x_7); if (x_17 == 0) { -lean_object* x_18; lean_object* x_19; -x_18 = lean_ctor_get(x_16, 0); +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_18 = lean_ctor_get(x_7, 3); +x_19 = l_Lean_replaceRef(x_15, x_18); lean_dec(x_18); -x_19 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -lean_ctor_set(x_16, 0, x_19); -return x_16; +lean_dec(x_15); +lean_ctor_set(x_7, 3, x_19); +x_20 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__2), 8, 3); +lean_closure_set(x_20, 0, x_1); +lean_closure_set(x_20, 1, x_2); +lean_closure_set(x_20, 2, x_3); +x_21 = l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___lambda__2___closed__1; +x_22 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); +lean_closure_set(x_22, 0, x_20); +lean_closure_set(x_22, 1, x_21); +x_23 = l_Lean_Meta_mapErrorImp___rarg(x_22, x_16, x_5, x_6, x_7, x_8, x_10); +if (lean_obj_tag(x_23) == 0) +{ +uint8_t x_24; +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_23, 0); +lean_dec(x_25); +x_26 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +lean_ctor_set(x_23, 0, x_26); +return x_23; } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_20 = lean_ctor_get(x_16, 1); -lean_inc(x_20); -lean_dec(x_16); -x_21 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_21); -lean_ctor_set(x_22, 1, x_20); -return x_22; +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_23, 1); +lean_inc(x_27); +lean_dec(x_23); +x_28 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +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_23; -x_23 = !lean_is_exclusive(x_16); -if (x_23 == 0) +uint8_t x_30; +x_30 = !lean_is_exclusive(x_23); +if (x_30 == 0) { -return x_16; +return x_23; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_16, 0); -x_25 = lean_ctor_get(x_16, 1); -lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_16); -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_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_23, 0); +x_32 = lean_ctor_get(x_23, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_23); +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; } } } -block_49: -{ -lean_object* x_30; uint8_t x_31; -lean_dec(x_29); -x_30 = lean_unsigned_to_nat(0u); -x_31 = lean_nat_dec_lt(x_30, x_28); -if (x_31 == 0) -{ -lean_object* x_32; -lean_dec(x_28); -x_32 = lean_box(0); -x_11 = x_32; -goto block_27; -} -else -{ -uint8_t x_33; -x_33 = lean_nat_dec_le(x_28, x_28); -if (x_33 == 0) -{ -lean_object* x_34; -lean_dec(x_28); -x_34 = lean_box(0); -x_11 = x_34; -goto block_27; -} -else -{ -size_t x_35; uint8_t x_36; -x_35 = lean_usize_of_nat(x_28); -lean_dec(x_28); -x_36 = l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__4(x_1, x_4, x_35); -if (x_36 == 0) -{ -lean_object* x_37; -x_37 = lean_box(0); -x_11 = x_37; -goto block_27; -} -else -{ -lean_object* x_38; -x_38 = l___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial(x_1, x_2, x_3, x_5, x_6, x_7, x_8, x_10); -if (lean_obj_tag(x_38) == 0) -{ -uint8_t x_39; -x_39 = !lean_is_exclusive(x_38); -if (x_39 == 0) -{ -lean_object* x_40; lean_object* x_41; -x_40 = lean_ctor_get(x_38, 0); -lean_dec(x_40); -x_41 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -lean_ctor_set(x_38, 0, x_41); -return x_38; -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_38, 1); -lean_inc(x_42); -lean_dec(x_38); -x_43 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; -x_44 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_44, 0, x_43); -lean_ctor_set(x_44, 1, x_42); -return x_44; -} -} else { -uint8_t x_45; -x_45 = !lean_is_exclusive(x_38); -if (x_45 == 0) +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; lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_34 = lean_ctor_get(x_7, 0); +x_35 = lean_ctor_get(x_7, 1); +x_36 = lean_ctor_get(x_7, 2); +x_37 = lean_ctor_get(x_7, 3); +x_38 = lean_ctor_get(x_7, 4); +x_39 = lean_ctor_get(x_7, 5); +lean_inc(x_39); +lean_inc(x_38); +lean_inc(x_37); +lean_inc(x_36); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_7); +x_40 = l_Lean_replaceRef(x_15, x_37); +lean_dec(x_37); +lean_dec(x_15); +x_41 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_41, 0, x_34); +lean_ctor_set(x_41, 1, x_35); +lean_ctor_set(x_41, 2, x_36); +lean_ctor_set(x_41, 3, x_40); +lean_ctor_set(x_41, 4, x_38); +lean_ctor_set(x_41, 5, x_39); +x_42 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__2), 8, 3); +lean_closure_set(x_42, 0, x_1); +lean_closure_set(x_42, 1, x_2); +lean_closure_set(x_42, 2, x_3); +x_43 = l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___lambda__2___closed__1; +x_44 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); +lean_closure_set(x_44, 0, x_42); +lean_closure_set(x_44, 1, x_43); +x_45 = l_Lean_Meta_mapErrorImp___rarg(x_44, x_16, x_5, x_6, x_41, x_8, x_10); +if (lean_obj_tag(x_45) == 0) { -return x_38; -} -else -{ -lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_46 = lean_ctor_get(x_38, 0); -x_47 = lean_ctor_get(x_38, 1); -lean_inc(x_47); +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_46 = lean_ctor_get(x_45, 1); lean_inc(x_46); -lean_dec(x_38); -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; +if (lean_is_exclusive(x_45)) { + lean_ctor_release(x_45, 0); + lean_ctor_release(x_45, 1); + x_47 = x_45; +} else { + lean_dec_ref(x_45); + x_47 = lean_box(0); } +x_48 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +if (lean_is_scalar(x_47)) { + x_49 = lean_alloc_ctor(0, 2, 0); +} else { + x_49 = x_47; } -} -} -} -} -} -block_138: -{ -if (x_122 == 0) -{ -x_10 = x_123; -goto block_121; +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_46); +return x_49; } else { -lean_object* x_124; size_t x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; -x_124 = lean_array_get_size(x_1); -x_125 = lean_usize_of_nat(x_124); -lean_dec(x_124); +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_50 = lean_ctor_get(x_45, 0); +lean_inc(x_50); +x_51 = lean_ctor_get(x_45, 1); +lean_inc(x_51); +if (lean_is_exclusive(x_45)) { + lean_ctor_release(x_45, 0); + lean_ctor_release(x_45, 1); + x_52 = x_45; +} else { + lean_dec_ref(x_45); + x_52 = lean_box(0); +} +if (lean_is_scalar(x_52)) { + x_53 = lean_alloc_ctor(1, 2, 0); +} else { + x_53 = x_52; +} +lean_ctor_set(x_53, 0, x_50); +lean_ctor_set(x_53, 1, x_51); +return x_53; +} +} +} +block_76: +{ +lean_object* x_57; uint8_t x_58; +lean_dec(x_56); +x_57 = lean_unsigned_to_nat(0u); +x_58 = lean_nat_dec_lt(x_57, x_55); +if (x_58 == 0) +{ +lean_object* x_59; +lean_dec(x_55); +x_59 = lean_box(0); +x_11 = x_59; +goto block_54; +} +else +{ +uint8_t x_60; +x_60 = lean_nat_dec_le(x_55, x_55); +if (x_60 == 0) +{ +lean_object* x_61; +lean_dec(x_55); +x_61 = lean_box(0); +x_11 = x_61; +goto block_54; +} +else +{ +size_t x_62; uint8_t x_63; +x_62 = lean_usize_of_nat(x_55); +lean_dec(x_55); +x_63 = l_Array_anyMUnsafe_any___at_Lean_Elab_addPreDefinitions___spec__4(x_1, x_4, x_62); +if (x_63 == 0) +{ +lean_object* x_64; +x_64 = lean_box(0); +x_11 = x_64; +goto block_54; +} +else +{ +lean_object* x_65; +x_65 = l___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial(x_1, x_2, x_3, x_5, x_6, x_7, x_8, x_10); +if (lean_obj_tag(x_65) == 0) +{ +uint8_t x_66; +x_66 = !lean_is_exclusive(x_65); +if (x_66 == 0) +{ +lean_object* x_67; lean_object* x_68; +x_67 = lean_ctor_get(x_65, 0); +lean_dec(x_67); +x_68 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +lean_ctor_set(x_65, 0, x_68); +return x_65; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_69 = lean_ctor_get(x_65, 1); +lean_inc(x_69); +lean_dec(x_65); +x_70 = l_Array_forInUnsafe_loop___at_Lean_pushScope___spec__1___rarg___lambda__1___closed__1; +x_71 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_71, 0, x_70); +lean_ctor_set(x_71, 1, x_69); +return x_71; +} +} +else +{ +uint8_t x_72; +x_72 = !lean_is_exclusive(x_65); +if (x_72 == 0) +{ +return x_65; +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_73 = lean_ctor_get(x_65, 0); +x_74 = lean_ctor_get(x_65, 1); +lean_inc(x_74); +lean_inc(x_73); +lean_dec(x_65); +x_75 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_75, 0, x_73); +lean_ctor_set(x_75, 1, x_74); +return x_75; +} +} +} +} +} +} +} +block_165: +{ +if (x_149 == 0) +{ +x_10 = x_150; +goto block_148; +} +else +{ +lean_object* x_151; size_t x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; +x_151 = lean_array_get_size(x_1); +x_152 = lean_usize_of_nat(x_151); +lean_dec(x_151); lean_inc(x_1); -x_126 = x_1; -x_127 = l_Array_mapMUnsafe_map___at_Lean_Elab_addPreDefinitions___spec__6(x_125, x_4, x_126); -x_128 = x_127; -x_129 = lean_array_to_list(lean_box(0), x_128); -x_130 = l_List_map___at_Lean_Elab_addPreDefinitions___spec__7(x_129); -x_131 = l_Lean_MessageData_ofList(x_130); -lean_dec(x_130); -x_132 = l_Lean_KernelException_toMessageData___closed__15; -x_133 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_133, 0, x_132); -lean_ctor_set(x_133, 1, x_131); -x_134 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_134, 0, x_133); -lean_ctor_set(x_134, 1, x_132); -x_135 = l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__3___closed__2; -x_136 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_135, x_134, x_2, x_3, x_5, x_6, x_7, x_8, x_123); -x_137 = lean_ctor_get(x_136, 1); -lean_inc(x_137); -lean_dec(x_136); -x_10 = x_137; -goto block_121; +x_153 = x_1; +x_154 = l_Array_mapMUnsafe_map___at_Lean_Elab_addPreDefinitions___spec__6(x_152, x_4, x_153); +x_155 = x_154; +x_156 = lean_array_to_list(lean_box(0), x_155); +x_157 = l_List_map___at_Lean_Elab_addPreDefinitions___spec__7(x_156); +x_158 = l_Lean_MessageData_ofList(x_157); +lean_dec(x_157); +x_159 = l_Lean_KernelException_toMessageData___closed__15; +x_160 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_160, 0, x_159); +lean_ctor_set(x_160, 1, x_158); +x_161 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_161, 0, x_160); +lean_ctor_set(x_161, 1, x_159); +x_162 = l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__8___lambda__3___closed__2; +x_163 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_162, x_161, x_2, x_3, x_5, x_6, x_7, x_8, x_150); +x_164 = lean_ctor_get(x_163, 1); +lean_inc(x_164); +lean_dec(x_163); +x_10 = x_164; +goto block_148; } } } diff --git a/stage0/stdlib/Lean/Meta/ExprDefEq.c b/stage0/stdlib/Lean/Meta/ExprDefEq.c index 970e73d22a..a74ad2bb03 100644 --- a/stage0/stdlib/Lean/Meta/ExprDefEq.c +++ b/stage0/stdlib/Lean/Meta/ExprDefEq.c @@ -106,6 +106,7 @@ lean_object* l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_check___spec_ lean_object* lean_metavar_ctx_get_expr_assignment(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps_hasLetDeclsInBetween_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Meta_CheckAssignment_check___spec__55___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8347____closed__1; lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_isLevelDefEqAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process_match__3(lean_object*); lean_object* lean_local_ctx_erase(lean_object*, lean_object*); @@ -612,8 +613,8 @@ lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_de lean_object* l___private_Std_Data_PersistentArray_0__Std_PersistentArray_foldlMAux___at_Lean_Meta_CheckAssignment_check___spec__53(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isAssigned_match__1(lean_object*); -lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8338_(lean_object*); -lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8329_(lean_object*); +lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8347_(lean_object*); +lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8356_(lean_object*); lean_object* l_Lean_Meta_CheckAssignment_assignToConstFun_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_HashMapImp_insert___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_CheckAssignment_cache___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_instAddMessageContext___rarg(lean_object*, lean_object*, lean_object*); @@ -762,7 +763,6 @@ lean_object* l_Lean_Meta_commitWhen___at___private_Lean_Meta_ExprDefEq_0__Lean_M lean_object* l_Std_PersistentArray_anyMAux___at_Lean_Meta_CheckAssignment_check___spec__39___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_CheckAssignment_checkFVar___closed__4; uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_check___spec__26(lean_object*, lean_object*, size_t, size_t); -lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8329____closed__1; lean_object* l_Lean_Meta_commitWhen___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqQuickMVarMVar___spec__2(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqLeft___closed__4; lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqProj_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -52340,64 +52340,82 @@ return x_12; } else { -lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_13 = lean_ctor_get(x_9, 1); lean_inc(x_13); lean_dec(x_9); x_14 = lean_ctor_get(x_10, 0); lean_inc(x_14); lean_dec(x_10); -x_72 = lean_st_ref_get(x_7, x_13); -x_73 = lean_ctor_get(x_72, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_73, 3); -lean_inc(x_74); -lean_dec(x_73); -x_75 = lean_ctor_get_uint8(x_74, sizeof(void*)*1); -lean_dec(x_74); -if (x_75 == 0) -{ -lean_object* x_76; uint8_t x_77; -x_76 = lean_ctor_get(x_72, 1); -lean_inc(x_76); -lean_dec(x_72); -x_77 = 0; -x_15 = x_77; -x_16 = x_76; -goto block_71; -} -else -{ -lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_78 = lean_ctor_get(x_72, 1); -lean_inc(x_78); -lean_dec(x_72); -x_79 = l_Lean_Meta_withoutPostponingUniverseConstraintsImp___rarg___closed__3; -x_80 = l_Lean_Meta_CheckAssignment_checkFVar___closed__16; -x_81 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; -x_82 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___rarg(x_79, x_80, x_81); +lean_inc(x_14); +x_15 = l_Lean_mkMVar(x_14); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_83 = lean_apply_5(x_82, x_4, x_5, x_6, x_7, x_78); -if (lean_obj_tag(x_83) == 0) +lean_inc(x_15); +x_16 = l_Lean_Meta_inferType(x_15, x_4, x_5, x_6, x_7, x_13); +if (lean_obj_tag(x_16) == 0) { -lean_object* x_84; lean_object* x_85; uint8_t x_86; -x_84 = lean_ctor_get(x_83, 0); -lean_inc(x_84); -x_85 = lean_ctor_get(x_83, 1); -lean_inc(x_85); -lean_dec(x_83); -x_86 = lean_unbox(x_84); -lean_dec(x_84); -x_15 = x_86; -x_16 = x_85; -goto block_71; +lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* x_20; lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; +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_16); +x_79 = lean_st_ref_get(x_7, x_18); +x_80 = lean_ctor_get(x_79, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_80, 3); +lean_inc(x_81); +lean_dec(x_80); +x_82 = lean_ctor_get_uint8(x_81, sizeof(void*)*1); +lean_dec(x_81); +if (x_82 == 0) +{ +lean_object* x_83; uint8_t x_84; +x_83 = lean_ctor_get(x_79, 1); +lean_inc(x_83); +lean_dec(x_79); +x_84 = 0; +x_19 = x_84; +x_20 = x_83; +goto block_78; } else { -uint8_t x_87; +lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_85 = lean_ctor_get(x_79, 1); +lean_inc(x_85); +lean_dec(x_79); +x_86 = l_Lean_Meta_withoutPostponingUniverseConstraintsImp___rarg___closed__3; +x_87 = l_Lean_Meta_CheckAssignment_checkFVar___closed__16; +x_88 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; +x_89 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___rarg(x_86, x_87, x_88); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_90 = lean_apply_5(x_89, x_4, x_5, x_6, x_7, x_85); +if (lean_obj_tag(x_90) == 0) +{ +lean_object* x_91; lean_object* x_92; uint8_t x_93; +x_91 = lean_ctor_get(x_90, 0); +lean_inc(x_91); +x_92 = lean_ctor_get(x_90, 1); +lean_inc(x_92); +lean_dec(x_90); +x_93 = lean_unbox(x_91); +lean_dec(x_91); +x_19 = x_93; +x_20 = x_92; +goto block_78; +} +else +{ +uint8_t x_94; +lean_dec(x_17); +lean_dec(x_15); lean_dec(x_14); lean_dec(x_7); lean_dec(x_6); @@ -52406,106 +52424,79 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_87 = !lean_is_exclusive(x_83); -if (x_87 == 0) +x_94 = !lean_is_exclusive(x_90); +if (x_94 == 0) { -return x_83; -} -else -{ -lean_object* x_88; lean_object* x_89; lean_object* x_90; -x_88 = lean_ctor_get(x_83, 0); -x_89 = lean_ctor_get(x_83, 1); -lean_inc(x_89); -lean_inc(x_88); -lean_dec(x_83); -x_90 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_90, 0, x_88); -lean_ctor_set(x_90, 1, x_89); return x_90; } +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_95 = lean_ctor_get(x_90, 0); +x_96 = lean_ctor_get(x_90, 1); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_90); +x_97 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_97, 0, x_95); +lean_ctor_set(x_97, 1, x_96); +return x_97; } } -block_71: +} +block_78: { -if (x_15 == 0) -{ -lean_object* x_17; -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_17 = l_Lean_Meta_synthPending(x_14, x_4, x_5, x_6, x_7, x_16); -if (lean_obj_tag(x_17) == 0) -{ -lean_object* x_18; uint8_t x_19; -x_18 = lean_ctor_get(x_17, 0); -lean_inc(x_18); -x_19 = lean_unbox(x_18); -lean_dec(x_18); if (x_19 == 0) { -lean_object* x_20; lean_object* x_21; -lean_dec(x_2); -lean_dec(x_1); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_dec(x_17); -x_21 = lean_apply_5(x_3, x_4, x_5, x_6, x_7, x_20); -return x_21; -} -else -{ -lean_object* x_22; lean_object* x_23; -lean_dec(x_3); -x_22 = lean_ctor_get(x_17, 1); -lean_inc(x_22); +lean_object* x_21; lean_dec(x_17); +lean_dec(x_15); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_23 = l_Lean_Meta_instantiateMVars(x_1, x_4, x_5, x_6, x_7, x_22); -if (lean_obj_tag(x_23) == 0) +x_21 = l_Lean_Meta_synthPending(x_14, x_4, x_5, x_6, x_7, x_20); +if (lean_obj_tag(x_21) == 0) { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -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_apply_6(x_2, x_24, x_4, x_5, x_6, x_7, x_25); -return x_26; -} -else +lean_object* x_22; uint8_t x_23; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +x_23 = lean_unbox(x_22); +lean_dec(x_22); +if (x_23 == 0) { -uint8_t x_27; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); +lean_object* x_24; lean_object* x_25; lean_dec(x_2); -x_27 = !lean_is_exclusive(x_23); -if (x_27 == 0) -{ -return x_23; +lean_dec(x_1); +x_24 = lean_ctor_get(x_21, 1); +lean_inc(x_24); +lean_dec(x_21); +x_25 = lean_apply_5(x_3, x_4, x_5, x_6, x_7, x_24); +return x_25; } else { +lean_object* x_26; lean_object* x_27; +lean_dec(x_3); +x_26 = lean_ctor_get(x_21, 1); +lean_inc(x_26); +lean_dec(x_21); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_27 = l_Lean_Meta_instantiateMVars(x_1, x_4, x_5, x_6, x_7, x_26); +if (lean_obj_tag(x_27) == 0) +{ lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_23, 0); -x_29 = lean_ctor_get(x_23, 1); -lean_inc(x_29); +x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); -lean_dec(x_23); -x_30 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); +x_29 = lean_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +x_30 = lean_apply_6(x_2, x_28, x_4, x_5, x_6, x_7, x_29); return x_30; } -} -} -} else { uint8_t x_31; @@ -52513,22 +52504,20 @@ 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_31 = !lean_is_exclusive(x_17); +x_31 = !lean_is_exclusive(x_27); if (x_31 == 0) { -return x_17; +return x_27; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_17, 0); -x_33 = lean_ctor_get(x_17, 1); +x_32 = lean_ctor_get(x_27, 0); +x_33 = lean_ctor_get(x_27, 1); lean_inc(x_33); lean_inc(x_32); -lean_dec(x_17); +lean_dec(x_27); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); @@ -52536,116 +52525,154 @@ return x_34; } } } +} else { -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_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; -lean_inc(x_14); -x_35 = l_Lean_mkMVar(x_14); -x_36 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_36, 0, x_35); -x_37 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__5; -x_38 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_38, 0, x_37); -lean_ctor_set(x_38, 1, x_36); -x_39 = l_Lean_KernelException_toMessageData___closed__15; -x_40 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_40, 0, x_38); -lean_ctor_set(x_40, 1, x_39); -x_41 = l_Lean_Meta_withoutPostponingUniverseConstraintsImp___rarg___closed__3; -x_42 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__1; -x_43 = l_Lean_Meta_CheckAssignment_checkFVar___closed__8; -x_44 = l_Lean_Meta_instAddMessageContextMetaM; -x_45 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; -x_46 = l_Lean_addTrace___rarg(x_41, x_42, x_43, x_44, x_45, x_40); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_47 = lean_apply_5(x_46, x_4, x_5, x_6, x_7, x_16); -if (lean_obj_tag(x_47) == 0) -{ -lean_object* x_48; lean_object* x_49; -x_48 = lean_ctor_get(x_47, 1); -lean_inc(x_48); -lean_dec(x_47); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_49 = l_Lean_Meta_synthPending(x_14, x_4, x_5, x_6, x_7, x_48); -if (lean_obj_tag(x_49) == 0) -{ -lean_object* x_50; uint8_t x_51; -x_50 = lean_ctor_get(x_49, 0); -lean_inc(x_50); -x_51 = lean_unbox(x_50); -lean_dec(x_50); -if (x_51 == 0) -{ -lean_object* x_52; lean_object* x_53; +uint8_t x_35; +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_52 = lean_ctor_get(x_49, 1); -lean_inc(x_52); -lean_dec(x_49); -x_53 = lean_apply_5(x_3, x_4, x_5, x_6, x_7, x_52); -return x_53; +x_35 = !lean_is_exclusive(x_21); +if (x_35 == 0) +{ +return x_21; } else { -lean_object* x_54; lean_object* x_55; -lean_dec(x_3); -x_54 = lean_ctor_get(x_49, 1); -lean_inc(x_54); -lean_dec(x_49); +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_21, 0); +x_37 = lean_ctor_get(x_21, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_21); +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; +} +} +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_39 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_39, 0, x_15); +x_40 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__5; +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___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__7; +x_43 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +x_44 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_44, 0, x_17); +x_45 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +x_46 = l_Lean_KernelException_toMessageData___closed__15; +x_47 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +x_48 = l_Lean_Meta_withoutPostponingUniverseConstraintsImp___rarg___closed__3; +x_49 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__1; +x_50 = l_Lean_Meta_CheckAssignment_checkFVar___closed__8; +x_51 = l_Lean_Meta_instAddMessageContextMetaM; +x_52 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; +x_53 = l_Lean_addTrace___rarg(x_48, x_49, x_50, x_51, x_52, x_47); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_55 = l_Lean_Meta_instantiateMVars(x_1, x_4, x_5, x_6, x_7, x_54); -if (lean_obj_tag(x_55) == 0) +x_54 = lean_apply_5(x_53, x_4, x_5, x_6, x_7, x_20); +if (lean_obj_tag(x_54) == 0) { -lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_56 = lean_ctor_get(x_55, 0); -lean_inc(x_56); -x_57 = lean_ctor_get(x_55, 1); +lean_object* x_55; lean_object* x_56; +x_55 = lean_ctor_get(x_54, 1); +lean_inc(x_55); +lean_dec(x_54); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_56 = l_Lean_Meta_synthPending(x_14, x_4, x_5, x_6, x_7, x_55); +if (lean_obj_tag(x_56) == 0) +{ +lean_object* x_57; uint8_t x_58; +x_57 = lean_ctor_get(x_56, 0); lean_inc(x_57); -lean_dec(x_55); -x_58 = lean_apply_6(x_2, x_56, x_4, x_5, x_6, x_7, x_57); -return x_58; +x_58 = lean_unbox(x_57); +lean_dec(x_57); +if (x_58 == 0) +{ +lean_object* x_59; lean_object* x_60; +lean_dec(x_2); +lean_dec(x_1); +x_59 = lean_ctor_get(x_56, 1); +lean_inc(x_59); +lean_dec(x_56); +x_60 = lean_apply_5(x_3, x_4, x_5, x_6, x_7, x_59); +return x_60; } else { -uint8_t x_59; +lean_object* x_61; lean_object* x_62; +lean_dec(x_3); +x_61 = lean_ctor_get(x_56, 1); +lean_inc(x_61); +lean_dec(x_56); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_62 = l_Lean_Meta_instantiateMVars(x_1, x_4, x_5, x_6, x_7, x_61); +if (lean_obj_tag(x_62) == 0) +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_63 = lean_ctor_get(x_62, 0); +lean_inc(x_63); +x_64 = lean_ctor_get(x_62, 1); +lean_inc(x_64); +lean_dec(x_62); +x_65 = lean_apply_6(x_2, x_63, x_4, x_5, x_6, x_7, x_64); +return x_65; +} +else +{ +uint8_t x_66; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -x_59 = !lean_is_exclusive(x_55); -if (x_59 == 0) +x_66 = !lean_is_exclusive(x_62); +if (x_66 == 0) { -return x_55; -} -else -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_60 = lean_ctor_get(x_55, 0); -x_61 = lean_ctor_get(x_55, 1); -lean_inc(x_61); -lean_inc(x_60); -lean_dec(x_55); -x_62 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_62, 0, x_60); -lean_ctor_set(x_62, 1, x_61); return x_62; } +else +{ +lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_67 = lean_ctor_get(x_62, 0); +x_68 = lean_ctor_get(x_62, 1); +lean_inc(x_68); +lean_inc(x_67); +lean_dec(x_62); +x_69 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_69, 0, x_67); +lean_ctor_set(x_69, 1, x_68); +return x_69; +} } } } else { -uint8_t x_63; +uint8_t x_70; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); @@ -52653,29 +52680,29 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_63 = !lean_is_exclusive(x_49); -if (x_63 == 0) +x_70 = !lean_is_exclusive(x_56); +if (x_70 == 0) { -return x_49; +return x_56; } else { -lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_64 = lean_ctor_get(x_49, 0); -x_65 = lean_ctor_get(x_49, 1); -lean_inc(x_65); -lean_inc(x_64); -lean_dec(x_49); -x_66 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_66, 0, x_64); -lean_ctor_set(x_66, 1, x_65); -return x_66; +lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_71 = lean_ctor_get(x_56, 0); +x_72 = lean_ctor_get(x_56, 1); +lean_inc(x_72); +lean_inc(x_71); +lean_dec(x_56); +x_73 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_73, 0, x_71); +lean_ctor_set(x_73, 1, x_72); +return x_73; } } } else { -uint8_t x_67; +uint8_t x_74; lean_dec(x_14); lean_dec(x_7); lean_dec(x_6); @@ -52684,24 +52711,23 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_67 = !lean_is_exclusive(x_47); -if (x_67 == 0) +x_74 = !lean_is_exclusive(x_54); +if (x_74 == 0) { -return x_47; +return x_54; } else { -lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_68 = lean_ctor_get(x_47, 0); -x_69 = lean_ctor_get(x_47, 1); -lean_inc(x_69); -lean_inc(x_68); -lean_dec(x_47); -x_70 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_70, 0, x_68); -lean_ctor_set(x_70, 1, x_69); -return x_70; -} +lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_75 = lean_ctor_get(x_54, 0); +x_76 = lean_ctor_get(x_54, 1); +lean_inc(x_76); +lean_inc(x_75); +lean_dec(x_54); +x_77 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_77, 0, x_75); +lean_ctor_set(x_77, 1, x_76); +return x_77; } } } @@ -52709,7 +52735,9 @@ return x_70; } else { -uint8_t x_91; +uint8_t x_98; +lean_dec(x_15); +lean_dec(x_14); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); @@ -52717,23 +52745,54 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_91 = !lean_is_exclusive(x_9); -if (x_91 == 0) +x_98 = !lean_is_exclusive(x_16); +if (x_98 == 0) +{ +return x_16; +} +else +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_99 = lean_ctor_get(x_16, 0); +x_100 = lean_ctor_get(x_16, 1); +lean_inc(x_100); +lean_inc(x_99); +lean_dec(x_16); +x_101 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_101, 0, x_99); +lean_ctor_set(x_101, 1, x_100); +return x_101; +} +} +} +} +else +{ +uint8_t x_102; +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_102 = !lean_is_exclusive(x_9); +if (x_102 == 0) { return x_9; } else { -lean_object* x_92; lean_object* x_93; lean_object* x_94; -x_92 = lean_ctor_get(x_9, 0); -x_93 = lean_ctor_get(x_9, 1); -lean_inc(x_93); -lean_inc(x_92); +lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_103 = lean_ctor_get(x_9, 0); +x_104 = lean_ctor_get(x_9, 1); +lean_inc(x_104); +lean_inc(x_103); lean_dec(x_9); -x_94 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_94, 0, x_92); -lean_ctor_set(x_94, 1, x_93); -return x_94; +x_105 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_105, 0, x_103); +lean_ctor_set(x_105, 1, x_104); +return x_105; } } } @@ -52801,156 +52860,142 @@ return x_14; } else { -lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; lean_object* x_65; lean_object* x_66; lean_object* x_67; uint8_t x_68; +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; x_15 = lean_ctor_get(x_11, 1); lean_inc(x_15); lean_dec(x_11); x_16 = lean_ctor_get(x_12, 0); lean_inc(x_16); lean_dec(x_12); -x_65 = lean_st_ref_get(x_7, x_15); -x_66 = lean_ctor_get(x_65, 0); -lean_inc(x_66); -x_67 = lean_ctor_get(x_66, 3); -lean_inc(x_67); -lean_dec(x_66); -x_68 = lean_ctor_get_uint8(x_67, sizeof(void*)*1); -lean_dec(x_67); -if (x_68 == 0) -{ -lean_object* x_69; uint8_t x_70; -x_69 = lean_ctor_get(x_65, 1); -lean_inc(x_69); -lean_dec(x_65); -x_70 = 0; -x_17 = x_70; -x_18 = x_69; -goto block_64; -} -else -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; uint8_t x_76; -x_71 = lean_ctor_get(x_65, 1); -lean_inc(x_71); -lean_dec(x_65); -x_72 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; -x_73 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_isLevelDefEqAux___spec__2(x_72, x_4, x_5, x_6, x_7, x_71); -x_74 = lean_ctor_get(x_73, 0); -lean_inc(x_74); -x_75 = lean_ctor_get(x_73, 1); -lean_inc(x_75); -lean_dec(x_73); -x_76 = lean_unbox(x_74); -lean_dec(x_74); -x_17 = x_76; -x_18 = x_75; -goto block_64; -} -block_64: -{ -if (x_17 == 0) -{ -lean_object* x_19; +lean_inc(x_16); +x_17 = l_Lean_mkMVar(x_16); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_19 = l_Lean_Meta_synthPending(x_16, x_4, x_5, x_6, x_7, x_18); -if (lean_obj_tag(x_19) == 0) +lean_inc(x_17); +x_18 = l_Lean_Meta_inferType(x_17, x_4, x_5, x_6, x_7, x_15); +if (lean_obj_tag(x_18) == 0) { -lean_object* x_20; uint8_t x_21; -x_20 = lean_ctor_get(x_19, 0); +lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 1); lean_inc(x_20); -x_21 = lean_unbox(x_20); -lean_dec(x_20); +lean_dec(x_18); +x_72 = lean_st_ref_get(x_7, x_20); +x_73 = lean_ctor_get(x_72, 0); +lean_inc(x_73); +x_74 = lean_ctor_get(x_73, 3); +lean_inc(x_74); +lean_dec(x_73); +x_75 = lean_ctor_get_uint8(x_74, sizeof(void*)*1); +lean_dec(x_74); +if (x_75 == 0) +{ +lean_object* x_76; uint8_t x_77; +x_76 = lean_ctor_get(x_72, 1); +lean_inc(x_76); +lean_dec(x_72); +x_77 = 0; +x_21 = x_77; +x_22 = x_76; +goto block_71; +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; uint8_t x_83; +x_78 = lean_ctor_get(x_72, 1); +lean_inc(x_78); +lean_dec(x_72); +x_79 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; +x_80 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_isLevelDefEqAux___spec__2(x_79, x_4, x_5, x_6, x_7, x_78); +x_81 = lean_ctor_get(x_80, 0); +lean_inc(x_81); +x_82 = lean_ctor_get(x_80, 1); +lean_inc(x_82); +lean_dec(x_80); +x_83 = lean_unbox(x_81); +lean_dec(x_81); +x_21 = x_83; +x_22 = x_82; +goto block_71; +} +block_71: +{ if (x_21 == 0) { -lean_object* x_22; lean_object* x_23; -lean_dec(x_3); -lean_dec(x_1); -x_22 = lean_ctor_get(x_19, 1); -lean_inc(x_22); -lean_dec(x_19); -x_23 = l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(x_9, x_10, x_4, x_5, x_6, x_7, x_22); -return x_23; -} -else -{ -lean_object* x_24; lean_object* x_25; -lean_dec(x_10); -lean_dec(x_9); -x_24 = lean_ctor_get(x_19, 1); -lean_inc(x_24); +lean_object* x_23; lean_dec(x_19); +lean_dec(x_17); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_25 = l_Lean_Meta_instantiateMVars(x_3, x_4, x_5, x_6, x_7, x_24); -if (lean_obj_tag(x_25) == 0) +x_23 = l_Lean_Meta_synthPending(x_16, x_4, x_5, x_6, x_7, x_22); +if (lean_obj_tag(x_23) == 0) { -lean_object* x_26; lean_object* x_27; lean_object* x_28; -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 = l_Lean_Meta_isExprDefEqAux(x_1, x_26, x_4, x_5, x_6, x_7, x_27); -return x_28; -} -else +lean_object* x_24; uint8_t x_25; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_unbox(x_24); +lean_dec(x_24); +if (x_25 == 0) { -uint8_t x_29; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); +lean_object* x_26; lean_object* x_27; +lean_dec(x_3); lean_dec(x_1); -x_29 = !lean_is_exclusive(x_25); -if (x_29 == 0) -{ -return x_25; +x_26 = lean_ctor_get(x_23, 1); +lean_inc(x_26); +lean_dec(x_23); +x_27 = l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(x_9, x_10, x_4, x_5, x_6, x_7, x_26); +return x_27; } else { +lean_object* x_28; lean_object* x_29; +lean_dec(x_10); +lean_dec(x_9); +x_28 = lean_ctor_get(x_23, 1); +lean_inc(x_28); +lean_dec(x_23); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_29 = l_Lean_Meta_instantiateMVars(x_3, x_4, x_5, x_6, x_7, x_28); +if (lean_obj_tag(x_29) == 0) +{ lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_30 = lean_ctor_get(x_25, 0); -x_31 = lean_ctor_get(x_25, 1); -lean_inc(x_31); +x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); -lean_dec(x_25); -x_32 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_32, 0, x_30); -lean_ctor_set(x_32, 1, x_31); +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +lean_dec(x_29); +x_32 = l_Lean_Meta_isExprDefEqAux(x_1, x_30, x_4, x_5, x_6, x_7, x_31); return x_32; } -} -} -} else { uint8_t x_33; -lean_dec(x_10); -lean_dec(x_9); 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_33 = !lean_is_exclusive(x_19); +x_33 = !lean_is_exclusive(x_29); if (x_33 == 0) { -return x_19; +return x_29; } else { lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_34 = lean_ctor_get(x_19, 0); -x_35 = lean_ctor_get(x_19, 1); +x_34 = lean_ctor_get(x_29, 0); +x_35 = lean_ctor_get(x_29, 1); lean_inc(x_35); lean_inc(x_34); -lean_dec(x_19); +lean_dec(x_29); x_36 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_36, 0, x_34); lean_ctor_set(x_36, 1, x_35); @@ -52958,105 +53003,144 @@ return x_36; } } } -else -{ -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_object* x_44; lean_object* x_45; lean_object* x_46; -lean_inc(x_16); -x_37 = l_Lean_mkMVar(x_16); -x_38 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_38, 0, x_37); -x_39 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__5; -x_40 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_38); -x_41 = l_Lean_KernelException_toMessageData___closed__15; -x_42 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_42, 0, x_40); -lean_ctor_set(x_42, 1, x_41); -x_43 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; -x_44 = l_Lean_addTrace___at_Lean_Meta_isLevelDefEqAux___spec__1(x_43, x_42, x_4, x_5, x_6, x_7, x_18); -x_45 = lean_ctor_get(x_44, 1); -lean_inc(x_45); -lean_dec(x_44); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_46 = l_Lean_Meta_synthPending(x_16, x_4, x_5, x_6, x_7, x_45); -if (lean_obj_tag(x_46) == 0) -{ -lean_object* x_47; uint8_t x_48; -x_47 = lean_ctor_get(x_46, 0); -lean_inc(x_47); -x_48 = lean_unbox(x_47); -lean_dec(x_47); -if (x_48 == 0) -{ -lean_object* x_49; lean_object* x_50; -lean_dec(x_3); -lean_dec(x_1); -x_49 = lean_ctor_get(x_46, 1); -lean_inc(x_49); -lean_dec(x_46); -x_50 = l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(x_9, x_10, x_4, x_5, x_6, x_7, x_49); -return x_50; } else { -lean_object* x_51; lean_object* x_52; +uint8_t x_37; lean_dec(x_10); lean_dec(x_9); -x_51 = lean_ctor_get(x_46, 1); -lean_inc(x_51); -lean_dec(x_46); +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_37 = !lean_is_exclusive(x_23); +if (x_37 == 0) +{ +return x_23; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_23, 0); +x_39 = lean_ctor_get(x_23, 1); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_23); +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +return x_40; +} +} +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_41 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_41, 0, x_17); +x_42 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__5; +x_43 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_41); +x_44 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__7; +x_45 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +x_46 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_46, 0, x_19); +x_47 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +x_48 = l_Lean_KernelException_toMessageData___closed__15; +x_49 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +x_50 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; +x_51 = l_Lean_addTrace___at_Lean_Meta_isLevelDefEqAux___spec__1(x_50, x_49, x_4, x_5, x_6, x_7, x_22); +x_52 = lean_ctor_get(x_51, 1); +lean_inc(x_52); +lean_dec(x_51); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_52 = l_Lean_Meta_instantiateMVars(x_3, x_4, x_5, x_6, x_7, x_51); -if (lean_obj_tag(x_52) == 0) +x_53 = l_Lean_Meta_synthPending(x_16, x_4, x_5, x_6, x_7, x_52); +if (lean_obj_tag(x_53) == 0) { -lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_53 = lean_ctor_get(x_52, 0); -lean_inc(x_53); -x_54 = lean_ctor_get(x_52, 1); +lean_object* x_54; uint8_t x_55; +x_54 = lean_ctor_get(x_53, 0); lean_inc(x_54); -lean_dec(x_52); -x_55 = l_Lean_Meta_isExprDefEqAux(x_1, x_53, x_4, x_5, x_6, x_7, x_54); -return x_55; +x_55 = lean_unbox(x_54); +lean_dec(x_54); +if (x_55 == 0) +{ +lean_object* x_56; lean_object* x_57; +lean_dec(x_3); +lean_dec(x_1); +x_56 = lean_ctor_get(x_53, 1); +lean_inc(x_56); +lean_dec(x_53); +x_57 = l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(x_9, x_10, x_4, x_5, x_6, x_7, x_56); +return x_57; } else { -uint8_t x_56; +lean_object* x_58; lean_object* x_59; +lean_dec(x_10); +lean_dec(x_9); +x_58 = lean_ctor_get(x_53, 1); +lean_inc(x_58); +lean_dec(x_53); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_59 = l_Lean_Meta_instantiateMVars(x_3, x_4, x_5, x_6, x_7, x_58); +if (lean_obj_tag(x_59) == 0) +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_60 = lean_ctor_get(x_59, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_59, 1); +lean_inc(x_61); +lean_dec(x_59); +x_62 = l_Lean_Meta_isExprDefEqAux(x_1, x_60, x_4, x_5, x_6, x_7, x_61); +return x_62; +} +else +{ +uint8_t x_63; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); -x_56 = !lean_is_exclusive(x_52); -if (x_56 == 0) +x_63 = !lean_is_exclusive(x_59); +if (x_63 == 0) { -return x_52; -} -else -{ -lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_57 = lean_ctor_get(x_52, 0); -x_58 = lean_ctor_get(x_52, 1); -lean_inc(x_58); -lean_inc(x_57); -lean_dec(x_52); -x_59 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_59, 0, x_57); -lean_ctor_set(x_59, 1, x_58); return x_59; } +else +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_64 = lean_ctor_get(x_59, 0); +x_65 = lean_ctor_get(x_59, 1); +lean_inc(x_65); +lean_inc(x_64); +lean_dec(x_59); +x_66 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_66, 0, x_64); +lean_ctor_set(x_66, 1, x_65); +return x_66; +} } } } else { -uint8_t x_60; +uint8_t x_67; lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); @@ -53065,24 +53149,23 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); -x_60 = !lean_is_exclusive(x_46); -if (x_60 == 0) +x_67 = !lean_is_exclusive(x_53); +if (x_67 == 0) { -return x_46; +return x_53; } else { -lean_object* x_61; lean_object* x_62; lean_object* x_63; -x_61 = lean_ctor_get(x_46, 0); -x_62 = lean_ctor_get(x_46, 1); -lean_inc(x_62); -lean_inc(x_61); -lean_dec(x_46); -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; -} +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_53, 0); +x_69 = lean_ctor_get(x_53, 1); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_53); +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; } } } @@ -53090,7 +53173,9 @@ return x_63; } else { -uint8_t x_77; +uint8_t x_84; +lean_dec(x_17); +lean_dec(x_16); lean_dec(x_10); lean_dec(x_9); lean_dec(x_7); @@ -53099,23 +53184,55 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); -x_77 = !lean_is_exclusive(x_11); -if (x_77 == 0) +x_84 = !lean_is_exclusive(x_18); +if (x_84 == 0) +{ +return x_18; +} +else +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_18, 0); +x_86 = lean_ctor_get(x_18, 1); +lean_inc(x_86); +lean_inc(x_85); +lean_dec(x_18); +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_88; +lean_dec(x_10); +lean_dec(x_9); +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_88 = !lean_is_exclusive(x_11); +if (x_88 == 0) { return x_11; } else { -lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_78 = lean_ctor_get(x_11, 0); -x_79 = lean_ctor_get(x_11, 1); -lean_inc(x_79); -lean_inc(x_78); +lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_89 = lean_ctor_get(x_11, 0); +x_90 = lean_ctor_get(x_11, 1); +lean_inc(x_90); +lean_inc(x_89); lean_dec(x_11); -x_80 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_80, 0, x_78); -lean_ctor_set(x_80, 1, x_79); -return x_80; +x_91 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_91, 0, x_89); +lean_ctor_set(x_91, 1, x_90); +return x_91; } } } @@ -53148,131 +53265,120 @@ return x_12; } else { -lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_63; lean_object* x_64; lean_object* x_65; uint8_t x_66; +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_13 = lean_ctor_get(x_9, 1); lean_inc(x_13); lean_dec(x_9); x_14 = lean_ctor_get(x_10, 0); lean_inc(x_14); lean_dec(x_10); -x_63 = lean_st_ref_get(x_7, x_13); -x_64 = lean_ctor_get(x_63, 0); -lean_inc(x_64); -x_65 = lean_ctor_get(x_64, 3); -lean_inc(x_65); -lean_dec(x_64); -x_66 = lean_ctor_get_uint8(x_65, sizeof(void*)*1); -lean_dec(x_65); -if (x_66 == 0) -{ -lean_object* x_67; uint8_t x_68; -x_67 = lean_ctor_get(x_63, 1); -lean_inc(x_67); -lean_dec(x_63); -x_68 = 0; -x_15 = x_68; -x_16 = x_67; -goto block_62; -} -else -{ -lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; uint8_t x_74; -x_69 = lean_ctor_get(x_63, 1); -lean_inc(x_69); -lean_dec(x_63); -x_70 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; -x_71 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_isLevelDefEqAux___spec__2(x_70, x_4, x_5, x_6, x_7, x_69); -x_72 = lean_ctor_get(x_71, 0); -lean_inc(x_72); -x_73 = lean_ctor_get(x_71, 1); -lean_inc(x_73); -lean_dec(x_71); -x_74 = lean_unbox(x_72); -lean_dec(x_72); -x_15 = x_74; -x_16 = x_73; -goto block_62; -} -block_62: -{ -if (x_15 == 0) -{ -lean_object* x_17; +lean_inc(x_14); +x_15 = l_Lean_mkMVar(x_14); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_17 = l_Lean_Meta_synthPending(x_14, x_4, x_5, x_6, x_7, x_16); -if (lean_obj_tag(x_17) == 0) +lean_inc(x_15); +x_16 = l_Lean_Meta_inferType(x_15, x_4, x_5, x_6, x_7, x_13); +if (lean_obj_tag(x_16) == 0) { -lean_object* x_18; uint8_t x_19; -x_18 = lean_ctor_get(x_17, 0); +lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* x_20; lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73; +x_17 = lean_ctor_get(x_16, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); -x_19 = lean_unbox(x_18); -lean_dec(x_18); +lean_dec(x_16); +x_70 = lean_st_ref_get(x_7, x_18); +x_71 = lean_ctor_get(x_70, 0); +lean_inc(x_71); +x_72 = lean_ctor_get(x_71, 3); +lean_inc(x_72); +lean_dec(x_71); +x_73 = lean_ctor_get_uint8(x_72, sizeof(void*)*1); +lean_dec(x_72); +if (x_73 == 0) +{ +lean_object* x_74; uint8_t x_75; +x_74 = lean_ctor_get(x_70, 1); +lean_inc(x_74); +lean_dec(x_70); +x_75 = 0; +x_19 = x_75; +x_20 = x_74; +goto block_69; +} +else +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; uint8_t x_81; +x_76 = lean_ctor_get(x_70, 1); +lean_inc(x_76); +lean_dec(x_70); +x_77 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; +x_78 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_isLevelDefEqAux___spec__2(x_77, x_4, x_5, x_6, x_7, x_76); +x_79 = lean_ctor_get(x_78, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_78, 1); +lean_inc(x_80); +lean_dec(x_78); +x_81 = lean_unbox(x_79); +lean_dec(x_79); +x_19 = x_81; +x_20 = x_80; +goto block_69; +} +block_69: +{ if (x_19 == 0) { -lean_object* x_20; lean_object* x_21; -lean_dec(x_3); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_dec(x_17); -lean_inc(x_2); -x_21 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqOnFailure___spec__1(x_1, x_2, x_2, x_4, x_5, x_6, x_7, x_20); -return x_21; -} -else -{ -lean_object* x_22; lean_object* x_23; -lean_dec(x_1); -x_22 = lean_ctor_get(x_17, 1); -lean_inc(x_22); +lean_object* x_21; lean_dec(x_17); +lean_dec(x_15); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_23 = l_Lean_Meta_instantiateMVars(x_3, x_4, x_5, x_6, x_7, x_22); -if (lean_obj_tag(x_23) == 0) +x_21 = l_Lean_Meta_synthPending(x_14, x_4, x_5, x_6, x_7, x_20); +if (lean_obj_tag(x_21) == 0) { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_23, 0); +lean_object* x_22; uint8_t x_23; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +x_23 = lean_unbox(x_22); +lean_dec(x_22); +if (x_23 == 0) +{ +lean_object* x_24; lean_object* x_25; +lean_dec(x_3); +x_24 = lean_ctor_get(x_21, 1); lean_inc(x_24); -x_25 = lean_ctor_get(x_23, 1); -lean_inc(x_25); -lean_dec(x_23); -x_26 = l_Lean_Meta_isExprDefEqAux(x_24, x_2, x_4, x_5, x_6, x_7, x_25); -return x_26; +lean_dec(x_21); +lean_inc(x_2); +x_25 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqOnFailure___spec__1(x_1, x_2, x_2, x_4, x_5, x_6, x_7, x_24); +return x_25; } else { -uint8_t x_27; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_27 = !lean_is_exclusive(x_23); -if (x_27 == 0) -{ -return x_23; -} -else +lean_object* x_26; lean_object* x_27; +lean_dec(x_1); +x_26 = lean_ctor_get(x_21, 1); +lean_inc(x_26); +lean_dec(x_21); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_27 = l_Lean_Meta_instantiateMVars(x_3, x_4, x_5, x_6, x_7, x_26); +if (lean_obj_tag(x_27) == 0) { lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_23, 0); -x_29 = lean_ctor_get(x_23, 1); -lean_inc(x_29); +x_28 = lean_ctor_get(x_27, 0); lean_inc(x_28); -lean_dec(x_23); -x_30 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); +x_29 = lean_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +x_30 = l_Lean_Meta_isExprDefEqAux(x_28, x_2, x_4, x_5, x_6, x_7, x_29); return x_30; } -} -} -} else { uint8_t x_31; @@ -53280,22 +53386,20 @@ 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_31 = !lean_is_exclusive(x_17); +x_31 = !lean_is_exclusive(x_27); if (x_31 == 0) { -return x_17; +return x_27; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_17, 0); -x_33 = lean_ctor_get(x_17, 1); +x_32 = lean_ctor_get(x_27, 0); +x_33 = lean_ctor_get(x_27, 1); lean_inc(x_33); lean_inc(x_32); -lean_dec(x_17); +lean_dec(x_27); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); @@ -53303,104 +53407,142 @@ return x_34; } } } +} else { -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_object* x_44; -lean_inc(x_14); -x_35 = l_Lean_mkMVar(x_14); -x_36 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_36, 0, x_35); -x_37 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__5; -x_38 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_38, 0, x_37); -lean_ctor_set(x_38, 1, x_36); -x_39 = l_Lean_KernelException_toMessageData___closed__15; -x_40 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_40, 0, x_38); -lean_ctor_set(x_40, 1, x_39); -x_41 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; -x_42 = l_Lean_addTrace___at_Lean_Meta_isLevelDefEqAux___spec__1(x_41, x_40, x_4, x_5, x_6, x_7, x_16); -x_43 = lean_ctor_get(x_42, 1); -lean_inc(x_43); -lean_dec(x_42); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_44 = l_Lean_Meta_synthPending(x_14, x_4, x_5, x_6, x_7, x_43); -if (lean_obj_tag(x_44) == 0) -{ -lean_object* x_45; uint8_t x_46; -x_45 = lean_ctor_get(x_44, 0); -lean_inc(x_45); -x_46 = lean_unbox(x_45); -lean_dec(x_45); -if (x_46 == 0) -{ -lean_object* x_47; lean_object* x_48; +uint8_t x_35; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); lean_dec(x_3); -x_47 = lean_ctor_get(x_44, 1); -lean_inc(x_47); -lean_dec(x_44); -lean_inc(x_2); -x_48 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqOnFailure___spec__1(x_1, x_2, x_2, x_4, x_5, x_6, x_7, x_47); -return x_48; +lean_dec(x_2); +lean_dec(x_1); +x_35 = !lean_is_exclusive(x_21); +if (x_35 == 0) +{ +return x_21; } else { -lean_object* x_49; lean_object* x_50; -lean_dec(x_1); -x_49 = lean_ctor_get(x_44, 1); -lean_inc(x_49); -lean_dec(x_44); +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_21, 0); +x_37 = lean_ctor_get(x_21, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_21); +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; +} +} +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_39 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_39, 0, x_15); +x_40 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__5; +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___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__7; +x_43 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +x_44 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_44, 0, x_17); +x_45 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +x_46 = l_Lean_KernelException_toMessageData___closed__15; +x_47 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +x_48 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__3; +x_49 = l_Lean_addTrace___at_Lean_Meta_isLevelDefEqAux___spec__1(x_48, x_47, x_4, x_5, x_6, x_7, x_20); +x_50 = lean_ctor_get(x_49, 1); +lean_inc(x_50); +lean_dec(x_49); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_50 = l_Lean_Meta_instantiateMVars(x_3, x_4, x_5, x_6, x_7, x_49); -if (lean_obj_tag(x_50) == 0) +x_51 = l_Lean_Meta_synthPending(x_14, x_4, x_5, x_6, x_7, x_50); +if (lean_obj_tag(x_51) == 0) { -lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_ctor_get(x_50, 0); -lean_inc(x_51); -x_52 = lean_ctor_get(x_50, 1); +lean_object* x_52; uint8_t x_53; +x_52 = lean_ctor_get(x_51, 0); lean_inc(x_52); -lean_dec(x_50); -x_53 = l_Lean_Meta_isExprDefEqAux(x_51, x_2, x_4, x_5, x_6, x_7, x_52); -return x_53; +x_53 = lean_unbox(x_52); +lean_dec(x_52); +if (x_53 == 0) +{ +lean_object* x_54; lean_object* x_55; +lean_dec(x_3); +x_54 = lean_ctor_get(x_51, 1); +lean_inc(x_54); +lean_dec(x_51); +lean_inc(x_2); +x_55 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqOnFailure___spec__1(x_1, x_2, x_2, x_4, x_5, x_6, x_7, x_54); +return x_55; } else { -uint8_t x_54; +lean_object* x_56; lean_object* x_57; +lean_dec(x_1); +x_56 = lean_ctor_get(x_51, 1); +lean_inc(x_56); +lean_dec(x_51); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_57 = l_Lean_Meta_instantiateMVars(x_3, x_4, x_5, x_6, x_7, x_56); +if (lean_obj_tag(x_57) == 0) +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_58 = lean_ctor_get(x_57, 0); +lean_inc(x_58); +x_59 = lean_ctor_get(x_57, 1); +lean_inc(x_59); +lean_dec(x_57); +x_60 = l_Lean_Meta_isExprDefEqAux(x_58, x_2, x_4, x_5, x_6, x_7, x_59); +return x_60; +} +else +{ +uint8_t x_61; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -x_54 = !lean_is_exclusive(x_50); -if (x_54 == 0) +x_61 = !lean_is_exclusive(x_57); +if (x_61 == 0) { -return x_50; -} -else -{ -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_50, 0); -x_56 = lean_ctor_get(x_50, 1); -lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_50); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_55); -lean_ctor_set(x_57, 1, x_56); return x_57; } +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_57, 0); +x_63 = lean_ctor_get(x_57, 1); +lean_inc(x_63); +lean_inc(x_62); +lean_dec(x_57); +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_62); +lean_ctor_set(x_64, 1, x_63); +return x_64; +} } } } else { -uint8_t x_58; +uint8_t x_65; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); @@ -53408,24 +53550,23 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_58 = !lean_is_exclusive(x_44); -if (x_58 == 0) +x_65 = !lean_is_exclusive(x_51); +if (x_65 == 0) { -return x_44; +return x_51; } else { -lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_59 = lean_ctor_get(x_44, 0); -x_60 = lean_ctor_get(x_44, 1); -lean_inc(x_60); -lean_inc(x_59); -lean_dec(x_44); -x_61 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_61, 0, x_59); -lean_ctor_set(x_61, 1, x_60); -return x_61; -} +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_51, 0); +x_67 = lean_ctor_get(x_51, 1); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_51); +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; } } } @@ -53433,7 +53574,9 @@ return x_61; } else { -uint8_t x_75; +uint8_t x_82; +lean_dec(x_15); +lean_dec(x_14); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); @@ -53441,23 +53584,54 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_75 = !lean_is_exclusive(x_9); -if (x_75 == 0) +x_82 = !lean_is_exclusive(x_16); +if (x_82 == 0) +{ +return x_16; +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_83 = lean_ctor_get(x_16, 0); +x_84 = lean_ctor_get(x_16, 1); +lean_inc(x_84); +lean_inc(x_83); +lean_dec(x_16); +x_85 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_85, 0, x_83); +lean_ctor_set(x_85, 1, x_84); +return x_85; +} +} +} +} +else +{ +uint8_t x_86; +lean_dec(x_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_86 = !lean_is_exclusive(x_9); +if (x_86 == 0) { return x_9; } else { -lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_76 = lean_ctor_get(x_9, 0); -x_77 = lean_ctor_get(x_9, 1); -lean_inc(x_77); -lean_inc(x_76); +lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_87 = lean_ctor_get(x_9, 0); +x_88 = lean_ctor_get(x_9, 1); +lean_inc(x_88); +lean_inc(x_87); lean_dec(x_9); -x_78 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_78, 0, x_76); -lean_ctor_set(x_78, 1, x_77); -return x_78; +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; } } } @@ -58222,7 +58396,7 @@ x_10 = l_Lean_Meta_isExprDefEqAuxImpl___lambda__1(x_1, x_2, x_9, x_4, x_5, x_6, return x_10; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8329____closed__1() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8347____closed__1() { _start: { lean_object* x_1; @@ -58230,12 +58404,12 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Meta_isExprDefEqAuxImpl), 7, 0); return x_1; } } -lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8329_(lean_object* x_1) { +lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8347_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; x_2 = l_Lean_Meta_isExprDefEqAuxRef; -x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8329____closed__1; +x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8347____closed__1; x_4 = lean_st_ref_set(x_2, x_3, x_1); x_5 = !lean_is_exclusive(x_4); if (x_5 == 0) @@ -58257,7 +58431,7 @@ return x_8; } } } -lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8338_(lean_object* x_1) { +lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8356_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -58660,12 +58834,12 @@ l_Lean_Meta_isExprDefEqAuxImpl___lambda__2___closed__1 = _init_l_Lean_Meta_isExp lean_mark_persistent(l_Lean_Meta_isExprDefEqAuxImpl___lambda__2___closed__1); l_Lean_Meta_isExprDefEqAuxImpl___closed__1 = _init_l_Lean_Meta_isExprDefEqAuxImpl___closed__1(); lean_mark_persistent(l_Lean_Meta_isExprDefEqAuxImpl___closed__1); -l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8329____closed__1 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8329____closed__1(); -lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8329____closed__1); -res = l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8329_(lean_io_mk_world()); +l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8347____closed__1 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8347____closed__1(); +lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8347____closed__1); +res = l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8347_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8338_(lean_io_mk_world()); +res = l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_8356_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Meta/SynthInstance.c b/stage0/stdlib/Lean/Meta/SynthInstance.c index 9ec6e3a1b3..1b22013db0 100644 --- a/stage0/stdlib/Lean/Meta/SynthInstance.c +++ b/stage0/stdlib/Lean/Meta/SynthInstance.c @@ -152,6 +152,7 @@ lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_SynthInstance_getInstances___ lean_object* l_Std_HashMapImp_insert___at_Lean_Meta_SynthInstance_newSubgoal___spec__4(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAux_traverse___at_Lean_Meta_synthInstance_x3f___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_SynthInstance_0__Lean_Meta_preprocessLevels(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Meta_SynthInstance_hasInferTCGoalsRLAttribute(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_SynthInstance_0__Lean_Meta_preprocessArgs_match__1(lean_object*); lean_object* l___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_getSubgoalsAux(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_SynthInstance_newSubgoal___closed__1; @@ -233,7 +234,6 @@ lean_object* l_Lean_Meta_SynthInstance_newSubgoal___lambda__1___boxed(lean_objec lean_object* l_Lean_Meta_SynthInstance_getNextToResume___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_SynthInstance_0__Lean_Meta_preprocessArgs___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_SynthInstance_TableEntry_answers___default; -lean_object* l_Lean_Meta_SynthInstance_hasInferTCGoalsLRAttribute___boxed(lean_object*, lean_object*); lean_object* l_List_mapM___at_Lean_Meta_SynthInstance_getInstances___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_synthInstance_x3f_match__3___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_SynthInstance_0__Lean_Meta_preprocessArgs___closed__1; @@ -336,7 +336,6 @@ lean_object* l_Lean_Meta_SynthInstance_mkTableKeyFor___lambda__1(lean_object*, l lean_object* l_Lean_Meta_forallTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_SynthInstance_getEntry___closed__2; extern lean_object* l___private_Lean_Meta_WHNF_0__Lean_Meta_whnfEasyCases___closed__1; -uint8_t l_Lean_Meta_SynthInstance_hasInferTCGoalsLRAttribute(lean_object*, lean_object*); lean_object* l_Lean_Meta_SynthInstance_getEntry___closed__1; lean_object* l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_969____spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshExprMVarAt(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -429,7 +428,6 @@ lean_object* l___private_Lean_Meta_SynthInstance_0__Lean_Meta_preprocessArgs___c lean_object* l_Lean_Meta_SynthInstance_initFn____x40_Lean_Meta_SynthInstance___hyg_5____closed__1; lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Meta_SynthInstance_addAnswer___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_object* l_Lean_Meta_SynthInstance_inferTCGoalsLRAttr; lean_object* l_Lean_Meta_SynthInstance_initFn____x40_Lean_Meta_SynthInstance___hyg_5____closed__4; lean_object* lean_expr_update_lambda(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* lean_name_mk_numeral(lean_object*, lean_object*); @@ -513,6 +511,7 @@ lean_object* l___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_mkAn lean_object* l_Lean_Meta_SynthInstance_resume___closed__4; lean_object* l_Lean_Meta_SynthInstance_tryAnswer___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at_Lean_Meta_SynthInstance_tryResolve___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_SynthInstance_hasInferTCGoalsRLAttribute___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_synthInstance_x3f___closed__2; lean_object* l_Lean_Meta_SynthInstance_instInhabitedAnswer; lean_object* l_Lean_Meta_SynthInstance_getInstances___lambda__1___closed__3; @@ -539,6 +538,7 @@ lean_object* l_Lean_Meta_SynthInstance_resume___closed__1; lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Meta_SynthInstance_MkTableKey_normExpr___spec__1(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* l_Lean_Meta_SynthInstance_inferTCGoalsRLAttr; lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_SynthInstance_MkTableKey_normExpr___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_SynthInstance_initFn____x40_Lean_Meta_SynthInstance___hyg_5____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: @@ -555,7 +555,7 @@ static lean_object* _init_l_Lean_Meta_SynthInstance_initFn____x40_Lean_Meta_Synt _start: { lean_object* x_1; -x_1 = lean_mk_string("inferTCGoalsLR"); +x_1 = lean_mk_string("inferTCGoalsRL"); return x_1; } } @@ -573,7 +573,7 @@ static lean_object* _init_l_Lean_Meta_SynthInstance_initFn____x40_Lean_Meta_Synt _start: { lean_object* x_1; -x_1 = lean_mk_string("instruct type class resolution procedure to solve goals from left to right for this instance"); +x_1 = lean_mk_string("instruct type class resolution procedure to solve goals from right to left for this instance"); return x_1; } } @@ -607,20 +607,20 @@ lean_dec(x_1); return x_5; } } -uint8_t l_Lean_Meta_SynthInstance_hasInferTCGoalsLRAttribute(lean_object* x_1, lean_object* x_2) { +uint8_t l_Lean_Meta_SynthInstance_hasInferTCGoalsRLAttribute(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; -x_3 = l_Lean_Meta_SynthInstance_inferTCGoalsLRAttr; +x_3 = l_Lean_Meta_SynthInstance_inferTCGoalsRLAttr; x_4 = l_Lean_TagAttribute_hasTag(x_3, x_1, x_2); return x_4; } } -lean_object* l_Lean_Meta_SynthInstance_hasInferTCGoalsLRAttribute___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Meta_SynthInstance_hasInferTCGoalsRLAttribute___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_Lean_Meta_SynthInstance_hasInferTCGoalsLRAttribute(x_1, x_2); +x_3 = l_Lean_Meta_SynthInstance_hasInferTCGoalsRLAttribute(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); @@ -6456,17 +6456,12 @@ x_24 = lean_ctor_get(x_22, 0); x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); lean_dec(x_24); -x_26 = l_Lean_Meta_SynthInstance_inferTCGoalsLRAttr; +x_26 = l_Lean_Meta_SynthInstance_inferTCGoalsRLAttr; x_27 = l_Lean_TagAttribute_hasTag(x_26, x_25, x_21); lean_dec(x_21); lean_dec(x_25); if (x_27 == 0) { -lean_ctor_set(x_22, 0, x_18); -return x_22; -} -else -{ uint8_t x_28; x_28 = !lean_is_exclusive(x_18); if (x_28 == 0) @@ -6497,6 +6492,11 @@ lean_ctor_set(x_22, 0, x_35); return x_22; } } +else +{ +lean_ctor_set(x_22, 0, x_18); +return x_22; +} } else { @@ -6509,47 +6509,47 @@ lean_dec(x_22); x_38 = lean_ctor_get(x_36, 0); lean_inc(x_38); lean_dec(x_36); -x_39 = l_Lean_Meta_SynthInstance_inferTCGoalsLRAttr; +x_39 = l_Lean_Meta_SynthInstance_inferTCGoalsRLAttr; x_40 = l_Lean_TagAttribute_hasTag(x_39, x_38, x_21); lean_dec(x_21); lean_dec(x_38); if (x_40 == 0) { -lean_object* x_41; -x_41 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_41, 0, x_18); -lean_ctor_set(x_41, 1, x_37); -return x_41; -} -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; -x_42 = lean_ctor_get(x_18, 0); +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_41 = lean_ctor_get(x_18, 0); +lean_inc(x_41); +x_42 = lean_ctor_get(x_18, 1); lean_inc(x_42); -x_43 = lean_ctor_get(x_18, 1); +x_43 = lean_ctor_get(x_18, 2); lean_inc(x_43); -x_44 = lean_ctor_get(x_18, 2); -lean_inc(x_44); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); lean_ctor_release(x_18, 1); lean_ctor_release(x_18, 2); - x_45 = x_18; + x_44 = x_18; } else { lean_dec_ref(x_18); - x_45 = lean_box(0); + x_44 = lean_box(0); } -x_46 = l_List_reverse___rarg(x_42); -if (lean_is_scalar(x_45)) { - x_47 = lean_alloc_ctor(0, 3, 0); +x_45 = l_List_reverse___rarg(x_41); +if (lean_is_scalar(x_44)) { + x_46 = lean_alloc_ctor(0, 3, 0); } else { - x_47 = x_45; + x_46 = x_44; } +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_46, 1, x_42); +lean_ctor_set(x_46, 2, x_43); +x_47 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_47, 0, x_46); -lean_ctor_set(x_47, 1, x_43); -lean_ctor_set(x_47, 2, x_44); +lean_ctor_set(x_47, 1, x_37); +return x_47; +} +else +{ +lean_object* x_48; x_48 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 0, x_18); lean_ctor_set(x_48, 1, x_37); return x_48; } @@ -6595,55 +6595,55 @@ if (lean_is_exclusive(x_53)) { x_57 = lean_ctor_get(x_54, 0); lean_inc(x_57); lean_dec(x_54); -x_58 = l_Lean_Meta_SynthInstance_inferTCGoalsLRAttr; +x_58 = l_Lean_Meta_SynthInstance_inferTCGoalsRLAttr; x_59 = l_Lean_TagAttribute_hasTag(x_58, x_57, x_52); lean_dec(x_52); lean_dec(x_57); if (x_59 == 0) { -lean_object* x_60; -if (lean_is_scalar(x_56)) { - x_60 = lean_alloc_ctor(0, 2, 0); -} else { - x_60 = x_56; -} -lean_ctor_set(x_60, 0, x_49); -lean_ctor_set(x_60, 1, x_55); -return x_60; -} -else -{ -lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; -x_61 = lean_ctor_get(x_49, 0); +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_60 = lean_ctor_get(x_49, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_49, 1); lean_inc(x_61); -x_62 = lean_ctor_get(x_49, 1); +x_62 = lean_ctor_get(x_49, 2); lean_inc(x_62); -x_63 = lean_ctor_get(x_49, 2); -lean_inc(x_63); if (lean_is_exclusive(x_49)) { lean_ctor_release(x_49, 0); lean_ctor_release(x_49, 1); lean_ctor_release(x_49, 2); - x_64 = x_49; + x_63 = x_49; } else { lean_dec_ref(x_49); - x_64 = lean_box(0); + x_63 = lean_box(0); } -x_65 = l_List_reverse___rarg(x_61); -if (lean_is_scalar(x_64)) { - x_66 = lean_alloc_ctor(0, 3, 0); +x_64 = l_List_reverse___rarg(x_60); +if (lean_is_scalar(x_63)) { + x_65 = lean_alloc_ctor(0, 3, 0); } else { - x_66 = x_64; + x_65 = x_63; +} +lean_ctor_set(x_65, 0, x_64); +lean_ctor_set(x_65, 1, x_61); +lean_ctor_set(x_65, 2, x_62); +if (lean_is_scalar(x_56)) { + x_66 = lean_alloc_ctor(0, 2, 0); +} else { + x_66 = x_56; } lean_ctor_set(x_66, 0, x_65); -lean_ctor_set(x_66, 1, x_62); -lean_ctor_set(x_66, 2, x_63); +lean_ctor_set(x_66, 1, x_55); +return x_66; +} +else +{ +lean_object* x_67; if (lean_is_scalar(x_56)) { x_67 = lean_alloc_ctor(0, 2, 0); } else { x_67 = x_56; } -lean_ctor_set(x_67, 0, x_66); +lean_ctor_set(x_67, 0, x_49); lean_ctor_set(x_67, 1, x_55); return x_67; } @@ -22307,8 +22307,8 @@ l_Lean_Meta_SynthInstance_initFn____x40_Lean_Meta_SynthInstance___hyg_5____close lean_mark_persistent(l_Lean_Meta_SynthInstance_initFn____x40_Lean_Meta_SynthInstance___hyg_5____closed__4); res = l_Lean_Meta_SynthInstance_initFn____x40_Lean_Meta_SynthInstance___hyg_5_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; -l_Lean_Meta_SynthInstance_inferTCGoalsLRAttr = lean_io_result_get_value(res); -lean_mark_persistent(l_Lean_Meta_SynthInstance_inferTCGoalsLRAttr); +l_Lean_Meta_SynthInstance_inferTCGoalsRLAttr = lean_io_result_get_value(res); +lean_mark_persistent(l_Lean_Meta_SynthInstance_inferTCGoalsRLAttr); lean_dec_ref(res); l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__1 = _init_l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__1(); lean_mark_persistent(l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__1);