From ac2871e15c95ddab92cecb3be1eb3a0dd075339c Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 19 Sep 2019 10:48:37 -0700 Subject: [PATCH] chore(stage0): update --- src/stage0/init/control/combinators.c | 284 ++ src/stage0/init/control/estate.c | 60 +- src/stage0/init/control/state.c | 120 +- src/stage0/init/data/array/basic.c | 433 ++- src/stage0/init/data/nat/basic.c | 73 + src/stage0/init/data/repr.c | 46 +- src/stage0/init/data/string/basic.c | 168 - src/stage0/init/lean/compiler/ir/emitc.c | 30 +- src/stage0/init/lean/compiler/ir/format.c | 24 +- src/stage0/init/lean/elaborator/basic.c | 3485 ++++++++++++++++++++- src/stage0/init/lean/elaborator/command.c | 2535 ++++++++------- src/stage0/init/lean/elaborator/preterm.c | 2793 ++++++++++++++--- src/stage0/init/lean/elaborator/term.c | 1119 +++++-- src/stage0/init/lean/expr.c | 40 + src/stage0/init/lean/format.c | 16 +- src/stage0/init/lean/localcontext.c | 307 ++ src/stage0/init/lean/message.c | 4 +- src/stage0/init/lean/parser/term.c | 70 + src/stage0/init/lean/syntax.c | 184 +- 19 files changed, 9540 insertions(+), 2251 deletions(-) diff --git a/src/stage0/init/control/combinators.c b/src/stage0/init/control/combinators.c index 348ef65c03..d7c56a988e 100644 --- a/src/stage0/init/control/combinators.c +++ b/src/stage0/init/control/combinators.c @@ -14,6 +14,7 @@ extern "C" { #endif lean_object* l_List_mfoldl___main(lean_object*); +lean_object* l_Nat_mforRevAux___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_mforAux___main(lean_object*); lean_object* l_List_mmap(lean_object*); lean_object* l_Nat_mforAux___boxed(lean_object*); @@ -29,6 +30,7 @@ lean_object* l_List_mexists___boxed(lean_object*); lean_object* l_Nat_mforAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_mcond___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_mjoin___rarg___closed__1; +lean_object* l_Nat_mforRev___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_mcond___rarg___lambda__1(lean_object*, lean_object*, uint8_t); lean_object* l_Nat_mfold___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mfilter___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -42,9 +44,16 @@ lean_object* l_when___boxed(lean_object*); lean_object* l_List_mmap___main___boxed(lean_object*); lean_object* l_List_mmap___boxed(lean_object*); lean_object* l_List_mfor___main___boxed(lean_object*); +lean_object* l_Nat_mforRev(lean_object*); +lean_object* l_Nat_mfoldRevAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_mforRevAux___boxed(lean_object*); lean_object* l_Nat_mfoldAux___main(lean_object*, lean_object*); +lean_object* l_Nat_mfoldRevAux(lean_object*, lean_object*); lean_object* l_List_mfirst___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mfoldr(lean_object*); +lean_object* l_Nat_mfoldRevAux___main(lean_object*, lean_object*); +lean_object* l_Nat_mforRevAux___main(lean_object*); +lean_object* l_Nat_mfoldRevAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mfilter___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_mcond___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_when___rarg(lean_object*, lean_object*, uint8_t, lean_object*); @@ -55,15 +64,18 @@ lean_object* l_List_mmap___main___rarg___lambda__1(lean_object*, lean_object*); lean_object* l_List_mfoldl___main___boxed(lean_object*); lean_object* l_mwhen___rarg___lambda__1(lean_object*, lean_object*, uint8_t); lean_object* l_List_mfoldr___main(lean_object*); +lean_object* l_Nat_mforRev___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_mfoldl___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mfirst___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mforall___main___boxed(lean_object*); +lean_object* l_Nat_mfoldRevAux___main___boxed(lean_object*, lean_object*); lean_object* l_List_mforall___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_unless___rarg(lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_List_mfoldr___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Nat_mfoldAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_mfor(lean_object*); +lean_object* l_Nat_mfoldRevAux___boxed(lean_object*, lean_object*); lean_object* l_List_mmap___main(lean_object*); lean_object* l_List_mexists___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_mfoldAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -73,16 +85,22 @@ lean_object* l_when___rarg___boxed(lean_object*, lean_object*, lean_object*, lea lean_object* l_List_mfoldl___boxed(lean_object*); lean_object* l_List_mfoldl___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_mjoin___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_mfoldRevAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mfilter___main___boxed(lean_object*); lean_object* l_mjoin(lean_object*); lean_object* l_List_mfor___main(lean_object*); lean_object* l_Nat_mforAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_mforRevAux___main___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_mwhen___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_mfoldAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mforall(lean_object*); +lean_object* l_Nat_mforRevAux___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_mforRevAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_List_mfor___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_mfold___boxed(lean_object*, lean_object*); +lean_object* l_Nat_mfoldRev___boxed(lean_object*, lean_object*); lean_object* l_List_mforall___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t); +lean_object* l_Nat_mfoldRevAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_mfold(lean_object*, lean_object*); lean_object* l_Nat_mforAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mfilter(lean_object*); @@ -94,11 +112,15 @@ lean_object* l_Nat_mfoldAux___rarg(lean_object*, lean_object*, lean_object*, lea lean_object* l_unless___boxed(lean_object*); lean_object* l_List_mfirst(lean_object*, lean_object*); lean_object* l_List_mfoldr___main___boxed(lean_object*); +lean_object* l_Nat_mforRev___boxed(lean_object*); lean_object* l_List_mfilter___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_mfoldRev(lean_object*, lean_object*); lean_object* l_List_mfilter___main(lean_object*); lean_object* l_List_mexists___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_mfoldRev___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mforall___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mmap___main___rarg___closed__1; +lean_object* l_Nat_mforRevAux___main___boxed(lean_object*); lean_object* l_List_mforall___boxed(lean_object*); lean_object* l_List_mfoldl(lean_object*); lean_object* l_List_mfor(lean_object*); @@ -115,7 +137,9 @@ lean_object* l_when(lean_object*); lean_object* l_List_mexists___main___boxed(lean_object*); lean_object* l_List_mexists(lean_object*); lean_object* l_List_mfor___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_mforRevAux(lean_object*); lean_object* l_mwhen___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_mfoldRev___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mexists___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_mwhen(lean_object*); lean_object* l_List_mfirst___main(lean_object*); @@ -510,6 +534,134 @@ lean_dec(x_1); return x_2; } } +lean_object* l_Nat_mforRevAux___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_unsigned_to_nat(0u); +x_5 = lean_nat_dec_eq(x_3, x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_6 = lean_unsigned_to_nat(1u); +x_7 = lean_nat_sub(x_3, x_6); +x_8 = lean_ctor_get(x_1, 4); +lean_inc(x_8); +lean_inc(x_2); +lean_inc(x_7); +x_9 = lean_apply_1(x_2, x_7); +x_10 = l_Nat_mforRevAux___main___rarg(x_1, x_2, x_7); +lean_dec(x_7); +x_11 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_9, x_10); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +lean_dec(x_2); +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +lean_dec(x_1); +x_13 = lean_box(0); +x_14 = lean_apply_2(x_12, lean_box(0), x_13); +return x_14; +} +} +} +lean_object* l_Nat_mforRevAux___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Nat_mforRevAux___main___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_Nat_mforRevAux___main___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Nat_mforRevAux___main___rarg(x_1, x_2, x_3); +lean_dec(x_3); +return x_4; +} +} +lean_object* l_Nat_mforRevAux___main___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Nat_mforRevAux___main(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Nat_mforRevAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Nat_mforRevAux___main___rarg(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_Nat_mforRevAux(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Nat_mforRevAux___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_Nat_mforRevAux___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Nat_mforRevAux___rarg(x_1, x_2, x_3); +lean_dec(x_3); +return x_4; +} +} +lean_object* l_Nat_mforRevAux___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Nat_mforRevAux(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Nat_mforRev___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Nat_mforRevAux___main___rarg(x_1, x_3, x_2); +return x_4; +} +} +lean_object* l_Nat_mforRev(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Nat_mforRev___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_Nat_mforRev___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Nat_mforRev___rarg(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* l_Nat_mforRev___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Nat_mforRev(x_1); +lean_dec(x_1); +return x_2; +} +} lean_object* l_Nat_mfoldAux___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { @@ -639,6 +791,138 @@ lean_dec(x_2); return x_3; } } +lean_object* l_Nat_mfoldRevAux___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_unsigned_to_nat(0u); +x_6 = lean_nat_dec_eq(x_3, x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_7 = lean_unsigned_to_nat(1u); +x_8 = lean_nat_sub(x_3, x_7); +x_9 = lean_ctor_get(x_1, 1); +lean_inc(x_9); +lean_inc(x_2); +lean_inc(x_8); +x_10 = lean_apply_2(x_2, x_8, x_4); +x_11 = lean_alloc_closure((void*)(l_Nat_mfoldRevAux___main___rarg___boxed), 4, 3); +lean_closure_set(x_11, 0, x_1); +lean_closure_set(x_11, 1, x_2); +lean_closure_set(x_11, 2, x_8); +x_12 = lean_apply_4(x_9, lean_box(0), lean_box(0), x_10, x_11); +return x_12; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +lean_dec(x_2); +x_13 = lean_ctor_get(x_1, 0); +lean_inc(x_13); +lean_dec(x_1); +x_14 = lean_ctor_get(x_13, 1); +lean_inc(x_14); +lean_dec(x_13); +x_15 = lean_apply_2(x_14, lean_box(0), x_4); +return x_15; +} +} +} +lean_object* l_Nat_mfoldRevAux___main(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Nat_mfoldRevAux___main___rarg___boxed), 4, 0); +return x_3; +} +} +lean_object* l_Nat_mfoldRevAux___main___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Nat_mfoldRevAux___main___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Nat_mfoldRevAux___main___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Nat_mfoldRevAux___main(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_Nat_mfoldRevAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Nat_mfoldRevAux___main___rarg(x_1, x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_Nat_mfoldRevAux(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Nat_mfoldRevAux___rarg___boxed), 4, 0); +return x_3; +} +} +lean_object* l_Nat_mfoldRevAux___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Nat_mfoldRevAux___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Nat_mfoldRevAux___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Nat_mfoldRevAux(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_Nat_mfoldRev___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Nat_mfoldRevAux___main___rarg(x_1, x_2, x_4, x_3); +return x_5; +} +} +lean_object* l_Nat_mfoldRev(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Nat_mfoldRev___rarg___boxed), 4, 0); +return x_3; +} +} +lean_object* l_Nat_mfoldRev___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Nat_mfoldRev___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_4); +return x_5; +} +} +lean_object* l_Nat_mfoldRev___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Nat_mfoldRev(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} lean_object* l_List_mmap___main___rarg___lambda__1(lean_object* x_1, lean_object* x_2) { _start: { diff --git a/src/stage0/init/control/estate.c b/src/stage0/init/control/estate.c index aa7477b606..46af76e75c 100644 --- a/src/stage0/init/control/estate.c +++ b/src/stage0/init/control/estate.c @@ -39,7 +39,6 @@ lean_object* l_EState_adaptExcept___rarg(lean_object*, lean_object*, lean_object lean_object* l_EState_Result_toString___rarg___closed__1; lean_object* l_EState_bind(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Except_toString___rarg___closed__2; -lean_object* l_EState_modify(lean_object*, lean_object*); lean_object* l_EState_unreachableError___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_EState_Monad___closed__2; @@ -50,7 +49,6 @@ lean_object* l_EState_Monad___closed__4; lean_object* l_EState_HasOrelse(lean_object*, lean_object*, lean_object*); lean_object* l_EState_Monad___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_EState_MonadExcept___closed__3; -lean_object* l_EState_modify___rarg(lean_object*, lean_object*); lean_object* l_EState_Monad___closed__10; lean_object* l_EState_catch___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_EState_get(lean_object*, lean_object*); @@ -60,6 +58,7 @@ lean_object* l_EState_HasRepr(lean_object*, lean_object*, lean_object*); lean_object* l_EState_MonadState___closed__2; lean_object* l_EState_Monad___closed__3; lean_object* l_EState_Monad___closed__9; +lean_object* l_EState_modifyGet___rarg(lean_object*, lean_object*); lean_object* l_EState_bind___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_EState_Monad___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_EState_Monad___closed__8; @@ -76,6 +75,7 @@ lean_object* l_EState_HasToString___rarg(lean_object*, lean_object*); lean_object* l_EState_map(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_EState_orelse_x27___rarg(lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_EState_Inhabited(lean_object*, lean_object*, lean_object*); +lean_object* l_EState_modifyGet(lean_object*, lean_object*, lean_object*); lean_object* l_EState_MonadExcept___closed__1; lean_object* l_EState_MonadExcept(lean_object*, lean_object*); lean_object* l_EState_catch(lean_object*, lean_object*, lean_object*); @@ -400,44 +400,52 @@ x_3 = lean_alloc_closure((void*)(l_EState_get___rarg), 1, 0); return x_3; } } -lean_object* l_EState_modify___rarg(lean_object* x_1, lean_object* x_2) { +lean_object* l_EState_modifyGet___rarg(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; x_3 = !lean_is_exclusive(x_2); if (x_3 == 0) { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_4 = lean_ctor_get(x_2, 1); x_5 = lean_ctor_get(x_2, 0); lean_dec(x_5); x_6 = lean_apply_1(x_1, x_4); -x_7 = lean_box(0); -lean_ctor_set(x_2, 1, x_6); +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +lean_ctor_set(x_2, 1, x_8); lean_ctor_set(x_2, 0, x_7); return x_2; } else { -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_8 = lean_ctor_get(x_2, 1); -lean_inc(x_8); +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_2, 1); +lean_inc(x_9); lean_dec(x_2); -x_9 = lean_apply_1(x_1, x_8); -x_10 = lean_box(0); -x_11 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_11, 0, x_10); -lean_ctor_set(x_11, 1, x_9); -return x_11; +x_10 = lean_apply_1(x_1, x_9); +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_11); +lean_ctor_set(x_13, 1, x_12); +return x_13; } } } -lean_object* l_EState_modify(lean_object* x_1, lean_object* x_2) { +lean_object* l_EState_modifyGet(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_EState_modify___rarg), 2, 0); -return x_3; +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_EState_modifyGet___rarg), 2, 0); +return x_4; } } lean_object* l_EState_throw___rarg(lean_object* x_1, lean_object* x_2) { @@ -1501,7 +1509,9 @@ lean_object* _init_l_EState_MonadState___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_EState_get___rarg), 1, 0); +x_1 = lean_alloc_closure((void*)(l_EState_modifyGet), 3, 2); +lean_closure_set(x_1, 0, lean_box(0)); +lean_closure_set(x_1, 1, lean_box(0)); return x_1; } } @@ -1509,7 +1519,7 @@ lean_object* _init_l_EState_MonadState___closed__2() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_EState_set___rarg), 2, 0); +x_1 = lean_alloc_closure((void*)(l_EState_get___rarg), 1, 0); return x_1; } } @@ -1517,7 +1527,7 @@ lean_object* _init_l_EState_MonadState___closed__3() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_EState_modify___rarg), 2, 0); +x_1 = lean_alloc_closure((void*)(l_EState_set___rarg), 2, 0); return x_1; } } @@ -1525,9 +1535,9 @@ lean_object* _init_l_EState_MonadState___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_EState_MonadState___closed__1; -x_2 = l_EState_MonadState___closed__2; -x_3 = l_EState_MonadState___closed__3; +x_1 = l_EState_MonadState___closed__2; +x_2 = l_EState_MonadState___closed__3; +x_3 = l_EState_MonadState___closed__1; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); diff --git a/src/stage0/init/control/state.c b/src/stage0/init/control/state.c index 98dc4b1c3c..84e23666bb 100644 --- a/src/stage0/init/control/state.c +++ b/src/stage0/init/control/state.c @@ -60,23 +60,25 @@ lean_object* l_StateT_set___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_StateT_failure(lean_object*, lean_object*, lean_object*); lean_object* l_getModify(lean_object*, lean_object*); lean_object* l_monadStateRunnerTrans___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_StateT_modifyGet___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_MonadStateAdapter_adaptState_x27___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_StateT_MonadExcept___rarg___lambda__2(lean_object*, lean_object*, lean_object*); lean_object* l_monadStateRunnerTrans___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_StateT_orelse___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_StateT_MonadExcept(lean_object*, lean_object*); +lean_object* l_StateT_modifyGet(lean_object*, lean_object*); lean_object* l_monadStateRunnerTrans(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_StateT_HasMonadLift___rarg(lean_object*); lean_object* l_StateT_set___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_getModify___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_monadStateAdapterTrans(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_monadStateTrans___rarg___lambda__2(lean_object*, lean_object*, lean_object*); +lean_object* l_monadStateTrans___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_StateT_Monad___rarg___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_StateT_Monad___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_monadStateAdapterTrans___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_modify___boxed(lean_object*, lean_object*); lean_object* l_StateT_MonadExcept___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_StateT_run___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_StateT_modify___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_StateT_map___rarg___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_StateT_run_x27___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_MonadStateAdapter_adaptState_x27___rarg___lambda__1(lean_object*, lean_object*); @@ -89,15 +91,19 @@ lean_object* l_monadStateTrans___rarg___lambda__1(lean_object*, lean_object*, le lean_object* l_StateT_MonadFunctor___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_StateT_MonadStateAdapter___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_StateT_MonadFunctor___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_modify___rarg(lean_object*, lean_object*); lean_object* l_StateT_set___boxed(lean_object*, lean_object*); lean_object* l_StateT_run(lean_object*, lean_object*, lean_object*); lean_object* l_StateT_MonadRun(lean_object*, lean_object*, lean_object*); lean_object* l_StateT_map___boxed(lean_object*, lean_object*); lean_object* l_getModify___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_modify___rarg___lambda__1(lean_object*, lean_object*); lean_object* l_StateT_MonadStateAdapter(lean_object*, lean_object*, lean_object*); lean_object* l_StateT_bind(lean_object*, lean_object*); lean_object* l_StateT_HasMonadLift(lean_object*, lean_object*); +lean_object* l_StateT_modifyGet___boxed(lean_object*, lean_object*); lean_object* l_StateT_MonadExcept___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_modify(lean_object*, lean_object*); lean_object* l_StateT_failure___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_StateT_map(lean_object*, lean_object*); lean_object* l_StateT_Alternative(lean_object*, lean_object*); @@ -108,11 +114,9 @@ lean_object* l_StateT_Monad___rarg___lambda__3(lean_object*, lean_object*, lean_ lean_object* l_StateT_MonadState(lean_object*, lean_object*); lean_object* l_StateT_pure(lean_object*, lean_object*); lean_object* l_StateT_failure___rarg___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_StateT_modify___boxed(lean_object*, lean_object*); lean_object* l_StateT_get___rarg(lean_object*, lean_object*); lean_object* l_StateT_Monad___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_StateT_Alternative___rarg(lean_object*, lean_object*); -lean_object* l_StateT_modify(lean_object*, lean_object*); lean_object* l_StateT_run_x27___rarg___lambda__1(lean_object*); lean_object* l_StateT_MonadState___rarg(lean_object*); lean_object* l_StateT_MonadStateRunner(lean_object*, lean_object*); @@ -741,38 +745,34 @@ lean_dec(x_2); return x_3; } } -lean_object* l_StateT_modify___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_StateT_modifyGet___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_ctor_get(x_4, 1); +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); -lean_dec(x_4); -x_6 = lean_apply_1(x_2, x_3); -x_7 = lean_box(0); -x_8 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_8, 0, x_7); -lean_ctor_set(x_8, 1, x_6); -x_9 = lean_apply_2(x_5, lean_box(0), x_8); -return x_9; +lean_dec(x_1); +x_6 = lean_ctor_get(x_5, 1); +lean_inc(x_6); +lean_dec(x_5); +x_7 = lean_apply_1(x_3, x_4); +x_8 = lean_apply_2(x_6, lean_box(0), x_7); +return x_8; } } -lean_object* l_StateT_modify(lean_object* x_1, lean_object* x_2) { +lean_object* l_StateT_modifyGet(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_StateT_modify___rarg), 3, 0); +x_3 = lean_alloc_closure((void*)(l_StateT_modifyGet___rarg), 4, 0); return x_3; } } -lean_object* l_StateT_modify___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_StateT_modifyGet___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_StateT_modify(x_1, x_2); +x_3 = l_StateT_modifyGet(x_1, x_2); lean_dec(x_2); return x_3; } @@ -1034,6 +1034,48 @@ lean_dec(x_2); return x_3; } } +lean_object* l_modify___rarg___lambda__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_apply_1(x_1, x_2); +x_4 = lean_box(0); +x_5 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_5, 0, x_4); +lean_ctor_set(x_5, 1, x_3); +return x_5; +} +} +lean_object* l_modify___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 2); +lean_inc(x_3); +lean_dec(x_1); +x_4 = lean_alloc_closure((void*)(l_modify___rarg___lambda__1), 2, 1); +lean_closure_set(x_4, 0, x_2); +x_5 = lean_apply_2(x_3, lean_box(0), x_4); +return x_5; +} +} +lean_object* l_modify(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_modify___rarg), 2, 0); +return x_3; +} +} +lean_object* l_modify___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_modify(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} lean_object* l_getModify___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -1051,16 +1093,18 @@ return x_6; lean_object* l_getModify___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_6 = lean_ctor_get(x_1, 2); lean_inc(x_6); lean_dec(x_1); -x_7 = lean_apply_1(x_6, x_2); -x_8 = lean_alloc_closure((void*)(l_getModify___rarg___lambda__1___boxed), 3, 2); -lean_closure_set(x_8, 0, x_3); -lean_closure_set(x_8, 1, x_5); -x_9 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_7, x_8); -return x_9; +x_7 = lean_alloc_closure((void*)(l_modify___rarg___lambda__1), 2, 1); +lean_closure_set(x_7, 0, x_2); +x_8 = lean_apply_2(x_6, lean_box(0), x_7); +x_9 = lean_alloc_closure((void*)(l_getModify___rarg___lambda__1___boxed), 3, 2); +lean_closure_set(x_9, 0, x_3); +lean_closure_set(x_9, 1, x_5); +x_10 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_8, x_9); +return x_10; } } lean_object* l_getModify___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -1119,16 +1163,16 @@ x_6 = lean_apply_2(x_2, lean_box(0), x_5); return x_6; } } -lean_object* l_monadStateTrans___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_monadStateTrans___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = lean_ctor_get(x_1, 2); -lean_inc(x_4); +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_1, 2); +lean_inc(x_5); lean_dec(x_1); -x_5 = lean_apply_1(x_4, x_3); -x_6 = lean_apply_2(x_2, lean_box(0), x_5); -return x_6; +x_6 = lean_apply_2(x_5, lean_box(0), x_4); +x_7 = lean_apply_2(x_2, lean_box(0), x_6); +return x_7; } } lean_object* l_monadStateTrans___rarg(lean_object* x_1, lean_object* x_2) { @@ -1144,7 +1188,7 @@ lean_inc(x_2); x_5 = lean_alloc_closure((void*)(l_monadStateTrans___rarg___lambda__1), 3, 2); lean_closure_set(x_5, 0, x_2); lean_closure_set(x_5, 1, x_1); -x_6 = lean_alloc_closure((void*)(l_monadStateTrans___rarg___lambda__2), 3, 2); +x_6 = lean_alloc_closure((void*)(l_monadStateTrans___rarg___lambda__2), 4, 2); lean_closure_set(x_6, 0, x_2); lean_closure_set(x_6, 1, x_1); x_7 = lean_alloc_ctor(0, 3, 0); @@ -1182,7 +1226,7 @@ lean_closure_set(x_2, 0, x_1); lean_inc(x_1); x_3 = lean_alloc_closure((void*)(l_StateT_set___rarg___boxed), 3, 1); lean_closure_set(x_3, 0, x_1); -x_4 = lean_alloc_closure((void*)(l_StateT_modify___rarg), 3, 1); +x_4 = lean_alloc_closure((void*)(l_StateT_modifyGet___rarg), 4, 1); lean_closure_set(x_4, 0, x_1); x_5 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_5, 0, x_2); diff --git a/src/stage0/init/data/array/basic.c b/src/stage0/init/data/array/basic.c index bb601c5a3a..8b3266af22 100644 --- a/src/stage0/init/data/array/basic.c +++ b/src/stage0/init/data/array/basic.c @@ -18,9 +18,13 @@ lean_object* l_Array_anyMAux___main___at_Array_any___spec__1(lean_object*); lean_object* l_Array_extractAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_ummapAux___main___at_Array_map___spec__1(lean_object*, lean_object*); lean_object* l_Array_append(lean_object*); +lean_object* l_Array_mk___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlFrom___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_foldr___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_ummap___boxed(lean_object*, lean_object*); +lean_object* l_Array_foldr___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateRev___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_iterateFrom___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_shrink___main___rarg___boxed(lean_object*, lean_object*); lean_object* l_Array_mfindRevAux___main___at_Array_findRev___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -35,11 +39,10 @@ lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Array_anyMAux___main___at_Array_all___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_getOpt(lean_object*); lean_object* l_Array_miterateAux___main___at_Array_foldlFrom___spec__1(lean_object*, lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_toList___spec__1(lean_object*); lean_object* l_Array_any(lean_object*); lean_object* l_List_repr___rarg(lean_object*, lean_object*); lean_object* l_Array_swap___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_revFoldl(lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___boxed(lean_object*, lean_object*); lean_object* l_Array_mfor___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_extract___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterate___boxed(lean_object*, lean_object*); @@ -48,23 +51,22 @@ lean_object* l_Array_iterate___rarg___boxed(lean_object*, lean_object*, lean_obj lean_object* l_Array_mfoldl___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_iterateFrom___spec__1(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_iterate___spec__1(lean_object*, lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_foldlFrom___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_reverse(lean_object*); lean_object* l_Array_filter(lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_toList___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyMAux___main___at_Array_allM___spec__1___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfoldl_u2082___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux(lean_object*, lean_object*); lean_object* l_Array_ummapAux___main___at_Array_ummap___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_all___rarg___boxed(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mfoldlFrom___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mfoldlFrom___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Array_shrink___rarg(lean_object*, lean_object*); lean_object* l_Array_fswap___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Array_extractAux(lean_object*); lean_object* l_Array_HasRepr(lean_object*); lean_object* l_Array_ummapAux___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_iterateRev___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_allM___boxed(lean_object*, lean_object*); lean_object* l_Array_eraseIdxAux___rarg(lean_object*, lean_object*); lean_object* l_Array_iterate_u2082___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -77,14 +79,16 @@ lean_object* l_Array_mfoldlFrom___boxed(lean_object*, lean_object*); lean_object* l_Array_HasBeq(lean_object*); lean_object* l_Array_ummapAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_ummapIdx(lean_object*, lean_object*); +lean_object* l_Array_mfoldr(lean_object*, lean_object*); lean_object* l_Array_size___boxed(lean_object*, lean_object*); lean_object* l_Array_uset___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_iterateFrom___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfindRevAux(lean_object*, lean_object*); lean_object* l_Array_anyMAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_iterateRev___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_toArrayAux___main___rarg(lean_object*, lean_object*); lean_object* l_Array_isEqv___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_fswapAt___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfoldlFrom___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_uget(lean_object*, lean_object*, size_t, lean_object*); @@ -97,7 +101,6 @@ lean_object* l_Array_miterateAux___main___at_Array_mfoldlFrom___spec__1___rarg__ lean_object* l_List_redLength___main___rarg(lean_object*); lean_object* l_Array_indexOfAux___main(lean_object*); lean_object* l_Array_fswap(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___main(lean_object*, lean_object*); lean_object* l_Array_mfoldl___boxed(lean_object*, lean_object*); lean_object* l_Array_mfind(lean_object*, lean_object*); lean_object* l_Array_mfindAux___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -110,6 +113,7 @@ lean_object* l_Array_miterateAux___main___at_Array_mfoldl___spec__1(lean_object* lean_object* l_Array_miterateAux___main___at_Array_iterate___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_pop___boxed(lean_object*, lean_object*); lean_object* l_Array_eraseIdxSzAux(lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlFrom___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyMAux___main___at_Array_all___spec__1(lean_object*); lean_object* l_Array_mfindRevAux___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -119,12 +123,14 @@ lean_object* l_Array_indexOfAux(lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mmapIdx___spec__1___boxed(lean_object*, lean_object*); lean_object* l_List_redLength(lean_object*); lean_object* l_Array_mkEmpty(lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_ummap___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterate_u2082Aux___main___at_Array_mfoldl_u2082___spec__1___boxed(lean_object*, lean_object*); lean_object* l_List_toArrayAux(lean_object*); lean_object* l_Array_eraseIdxSzAuxInstance(lean_object*); lean_object* l_Array_feraseIdx(lean_object*); lean_object* l_Array_mkArray___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_miterateRev___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_extract(lean_object*); lean_object* l_Array_eraseIdx(lean_object*); lean_object* l_Array_mfindAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -133,6 +139,7 @@ lean_object* l_Array_map___rarg(lean_object*, lean_object*); lean_object* l_Array_feraseIdx___rarg___boxed(lean_object*, lean_object*); lean_object* l_Array_empty(lean_object*); lean_object* l_Array_swap(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_HasEmptyc(lean_object*); lean_object* l_Array_extractAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_redLength___main___rarg___boxed(lean_object*); @@ -146,12 +153,15 @@ lean_object* l_Array_indexOfAux___rarg(lean_object*, lean_object*, lean_object*, lean_object* l_Array_get___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfindRev___boxed(lean_object*, lean_object*); lean_object* l_Array_miterate_u2082Aux___boxed(lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1(lean_object*, lean_object*); lean_object* l_Array_eraseIdx_x27___rarg___boxed(lean_object*, lean_object*); lean_object* l_Array_mmapIdx___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterate(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mmap___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfindAux___boxed(lean_object*, lean_object*); lean_object* l_Array_mfor(lean_object*); +lean_object* l_Array_mfoldr___boxed(lean_object*, lean_object*); lean_object* l_Array_mfindAux___main___at_Array_find___spec__1(lean_object*, lean_object*); lean_object* l_Array_extract___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mfoldl___spec__1___boxed(lean_object*, lean_object*); @@ -164,14 +174,17 @@ lean_object* l_Array_isEqv(lean_object*); lean_object* l_Array_mfind___boxed(lean_object*, lean_object*); lean_object* l_Array_mfindAux___main(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mmapIdx___spec__1(lean_object*, lean_object*); +lean_object* l_Array_miterateRev___boxed(lean_object*, lean_object*); lean_object* l_Array_miterateAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfindAux___main___boxed(lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_foldr___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_toString___rarg(lean_object*, lean_object*); lean_object* l_Array_miterate_u2082Aux(lean_object*, lean_object*); -lean_object* l_Array_revFoldl___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_foldlFrom___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_swapAt___rarg___boxed(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* l_Array_mk(lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_foldr___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterate_u2082(lean_object*, lean_object*); lean_object* l_Array_mfindRevAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main(lean_object*, lean_object*); @@ -185,29 +198,31 @@ lean_object* l_Array_miterate_u2082Aux___main___at_Array_mfoldl_u2082___spec__1_ lean_object* l_Array_mfindAux___main___at_Array_find___spec__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_ummapAux(lean_object*, lean_object*); lean_object* l_Array_mfindRevAux___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_revFoldl___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyMAux___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_filterAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mmap___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateRev(lean_object*, lean_object*); lean_object* l_Array_fget(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mforAux___main___boxed(lean_object*); lean_object* l_Array_singleton___rarg(lean_object*); lean_object* l_Array_mfindRevAux___boxed(lean_object*, lean_object*); lean_object* l_Array_mmapIdx___boxed(lean_object*, lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_toList___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyMAux___main___at_Array_all___spec__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_filter___rarg(lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Array_findRev___rarg(lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_isEmpty___rarg(lean_object*); uint8_t l_Array_any___rarg(lean_object*, lean_object*); lean_object* l_Array_ummapAux___main___at_Array_mapIdx___spec__1(lean_object*, lean_object*); lean_object* l_Array_push(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateFrom(lean_object*, lean_object*); +lean_object* l_Array_foldr(lean_object*, lean_object*); lean_object* l_Array_anyMAux___main(lean_object*, lean_object*); lean_object* l_Array_eraseIdxAux___main(lean_object*); lean_object* l_Array_mforAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_iterateRev___spec__1(lean_object*, lean_object*); lean_object* l_Array_indexOfAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_eraseIdx___rarg___boxed(lean_object*, lean_object*); lean_object* l_Array_push___boxed(lean_object*, lean_object*, lean_object*); @@ -230,9 +245,8 @@ lean_object* l_Array_iterateFrom___rarg___boxed(lean_object*, lean_object*, lean lean_object* l_Array_back(lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mmap___spec__1___rarg___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Array_ummapAux___main___at_Array_map___spec__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_revFoldl___spec__1(lean_object*, lean_object*); lean_object* l_Array_isEqvAux___main(lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_revFoldl___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_data(lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyMAux___main___at_Array_allM___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Array_ummapAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_ummapIdx___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -252,7 +266,6 @@ lean_object* l_Array_sz___boxed(lean_object*, lean_object*); lean_object* l_Array_Inhabited(lean_object*); lean_object* l_Array_miterate_u2082Aux___main___at_Array_iterate_u2082___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Array_modify___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_revIterate___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_HasRepr___rarg___closed__1; lean_object* l_Array_HasToString(lean_object*); lean_object* l_Array_singleton(lean_object*); @@ -274,17 +287,22 @@ lean_object* l_Array_reverseAux___main___rarg(lean_object*, lean_object*); lean_object* l_Array_anyMAux___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); lean_object* l_Array_eraseIdxSzAuxInstance___rarg(lean_object*); lean_object* l_Array_pop(lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main(lean_object*, lean_object*); lean_object* l_Array_findRev___rarg___boxed(lean_object*, lean_object*); lean_object* l_Array_sz(lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_toList___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux(lean_object*, lean_object*); lean_object* l_Array_extractAux___main(lean_object*); lean_object* l_Array_miterate_u2082Aux___main___at_Array_iterate_u2082___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_ummapAux___boxed(lean_object*, lean_object*); lean_object* l_Array_mfindAux___main___at_Array_find___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_modify___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateRev___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_size(lean_object*, lean_object*); lean_object* l_Array_eraseIdx_x27___rarg(lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_foldr___spec__1(lean_object*, lean_object*); lean_object* l_Array_mforAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_toList___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_isEmpty(lean_object*); lean_object* l_Array_eraseIdxSzAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfoldl_u2082___boxed(lean_object*, lean_object*); @@ -315,7 +333,6 @@ uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Array_iterate_u2082___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfoldlFrom(lean_object*, lean_object*); lean_object* l_Array_iterate_u2082(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_revIterate___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_foldl___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_ummapAux___main___at_Array_ummap___spec__1___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_any___rarg___boxed(lean_object*, lean_object*); @@ -327,10 +344,11 @@ lean_object* l_Array_miterateAux___main___at_Array_append___spec__1___rarg___box lean_object* lean_nat_div(lean_object*, lean_object*); lean_object* l_Array_isEqvAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_append___spec__1(lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_toList___spec__1(lean_object*); lean_object* l_Array_mfindRevAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_feraseIdx___rarg(lean_object*, lean_object*); lean_object* l_Array_HasToString___rarg(lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_mfoldr___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mfoldl___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_reverse___rarg(lean_object*); lean_object* l_Array_mfor___boxed(lean_object*); @@ -339,13 +357,13 @@ lean_object* l_Array_mmap___boxed(lean_object*, lean_object*); lean_object* l_Array_set(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_find(lean_object*, lean_object*); lean_object* l_Array_swapAt___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux___boxed(lean_object*, lean_object*); lean_object* l_Array_eraseIdxSzAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mmap___spec__1(lean_object*, lean_object*); lean_object* l_Array_miterate_u2082Aux___main___at_Array_mfoldl_u2082___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterate_u2082Aux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyMAux___main___at_Array_allM___spec__1(lean_object*, lean_object*); -lean_object* l_Array_revIterate(lean_object*, lean_object*); lean_object* l_Array_mforAux___boxed(lean_object*); lean_object* l_Array_miterateAux___main___at_Array_mfoldl___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_getOpt___rarg___boxed(lean_object*, lean_object*); @@ -358,19 +376,20 @@ lean_object* l_Array_mfindRevAux___main___at_Array_findRev___spec__1(lean_object lean_object* l_Array_find___rarg___boxed(lean_object*, lean_object*); lean_object* l_Array_toList(lean_object*); lean_object* l_Array_set___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_data___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_indexOf___rarg___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_revFoldl___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_reverseAux(lean_object*); lean_object* l_Array_foldl___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterate_u2082Aux___main___at_Array_mfoldl_u2082___spec__1(lean_object*, lean_object*); lean_object* l_Array_isEqvAux(lean_object*); lean_object* l_List_toArrayAux___main(lean_object*); -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_redLength___rarg___boxed(lean_object*); +lean_object* l___private_init_data_array_basic_2__miterateRevAux(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Array_foldl___spec__1(lean_object*, lean_object*); lean_object* l_Array_ummapAux___main___boxed(lean_object*, lean_object*); lean_object* l_Array_indexOfAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_miterateRev(lean_object*, lean_object*); lean_object* l_Array_HasAppend(lean_object*); lean_object* l_Array_modify(lean_object*); lean_object* l_Array_mfindAux(lean_object*, lean_object*); @@ -389,6 +408,22 @@ lean_object* l_Array_back___rarg(lean_object*, lean_object*); lean_object* l_List_redLength___rarg(lean_object*); lean_object* l_Array_anyMAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mforAux___main(lean_object*); +lean_object* l_Array_mk___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_array_mk(x_2, x_3); +return x_4; +} +} +lean_object* l_Array_data___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_array_data(x_2, x_3); +return x_4; +} +} lean_object* l_Array_sz___boxed(lean_object* x_1, lean_object* x_2) { _start: { @@ -2831,104 +2866,235 @@ x_4 = lean_box(x_3); return x_4; } } -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { -lean_object* x_6; uint8_t x_7; -x_6 = lean_unsigned_to_nat(0u); -x_7 = lean_nat_dec_eq(x_3, x_6); -if (x_7 == 0) +lean_object* x_8; uint8_t x_9; +x_8 = lean_unsigned_to_nat(0u); +x_9 = lean_nat_dec_eq(x_5, x_8); +if (x_9 == 0) { -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_8 = lean_unsigned_to_nat(1u); -x_9 = lean_nat_sub(x_3, x_8); -lean_dec(x_3); -x_10 = lean_array_fget(x_1, x_9); -lean_inc(x_2); -lean_inc(x_9); -x_11 = lean_apply_3(x_2, x_9, x_10, x_5); -x_3 = x_9; -x_4 = lean_box(0); -x_5 = x_11; -goto _start; +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_sub(x_5, x_10); +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +x_13 = lean_array_fget(x_3, x_11); +lean_inc(x_4); +lean_inc(x_11); +x_14 = lean_apply_3(x_4, x_11, x_13, x_7); +x_15 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__miterateRevAux___main___rarg___boxed), 7, 6); +lean_closure_set(x_15, 0, x_1); +lean_closure_set(x_15, 1, lean_box(0)); +lean_closure_set(x_15, 2, x_3); +lean_closure_set(x_15, 3, x_4); +lean_closure_set(x_15, 4, x_11); +lean_closure_set(x_15, 5, lean_box(0)); +x_16 = lean_apply_4(x_12, lean_box(0), lean_box(0), x_14, x_15); +return x_16; } else { +lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_dec(x_4); lean_dec(x_3); +x_17 = lean_ctor_get(x_1, 0); +lean_inc(x_17); +lean_dec(x_1); +x_18 = lean_ctor_get(x_17, 1); +lean_inc(x_18); +lean_dec(x_17); +x_19 = lean_apply_2(x_18, lean_box(0), x_7); +return x_19; +} +} +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__miterateRevAux___main___rarg___boxed), 7, 0); +return x_3; +} +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l___private_init_data_array_basic_2__miterateRevAux___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_5); +return x_8; +} +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l___private_init_data_array_basic_2__miterateRevAux___main(x_1, x_2); lean_dec(x_2); -return x_5; -} -} -} -lean_object* l___private_init_data_array_basic_2__revIterateAux___main(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__revIterateAux___main___rarg___boxed), 5, 0); return x_3; } } -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_init_data_array_basic_2__miterateRevAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { -lean_object* x_6; -x_6 = l___private_init_data_array_basic_2__revIterateAux___main___rarg(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_1); -return x_6; +lean_object* x_8; +x_8 = l___private_init_data_array_basic_2__miterateRevAux___main___rarg(x_1, lean_box(0), x_3, x_4, x_5, lean_box(0), x_7); +return x_8; } } -lean_object* l___private_init_data_array_basic_2__revIterateAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = l___private_init_data_array_basic_2__revIterateAux___main___rarg(x_1, x_2, x_3, lean_box(0), x_5); -return x_6; -} -} -lean_object* l___private_init_data_array_basic_2__revIterateAux(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_init_data_array_basic_2__miterateRevAux(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__revIterateAux___rarg___boxed), 5, 0); +x_3 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__miterateRevAux___rarg___boxed), 7, 0); return x_3; } } -lean_object* l___private_init_data_array_basic_2__revIterateAux___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_init_data_array_basic_2__miterateRevAux___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { -lean_object* x_6; -x_6 = l___private_init_data_array_basic_2__revIterateAux___rarg(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_1); -return x_6; +lean_object* x_8; +x_8 = l___private_init_data_array_basic_2__miterateRevAux___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_5); +return x_8; } } -lean_object* l_Array_revIterate___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_array_get_size(x_1); -x_5 = l___private_init_data_array_basic_2__revIterateAux___main___rarg(x_1, x_3, x_4, lean_box(0), x_2); -return x_5; -} -} -lean_object* l_Array_revIterate(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_init_data_array_basic_2__miterateRevAux___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Array_revIterate___rarg___boxed), 3, 0); +x_3 = l___private_init_data_array_basic_2__miterateRevAux(x_1, x_2); +lean_dec(x_2); return x_3; } } -lean_object* l_Array_revIterate___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_miterateRev___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -lean_object* x_4; -x_4 = l_Array_revIterate___rarg(x_1, x_2, x_3); +lean_object* x_6; lean_object* x_7; +x_6 = lean_array_get_size(x_3); +x_7 = l___private_init_data_array_basic_2__miterateRevAux___main___rarg(x_1, lean_box(0), x_3, x_5, x_6, lean_box(0), x_4); +lean_dec(x_6); +return x_7; +} +} +lean_object* l_Array_miterateRev(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Array_miterateRev___rarg), 5, 0); +return x_3; +} +} +lean_object* l_Array_miterateRev___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Array_miterateRev(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_unsigned_to_nat(0u); +x_10 = lean_nat_dec_eq(x_6, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_sub(x_6, x_11); +x_13 = lean_ctor_get(x_1, 1); +lean_inc(x_13); +x_14 = lean_array_fget(x_5, x_12); +lean_inc(x_3); +x_15 = lean_apply_2(x_3, x_14, x_8); +x_16 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1___rarg___boxed), 8, 7); +lean_closure_set(x_16, 0, x_1); +lean_closure_set(x_16, 1, lean_box(0)); +lean_closure_set(x_16, 2, x_3); +lean_closure_set(x_16, 3, x_4); +lean_closure_set(x_16, 4, x_5); +lean_closure_set(x_16, 5, x_12); +lean_closure_set(x_16, 6, lean_box(0)); +x_17 = lean_apply_4(x_13, lean_box(0), lean_box(0), x_15, x_16); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_18 = lean_ctor_get(x_1, 0); +lean_inc(x_18); lean_dec(x_1); -return x_4; +x_19 = lean_ctor_get(x_18, 1); +lean_inc(x_19); +lean_dec(x_18); +x_20 = lean_apply_2(x_19, lean_box(0), x_8); +return x_20; } } -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_revFoldl___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1___rarg___boxed), 8, 0); +return x_3; +} +} +lean_object* l_Array_mfoldr___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; lean_object* x_7; +x_6 = lean_array_get_size(x_5); +lean_inc(x_5); +x_7 = l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1___rarg(x_1, lean_box(0), x_3, x_5, x_5, x_6, lean_box(0), x_4); +lean_dec(x_6); +return x_7; +} +} +lean_object* l_Array_mfoldr(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Array_mfoldr___rarg), 5, 0); +return x_3; +} +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_6); +return x_9; +} +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_mfoldr___spec__1(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_Array_mfoldr___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Array_mfoldr(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_iterateRev___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; @@ -2942,7 +3108,8 @@ x_10 = lean_nat_sub(x_4, x_9); lean_dec(x_4); x_11 = lean_array_fget(x_3, x_10); lean_inc(x_2); -x_12 = lean_apply_2(x_2, x_11, x_6); +lean_inc(x_10); +x_12 = lean_apply_3(x_2, x_10, x_11, x_6); x_4 = x_10; x_5 = lean_box(0); x_6 = x_12; @@ -2956,51 +3123,123 @@ return x_6; } } } -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_revFoldl___spec__1(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_iterateRev___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__revIterateAux___main___at_Array_revFoldl___spec__1___rarg___boxed), 6, 0); +x_3 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_iterateRev___spec__1___rarg___boxed), 6, 0); return x_3; } } -lean_object* l_Array_revFoldl___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_iterateRev___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; x_4 = lean_array_get_size(x_1); -x_5 = l___private_init_data_array_basic_2__revIterateAux___main___at_Array_revFoldl___spec__1___rarg(x_1, x_3, x_1, x_4, lean_box(0), x_2); +x_5 = l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_iterateRev___spec__1___rarg(x_1, x_3, x_1, x_4, lean_box(0), x_2); return x_5; } } -lean_object* l_Array_revFoldl(lean_object* x_1, lean_object* x_2) { +lean_object* l_Array_iterateRev(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Array_revFoldl___rarg___boxed), 3, 0); +x_3 = lean_alloc_closure((void*)(l_Array_iterateRev___rarg___boxed), 3, 0); return x_3; } } -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_revFoldl___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_iterateRev___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; -x_7 = l___private_init_data_array_basic_2__revIterateAux___main___at_Array_revFoldl___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_iterateRev___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_3); lean_dec(x_1); return x_7; } } -lean_object* l_Array_revFoldl___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_iterateRev___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Array_revFoldl___rarg(x_1, x_2, x_3); +x_4 = l_Array_iterateRev___rarg(x_1, x_2, x_3); lean_dec(x_1); return x_4; } } -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_toList___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_foldr___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_unsigned_to_nat(0u); +x_8 = lean_nat_dec_eq(x_4, x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_nat_sub(x_4, x_9); +lean_dec(x_4); +x_11 = lean_array_fget(x_3, x_10); +lean_inc(x_1); +x_12 = lean_apply_2(x_1, x_11, x_6); +x_4 = x_10; +x_5 = lean_box(0); +x_6 = x_12; +goto _start; +} +else +{ +lean_dec(x_4); +lean_dec(x_1); +return x_6; +} +} +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_foldr___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_foldr___spec__1___rarg___boxed), 6, 0); +return x_3; +} +} +lean_object* l_Array_foldr___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_array_get_size(x_3); +x_5 = l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_foldr___spec__1___rarg(x_1, x_3, x_3, x_4, lean_box(0), x_2); +return x_5; +} +} +lean_object* l_Array_foldr(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Array_foldr___rarg___boxed), 3, 0); +return x_3; +} +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_foldr___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_foldr___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +lean_object* l_Array_foldr___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Array_foldr___rarg(x_1, x_2, x_3); +lean_dec(x_3); +return x_4; +} +} +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_toList___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; @@ -3028,11 +3267,11 @@ return x_5; } } } -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_toList___spec__1(lean_object* x_1) { +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_toList___spec__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__revIterateAux___main___at_Array_toList___spec__1___rarg___boxed), 5, 0); +x_2 = lean_alloc_closure((void*)(l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_toList___spec__1___rarg___boxed), 5, 0); return x_2; } } @@ -3042,7 +3281,7 @@ _start: lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = lean_box(0); x_3 = lean_array_get_size(x_1); -x_4 = l___private_init_data_array_basic_2__revIterateAux___main___at_Array_toList___spec__1___rarg(x_1, x_1, x_3, lean_box(0), x_2); +x_4 = l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_toList___spec__1___rarg(x_1, x_1, x_3, lean_box(0), x_2); return x_4; } } @@ -3054,11 +3293,11 @@ x_2 = lean_alloc_closure((void*)(l_Array_toList___rarg___boxed), 1, 0); return x_2; } } -lean_object* l___private_init_data_array_basic_2__revIterateAux___main___at_Array_toList___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_toList___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; -x_6 = l___private_init_data_array_basic_2__revIterateAux___main___at_Array_toList___spec__1___rarg(x_1, x_2, x_3, x_4, x_5); +x_6 = l___private_init_data_array_basic_2__miterateRevAux___main___at_Array_toList___spec__1___rarg(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); lean_dec(x_1); return x_6; diff --git a/src/stage0/init/data/nat/basic.c b/src/stage0/init/data/nat/basic.c index a19801d434..074d47a87b 100644 --- a/src/stage0/init/data/nat/basic.c +++ b/src/stage0/init/data/nat/basic.c @@ -39,20 +39,25 @@ lean_object* l_Nat_pred(lean_object*); lean_object* l_Nat_sub___boxed(lean_object*, lean_object*); lean_object* l_Nat_foldAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_mul___boxed(lean_object*, lean_object*); +lean_object* l_Nat_foldRev(lean_object*); lean_object* l_Nat_all___boxed(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Nat_ble___boxed(lean_object*, lean_object*); uint8_t l_Nat_anyAux___main___at_Prod_allI___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_foldRevAux___main___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_HasSub___closed__1; +lean_object* l_Nat_foldRev___rarg(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); uint8_t l_Nat_anyAux___main(lean_object*, lean_object*, lean_object*); uint8_t l_Nat_anyAux(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_HasPow___closed__1; +lean_object* l_Nat_foldRevAux(lean_object*); lean_object* l_Nat_repeat___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_foldAux(lean_object*); lean_object* l_Prod_anyI___boxed(lean_object*, lean_object*); lean_object* l_Nat_pow___main(lean_object*, lean_object*); lean_object* l_Nat_HasSub; +lean_object* l_Nat_foldRevAux___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_decLt___boxed(lean_object*, lean_object*); lean_object* l_Nat_pow___main___boxed(lean_object*, lean_object*); lean_object* l_Nat_beq___boxed(lean_object*, lean_object*); @@ -73,6 +78,7 @@ uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Nat_anyAux___main___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_repeat(lean_object*); lean_object* l_Nat_DecidableEq___closed__1; +lean_object* l_Nat_foldRevAux___main(lean_object*); lean_object* l_Nat_max___boxed(lean_object*, lean_object*); lean_object* l_Nat_max(lean_object*, lean_object*); lean_object* l_Nat_DecidableEq; @@ -286,6 +292,73 @@ x_2 = lean_alloc_closure((void*)(l_Nat_fold___rarg), 3, 0); return x_2; } } +lean_object* l_Nat_foldRevAux___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_unsigned_to_nat(0u); +x_5 = lean_nat_dec_eq(x_2, x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_unsigned_to_nat(1u); +x_7 = lean_nat_sub(x_2, x_6); +lean_dec(x_2); +lean_inc(x_1); +lean_inc(x_7); +x_8 = lean_apply_2(x_1, x_7, x_3); +x_2 = x_7; +x_3 = x_8; +goto _start; +} +else +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +} +} +lean_object* l_Nat_foldRevAux___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Nat_foldRevAux___main___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Nat_foldRevAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Nat_foldRevAux___main___rarg(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_Nat_foldRevAux(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Nat_foldRevAux___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Nat_foldRev___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Nat_foldRevAux___main___rarg(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_Nat_foldRev(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Nat_foldRev___rarg), 3, 0); +return x_2; +} +} uint8_t l_Nat_anyAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { diff --git a/src/stage0/init/data/repr.c b/src/stage0/init/data/repr.c index 006c71ced9..2c00ff8b99 100644 --- a/src/stage0/init/data/repr.c +++ b/src/stage0/init/data/repr.c @@ -28,7 +28,6 @@ lean_object* l_Sigma_HasRepr___rarg___closed__1; lean_object* l_List_repr___rarg(lean_object*, lean_object*); uint8_t l_String_isEmpty(lean_object*); lean_object* l_List_repr___rarg___closed__3; -lean_object* l_String_Iterator_HasRepr___boxed(lean_object*); lean_object* l_charToHex(uint32_t); lean_object* l_Substring_HasRepr(lean_object*); lean_object* l_Subtype_HasRepr(lean_object*, lean_object*); @@ -84,6 +83,7 @@ lean_object* l_Char_quoteCore___closed__5; lean_object* l_id_HasRepr___rarg(lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Option_HasRepr(lean_object*); +lean_object* l_String_Iterator_HasRepr___closed__2; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Prod_HasRepr___rarg___closed__1; lean_object* l_Unit_HasRepr(lean_object*); @@ -127,7 +127,6 @@ lean_object* l_Fin_HasRepr(lean_object*); lean_object* l_Nat_HasRepr___closed__1; lean_object* l_String_Iterator_HasRepr(lean_object*); lean_object* l_Unit_HasRepr___closed__1; -lean_object* l_String_Iterator_remainingToString(lean_object*); extern lean_object* l_String_splitAux___main___closed__1; lean_object* l_Char_quoteCore___closed__4; lean_object* l_id_HasRepr___rarg(lean_object* x_1) { @@ -1354,28 +1353,39 @@ lean_object* _init_l_String_Iterator_HasRepr___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string(".mkIterator"); +x_1 = lean_mk_string("(String.Iterator.mk "); +return x_1; +} +} +lean_object* _init_l_String_Iterator_HasRepr___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(" "); return x_1; } } lean_object* l_String_Iterator_HasRepr(lean_object* x_1) { _start: { -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l_String_Iterator_remainingToString(x_1); -x_3 = l_String_quote(x_2); -x_4 = l_String_Iterator_HasRepr___closed__1; -x_5 = lean_string_append(x_3, x_4); -return x_5; -} -} -lean_object* l_String_Iterator_HasRepr___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_String_Iterator_HasRepr(x_1); +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = lean_ctor_get(x_1, 1); +lean_inc(x_3); lean_dec(x_1); -return x_2; +x_4 = l_String_quote(x_2); +x_5 = l_String_Iterator_HasRepr___closed__1; +x_6 = lean_string_append(x_5, x_4); +lean_dec(x_4); +x_7 = l_String_Iterator_HasRepr___closed__2; +x_8 = lean_string_append(x_6, x_7); +x_9 = l_Nat_repr(x_3); +x_10 = lean_string_append(x_8, x_9); +lean_dec(x_9); +x_11 = l_Option_HasRepr___rarg___closed__3; +x_12 = lean_string_append(x_10, x_11); +return x_12; } } lean_object* l_Fin_HasRepr___rarg(lean_object* x_1) { @@ -1573,6 +1583,8 @@ l_Substring_HasRepr___closed__1 = _init_l_Substring_HasRepr___closed__1(); lean_mark_persistent(l_Substring_HasRepr___closed__1); l_String_Iterator_HasRepr___closed__1 = _init_l_String_Iterator_HasRepr___closed__1(); lean_mark_persistent(l_String_Iterator_HasRepr___closed__1); +l_String_Iterator_HasRepr___closed__2 = _init_l_String_Iterator_HasRepr___closed__2(); +lean_mark_persistent(l_String_Iterator_HasRepr___closed__2); return w; } #ifdef __cplusplus diff --git a/src/stage0/init/data/string/basic.c b/src/stage0/init/data/string/basic.c index 54ea33bfac..d3c83df996 100644 --- a/src/stage0/init/data/string/basic.c +++ b/src/stage0/init/data/string/basic.c @@ -49,8 +49,6 @@ uint8_t l_String_isEmpty(lean_object*); lean_object* l_String_trim___boxed(lean_object*); lean_object* l_String_foldrAux(lean_object*); lean_object* l_String_intercalate(lean_object*, lean_object*); -lean_object* l___private_init_data_string_basic_8__lineColumnAux___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_String_lineColumn(lean_object*, lean_object*); lean_object* l_Nat_repeatAux___main___at_String_pushn___spec__1(uint32_t, lean_object*, lean_object*); lean_object* l_Substring_prev(lean_object*, lean_object*); lean_object* l_String_Iterator_hasPrev___boxed(lean_object*); @@ -99,9 +97,7 @@ lean_object* l_Substring_toString(lean_object*); uint8_t l_String_any(lean_object*, lean_object*); lean_object* l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_String_Inhabited; -lean_object* l___private_init_data_string_basic_8__lineColumnAux(lean_object*, lean_object*, lean_object*); lean_object* l_Substring_next(lean_object*, lean_object*); -lean_object* l___private_init_data_string_basic_8__lineColumnAux___main(lean_object*, lean_object*, lean_object*); lean_object* l_Substring_trimRight(lean_object*); lean_object* l_String_anyAux___main___at_Substring_contains___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Substring_extract(lean_object*, lean_object*, lean_object*); @@ -197,7 +193,6 @@ lean_object* l_Substring_drop___boxed(lean_object*, lean_object*); lean_object* l_String_trimRight___boxed(lean_object*); lean_object* l_Substring_splitAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_String_singleton(uint32_t); -lean_object* l___private_init_data_string_basic_8__lineColumnAux___main___boxed(lean_object*, lean_object*, lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); lean_object* l_String_anyAux___main___at_String_all___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -304,7 +299,6 @@ lean_object* l_Substring_prev___boxed(lean_object*, lean_object*); lean_object* l_Substring_take(lean_object*, lean_object*); uint8_t l_String_anyAux___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Substring_foldr___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_String_lineColumn___closed__1; lean_object* l_String_trimRight(lean_object*); lean_object* l_Substring_takeRight___boxed(lean_object*, lean_object*); uint32_t l_String_back(lean_object*); @@ -314,7 +308,6 @@ lean_object* l_String_Iterator_remainingToString(lean_object*); lean_object* l_String_splitAux___main___closed__1; lean_object* lean_string_utf8_set(lean_object*, lean_object*, uint32_t); lean_object* lean_string_length(lean_object*); -lean_object* l_String_lineColumn___boxed(lean_object*, lean_object*); lean_object* l_String_mk___boxed(lean_object* x_1) { _start: { @@ -2093,165 +2086,6 @@ x_3 = l_String_Iterator_prevn___main(x_1, x_2); return x_3; } } -lean_object* l___private_init_data_string_basic_8__lineColumnAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; uint8_t x_6; -x_4 = lean_ctor_get(x_3, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_3, 1); -lean_inc(x_5); -x_6 = lean_string_utf8_at_end(x_1, x_2); -if (x_6 == 0) -{ -uint8_t x_7; -x_7 = !lean_is_exclusive(x_3); -if (x_7 == 0) -{ -lean_object* x_8; lean_object* x_9; uint32_t x_10; uint32_t x_11; uint8_t x_12; -x_8 = lean_ctor_get(x_3, 1); -lean_dec(x_8); -x_9 = lean_ctor_get(x_3, 0); -lean_dec(x_9); -x_10 = lean_string_utf8_get(x_1, x_2); -x_11 = 10; -x_12 = x_10 == x_11; -if (x_12 == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = lean_string_utf8_next(x_1, x_2); -lean_dec(x_2); -x_14 = lean_unsigned_to_nat(1u); -x_15 = lean_nat_add(x_5, x_14); -lean_dec(x_5); -lean_ctor_set(x_3, 1, x_15); -x_2 = x_13; -goto _start; -} -else -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -lean_dec(x_5); -x_17 = lean_string_utf8_next(x_1, x_2); -lean_dec(x_2); -x_18 = lean_unsigned_to_nat(1u); -x_19 = lean_nat_add(x_4, x_18); -lean_dec(x_4); -x_20 = lean_unsigned_to_nat(0u); -lean_ctor_set(x_3, 1, x_20); -lean_ctor_set(x_3, 0, x_19); -x_2 = x_17; -goto _start; -} -} -else -{ -uint32_t x_22; uint32_t x_23; uint8_t x_24; -lean_dec(x_3); -x_22 = lean_string_utf8_get(x_1, x_2); -x_23 = 10; -x_24 = x_22 == x_23; -if (x_24 == 0) -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_25 = lean_string_utf8_next(x_1, x_2); -lean_dec(x_2); -x_26 = lean_unsigned_to_nat(1u); -x_27 = lean_nat_add(x_5, x_26); -lean_dec(x_5); -x_28 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_28, 0, x_4); -lean_ctor_set(x_28, 1, x_27); -x_2 = x_25; -x_3 = x_28; -goto _start; -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -lean_dec(x_5); -x_30 = lean_string_utf8_next(x_1, x_2); -lean_dec(x_2); -x_31 = lean_unsigned_to_nat(1u); -x_32 = lean_nat_add(x_4, x_31); -lean_dec(x_4); -x_33 = lean_unsigned_to_nat(0u); -x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_32); -lean_ctor_set(x_34, 1, x_33); -x_2 = x_30; -x_3 = x_34; -goto _start; -} -} -} -else -{ -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_3; -} -} -} -lean_object* l___private_init_data_string_basic_8__lineColumnAux___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l___private_init_data_string_basic_8__lineColumnAux___main(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l___private_init_data_string_basic_8__lineColumnAux(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l___private_init_data_string_basic_8__lineColumnAux___main(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l___private_init_data_string_basic_8__lineColumnAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l___private_init_data_string_basic_8__lineColumnAux(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* _init_l_String_lineColumn___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(1u); -x_2 = lean_unsigned_to_nat(0u); -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* l_String_lineColumn(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_3 = lean_unsigned_to_nat(0u); -x_4 = l_String_lineColumn___closed__1; -x_5 = l___private_init_data_string_basic_8__lineColumnAux___main(x_1, x_3, x_4); -return x_5; -} -} -lean_object* l_String_lineColumn___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_String_lineColumn(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} lean_object* l_String_offsetOfPosAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -4914,8 +4748,6 @@ l_String_HasAppend___closed__1 = _init_l_String_HasAppend___closed__1(); lean_mark_persistent(l_String_HasAppend___closed__1); l_String_HasAppend = _init_l_String_HasAppend(); lean_mark_persistent(l_String_HasAppend); -l_String_lineColumn___closed__1 = _init_l_String_lineColumn___closed__1(); -lean_mark_persistent(l_String_lineColumn___closed__1); l_Substring_drop___closed__1 = _init_l_Substring_drop___closed__1(); lean_mark_persistent(l_Substring_drop___closed__1); l_Substring_drop___closed__2 = _init_l_Substring_drop___closed__2(); diff --git a/src/stage0/init/lean/compiler/ir/emitc.c b/src/stage0/init/lean/compiler/ir/emitc.c index bf0ebd20c0..7100e724ff 100644 --- a/src/stage0/init/lean/compiler/ir/emitc.c +++ b/src/stage0/init/lean/compiler/ir/emitc.c @@ -280,6 +280,7 @@ lean_object* l_Lean_IR_EmitC_throwUnknownVar(lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___closed__13; lean_object* l_Lean_IR_EmitC_emitSet___closed__1; lean_object* l_Nat_mforAux___main___at_Lean_IR_EmitC_emitReset___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_String_Iterator_HasRepr___closed__2; lean_object* l_Lean_IR_EmitC_emitLit(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_anyAux___main___at_Lean_IR_EmitC_overwriteParam___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); @@ -302,7 +303,6 @@ lean_object* l_Lean_IR_EmitC_emitBoxFn___boxed(lean_object*, lean_object*, lean_ lean_object* l_Lean_IR_EmitC_toHexDigit(lean_object*); lean_object* l_Lean_IR_EmitC_emitSProj___closed__3; lean_object* l_Lean_IR_EmitC_emitLn(lean_object*); -extern lean_object* l_Lean_Format_flatten___main___closed__1; lean_object* l_Lean_IR_EmitC_emitDeclInit___closed__4; extern lean_object* l_Lean_IR_altInh; lean_object* l_Lean_IR_EmitC_emitUnbox___closed__4; @@ -2012,7 +2012,7 @@ block_63: uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_9 = l_Lean_IR_Decl_resultType(x_1); x_10 = l_Lean_IR_EmitC_toCType(x_9); -x_11 = l_Lean_Format_flatten___main___closed__1; +x_11 = l_String_Iterator_HasRepr___closed__2; x_12 = lean_string_append(x_10, x_11); x_13 = lean_string_append(x_12, x_2); x_14 = lean_string_append(x_8, x_13); @@ -5512,7 +5512,7 @@ x_18 = lean_nat_add(x_2, x_17); lean_dec(x_2); x_19 = l_System_FilePath_dirName___closed__1; x_20 = l_Lean_Name_toStringWithSep___main(x_19, x_16); -x_21 = l_Lean_Format_flatten___main___closed__1; +x_21 = l_String_Iterator_HasRepr___closed__2; x_22 = lean_string_append(x_21, x_20); lean_dec(x_20); x_23 = lean_string_append(x_14, x_22); @@ -5535,7 +5535,7 @@ x_29 = lean_nat_add(x_2, x_28); lean_dec(x_2); x_30 = l_System_FilePath_dirName___closed__1; x_31 = l_Lean_Name_toStringWithSep___main(x_30, x_27); -x_32 = l_Lean_Format_flatten___main___closed__1; +x_32 = l_String_Iterator_HasRepr___closed__2; x_33 = lean_string_append(x_32, x_31); lean_dec(x_31); x_34 = lean_string_append(x_26, x_33); @@ -6475,7 +6475,7 @@ lean_dec(x_7); x_8 = l_Lean_IR_EmitC_toCType(x_2); x_9 = lean_string_append(x_6, x_8); lean_dec(x_8); -x_10 = l_Lean_Format_flatten___main___closed__1; +x_10 = l_String_Iterator_HasRepr___closed__2; x_11 = lean_string_append(x_9, x_10); x_12 = l_Nat_repr(x_1); x_13 = l_Lean_IR_VarId_HasToString___closed__1; @@ -6499,7 +6499,7 @@ lean_dec(x_4); x_20 = l_Lean_IR_EmitC_toCType(x_2); x_21 = lean_string_append(x_19, x_20); lean_dec(x_20); -x_22 = l_Lean_Format_flatten___main___closed__1; +x_22 = l_String_Iterator_HasRepr___closed__2; x_23 = lean_string_append(x_21, x_22); x_24 = l_Nat_repr(x_1); x_25 = l_Lean_IR_VarId_HasToString___closed__1; @@ -11824,7 +11824,7 @@ lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean x_22 = lean_ctor_get(x_20, 1); x_23 = lean_ctor_get(x_20, 0); lean_dec(x_23); -x_24 = l_Lean_Format_flatten___main___closed__1; +x_24 = l_String_Iterator_HasRepr___closed__2; x_25 = lean_string_append(x_22, x_24); lean_ctor_set(x_20, 1, x_25); lean_ctor_set(x_20, 0, x_19); @@ -12029,7 +12029,7 @@ lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; x_100 = lean_ctor_get(x_20, 1); lean_inc(x_100); lean_dec(x_20); -x_101 = l_Lean_Format_flatten___main___closed__1; +x_101 = l_String_Iterator_HasRepr___closed__2; x_102 = lean_string_append(x_100, x_101); x_103 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_103, 0, x_19); @@ -12215,7 +12215,7 @@ if (lean_is_exclusive(x_157)) { lean_dec_ref(x_157); x_159 = lean_box(0); } -x_160 = l_Lean_Format_flatten___main___closed__1; +x_160 = l_String_Iterator_HasRepr___closed__2; x_161 = lean_string_append(x_158, x_160); if (lean_is_scalar(x_159)) { x_162 = lean_alloc_ctor(0, 2, 0); @@ -12429,7 +12429,7 @@ x_17 = l_Lean_IR_EmitC_emitReset___closed__2; x_18 = lean_string_append(x_16, x_17); x_19 = l_IO_println___rarg___closed__1; x_20 = lean_string_append(x_18, x_19); -x_21 = l_Lean_Format_flatten___main___closed__1; +x_21 = l_String_Iterator_HasRepr___closed__2; x_22 = lean_string_append(x_20, x_21); x_23 = lean_box(0); lean_ctor_set(x_7, 1, x_22); @@ -12956,7 +12956,7 @@ x_199 = l_Lean_IR_EmitC_emitReset___closed__2; x_200 = lean_string_append(x_198, x_199); x_201 = l_IO_println___rarg___closed__1; x_202 = lean_string_append(x_200, x_201); -x_203 = l_Lean_Format_flatten___main___closed__1; +x_203 = l_String_Iterator_HasRepr___closed__2; x_204 = lean_string_append(x_202, x_203); x_205 = lean_box(0); x_206 = lean_alloc_ctor(0, 2, 0); @@ -21266,7 +21266,7 @@ x_15 = lean_ctor_get_uint8(x_14, sizeof(void*)*1 + 1); x_16 = l_Lean_IR_EmitC_toCType(x_15); x_17 = lean_string_append(x_12, x_16); lean_dec(x_16); -x_18 = l_Lean_Format_flatten___main___closed__1; +x_18 = l_String_Iterator_HasRepr___closed__2; x_19 = lean_string_append(x_17, x_18); x_20 = lean_ctor_get(x_14, 0); lean_inc(x_20); @@ -21426,7 +21426,7 @@ if (lean_is_exclusive(x_22)) { x_26 = l_Lean_IR_EmitC_toCType(x_16); x_27 = lean_string_append(x_24, x_26); lean_dec(x_26); -x_28 = l_Lean_Format_flatten___main___closed__1; +x_28 = l_String_Iterator_HasRepr___closed__2; x_29 = lean_string_append(x_27, x_28); x_30 = lean_array_get_size(x_15); x_128 = lean_unsigned_to_nat(0u); @@ -21966,7 +21966,7 @@ if (lean_is_exclusive(x_165)) { x_169 = l_Lean_IR_EmitC_toCType(x_16); x_170 = lean_string_append(x_167, x_169); lean_dec(x_169); -x_171 = l_Lean_Format_flatten___main___closed__1; +x_171 = l_String_Iterator_HasRepr___closed__2; x_172 = lean_string_append(x_170, x_171); x_173 = lean_array_get_size(x_15); x_239 = lean_unsigned_to_nat(0u); @@ -22527,7 +22527,7 @@ if (lean_is_exclusive(x_295)) { x_299 = l_Lean_IR_EmitC_toCType(x_287); x_300 = lean_string_append(x_297, x_299); lean_dec(x_299); -x_301 = l_Lean_Format_flatten___main___closed__1; +x_301 = l_String_Iterator_HasRepr___closed__2; x_302 = lean_string_append(x_300, x_301); x_303 = lean_array_get_size(x_286); x_369 = lean_unsigned_to_nat(0u); diff --git a/src/stage0/init/lean/compiler/ir/format.c b/src/stage0/init/lean/compiler/ir/format.c index 0d00b7bebf..c3953bb3fe 100644 --- a/src/stage0/init/lean/compiler/ir/format.c +++ b/src/stage0/init/lean/compiler/ir/format.c @@ -135,6 +135,7 @@ lean_object* l_Lean_IR_formatFnBody___main___closed__2; lean_object* l___private_init_lean_compiler_ir_format_3__formatLitVal(lean_object*); lean_object* l___private_init_lean_compiler_ir_format_4__formatCtorInfo___closed__3; lean_object* l___private_init_lean_compiler_ir_format_2__formatArray___rarg___boxed(lean_object*, lean_object*); +extern lean_object* l_Lean_Format_flatten___main___closed__1; lean_object* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_format_5__formatExpr___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_formatFnBodyHead___closed__34; lean_object* l_Lean_IR_declHasFormat___closed__1; @@ -166,7 +167,6 @@ lean_object* l___private_init_lean_compiler_ir_format_5__formatExpr___closed__24 lean_object* l_Lean_IR_formatFnBodyHead___closed__14; extern lean_object* l_Lean_formatEntry___closed__2; lean_object* l_Array_size(lean_object*, lean_object*); -extern lean_object* l_Lean_Format_flatten___main___closed__2; lean_object* l___private_init_lean_compiler_ir_format_5__formatExpr___closed__19; lean_object* l_Lean_IR_exprHasFormat; lean_object* l_Lean_IR_formatParams(lean_object*); @@ -276,7 +276,7 @@ else lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_8 = lean_array_fget(x_3, x_4); x_9 = 0; -x_10 = l_Lean_Format_flatten___main___closed__2; +x_10 = l_Lean_Format_flatten___main___closed__1; x_11 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_11, 0, x_5); lean_ctor_set(x_11, 1, x_10); @@ -621,7 +621,7 @@ else lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_7 = lean_array_fget(x_2, x_3); x_8 = 0; -x_9 = l_Lean_Format_flatten___main___closed__2; +x_9 = l_Lean_Format_flatten___main___closed__1; x_10 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_10, 0, x_4); lean_ctor_set(x_10, 1, x_9); @@ -742,7 +742,7 @@ _start: uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = 0; x_2 = l___private_init_lean_compiler_ir_format_5__formatExpr___closed__9; -x_3 = l_Lean_Format_flatten___main___closed__2; +x_3 = l_Lean_Format_flatten___main___closed__1; x_4 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_3); @@ -788,7 +788,7 @@ _start: uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = 0; x_2 = l___private_init_lean_compiler_ir_format_5__formatExpr___closed__13; -x_3 = l_Lean_Format_flatten___main___closed__2; +x_3 = l_Lean_Format_flatten___main___closed__1; x_4 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_3); @@ -1888,7 +1888,7 @@ else lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_7 = lean_array_fget(x_2, x_3); x_8 = 0; -x_9 = l_Lean_Format_flatten___main___closed__2; +x_9 = l_Lean_Format_flatten___main___closed__1; x_10 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_10, 0, x_4); lean_ctor_set(x_10, 1, x_9); @@ -2137,7 +2137,7 @@ _start: uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = 0; x_2 = l_Lean_IR_formatFnBodyHead___closed__19; -x_3 = l_Lean_Format_flatten___main___closed__2; +x_3 = l_Lean_Format_flatten___main___closed__1; x_4 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_3); @@ -2183,7 +2183,7 @@ _start: uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = 0; x_2 = l_Lean_IR_formatFnBodyHead___closed__23; -x_3 = l_Lean_Format_flatten___main___closed__2; +x_3 = l_Lean_Format_flatten___main___closed__1; x_4 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_3); @@ -2642,7 +2642,7 @@ x_138 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_138, 0, x_137); lean_ctor_set(x_138, 1, x_136); lean_ctor_set_uint8(x_138, sizeof(void*)*2, x_129); -x_139 = l_Lean_Format_flatten___main___closed__2; +x_139 = l_Lean_Format_flatten___main___closed__1; x_140 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_140, 0, x_138); lean_ctor_set(x_140, 1, x_139); @@ -2709,7 +2709,7 @@ x_164 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_164, 0, x_163); lean_ctor_set(x_164, 1, x_162); lean_ctor_set_uint8(x_164, sizeof(void*)*2, x_155); -x_165 = l_Lean_Format_flatten___main___closed__2; +x_165 = l_Lean_Format_flatten___main___closed__1; x_166 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_166, 0, x_164); lean_ctor_set(x_166, 1, x_165); @@ -3388,7 +3388,7 @@ x_188 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_188, 0, x_187); lean_ctor_set(x_188, 1, x_186); lean_ctor_set_uint8(x_188, sizeof(void*)*2, x_179); -x_189 = l_Lean_Format_flatten___main___closed__2; +x_189 = l_Lean_Format_flatten___main___closed__1; x_190 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_190, 0, x_188); lean_ctor_set(x_190, 1, x_189); @@ -3486,7 +3486,7 @@ x_226 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_226, 0, x_225); lean_ctor_set(x_226, 1, x_224); lean_ctor_set_uint8(x_226, sizeof(void*)*2, x_217); -x_227 = l_Lean_Format_flatten___main___closed__2; +x_227 = l_Lean_Format_flatten___main___closed__1; x_228 = lean_alloc_ctor(4, 2, 1); lean_ctor_set(x_228, 0, x_226); lean_ctor_set(x_228, 1, x_227); diff --git a/src/stage0/init/lean/elaborator/basic.c b/src/stage0/init/lean/elaborator/basic.c index d612cdf1f3..f1d7b1f553 100644 --- a/src/stage0/init/lean/elaborator/basic.c +++ b/src/stage0/init/lean/elaborator/basic.c @@ -21,6 +21,7 @@ lean_object* l_Lean_declareBuiltinCommandElab(lean_object*, lean_object*, lean_o lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_getNamespace___boxed(lean_object*); lean_object* l_Lean_Elab_rootNamespace___closed__2; +lean_object* l_Lean_Elab_withInPattern___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_toBaseDir(lean_object*, lean_object*); extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__4; lean_object* l_RBNode_ins___main___at_Lean_addBuiltinTermElab___spec__7(lean_object*, lean_object*, lean_object*); @@ -29,33 +30,42 @@ lean_object* l_Lean_ElabScope_Inhabited; uint8_t lean_name_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_runIO___rarg(lean_object*); lean_object* lean_io_realpath(lean_object*, lean_object*); +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1___boxed(lean_object*); +lean_object* l_Lean_Elab_inPattern(lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_elabCommandAtFrontend___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerEnvExtensionUnsafe___rarg___closed__2; lean_object* l_List_head___at_Lean_Elab_getScope___spec__1___boxed(lean_object*); lean_object* l_Lean_mkCommandElabAttribute___closed__1; +lean_object* l_Lean_Elab_modifyGetScope(lean_object*); lean_object* l_Lean_Elab_Inhabited___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_runIOUnsafe(lean_object*); lean_object* l_AssocList_find___main___at_Lean_Elab_elabCommand___spec__3(lean_object*, lean_object*); lean_object* l_Lean_Elab_runIOUnsafe___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_logErrorUsingCmdPos(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_modifyGetScope___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_tail___rarg(lean_object*); lean_object* l_Lean_mkTermElabAttribute___closed__1; lean_object* l_Lean_Elab_resolveNamespace___closed__1; extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2; lean_object* l_Array_mkArray(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_logErrorAndThrow(lean_object*, lean_object*); +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1___rarg(lean_object*); lean_object* l_Lean_Elab_resolveNamespaceUsingOpenDecls___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_mkAnonymousInstName___spec__1(lean_object*); lean_object* l_Lean_Elab_logErrorAt(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_find___at_Lean_Elab_elabCommand___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinTermElabAttr___closed__5; lean_object* l_Array_anyMAux___main___at_Lean_mkCommandElabAttribute___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkElabAttribute___rarg___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_elabCommand___closed__3; +lean_object* l_Lean_Elab_mkForall(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_declareBuiltinTermElab___closed__2; extern lean_object* l_Lean_EnvExtension_Inhabited___rarg___closed__1; extern lean_object* l_Lean_AttributeImpl_inhabited___closed__5; lean_object* l_Lean_mkElabAttribute___at_Lean_mkCommandElabAttribute___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_anonymousInstNamePrefix___closed__1; lean_object* l_RBNode_find___main___at_Lean_addBuiltinCommandElab___spec__4(lean_object*, lean_object*); lean_object* l_Lean_Elab_resolveNamespaceUsingOpenDecls___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_runIO(lean_object*, lean_object*, lean_object*); @@ -70,6 +80,7 @@ extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3; lean_object* l_List_toString___at_Lean_Environment_displayStats___spec__1(lean_object*); lean_object* l_Lean_addBuiltinTermElab___closed__2; lean_object* l_Lean_registerBuiltinTermElabAttr___lambda__1___closed__1; +lean_object* l_Lean_Elab_mkLocalDecl(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinTermElabAttr___closed__7; extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__2; extern lean_object* l_Lean_findOLean___closed__1; @@ -86,6 +97,7 @@ lean_object* lean_import_modules(lean_object*, uint32_t, lean_object*); lean_object* lean_absolutize_module_name(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_logError(lean_object*); lean_object* l_List_reverse___rarg(lean_object*); +lean_object* l_Lean_Elab_withInPattern(lean_object*); lean_object* l_Lean_Elab_processCommandsAux___main(lean_object*); uint8_t l_AssocList_contains___main___at_Lean_addBuiltinTermElab___spec__3(lean_object*, lean_object*); lean_object* l_Lean_declareBuiltinTermElab___closed__1; @@ -93,6 +105,7 @@ lean_object* l_Lean_mkTermElabAttribute___closed__2; lean_object* l_Lean_mkElabAttribute___at_Lean_mkTermElabAttribute___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addBuiltinCommandElab(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_get_namespaces(lean_object*); +lean_object* l_Lean_Elab_withNewScope(lean_object*); lean_object* l_Lean_Syntax_asNode___rarg(lean_object*); extern lean_object* l_Lean_MetavarContext_mkMetavarContext___closed__1; lean_object* l_Lean_Elab_removeRoot(lean_object*); @@ -118,7 +131,9 @@ lean_object* l_IO_Prim_Ref_set(lean_object*, lean_object*, lean_object*, lean_ob lean_object* l_Lean_Elab_runElab___at_Lean_Elab_processCommand___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_updateCmdPos___boxed(lean_object*); extern lean_object* l_Lean_Options_empty; +lean_object* l_Lean_Elab_anonymousInstNamePrefix; lean_object* l_Lean_addBuiltinCommandElab___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkLambda(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_depArrow___elambda__1___closed__4; lean_object* l_IO_ofExcept___at_Lean_Parser_declareBuiltinParser___spec__1(lean_object*, lean_object*); lean_object* l_Lean_OpenDecl_Inhabited___closed__1; @@ -127,7 +142,9 @@ lean_object* l_AssocList_mfoldl___main___at_Lean_addBuiltinCommandElab___spec__1 lean_object* lean_io_initializing(lean_object*); lean_object* l_Lean_Elab_getEnv___boxed(lean_object*); lean_object* l_Lean_Elab_getScope(lean_object*); +lean_object* lean_local_ctx_mk_local_decl(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); lean_object* lean_mk_empty_environment(uint32_t, lean_object*); +lean_object* l_Lean_LocalContext_mkLambda(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_termElabAttribute; lean_object* l_Lean_NameGenerator_next(lean_object*); extern lean_object* l_Lean_AttributeImpl_inhabited___closed__4; @@ -151,6 +168,7 @@ lean_object* l_AssocList_replace___main___at_Lean_addBuiltinCommandElab___spec__ lean_object* l_Lean_Elab_runIO___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_commandElabAttribute; lean_object* l_HashMapImp_find___at_Lean_Elab_elabCommand___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1(lean_object*); lean_object* l_Lean_Elab_mkMessage___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkBuiltinCommandElabTable(lean_object*); lean_object* l_Lean_Elab_updateCmdPos(lean_object*); @@ -159,11 +177,15 @@ extern lean_object* l_Lean_NameGenerator_Inhabited___closed__3; lean_object* l_Lean_Elab_getNamespace(lean_object*); lean_object* l_Lean_Elab_logErrorAt___boxed(lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_name_hash_usize(lean_object*); +lean_object* l_Lean_Elab_mkLocalDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_mkAnonymousInstName___spec__1___rarg(lean_object*); lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinTermElabAttr(lean_object*); +lean_object* l_Lean_Elab_localContext___rarg(lean_object*); uint8_t l_Lean_Syntax_isNone___rarg(lean_object*); lean_object* l_Lean_registerBuiltinCommandElabAttr___closed__6; +lean_object* l_Lean_Elab_mkLambda___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg___rarg(lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_HashMapImp_insert___at_Lean_addBuiltinCommandElab___spec__8(lean_object*, lean_object*, lean_object*); @@ -175,6 +197,7 @@ uint8_t l_Array_anyMAux___main___at_Lean_mkCommandElabAttribute___spec__3(lean_o lean_object* l_Lean_declareBuiltinCommandElab___closed__1; lean_object* l_Lean_checkSyntaxNodeKind(lean_object*, lean_object*); lean_object* l_Lean_Elab_logErrorAndThrow___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_mkAnonymousInstName___spec__1___boxed(lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Elab_runElab___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_RBNode_find___main___at_Lean_addBuiltinCommandElab___spec__4___boxed(lean_object*, lean_object*); @@ -194,6 +217,7 @@ lean_object* l_Lean_addBuiltinTermElab(lean_object*, lean_object*, lean_object*, lean_object* l_HashMapImp_insert___at_Lean_addBuiltinTermElab___spec__8(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinCommandElabAttr___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_System_FilePath_dirName(lean_object*); +lean_object* l_Lean_Name_appendIndexAfter(lean_object*, lean_object*); lean_object* l_Lean_SMap_empty___at_Lean_mkBuiltinCommandElabTable___spec__1; lean_object* l_Lean_Elab_getUniverses___rarg(lean_object*); lean_object* l_Array_fget(lean_object*, lean_object*, lean_object*); @@ -209,6 +233,7 @@ lean_object* l_Lean_registerBuiltinCommandElabAttr___lambda__1___closed__2; lean_object* l_Lean_Elab_runElab___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Environment_addAndCompile(lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Lean_Elab_localContext(lean_object*); uint8_t l_AssocList_contains___main___at_Lean_addBuiltinCommandElab___spec__3(lean_object*, lean_object*); lean_object* l_List_hasDecEq___main___at_Lean_OpenDecl_HasToString___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_logUnknownDecl(lean_object*); @@ -224,6 +249,8 @@ lean_object* l_Lean_Elab_rootNamespace; lean_object* l_Lean_Elab_processCommandsAux___boxed(lean_object*); lean_object* l_Lean_declareBuiltinCommandElab___closed__2; uint8_t l_Lean_SMap_contains___at_Lean_addBuiltinTermElab___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Elab_modifyScope(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_localContext___boxed(lean_object*); lean_object* l_Lean_mkBuiltinTermElabTable(lean_object*); lean_object* l_Lean_registerBuiltinCommandElabAttr___closed__5; lean_object* l_Lean_Elab_runElab(lean_object*); @@ -237,6 +264,7 @@ lean_object* l_Lean_ElabException_Inhabited___closed__1; lean_object* l_mkHashMap___at_Lean_mkBuiltinTermElabTable___spec__2(lean_object*); extern lean_object* l_Lean_Parser_mkCommandParserAttribute___closed__4; lean_object* l_Lean_Elab_elabCommand___closed__2; +lean_object* l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_getOpenDecls___boxed(lean_object*); lean_object* l_IO_Prim_mkRef(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_insert___at_Lean_addBuiltinCommandElab___spec__5(lean_object*, lean_object*, lean_object*); @@ -244,6 +272,7 @@ lean_object* l_Lean_Elab_logUnknownDecl___rarg(lean_object*, lean_object*, lean_ uint8_t l_Lean_isNamespace(lean_object*, lean_object*); lean_object* l_Lean_mkCApp(lean_object*, lean_object*); lean_object* l_Lean_Elab_logElabException___closed__1; +extern lean_object* l_Lean_LocalDecl_Inhabited___closed__1; lean_object* l_Lean_Elab_testFrontend___closed__1; lean_object* l_Lean_Parser_parseCommand___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkCommandElabAttribute___spec__2(lean_object*, lean_object*); @@ -251,6 +280,7 @@ uint8_t l_Lean_Parser_isEOI(lean_object*); lean_object* l_Lean_mkElabAttribute(lean_object*); lean_object* l_HashMapImp_contains___at_Lean_addBuiltinTermElab___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinTermElabAttr___lambda__1___closed__5; +lean_object* l_Lean_Elab_modifyGetScope___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_Elab_processHeaderAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkCommandElabAttribute(lean_object*); lean_object* l_Lean_syntaxNodeKindOfAttrParam___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -304,6 +334,7 @@ lean_object* l_Lean_Elab_getOpenDecls___rarg(lean_object*); lean_object* l_Lean_registerBuiltinCommandElabAttr___lambda__1___closed__3; uint8_t l_List_hasDecEq___main___at_Lean_OpenDecl_HasToString___spec__1(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_Elab_processHeaderAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_getEnv___rarg(lean_object*); lean_object* l_Array_size(lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinCommandElabAttr___closed__3; @@ -330,6 +361,7 @@ lean_object* l_Lean_Elab_processCommandsAux___main___rarg(lean_object*, lean_obj lean_object* l_Lean_addBuiltinTermElab___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkTermElabAttribute___spec__2(lean_object*, lean_object*); lean_object* l_Lean_builtinCommandElabTable; +lean_object* l_Lean_Elab_mkAnonymousInstName___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_getPosition(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; extern lean_object* l_Lean_nameToExprAux___main___closed__4; @@ -344,6 +376,7 @@ lean_object* l_Lean_mkElabAttribute___rarg___lambda__1___boxed(lean_object*, lea lean_object* l_Lean_declareBuiltinElab___closed__1; lean_object* l_Lean_registerBuiltinCommandElabAttr___closed__7; lean_object* l_Lean_termElabAttribute___closed__1; +lean_object* l_Lean_Elab_mkAnonymousInstName(lean_object*, lean_object*); lean_object* l_Lean_Elab_getScope___rarg(lean_object*); lean_object* l_RBNode_insert___at_Lean_addBuiltinTermElab___spec__6(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_logElabException(lean_object*, lean_object*, lean_object*); @@ -351,6 +384,7 @@ lean_object* l_Lean_registerBuiltinCommandElabAttr___lambda__1___closed__4; lean_object* l_Lean_Elab_getPos___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkElabAttribute___rarg___lambda__2___closed__1; lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*); +lean_object* l_Lean_Elab_anonymousInstNamePrefix___closed__2; lean_object* l_Lean_registerBuiltinCommandElabAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinTermElabAttr___closed__3; lean_object* l_Lean_registerBuiltinCommandElabAttr(lean_object*); @@ -364,7 +398,9 @@ lean_object* l_Lean_Elab_testFrontend___closed__2; lean_object* l_Array_anyMAux___main___at_Lean_mkTermElabAttribute___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l___private_init_lean_environment_8__persistentEnvExtensionsRef; +lean_object* l_Lean_Elab_mkForall___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_AssocList_replace___main___at_Lean_addBuiltinTermElab___spec__12(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_modifyScope___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_processHeader___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_logMessage(lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_moveEntries___main___at_Lean_addBuiltinCommandElab___spec__10(lean_object*, lean_object*, lean_object*); @@ -379,11 +415,14 @@ lean_object* l_Lean_mkElabAttribute___rarg___closed__1; lean_object* l_AssocList_contains___main___at_Lean_addBuiltinTermElab___spec__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_processCommandsAux(lean_object*); lean_object* l_Lean_mkTermElabAttribute(lean_object*); +lean_object* l_Lean_Elab_inPattern___rarg(lean_object*); +lean_object* l_Lean_Elab_withNewScope___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerEnvExtensionUnsafe___rarg___closed__1; lean_object* l_Lean_Elab_getEnv(lean_object*); lean_object* l_IO_Prim_Ref_reset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_rootNamespace___closed__1; lean_object* l_Lean_Elab_mkFreshName___rarg(lean_object*); +lean_object* l_Lean_LocalContext_mkForall(lean_object*, lean_object*, lean_object*); extern lean_object* l___private_init_lean_environment_5__envExtensionsRef; lean_object* l_Lean_Elab_processHeaderAux___closed__1; lean_object* l_Lean_Elab_runElab___at_Lean_Elab_processCommand___spec__1(lean_object*, lean_object*, lean_object*); @@ -391,6 +430,7 @@ lean_object* l_Lean_builtinTermElabTable; lean_object* l_AssocList_find___main___at_Lean_Elab_elabCommand___spec__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_Parser_isValidSyntaxNodeKind(lean_object*, lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_inPattern___boxed(lean_object*); lean_object* l_Lean_Elab_processCommand(lean_object*, lean_object*); extern lean_object* l_String_splitAux___main___closed__1; lean_object* l_Lean_Parser_parseHeader(lean_object*, lean_object*); @@ -552,21 +592,25 @@ return x_4; lean_object* _init_l_Lean_ElabScope_Inhabited___closed__1() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; lean_object* x_8; x_1 = lean_box(0); x_2 = l_String_splitAux___main___closed__1; x_3 = lean_box(0); x_4 = l_Lean_Options_empty; x_5 = l_Lean_LocalContext_Inhabited___closed__1; -x_6 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_6, 0, x_2); -lean_ctor_set(x_6, 1, x_3); -lean_ctor_set(x_6, 2, x_4); -lean_ctor_set(x_6, 3, x_3); -lean_ctor_set(x_6, 4, x_1); -lean_ctor_set(x_6, 5, x_1); -lean_ctor_set(x_6, 6, x_5); -return x_6; +x_6 = lean_unsigned_to_nat(1u); +x_7 = 0; +x_8 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_8, 0, x_2); +lean_ctor_set(x_8, 1, x_3); +lean_ctor_set(x_8, 2, x_4); +lean_ctor_set(x_8, 3, x_3); +lean_ctor_set(x_8, 4, x_1); +lean_ctor_set(x_8, 5, x_1); +lean_ctor_set(x_8, 6, x_5); +lean_ctor_set(x_8, 7, x_6); +lean_ctor_set_uint8(x_8, sizeof(void*)*8, x_7); +return x_8; } } lean_object* _init_l_Lean_ElabScope_Inhabited() { @@ -17714,21 +17758,25 @@ return x_1; lean_object* _init_l_Lean_Elab_testFrontend___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; lean_object* x_8; x_1 = lean_box(0); x_2 = l_Lean_Elab_testFrontend___closed__1; x_3 = lean_box(0); x_4 = l_Lean_Options_empty; x_5 = l_Lean_LocalContext_Inhabited___closed__1; -x_6 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_6, 0, x_2); -lean_ctor_set(x_6, 1, x_3); -lean_ctor_set(x_6, 2, x_4); -lean_ctor_set(x_6, 3, x_3); -lean_ctor_set(x_6, 4, x_1); -lean_ctor_set(x_6, 5, x_1); -lean_ctor_set(x_6, 6, x_5); -return x_6; +x_6 = lean_unsigned_to_nat(1u); +x_7 = 0; +x_8 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_8, 0, x_2); +lean_ctor_set(x_8, 1, x_3); +lean_ctor_set(x_8, 2, x_4); +lean_ctor_set(x_8, 3, x_3); +lean_ctor_set(x_8, 4, x_1); +lean_ctor_set(x_8, 5, x_1); +lean_ctor_set(x_8, 6, x_5); +lean_ctor_set(x_8, 7, x_6); +lean_ctor_set_uint8(x_8, sizeof(void*)*8, x_7); +return x_8; } } lean_object* _init_l_Lean_Elab_testFrontend___closed__3() { @@ -19162,6 +19210,1830 @@ lean_dec(x_1); return x_2; } } +lean_object* l_Lean_Elab_modifyScope(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_3, 1); +x_6 = lean_ctor_get(x_3, 0); +lean_dec(x_6); +x_7 = lean_ctor_get(x_5, 5); +lean_inc(x_7); +if (lean_obj_tag(x_7) == 0) +{ +uint8_t x_8; +lean_dec(x_1); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_5, 5); +lean_dec(x_9); +x_10 = lean_box(0); +lean_ctor_set(x_3, 0, x_10); +return x_3; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_11 = lean_ctor_get(x_5, 0); +x_12 = lean_ctor_get(x_5, 1); +x_13 = lean_ctor_get(x_5, 2); +x_14 = lean_ctor_get(x_5, 3); +x_15 = lean_ctor_get(x_5, 4); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_5); +x_16 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_16, 0, x_11); +lean_ctor_set(x_16, 1, x_12); +lean_ctor_set(x_16, 2, x_13); +lean_ctor_set(x_16, 3, x_14); +lean_ctor_set(x_16, 4, x_15); +lean_ctor_set(x_16, 5, x_7); +x_17 = lean_box(0); +lean_ctor_set(x_3, 1, x_16); +lean_ctor_set(x_3, 0, x_17); +return x_3; +} +} +else +{ +uint8_t x_18; +x_18 = !lean_is_exclusive(x_5); +if (x_18 == 0) +{ +lean_object* x_19; uint8_t x_20; +x_19 = lean_ctor_get(x_5, 5); +lean_dec(x_19); +x_20 = !lean_is_exclusive(x_7); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_7, 0); +x_22 = lean_apply_1(x_1, x_21); +lean_ctor_set(x_7, 0, x_22); +x_23 = lean_box(0); +lean_ctor_set(x_3, 0, x_23); +return x_3; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_24 = lean_ctor_get(x_7, 0); +x_25 = lean_ctor_get(x_7, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_7); +x_26 = lean_apply_1(x_1, x_24); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_25); +lean_ctor_set(x_5, 5, x_27); +x_28 = lean_box(0); +lean_ctor_set(x_3, 0, x_28); +return x_3; +} +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_29 = lean_ctor_get(x_5, 0); +x_30 = lean_ctor_get(x_5, 1); +x_31 = lean_ctor_get(x_5, 2); +x_32 = lean_ctor_get(x_5, 3); +x_33 = lean_ctor_get(x_5, 4); +lean_inc(x_33); +lean_inc(x_32); +lean_inc(x_31); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_5); +x_34 = lean_ctor_get(x_7, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_7, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_7)) { + lean_ctor_release(x_7, 0); + lean_ctor_release(x_7, 1); + x_36 = x_7; +} else { + lean_dec_ref(x_7); + x_36 = lean_box(0); +} +x_37 = lean_apply_1(x_1, x_34); +if (lean_is_scalar(x_36)) { + x_38 = lean_alloc_ctor(1, 2, 0); +} else { + x_38 = x_36; +} +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_35); +x_39 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_39, 0, x_29); +lean_ctor_set(x_39, 1, x_30); +lean_ctor_set(x_39, 2, x_31); +lean_ctor_set(x_39, 3, x_32); +lean_ctor_set(x_39, 4, x_33); +lean_ctor_set(x_39, 5, x_38); +x_40 = lean_box(0); +lean_ctor_set(x_3, 1, x_39); +lean_ctor_set(x_3, 0, x_40); +return x_3; +} +} +} +else +{ +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_3, 1); +lean_inc(x_41); +lean_dec(x_3); +x_42 = lean_ctor_get(x_41, 5); +lean_inc(x_42); +if (lean_obj_tag(x_42) == 0) +{ +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_dec(x_1); +x_43 = lean_ctor_get(x_41, 0); +lean_inc(x_43); +x_44 = lean_ctor_get(x_41, 1); +lean_inc(x_44); +x_45 = lean_ctor_get(x_41, 2); +lean_inc(x_45); +x_46 = lean_ctor_get(x_41, 3); +lean_inc(x_46); +x_47 = lean_ctor_get(x_41, 4); +lean_inc(x_47); +if (lean_is_exclusive(x_41)) { + lean_ctor_release(x_41, 0); + lean_ctor_release(x_41, 1); + lean_ctor_release(x_41, 2); + lean_ctor_release(x_41, 3); + lean_ctor_release(x_41, 4); + lean_ctor_release(x_41, 5); + x_48 = x_41; +} else { + lean_dec_ref(x_41); + x_48 = lean_box(0); +} +if (lean_is_scalar(x_48)) { + x_49 = lean_alloc_ctor(0, 6, 0); +} else { + x_49 = x_48; +} +lean_ctor_set(x_49, 0, x_43); +lean_ctor_set(x_49, 1, x_44); +lean_ctor_set(x_49, 2, x_45); +lean_ctor_set(x_49, 3, x_46); +lean_ctor_set(x_49, 4, x_47); +lean_ctor_set(x_49, 5, x_42); +x_50 = lean_box(0); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_49); +return x_51; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_52 = lean_ctor_get(x_41, 0); +lean_inc(x_52); +x_53 = lean_ctor_get(x_41, 1); +lean_inc(x_53); +x_54 = lean_ctor_get(x_41, 2); +lean_inc(x_54); +x_55 = lean_ctor_get(x_41, 3); +lean_inc(x_55); +x_56 = lean_ctor_get(x_41, 4); +lean_inc(x_56); +if (lean_is_exclusive(x_41)) { + lean_ctor_release(x_41, 0); + lean_ctor_release(x_41, 1); + lean_ctor_release(x_41, 2); + lean_ctor_release(x_41, 3); + lean_ctor_release(x_41, 4); + lean_ctor_release(x_41, 5); + x_57 = x_41; +} else { + lean_dec_ref(x_41); + x_57 = lean_box(0); +} +x_58 = lean_ctor_get(x_42, 0); +lean_inc(x_58); +x_59 = lean_ctor_get(x_42, 1); +lean_inc(x_59); +if (lean_is_exclusive(x_42)) { + lean_ctor_release(x_42, 0); + lean_ctor_release(x_42, 1); + x_60 = x_42; +} else { + lean_dec_ref(x_42); + x_60 = lean_box(0); +} +x_61 = lean_apply_1(x_1, x_58); +if (lean_is_scalar(x_60)) { + x_62 = lean_alloc_ctor(1, 2, 0); +} else { + x_62 = x_60; +} +lean_ctor_set(x_62, 0, x_61); +lean_ctor_set(x_62, 1, x_59); +if (lean_is_scalar(x_57)) { + x_63 = lean_alloc_ctor(0, 6, 0); +} else { + x_63 = x_57; +} +lean_ctor_set(x_63, 0, x_52); +lean_ctor_set(x_63, 1, x_53); +lean_ctor_set(x_63, 2, x_54); +lean_ctor_set(x_63, 3, x_55); +lean_ctor_set(x_63, 4, x_56); +lean_ctor_set(x_63, 5, x_62); +x_64 = lean_box(0); +x_65 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_65, 0, x_64); +lean_ctor_set(x_65, 1, x_63); +return x_65; +} +} +} +} +lean_object* l_Lean_Elab_modifyScope___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_modifyScope(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* l_Lean_Elab_modifyGetScope___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = !lean_is_exclusive(x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_4, 1); +x_7 = lean_ctor_get(x_4, 0); +lean_dec(x_7); +x_8 = lean_ctor_get(x_6, 5); +lean_inc(x_8); +if (lean_obj_tag(x_8) == 0) +{ +lean_dec(x_2); +lean_ctor_set(x_4, 0, x_1); +return x_4; +} +else +{ +uint8_t x_9; +lean_dec(x_1); +x_9 = !lean_is_exclusive(x_6); +if (x_9 == 0) +{ +lean_object* x_10; uint8_t x_11; +x_10 = lean_ctor_get(x_6, 5); +lean_dec(x_10); +x_11 = !lean_is_exclusive(x_8); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_12 = lean_ctor_get(x_8, 0); +x_13 = lean_apply_1(x_2, x_12); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +lean_ctor_set(x_8, 0, x_15); +lean_ctor_set(x_4, 0, x_14); +return x_4; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_16 = lean_ctor_get(x_8, 0); +x_17 = lean_ctor_get(x_8, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_8); +x_18 = lean_apply_1(x_2, x_16); +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_17); +lean_ctor_set(x_6, 5, x_21); +lean_ctor_set(x_4, 0, x_19); +return x_4; +} +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_22 = lean_ctor_get(x_6, 0); +x_23 = lean_ctor_get(x_6, 1); +x_24 = lean_ctor_get(x_6, 2); +x_25 = lean_ctor_get(x_6, 3); +x_26 = lean_ctor_get(x_6, 4); +lean_inc(x_26); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_6); +x_27 = lean_ctor_get(x_8, 0); +lean_inc(x_27); +x_28 = lean_ctor_get(x_8, 1); +lean_inc(x_28); +if (lean_is_exclusive(x_8)) { + lean_ctor_release(x_8, 0); + lean_ctor_release(x_8, 1); + x_29 = x_8; +} else { + lean_dec_ref(x_8); + x_29 = lean_box(0); +} +x_30 = lean_apply_1(x_2, x_27); +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_30, 1); +lean_inc(x_32); +lean_dec(x_30); +if (lean_is_scalar(x_29)) { + x_33 = lean_alloc_ctor(1, 2, 0); +} else { + x_33 = x_29; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_28); +x_34 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_34, 0, x_22); +lean_ctor_set(x_34, 1, x_23); +lean_ctor_set(x_34, 2, x_24); +lean_ctor_set(x_34, 3, x_25); +lean_ctor_set(x_34, 4, x_26); +lean_ctor_set(x_34, 5, x_33); +lean_ctor_set(x_4, 1, x_34); +lean_ctor_set(x_4, 0, x_31); +return x_4; +} +} +} +else +{ +lean_object* x_35; lean_object* x_36; +x_35 = lean_ctor_get(x_4, 1); +lean_inc(x_35); +lean_dec(x_4); +x_36 = lean_ctor_get(x_35, 5); +lean_inc(x_36); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; +lean_dec(x_2); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_1); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +else +{ +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_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +lean_dec(x_1); +x_38 = lean_ctor_get(x_35, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_35, 1); +lean_inc(x_39); +x_40 = lean_ctor_get(x_35, 2); +lean_inc(x_40); +x_41 = lean_ctor_get(x_35, 3); +lean_inc(x_41); +x_42 = lean_ctor_get(x_35, 4); +lean_inc(x_42); +if (lean_is_exclusive(x_35)) { + lean_ctor_release(x_35, 0); + lean_ctor_release(x_35, 1); + lean_ctor_release(x_35, 2); + lean_ctor_release(x_35, 3); + lean_ctor_release(x_35, 4); + lean_ctor_release(x_35, 5); + x_43 = x_35; +} else { + lean_dec_ref(x_35); + x_43 = lean_box(0); +} +x_44 = lean_ctor_get(x_36, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_36, 1); +lean_inc(x_45); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_46 = x_36; +} else { + lean_dec_ref(x_36); + x_46 = lean_box(0); +} +x_47 = lean_apply_1(x_2, x_44); +x_48 = lean_ctor_get(x_47, 0); +lean_inc(x_48); +x_49 = lean_ctor_get(x_47, 1); +lean_inc(x_49); +lean_dec(x_47); +if (lean_is_scalar(x_46)) { + x_50 = lean_alloc_ctor(1, 2, 0); +} else { + x_50 = x_46; +} +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_45); +if (lean_is_scalar(x_43)) { + x_51 = lean_alloc_ctor(0, 6, 0); +} else { + x_51 = x_43; +} +lean_ctor_set(x_51, 0, x_38); +lean_ctor_set(x_51, 1, x_39); +lean_ctor_set(x_51, 2, x_40); +lean_ctor_set(x_51, 3, x_41); +lean_ctor_set(x_51, 4, x_42); +lean_ctor_set(x_51, 5, x_50); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_48); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +} +lean_object* l_Lean_Elab_modifyGetScope(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_modifyGetScope___rarg___boxed), 4, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_modifyGetScope___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_modifyGetScope___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Lean_Elab_localContext___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_getScope___rarg(x_1); +if (lean_obj_tag(x_2) == 0) +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_2); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_4, 6); +lean_inc(x_5); +lean_dec(x_4); +lean_ctor_set(x_2, 0, x_5); +return x_2; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_6 = lean_ctor_get(x_2, 0); +x_7 = lean_ctor_get(x_2, 1); +lean_inc(x_7); +lean_inc(x_6); +lean_dec(x_2); +x_8 = lean_ctor_get(x_6, 6); +lean_inc(x_8); +lean_dec(x_6); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_7); +return x_9; +} +} +else +{ +uint8_t x_10; +x_10 = !lean_is_exclusive(x_2); +if (x_10 == 0) +{ +return x_2; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_2, 0); +x_12 = lean_ctor_get(x_2, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_2); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_11); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +} +} +} +lean_object* l_Lean_Elab_localContext(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_localContext___rarg), 1, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_localContext___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_localContext(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_6, 1); +x_9 = lean_ctor_get(x_6, 0); +lean_dec(x_9); +x_10 = lean_ctor_get(x_8, 5); +lean_inc(x_10); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_11 = l_Lean_LocalDecl_Inhabited___closed__1; +lean_ctor_set(x_6, 0, x_11); +return x_6; +} +else +{ +lean_object* x_12; uint8_t x_13; +x_12 = lean_ctor_get(x_10, 0); +lean_inc(x_12); +x_13 = !lean_is_exclusive(x_8); +if (x_13 == 0) +{ +lean_object* x_14; uint8_t x_15; +x_14 = lean_ctor_get(x_8, 5); +lean_dec(x_14); +x_15 = !lean_is_exclusive(x_10); +if (x_15 == 0) +{ +lean_object* x_16; uint8_t x_17; +x_16 = lean_ctor_get(x_10, 0); +lean_dec(x_16); +x_17 = !lean_is_exclusive(x_12); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_18 = lean_ctor_get(x_12, 6); +x_19 = lean_local_ctx_mk_local_decl(x_18, x_4, x_1, x_2, x_3); +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +lean_ctor_set(x_12, 6, x_21); +lean_ctor_set(x_6, 0, x_20); +return x_6; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_22 = lean_ctor_get(x_12, 0); +x_23 = lean_ctor_get(x_12, 1); +x_24 = lean_ctor_get(x_12, 2); +x_25 = lean_ctor_get(x_12, 3); +x_26 = lean_ctor_get(x_12, 4); +x_27 = lean_ctor_get(x_12, 5); +x_28 = lean_ctor_get(x_12, 6); +x_29 = lean_ctor_get(x_12, 7); +x_30 = lean_ctor_get_uint8(x_12, sizeof(void*)*8); +lean_inc(x_29); +lean_inc(x_28); +lean_inc(x_27); +lean_inc(x_26); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_12); +x_31 = lean_local_ctx_mk_local_decl(x_28, x_4, x_1, x_2, x_3); +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +lean_dec(x_31); +x_34 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_34, 0, x_22); +lean_ctor_set(x_34, 1, x_23); +lean_ctor_set(x_34, 2, x_24); +lean_ctor_set(x_34, 3, x_25); +lean_ctor_set(x_34, 4, x_26); +lean_ctor_set(x_34, 5, x_27); +lean_ctor_set(x_34, 6, x_33); +lean_ctor_set(x_34, 7, x_29); +lean_ctor_set_uint8(x_34, sizeof(void*)*8, x_30); +lean_ctor_set(x_10, 0, x_34); +lean_ctor_set(x_6, 0, x_32); +return x_6; +} +} +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; uint8_t 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; +x_35 = lean_ctor_get(x_10, 1); +lean_inc(x_35); +lean_dec(x_10); +x_36 = lean_ctor_get(x_12, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_12, 1); +lean_inc(x_37); +x_38 = lean_ctor_get(x_12, 2); +lean_inc(x_38); +x_39 = lean_ctor_get(x_12, 3); +lean_inc(x_39); +x_40 = lean_ctor_get(x_12, 4); +lean_inc(x_40); +x_41 = lean_ctor_get(x_12, 5); +lean_inc(x_41); +x_42 = lean_ctor_get(x_12, 6); +lean_inc(x_42); +x_43 = lean_ctor_get(x_12, 7); +lean_inc(x_43); +x_44 = lean_ctor_get_uint8(x_12, sizeof(void*)*8); +if (lean_is_exclusive(x_12)) { + lean_ctor_release(x_12, 0); + lean_ctor_release(x_12, 1); + lean_ctor_release(x_12, 2); + lean_ctor_release(x_12, 3); + lean_ctor_release(x_12, 4); + lean_ctor_release(x_12, 5); + lean_ctor_release(x_12, 6); + lean_ctor_release(x_12, 7); + x_45 = x_12; +} else { + lean_dec_ref(x_12); + x_45 = lean_box(0); +} +x_46 = lean_local_ctx_mk_local_decl(x_42, x_4, x_1, x_2, x_3); +x_47 = lean_ctor_get(x_46, 0); +lean_inc(x_47); +x_48 = lean_ctor_get(x_46, 1); +lean_inc(x_48); +lean_dec(x_46); +if (lean_is_scalar(x_45)) { + x_49 = lean_alloc_ctor(0, 8, 1); +} else { + x_49 = x_45; +} +lean_ctor_set(x_49, 0, x_36); +lean_ctor_set(x_49, 1, x_37); +lean_ctor_set(x_49, 2, x_38); +lean_ctor_set(x_49, 3, x_39); +lean_ctor_set(x_49, 4, x_40); +lean_ctor_set(x_49, 5, x_41); +lean_ctor_set(x_49, 6, x_48); +lean_ctor_set(x_49, 7, x_43); +lean_ctor_set_uint8(x_49, sizeof(void*)*8, x_44); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_35); +lean_ctor_set(x_8, 5, x_50); +lean_ctor_set(x_6, 0, x_47); +return x_6; +} +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; uint8_t x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_51 = lean_ctor_get(x_8, 0); +x_52 = lean_ctor_get(x_8, 1); +x_53 = lean_ctor_get(x_8, 2); +x_54 = lean_ctor_get(x_8, 3); +x_55 = lean_ctor_get(x_8, 4); +lean_inc(x_55); +lean_inc(x_54); +lean_inc(x_53); +lean_inc(x_52); +lean_inc(x_51); +lean_dec(x_8); +x_56 = lean_ctor_get(x_10, 1); +lean_inc(x_56); +if (lean_is_exclusive(x_10)) { + lean_ctor_release(x_10, 0); + lean_ctor_release(x_10, 1); + x_57 = x_10; +} else { + lean_dec_ref(x_10); + x_57 = lean_box(0); +} +x_58 = lean_ctor_get(x_12, 0); +lean_inc(x_58); +x_59 = lean_ctor_get(x_12, 1); +lean_inc(x_59); +x_60 = lean_ctor_get(x_12, 2); +lean_inc(x_60); +x_61 = lean_ctor_get(x_12, 3); +lean_inc(x_61); +x_62 = lean_ctor_get(x_12, 4); +lean_inc(x_62); +x_63 = lean_ctor_get(x_12, 5); +lean_inc(x_63); +x_64 = lean_ctor_get(x_12, 6); +lean_inc(x_64); +x_65 = lean_ctor_get(x_12, 7); +lean_inc(x_65); +x_66 = lean_ctor_get_uint8(x_12, sizeof(void*)*8); +if (lean_is_exclusive(x_12)) { + lean_ctor_release(x_12, 0); + lean_ctor_release(x_12, 1); + lean_ctor_release(x_12, 2); + lean_ctor_release(x_12, 3); + lean_ctor_release(x_12, 4); + lean_ctor_release(x_12, 5); + lean_ctor_release(x_12, 6); + lean_ctor_release(x_12, 7); + x_67 = x_12; +} else { + lean_dec_ref(x_12); + x_67 = lean_box(0); +} +x_68 = lean_local_ctx_mk_local_decl(x_64, x_4, x_1, x_2, x_3); +x_69 = lean_ctor_get(x_68, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_68, 1); +lean_inc(x_70); +lean_dec(x_68); +if (lean_is_scalar(x_67)) { + x_71 = lean_alloc_ctor(0, 8, 1); +} else { + x_71 = x_67; +} +lean_ctor_set(x_71, 0, x_58); +lean_ctor_set(x_71, 1, x_59); +lean_ctor_set(x_71, 2, x_60); +lean_ctor_set(x_71, 3, x_61); +lean_ctor_set(x_71, 4, x_62); +lean_ctor_set(x_71, 5, x_63); +lean_ctor_set(x_71, 6, x_70); +lean_ctor_set(x_71, 7, x_65); +lean_ctor_set_uint8(x_71, sizeof(void*)*8, x_66); +if (lean_is_scalar(x_57)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_57; +} +lean_ctor_set(x_72, 0, x_71); +lean_ctor_set(x_72, 1, x_56); +x_73 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_73, 0, x_51); +lean_ctor_set(x_73, 1, x_52); +lean_ctor_set(x_73, 2, x_53); +lean_ctor_set(x_73, 3, x_54); +lean_ctor_set(x_73, 4, x_55); +lean_ctor_set(x_73, 5, x_72); +lean_ctor_set(x_6, 1, x_73); +lean_ctor_set(x_6, 0, x_69); +return x_6; +} +} +} +else +{ +lean_object* x_74; lean_object* x_75; +x_74 = lean_ctor_get(x_6, 1); +lean_inc(x_74); +lean_dec(x_6); +x_75 = lean_ctor_get(x_74, 5); +lean_inc(x_75); +if (lean_obj_tag(x_75) == 0) +{ +lean_object* x_76; lean_object* x_77; +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_76 = l_Lean_LocalDecl_Inhabited___closed__1; +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_74); +return x_77; +} +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; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; uint8_t x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_78 = lean_ctor_get(x_75, 0); +lean_inc(x_78); +x_79 = lean_ctor_get(x_74, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_74, 1); +lean_inc(x_80); +x_81 = lean_ctor_get(x_74, 2); +lean_inc(x_81); +x_82 = lean_ctor_get(x_74, 3); +lean_inc(x_82); +x_83 = lean_ctor_get(x_74, 4); +lean_inc(x_83); +if (lean_is_exclusive(x_74)) { + lean_ctor_release(x_74, 0); + lean_ctor_release(x_74, 1); + lean_ctor_release(x_74, 2); + lean_ctor_release(x_74, 3); + lean_ctor_release(x_74, 4); + lean_ctor_release(x_74, 5); + x_84 = x_74; +} else { + lean_dec_ref(x_74); + x_84 = lean_box(0); +} +x_85 = lean_ctor_get(x_75, 1); +lean_inc(x_85); +if (lean_is_exclusive(x_75)) { + lean_ctor_release(x_75, 0); + lean_ctor_release(x_75, 1); + x_86 = x_75; +} else { + lean_dec_ref(x_75); + x_86 = lean_box(0); +} +x_87 = lean_ctor_get(x_78, 0); +lean_inc(x_87); +x_88 = lean_ctor_get(x_78, 1); +lean_inc(x_88); +x_89 = lean_ctor_get(x_78, 2); +lean_inc(x_89); +x_90 = lean_ctor_get(x_78, 3); +lean_inc(x_90); +x_91 = lean_ctor_get(x_78, 4); +lean_inc(x_91); +x_92 = lean_ctor_get(x_78, 5); +lean_inc(x_92); +x_93 = lean_ctor_get(x_78, 6); +lean_inc(x_93); +x_94 = lean_ctor_get(x_78, 7); +lean_inc(x_94); +x_95 = lean_ctor_get_uint8(x_78, sizeof(void*)*8); +if (lean_is_exclusive(x_78)) { + lean_ctor_release(x_78, 0); + lean_ctor_release(x_78, 1); + lean_ctor_release(x_78, 2); + lean_ctor_release(x_78, 3); + lean_ctor_release(x_78, 4); + lean_ctor_release(x_78, 5); + lean_ctor_release(x_78, 6); + lean_ctor_release(x_78, 7); + x_96 = x_78; +} else { + lean_dec_ref(x_78); + x_96 = lean_box(0); +} +x_97 = lean_local_ctx_mk_local_decl(x_93, x_4, x_1, x_2, x_3); +x_98 = lean_ctor_get(x_97, 0); +lean_inc(x_98); +x_99 = lean_ctor_get(x_97, 1); +lean_inc(x_99); +lean_dec(x_97); +if (lean_is_scalar(x_96)) { + x_100 = lean_alloc_ctor(0, 8, 1); +} else { + x_100 = x_96; +} +lean_ctor_set(x_100, 0, x_87); +lean_ctor_set(x_100, 1, x_88); +lean_ctor_set(x_100, 2, x_89); +lean_ctor_set(x_100, 3, x_90); +lean_ctor_set(x_100, 4, x_91); +lean_ctor_set(x_100, 5, x_92); +lean_ctor_set(x_100, 6, x_99); +lean_ctor_set(x_100, 7, x_94); +lean_ctor_set_uint8(x_100, sizeof(void*)*8, x_95); +if (lean_is_scalar(x_86)) { + x_101 = lean_alloc_ctor(1, 2, 0); +} else { + x_101 = x_86; +} +lean_ctor_set(x_101, 0, x_100); +lean_ctor_set(x_101, 1, x_85); +if (lean_is_scalar(x_84)) { + x_102 = lean_alloc_ctor(0, 6, 0); +} else { + x_102 = x_84; +} +lean_ctor_set(x_102, 0, x_79); +lean_ctor_set(x_102, 1, x_80); +lean_ctor_set(x_102, 2, x_81); +lean_ctor_set(x_102, 3, x_82); +lean_ctor_set(x_102, 4, x_83); +lean_ctor_set(x_102, 5, x_101); +x_103 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_103, 0, x_98); +lean_ctor_set(x_103, 1, x_102); +return x_103; +} +} +} +} +lean_object* l_Lean_Elab_mkLocalDecl(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_Elab_mkFreshName___rarg(x_5); +if (lean_obj_tag(x_6) == 0) +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_box(0); +lean_ctor_set(x_6, 0, x_9); +x_10 = l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1(x_1, x_2, x_3, x_8, x_4, x_6); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_11 = lean_ctor_get(x_6, 0); +x_12 = lean_ctor_get(x_6, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_6); +x_13 = lean_box(0); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_12); +x_15 = l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1(x_1, x_2, x_3, x_11, x_4, x_14); +return x_15; +} +} +else +{ +uint8_t x_16; +lean_dec(x_2); +lean_dec(x_1); +x_16 = !lean_is_exclusive(x_6); +if (x_16 == 0) +{ +return x_6; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_6, 0); +x_18 = lean_ctor_get(x_6, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_6); +x_19 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +return x_19; +} +} +} +} +lean_object* l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +uint8_t x_7; lean_object* x_8; +x_7 = lean_unbox(x_3); +lean_dec(x_3); +x_8 = l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1(x_1, x_2, x_7, x_4, x_5, x_6); +lean_dec(x_5); +return x_8; +} +} +lean_object* l_Lean_Elab_mkLocalDecl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +uint8_t x_6; lean_object* x_7; +x_6 = lean_unbox(x_3); +lean_dec(x_3); +x_7 = l_Lean_Elab_mkLocalDecl(x_1, x_2, x_6, x_4, x_5); +lean_dec(x_4); +return x_7; +} +} +lean_object* l_Lean_Elab_mkLambda(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_localContext___rarg(x_4); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_ctor_get(x_5, 0); +x_8 = l_Lean_LocalContext_mkLambda(x_7, x_1, x_2); +lean_ctor_set(x_5, 0, x_8); +return x_5; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 0); +x_10 = lean_ctor_get(x_5, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_5); +x_11 = l_Lean_LocalContext_mkLambda(x_9, x_1, x_2); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +return x_12; +} +} +else +{ +uint8_t x_13; +lean_dec(x_2); +lean_dec(x_1); +x_13 = !lean_is_exclusive(x_5); +if (x_13 == 0) +{ +return x_5; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_5, 0); +x_15 = lean_ctor_get(x_5, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_5); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +} +} +lean_object* l_Lean_Elab_mkLambda___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_mkLambda(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Lean_Elab_mkForall(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_localContext___rarg(x_4); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_ctor_get(x_5, 0); +x_8 = l_Lean_LocalContext_mkForall(x_7, x_1, x_2); +lean_ctor_set(x_5, 0, x_8); +return x_5; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 0); +x_10 = lean_ctor_get(x_5, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_5); +x_11 = l_Lean_LocalContext_mkForall(x_9, x_1, x_2); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +return x_12; +} +} +else +{ +uint8_t x_13; +lean_dec(x_2); +lean_dec(x_1); +x_13 = !lean_is_exclusive(x_5); +if (x_13 == 0) +{ +return x_5; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_5, 0); +x_15 = lean_ctor_get(x_5, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_5); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +} +} +lean_object* l_Lean_Elab_mkForall___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_mkForall(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* _init_l_Lean_Elab_anonymousInstNamePrefix___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("_inst"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_anonymousInstNamePrefix___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_anonymousInstNamePrefix___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_anonymousInstNamePrefix() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Elab_anonymousInstNamePrefix___closed__2; +return x_1; +} +} +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_mkAnonymousInstName___spec__1___rarg(lean_object* x_1) { +_start: +{ +uint8_t x_2; +x_2 = !lean_is_exclusive(x_1); +if (x_2 == 0) +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 1); +x_4 = lean_ctor_get(x_1, 0); +lean_dec(x_4); +x_5 = lean_ctor_get(x_3, 5); +lean_inc(x_5); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_3); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_ctor_get(x_3, 5); +lean_dec(x_7); +x_8 = lean_box(0); +lean_ctor_set(x_1, 0, x_8); +return x_1; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_9 = lean_ctor_get(x_3, 0); +x_10 = lean_ctor_get(x_3, 1); +x_11 = lean_ctor_get(x_3, 2); +x_12 = lean_ctor_get(x_3, 3); +x_13 = lean_ctor_get(x_3, 4); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_3); +x_14 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_14, 0, x_9); +lean_ctor_set(x_14, 1, x_10); +lean_ctor_set(x_14, 2, x_11); +lean_ctor_set(x_14, 3, x_12); +lean_ctor_set(x_14, 4, x_13); +lean_ctor_set(x_14, 5, x_5); +x_15 = lean_box(0); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_15); +return x_1; +} +} +else +{ +lean_object* x_16; uint8_t x_17; +x_16 = lean_ctor_get(x_5, 0); +lean_inc(x_16); +x_17 = !lean_is_exclusive(x_3); +if (x_17 == 0) +{ +lean_object* x_18; uint8_t x_19; +x_18 = lean_ctor_get(x_3, 5); +lean_dec(x_18); +x_19 = !lean_is_exclusive(x_5); +if (x_19 == 0) +{ +lean_object* x_20; uint8_t x_21; +x_20 = lean_ctor_get(x_5, 0); +lean_dec(x_20); +x_21 = !lean_is_exclusive(x_16); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_22 = lean_ctor_get(x_16, 7); +x_23 = lean_unsigned_to_nat(1u); +x_24 = lean_nat_add(x_22, x_23); +lean_dec(x_22); +lean_ctor_set(x_16, 7, x_24); +x_25 = lean_box(0); +lean_ctor_set(x_1, 0, x_25); +return x_1; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_26 = lean_ctor_get(x_16, 0); +x_27 = lean_ctor_get(x_16, 1); +x_28 = lean_ctor_get(x_16, 2); +x_29 = lean_ctor_get(x_16, 3); +x_30 = lean_ctor_get(x_16, 4); +x_31 = lean_ctor_get(x_16, 5); +x_32 = lean_ctor_get(x_16, 6); +x_33 = lean_ctor_get(x_16, 7); +x_34 = lean_ctor_get_uint8(x_16, sizeof(void*)*8); +lean_inc(x_33); +lean_inc(x_32); +lean_inc(x_31); +lean_inc(x_30); +lean_inc(x_29); +lean_inc(x_28); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_16); +x_35 = lean_unsigned_to_nat(1u); +x_36 = lean_nat_add(x_33, x_35); +lean_dec(x_33); +x_37 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_37, 0, x_26); +lean_ctor_set(x_37, 1, x_27); +lean_ctor_set(x_37, 2, x_28); +lean_ctor_set(x_37, 3, x_29); +lean_ctor_set(x_37, 4, x_30); +lean_ctor_set(x_37, 5, x_31); +lean_ctor_set(x_37, 6, x_32); +lean_ctor_set(x_37, 7, x_36); +lean_ctor_set_uint8(x_37, sizeof(void*)*8, x_34); +lean_ctor_set(x_5, 0, x_37); +x_38 = lean_box(0); +lean_ctor_set(x_1, 0, x_38); +return x_1; +} +} +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; uint8_t 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_ctor_get(x_5, 1); +lean_inc(x_39); +lean_dec(x_5); +x_40 = lean_ctor_get(x_16, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_16, 1); +lean_inc(x_41); +x_42 = lean_ctor_get(x_16, 2); +lean_inc(x_42); +x_43 = lean_ctor_get(x_16, 3); +lean_inc(x_43); +x_44 = lean_ctor_get(x_16, 4); +lean_inc(x_44); +x_45 = lean_ctor_get(x_16, 5); +lean_inc(x_45); +x_46 = lean_ctor_get(x_16, 6); +lean_inc(x_46); +x_47 = lean_ctor_get(x_16, 7); +lean_inc(x_47); +x_48 = lean_ctor_get_uint8(x_16, sizeof(void*)*8); +if (lean_is_exclusive(x_16)) { + lean_ctor_release(x_16, 0); + lean_ctor_release(x_16, 1); + lean_ctor_release(x_16, 2); + lean_ctor_release(x_16, 3); + lean_ctor_release(x_16, 4); + lean_ctor_release(x_16, 5); + lean_ctor_release(x_16, 6); + lean_ctor_release(x_16, 7); + x_49 = x_16; +} else { + lean_dec_ref(x_16); + x_49 = lean_box(0); +} +x_50 = lean_unsigned_to_nat(1u); +x_51 = lean_nat_add(x_47, x_50); +lean_dec(x_47); +if (lean_is_scalar(x_49)) { + x_52 = lean_alloc_ctor(0, 8, 1); +} else { + x_52 = x_49; +} +lean_ctor_set(x_52, 0, x_40); +lean_ctor_set(x_52, 1, x_41); +lean_ctor_set(x_52, 2, x_42); +lean_ctor_set(x_52, 3, x_43); +lean_ctor_set(x_52, 4, x_44); +lean_ctor_set(x_52, 5, x_45); +lean_ctor_set(x_52, 6, x_46); +lean_ctor_set(x_52, 7, x_51); +lean_ctor_set_uint8(x_52, sizeof(void*)*8, x_48); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_39); +lean_ctor_set(x_3, 5, x_53); +x_54 = lean_box(0); +lean_ctor_set(x_1, 0, x_54); +return x_1; +} +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_55 = lean_ctor_get(x_3, 0); +x_56 = lean_ctor_get(x_3, 1); +x_57 = lean_ctor_get(x_3, 2); +x_58 = lean_ctor_get(x_3, 3); +x_59 = lean_ctor_get(x_3, 4); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_3); +x_60 = lean_ctor_get(x_5, 1); +lean_inc(x_60); +if (lean_is_exclusive(x_5)) { + lean_ctor_release(x_5, 0); + lean_ctor_release(x_5, 1); + x_61 = x_5; +} else { + lean_dec_ref(x_5); + x_61 = lean_box(0); +} +x_62 = lean_ctor_get(x_16, 0); +lean_inc(x_62); +x_63 = lean_ctor_get(x_16, 1); +lean_inc(x_63); +x_64 = lean_ctor_get(x_16, 2); +lean_inc(x_64); +x_65 = lean_ctor_get(x_16, 3); +lean_inc(x_65); +x_66 = lean_ctor_get(x_16, 4); +lean_inc(x_66); +x_67 = lean_ctor_get(x_16, 5); +lean_inc(x_67); +x_68 = lean_ctor_get(x_16, 6); +lean_inc(x_68); +x_69 = lean_ctor_get(x_16, 7); +lean_inc(x_69); +x_70 = lean_ctor_get_uint8(x_16, sizeof(void*)*8); +if (lean_is_exclusive(x_16)) { + lean_ctor_release(x_16, 0); + lean_ctor_release(x_16, 1); + lean_ctor_release(x_16, 2); + lean_ctor_release(x_16, 3); + lean_ctor_release(x_16, 4); + lean_ctor_release(x_16, 5); + lean_ctor_release(x_16, 6); + lean_ctor_release(x_16, 7); + x_71 = x_16; +} else { + lean_dec_ref(x_16); + x_71 = lean_box(0); +} +x_72 = lean_unsigned_to_nat(1u); +x_73 = lean_nat_add(x_69, x_72); +lean_dec(x_69); +if (lean_is_scalar(x_71)) { + x_74 = lean_alloc_ctor(0, 8, 1); +} else { + x_74 = x_71; +} +lean_ctor_set(x_74, 0, x_62); +lean_ctor_set(x_74, 1, x_63); +lean_ctor_set(x_74, 2, x_64); +lean_ctor_set(x_74, 3, x_65); +lean_ctor_set(x_74, 4, x_66); +lean_ctor_set(x_74, 5, x_67); +lean_ctor_set(x_74, 6, x_68); +lean_ctor_set(x_74, 7, x_73); +lean_ctor_set_uint8(x_74, sizeof(void*)*8, x_70); +if (lean_is_scalar(x_61)) { + x_75 = lean_alloc_ctor(1, 2, 0); +} else { + x_75 = x_61; +} +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_75, 1, x_60); +x_76 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_76, 0, x_55); +lean_ctor_set(x_76, 1, x_56); +lean_ctor_set(x_76, 2, x_57); +lean_ctor_set(x_76, 3, x_58); +lean_ctor_set(x_76, 4, x_59); +lean_ctor_set(x_76, 5, x_75); +x_77 = lean_box(0); +lean_ctor_set(x_1, 1, x_76); +lean_ctor_set(x_1, 0, x_77); +return x_1; +} +} +} +else +{ +lean_object* x_78; lean_object* x_79; +x_78 = lean_ctor_get(x_1, 1); +lean_inc(x_78); +lean_dec(x_1); +x_79 = lean_ctor_get(x_78, 5); +lean_inc(x_79); +if (lean_obj_tag(x_79) == 0) +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_80 = lean_ctor_get(x_78, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_78, 1); +lean_inc(x_81); +x_82 = lean_ctor_get(x_78, 2); +lean_inc(x_82); +x_83 = lean_ctor_get(x_78, 3); +lean_inc(x_83); +x_84 = lean_ctor_get(x_78, 4); +lean_inc(x_84); +if (lean_is_exclusive(x_78)) { + lean_ctor_release(x_78, 0); + lean_ctor_release(x_78, 1); + lean_ctor_release(x_78, 2); + lean_ctor_release(x_78, 3); + lean_ctor_release(x_78, 4); + lean_ctor_release(x_78, 5); + x_85 = x_78; +} else { + lean_dec_ref(x_78); + x_85 = lean_box(0); +} +if (lean_is_scalar(x_85)) { + x_86 = lean_alloc_ctor(0, 6, 0); +} else { + x_86 = x_85; +} +lean_ctor_set(x_86, 0, x_80); +lean_ctor_set(x_86, 1, x_81); +lean_ctor_set(x_86, 2, x_82); +lean_ctor_set(x_86, 3, x_83); +lean_ctor_set(x_86, 4, x_84); +lean_ctor_set(x_86, 5, x_79); +x_87 = lean_box(0); +x_88 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_88, 0, x_87); +lean_ctor_set(x_88, 1, x_86); +return x_88; +} +else +{ +lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; uint8_t x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_89 = lean_ctor_get(x_79, 0); +lean_inc(x_89); +x_90 = lean_ctor_get(x_78, 0); +lean_inc(x_90); +x_91 = lean_ctor_get(x_78, 1); +lean_inc(x_91); +x_92 = lean_ctor_get(x_78, 2); +lean_inc(x_92); +x_93 = lean_ctor_get(x_78, 3); +lean_inc(x_93); +x_94 = lean_ctor_get(x_78, 4); +lean_inc(x_94); +if (lean_is_exclusive(x_78)) { + lean_ctor_release(x_78, 0); + lean_ctor_release(x_78, 1); + lean_ctor_release(x_78, 2); + lean_ctor_release(x_78, 3); + lean_ctor_release(x_78, 4); + lean_ctor_release(x_78, 5); + x_95 = x_78; +} else { + lean_dec_ref(x_78); + x_95 = lean_box(0); +} +x_96 = lean_ctor_get(x_79, 1); +lean_inc(x_96); +if (lean_is_exclusive(x_79)) { + lean_ctor_release(x_79, 0); + lean_ctor_release(x_79, 1); + x_97 = x_79; +} else { + lean_dec_ref(x_79); + x_97 = lean_box(0); +} +x_98 = lean_ctor_get(x_89, 0); +lean_inc(x_98); +x_99 = lean_ctor_get(x_89, 1); +lean_inc(x_99); +x_100 = lean_ctor_get(x_89, 2); +lean_inc(x_100); +x_101 = lean_ctor_get(x_89, 3); +lean_inc(x_101); +x_102 = lean_ctor_get(x_89, 4); +lean_inc(x_102); +x_103 = lean_ctor_get(x_89, 5); +lean_inc(x_103); +x_104 = lean_ctor_get(x_89, 6); +lean_inc(x_104); +x_105 = lean_ctor_get(x_89, 7); +lean_inc(x_105); +x_106 = lean_ctor_get_uint8(x_89, sizeof(void*)*8); +if (lean_is_exclusive(x_89)) { + lean_ctor_release(x_89, 0); + lean_ctor_release(x_89, 1); + lean_ctor_release(x_89, 2); + lean_ctor_release(x_89, 3); + lean_ctor_release(x_89, 4); + lean_ctor_release(x_89, 5); + lean_ctor_release(x_89, 6); + lean_ctor_release(x_89, 7); + x_107 = x_89; +} else { + lean_dec_ref(x_89); + x_107 = lean_box(0); +} +x_108 = lean_unsigned_to_nat(1u); +x_109 = lean_nat_add(x_105, x_108); +lean_dec(x_105); +if (lean_is_scalar(x_107)) { + x_110 = lean_alloc_ctor(0, 8, 1); +} else { + x_110 = x_107; +} +lean_ctor_set(x_110, 0, x_98); +lean_ctor_set(x_110, 1, x_99); +lean_ctor_set(x_110, 2, x_100); +lean_ctor_set(x_110, 3, x_101); +lean_ctor_set(x_110, 4, x_102); +lean_ctor_set(x_110, 5, x_103); +lean_ctor_set(x_110, 6, x_104); +lean_ctor_set(x_110, 7, x_109); +lean_ctor_set_uint8(x_110, sizeof(void*)*8, x_106); +if (lean_is_scalar(x_97)) { + x_111 = lean_alloc_ctor(1, 2, 0); +} else { + x_111 = x_97; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_96); +if (lean_is_scalar(x_95)) { + x_112 = lean_alloc_ctor(0, 6, 0); +} else { + x_112 = x_95; +} +lean_ctor_set(x_112, 0, x_90); +lean_ctor_set(x_112, 1, x_91); +lean_ctor_set(x_112, 2, x_92); +lean_ctor_set(x_112, 3, x_93); +lean_ctor_set(x_112, 4, x_94); +lean_ctor_set(x_112, 5, x_111); +x_113 = lean_box(0); +x_114 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_114, 0, x_113); +lean_ctor_set(x_114, 1, x_112); +return x_114; +} +} +} +} +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_mkAnonymousInstName___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_modifyScope___at_Lean_Elab_mkAnonymousInstName___spec__1___rarg), 1, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_mkAnonymousInstName(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Elab_getScope___rarg(x_2); +if (lean_obj_tag(x_3) == 0) +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_5 = lean_ctor_get(x_3, 0); +x_6 = lean_box(0); +lean_ctor_set(x_3, 0, x_6); +x_7 = lean_ctor_get(x_5, 7); +lean_inc(x_7); +lean_dec(x_5); +x_8 = l_Lean_Elab_anonymousInstNamePrefix; +x_9 = l_Lean_Name_appendIndexAfter(x_8, x_7); +x_10 = l_Lean_Elab_modifyScope___at_Lean_Elab_mkAnonymousInstName___spec__1___rarg(x_3); +if (lean_obj_tag(x_10) == 0) +{ +uint8_t x_11; +x_11 = !lean_is_exclusive(x_10); +if (x_11 == 0) +{ +lean_object* x_12; +x_12 = lean_ctor_get(x_10, 0); +lean_dec(x_12); +lean_ctor_set(x_10, 0, x_9); +return x_10; +} +else +{ +lean_object* x_13; lean_object* x_14; +x_13 = lean_ctor_get(x_10, 1); +lean_inc(x_13); +lean_dec(x_10); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_9); +lean_ctor_set(x_14, 1, x_13); +return x_14; +} +} +else +{ +uint8_t x_15; +lean_dec(x_9); +x_15 = !lean_is_exclusive(x_10); +if (x_15 == 0) +{ +return x_10; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_10, 0); +x_17 = lean_ctor_get(x_10, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_10); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; +} +} +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_19 = lean_ctor_get(x_3, 0); +x_20 = lean_ctor_get(x_3, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_3); +x_21 = lean_box(0); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_20); +x_23 = lean_ctor_get(x_19, 7); +lean_inc(x_23); +lean_dec(x_19); +x_24 = l_Lean_Elab_anonymousInstNamePrefix; +x_25 = l_Lean_Name_appendIndexAfter(x_24, x_23); +x_26 = l_Lean_Elab_modifyScope___at_Lean_Elab_mkAnonymousInstName___spec__1___rarg(x_22); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_26, 1); +lean_inc(x_27); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + x_28 = x_26; +} else { + lean_dec_ref(x_26); + x_28 = lean_box(0); +} +if (lean_is_scalar(x_28)) { + x_29 = lean_alloc_ctor(0, 2, 0); +} else { + x_29 = x_28; +} +lean_ctor_set(x_29, 0, x_25); +lean_ctor_set(x_29, 1, x_27); +return x_29; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +lean_dec(x_25); +x_30 = lean_ctor_get(x_26, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_26, 1); +lean_inc(x_31); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + x_32 = x_26; +} else { + lean_dec_ref(x_26); + x_32 = lean_box(0); +} +if (lean_is_scalar(x_32)) { + x_33 = lean_alloc_ctor(1, 2, 0); +} else { + x_33 = x_32; +} +lean_ctor_set(x_33, 0, x_30); +lean_ctor_set(x_33, 1, x_31); +return x_33; +} +} +} +else +{ +uint8_t x_34; +x_34 = !lean_is_exclusive(x_3); +if (x_34 == 0) +{ +return x_3; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_3, 0); +x_36 = lean_ctor_get(x_3, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_3); +x_37 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_37, 0, x_35); +lean_ctor_set(x_37, 1, x_36); +return x_37; +} +} +} +} +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_mkAnonymousInstName___spec__1___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_modifyScope___at_Lean_Elab_mkAnonymousInstName___spec__1(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_mkAnonymousInstName___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Elab_mkAnonymousInstName(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} lean_object* _init_l_Lean_Elab_rootNamespace___closed__1() { _start: { @@ -19669,6 +21541,1573 @@ lean_dec(x_2); return x_4; } } +lean_object* l_Lean_Elab_withNewScope___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = lean_ctor_get(x_3, 1); +x_6 = lean_ctor_get(x_3, 0); +lean_dec(x_6); +x_7 = !lean_is_exclusive(x_5); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_ctor_get(x_5, 5); +x_9 = l_List_head___at_Lean_Elab_getScope___spec__1(x_8); +x_10 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +lean_ctor_set(x_5, 5, x_10); +x_11 = lean_box(0); +lean_ctor_set(x_3, 0, x_11); +x_12 = lean_apply_2(x_1, x_2, x_3); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; uint8_t x_15; +x_14 = lean_ctor_get(x_12, 1); +x_15 = !lean_is_exclusive(x_14); +if (x_15 == 0) +{ +lean_object* x_16; lean_object* x_17; +x_16 = lean_ctor_get(x_14, 5); +x_17 = l_List_tail___rarg(x_16); +lean_dec(x_16); +lean_ctor_set(x_14, 5, x_17); +return x_12; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_18 = lean_ctor_get(x_14, 0); +x_19 = lean_ctor_get(x_14, 1); +x_20 = lean_ctor_get(x_14, 2); +x_21 = lean_ctor_get(x_14, 3); +x_22 = lean_ctor_get(x_14, 4); +x_23 = lean_ctor_get(x_14, 5); +lean_inc(x_23); +lean_inc(x_22); +lean_inc(x_21); +lean_inc(x_20); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_14); +x_24 = l_List_tail___rarg(x_23); +lean_dec(x_23); +x_25 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_25, 0, x_18); +lean_ctor_set(x_25, 1, x_19); +lean_ctor_set(x_25, 2, x_20); +lean_ctor_set(x_25, 3, x_21); +lean_ctor_set(x_25, 4, x_22); +lean_ctor_set(x_25, 5, x_24); +lean_ctor_set(x_12, 1, x_25); +return x_12; +} +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_26 = lean_ctor_get(x_12, 1); +x_27 = lean_ctor_get(x_12, 0); +lean_inc(x_26); +lean_inc(x_27); +lean_dec(x_12); +x_28 = lean_ctor_get(x_26, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_26, 1); +lean_inc(x_29); +x_30 = lean_ctor_get(x_26, 2); +lean_inc(x_30); +x_31 = lean_ctor_get(x_26, 3); +lean_inc(x_31); +x_32 = lean_ctor_get(x_26, 4); +lean_inc(x_32); +x_33 = lean_ctor_get(x_26, 5); +lean_inc(x_33); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + lean_ctor_release(x_26, 2); + lean_ctor_release(x_26, 3); + lean_ctor_release(x_26, 4); + lean_ctor_release(x_26, 5); + x_34 = x_26; +} else { + lean_dec_ref(x_26); + x_34 = lean_box(0); +} +x_35 = l_List_tail___rarg(x_33); +lean_dec(x_33); +if (lean_is_scalar(x_34)) { + x_36 = lean_alloc_ctor(0, 6, 0); +} else { + x_36 = x_34; +} +lean_ctor_set(x_36, 0, x_28); +lean_ctor_set(x_36, 1, x_29); +lean_ctor_set(x_36, 2, x_30); +lean_ctor_set(x_36, 3, x_31); +lean_ctor_set(x_36, 4, x_32); +lean_ctor_set(x_36, 5, x_35); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_27); +lean_ctor_set(x_37, 1, x_36); +return x_37; +} +} +else +{ +uint8_t x_38; +x_38 = !lean_is_exclusive(x_12); +if (x_38 == 0) +{ +return x_12; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_12, 0); +x_40 = lean_ctor_get(x_12, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_12); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +return x_41; +} +} +} +else +{ +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; +x_42 = lean_ctor_get(x_5, 0); +x_43 = lean_ctor_get(x_5, 1); +x_44 = lean_ctor_get(x_5, 2); +x_45 = lean_ctor_get(x_5, 3); +x_46 = lean_ctor_get(x_5, 4); +x_47 = lean_ctor_get(x_5, 5); +lean_inc(x_47); +lean_inc(x_46); +lean_inc(x_45); +lean_inc(x_44); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_5); +x_48 = l_List_head___at_Lean_Elab_getScope___spec__1(x_47); +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_47); +x_50 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_50, 0, x_42); +lean_ctor_set(x_50, 1, x_43); +lean_ctor_set(x_50, 2, x_44); +lean_ctor_set(x_50, 3, x_45); +lean_ctor_set(x_50, 4, x_46); +lean_ctor_set(x_50, 5, x_49); +x_51 = lean_box(0); +lean_ctor_set(x_3, 1, x_50); +lean_ctor_set(x_3, 0, x_51); +x_52 = lean_apply_2(x_1, x_2, x_3); +if (lean_obj_tag(x_52) == 0) +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_53 = lean_ctor_get(x_52, 1); +lean_inc(x_53); +x_54 = lean_ctor_get(x_52, 0); +lean_inc(x_54); +if (lean_is_exclusive(x_52)) { + lean_ctor_release(x_52, 0); + lean_ctor_release(x_52, 1); + x_55 = x_52; +} else { + lean_dec_ref(x_52); + x_55 = lean_box(0); +} +x_56 = lean_ctor_get(x_53, 0); +lean_inc(x_56); +x_57 = lean_ctor_get(x_53, 1); +lean_inc(x_57); +x_58 = lean_ctor_get(x_53, 2); +lean_inc(x_58); +x_59 = lean_ctor_get(x_53, 3); +lean_inc(x_59); +x_60 = lean_ctor_get(x_53, 4); +lean_inc(x_60); +x_61 = lean_ctor_get(x_53, 5); +lean_inc(x_61); +if (lean_is_exclusive(x_53)) { + lean_ctor_release(x_53, 0); + lean_ctor_release(x_53, 1); + lean_ctor_release(x_53, 2); + lean_ctor_release(x_53, 3); + lean_ctor_release(x_53, 4); + lean_ctor_release(x_53, 5); + x_62 = x_53; +} else { + lean_dec_ref(x_53); + x_62 = lean_box(0); +} +x_63 = l_List_tail___rarg(x_61); +lean_dec(x_61); +if (lean_is_scalar(x_62)) { + x_64 = lean_alloc_ctor(0, 6, 0); +} else { + x_64 = x_62; +} +lean_ctor_set(x_64, 0, x_56); +lean_ctor_set(x_64, 1, x_57); +lean_ctor_set(x_64, 2, x_58); +lean_ctor_set(x_64, 3, x_59); +lean_ctor_set(x_64, 4, x_60); +lean_ctor_set(x_64, 5, x_63); +if (lean_is_scalar(x_55)) { + x_65 = lean_alloc_ctor(0, 2, 0); +} else { + x_65 = x_55; +} +lean_ctor_set(x_65, 0, x_54); +lean_ctor_set(x_65, 1, x_64); +return x_65; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_66 = lean_ctor_get(x_52, 0); +lean_inc(x_66); +x_67 = lean_ctor_get(x_52, 1); +lean_inc(x_67); +if (lean_is_exclusive(x_52)) { + lean_ctor_release(x_52, 0); + lean_ctor_release(x_52, 1); + x_68 = x_52; +} else { + lean_dec_ref(x_52); + x_68 = lean_box(0); +} +if (lean_is_scalar(x_68)) { + x_69 = lean_alloc_ctor(1, 2, 0); +} else { + x_69 = x_68; +} +lean_ctor_set(x_69, 0, x_66); +lean_ctor_set(x_69, 1, x_67); +return x_69; +} +} +} +else +{ +lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_70 = lean_ctor_get(x_3, 1); +lean_inc(x_70); +lean_dec(x_3); +x_71 = lean_ctor_get(x_70, 0); +lean_inc(x_71); +x_72 = lean_ctor_get(x_70, 1); +lean_inc(x_72); +x_73 = lean_ctor_get(x_70, 2); +lean_inc(x_73); +x_74 = lean_ctor_get(x_70, 3); +lean_inc(x_74); +x_75 = lean_ctor_get(x_70, 4); +lean_inc(x_75); +x_76 = lean_ctor_get(x_70, 5); +lean_inc(x_76); +if (lean_is_exclusive(x_70)) { + lean_ctor_release(x_70, 0); + lean_ctor_release(x_70, 1); + lean_ctor_release(x_70, 2); + lean_ctor_release(x_70, 3); + lean_ctor_release(x_70, 4); + lean_ctor_release(x_70, 5); + x_77 = x_70; +} else { + lean_dec_ref(x_70); + x_77 = lean_box(0); +} +x_78 = l_List_head___at_Lean_Elab_getScope___spec__1(x_76); +x_79 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_79, 0, x_78); +lean_ctor_set(x_79, 1, x_76); +if (lean_is_scalar(x_77)) { + x_80 = lean_alloc_ctor(0, 6, 0); +} else { + x_80 = x_77; +} +lean_ctor_set(x_80, 0, x_71); +lean_ctor_set(x_80, 1, x_72); +lean_ctor_set(x_80, 2, x_73); +lean_ctor_set(x_80, 3, x_74); +lean_ctor_set(x_80, 4, x_75); +lean_ctor_set(x_80, 5, x_79); +x_81 = lean_box(0); +x_82 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_80); +x_83 = lean_apply_2(x_1, x_2, x_82); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +x_85 = lean_ctor_get(x_83, 0); +lean_inc(x_85); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_86 = x_83; +} else { + lean_dec_ref(x_83); + x_86 = lean_box(0); +} +x_87 = lean_ctor_get(x_84, 0); +lean_inc(x_87); +x_88 = lean_ctor_get(x_84, 1); +lean_inc(x_88); +x_89 = lean_ctor_get(x_84, 2); +lean_inc(x_89); +x_90 = lean_ctor_get(x_84, 3); +lean_inc(x_90); +x_91 = lean_ctor_get(x_84, 4); +lean_inc(x_91); +x_92 = lean_ctor_get(x_84, 5); +lean_inc(x_92); +if (lean_is_exclusive(x_84)) { + lean_ctor_release(x_84, 0); + lean_ctor_release(x_84, 1); + lean_ctor_release(x_84, 2); + lean_ctor_release(x_84, 3); + lean_ctor_release(x_84, 4); + lean_ctor_release(x_84, 5); + x_93 = x_84; +} else { + lean_dec_ref(x_84); + x_93 = lean_box(0); +} +x_94 = l_List_tail___rarg(x_92); +lean_dec(x_92); +if (lean_is_scalar(x_93)) { + x_95 = lean_alloc_ctor(0, 6, 0); +} else { + x_95 = x_93; +} +lean_ctor_set(x_95, 0, x_87); +lean_ctor_set(x_95, 1, x_88); +lean_ctor_set(x_95, 2, x_89); +lean_ctor_set(x_95, 3, x_90); +lean_ctor_set(x_95, 4, x_91); +lean_ctor_set(x_95, 5, x_94); +if (lean_is_scalar(x_86)) { + x_96 = lean_alloc_ctor(0, 2, 0); +} else { + x_96 = x_86; +} +lean_ctor_set(x_96, 0, x_85); +lean_ctor_set(x_96, 1, x_95); +return x_96; +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_97 = lean_ctor_get(x_83, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_83, 1); +lean_inc(x_98); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_99 = x_83; +} else { + lean_dec_ref(x_83); + x_99 = lean_box(0); +} +if (lean_is_scalar(x_99)) { + x_100 = lean_alloc_ctor(1, 2, 0); +} else { + x_100 = x_99; +} +lean_ctor_set(x_100, 0, x_97); +lean_ctor_set(x_100, 1, x_98); +return x_100; +} +} +} +} +lean_object* l_Lean_Elab_withNewScope(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_withNewScope___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1___rarg(lean_object* x_1) { +_start: +{ +uint8_t x_2; +x_2 = !lean_is_exclusive(x_1); +if (x_2 == 0) +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 1); +x_4 = lean_ctor_get(x_1, 0); +lean_dec(x_4); +x_5 = lean_ctor_get(x_3, 5); +lean_inc(x_5); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_3); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_ctor_get(x_3, 5); +lean_dec(x_7); +x_8 = lean_box(0); +lean_ctor_set(x_1, 0, x_8); +return x_1; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_9 = lean_ctor_get(x_3, 0); +x_10 = lean_ctor_get(x_3, 1); +x_11 = lean_ctor_get(x_3, 2); +x_12 = lean_ctor_get(x_3, 3); +x_13 = lean_ctor_get(x_3, 4); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_3); +x_14 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_14, 0, x_9); +lean_ctor_set(x_14, 1, x_10); +lean_ctor_set(x_14, 2, x_11); +lean_ctor_set(x_14, 3, x_12); +lean_ctor_set(x_14, 4, x_13); +lean_ctor_set(x_14, 5, x_5); +x_15 = lean_box(0); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_15); +return x_1; +} +} +else +{ +lean_object* x_16; uint8_t x_17; +x_16 = lean_ctor_get(x_5, 0); +lean_inc(x_16); +x_17 = !lean_is_exclusive(x_3); +if (x_17 == 0) +{ +lean_object* x_18; uint8_t x_19; +x_18 = lean_ctor_get(x_3, 5); +lean_dec(x_18); +x_19 = !lean_is_exclusive(x_5); +if (x_19 == 0) +{ +lean_object* x_20; uint8_t x_21; +x_20 = lean_ctor_get(x_5, 0); +lean_dec(x_20); +x_21 = !lean_is_exclusive(x_16); +if (x_21 == 0) +{ +uint8_t x_22; lean_object* x_23; +x_22 = 1; +lean_ctor_set_uint8(x_16, sizeof(void*)*8, x_22); +x_23 = lean_box(0); +lean_ctor_set(x_1, 0, x_23); +return x_1; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; lean_object* x_33; lean_object* x_34; +x_24 = lean_ctor_get(x_16, 0); +x_25 = lean_ctor_get(x_16, 1); +x_26 = lean_ctor_get(x_16, 2); +x_27 = lean_ctor_get(x_16, 3); +x_28 = lean_ctor_get(x_16, 4); +x_29 = lean_ctor_get(x_16, 5); +x_30 = lean_ctor_get(x_16, 6); +x_31 = lean_ctor_get(x_16, 7); +lean_inc(x_31); +lean_inc(x_30); +lean_inc(x_29); +lean_inc(x_28); +lean_inc(x_27); +lean_inc(x_26); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_16); +x_32 = 1; +x_33 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_33, 0, x_24); +lean_ctor_set(x_33, 1, x_25); +lean_ctor_set(x_33, 2, x_26); +lean_ctor_set(x_33, 3, x_27); +lean_ctor_set(x_33, 4, x_28); +lean_ctor_set(x_33, 5, x_29); +lean_ctor_set(x_33, 6, x_30); +lean_ctor_set(x_33, 7, x_31); +lean_ctor_set_uint8(x_33, sizeof(void*)*8, x_32); +lean_ctor_set(x_5, 0, x_33); +x_34 = lean_box(0); +lean_ctor_set(x_1, 0, x_34); +return x_1; +} +} +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; uint8_t x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_35 = lean_ctor_get(x_5, 1); +lean_inc(x_35); +lean_dec(x_5); +x_36 = lean_ctor_get(x_16, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_16, 1); +lean_inc(x_37); +x_38 = lean_ctor_get(x_16, 2); +lean_inc(x_38); +x_39 = lean_ctor_get(x_16, 3); +lean_inc(x_39); +x_40 = lean_ctor_get(x_16, 4); +lean_inc(x_40); +x_41 = lean_ctor_get(x_16, 5); +lean_inc(x_41); +x_42 = lean_ctor_get(x_16, 6); +lean_inc(x_42); +x_43 = lean_ctor_get(x_16, 7); +lean_inc(x_43); +if (lean_is_exclusive(x_16)) { + lean_ctor_release(x_16, 0); + lean_ctor_release(x_16, 1); + lean_ctor_release(x_16, 2); + lean_ctor_release(x_16, 3); + lean_ctor_release(x_16, 4); + lean_ctor_release(x_16, 5); + lean_ctor_release(x_16, 6); + lean_ctor_release(x_16, 7); + x_44 = x_16; +} else { + lean_dec_ref(x_16); + x_44 = lean_box(0); +} +x_45 = 1; +if (lean_is_scalar(x_44)) { + x_46 = lean_alloc_ctor(0, 8, 1); +} else { + x_46 = x_44; +} +lean_ctor_set(x_46, 0, x_36); +lean_ctor_set(x_46, 1, x_37); +lean_ctor_set(x_46, 2, x_38); +lean_ctor_set(x_46, 3, x_39); +lean_ctor_set(x_46, 4, x_40); +lean_ctor_set(x_46, 5, x_41); +lean_ctor_set(x_46, 6, x_42); +lean_ctor_set(x_46, 7, x_43); +lean_ctor_set_uint8(x_46, sizeof(void*)*8, x_45); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_35); +lean_ctor_set(x_3, 5, x_47); +x_48 = lean_box(0); +lean_ctor_set(x_1, 0, x_48); +return x_1; +} +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; uint8_t x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_49 = lean_ctor_get(x_3, 0); +x_50 = lean_ctor_get(x_3, 1); +x_51 = lean_ctor_get(x_3, 2); +x_52 = lean_ctor_get(x_3, 3); +x_53 = lean_ctor_get(x_3, 4); +lean_inc(x_53); +lean_inc(x_52); +lean_inc(x_51); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_3); +x_54 = lean_ctor_get(x_5, 1); +lean_inc(x_54); +if (lean_is_exclusive(x_5)) { + lean_ctor_release(x_5, 0); + lean_ctor_release(x_5, 1); + x_55 = x_5; +} else { + lean_dec_ref(x_5); + x_55 = lean_box(0); +} +x_56 = lean_ctor_get(x_16, 0); +lean_inc(x_56); +x_57 = lean_ctor_get(x_16, 1); +lean_inc(x_57); +x_58 = lean_ctor_get(x_16, 2); +lean_inc(x_58); +x_59 = lean_ctor_get(x_16, 3); +lean_inc(x_59); +x_60 = lean_ctor_get(x_16, 4); +lean_inc(x_60); +x_61 = lean_ctor_get(x_16, 5); +lean_inc(x_61); +x_62 = lean_ctor_get(x_16, 6); +lean_inc(x_62); +x_63 = lean_ctor_get(x_16, 7); +lean_inc(x_63); +if (lean_is_exclusive(x_16)) { + lean_ctor_release(x_16, 0); + lean_ctor_release(x_16, 1); + lean_ctor_release(x_16, 2); + lean_ctor_release(x_16, 3); + lean_ctor_release(x_16, 4); + lean_ctor_release(x_16, 5); + lean_ctor_release(x_16, 6); + lean_ctor_release(x_16, 7); + x_64 = x_16; +} else { + lean_dec_ref(x_16); + x_64 = lean_box(0); +} +x_65 = 1; +if (lean_is_scalar(x_64)) { + x_66 = lean_alloc_ctor(0, 8, 1); +} else { + x_66 = x_64; +} +lean_ctor_set(x_66, 0, x_56); +lean_ctor_set(x_66, 1, x_57); +lean_ctor_set(x_66, 2, x_58); +lean_ctor_set(x_66, 3, x_59); +lean_ctor_set(x_66, 4, x_60); +lean_ctor_set(x_66, 5, x_61); +lean_ctor_set(x_66, 6, x_62); +lean_ctor_set(x_66, 7, x_63); +lean_ctor_set_uint8(x_66, sizeof(void*)*8, x_65); +if (lean_is_scalar(x_55)) { + x_67 = lean_alloc_ctor(1, 2, 0); +} else { + x_67 = x_55; +} +lean_ctor_set(x_67, 0, x_66); +lean_ctor_set(x_67, 1, x_54); +x_68 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_68, 0, x_49); +lean_ctor_set(x_68, 1, x_50); +lean_ctor_set(x_68, 2, x_51); +lean_ctor_set(x_68, 3, x_52); +lean_ctor_set(x_68, 4, x_53); +lean_ctor_set(x_68, 5, x_67); +x_69 = lean_box(0); +lean_ctor_set(x_1, 1, x_68); +lean_ctor_set(x_1, 0, x_69); +return x_1; +} +} +} +else +{ +lean_object* x_70; lean_object* x_71; +x_70 = lean_ctor_get(x_1, 1); +lean_inc(x_70); +lean_dec(x_1); +x_71 = lean_ctor_get(x_70, 5); +lean_inc(x_71); +if (lean_obj_tag(x_71) == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_72 = lean_ctor_get(x_70, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_70, 1); +lean_inc(x_73); +x_74 = lean_ctor_get(x_70, 2); +lean_inc(x_74); +x_75 = lean_ctor_get(x_70, 3); +lean_inc(x_75); +x_76 = lean_ctor_get(x_70, 4); +lean_inc(x_76); +if (lean_is_exclusive(x_70)) { + lean_ctor_release(x_70, 0); + lean_ctor_release(x_70, 1); + lean_ctor_release(x_70, 2); + lean_ctor_release(x_70, 3); + lean_ctor_release(x_70, 4); + lean_ctor_release(x_70, 5); + x_77 = x_70; +} else { + lean_dec_ref(x_70); + x_77 = lean_box(0); +} +if (lean_is_scalar(x_77)) { + x_78 = lean_alloc_ctor(0, 6, 0); +} else { + x_78 = x_77; +} +lean_ctor_set(x_78, 0, x_72); +lean_ctor_set(x_78, 1, x_73); +lean_ctor_set(x_78, 2, x_74); +lean_ctor_set(x_78, 3, x_75); +lean_ctor_set(x_78, 4, x_76); +lean_ctor_set(x_78, 5, x_71); +x_79 = lean_box(0); +x_80 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_80, 0, x_79); +lean_ctor_set(x_80, 1, x_78); +return x_80; +} +else +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; uint8_t x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_81 = lean_ctor_get(x_71, 0); +lean_inc(x_81); +x_82 = lean_ctor_get(x_70, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_70, 1); +lean_inc(x_83); +x_84 = lean_ctor_get(x_70, 2); +lean_inc(x_84); +x_85 = lean_ctor_get(x_70, 3); +lean_inc(x_85); +x_86 = lean_ctor_get(x_70, 4); +lean_inc(x_86); +if (lean_is_exclusive(x_70)) { + lean_ctor_release(x_70, 0); + lean_ctor_release(x_70, 1); + lean_ctor_release(x_70, 2); + lean_ctor_release(x_70, 3); + lean_ctor_release(x_70, 4); + lean_ctor_release(x_70, 5); + x_87 = x_70; +} else { + lean_dec_ref(x_70); + x_87 = lean_box(0); +} +x_88 = lean_ctor_get(x_71, 1); +lean_inc(x_88); +if (lean_is_exclusive(x_71)) { + lean_ctor_release(x_71, 0); + lean_ctor_release(x_71, 1); + x_89 = x_71; +} else { + lean_dec_ref(x_71); + x_89 = lean_box(0); +} +x_90 = lean_ctor_get(x_81, 0); +lean_inc(x_90); +x_91 = lean_ctor_get(x_81, 1); +lean_inc(x_91); +x_92 = lean_ctor_get(x_81, 2); +lean_inc(x_92); +x_93 = lean_ctor_get(x_81, 3); +lean_inc(x_93); +x_94 = lean_ctor_get(x_81, 4); +lean_inc(x_94); +x_95 = lean_ctor_get(x_81, 5); +lean_inc(x_95); +x_96 = lean_ctor_get(x_81, 6); +lean_inc(x_96); +x_97 = lean_ctor_get(x_81, 7); +lean_inc(x_97); +if (lean_is_exclusive(x_81)) { + lean_ctor_release(x_81, 0); + lean_ctor_release(x_81, 1); + lean_ctor_release(x_81, 2); + lean_ctor_release(x_81, 3); + lean_ctor_release(x_81, 4); + lean_ctor_release(x_81, 5); + lean_ctor_release(x_81, 6); + lean_ctor_release(x_81, 7); + x_98 = x_81; +} else { + lean_dec_ref(x_81); + x_98 = lean_box(0); +} +x_99 = 1; +if (lean_is_scalar(x_98)) { + x_100 = lean_alloc_ctor(0, 8, 1); +} else { + x_100 = x_98; +} +lean_ctor_set(x_100, 0, x_90); +lean_ctor_set(x_100, 1, x_91); +lean_ctor_set(x_100, 2, x_92); +lean_ctor_set(x_100, 3, x_93); +lean_ctor_set(x_100, 4, x_94); +lean_ctor_set(x_100, 5, x_95); +lean_ctor_set(x_100, 6, x_96); +lean_ctor_set(x_100, 7, x_97); +lean_ctor_set_uint8(x_100, sizeof(void*)*8, x_99); +if (lean_is_scalar(x_89)) { + x_101 = lean_alloc_ctor(1, 2, 0); +} else { + x_101 = x_89; +} +lean_ctor_set(x_101, 0, x_100); +lean_ctor_set(x_101, 1, x_88); +if (lean_is_scalar(x_87)) { + x_102 = lean_alloc_ctor(0, 6, 0); +} else { + x_102 = x_87; +} +lean_ctor_set(x_102, 0, x_82); +lean_ctor_set(x_102, 1, x_83); +lean_ctor_set(x_102, 2, x_84); +lean_ctor_set(x_102, 3, x_85); +lean_ctor_set(x_102, 4, x_86); +lean_ctor_set(x_102, 5, x_101); +x_103 = lean_box(0); +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* l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1___rarg), 1, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_withInPattern___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = lean_ctor_get(x_3, 1); +x_6 = lean_ctor_get(x_3, 0); +lean_dec(x_6); +x_7 = !lean_is_exclusive(x_5); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_ctor_get(x_5, 5); +x_9 = l_List_head___at_Lean_Elab_getScope___spec__1(x_8); +x_10 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +lean_ctor_set(x_5, 5, x_10); +x_11 = lean_box(0); +lean_ctor_set(x_3, 0, x_11); +x_12 = l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1___rarg(x_3); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +lean_ctor_set(x_12, 0, x_11); +x_15 = lean_apply_2(x_1, x_2, x_12); +if (lean_obj_tag(x_15) == 0) +{ +uint8_t x_16; +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) +{ +lean_object* x_17; uint8_t x_18; +x_17 = lean_ctor_get(x_15, 1); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; +x_19 = lean_ctor_get(x_17, 5); +x_20 = l_List_tail___rarg(x_19); +lean_dec(x_19); +lean_ctor_set(x_17, 5, x_20); +return x_15; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_21 = lean_ctor_get(x_17, 0); +x_22 = lean_ctor_get(x_17, 1); +x_23 = lean_ctor_get(x_17, 2); +x_24 = lean_ctor_get(x_17, 3); +x_25 = lean_ctor_get(x_17, 4); +x_26 = lean_ctor_get(x_17, 5); +lean_inc(x_26); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_inc(x_22); +lean_inc(x_21); +lean_dec(x_17); +x_27 = l_List_tail___rarg(x_26); +lean_dec(x_26); +x_28 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_28, 0, x_21); +lean_ctor_set(x_28, 1, x_22); +lean_ctor_set(x_28, 2, x_23); +lean_ctor_set(x_28, 3, x_24); +lean_ctor_set(x_28, 4, x_25); +lean_ctor_set(x_28, 5, x_27); +lean_ctor_set(x_15, 1, x_28); +return x_15; +} +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_29 = lean_ctor_get(x_15, 1); +x_30 = lean_ctor_get(x_15, 0); +lean_inc(x_29); +lean_inc(x_30); +lean_dec(x_15); +x_31 = lean_ctor_get(x_29, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_29, 1); +lean_inc(x_32); +x_33 = lean_ctor_get(x_29, 2); +lean_inc(x_33); +x_34 = lean_ctor_get(x_29, 3); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 4); +lean_inc(x_35); +x_36 = lean_ctor_get(x_29, 5); +lean_inc(x_36); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + lean_ctor_release(x_29, 2); + lean_ctor_release(x_29, 3); + lean_ctor_release(x_29, 4); + lean_ctor_release(x_29, 5); + x_37 = x_29; +} else { + lean_dec_ref(x_29); + x_37 = lean_box(0); +} +x_38 = l_List_tail___rarg(x_36); +lean_dec(x_36); +if (lean_is_scalar(x_37)) { + x_39 = lean_alloc_ctor(0, 6, 0); +} else { + x_39 = x_37; +} +lean_ctor_set(x_39, 0, x_31); +lean_ctor_set(x_39, 1, x_32); +lean_ctor_set(x_39, 2, x_33); +lean_ctor_set(x_39, 3, x_34); +lean_ctor_set(x_39, 4, x_35); +lean_ctor_set(x_39, 5, x_38); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_30); +lean_ctor_set(x_40, 1, x_39); +return x_40; +} +} +else +{ +uint8_t x_41; +x_41 = !lean_is_exclusive(x_15); +if (x_41 == 0) +{ +return x_15; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_15, 0); +x_43 = lean_ctor_get(x_15, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_15); +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +return x_44; +} +} +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_12, 1); +lean_inc(x_45); +lean_dec(x_12); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_11); +lean_ctor_set(x_46, 1, x_45); +x_47 = lean_apply_2(x_1, x_2, x_46); +if (lean_obj_tag(x_47) == 0) +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_48 = lean_ctor_get(x_47, 1); +lean_inc(x_48); +x_49 = lean_ctor_get(x_47, 0); +lean_inc(x_49); +if (lean_is_exclusive(x_47)) { + lean_ctor_release(x_47, 0); + lean_ctor_release(x_47, 1); + x_50 = x_47; +} else { + lean_dec_ref(x_47); + x_50 = lean_box(0); +} +x_51 = lean_ctor_get(x_48, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_48, 1); +lean_inc(x_52); +x_53 = lean_ctor_get(x_48, 2); +lean_inc(x_53); +x_54 = lean_ctor_get(x_48, 3); +lean_inc(x_54); +x_55 = lean_ctor_get(x_48, 4); +lean_inc(x_55); +x_56 = lean_ctor_get(x_48, 5); +lean_inc(x_56); +if (lean_is_exclusive(x_48)) { + lean_ctor_release(x_48, 0); + lean_ctor_release(x_48, 1); + lean_ctor_release(x_48, 2); + lean_ctor_release(x_48, 3); + lean_ctor_release(x_48, 4); + lean_ctor_release(x_48, 5); + x_57 = x_48; +} else { + lean_dec_ref(x_48); + x_57 = lean_box(0); +} +x_58 = l_List_tail___rarg(x_56); +lean_dec(x_56); +if (lean_is_scalar(x_57)) { + x_59 = lean_alloc_ctor(0, 6, 0); +} else { + x_59 = x_57; +} +lean_ctor_set(x_59, 0, x_51); +lean_ctor_set(x_59, 1, x_52); +lean_ctor_set(x_59, 2, x_53); +lean_ctor_set(x_59, 3, x_54); +lean_ctor_set(x_59, 4, x_55); +lean_ctor_set(x_59, 5, x_58); +if (lean_is_scalar(x_50)) { + x_60 = lean_alloc_ctor(0, 2, 0); +} else { + x_60 = x_50; +} +lean_ctor_set(x_60, 0, x_49); +lean_ctor_set(x_60, 1, x_59); +return x_60; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_61 = lean_ctor_get(x_47, 0); +lean_inc(x_61); +x_62 = lean_ctor_get(x_47, 1); +lean_inc(x_62); +if (lean_is_exclusive(x_47)) { + lean_ctor_release(x_47, 0); + lean_ctor_release(x_47, 1); + x_63 = x_47; +} else { + lean_dec_ref(x_47); + x_63 = lean_box(0); +} +if (lean_is_scalar(x_63)) { + x_64 = lean_alloc_ctor(1, 2, 0); +} else { + x_64 = x_63; +} +lean_ctor_set(x_64, 0, x_61); +lean_ctor_set(x_64, 1, x_62); +return x_64; +} +} +} +else +{ +uint8_t x_65; +lean_dec(x_2); +lean_dec(x_1); +x_65 = !lean_is_exclusive(x_12); +if (x_65 == 0) +{ +return x_12; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_12, 0); +x_67 = lean_ctor_get(x_12, 1); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_12); +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_66); +lean_ctor_set(x_68, 1, x_67); +return x_68; +} +} +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_69 = lean_ctor_get(x_5, 0); +x_70 = lean_ctor_get(x_5, 1); +x_71 = lean_ctor_get(x_5, 2); +x_72 = lean_ctor_get(x_5, 3); +x_73 = lean_ctor_get(x_5, 4); +x_74 = lean_ctor_get(x_5, 5); +lean_inc(x_74); +lean_inc(x_73); +lean_inc(x_72); +lean_inc(x_71); +lean_inc(x_70); +lean_inc(x_69); +lean_dec(x_5); +x_75 = l_List_head___at_Lean_Elab_getScope___spec__1(x_74); +x_76 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_74); +x_77 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_77, 0, x_69); +lean_ctor_set(x_77, 1, x_70); +lean_ctor_set(x_77, 2, x_71); +lean_ctor_set(x_77, 3, x_72); +lean_ctor_set(x_77, 4, x_73); +lean_ctor_set(x_77, 5, x_76); +x_78 = lean_box(0); +lean_ctor_set(x_3, 1, x_77); +lean_ctor_set(x_3, 0, x_78); +x_79 = l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1___rarg(x_3); +if (lean_obj_tag(x_79) == 0) +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_80 = lean_ctor_get(x_79, 1); +lean_inc(x_80); +if (lean_is_exclusive(x_79)) { + lean_ctor_release(x_79, 0); + lean_ctor_release(x_79, 1); + x_81 = x_79; +} else { + lean_dec_ref(x_79); + x_81 = lean_box(0); +} +if (lean_is_scalar(x_81)) { + x_82 = lean_alloc_ctor(0, 2, 0); +} else { + x_82 = x_81; +} +lean_ctor_set(x_82, 0, x_78); +lean_ctor_set(x_82, 1, x_80); +x_83 = lean_apply_2(x_1, x_2, x_82); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +x_85 = lean_ctor_get(x_83, 0); +lean_inc(x_85); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_86 = x_83; +} else { + lean_dec_ref(x_83); + x_86 = lean_box(0); +} +x_87 = lean_ctor_get(x_84, 0); +lean_inc(x_87); +x_88 = lean_ctor_get(x_84, 1); +lean_inc(x_88); +x_89 = lean_ctor_get(x_84, 2); +lean_inc(x_89); +x_90 = lean_ctor_get(x_84, 3); +lean_inc(x_90); +x_91 = lean_ctor_get(x_84, 4); +lean_inc(x_91); +x_92 = lean_ctor_get(x_84, 5); +lean_inc(x_92); +if (lean_is_exclusive(x_84)) { + lean_ctor_release(x_84, 0); + lean_ctor_release(x_84, 1); + lean_ctor_release(x_84, 2); + lean_ctor_release(x_84, 3); + lean_ctor_release(x_84, 4); + lean_ctor_release(x_84, 5); + x_93 = x_84; +} else { + lean_dec_ref(x_84); + x_93 = lean_box(0); +} +x_94 = l_List_tail___rarg(x_92); +lean_dec(x_92); +if (lean_is_scalar(x_93)) { + x_95 = lean_alloc_ctor(0, 6, 0); +} else { + x_95 = x_93; +} +lean_ctor_set(x_95, 0, x_87); +lean_ctor_set(x_95, 1, x_88); +lean_ctor_set(x_95, 2, x_89); +lean_ctor_set(x_95, 3, x_90); +lean_ctor_set(x_95, 4, x_91); +lean_ctor_set(x_95, 5, x_94); +if (lean_is_scalar(x_86)) { + x_96 = lean_alloc_ctor(0, 2, 0); +} else { + x_96 = x_86; +} +lean_ctor_set(x_96, 0, x_85); +lean_ctor_set(x_96, 1, x_95); +return x_96; +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_97 = lean_ctor_get(x_83, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_83, 1); +lean_inc(x_98); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_99 = x_83; +} else { + lean_dec_ref(x_83); + x_99 = lean_box(0); +} +if (lean_is_scalar(x_99)) { + x_100 = lean_alloc_ctor(1, 2, 0); +} else { + x_100 = x_99; +} +lean_ctor_set(x_100, 0, x_97); +lean_ctor_set(x_100, 1, x_98); +return x_100; +} +} +else +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; +lean_dec(x_2); +lean_dec(x_1); +x_101 = lean_ctor_get(x_79, 0); +lean_inc(x_101); +x_102 = lean_ctor_get(x_79, 1); +lean_inc(x_102); +if (lean_is_exclusive(x_79)) { + lean_ctor_release(x_79, 0); + lean_ctor_release(x_79, 1); + x_103 = x_79; +} else { + lean_dec_ref(x_79); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(1, 2, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_101); +lean_ctor_set(x_104, 1, x_102); +return x_104; +} +} +} +else +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; +x_105 = lean_ctor_get(x_3, 1); +lean_inc(x_105); +lean_dec(x_3); +x_106 = lean_ctor_get(x_105, 0); +lean_inc(x_106); +x_107 = lean_ctor_get(x_105, 1); +lean_inc(x_107); +x_108 = lean_ctor_get(x_105, 2); +lean_inc(x_108); +x_109 = lean_ctor_get(x_105, 3); +lean_inc(x_109); +x_110 = lean_ctor_get(x_105, 4); +lean_inc(x_110); +x_111 = lean_ctor_get(x_105, 5); +lean_inc(x_111); +if (lean_is_exclusive(x_105)) { + lean_ctor_release(x_105, 0); + lean_ctor_release(x_105, 1); + lean_ctor_release(x_105, 2); + lean_ctor_release(x_105, 3); + lean_ctor_release(x_105, 4); + lean_ctor_release(x_105, 5); + x_112 = x_105; +} else { + lean_dec_ref(x_105); + x_112 = lean_box(0); +} +x_113 = l_List_head___at_Lean_Elab_getScope___spec__1(x_111); +x_114 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_114, 0, x_113); +lean_ctor_set(x_114, 1, x_111); +if (lean_is_scalar(x_112)) { + x_115 = lean_alloc_ctor(0, 6, 0); +} else { + x_115 = x_112; +} +lean_ctor_set(x_115, 0, x_106); +lean_ctor_set(x_115, 1, x_107); +lean_ctor_set(x_115, 2, x_108); +lean_ctor_set(x_115, 3, x_109); +lean_ctor_set(x_115, 4, x_110); +lean_ctor_set(x_115, 5, x_114); +x_116 = lean_box(0); +x_117 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_117, 0, x_116); +lean_ctor_set(x_117, 1, x_115); +x_118 = l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1___rarg(x_117); +if (lean_obj_tag(x_118) == 0) +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; +x_119 = lean_ctor_get(x_118, 1); +lean_inc(x_119); +if (lean_is_exclusive(x_118)) { + lean_ctor_release(x_118, 0); + lean_ctor_release(x_118, 1); + x_120 = x_118; +} else { + lean_dec_ref(x_118); + x_120 = lean_box(0); +} +if (lean_is_scalar(x_120)) { + x_121 = lean_alloc_ctor(0, 2, 0); +} else { + x_121 = x_120; +} +lean_ctor_set(x_121, 0, x_116); +lean_ctor_set(x_121, 1, x_119); +x_122 = lean_apply_2(x_1, x_2, x_121); +if (lean_obj_tag(x_122) == 0) +{ +lean_object* x_123; lean_object* x_124; lean_object* 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; +x_123 = lean_ctor_get(x_122, 1); +lean_inc(x_123); +x_124 = lean_ctor_get(x_122, 0); +lean_inc(x_124); +if (lean_is_exclusive(x_122)) { + lean_ctor_release(x_122, 0); + lean_ctor_release(x_122, 1); + x_125 = x_122; +} else { + lean_dec_ref(x_122); + x_125 = lean_box(0); +} +x_126 = lean_ctor_get(x_123, 0); +lean_inc(x_126); +x_127 = lean_ctor_get(x_123, 1); +lean_inc(x_127); +x_128 = lean_ctor_get(x_123, 2); +lean_inc(x_128); +x_129 = lean_ctor_get(x_123, 3); +lean_inc(x_129); +x_130 = lean_ctor_get(x_123, 4); +lean_inc(x_130); +x_131 = lean_ctor_get(x_123, 5); +lean_inc(x_131); +if (lean_is_exclusive(x_123)) { + lean_ctor_release(x_123, 0); + lean_ctor_release(x_123, 1); + lean_ctor_release(x_123, 2); + lean_ctor_release(x_123, 3); + lean_ctor_release(x_123, 4); + lean_ctor_release(x_123, 5); + x_132 = x_123; +} else { + lean_dec_ref(x_123); + x_132 = lean_box(0); +} +x_133 = l_List_tail___rarg(x_131); +lean_dec(x_131); +if (lean_is_scalar(x_132)) { + x_134 = lean_alloc_ctor(0, 6, 0); +} else { + x_134 = x_132; +} +lean_ctor_set(x_134, 0, x_126); +lean_ctor_set(x_134, 1, x_127); +lean_ctor_set(x_134, 2, x_128); +lean_ctor_set(x_134, 3, x_129); +lean_ctor_set(x_134, 4, x_130); +lean_ctor_set(x_134, 5, x_133); +if (lean_is_scalar(x_125)) { + x_135 = lean_alloc_ctor(0, 2, 0); +} else { + x_135 = x_125; +} +lean_ctor_set(x_135, 0, x_124); +lean_ctor_set(x_135, 1, x_134); +return x_135; +} +else +{ +lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; +x_136 = lean_ctor_get(x_122, 0); +lean_inc(x_136); +x_137 = lean_ctor_get(x_122, 1); +lean_inc(x_137); +if (lean_is_exclusive(x_122)) { + lean_ctor_release(x_122, 0); + lean_ctor_release(x_122, 1); + x_138 = x_122; +} else { + lean_dec_ref(x_122); + x_138 = lean_box(0); +} +if (lean_is_scalar(x_138)) { + x_139 = lean_alloc_ctor(1, 2, 0); +} else { + x_139 = x_138; +} +lean_ctor_set(x_139, 0, x_136); +lean_ctor_set(x_139, 1, x_137); +return x_139; +} +} +else +{ +lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; +lean_dec(x_2); +lean_dec(x_1); +x_140 = lean_ctor_get(x_118, 0); +lean_inc(x_140); +x_141 = lean_ctor_get(x_118, 1); +lean_inc(x_141); +if (lean_is_exclusive(x_118)) { + lean_ctor_release(x_118, 0); + lean_ctor_release(x_118, 1); + x_142 = x_118; +} else { + lean_dec_ref(x_118); + x_142 = lean_box(0); +} +if (lean_is_scalar(x_142)) { + x_143 = lean_alloc_ctor(1, 2, 0); +} else { + x_143 = x_142; +} +lean_ctor_set(x_143, 0, x_140); +lean_ctor_set(x_143, 1, x_141); +return x_143; +} +} +} +} +lean_object* l_Lean_Elab_withInPattern(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_withInPattern___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_modifyScope___at_Lean_Elab_withInPattern___spec__1(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_inPattern___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_getScope___rarg(x_1); +if (lean_obj_tag(x_2) == 0) +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_2); +if (x_3 == 0) +{ +lean_object* x_4; uint8_t x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); +lean_dec(x_4); +x_6 = lean_box(x_5); +lean_ctor_set(x_2, 0, x_6); +return x_2; +} +else +{ +lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; +x_7 = lean_ctor_get(x_2, 0); +x_8 = lean_ctor_get(x_2, 1); +lean_inc(x_8); +lean_inc(x_7); +lean_dec(x_2); +x_9 = lean_ctor_get_uint8(x_7, sizeof(void*)*8); +lean_dec(x_7); +x_10 = lean_box(x_9); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_8); +return x_11; +} +} +else +{ +uint8_t x_12; +x_12 = !lean_is_exclusive(x_2); +if (x_12 == 0) +{ +return x_2; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_2, 0); +x_14 = lean_ctor_get(x_2, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_2); +x_15 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_15, 0, x_13); +lean_ctor_set(x_15, 1, x_14); +return x_15; +} +} +} +} +lean_object* l_Lean_Elab_inPattern(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_inPattern___rarg), 1, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_inPattern___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_inPattern(x_1); +lean_dec(x_1); +return x_2; +} +} lean_object* l_Lean_Elab_runIOUnsafe___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -19988,6 +23427,12 @@ l_Lean_Elab_testFrontend___closed__3 = _init_l_Lean_Elab_testFrontend___closed__ lean_mark_persistent(l_Lean_Elab_testFrontend___closed__3); l_Lean_Elab_testFrontend___closed__4 = _init_l_Lean_Elab_testFrontend___closed__4(); lean_mark_persistent(l_Lean_Elab_testFrontend___closed__4); +l_Lean_Elab_anonymousInstNamePrefix___closed__1 = _init_l_Lean_Elab_anonymousInstNamePrefix___closed__1(); +lean_mark_persistent(l_Lean_Elab_anonymousInstNamePrefix___closed__1); +l_Lean_Elab_anonymousInstNamePrefix___closed__2 = _init_l_Lean_Elab_anonymousInstNamePrefix___closed__2(); +lean_mark_persistent(l_Lean_Elab_anonymousInstNamePrefix___closed__2); +l_Lean_Elab_anonymousInstNamePrefix = _init_l_Lean_Elab_anonymousInstNamePrefix(); +lean_mark_persistent(l_Lean_Elab_anonymousInstNamePrefix); l_Lean_Elab_rootNamespace___closed__1 = _init_l_Lean_Elab_rootNamespace___closed__1(); lean_mark_persistent(l_Lean_Elab_rootNamespace___closed__1); l_Lean_Elab_rootNamespace___closed__2 = _init_l_Lean_Elab_rootNamespace___closed__2(); diff --git a/src/stage0/init/lean/elaborator/command.c b/src/stage0/init/lean/elaborator/command.c index aed983649a..1afed47daa 100644 --- a/src/stage0/init/lean/elaborator/command.c +++ b/src/stage0/init/lean/elaborator/command.c @@ -31,6 +31,7 @@ lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabReserve___closed__3; lean_object* l_Lean_Elab_elabInitQuot___rarg___boxed(lean_object*, lean_object*); extern lean_object* l_Sigma_HasRepr___rarg___closed__1; +lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabUniverse___closed__1; lean_object* l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabOpenRenaming___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_runIOUnsafe___rarg(lean_object*, lean_object*, lean_object*); @@ -53,6 +54,7 @@ lean_object* lean_add_decl(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabExport___closed__3; extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; lean_object* l___regBuiltinTermElab_Lean_Elab_elabInitQuot(lean_object*); +lean_object* l_Lean_Syntax_formatStx___main___rarg(lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabMixfix(lean_object*); lean_object* l_Lean_Elab_elabExport___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabElab(lean_object*); @@ -82,6 +84,7 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_elabOpen(lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabOpen___closed__3; lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabUniverse(lean_object*); +lean_object* lean_io_prim_put_str(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabUniverse___closed__3; extern lean_object* l_Lean_Parser_Command_preterm___elambda__1___rarg___closed__2; lean_object* l_Lean_Elab_addUniverse___closed__1; @@ -134,6 +137,7 @@ uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Elab_elabElab___closed__2; lean_object* l_Lean_Elab_elabExport___closed__2; lean_object* l_Lean_Syntax_getArgs___rarg(lean_object*); +lean_object* l_IO_println___at_Lean_Elab_elabElab___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_elabEnd___closed__2; lean_object* l_Lean_Syntax_getId___rarg(lean_object*); lean_object* l_Lean_Elab_elabExport(lean_object*, lean_object*, lean_object*); @@ -144,6 +148,7 @@ lean_object* l_Lean_Elab_getUniverses___rarg(lean_object*); lean_object* l_Array_fget(lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); +extern lean_object* l_String_Iterator_HasRepr___closed__2; extern lean_object* l_Lean_Parser_Command_open___elambda__1___closed__2; lean_object* l_Lean_Elab_elabOpen___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Prod_HasRepr___rarg___closed__1; @@ -151,9 +156,8 @@ extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___rarg___closed extern lean_object* l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___rarg___closed__1; lean_object* l_Lean_Elab_elabNamespace(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_modifyScope(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_print___at_Lean_Elab_elabElab___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Elab_elabOpenSimple___boxed(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Format_flatten___main___closed__1; lean_object* l_Lean_Elab_resolveName(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_getNumParts___main(lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabNotation___closed__3; @@ -226,7 +230,6 @@ lean_object* l_Lean_Elab_elabOpenHiding___boxed(lean_object*, lean_object*, lean lean_object* l_Lean_Elab_elabPreTerm(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_elabNotation(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabPreTerm(lean_object*); -lean_object* l_Lean_Elab_modifyScope___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_elabReserve(lean_object*, lean_object*); lean_object* l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabOpenSimple___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getOptionalIdent___rarg(lean_object*); @@ -234,6 +237,7 @@ extern lean_object* l_Lean_Parser_Command_end___elambda__1___rarg___closed__2; lean_object* l___regBuiltinTermElab_Lean_Elab_elabResolveName___closed__2; lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); lean_object* l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabOpenRenaming___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_IO_println___rarg___closed__1; lean_object* l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabOpenOnly___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabMixfix___closed__3; extern lean_object* l_Lean_Parser_Command_universe___elambda__1___rarg___closed__2; @@ -269,117 +273,135 @@ x_8 = l_List_head___at_Lean_Elab_getScope___spec__1(x_7); x_9 = !lean_is_exclusive(x_8); if (x_9 == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_10 = lean_ctor_get(x_8, 3); -x_11 = lean_ctor_get(x_8, 6); +x_11 = lean_ctor_get(x_8, 7); lean_dec(x_11); -x_12 = lean_ctor_get(x_8, 5); +x_12 = lean_ctor_get(x_8, 6); lean_dec(x_12); -x_13 = lean_ctor_get(x_8, 4); +x_13 = lean_ctor_get(x_8, 5); lean_dec(x_13); -x_14 = lean_ctor_get(x_8, 2); +x_14 = lean_ctor_get(x_8, 4); lean_dec(x_14); -x_15 = lean_ctor_get(x_8, 1); +x_15 = lean_ctor_get(x_8, 2); lean_dec(x_15); -x_16 = lean_ctor_get(x_8, 0); +x_16 = lean_ctor_get(x_8, 1); lean_dec(x_16); -x_17 = lean_box(0); +x_17 = lean_ctor_get(x_8, 0); +lean_dec(x_17); +x_18 = lean_box(0); lean_inc(x_6); -x_18 = lean_name_mk_string(x_17, x_6); -x_19 = lean_box(0); +x_19 = lean_name_mk_string(x_18, x_6); +x_20 = lean_box(0); if (x_2 == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; lean_object* x_25; lean_dec(x_6); -x_20 = l_Lean_Options_empty; -x_21 = l_Lean_LocalContext_Inhabited___closed__1; -lean_ctor_set(x_8, 6, x_21); -lean_ctor_set(x_8, 5, x_19); -lean_ctor_set(x_8, 4, x_19); -lean_ctor_set(x_8, 2, x_20); -lean_ctor_set(x_8, 1, x_18); +x_21 = l_Lean_Options_empty; +x_22 = l_Lean_LocalContext_Inhabited___closed__1; +x_23 = lean_unsigned_to_nat(1u); +x_24 = 0; +lean_ctor_set(x_8, 7, x_23); +lean_ctor_set(x_8, 6, x_22); +lean_ctor_set(x_8, 5, x_20); +lean_ctor_set(x_8, 4, x_20); +lean_ctor_set(x_8, 2, x_21); +lean_ctor_set(x_8, 1, x_19); lean_ctor_set(x_8, 0, x_1); -x_22 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_22, 0, x_8); -lean_ctor_set(x_22, 1, x_7); -return x_22; +lean_ctor_set_uint8(x_8, sizeof(void*)*8, x_24); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_8); +lean_ctor_set(x_25, 1, x_7); +return x_25; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_23 = lean_name_mk_string(x_10, x_6); -x_24 = l_Lean_Options_empty; -x_25 = l_Lean_LocalContext_Inhabited___closed__1; -lean_ctor_set(x_8, 6, x_25); -lean_ctor_set(x_8, 5, x_19); -lean_ctor_set(x_8, 4, x_19); -lean_ctor_set(x_8, 3, x_23); -lean_ctor_set(x_8, 2, x_24); -lean_ctor_set(x_8, 1, x_18); +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; +x_26 = lean_name_mk_string(x_10, x_6); +x_27 = l_Lean_Options_empty; +x_28 = l_Lean_LocalContext_Inhabited___closed__1; +x_29 = lean_unsigned_to_nat(1u); +x_30 = 0; +lean_ctor_set(x_8, 7, x_29); +lean_ctor_set(x_8, 6, x_28); +lean_ctor_set(x_8, 5, x_20); +lean_ctor_set(x_8, 4, x_20); +lean_ctor_set(x_8, 3, x_26); +lean_ctor_set(x_8, 2, x_27); +lean_ctor_set(x_8, 1, x_19); lean_ctor_set(x_8, 0, x_1); -x_26 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_26, 0, x_8); -lean_ctor_set(x_26, 1, x_7); -return x_26; +lean_ctor_set_uint8(x_8, sizeof(void*)*8, x_30); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_8); +lean_ctor_set(x_31, 1, x_7); +return x_31; } } else { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_27 = lean_ctor_get(x_8, 3); -lean_inc(x_27); +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_32 = lean_ctor_get(x_8, 3); +lean_inc(x_32); lean_dec(x_8); -x_28 = lean_box(0); +x_33 = lean_box(0); lean_inc(x_6); -x_29 = lean_name_mk_string(x_28, x_6); -x_30 = lean_box(0); +x_34 = lean_name_mk_string(x_33, x_6); +x_35 = lean_box(0); if (x_2 == 0) { -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; lean_object* x_40; lean_object* x_41; lean_dec(x_6); -x_31 = l_Lean_Options_empty; -x_32 = l_Lean_LocalContext_Inhabited___closed__1; -x_33 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_33, 0, x_1); -lean_ctor_set(x_33, 1, x_29); -lean_ctor_set(x_33, 2, x_31); -lean_ctor_set(x_33, 3, x_27); -lean_ctor_set(x_33, 4, x_30); -lean_ctor_set(x_33, 5, x_30); -lean_ctor_set(x_33, 6, x_32); -x_34 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_7); -return x_34; -} -else -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_35 = lean_name_mk_string(x_27, x_6); x_36 = l_Lean_Options_empty; x_37 = l_Lean_LocalContext_Inhabited___closed__1; -x_38 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_38, 0, x_1); -lean_ctor_set(x_38, 1, x_29); -lean_ctor_set(x_38, 2, x_36); -lean_ctor_set(x_38, 3, x_35); -lean_ctor_set(x_38, 4, x_30); -lean_ctor_set(x_38, 5, x_30); -lean_ctor_set(x_38, 6, x_37); -x_39 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_7); -return x_39; +x_38 = lean_unsigned_to_nat(1u); +x_39 = 0; +x_40 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_40, 0, x_1); +lean_ctor_set(x_40, 1, x_34); +lean_ctor_set(x_40, 2, x_36); +lean_ctor_set(x_40, 3, x_32); +lean_ctor_set(x_40, 4, x_35); +lean_ctor_set(x_40, 5, x_35); +lean_ctor_set(x_40, 6, x_37); +lean_ctor_set(x_40, 7, x_38); +lean_ctor_set_uint8(x_40, sizeof(void*)*8, x_39); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_41, 1, x_7); +return x_41; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; lean_object* x_47; lean_object* x_48; +x_42 = lean_name_mk_string(x_32, x_6); +x_43 = l_Lean_Options_empty; +x_44 = l_Lean_LocalContext_Inhabited___closed__1; +x_45 = lean_unsigned_to_nat(1u); +x_46 = 0; +x_47 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_47, 0, x_1); +lean_ctor_set(x_47, 1, x_34); +lean_ctor_set(x_47, 2, x_43); +lean_ctor_set(x_47, 3, x_42); +lean_ctor_set(x_47, 4, x_35); +lean_ctor_set(x_47, 5, x_35); +lean_ctor_set(x_47, 6, x_44); +lean_ctor_set(x_47, 7, x_45); +lean_ctor_set_uint8(x_47, sizeof(void*)*8, x_46); +x_48 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_7); +return x_48; } } } default: { -lean_object* x_40; +lean_object* x_49; lean_dec(x_3); lean_dec(x_1); -x_40 = lean_box(0); -return x_40; +x_49 = lean_box(0); +return x_49; } } } @@ -899,276 +921,285 @@ uint8_t x_13; x_13 = !lean_is_exclusive(x_8); if (x_13 == 0) { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_14 = lean_ctor_get(x_8, 5); x_15 = lean_box(0); x_16 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; x_17 = lean_box(0); x_18 = l_Lean_Options_empty; x_19 = l_Lean_LocalContext_Inhabited___closed__1; -x_20 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_20, 0, x_16); -lean_ctor_set(x_20, 1, x_17); -lean_ctor_set(x_20, 2, x_18); -lean_ctor_set(x_20, 3, x_7); -lean_ctor_set(x_20, 4, x_15); -lean_ctor_set(x_20, 5, x_15); -lean_ctor_set(x_20, 6, x_19); -x_21 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_21, 0, x_20); -lean_ctor_set(x_21, 1, x_14); -lean_ctor_set(x_8, 5, x_21); -x_22 = lean_box(0); -lean_ctor_set(x_5, 0, x_22); +x_20 = 0; +x_21 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_21, 0, x_16); +lean_ctor_set(x_21, 1, x_17); +lean_ctor_set(x_21, 2, x_18); +lean_ctor_set(x_21, 3, x_7); +lean_ctor_set(x_21, 4, x_15); +lean_ctor_set(x_21, 5, x_15); +lean_ctor_set(x_21, 6, x_19); +lean_ctor_set(x_21, 7, x_10); +lean_ctor_set_uint8(x_21, sizeof(void*)*8, x_20); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_14); +lean_ctor_set(x_8, 5, x_22); +x_23 = lean_box(0); +lean_ctor_set(x_5, 0, x_23); return x_5; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_23 = lean_ctor_get(x_8, 0); -x_24 = lean_ctor_get(x_8, 1); -x_25 = lean_ctor_get(x_8, 2); -x_26 = lean_ctor_get(x_8, 3); -x_27 = lean_ctor_get(x_8, 4); -x_28 = lean_ctor_get(x_8, 5); +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_24 = lean_ctor_get(x_8, 0); +x_25 = lean_ctor_get(x_8, 1); +x_26 = lean_ctor_get(x_8, 2); +x_27 = lean_ctor_get(x_8, 3); +x_28 = lean_ctor_get(x_8, 4); +x_29 = lean_ctor_get(x_8, 5); +lean_inc(x_29); lean_inc(x_28); lean_inc(x_27); lean_inc(x_26); lean_inc(x_25); lean_inc(x_24); -lean_inc(x_23); lean_dec(x_8); -x_29 = lean_box(0); -x_30 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; -x_31 = lean_box(0); -x_32 = l_Lean_Options_empty; -x_33 = l_Lean_LocalContext_Inhabited___closed__1; -x_34 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_34, 0, x_30); -lean_ctor_set(x_34, 1, x_31); -lean_ctor_set(x_34, 2, x_32); -lean_ctor_set(x_34, 3, x_7); -lean_ctor_set(x_34, 4, x_29); -lean_ctor_set(x_34, 5, x_29); -lean_ctor_set(x_34, 6, x_33); -x_35 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_35, 0, x_34); -lean_ctor_set(x_35, 1, x_28); -x_36 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_36, 0, x_23); -lean_ctor_set(x_36, 1, x_24); -lean_ctor_set(x_36, 2, x_25); -lean_ctor_set(x_36, 3, x_26); -lean_ctor_set(x_36, 4, x_27); -lean_ctor_set(x_36, 5, x_35); -x_37 = lean_box(0); -lean_ctor_set(x_5, 1, x_36); -lean_ctor_set(x_5, 0, x_37); +x_30 = lean_box(0); +x_31 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; +x_32 = lean_box(0); +x_33 = l_Lean_Options_empty; +x_34 = l_Lean_LocalContext_Inhabited___closed__1; +x_35 = 0; +x_36 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_36, 0, x_31); +lean_ctor_set(x_36, 1, x_32); +lean_ctor_set(x_36, 2, x_33); +lean_ctor_set(x_36, 3, x_7); +lean_ctor_set(x_36, 4, x_30); +lean_ctor_set(x_36, 5, x_30); +lean_ctor_set(x_36, 6, x_34); +lean_ctor_set(x_36, 7, x_10); +lean_ctor_set_uint8(x_36, sizeof(void*)*8, x_35); +x_37 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_29); +x_38 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_38, 0, x_24); +lean_ctor_set(x_38, 1, x_25); +lean_ctor_set(x_38, 2, x_26); +lean_ctor_set(x_38, 3, x_27); +lean_ctor_set(x_38, 4, x_28); +lean_ctor_set(x_38, 5, x_37); +x_39 = lean_box(0); +lean_ctor_set(x_5, 1, x_38); +lean_ctor_set(x_5, 0, x_39); return x_5; } } else { -lean_object* x_38; uint8_t x_39; +lean_object* x_40; uint8_t x_41; lean_dec(x_7); -x_38 = lean_ctor_get(x_12, 0); -lean_inc(x_38); +x_40 = lean_ctor_get(x_12, 0); +lean_inc(x_40); lean_dec(x_12); -x_39 = !lean_is_exclusive(x_8); -if (x_39 == 0) +x_41 = !lean_is_exclusive(x_8); +if (x_41 == 0) { -lean_object* x_40; lean_object* x_41; uint8_t x_42; lean_object* x_43; lean_object* x_44; -x_40 = lean_ctor_get(x_8, 5); -x_41 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; -x_42 = 0; -x_43 = l___private_init_lean_elaborator_command_1__addScopes___main(x_41, x_42, x_38, x_40); -lean_dec(x_40); -lean_ctor_set(x_8, 5, x_43); -x_44 = lean_box(0); -lean_ctor_set(x_5, 0, x_44); +lean_object* x_42; lean_object* x_43; uint8_t x_44; lean_object* x_45; lean_object* x_46; +x_42 = lean_ctor_get(x_8, 5); +x_43 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; +x_44 = 0; +x_45 = l___private_init_lean_elaborator_command_1__addScopes___main(x_43, x_44, x_40, x_42); +lean_dec(x_42); +lean_ctor_set(x_8, 5, x_45); +x_46 = lean_box(0); +lean_ctor_set(x_5, 0, x_46); return x_5; } else { -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; uint8_t x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_45 = lean_ctor_get(x_8, 0); -x_46 = lean_ctor_get(x_8, 1); -x_47 = lean_ctor_get(x_8, 2); -x_48 = lean_ctor_get(x_8, 3); -x_49 = lean_ctor_get(x_8, 4); -x_50 = lean_ctor_get(x_8, 5); +lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; uint8_t x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_47 = lean_ctor_get(x_8, 0); +x_48 = lean_ctor_get(x_8, 1); +x_49 = lean_ctor_get(x_8, 2); +x_50 = lean_ctor_get(x_8, 3); +x_51 = lean_ctor_get(x_8, 4); +x_52 = lean_ctor_get(x_8, 5); +lean_inc(x_52); +lean_inc(x_51); lean_inc(x_50); lean_inc(x_49); lean_inc(x_48); lean_inc(x_47); -lean_inc(x_46); -lean_inc(x_45); lean_dec(x_8); -x_51 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; -x_52 = 0; -x_53 = l___private_init_lean_elaborator_command_1__addScopes___main(x_51, x_52, x_38, x_50); -lean_dec(x_50); -x_54 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_54, 0, x_45); -lean_ctor_set(x_54, 1, x_46); -lean_ctor_set(x_54, 2, x_47); -lean_ctor_set(x_54, 3, x_48); -lean_ctor_set(x_54, 4, x_49); -lean_ctor_set(x_54, 5, x_53); -x_55 = lean_box(0); -lean_ctor_set(x_5, 1, x_54); -lean_ctor_set(x_5, 0, x_55); +x_53 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; +x_54 = 0; +x_55 = l___private_init_lean_elaborator_command_1__addScopes___main(x_53, x_54, x_40, x_52); +lean_dec(x_52); +x_56 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_56, 0, x_47); +lean_ctor_set(x_56, 1, x_48); +lean_ctor_set(x_56, 2, x_49); +lean_ctor_set(x_56, 3, x_50); +lean_ctor_set(x_56, 4, x_51); +lean_ctor_set(x_56, 5, x_55); +x_57 = lean_box(0); +lean_ctor_set(x_5, 1, x_56); +lean_ctor_set(x_5, 0, x_57); return x_5; } } } else { -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_56 = lean_ctor_get(x_5, 0); -x_57 = lean_ctor_get(x_5, 1); -lean_inc(x_57); -lean_inc(x_56); +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_58 = lean_ctor_get(x_5, 0); +x_59 = lean_ctor_get(x_5, 1); +lean_inc(x_59); +lean_inc(x_58); lean_dec(x_5); -x_58 = lean_box(0); -x_59 = lean_unsigned_to_nat(1u); -x_60 = lean_array_get(x_58, x_4, x_59); -x_61 = l_Lean_Syntax_getOptionalIdent___rarg(x_60); -lean_dec(x_60); -if (lean_obj_tag(x_61) == 0) +x_60 = lean_box(0); +x_61 = lean_unsigned_to_nat(1u); +x_62 = lean_array_get(x_60, x_4, x_61); +x_63 = l_Lean_Syntax_getOptionalIdent___rarg(x_62); +lean_dec(x_62); +if (lean_obj_tag(x_63) == 0) { -lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_62 = lean_ctor_get(x_57, 0); -lean_inc(x_62); -x_63 = lean_ctor_get(x_57, 1); -lean_inc(x_63); -x_64 = lean_ctor_get(x_57, 2); +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; uint8_t x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_64 = lean_ctor_get(x_59, 0); lean_inc(x_64); -x_65 = lean_ctor_get(x_57, 3); +x_65 = lean_ctor_get(x_59, 1); lean_inc(x_65); -x_66 = lean_ctor_get(x_57, 4); +x_66 = lean_ctor_get(x_59, 2); lean_inc(x_66); -x_67 = lean_ctor_get(x_57, 5); +x_67 = lean_ctor_get(x_59, 3); lean_inc(x_67); -if (lean_is_exclusive(x_57)) { - lean_ctor_release(x_57, 0); - lean_ctor_release(x_57, 1); - lean_ctor_release(x_57, 2); - lean_ctor_release(x_57, 3); - lean_ctor_release(x_57, 4); - lean_ctor_release(x_57, 5); - x_68 = x_57; +x_68 = lean_ctor_get(x_59, 4); +lean_inc(x_68); +x_69 = lean_ctor_get(x_59, 5); +lean_inc(x_69); +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + lean_ctor_release(x_59, 1); + lean_ctor_release(x_59, 2); + lean_ctor_release(x_59, 3); + lean_ctor_release(x_59, 4); + lean_ctor_release(x_59, 5); + x_70 = x_59; } else { - lean_dec_ref(x_57); - x_68 = lean_box(0); + lean_dec_ref(x_59); + x_70 = lean_box(0); } -x_69 = lean_box(0); -x_70 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; x_71 = lean_box(0); -x_72 = l_Lean_Options_empty; -x_73 = l_Lean_LocalContext_Inhabited___closed__1; -x_74 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_74, 0, x_70); -lean_ctor_set(x_74, 1, x_71); -lean_ctor_set(x_74, 2, x_72); -lean_ctor_set(x_74, 3, x_56); -lean_ctor_set(x_74, 4, x_69); -lean_ctor_set(x_74, 5, x_69); -lean_ctor_set(x_74, 6, x_73); -x_75 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_75, 0, x_74); -lean_ctor_set(x_75, 1, x_67); -if (lean_is_scalar(x_68)) { - x_76 = lean_alloc_ctor(0, 6, 0); -} else { - x_76 = x_68; -} -lean_ctor_set(x_76, 0, x_62); -lean_ctor_set(x_76, 1, x_63); -lean_ctor_set(x_76, 2, x_64); -lean_ctor_set(x_76, 3, x_65); -lean_ctor_set(x_76, 4, x_66); -lean_ctor_set(x_76, 5, x_75); -x_77 = lean_box(0); -x_78 = lean_alloc_ctor(0, 2, 0); +x_72 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; +x_73 = lean_box(0); +x_74 = l_Lean_Options_empty; +x_75 = l_Lean_LocalContext_Inhabited___closed__1; +x_76 = 0; +x_77 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_77, 0, x_72); +lean_ctor_set(x_77, 1, x_73); +lean_ctor_set(x_77, 2, x_74); +lean_ctor_set(x_77, 3, x_58); +lean_ctor_set(x_77, 4, x_71); +lean_ctor_set(x_77, 5, x_71); +lean_ctor_set(x_77, 6, x_75); +lean_ctor_set(x_77, 7, x_61); +lean_ctor_set_uint8(x_77, sizeof(void*)*8, x_76); +x_78 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_78, 0, x_77); -lean_ctor_set(x_78, 1, x_76); -return x_78; +lean_ctor_set(x_78, 1, x_69); +if (lean_is_scalar(x_70)) { + x_79 = lean_alloc_ctor(0, 6, 0); +} else { + x_79 = x_70; +} +lean_ctor_set(x_79, 0, x_64); +lean_ctor_set(x_79, 1, x_65); +lean_ctor_set(x_79, 2, x_66); +lean_ctor_set(x_79, 3, x_67); +lean_ctor_set(x_79, 4, x_68); +lean_ctor_set(x_79, 5, x_78); +x_80 = lean_box(0); +x_81 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_81, 0, x_80); +lean_ctor_set(x_81, 1, x_79); +return x_81; } else { -lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; uint8_t x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; -lean_dec(x_56); -x_79 = lean_ctor_get(x_61, 0); -lean_inc(x_79); -lean_dec(x_61); -x_80 = lean_ctor_get(x_57, 0); -lean_inc(x_80); -x_81 = lean_ctor_get(x_57, 1); -lean_inc(x_81); -x_82 = lean_ctor_get(x_57, 2); +lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; uint8_t x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; +lean_dec(x_58); +x_82 = lean_ctor_get(x_63, 0); lean_inc(x_82); -x_83 = lean_ctor_get(x_57, 3); +lean_dec(x_63); +x_83 = lean_ctor_get(x_59, 0); lean_inc(x_83); -x_84 = lean_ctor_get(x_57, 4); +x_84 = lean_ctor_get(x_59, 1); lean_inc(x_84); -x_85 = lean_ctor_get(x_57, 5); +x_85 = lean_ctor_get(x_59, 2); lean_inc(x_85); -if (lean_is_exclusive(x_57)) { - lean_ctor_release(x_57, 0); - lean_ctor_release(x_57, 1); - lean_ctor_release(x_57, 2); - lean_ctor_release(x_57, 3); - lean_ctor_release(x_57, 4); - lean_ctor_release(x_57, 5); - x_86 = x_57; +x_86 = lean_ctor_get(x_59, 3); +lean_inc(x_86); +x_87 = lean_ctor_get(x_59, 4); +lean_inc(x_87); +x_88 = lean_ctor_get(x_59, 5); +lean_inc(x_88); +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + lean_ctor_release(x_59, 1); + lean_ctor_release(x_59, 2); + lean_ctor_release(x_59, 3); + lean_ctor_release(x_59, 4); + lean_ctor_release(x_59, 5); + x_89 = x_59; } else { - lean_dec_ref(x_57); - x_86 = lean_box(0); + lean_dec_ref(x_59); + x_89 = lean_box(0); } -x_87 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; -x_88 = 0; -x_89 = l___private_init_lean_elaborator_command_1__addScopes___main(x_87, x_88, x_79, x_85); -lean_dec(x_85); -if (lean_is_scalar(x_86)) { - x_90 = lean_alloc_ctor(0, 6, 0); +x_90 = l_Lean_Parser_Command_section___elambda__1___rarg___closed__1; +x_91 = 0; +x_92 = l___private_init_lean_elaborator_command_1__addScopes___main(x_90, x_91, x_82, x_88); +lean_dec(x_88); +if (lean_is_scalar(x_89)) { + x_93 = lean_alloc_ctor(0, 6, 0); } else { - x_90 = x_86; + x_93 = x_89; } -lean_ctor_set(x_90, 0, x_80); -lean_ctor_set(x_90, 1, x_81); -lean_ctor_set(x_90, 2, x_82); -lean_ctor_set(x_90, 3, x_83); -lean_ctor_set(x_90, 4, x_84); -lean_ctor_set(x_90, 5, x_89); -x_91 = lean_box(0); -x_92 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_92, 0, x_91); -lean_ctor_set(x_92, 1, x_90); -return x_92; +lean_ctor_set(x_93, 0, x_83); +lean_ctor_set(x_93, 1, x_84); +lean_ctor_set(x_93, 2, x_85); +lean_ctor_set(x_93, 3, x_86); +lean_ctor_set(x_93, 4, x_87); +lean_ctor_set(x_93, 5, x_92); +x_94 = lean_box(0); +x_95 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_95, 0, x_94); +lean_ctor_set(x_95, 1, x_93); +return x_95; } } } else { -uint8_t x_93; -x_93 = !lean_is_exclusive(x_5); -if (x_93 == 0) +uint8_t x_96; +x_96 = !lean_is_exclusive(x_5); +if (x_96 == 0) { return x_5; } else { -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_5, 0); -x_95 = lean_ctor_get(x_5, 1); -lean_inc(x_95); -lean_inc(x_94); +lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_97 = lean_ctor_get(x_5, 0); +x_98 = lean_ctor_get(x_5, 1); +lean_inc(x_98); +lean_inc(x_97); lean_dec(x_5); -x_96 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_96, 0, x_94); -lean_ctor_set(x_96, 1, x_95); -return x_96; +x_99 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_99, 0, x_97); +lean_ctor_set(x_99, 1, x_98); +return x_99; } } } @@ -2847,271 +2878,6 @@ x_5 = l_Lean_addBuiltinCommandElab(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* l_Lean_Elab_modifyScope(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_5 = lean_ctor_get(x_3, 1); -x_6 = lean_ctor_get(x_3, 0); -lean_dec(x_6); -x_7 = lean_ctor_get(x_5, 5); -lean_inc(x_7); -if (lean_obj_tag(x_7) == 0) -{ -uint8_t x_8; -lean_dec(x_1); -x_8 = !lean_is_exclusive(x_5); -if (x_8 == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_5, 5); -lean_dec(x_9); -x_10 = lean_box(0); -lean_ctor_set(x_3, 0, x_10); -return x_3; -} -else -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_11 = lean_ctor_get(x_5, 0); -x_12 = lean_ctor_get(x_5, 1); -x_13 = lean_ctor_get(x_5, 2); -x_14 = lean_ctor_get(x_5, 3); -x_15 = lean_ctor_get(x_5, 4); -lean_inc(x_15); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_12); -lean_inc(x_11); -lean_dec(x_5); -x_16 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_16, 0, x_11); -lean_ctor_set(x_16, 1, x_12); -lean_ctor_set(x_16, 2, x_13); -lean_ctor_set(x_16, 3, x_14); -lean_ctor_set(x_16, 4, x_15); -lean_ctor_set(x_16, 5, x_7); -x_17 = lean_box(0); -lean_ctor_set(x_3, 1, x_16); -lean_ctor_set(x_3, 0, x_17); -return x_3; -} -} -else -{ -uint8_t x_18; -x_18 = !lean_is_exclusive(x_5); -if (x_18 == 0) -{ -lean_object* x_19; uint8_t x_20; -x_19 = lean_ctor_get(x_5, 5); -lean_dec(x_19); -x_20 = !lean_is_exclusive(x_7); -if (x_20 == 0) -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_7, 0); -x_22 = lean_apply_1(x_1, x_21); -lean_ctor_set(x_7, 0, x_22); -x_23 = lean_box(0); -lean_ctor_set(x_3, 0, x_23); -return x_3; -} -else -{ -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_24 = lean_ctor_get(x_7, 0); -x_25 = lean_ctor_get(x_7, 1); -lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_7); -x_26 = lean_apply_1(x_1, x_24); -x_27 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_25); -lean_ctor_set(x_5, 5, x_27); -x_28 = lean_box(0); -lean_ctor_set(x_3, 0, x_28); -return x_3; -} -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_29 = lean_ctor_get(x_5, 0); -x_30 = lean_ctor_get(x_5, 1); -x_31 = lean_ctor_get(x_5, 2); -x_32 = lean_ctor_get(x_5, 3); -x_33 = lean_ctor_get(x_5, 4); -lean_inc(x_33); -lean_inc(x_32); -lean_inc(x_31); -lean_inc(x_30); -lean_inc(x_29); -lean_dec(x_5); -x_34 = lean_ctor_get(x_7, 0); -lean_inc(x_34); -x_35 = lean_ctor_get(x_7, 1); -lean_inc(x_35); -if (lean_is_exclusive(x_7)) { - lean_ctor_release(x_7, 0); - lean_ctor_release(x_7, 1); - x_36 = x_7; -} else { - lean_dec_ref(x_7); - x_36 = lean_box(0); -} -x_37 = lean_apply_1(x_1, x_34); -if (lean_is_scalar(x_36)) { - x_38 = lean_alloc_ctor(1, 2, 0); -} else { - x_38 = x_36; -} -lean_ctor_set(x_38, 0, x_37); -lean_ctor_set(x_38, 1, x_35); -x_39 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_39, 0, x_29); -lean_ctor_set(x_39, 1, x_30); -lean_ctor_set(x_39, 2, x_31); -lean_ctor_set(x_39, 3, x_32); -lean_ctor_set(x_39, 4, x_33); -lean_ctor_set(x_39, 5, x_38); -x_40 = lean_box(0); -lean_ctor_set(x_3, 1, x_39); -lean_ctor_set(x_3, 0, x_40); -return x_3; -} -} -} -else -{ -lean_object* x_41; lean_object* x_42; -x_41 = lean_ctor_get(x_3, 1); -lean_inc(x_41); -lean_dec(x_3); -x_42 = lean_ctor_get(x_41, 5); -lean_inc(x_42); -if (lean_obj_tag(x_42) == 0) -{ -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_dec(x_1); -x_43 = lean_ctor_get(x_41, 0); -lean_inc(x_43); -x_44 = lean_ctor_get(x_41, 1); -lean_inc(x_44); -x_45 = lean_ctor_get(x_41, 2); -lean_inc(x_45); -x_46 = lean_ctor_get(x_41, 3); -lean_inc(x_46); -x_47 = lean_ctor_get(x_41, 4); -lean_inc(x_47); -if (lean_is_exclusive(x_41)) { - lean_ctor_release(x_41, 0); - lean_ctor_release(x_41, 1); - lean_ctor_release(x_41, 2); - lean_ctor_release(x_41, 3); - lean_ctor_release(x_41, 4); - lean_ctor_release(x_41, 5); - x_48 = x_41; -} else { - lean_dec_ref(x_41); - x_48 = lean_box(0); -} -if (lean_is_scalar(x_48)) { - x_49 = lean_alloc_ctor(0, 6, 0); -} else { - x_49 = x_48; -} -lean_ctor_set(x_49, 0, x_43); -lean_ctor_set(x_49, 1, x_44); -lean_ctor_set(x_49, 2, x_45); -lean_ctor_set(x_49, 3, x_46); -lean_ctor_set(x_49, 4, x_47); -lean_ctor_set(x_49, 5, x_42); -x_50 = lean_box(0); -x_51 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_51, 0, x_50); -lean_ctor_set(x_51, 1, x_49); -return x_51; -} -else -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; -x_52 = lean_ctor_get(x_41, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_41, 1); -lean_inc(x_53); -x_54 = lean_ctor_get(x_41, 2); -lean_inc(x_54); -x_55 = lean_ctor_get(x_41, 3); -lean_inc(x_55); -x_56 = lean_ctor_get(x_41, 4); -lean_inc(x_56); -if (lean_is_exclusive(x_41)) { - lean_ctor_release(x_41, 0); - lean_ctor_release(x_41, 1); - lean_ctor_release(x_41, 2); - lean_ctor_release(x_41, 3); - lean_ctor_release(x_41, 4); - lean_ctor_release(x_41, 5); - x_57 = x_41; -} else { - lean_dec_ref(x_41); - x_57 = lean_box(0); -} -x_58 = lean_ctor_get(x_42, 0); -lean_inc(x_58); -x_59 = lean_ctor_get(x_42, 1); -lean_inc(x_59); -if (lean_is_exclusive(x_42)) { - lean_ctor_release(x_42, 0); - lean_ctor_release(x_42, 1); - x_60 = x_42; -} else { - lean_dec_ref(x_42); - x_60 = lean_box(0); -} -x_61 = lean_apply_1(x_1, x_58); -if (lean_is_scalar(x_60)) { - x_62 = lean_alloc_ctor(1, 2, 0); -} else { - x_62 = x_60; -} -lean_ctor_set(x_62, 0, x_61); -lean_ctor_set(x_62, 1, x_59); -if (lean_is_scalar(x_57)) { - x_63 = lean_alloc_ctor(0, 6, 0); -} else { - x_63 = x_57; -} -lean_ctor_set(x_63, 0, x_52); -lean_ctor_set(x_63, 1, x_53); -lean_ctor_set(x_63, 2, x_54); -lean_ctor_set(x_63, 3, x_55); -lean_ctor_set(x_63, 4, x_56); -lean_ctor_set(x_63, 5, x_62); -x_64 = lean_box(0); -x_65 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_65, 0, x_64); -lean_ctor_set(x_65, 1, x_63); -return x_65; -} -} -} -} -lean_object* l_Lean_Elab_modifyScope___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_modifyScope(x_1, x_2, x_3); -lean_dec(x_2); -return x_4; -} -} lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_addOpenDecl___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -3202,7 +2968,7 @@ return x_3; } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_28 = lean_ctor_get(x_18, 0); x_29 = lean_ctor_get(x_18, 1); x_30 = lean_ctor_get(x_18, 2); @@ -3210,6 +2976,9 @@ x_31 = lean_ctor_get(x_18, 3); x_32 = lean_ctor_get(x_18, 4); x_33 = lean_ctor_get(x_18, 5); x_34 = lean_ctor_get(x_18, 6); +x_35 = lean_ctor_get(x_18, 7); +x_36 = lean_ctor_get_uint8(x_18, sizeof(void*)*8); +lean_inc(x_35); lean_inc(x_34); lean_inc(x_33); lean_inc(x_32); @@ -3220,43 +2989,48 @@ lean_inc(x_28); lean_dec(x_18); lean_ctor_set(x_7, 1, x_32); lean_ctor_set(x_7, 0, x_1); -x_35 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_35, 0, x_28); -lean_ctor_set(x_35, 1, x_29); -lean_ctor_set(x_35, 2, x_30); -lean_ctor_set(x_35, 3, x_31); -lean_ctor_set(x_35, 4, x_7); -lean_ctor_set(x_35, 5, x_33); -lean_ctor_set(x_35, 6, x_34); -x_36 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_22); -lean_ctor_set(x_5, 5, x_36); -x_37 = lean_box(0); -lean_ctor_set(x_3, 0, x_37); +x_37 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_37, 0, x_28); +lean_ctor_set(x_37, 1, x_29); +lean_ctor_set(x_37, 2, x_30); +lean_ctor_set(x_37, 3, x_31); +lean_ctor_set(x_37, 4, x_7); +lean_ctor_set(x_37, 5, x_33); +lean_ctor_set(x_37, 6, x_34); +lean_ctor_set(x_37, 7, x_35); +lean_ctor_set_uint8(x_37, sizeof(void*)*8, x_36); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_22); +lean_ctor_set(x_5, 5, x_38); +x_39 = lean_box(0); +lean_ctor_set(x_3, 0, x_39); return x_3; } } else { -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_object* x_48; lean_object* x_49; lean_object* x_50; -x_38 = lean_ctor_get(x_7, 1); -lean_inc(x_38); -lean_dec(x_7); -x_39 = lean_ctor_get(x_18, 0); -lean_inc(x_39); -x_40 = lean_ctor_get(x_18, 1); +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; uint8_t x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_40 = lean_ctor_get(x_7, 1); lean_inc(x_40); -x_41 = lean_ctor_get(x_18, 2); +lean_dec(x_7); +x_41 = lean_ctor_get(x_18, 0); lean_inc(x_41); -x_42 = lean_ctor_get(x_18, 3); +x_42 = lean_ctor_get(x_18, 1); lean_inc(x_42); -x_43 = lean_ctor_get(x_18, 4); +x_43 = lean_ctor_get(x_18, 2); lean_inc(x_43); -x_44 = lean_ctor_get(x_18, 5); +x_44 = lean_ctor_get(x_18, 3); lean_inc(x_44); -x_45 = lean_ctor_get(x_18, 6); +x_45 = lean_ctor_get(x_18, 4); lean_inc(x_45); +x_46 = lean_ctor_get(x_18, 5); +lean_inc(x_46); +x_47 = lean_ctor_get(x_18, 6); +lean_inc(x_47); +x_48 = lean_ctor_get(x_18, 7); +lean_inc(x_48); +x_49 = lean_ctor_get_uint8(x_18, sizeof(void*)*8); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); lean_ctor_release(x_18, 1); @@ -3265,73 +3039,79 @@ if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 4); lean_ctor_release(x_18, 5); lean_ctor_release(x_18, 6); - x_46 = x_18; + lean_ctor_release(x_18, 7); + x_50 = x_18; } else { lean_dec_ref(x_18); - x_46 = lean_box(0); + x_50 = lean_box(0); } -x_47 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_47, 0, x_1); -lean_ctor_set(x_47, 1, x_43); -if (lean_is_scalar(x_46)) { - x_48 = lean_alloc_ctor(0, 7, 0); +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_1); +lean_ctor_set(x_51, 1, x_45); +if (lean_is_scalar(x_50)) { + x_52 = lean_alloc_ctor(0, 8, 1); } else { - x_48 = x_46; + x_52 = x_50; } -lean_ctor_set(x_48, 0, x_39); -lean_ctor_set(x_48, 1, x_40); -lean_ctor_set(x_48, 2, x_41); -lean_ctor_set(x_48, 3, x_42); -lean_ctor_set(x_48, 4, x_47); -lean_ctor_set(x_48, 5, x_44); -lean_ctor_set(x_48, 6, x_45); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_38); -lean_ctor_set(x_5, 5, x_49); -x_50 = lean_box(0); -lean_ctor_set(x_3, 0, x_50); +lean_ctor_set(x_52, 0, x_41); +lean_ctor_set(x_52, 1, x_42); +lean_ctor_set(x_52, 2, x_43); +lean_ctor_set(x_52, 3, x_44); +lean_ctor_set(x_52, 4, x_51); +lean_ctor_set(x_52, 5, x_46); +lean_ctor_set(x_52, 6, x_47); +lean_ctor_set(x_52, 7, x_48); +lean_ctor_set_uint8(x_52, sizeof(void*)*8, x_49); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_40); +lean_ctor_set(x_5, 5, x_53); +x_54 = lean_box(0); +lean_ctor_set(x_3, 0, x_54); return x_3; } } else { -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; 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; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_51 = lean_ctor_get(x_5, 0); -x_52 = lean_ctor_get(x_5, 1); -x_53 = lean_ctor_get(x_5, 2); -x_54 = lean_ctor_get(x_5, 3); -x_55 = lean_ctor_get(x_5, 4); -lean_inc(x_55); -lean_inc(x_54); -lean_inc(x_53); -lean_inc(x_52); -lean_inc(x_51); -lean_dec(x_5); -x_56 = lean_ctor_get(x_7, 1); +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_55 = lean_ctor_get(x_5, 0); +x_56 = lean_ctor_get(x_5, 1); +x_57 = lean_ctor_get(x_5, 2); +x_58 = lean_ctor_get(x_5, 3); +x_59 = lean_ctor_get(x_5, 4); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_5); +x_60 = lean_ctor_get(x_7, 1); +lean_inc(x_60); if (lean_is_exclusive(x_7)) { lean_ctor_release(x_7, 0); lean_ctor_release(x_7, 1); - x_57 = x_7; + x_61 = x_7; } else { lean_dec_ref(x_7); - x_57 = lean_box(0); + x_61 = lean_box(0); } -x_58 = lean_ctor_get(x_18, 0); -lean_inc(x_58); -x_59 = lean_ctor_get(x_18, 1); -lean_inc(x_59); -x_60 = lean_ctor_get(x_18, 2); -lean_inc(x_60); -x_61 = lean_ctor_get(x_18, 3); -lean_inc(x_61); -x_62 = lean_ctor_get(x_18, 4); +x_62 = lean_ctor_get(x_18, 0); lean_inc(x_62); -x_63 = lean_ctor_get(x_18, 5); +x_63 = lean_ctor_get(x_18, 1); lean_inc(x_63); -x_64 = lean_ctor_get(x_18, 6); +x_64 = lean_ctor_get(x_18, 2); lean_inc(x_64); +x_65 = lean_ctor_get(x_18, 3); +lean_inc(x_65); +x_66 = lean_ctor_get(x_18, 4); +lean_inc(x_66); +x_67 = lean_ctor_get(x_18, 5); +lean_inc(x_67); +x_68 = lean_ctor_get(x_18, 6); +lean_inc(x_68); +x_69 = lean_ctor_get(x_18, 7); +lean_inc(x_69); +x_70 = lean_ctor_get_uint8(x_18, sizeof(void*)*8); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); lean_ctor_release(x_18, 1); @@ -3340,200 +3120,209 @@ if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 4); lean_ctor_release(x_18, 5); lean_ctor_release(x_18, 6); - x_65 = x_18; + lean_ctor_release(x_18, 7); + x_71 = x_18; } else { lean_dec_ref(x_18); - x_65 = lean_box(0); + x_71 = lean_box(0); } -if (lean_is_scalar(x_57)) { - x_66 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_61)) { + x_72 = lean_alloc_ctor(1, 2, 0); } else { - x_66 = x_57; + x_72 = x_61; } -lean_ctor_set(x_66, 0, x_1); -lean_ctor_set(x_66, 1, x_62); -if (lean_is_scalar(x_65)) { - x_67 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_72, 0, x_1); +lean_ctor_set(x_72, 1, x_66); +if (lean_is_scalar(x_71)) { + x_73 = lean_alloc_ctor(0, 8, 1); } else { - x_67 = x_65; + x_73 = x_71; } -lean_ctor_set(x_67, 0, x_58); -lean_ctor_set(x_67, 1, x_59); -lean_ctor_set(x_67, 2, x_60); -lean_ctor_set(x_67, 3, x_61); -lean_ctor_set(x_67, 4, x_66); -lean_ctor_set(x_67, 5, x_63); -lean_ctor_set(x_67, 6, x_64); -x_68 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_68, 0, x_67); -lean_ctor_set(x_68, 1, x_56); -x_69 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_69, 0, x_51); -lean_ctor_set(x_69, 1, x_52); -lean_ctor_set(x_69, 2, x_53); -lean_ctor_set(x_69, 3, x_54); -lean_ctor_set(x_69, 4, x_55); -lean_ctor_set(x_69, 5, x_68); -x_70 = lean_box(0); -lean_ctor_set(x_3, 1, x_69); -lean_ctor_set(x_3, 0, x_70); +lean_ctor_set(x_73, 0, x_62); +lean_ctor_set(x_73, 1, x_63); +lean_ctor_set(x_73, 2, x_64); +lean_ctor_set(x_73, 3, x_65); +lean_ctor_set(x_73, 4, x_72); +lean_ctor_set(x_73, 5, x_67); +lean_ctor_set(x_73, 6, x_68); +lean_ctor_set(x_73, 7, x_69); +lean_ctor_set_uint8(x_73, sizeof(void*)*8, x_70); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_73); +lean_ctor_set(x_74, 1, x_60); +x_75 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_75, 0, x_55); +lean_ctor_set(x_75, 1, x_56); +lean_ctor_set(x_75, 2, x_57); +lean_ctor_set(x_75, 3, x_58); +lean_ctor_set(x_75, 4, x_59); +lean_ctor_set(x_75, 5, x_74); +x_76 = lean_box(0); +lean_ctor_set(x_3, 1, x_75); +lean_ctor_set(x_3, 0, x_76); return x_3; } } } else { -lean_object* x_71; lean_object* x_72; -x_71 = lean_ctor_get(x_3, 1); -lean_inc(x_71); -lean_dec(x_3); -x_72 = lean_ctor_get(x_71, 5); -lean_inc(x_72); -if (lean_obj_tag(x_72) == 0) -{ -lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; -lean_dec(x_1); -x_73 = lean_ctor_get(x_71, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_71, 1); -lean_inc(x_74); -x_75 = lean_ctor_get(x_71, 2); -lean_inc(x_75); -x_76 = lean_ctor_get(x_71, 3); -lean_inc(x_76); -x_77 = lean_ctor_get(x_71, 4); +lean_object* x_77; lean_object* x_78; +x_77 = lean_ctor_get(x_3, 1); lean_inc(x_77); -if (lean_is_exclusive(x_71)) { - lean_ctor_release(x_71, 0); - lean_ctor_release(x_71, 1); - lean_ctor_release(x_71, 2); - lean_ctor_release(x_71, 3); - lean_ctor_release(x_71, 4); - lean_ctor_release(x_71, 5); - x_78 = x_71; +lean_dec(x_3); +x_78 = lean_ctor_get(x_77, 5); +lean_inc(x_78); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +lean_dec(x_1); +x_79 = lean_ctor_get(x_77, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_77, 1); +lean_inc(x_80); +x_81 = lean_ctor_get(x_77, 2); +lean_inc(x_81); +x_82 = lean_ctor_get(x_77, 3); +lean_inc(x_82); +x_83 = lean_ctor_get(x_77, 4); +lean_inc(x_83); +if (lean_is_exclusive(x_77)) { + lean_ctor_release(x_77, 0); + lean_ctor_release(x_77, 1); + lean_ctor_release(x_77, 2); + lean_ctor_release(x_77, 3); + lean_ctor_release(x_77, 4); + lean_ctor_release(x_77, 5); + x_84 = x_77; } else { - lean_dec_ref(x_71); - x_78 = lean_box(0); + lean_dec_ref(x_77); + x_84 = lean_box(0); } -if (lean_is_scalar(x_78)) { - x_79 = lean_alloc_ctor(0, 6, 0); +if (lean_is_scalar(x_84)) { + x_85 = lean_alloc_ctor(0, 6, 0); } else { - x_79 = x_78; + x_85 = x_84; } -lean_ctor_set(x_79, 0, x_73); -lean_ctor_set(x_79, 1, x_74); -lean_ctor_set(x_79, 2, x_75); -lean_ctor_set(x_79, 3, x_76); -lean_ctor_set(x_79, 4, x_77); -lean_ctor_set(x_79, 5, x_72); -x_80 = lean_box(0); -x_81 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_81, 0, x_80); -lean_ctor_set(x_81, 1, x_79); -return x_81; +lean_ctor_set(x_85, 0, x_79); +lean_ctor_set(x_85, 1, x_80); +lean_ctor_set(x_85, 2, x_81); +lean_ctor_set(x_85, 3, x_82); +lean_ctor_set(x_85, 4, x_83); +lean_ctor_set(x_85, 5, x_78); +x_86 = lean_box(0); +x_87 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_85); +return x_87; } else { -lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; -x_82 = lean_ctor_get(x_72, 0); -lean_inc(x_82); -x_83 = lean_ctor_get(x_71, 0); -lean_inc(x_83); -x_84 = lean_ctor_get(x_71, 1); -lean_inc(x_84); -x_85 = lean_ctor_get(x_71, 2); -lean_inc(x_85); -x_86 = lean_ctor_get(x_71, 3); -lean_inc(x_86); -x_87 = lean_ctor_get(x_71, 4); -lean_inc(x_87); -if (lean_is_exclusive(x_71)) { - lean_ctor_release(x_71, 0); - lean_ctor_release(x_71, 1); - lean_ctor_release(x_71, 2); - lean_ctor_release(x_71, 3); - lean_ctor_release(x_71, 4); - lean_ctor_release(x_71, 5); - x_88 = x_71; -} else { - lean_dec_ref(x_71); - x_88 = lean_box(0); -} -x_89 = lean_ctor_get(x_72, 1); +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; uint8_t x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_88 = lean_ctor_get(x_78, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_77, 0); lean_inc(x_89); -if (lean_is_exclusive(x_72)) { - lean_ctor_release(x_72, 0); - lean_ctor_release(x_72, 1); - x_90 = x_72; -} else { - lean_dec_ref(x_72); - x_90 = lean_box(0); -} -x_91 = lean_ctor_get(x_82, 0); +x_90 = lean_ctor_get(x_77, 1); +lean_inc(x_90); +x_91 = lean_ctor_get(x_77, 2); lean_inc(x_91); -x_92 = lean_ctor_get(x_82, 1); +x_92 = lean_ctor_get(x_77, 3); lean_inc(x_92); -x_93 = lean_ctor_get(x_82, 2); +x_93 = lean_ctor_get(x_77, 4); lean_inc(x_93); -x_94 = lean_ctor_get(x_82, 3); -lean_inc(x_94); -x_95 = lean_ctor_get(x_82, 4); +if (lean_is_exclusive(x_77)) { + lean_ctor_release(x_77, 0); + lean_ctor_release(x_77, 1); + lean_ctor_release(x_77, 2); + lean_ctor_release(x_77, 3); + lean_ctor_release(x_77, 4); + lean_ctor_release(x_77, 5); + x_94 = x_77; +} else { + lean_dec_ref(x_77); + x_94 = lean_box(0); +} +x_95 = lean_ctor_get(x_78, 1); lean_inc(x_95); -x_96 = lean_ctor_get(x_82, 5); -lean_inc(x_96); -x_97 = lean_ctor_get(x_82, 6); +if (lean_is_exclusive(x_78)) { + lean_ctor_release(x_78, 0); + lean_ctor_release(x_78, 1); + x_96 = x_78; +} else { + lean_dec_ref(x_78); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_88, 0); lean_inc(x_97); -if (lean_is_exclusive(x_82)) { - lean_ctor_release(x_82, 0); - lean_ctor_release(x_82, 1); - lean_ctor_release(x_82, 2); - lean_ctor_release(x_82, 3); - lean_ctor_release(x_82, 4); - lean_ctor_release(x_82, 5); - lean_ctor_release(x_82, 6); - x_98 = x_82; +x_98 = lean_ctor_get(x_88, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_88, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_88, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_88, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_88, 5); +lean_inc(x_102); +x_103 = lean_ctor_get(x_88, 6); +lean_inc(x_103); +x_104 = lean_ctor_get(x_88, 7); +lean_inc(x_104); +x_105 = lean_ctor_get_uint8(x_88, sizeof(void*)*8); +if (lean_is_exclusive(x_88)) { + lean_ctor_release(x_88, 0); + lean_ctor_release(x_88, 1); + lean_ctor_release(x_88, 2); + lean_ctor_release(x_88, 3); + lean_ctor_release(x_88, 4); + lean_ctor_release(x_88, 5); + lean_ctor_release(x_88, 6); + lean_ctor_release(x_88, 7); + x_106 = x_88; } else { - lean_dec_ref(x_82); - x_98 = lean_box(0); + lean_dec_ref(x_88); + x_106 = lean_box(0); } -if (lean_is_scalar(x_90)) { - x_99 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_96)) { + x_107 = lean_alloc_ctor(1, 2, 0); } else { - x_99 = x_90; + x_107 = x_96; } -lean_ctor_set(x_99, 0, x_1); -lean_ctor_set(x_99, 1, x_95); -if (lean_is_scalar(x_98)) { - x_100 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_107, 0, x_1); +lean_ctor_set(x_107, 1, x_101); +if (lean_is_scalar(x_106)) { + x_108 = lean_alloc_ctor(0, 8, 1); } else { - x_100 = x_98; + x_108 = x_106; } -lean_ctor_set(x_100, 0, x_91); -lean_ctor_set(x_100, 1, x_92); -lean_ctor_set(x_100, 2, x_93); -lean_ctor_set(x_100, 3, x_94); -lean_ctor_set(x_100, 4, x_99); -lean_ctor_set(x_100, 5, x_96); -lean_ctor_set(x_100, 6, x_97); -x_101 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_101, 0, x_100); -lean_ctor_set(x_101, 1, x_89); -if (lean_is_scalar(x_88)) { - x_102 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_108, 0, x_97); +lean_ctor_set(x_108, 1, x_98); +lean_ctor_set(x_108, 2, x_99); +lean_ctor_set(x_108, 3, x_100); +lean_ctor_set(x_108, 4, x_107); +lean_ctor_set(x_108, 5, x_102); +lean_ctor_set(x_108, 6, x_103); +lean_ctor_set(x_108, 7, x_104); +lean_ctor_set_uint8(x_108, sizeof(void*)*8, x_105); +x_109 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_109, 0, x_108); +lean_ctor_set(x_109, 1, x_95); +if (lean_is_scalar(x_94)) { + x_110 = lean_alloc_ctor(0, 6, 0); } else { - x_102 = x_88; + x_110 = x_94; } -lean_ctor_set(x_102, 0, x_83); -lean_ctor_set(x_102, 1, x_84); -lean_ctor_set(x_102, 2, x_85); -lean_ctor_set(x_102, 3, x_86); -lean_ctor_set(x_102, 4, x_87); -lean_ctor_set(x_102, 5, x_101); -x_103 = lean_box(0); -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_ctor_set(x_110, 0, x_89); +lean_ctor_set(x_110, 1, x_90); +lean_ctor_set(x_110, 2, x_91); +lean_ctor_set(x_110, 3, x_92); +lean_ctor_set(x_110, 4, x_93); +lean_ctor_set(x_110, 5, x_109); +x_111 = lean_box(0); +x_112 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_112, 0, x_111); +lean_ctor_set(x_112, 1, x_110); +return x_112; } } } @@ -5440,7 +5229,7 @@ return x_3; } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_28 = lean_ctor_get(x_18, 0); x_29 = lean_ctor_get(x_18, 1); x_30 = lean_ctor_get(x_18, 2); @@ -5448,6 +5237,9 @@ x_31 = lean_ctor_get(x_18, 3); x_32 = lean_ctor_get(x_18, 4); x_33 = lean_ctor_get(x_18, 5); x_34 = lean_ctor_get(x_18, 6); +x_35 = lean_ctor_get(x_18, 7); +x_36 = lean_ctor_get_uint8(x_18, sizeof(void*)*8); +lean_inc(x_35); lean_inc(x_34); lean_inc(x_33); lean_inc(x_32); @@ -5458,43 +5250,48 @@ lean_inc(x_28); lean_dec(x_18); lean_ctor_set(x_7, 1, x_33); lean_ctor_set(x_7, 0, x_1); -x_35 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_35, 0, x_28); -lean_ctor_set(x_35, 1, x_29); -lean_ctor_set(x_35, 2, x_30); -lean_ctor_set(x_35, 3, x_31); -lean_ctor_set(x_35, 4, x_32); -lean_ctor_set(x_35, 5, x_7); -lean_ctor_set(x_35, 6, x_34); -x_36 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_22); -lean_ctor_set(x_5, 5, x_36); -x_37 = lean_box(0); -lean_ctor_set(x_3, 0, x_37); +x_37 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_37, 0, x_28); +lean_ctor_set(x_37, 1, x_29); +lean_ctor_set(x_37, 2, x_30); +lean_ctor_set(x_37, 3, x_31); +lean_ctor_set(x_37, 4, x_32); +lean_ctor_set(x_37, 5, x_7); +lean_ctor_set(x_37, 6, x_34); +lean_ctor_set(x_37, 7, x_35); +lean_ctor_set_uint8(x_37, sizeof(void*)*8, x_36); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_22); +lean_ctor_set(x_5, 5, x_38); +x_39 = lean_box(0); +lean_ctor_set(x_3, 0, x_39); return x_3; } } else { -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_object* x_48; lean_object* x_49; lean_object* x_50; -x_38 = lean_ctor_get(x_7, 1); -lean_inc(x_38); -lean_dec(x_7); -x_39 = lean_ctor_get(x_18, 0); -lean_inc(x_39); -x_40 = lean_ctor_get(x_18, 1); +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; uint8_t x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_40 = lean_ctor_get(x_7, 1); lean_inc(x_40); -x_41 = lean_ctor_get(x_18, 2); +lean_dec(x_7); +x_41 = lean_ctor_get(x_18, 0); lean_inc(x_41); -x_42 = lean_ctor_get(x_18, 3); +x_42 = lean_ctor_get(x_18, 1); lean_inc(x_42); -x_43 = lean_ctor_get(x_18, 4); +x_43 = lean_ctor_get(x_18, 2); lean_inc(x_43); -x_44 = lean_ctor_get(x_18, 5); +x_44 = lean_ctor_get(x_18, 3); lean_inc(x_44); -x_45 = lean_ctor_get(x_18, 6); +x_45 = lean_ctor_get(x_18, 4); lean_inc(x_45); +x_46 = lean_ctor_get(x_18, 5); +lean_inc(x_46); +x_47 = lean_ctor_get(x_18, 6); +lean_inc(x_47); +x_48 = lean_ctor_get(x_18, 7); +lean_inc(x_48); +x_49 = lean_ctor_get_uint8(x_18, sizeof(void*)*8); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); lean_ctor_release(x_18, 1); @@ -5503,73 +5300,79 @@ if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 4); lean_ctor_release(x_18, 5); lean_ctor_release(x_18, 6); - x_46 = x_18; + lean_ctor_release(x_18, 7); + x_50 = x_18; } else { lean_dec_ref(x_18); - x_46 = lean_box(0); + x_50 = lean_box(0); } -x_47 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_47, 0, x_1); -lean_ctor_set(x_47, 1, x_44); -if (lean_is_scalar(x_46)) { - x_48 = lean_alloc_ctor(0, 7, 0); +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_1); +lean_ctor_set(x_51, 1, x_46); +if (lean_is_scalar(x_50)) { + x_52 = lean_alloc_ctor(0, 8, 1); } else { - x_48 = x_46; + x_52 = x_50; } -lean_ctor_set(x_48, 0, x_39); -lean_ctor_set(x_48, 1, x_40); -lean_ctor_set(x_48, 2, x_41); -lean_ctor_set(x_48, 3, x_42); -lean_ctor_set(x_48, 4, x_43); -lean_ctor_set(x_48, 5, x_47); -lean_ctor_set(x_48, 6, x_45); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_38); -lean_ctor_set(x_5, 5, x_49); -x_50 = lean_box(0); -lean_ctor_set(x_3, 0, x_50); +lean_ctor_set(x_52, 0, x_41); +lean_ctor_set(x_52, 1, x_42); +lean_ctor_set(x_52, 2, x_43); +lean_ctor_set(x_52, 3, x_44); +lean_ctor_set(x_52, 4, x_45); +lean_ctor_set(x_52, 5, x_51); +lean_ctor_set(x_52, 6, x_47); +lean_ctor_set(x_52, 7, x_48); +lean_ctor_set_uint8(x_52, sizeof(void*)*8, x_49); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_40); +lean_ctor_set(x_5, 5, x_53); +x_54 = lean_box(0); +lean_ctor_set(x_3, 0, x_54); return x_3; } } else { -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; 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; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_51 = lean_ctor_get(x_5, 0); -x_52 = lean_ctor_get(x_5, 1); -x_53 = lean_ctor_get(x_5, 2); -x_54 = lean_ctor_get(x_5, 3); -x_55 = lean_ctor_get(x_5, 4); -lean_inc(x_55); -lean_inc(x_54); -lean_inc(x_53); -lean_inc(x_52); -lean_inc(x_51); -lean_dec(x_5); -x_56 = lean_ctor_get(x_7, 1); +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_55 = lean_ctor_get(x_5, 0); +x_56 = lean_ctor_get(x_5, 1); +x_57 = lean_ctor_get(x_5, 2); +x_58 = lean_ctor_get(x_5, 3); +x_59 = lean_ctor_get(x_5, 4); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_5); +x_60 = lean_ctor_get(x_7, 1); +lean_inc(x_60); if (lean_is_exclusive(x_7)) { lean_ctor_release(x_7, 0); lean_ctor_release(x_7, 1); - x_57 = x_7; + x_61 = x_7; } else { lean_dec_ref(x_7); - x_57 = lean_box(0); + x_61 = lean_box(0); } -x_58 = lean_ctor_get(x_18, 0); -lean_inc(x_58); -x_59 = lean_ctor_get(x_18, 1); -lean_inc(x_59); -x_60 = lean_ctor_get(x_18, 2); -lean_inc(x_60); -x_61 = lean_ctor_get(x_18, 3); -lean_inc(x_61); -x_62 = lean_ctor_get(x_18, 4); +x_62 = lean_ctor_get(x_18, 0); lean_inc(x_62); -x_63 = lean_ctor_get(x_18, 5); +x_63 = lean_ctor_get(x_18, 1); lean_inc(x_63); -x_64 = lean_ctor_get(x_18, 6); +x_64 = lean_ctor_get(x_18, 2); lean_inc(x_64); +x_65 = lean_ctor_get(x_18, 3); +lean_inc(x_65); +x_66 = lean_ctor_get(x_18, 4); +lean_inc(x_66); +x_67 = lean_ctor_get(x_18, 5); +lean_inc(x_67); +x_68 = lean_ctor_get(x_18, 6); +lean_inc(x_68); +x_69 = lean_ctor_get(x_18, 7); +lean_inc(x_69); +x_70 = lean_ctor_get_uint8(x_18, sizeof(void*)*8); if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 0); lean_ctor_release(x_18, 1); @@ -5578,200 +5381,209 @@ if (lean_is_exclusive(x_18)) { lean_ctor_release(x_18, 4); lean_ctor_release(x_18, 5); lean_ctor_release(x_18, 6); - x_65 = x_18; + lean_ctor_release(x_18, 7); + x_71 = x_18; } else { lean_dec_ref(x_18); - x_65 = lean_box(0); + x_71 = lean_box(0); } -if (lean_is_scalar(x_57)) { - x_66 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_61)) { + x_72 = lean_alloc_ctor(1, 2, 0); } else { - x_66 = x_57; + x_72 = x_61; } -lean_ctor_set(x_66, 0, x_1); -lean_ctor_set(x_66, 1, x_63); -if (lean_is_scalar(x_65)) { - x_67 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_72, 0, x_1); +lean_ctor_set(x_72, 1, x_67); +if (lean_is_scalar(x_71)) { + x_73 = lean_alloc_ctor(0, 8, 1); } else { - x_67 = x_65; + x_73 = x_71; } -lean_ctor_set(x_67, 0, x_58); -lean_ctor_set(x_67, 1, x_59); -lean_ctor_set(x_67, 2, x_60); -lean_ctor_set(x_67, 3, x_61); -lean_ctor_set(x_67, 4, x_62); -lean_ctor_set(x_67, 5, x_66); -lean_ctor_set(x_67, 6, x_64); -x_68 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_68, 0, x_67); -lean_ctor_set(x_68, 1, x_56); -x_69 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_69, 0, x_51); -lean_ctor_set(x_69, 1, x_52); -lean_ctor_set(x_69, 2, x_53); -lean_ctor_set(x_69, 3, x_54); -lean_ctor_set(x_69, 4, x_55); -lean_ctor_set(x_69, 5, x_68); -x_70 = lean_box(0); -lean_ctor_set(x_3, 1, x_69); -lean_ctor_set(x_3, 0, x_70); +lean_ctor_set(x_73, 0, x_62); +lean_ctor_set(x_73, 1, x_63); +lean_ctor_set(x_73, 2, x_64); +lean_ctor_set(x_73, 3, x_65); +lean_ctor_set(x_73, 4, x_66); +lean_ctor_set(x_73, 5, x_72); +lean_ctor_set(x_73, 6, x_68); +lean_ctor_set(x_73, 7, x_69); +lean_ctor_set_uint8(x_73, sizeof(void*)*8, x_70); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_73); +lean_ctor_set(x_74, 1, x_60); +x_75 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_75, 0, x_55); +lean_ctor_set(x_75, 1, x_56); +lean_ctor_set(x_75, 2, x_57); +lean_ctor_set(x_75, 3, x_58); +lean_ctor_set(x_75, 4, x_59); +lean_ctor_set(x_75, 5, x_74); +x_76 = lean_box(0); +lean_ctor_set(x_3, 1, x_75); +lean_ctor_set(x_3, 0, x_76); return x_3; } } } else { -lean_object* x_71; lean_object* x_72; -x_71 = lean_ctor_get(x_3, 1); -lean_inc(x_71); -lean_dec(x_3); -x_72 = lean_ctor_get(x_71, 5); -lean_inc(x_72); -if (lean_obj_tag(x_72) == 0) -{ -lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; -lean_dec(x_1); -x_73 = lean_ctor_get(x_71, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_71, 1); -lean_inc(x_74); -x_75 = lean_ctor_get(x_71, 2); -lean_inc(x_75); -x_76 = lean_ctor_get(x_71, 3); -lean_inc(x_76); -x_77 = lean_ctor_get(x_71, 4); +lean_object* x_77; lean_object* x_78; +x_77 = lean_ctor_get(x_3, 1); lean_inc(x_77); -if (lean_is_exclusive(x_71)) { - lean_ctor_release(x_71, 0); - lean_ctor_release(x_71, 1); - lean_ctor_release(x_71, 2); - lean_ctor_release(x_71, 3); - lean_ctor_release(x_71, 4); - lean_ctor_release(x_71, 5); - x_78 = x_71; +lean_dec(x_3); +x_78 = lean_ctor_get(x_77, 5); +lean_inc(x_78); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +lean_dec(x_1); +x_79 = lean_ctor_get(x_77, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_77, 1); +lean_inc(x_80); +x_81 = lean_ctor_get(x_77, 2); +lean_inc(x_81); +x_82 = lean_ctor_get(x_77, 3); +lean_inc(x_82); +x_83 = lean_ctor_get(x_77, 4); +lean_inc(x_83); +if (lean_is_exclusive(x_77)) { + lean_ctor_release(x_77, 0); + lean_ctor_release(x_77, 1); + lean_ctor_release(x_77, 2); + lean_ctor_release(x_77, 3); + lean_ctor_release(x_77, 4); + lean_ctor_release(x_77, 5); + x_84 = x_77; } else { - lean_dec_ref(x_71); - x_78 = lean_box(0); + lean_dec_ref(x_77); + x_84 = lean_box(0); } -if (lean_is_scalar(x_78)) { - x_79 = lean_alloc_ctor(0, 6, 0); +if (lean_is_scalar(x_84)) { + x_85 = lean_alloc_ctor(0, 6, 0); } else { - x_79 = x_78; + x_85 = x_84; } -lean_ctor_set(x_79, 0, x_73); -lean_ctor_set(x_79, 1, x_74); -lean_ctor_set(x_79, 2, x_75); -lean_ctor_set(x_79, 3, x_76); -lean_ctor_set(x_79, 4, x_77); -lean_ctor_set(x_79, 5, x_72); -x_80 = lean_box(0); -x_81 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_81, 0, x_80); -lean_ctor_set(x_81, 1, x_79); -return x_81; +lean_ctor_set(x_85, 0, x_79); +lean_ctor_set(x_85, 1, x_80); +lean_ctor_set(x_85, 2, x_81); +lean_ctor_set(x_85, 3, x_82); +lean_ctor_set(x_85, 4, x_83); +lean_ctor_set(x_85, 5, x_78); +x_86 = lean_box(0); +x_87 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_85); +return x_87; } else { -lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; -x_82 = lean_ctor_get(x_72, 0); -lean_inc(x_82); -x_83 = lean_ctor_get(x_71, 0); -lean_inc(x_83); -x_84 = lean_ctor_get(x_71, 1); -lean_inc(x_84); -x_85 = lean_ctor_get(x_71, 2); -lean_inc(x_85); -x_86 = lean_ctor_get(x_71, 3); -lean_inc(x_86); -x_87 = lean_ctor_get(x_71, 4); -lean_inc(x_87); -if (lean_is_exclusive(x_71)) { - lean_ctor_release(x_71, 0); - lean_ctor_release(x_71, 1); - lean_ctor_release(x_71, 2); - lean_ctor_release(x_71, 3); - lean_ctor_release(x_71, 4); - lean_ctor_release(x_71, 5); - x_88 = x_71; -} else { - lean_dec_ref(x_71); - x_88 = lean_box(0); -} -x_89 = lean_ctor_get(x_72, 1); +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; uint8_t x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_88 = lean_ctor_get(x_78, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_77, 0); lean_inc(x_89); -if (lean_is_exclusive(x_72)) { - lean_ctor_release(x_72, 0); - lean_ctor_release(x_72, 1); - x_90 = x_72; -} else { - lean_dec_ref(x_72); - x_90 = lean_box(0); -} -x_91 = lean_ctor_get(x_82, 0); +x_90 = lean_ctor_get(x_77, 1); +lean_inc(x_90); +x_91 = lean_ctor_get(x_77, 2); lean_inc(x_91); -x_92 = lean_ctor_get(x_82, 1); +x_92 = lean_ctor_get(x_77, 3); lean_inc(x_92); -x_93 = lean_ctor_get(x_82, 2); +x_93 = lean_ctor_get(x_77, 4); lean_inc(x_93); -x_94 = lean_ctor_get(x_82, 3); -lean_inc(x_94); -x_95 = lean_ctor_get(x_82, 4); +if (lean_is_exclusive(x_77)) { + lean_ctor_release(x_77, 0); + lean_ctor_release(x_77, 1); + lean_ctor_release(x_77, 2); + lean_ctor_release(x_77, 3); + lean_ctor_release(x_77, 4); + lean_ctor_release(x_77, 5); + x_94 = x_77; +} else { + lean_dec_ref(x_77); + x_94 = lean_box(0); +} +x_95 = lean_ctor_get(x_78, 1); lean_inc(x_95); -x_96 = lean_ctor_get(x_82, 5); -lean_inc(x_96); -x_97 = lean_ctor_get(x_82, 6); +if (lean_is_exclusive(x_78)) { + lean_ctor_release(x_78, 0); + lean_ctor_release(x_78, 1); + x_96 = x_78; +} else { + lean_dec_ref(x_78); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_88, 0); lean_inc(x_97); -if (lean_is_exclusive(x_82)) { - lean_ctor_release(x_82, 0); - lean_ctor_release(x_82, 1); - lean_ctor_release(x_82, 2); - lean_ctor_release(x_82, 3); - lean_ctor_release(x_82, 4); - lean_ctor_release(x_82, 5); - lean_ctor_release(x_82, 6); - x_98 = x_82; +x_98 = lean_ctor_get(x_88, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_88, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_88, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_88, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_88, 5); +lean_inc(x_102); +x_103 = lean_ctor_get(x_88, 6); +lean_inc(x_103); +x_104 = lean_ctor_get(x_88, 7); +lean_inc(x_104); +x_105 = lean_ctor_get_uint8(x_88, sizeof(void*)*8); +if (lean_is_exclusive(x_88)) { + lean_ctor_release(x_88, 0); + lean_ctor_release(x_88, 1); + lean_ctor_release(x_88, 2); + lean_ctor_release(x_88, 3); + lean_ctor_release(x_88, 4); + lean_ctor_release(x_88, 5); + lean_ctor_release(x_88, 6); + lean_ctor_release(x_88, 7); + x_106 = x_88; } else { - lean_dec_ref(x_82); - x_98 = lean_box(0); + lean_dec_ref(x_88); + x_106 = lean_box(0); } -if (lean_is_scalar(x_90)) { - x_99 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_96)) { + x_107 = lean_alloc_ctor(1, 2, 0); } else { - x_99 = x_90; + x_107 = x_96; } -lean_ctor_set(x_99, 0, x_1); -lean_ctor_set(x_99, 1, x_96); -if (lean_is_scalar(x_98)) { - x_100 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_107, 0, x_1); +lean_ctor_set(x_107, 1, x_102); +if (lean_is_scalar(x_106)) { + x_108 = lean_alloc_ctor(0, 8, 1); } else { - x_100 = x_98; + x_108 = x_106; } -lean_ctor_set(x_100, 0, x_91); -lean_ctor_set(x_100, 1, x_92); -lean_ctor_set(x_100, 2, x_93); -lean_ctor_set(x_100, 3, x_94); -lean_ctor_set(x_100, 4, x_95); -lean_ctor_set(x_100, 5, x_99); -lean_ctor_set(x_100, 6, x_97); -x_101 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_101, 0, x_100); -lean_ctor_set(x_101, 1, x_89); -if (lean_is_scalar(x_88)) { - x_102 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_108, 0, x_97); +lean_ctor_set(x_108, 1, x_98); +lean_ctor_set(x_108, 2, x_99); +lean_ctor_set(x_108, 3, x_100); +lean_ctor_set(x_108, 4, x_101); +lean_ctor_set(x_108, 5, x_107); +lean_ctor_set(x_108, 6, x_103); +lean_ctor_set(x_108, 7, x_104); +lean_ctor_set_uint8(x_108, sizeof(void*)*8, x_105); +x_109 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_109, 0, x_108); +lean_ctor_set(x_109, 1, x_95); +if (lean_is_scalar(x_94)) { + x_110 = lean_alloc_ctor(0, 6, 0); } else { - x_102 = x_88; + x_110 = x_94; } -lean_ctor_set(x_102, 0, x_83); -lean_ctor_set(x_102, 1, x_84); -lean_ctor_set(x_102, 2, x_85); -lean_ctor_set(x_102, 3, x_86); -lean_ctor_set(x_102, 4, x_87); -lean_ctor_set(x_102, 5, x_101); -x_103 = lean_box(0); -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_ctor_set(x_110, 0, x_89); +lean_ctor_set(x_110, 1, x_90); +lean_ctor_set(x_110, 2, x_91); +lean_ctor_set(x_110, 3, x_92); +lean_ctor_set(x_110, 4, x_93); +lean_ctor_set(x_110, 5, x_109); +x_111 = lean_box(0); +x_112 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_112, 0, x_111); +lean_ctor_set(x_112, 1, x_110); +return x_112; } } } @@ -6568,7 +6380,7 @@ x_26 = lean_string_append(x_24, x_25); lean_dec(x_25); x_27 = l_Sigma_HasRepr___rarg___closed__2; x_28 = lean_string_append(x_26, x_27); -x_29 = l_Lean_Format_flatten___main___closed__1; +x_29 = l_String_Iterator_HasRepr___closed__2; x_30 = lean_string_append(x_28, x_29); x_31 = lean_string_append(x_30, x_17); lean_dec(x_17); @@ -6650,7 +6462,7 @@ x_54 = lean_string_append(x_52, x_53); lean_dec(x_53); x_55 = l_Sigma_HasRepr___rarg___closed__2; x_56 = lean_string_append(x_54, x_55); -x_57 = l_Lean_Format_flatten___main___closed__1; +x_57 = l_String_Iterator_HasRepr___closed__2; x_58 = lean_string_append(x_56, x_57); x_59 = lean_string_append(x_58, x_45); lean_dec(x_45); @@ -6782,7 +6594,7 @@ x_92 = lean_string_append(x_90, x_91); lean_dec(x_91); x_93 = l_Sigma_HasRepr___rarg___closed__2; x_94 = lean_string_append(x_92, x_93); -x_95 = l_Lean_Format_flatten___main___closed__1; +x_95 = l_String_Iterator_HasRepr___closed__2; x_96 = lean_string_append(x_94, x_95); x_97 = lean_string_append(x_96, x_83); lean_dec(x_83); @@ -6952,159 +6764,312 @@ x_4 = lean_ctor_get(x_1, 1); x_5 = lean_box(0); x_6 = lean_unsigned_to_nat(1u); x_7 = lean_array_get(x_5, x_4, x_6); -x_8 = x_7; -lean_inc(x_2); -x_9 = l_Lean_Elab_toPreTerm(x_8, x_2, x_3); +lean_inc(x_7); +x_8 = lean_alloc_closure((void*)(l_IO_println___at___private_init_lean_parser_module_4__testModuleParserAux___main___spec__1), 2, 1); +lean_closure_set(x_8, 0, x_7); +x_9 = l_Lean_Elab_runIOUnsafe___rarg(x_8, x_2, x_3); if (lean_obj_tag(x_9) == 0) { uint8_t x_10; x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_11 = lean_ctor_get(x_9, 0); +lean_dec(x_11); x_12 = lean_box(0); lean_ctor_set(x_9, 0, x_12); -x_13 = lean_expr_dbg_to_string(x_11); -lean_dec(x_11); -x_14 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); -lean_closure_set(x_14, 0, x_13); -x_15 = l_Lean_Elab_runIOUnsafe___rarg(x_14, x_2, x_9); +x_13 = x_7; +lean_inc(x_2); +x_14 = l_Lean_Elab_toPreTerm(x_13, x_2, x_9); +if (lean_obj_tag(x_14) == 0) +{ +uint8_t x_15; +x_15 = !lean_is_exclusive(x_14); +if (x_15 == 0) +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_16 = lean_ctor_get(x_14, 0); +lean_ctor_set(x_14, 0, x_12); +x_17 = lean_expr_dbg_to_string(x_16); +lean_dec(x_16); +x_18 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +lean_closure_set(x_18, 0, x_17); +x_19 = l_Lean_Elab_runIOUnsafe___rarg(x_18, x_2, x_14); lean_dec(x_2); -if (lean_obj_tag(x_15) == 0) -{ -uint8_t x_16; -x_16 = !lean_is_exclusive(x_15); -if (x_16 == 0) -{ -lean_object* x_17; -x_17 = lean_ctor_get(x_15, 0); -lean_dec(x_17); -lean_ctor_set(x_15, 0, x_12); -return x_15; -} -else -{ -lean_object* x_18; lean_object* x_19; -x_18 = lean_ctor_get(x_15, 1); -lean_inc(x_18); -lean_dec(x_15); -x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_12); -lean_ctor_set(x_19, 1, x_18); -return x_19; -} -} -else +if (lean_obj_tag(x_19) == 0) { uint8_t x_20; -x_20 = !lean_is_exclusive(x_15); +x_20 = !lean_is_exclusive(x_19); if (x_20 == 0) { -return x_15; +lean_object* x_21; +x_21 = lean_ctor_get(x_19, 0); +lean_dec(x_21); +lean_ctor_set(x_19, 0, x_12); +return x_19; } else { -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_15, 0); -x_22 = lean_ctor_get(x_15, 1); +lean_object* x_22; lean_object* x_23; +x_22 = lean_ctor_get(x_19, 1); lean_inc(x_22); -lean_inc(x_21); -lean_dec(x_15); -x_23 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_23, 0, x_21); +lean_dec(x_19); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_12); lean_ctor_set(x_23, 1, x_22); return x_23; } } +else +{ +uint8_t x_24; +x_24 = !lean_is_exclusive(x_19); +if (x_24 == 0) +{ +return x_19; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_24 = lean_ctor_get(x_9, 0); -x_25 = lean_ctor_get(x_9, 1); +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_19, 0); +x_26 = lean_ctor_get(x_19, 1); +lean_inc(x_26); lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_9); -x_26 = lean_box(0); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_25); -x_28 = lean_expr_dbg_to_string(x_24); -lean_dec(x_24); -x_29 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); -lean_closure_set(x_29, 0, x_28); -x_30 = l_Lean_Elab_runIOUnsafe___rarg(x_29, x_2, x_27); -lean_dec(x_2); -if (lean_obj_tag(x_30) == 0) -{ -lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_30, 1); -lean_inc(x_31); -if (lean_is_exclusive(x_30)) { - lean_ctor_release(x_30, 0); - lean_ctor_release(x_30, 1); - x_32 = x_30; -} else { - lean_dec_ref(x_30); - x_32 = lean_box(0); +lean_dec(x_19); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_26); +return x_27; } -if (lean_is_scalar(x_32)) { - x_33 = lean_alloc_ctor(0, 2, 0); -} else { - x_33 = x_32; } -lean_ctor_set(x_33, 0, x_26); -lean_ctor_set(x_33, 1, x_31); -return x_33; } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_34 = lean_ctor_get(x_30, 0); +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_28 = lean_ctor_get(x_14, 0); +x_29 = lean_ctor_get(x_14, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_14); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_12); +lean_ctor_set(x_30, 1, x_29); +x_31 = lean_expr_dbg_to_string(x_28); +lean_dec(x_28); +x_32 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +lean_closure_set(x_32, 0, x_31); +x_33 = l_Lean_Elab_runIOUnsafe___rarg(x_32, x_2, x_30); +lean_dec(x_2); +if (lean_obj_tag(x_33) == 0) +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_33, 1); lean_inc(x_34); -x_35 = lean_ctor_get(x_30, 1); -lean_inc(x_35); -if (lean_is_exclusive(x_30)) { - lean_ctor_release(x_30, 0); - lean_ctor_release(x_30, 1); - x_36 = x_30; +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + x_35 = x_33; } else { - lean_dec_ref(x_30); - x_36 = lean_box(0); + lean_dec_ref(x_33); + x_35 = lean_box(0); } -if (lean_is_scalar(x_36)) { - x_37 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_35)) { + x_36 = lean_alloc_ctor(0, 2, 0); } else { - x_37 = x_36; + x_36 = x_35; } -lean_ctor_set(x_37, 0, x_34); -lean_ctor_set(x_37, 1, x_35); -return x_37; +lean_ctor_set(x_36, 0, x_12); +lean_ctor_set(x_36, 1, x_34); +return x_36; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_37 = lean_ctor_get(x_33, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_33, 1); +lean_inc(x_38); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + x_39 = x_33; +} else { + lean_dec_ref(x_33); + x_39 = lean_box(0); +} +if (lean_is_scalar(x_39)) { + x_40 = lean_alloc_ctor(1, 2, 0); +} else { + x_40 = x_39; +} +lean_ctor_set(x_40, 0, x_37); +lean_ctor_set(x_40, 1, x_38); +return x_40; } } } else { -uint8_t x_38; +uint8_t x_41; lean_dec(x_2); -x_38 = !lean_is_exclusive(x_9); -if (x_38 == 0) +x_41 = !lean_is_exclusive(x_14); +if (x_41 == 0) +{ +return x_14; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_14, 0); +x_43 = lean_ctor_get(x_14, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_14); +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +return x_44; +} +} +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_45 = lean_ctor_get(x_9, 1); +lean_inc(x_45); +lean_dec(x_9); +x_46 = lean_box(0); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_45); +x_48 = x_7; +lean_inc(x_2); +x_49 = l_Lean_Elab_toPreTerm(x_48, x_2, x_47); +if (lean_obj_tag(x_49) == 0) +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_50 = lean_ctor_get(x_49, 0); +lean_inc(x_50); +x_51 = lean_ctor_get(x_49, 1); +lean_inc(x_51); +if (lean_is_exclusive(x_49)) { + lean_ctor_release(x_49, 0); + lean_ctor_release(x_49, 1); + x_52 = x_49; +} else { + lean_dec_ref(x_49); + x_52 = lean_box(0); +} +if (lean_is_scalar(x_52)) { + x_53 = lean_alloc_ctor(0, 2, 0); +} else { + x_53 = x_52; +} +lean_ctor_set(x_53, 0, x_46); +lean_ctor_set(x_53, 1, x_51); +x_54 = lean_expr_dbg_to_string(x_50); +lean_dec(x_50); +x_55 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +lean_closure_set(x_55, 0, x_54); +x_56 = l_Lean_Elab_runIOUnsafe___rarg(x_55, x_2, x_53); +lean_dec(x_2); +if (lean_obj_tag(x_56) == 0) +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_56, 1); +lean_inc(x_57); +if (lean_is_exclusive(x_56)) { + lean_ctor_release(x_56, 0); + lean_ctor_release(x_56, 1); + x_58 = x_56; +} else { + lean_dec_ref(x_56); + x_58 = lean_box(0); +} +if (lean_is_scalar(x_58)) { + x_59 = lean_alloc_ctor(0, 2, 0); +} else { + x_59 = x_58; +} +lean_ctor_set(x_59, 0, x_46); +lean_ctor_set(x_59, 1, x_57); +return x_59; +} +else +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_60 = lean_ctor_get(x_56, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_56, 1); +lean_inc(x_61); +if (lean_is_exclusive(x_56)) { + lean_ctor_release(x_56, 0); + lean_ctor_release(x_56, 1); + x_62 = x_56; +} else { + lean_dec_ref(x_56); + x_62 = lean_box(0); +} +if (lean_is_scalar(x_62)) { + x_63 = lean_alloc_ctor(1, 2, 0); +} else { + x_63 = x_62; +} +lean_ctor_set(x_63, 0, x_60); +lean_ctor_set(x_63, 1, x_61); +return x_63; +} +} +else +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +lean_dec(x_2); +x_64 = lean_ctor_get(x_49, 0); +lean_inc(x_64); +x_65 = lean_ctor_get(x_49, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_49)) { + lean_ctor_release(x_49, 0); + lean_ctor_release(x_49, 1); + x_66 = x_49; +} else { + lean_dec_ref(x_49); + x_66 = lean_box(0); +} +if (lean_is_scalar(x_66)) { + x_67 = lean_alloc_ctor(1, 2, 0); +} else { + x_67 = x_66; +} +lean_ctor_set(x_67, 0, x_64); +lean_ctor_set(x_67, 1, x_65); +return x_67; +} +} +} +else +{ +uint8_t x_68; +lean_dec(x_7); +lean_dec(x_2); +x_68 = !lean_is_exclusive(x_9); +if (x_68 == 0) { return x_9; } else { -lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_39 = lean_ctor_get(x_9, 0); -x_40 = lean_ctor_get(x_9, 1); -lean_inc(x_40); -lean_inc(x_39); +lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_69 = lean_ctor_get(x_9, 0); +x_70 = lean_ctor_get(x_9, 1); +lean_inc(x_70); +lean_inc(x_69); lean_dec(x_9); -x_41 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_41, 0, x_39); -lean_ctor_set(x_41, 1, x_40); -return x_41; +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; } } } @@ -7155,6 +7120,77 @@ x_5 = l_Lean_addBuiltinCommandElab(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* l_IO_print___at_Lean_Elab_elabElab___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_3 = l_Lean_Syntax_formatStx___main___rarg(x_1); +x_4 = l_Lean_Options_empty; +x_5 = l_Lean_Format_pretty(x_3, x_4); +x_6 = lean_io_prim_put_str(x_5, x_2); +lean_dec(x_5); +return x_6; +} +} +lean_object* l_IO_println___at_Lean_Elab_elabElab___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_print___at_Lean_Elab_elabElab___spec__2(x_1, x_2); +if (lean_obj_tag(x_3) == 0) +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_ctor_get(x_3, 0); +lean_dec(x_5); +x_6 = lean_box(0); +lean_ctor_set(x_3, 0, x_6); +x_7 = l_IO_println___rarg___closed__1; +x_8 = lean_io_prim_put_str(x_7, x_3); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_3, 1); +lean_inc(x_9); +lean_dec(x_3); +x_10 = lean_box(0); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_9); +x_12 = l_IO_println___rarg___closed__1; +x_13 = lean_io_prim_put_str(x_12, x_11); +return x_13; +} +} +else +{ +uint8_t x_14; +x_14 = !lean_is_exclusive(x_3); +if (x_14 == 0) +{ +return x_3; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_3, 0); +x_16 = lean_ctor_get(x_3, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_3); +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +return x_17; +} +} +} +} lean_object* _init_l_Lean_Elab_elabElab___closed__1() { _start: { @@ -7188,104 +7224,203 @@ lean_inc(x_2); x_11 = l_Lean_Elab_elabTermAux___main(x_9, x_5, x_10, x_2, x_3); if (lean_obj_tag(x_11) == 0) { -lean_object* x_12; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -if (lean_obj_tag(x_12) == 4) +uint8_t x_12; +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) { -uint8_t x_13; -x_13 = !lean_is_exclusive(x_11); -if (x_13 == 0) +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_11, 0); +x_14 = lean_box(0); +lean_ctor_set(x_11, 0, x_14); +if (lean_obj_tag(x_13) == 4) { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_14 = lean_ctor_get(x_11, 0); -lean_dec(x_14); -x_15 = lean_ctor_get(x_12, 0); -lean_inc(x_15); -lean_dec(x_12); -x_16 = lean_box(0); -lean_ctor_set(x_11, 0, x_16); -x_17 = lean_expr_dbg_to_string(x_15); -lean_dec(x_15); -x_18 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); -lean_closure_set(x_18, 0, x_17); -x_19 = l_Lean_Elab_runIOUnsafe___rarg(x_18, x_2, x_11); +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_29 = lean_ctor_get(x_13, 0); +lean_inc(x_29); +lean_dec(x_13); +x_30 = lean_expr_dbg_to_string(x_29); +lean_dec(x_29); +x_31 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +lean_closure_set(x_31, 0, x_30); +x_32 = l_Lean_Elab_runIOUnsafe___rarg(x_31, x_2, x_11); lean_dec(x_2); -return x_19; -} -else -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_20 = lean_ctor_get(x_11, 1); -lean_inc(x_20); -lean_dec(x_11); -x_21 = lean_ctor_get(x_12, 0); -lean_inc(x_21); -lean_dec(x_12); -x_22 = lean_box(0); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_20); -x_24 = lean_expr_dbg_to_string(x_21); -lean_dec(x_21); -x_25 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); -lean_closure_set(x_25, 0, x_24); -x_26 = l_Lean_Elab_runIOUnsafe___rarg(x_25, x_2, x_23); -lean_dec(x_2); -return x_26; -} -} -else -{ -uint8_t x_27; -lean_dec(x_12); -lean_dec(x_2); -x_27 = !lean_is_exclusive(x_11); -if (x_27 == 0) -{ -lean_object* x_28; lean_object* x_29; -x_28 = lean_ctor_get(x_11, 0); -lean_dec(x_28); -x_29 = l_Lean_Elab_elabElab___closed__2; -lean_ctor_set_tag(x_11, 1); -lean_ctor_set(x_11, 0, x_29); -return x_11; -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_30 = lean_ctor_get(x_11, 1); -lean_inc(x_30); -lean_dec(x_11); -x_31 = l_Lean_Elab_elabElab___closed__2; -x_32 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_30); return x_32; } +else +{ +x_15 = x_14; +goto block_28; +} +block_28: +{ +lean_object* x_16; lean_object* x_17; +lean_dec(x_15); +x_16 = lean_alloc_closure((void*)(l_IO_println___at_Lean_Elab_elabElab___spec__1), 2, 1); +lean_closure_set(x_16, 0, x_13); +x_17 = l_Lean_Elab_runIOUnsafe___rarg(x_16, x_2, x_11); +lean_dec(x_2); +if (lean_obj_tag(x_17) == 0) +{ +uint8_t x_18; +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; +x_19 = lean_ctor_get(x_17, 0); +lean_dec(x_19); +x_20 = l_Lean_Elab_elabElab___closed__2; +lean_ctor_set_tag(x_17, 1); +lean_ctor_set(x_17, 0, x_20); +return x_17; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_17, 1); +lean_inc(x_21); +lean_dec(x_17); +x_22 = l_Lean_Elab_elabElab___closed__2; +x_23 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_21); +return x_23; } } else { -uint8_t x_33; +uint8_t x_24; +x_24 = !lean_is_exclusive(x_17); +if (x_24 == 0) +{ +return x_17; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_17, 0); +x_26 = lean_ctor_get(x_17, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_17); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_26); +return x_27; +} +} +} +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_33 = lean_ctor_get(x_11, 0); +x_34 = lean_ctor_get(x_11, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_11); +x_35 = lean_box(0); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_34); +if (lean_obj_tag(x_33) == 4) +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_49 = lean_ctor_get(x_33, 0); +lean_inc(x_49); +lean_dec(x_33); +x_50 = lean_expr_dbg_to_string(x_49); +lean_dec(x_49); +x_51 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +lean_closure_set(x_51, 0, x_50); +x_52 = l_Lean_Elab_runIOUnsafe___rarg(x_51, x_2, x_36); lean_dec(x_2); -x_33 = !lean_is_exclusive(x_11); -if (x_33 == 0) +return x_52; +} +else +{ +x_37 = x_35; +goto block_48; +} +block_48: +{ +lean_object* x_38; lean_object* x_39; +lean_dec(x_37); +x_38 = lean_alloc_closure((void*)(l_IO_println___at_Lean_Elab_elabElab___spec__1), 2, 1); +lean_closure_set(x_38, 0, x_33); +x_39 = l_Lean_Elab_runIOUnsafe___rarg(x_38, x_2, x_36); +lean_dec(x_2); +if (lean_obj_tag(x_39) == 0) +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_40 = lean_ctor_get(x_39, 1); +lean_inc(x_40); +if (lean_is_exclusive(x_39)) { + lean_ctor_release(x_39, 0); + lean_ctor_release(x_39, 1); + x_41 = x_39; +} else { + lean_dec_ref(x_39); + x_41 = lean_box(0); +} +x_42 = l_Lean_Elab_elabElab___closed__2; +if (lean_is_scalar(x_41)) { + x_43 = lean_alloc_ctor(1, 2, 0); +} else { + x_43 = x_41; + lean_ctor_set_tag(x_43, 1); +} +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_40); +return x_43; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_44 = lean_ctor_get(x_39, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_39, 1); +lean_inc(x_45); +if (lean_is_exclusive(x_39)) { + lean_ctor_release(x_39, 0); + lean_ctor_release(x_39, 1); + x_46 = x_39; +} else { + lean_dec_ref(x_39); + x_46 = lean_box(0); +} +if (lean_is_scalar(x_46)) { + x_47 = lean_alloc_ctor(1, 2, 0); +} else { + x_47 = x_46; +} +lean_ctor_set(x_47, 0, x_44); +lean_ctor_set(x_47, 1, x_45); +return x_47; +} +} +} +} +else +{ +uint8_t x_53; +lean_dec(x_2); +x_53 = !lean_is_exclusive(x_11); +if (x_53 == 0) { return x_11; } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_34 = lean_ctor_get(x_11, 0); -x_35 = lean_ctor_get(x_11, 1); -lean_inc(x_35); -lean_inc(x_34); +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_11, 0); +x_55 = lean_ctor_get(x_11, 1); +lean_inc(x_55); +lean_inc(x_54); lean_dec(x_11); -x_36 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_36, 0, x_34); -lean_ctor_set(x_36, 1, x_35); -return x_36; +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; } } } diff --git a/src/stage0/init/lean/elaborator/preterm.c b/src/stage0/init/lean/elaborator/preterm.c index ad249dd60d..c0e1f01366 100644 --- a/src/stage0/init/lean/elaborator/preterm.c +++ b/src/stage0/init/lean/elaborator/preterm.c @@ -13,9 +13,11 @@ #ifdef __cplusplus extern "C" { #endif +lean_object* l___regBuiltinTermElab_Lean_Elab_convertId(lean_object*); extern lean_object* l_Lean_Parser_Level_num___elambda__1___rarg___closed__2; lean_object* l_Lean_mkPreTypeAscription___closed__3; lean_object* lean_expr_mk_mdata(lean_object*, lean_object*); +lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addBuiltinPreTermElab(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertSorry___closed__1; lean_object* l_Lean_registerBuiltinPreTermElabAttr___closed__2; @@ -23,16 +25,26 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_convertSorry(lean_object*); lean_object* l_Lean_registerBuiltinPreTermElabAttr___closed__3; lean_object* l_Lean_registerBuiltinPreTermElabAttr___closed__5; uint8_t lean_name_dec_eq(lean_object*, lean_object*); +lean_object* l_Array_miterateAux___main___at___private_init_lean_elaborator_preterm_6__processBinders___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_local_ctx_find_from_user_name(lean_object*, lean_object*); lean_object* lean_expr_mk_sort(lean_object*); +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__5; lean_object* l_Lean_Syntax_getKind___rarg(lean_object*); lean_object* l_HashMapImp_find___at_Lean_Elab_toPreTerm___spec__1(lean_object*, lean_object*); +extern lean_object* l_Array_empty___closed__1; +lean_object* l_Lean_mkAsPattern___closed__1; lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertHole(lean_object*); +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_runIOUnsafe___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_List_tail___rarg(lean_object*); lean_object* l_Array_mkArray(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_println___at_HasRepr_HasEval___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_builtinPreTermElabTable; lean_object* l_Lean_Elab_convertType___rarg(lean_object*); lean_object* l_Lean_Elab_toLevel___main___closed__4; +lean_object* l_Lean_Elab_mkForall(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_convertId___closed__1; lean_object* l___private_init_lean_elaborator_preterm_2__setPos___closed__4; lean_object* l_Lean_Elab_convertSorry___rarg___closed__3; lean_object* l_Lean_registerBuiltinPreTermElabAttr___lambda__1___closed__4; @@ -42,25 +54,34 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_convertHole___closed__3; extern lean_object* l_Lean_Parser_Level_max___elambda__1___closed__1; lean_object* l___private_init_lean_elaborator_preterm_2__setPos___closed__2; lean_object* l_HashMapImp_insert___at_Lean_addBuiltinPreTermElab___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_miterateAux___main___at___private_init_lean_elaborator_preterm_6__processBinders___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_addBuiltinTermElab___closed__2; -lean_object* lean_expr_mk_pi(lean_object*, uint8_t, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_binderDefault___elambda__1___rarg___closed__1; lean_object* l_Lean_mkBuiltinPreTermElabTable___closed__1; -lean_object* l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__2; +lean_object* l_Lean_Elab_mkLocalDecl(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Elab_convertProp___rarg(lean_object*); +lean_object* l_Lean_Syntax_formatStx___main___rarg(lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertSort___closed__3; lean_object* l_Lean_registerAttribute(lean_object*, lean_object*); lean_object* l___private_init_lean_elaborator_preterm_2__setPos___closed__1; +lean_object* l___private_init_lean_elaborator_preterm_5__processBinder___closed__2; lean_object* l_Lean_Elab_logError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertSortApp___closed__2; lean_object* level_mk_mvar(lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertSortApp___closed__1; lean_object* l_Lean_registerBuiltinPreTermElabAttr___closed__7; +lean_object* lean_expr_local(lean_object*, lean_object*, lean_object*, uint8_t); +lean_object* l___regBuiltinTermElab_Lean_Elab_convertId___closed__3; lean_object* lean_expr_mk_app(lean_object*, lean_object*); lean_object* l_Lean_Elab_convertSort___boxed(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertType___closed__5; lean_object* l_Lean_mkPreTypeAscriptionIfSome(lean_object*, lean_object*); +lean_object* l_Lean_Elab_convertId(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KVMap_setNat(lean_object*, lean_object*, lean_object*); +lean_object* l_List_head___at_Lean_Elab_getScope___spec__1(lean_object*); lean_object* l_Lean_Elab_convertType(lean_object*, lean_object*); +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_convertForall(lean_object*, lean_object*, lean_object*); lean_object* l_Array_uget(lean_object*, lean_object*, size_t, lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); lean_object* l_Lean_mkPreTypeAscription___closed__1; @@ -69,19 +90,25 @@ extern lean_object* l_Lean_Parser_Level_hole___elambda__1___rarg___closed__2; lean_object* l_Array_uset(lean_object*, lean_object*, size_t, lean_object*, lean_object*); uint8_t l_AssocList_contains___main___at_Lean_addBuiltinPreTermElab___spec__2(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertProp___closed__1; +lean_object* l___regBuiltinTermElab_Lean_Elab_convertForall___closed__1; extern lean_object* l_Lean_Parser_Term_sorry___elambda__1___rarg___closed__2; lean_object* l_IO_Prim_Ref_set(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinPreTermElabAttr___closed__4; lean_object* l___regBuiltinTermElab_Lean_Elab_convertSortApp___closed__3; +lean_object* l___private_init_lean_elaborator_preterm_3__mkHoleFor(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_Elab_toLevel___main___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Options_empty; lean_object* l_Lean_mkPreTypeAscription___closed__2; +extern lean_object* l_Lean_Parser_Term_explicitBinder___elambda__1___closed__2; lean_object* l_Lean_Elab_toLevel___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_toPreTerm___closed__2; lean_object* l_Lean_Elab_toLevel___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_declareBuiltinPreTermElab___closed__2; +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__6; lean_object* l___regBuiltinTermElab_Lean_Elab_convertType___closed__1; lean_object* l_Lean_Level_ofNat___main(lean_object*); lean_object* l_AssocList_find___main___at_Lean_Elab_toPreTerm___spec__2(lean_object*, lean_object*); +lean_object* lean_expr_mk_fvar(lean_object*); lean_object* l___private_init_lean_elaborator_preterm_1__dummy___closed__1; lean_object* l_IO_Prim_Ref_get___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertType___closed__3; @@ -89,19 +116,28 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_convertSort___closed__2; lean_object* l_Lean_registerBuiltinPreTermElabAttr___lambda__1___closed__3; lean_object* l_Lean_declareBuiltinPreTermElab___closed__1; lean_object* l_mkHashMap___at_Lean_mkBuiltinPreTermElabTable___spec__1(lean_object*); +lean_object* l_Lean_mkAsPattern___closed__2; lean_object* l_Lean_Elab_convertHole(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_implicitBinder___elambda__1___closed__2; extern lean_object* l_Lean_AttributeImpl_inhabited___closed__4; lean_object* l_Lean_oldElaborateAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___regBuiltinTermElab_Lean_Elab_convertId___closed__2; lean_object* l___private_init_lean_elaborator_preterm_1__dummy; lean_object* l_Lean_registerBuiltinPreTermElabAttr___closed__1; +lean_object* l___private_init_lean_elaborator_preterm_3__mkHoleFor___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_find___at_Lean_Elab_toPreTerm___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinPreTermElabAttr(lean_object*); lean_object* lean_expr_mk_const(lean_object*, lean_object*); lean_object* l_Lean_Elab_convertSort(lean_object*, lean_object*); +lean_object* l_Lean_mkAsPattern(lean_object*, lean_object*); size_t lean_name_hash_usize(lean_object*); lean_object* l_Lean_Elab_toPreTerm___closed__1; +lean_object* l_Lean_Elab_localContext___rarg(lean_object*); +lean_object* l___private_init_lean_elaborator_preterm_5__processBinder___closed__1; lean_object* lean_old_elaborate(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_LocalDecl_userName(lean_object*); +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__4; lean_object* l_Lean_Syntax_getArg___rarg(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_Elab_toLevel___main___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_toLevel___main___closed__2; @@ -111,8 +147,9 @@ lean_object* l_Lean_Elab_convertSortApp(lean_object*, lean_object*, lean_object* lean_object* lean_string_append(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_hole___elambda__1___rarg___closed__1; lean_object* l_Lean_registerBuiltinPreTermElabAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_convertHole___rarg___closed__1; +lean_object* l___private_init_lean_elaborator_preterm_5__processBinder(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KVMap_setName(lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_lean_elaborator_preterm_6__processBinders(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_sort___elambda__1___rarg___closed__2; uint8_t l_Lean_Syntax_isOfKind___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_convertHole___boxed(lean_object*, lean_object*); @@ -126,58 +163,68 @@ extern lean_object* l_Char_HasRepr___closed__1; lean_object* l_Lean_mkPreTypeAscription(lean_object*, lean_object*); extern lean_object* l_Lean_addBuiltinTermElab___closed__1; lean_object* l___regBuiltinTermElab_Lean_Elab_convertType___closed__4; +lean_object* l_Lean_Syntax_getId___rarg(lean_object*); lean_object* l___private_init_lean_elaborator_preterm_1__dummy___closed__2; lean_object* l_Lean_Elab_getUniverses___rarg(lean_object*); lean_object* l_Array_fget(lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); +uint8_t l_Lean_LocalDecl_binderInfo(lean_object*); lean_object* l_Lean_registerBuiltinPreTermElabAttr___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertProp(lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertSorry___closed__2; uint8_t l_HashMapImp_contains___at_Lean_addBuiltinPreTermElab___spec__1(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_sortApp___elambda__1___closed__2; +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; lean_object* l_Lean_Elab_convertSort___rarg(lean_object*); +extern lean_object* l_Lean_Parser_Term_instBinder___elambda__1___rarg___closed__2; lean_object* l_Lean_addBuiltinPreTermElab___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_AssocList_find___main___at_Lean_Elab_toPreTerm___spec__2___boxed(lean_object*, lean_object*); lean_object* level_mk_imax(lean_object*, lean_object*); lean_object* l_Lean_syntaxNodeKindOfAttrParam(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__2; lean_object* l___regBuiltinTermElab_Lean_Elab_convertSorry___closed__3; lean_object* l_Lean_registerBuiltinPreTermElabAttr___closed__6; +lean_object* l___regBuiltinTermElab_Lean_Elab_convertForall___closed__2; lean_object* l_IO_Prim_mkRef(lean_object*, lean_object*, lean_object*); +lean_object* l___regBuiltinTermElab_Lean_Elab_convertForall(lean_object*); +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__3; extern lean_object* l_Lean_Parser_Level_paren___elambda__1___rarg___closed__4; +lean_object* l_Lean_Elab_convertId___boxed(lean_object*, lean_object*, lean_object*); uint8_t l_List_elem___main___at_Lean_Parser_addBuiltinLeadingParser___spec__4(lean_object*, lean_object*); lean_object* l___private_init_lean_elaborator_preterm_2__setPos(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_expand___at_Lean_addBuiltinPreTermElab___spec__4(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertType(lean_object*); extern lean_object* l_Lean_Level_one___closed__1; +lean_object* l_Lean_LocalDecl_type(lean_object*); lean_object* l_Lean_mkAsIs___closed__2; lean_object* l_HashMapImp_moveEntries___main___at_Lean_addBuiltinPreTermElab___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_convertSorry___rarg___closed__2; lean_object* lean_expr_mk_mvar(lean_object*); lean_object* l_Lean_Elab_toPreTerm___closed__3; +lean_object* l___private_init_lean_elaborator_preterm_4__mkLocal___boxed(lean_object*); lean_object* level_mk_param(lean_object*); extern lean_object* l_Lean_Parser_Term_app___elambda__1___closed__2; -lean_object* l_Lean_Elab_convertArrow___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_convertArrow(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* level_mk_succ(lean_object*); lean_object* l_Lean_mkAsIs___closed__1; extern lean_object* l_System_FilePath_dirName___closed__1; +extern lean_object* l_Lean_Parser_Term_id___elambda__1___closed__2; lean_object* l_Lean_Elab_toLevel___main___closed__1; lean_object* l_IO_Prim_Ref_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_mkAnnotation___closed__1; size_t lean_usize_modn(size_t, lean_object*); -lean_object* l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__1; +lean_object* l___regBuiltinTermElab_Lean_Elab_convertId___closed__1; lean_object* l_Lean_Syntax_getIdAt___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_convertSorry___boxed(lean_object*, lean_object*); lean_object* l_Lean_ConstantInfo_type(lean_object*); +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_mkAnnotation(lean_object*, lean_object*); lean_object* l_Lean_mkBuiltinPreTermElabTable(lean_object*); lean_object* lean_environment_find(lean_object*, lean_object*); lean_object* l_Lean_Elab_convertSorry___rarg___closed__4; -lean_object* l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__3; lean_object* l___regBuiltinTermElab_Lean_Elab_convertSort___closed__1; -extern lean_object* l_Lean_Parser_Term_arrow___elambda__1___closed__2; lean_object* l_Lean_Elab_toPreTerm(lean_object*, lean_object*, lean_object*); lean_object* l_AssocList_mfoldl___main___at_Lean_addBuiltinPreTermElab___spec__6(lean_object*, lean_object*); lean_object* l_Lean_Level_addOffsetAux___main(lean_object*, lean_object*); @@ -190,50 +237,62 @@ lean_object* l_Array_get(lean_object*, lean_object*, lean_object*, lean_object*) lean_object* l_Lean_Elab_convertType___boxed(lean_object*, lean_object*); lean_object* l_mkHashMapImp___rarg(lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_Elab_toLevel___main___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_binderTactic___elambda__1___rarg___closed__1; lean_object* l___regBuiltinTermElab_Lean_Elab_convertSortApp(lean_object*); extern lean_object* l_Lean_Parser_Level_ident___elambda__1___rarg___closed__1; lean_object* l_Lean_registerBuiltinPreTermElabAttr___lambda__1___closed__2; lean_object* l_Array_miterateAux___main___at_Lean_Elab_toLevel___main___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_nameToExprAux___main___closed__4; +extern lean_object* l_Lean_Parser_Term_forall___elambda__1___closed__2; uint8_t lean_nat_dec_le(lean_object*, lean_object*); -lean_object* l___regBuiltinTermElab_Lean_Elab_convertArrow(lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertSort(lean_object*); +lean_object* l___regBuiltinTermElab_Lean_Elab_convertForall___closed__3; lean_object* l_Lean_Syntax_toNat___rarg(lean_object*); +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__1; lean_object* l_Lean_Syntax_getPos___rarg(lean_object*); extern lean_object* l_Lean_Parser_Level_imax___elambda__1___closed__1; lean_object* l___regBuiltinTermElab_Lean_Elab_convertHole___closed__2; lean_object* l_Lean_Elab_convertProp(lean_object*, lean_object*); lean_object* l_Lean_Elab_getScope___rarg(lean_object*); +lean_object* l___private_init_lean_elaborator_preterm_4__mkLocal(lean_object*); lean_object* l_AssocList_replace___main___at_Lean_addBuiltinPreTermElab___spec__7(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_convertProp___boxed(lean_object*, lean_object*); lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*); lean_object* l_Lean_declareBuiltinElab(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_logErrorAndThrow___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getNumArgs___rarg(lean_object*); lean_object* l_Lean_Elab_convertSorry(lean_object*, lean_object*); lean_object* l_Lean_Elab_convertSortApp___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertProp___closed__2; lean_object* l_Lean_Elab_logMessage(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_toLevel___main___closed__3; lean_object* l_Lean_Elab_toLevel___main___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_miterateAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_oldElaborate(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_init_lean_elaborator_preterm_2__setPos___closed__3; lean_object* lean_nat_mul(lean_object*, lean_object*); lean_object* l_AssocList_contains___main___at_Lean_addBuiltinPreTermElab___spec__2___boxed(lean_object*, lean_object*); +lean_object* l___private_init_lean_elaborator_preterm_6__processBinders___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_init_lean_elaborator_preterm_3__mkHoleFor___closed__1; lean_object* l_Lean_Expr_mkAnnotation___closed__2; lean_object* l_Lean_Elab_convertSorry___rarg___closed__1; +extern lean_object* l_Lean_Parser_Term_simpleBinder___elambda__1___closed__2; lean_object* l___regBuiltinTermElab_Lean_Elab_convertType___closed__2; +lean_object* l___private_init_lean_elaborator_preterm_5__processBinder___closed__4; lean_object* l_IO_Prim_Ref_reset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAsIs(lean_object*); -lean_object* l_Lean_Elab_mkFreshName___rarg(lean_object*); lean_object* l_Lean_Elab_convertType___rarg___closed__1; extern lean_object* l_Lean_exprIsInhabited___closed__1; +lean_object* l_Lean_Elab_convertForall___boxed(lean_object*, lean_object*, lean_object*); lean_object* level_mk_max(lean_object*, lean_object*); +lean_object* l___private_init_lean_elaborator_preterm_5__processBinder___closed__3; lean_object* l_Lean_registerBuiltinPreTermElabAttr___lambda__1___closed__5; lean_object* l___private_init_lean_elaborator_preterm_2__setPos___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertProp___closed__3; lean_object* l_Lean_declareBuiltinPreTermElab(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_String_splitAux___main___closed__1; +lean_object* l_Lean_LocalDecl_name(lean_object*); lean_object* l_Lean_Elab_toPreTerm___closed__4; lean_object* l_Lean_oldElaborateAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: @@ -1551,6 +1610,35 @@ x_3 = l_Lean_Expr_mkAnnotation(x_2, x_1); return x_3; } } +lean_object* _init_l_Lean_mkAsPattern___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("as_pattern"); +return x_1; +} +} +lean_object* _init_l_Lean_mkAsPattern___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_mkAsPattern___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_mkAsPattern(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_3 = lean_expr_mk_fvar(x_1); +x_4 = lean_expr_mk_app(x_3, x_2); +x_5 = l_Lean_mkAsPattern___closed__2; +x_6 = l_Lean_Expr_mkAnnotation(x_5, x_4); +return x_6; +} +} lean_object* _init_l_Lean_mkPreTypeAscription___closed__1() { _start: { @@ -3131,6 +3219,34 @@ lean_dec(x_1); return x_3; } } +lean_object* _init_l___private_init_lean_elaborator_preterm_3__mkHoleFor___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_expr_mk_mvar(x_1); +return x_2; +} +} +lean_object* l___private_init_lean_elaborator_preterm_3__mkHoleFor(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = l___private_init_lean_elaborator_preterm_3__mkHoleFor___closed__1; +x_5 = l___private_init_lean_elaborator_preterm_2__setPos(x_1, x_4, x_2, x_3); +return x_5; +} +} +lean_object* l___private_init_lean_elaborator_preterm_3__mkHoleFor___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_init_lean_elaborator_preterm_3__mkHoleFor(x_1, x_2, x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} lean_object* _init_l_Lean_Elab_convertType___rarg___closed__1() { _start: { @@ -3549,390 +3665,2104 @@ x_5 = l_Lean_addBuiltinPreTermElab(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* l_Lean_Elab_convertArrow(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l___private_init_lean_elaborator_preterm_4__mkLocal(lean_object* x_1) { _start: { -lean_object* x_4; -x_4 = l_Lean_Elab_mkFreshName___rarg(x_3); -if (lean_obj_tag(x_4) == 0) -{ -uint8_t x_5; -x_5 = !lean_is_exclusive(x_4); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_6 = lean_ctor_get(x_4, 0); -x_7 = lean_ctor_get(x_1, 1); -x_8 = lean_box(0); -lean_ctor_set(x_4, 0, x_8); -x_9 = lean_box(0); -x_10 = lean_unsigned_to_nat(0u); -x_11 = lean_array_get(x_9, x_7, x_10); -lean_inc(x_2); -x_12 = l_Lean_Elab_toPreTerm(x_11, x_2, x_4); -if (lean_obj_tag(x_12) == 0) -{ -uint8_t x_13; -x_13 = !lean_is_exclusive(x_12); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_14 = lean_ctor_get(x_12, 0); -lean_ctor_set(x_12, 0, x_8); -x_15 = lean_unsigned_to_nat(2u); -x_16 = lean_array_get(x_9, x_7, x_15); -x_17 = l_Lean_Elab_toPreTerm(x_16, x_2, x_12); -if (lean_obj_tag(x_17) == 0) -{ -uint8_t x_18; -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -lean_object* x_19; uint8_t x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = 0; -x_21 = lean_expr_mk_pi(x_6, x_20, x_14, x_19); -lean_ctor_set(x_17, 0, x_21); -return x_17; -} -else -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; lean_object* x_25; lean_object* x_26; -x_22 = lean_ctor_get(x_17, 0); -x_23 = lean_ctor_get(x_17, 1); -lean_inc(x_23); -lean_inc(x_22); -lean_dec(x_17); -x_24 = 0; -x_25 = lean_expr_mk_pi(x_6, x_24, x_14, x_22); -x_26 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_26, 0, x_25); -lean_ctor_set(x_26, 1, x_23); -return x_26; +lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; +x_2 = l_Lean_LocalDecl_name(x_1); +x_3 = l_Lean_LocalDecl_userName(x_1); +x_4 = l_Lean_LocalDecl_type(x_1); +x_5 = l_Lean_LocalDecl_binderInfo(x_1); +x_6 = lean_expr_local(x_2, x_3, x_4, x_5); +return x_6; } } -else -{ -uint8_t x_27; -lean_dec(x_14); -lean_dec(x_6); -x_27 = !lean_is_exclusive(x_17); -if (x_27 == 0) -{ -return x_17; -} -else -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_17, 0); -x_29 = lean_ctor_get(x_17, 1); -lean_inc(x_29); -lean_inc(x_28); -lean_dec(x_17); -x_30 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_31 = lean_ctor_get(x_12, 0); -x_32 = lean_ctor_get(x_12, 1); -lean_inc(x_32); -lean_inc(x_31); -lean_dec(x_12); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_8); -lean_ctor_set(x_33, 1, x_32); -x_34 = lean_unsigned_to_nat(2u); -x_35 = lean_array_get(x_9, x_7, x_34); -x_36 = l_Lean_Elab_toPreTerm(x_35, x_2, x_33); -if (lean_obj_tag(x_36) == 0) -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; lean_object* x_41; lean_object* x_42; -x_37 = lean_ctor_get(x_36, 0); -lean_inc(x_37); -x_38 = lean_ctor_get(x_36, 1); -lean_inc(x_38); -if (lean_is_exclusive(x_36)) { - lean_ctor_release(x_36, 0); - lean_ctor_release(x_36, 1); - x_39 = x_36; -} else { - lean_dec_ref(x_36); - x_39 = lean_box(0); -} -x_40 = 0; -x_41 = lean_expr_mk_pi(x_6, x_40, x_31, x_37); -if (lean_is_scalar(x_39)) { - x_42 = lean_alloc_ctor(0, 2, 0); -} else { - x_42 = x_39; -} -lean_ctor_set(x_42, 0, x_41); -lean_ctor_set(x_42, 1, x_38); -return x_42; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; -lean_dec(x_31); -lean_dec(x_6); -x_43 = lean_ctor_get(x_36, 0); -lean_inc(x_43); -x_44 = lean_ctor_get(x_36, 1); -lean_inc(x_44); -if (lean_is_exclusive(x_36)) { - lean_ctor_release(x_36, 0); - lean_ctor_release(x_36, 1); - x_45 = x_36; -} else { - lean_dec_ref(x_36); - x_45 = lean_box(0); -} -if (lean_is_scalar(x_45)) { - x_46 = lean_alloc_ctor(1, 2, 0); -} else { - x_46 = x_45; -} -lean_ctor_set(x_46, 0, x_43); -lean_ctor_set(x_46, 1, x_44); -return x_46; -} -} -} -else -{ -uint8_t x_47; -lean_dec(x_6); -lean_dec(x_2); -x_47 = !lean_is_exclusive(x_12); -if (x_47 == 0) -{ -return x_12; -} -else -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_48 = lean_ctor_get(x_12, 0); -x_49 = lean_ctor_get(x_12, 1); -lean_inc(x_49); -lean_inc(x_48); -lean_dec(x_12); -x_50 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_50, 0, x_48); -lean_ctor_set(x_50, 1, x_49); -return x_50; -} -} -} -else -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_51 = lean_ctor_get(x_4, 0); -x_52 = lean_ctor_get(x_4, 1); -lean_inc(x_52); -lean_inc(x_51); -lean_dec(x_4); -x_53 = lean_ctor_get(x_1, 1); -x_54 = lean_box(0); -x_55 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_55, 0, x_54); -lean_ctor_set(x_55, 1, x_52); -x_56 = lean_box(0); -x_57 = lean_unsigned_to_nat(0u); -x_58 = lean_array_get(x_56, x_53, x_57); -lean_inc(x_2); -x_59 = l_Lean_Elab_toPreTerm(x_58, x_2, x_55); -if (lean_obj_tag(x_59) == 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_59, 0); -lean_inc(x_60); -x_61 = lean_ctor_get(x_59, 1); -lean_inc(x_61); -if (lean_is_exclusive(x_59)) { - lean_ctor_release(x_59, 0); - lean_ctor_release(x_59, 1); - x_62 = x_59; -} else { - lean_dec_ref(x_59); - x_62 = lean_box(0); -} -if (lean_is_scalar(x_62)) { - x_63 = lean_alloc_ctor(0, 2, 0); -} else { - x_63 = x_62; -} -lean_ctor_set(x_63, 0, x_54); -lean_ctor_set(x_63, 1, x_61); -x_64 = lean_unsigned_to_nat(2u); -x_65 = lean_array_get(x_56, x_53, x_64); -x_66 = l_Lean_Elab_toPreTerm(x_65, x_2, x_63); -if (lean_obj_tag(x_66) == 0) -{ -lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; lean_object* x_71; lean_object* x_72; -x_67 = lean_ctor_get(x_66, 0); -lean_inc(x_67); -x_68 = lean_ctor_get(x_66, 1); -lean_inc(x_68); -if (lean_is_exclusive(x_66)) { - lean_ctor_release(x_66, 0); - lean_ctor_release(x_66, 1); - x_69 = x_66; -} else { - lean_dec_ref(x_66); - x_69 = lean_box(0); -} -x_70 = 0; -x_71 = lean_expr_mk_pi(x_51, x_70, x_60, x_67); -if (lean_is_scalar(x_69)) { - x_72 = lean_alloc_ctor(0, 2, 0); -} else { - x_72 = x_69; -} -lean_ctor_set(x_72, 0, x_71); -lean_ctor_set(x_72, 1, x_68); -return x_72; -} -else -{ -lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; -lean_dec(x_60); -lean_dec(x_51); -x_73 = lean_ctor_get(x_66, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_66, 1); -lean_inc(x_74); -if (lean_is_exclusive(x_66)) { - lean_ctor_release(x_66, 0); - lean_ctor_release(x_66, 1); - x_75 = x_66; -} else { - lean_dec_ref(x_66); - x_75 = lean_box(0); -} -if (lean_is_scalar(x_75)) { - x_76 = lean_alloc_ctor(1, 2, 0); -} else { - x_76 = x_75; -} -lean_ctor_set(x_76, 0, x_73); -lean_ctor_set(x_76, 1, x_74); -return x_76; -} -} -else -{ -lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; -lean_dec(x_51); -lean_dec(x_2); -x_77 = lean_ctor_get(x_59, 0); -lean_inc(x_77); -x_78 = lean_ctor_get(x_59, 1); -lean_inc(x_78); -if (lean_is_exclusive(x_59)) { - lean_ctor_release(x_59, 0); - lean_ctor_release(x_59, 1); - x_79 = x_59; -} else { - lean_dec_ref(x_59); - x_79 = lean_box(0); -} -if (lean_is_scalar(x_79)) { - x_80 = lean_alloc_ctor(1, 2, 0); -} else { - x_80 = x_79; -} -lean_ctor_set(x_80, 0, x_77); -lean_ctor_set(x_80, 1, x_78); -return x_80; -} -} -} -else -{ -uint8_t x_81; -lean_dec(x_2); -x_81 = !lean_is_exclusive(x_4); -if (x_81 == 0) -{ -return x_4; -} -else -{ -lean_object* x_82; lean_object* x_83; lean_object* x_84; -x_82 = lean_ctor_get(x_4, 0); -x_83 = lean_ctor_get(x_4, 1); -lean_inc(x_83); -lean_inc(x_82); -lean_dec(x_4); -x_84 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_84, 0, x_82); -lean_ctor_set(x_84, 1, x_83); -return x_84; -} -} -} -} -lean_object* l_Lean_Elab_convertArrow___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l___private_init_lean_elaborator_preterm_4__mkLocal___boxed(lean_object* x_1) { _start: { -lean_object* x_4; -x_4 = l_Lean_Elab_convertArrow(x_1, x_2, x_3); +lean_object* x_2; +x_2 = l___private_init_lean_elaborator_preterm_4__mkLocal(x_1); lean_dec(x_1); -return x_4; +return x_2; } } -lean_object* _init_l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__1() { +lean_object* _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string("convertArrow"); +x_1 = lean_mk_string("unknown binder default value annotation"); return x_1; } } -lean_object* _init_l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__2() { +lean_object* _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__1; +x_2 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("old elaborator does not support tactics in parameters"); +return x_1; +} +} +lean_object* _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("optParam"); +return x_1; +} +} +lean_object* _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___regBuiltinTermElab_Lean_Elab_convertType___closed__2; -x_2 = l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__1; +x_1 = lean_box(0); +x_2 = l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__4; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* _init_l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__3() { +lean_object* _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__5; +x_3 = lean_expr_mk_const(x_2, x_1); +return x_3; +} +} +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; uint8_t x_9; +x_8 = lean_array_get_size(x_5); +x_9 = lean_nat_dec_lt(x_4, x_8); +lean_dec(x_8); +if (x_9 == 0) +{ +uint8_t x_10; +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_1); +x_10 = !lean_is_exclusive(x_7); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_7, 0); +lean_dec(x_11); +x_12 = l_Array_empty___closed__1; +x_13 = x_5; +lean_ctor_set(x_7, 0, x_13); +return x_7; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_14 = lean_ctor_get(x_7, 1); +lean_inc(x_14); +lean_dec(x_7); +x_15 = l_Array_empty___closed__1; +x_16 = x_5; +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_14); +return x_17; +} +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_50; lean_object* x_51; lean_object* x_87; lean_object* x_88; uint8_t x_89; +x_18 = lean_array_fget(x_5, x_4); +x_19 = lean_box(0); +lean_inc(x_18); +x_20 = x_19; +x_21 = lean_array_fset(x_5, x_4, x_20); +x_22 = l_Lean_Syntax_getId___rarg(x_18); +x_87 = l_Lean_Syntax_getNumArgs___rarg(x_2); +x_88 = lean_unsigned_to_nat(0u); +x_89 = lean_nat_dec_eq(x_87, x_88); +lean_dec(x_87); +if (x_89 == 0) +{ +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_unsigned_to_nat(1u); +x_91 = l_Lean_Syntax_getArg___rarg(x_2, x_90); +lean_inc(x_6); +x_92 = l_Lean_Elab_toPreTerm(x_91, x_6, x_7); +if (lean_obj_tag(x_92) == 0) +{ +lean_object* x_93; lean_object* x_94; +x_93 = lean_ctor_get(x_92, 0); +lean_inc(x_93); +x_94 = lean_ctor_get(x_92, 1); +lean_inc(x_94); +lean_dec(x_92); +x_50 = x_93; +x_51 = x_94; +goto block_86; +} +else +{ +uint8_t x_95; +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_18); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_1); +x_95 = !lean_is_exclusive(x_92); +if (x_95 == 0) +{ +return x_92; +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_96 = lean_ctor_get(x_92, 0); +x_97 = lean_ctor_get(x_92, 1); +lean_inc(x_97); +lean_inc(x_96); +lean_dec(x_92); +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_99; +x_99 = l___private_init_lean_elaborator_preterm_3__mkHoleFor(x_18, x_6, x_7); +if (lean_obj_tag(x_99) == 0) +{ +lean_object* x_100; lean_object* x_101; +x_100 = lean_ctor_get(x_99, 0); +lean_inc(x_100); +x_101 = lean_ctor_get(x_99, 1); +lean_inc(x_101); +lean_dec(x_99); +x_50 = x_100; +x_51 = x_101; +goto block_86; +} +else +{ +uint8_t x_102; +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_18); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_1); +x_102 = !lean_is_exclusive(x_99); +if (x_102 == 0) +{ +return x_99; +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_103 = lean_ctor_get(x_99, 0); +x_104 = lean_ctor_get(x_99, 1); +lean_inc(x_104); +lean_inc(x_103); +lean_dec(x_99); +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; +} +} +} +block_49: +{ +lean_object* x_25; uint8_t x_26; lean_object* x_27; +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_19); +lean_ctor_set(x_25, 1, x_24); +x_26 = 0; +x_27 = l_Lean_Elab_mkLocalDecl(x_22, x_23, x_26, x_6, x_25); +if (lean_obj_tag(x_27) == 0) +{ +uint8_t x_28; +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_29 = lean_ctor_get(x_27, 0); +x_30 = l___private_init_lean_elaborator_preterm_4__mkLocal(x_29); +lean_dec(x_29); +lean_ctor_set(x_27, 0, x_19); +x_31 = lean_unsigned_to_nat(1u); +x_32 = lean_nat_add(x_4, x_31); +x_33 = x_30; +x_34 = lean_array_fset(x_21, x_4, x_33); +lean_dec(x_4); +x_4 = x_32; +x_5 = x_34; +x_7 = x_27; +goto _start; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_36 = lean_ctor_get(x_27, 0); +x_37 = lean_ctor_get(x_27, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_27); +x_38 = l___private_init_lean_elaborator_preterm_4__mkLocal(x_36); +lean_dec(x_36); +x_39 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_39, 0, x_19); +lean_ctor_set(x_39, 1, x_37); +x_40 = lean_unsigned_to_nat(1u); +x_41 = lean_nat_add(x_4, x_40); +x_42 = x_38; +x_43 = lean_array_fset(x_21, x_4, x_42); +lean_dec(x_4); +x_4 = x_41; +x_5 = x_43; +x_7 = x_39; +goto _start; +} +} +else +{ +uint8_t x_45; +lean_dec(x_21); +lean_dec(x_18); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_1); +x_45 = !lean_is_exclusive(x_27); +if (x_45 == 0) +{ +return x_27; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_27, 0); +x_47 = lean_ctor_get(x_27, 1); +lean_inc(x_47); +lean_inc(x_46); +lean_dec(x_27); +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; +} +} +} +block_86: +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; +lean_inc(x_51); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_19); +lean_ctor_set(x_52, 1, x_51); +x_53 = l_Lean_Syntax_getNumArgs___rarg(x_3); +x_54 = lean_unsigned_to_nat(0u); +x_55 = lean_nat_dec_eq(x_53, x_54); +lean_dec(x_53); +if (x_55 == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60; +x_56 = l_Lean_Syntax_getArg___rarg(x_3, x_54); +x_57 = l_Lean_Syntax_getKind___rarg(x_56); +x_58 = l_Lean_Parser_Term_binderDefault___elambda__1___rarg___closed__1; +lean_inc(x_1); +x_59 = lean_name_mk_string(x_1, x_58); +x_60 = lean_name_dec_eq(x_57, x_59); +lean_dec(x_59); +if (x_60 == 0) +{ +lean_object* x_61; lean_object* x_62; uint8_t x_63; +lean_dec(x_56); +lean_dec(x_50); +x_61 = l_Lean_Parser_Term_binderTactic___elambda__1___rarg___closed__1; +lean_inc(x_1); +x_62 = lean_name_mk_string(x_1, x_61); +x_63 = lean_name_dec_eq(x_57, x_62); +lean_dec(x_62); +lean_dec(x_57); +if (x_63 == 0) +{ +lean_object* x_64; lean_object* x_65; +lean_dec(x_52); +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_18); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_1); +x_64 = l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__2; +x_65 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_65, 0, x_64); +lean_ctor_set(x_65, 1, x_51); +return x_65; +} +else +{ +lean_object* x_66; lean_object* x_67; +lean_dec(x_51); +x_66 = l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__3; +x_67 = l_Lean_Elab_logErrorAndThrow___rarg(x_3, x_66, x_6, x_52); +if (lean_obj_tag(x_67) == 0) +{ +lean_object* x_68; lean_object* x_69; +x_68 = lean_ctor_get(x_67, 0); +lean_inc(x_68); +x_69 = lean_ctor_get(x_67, 1); +lean_inc(x_69); +lean_dec(x_67); +x_23 = x_68; +x_24 = x_69; +goto block_49; +} +else +{ +uint8_t x_70; +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_18); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_1); +x_70 = !lean_is_exclusive(x_67); +if (x_70 == 0) +{ +return x_67; +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_71 = lean_ctor_get(x_67, 0); +x_72 = lean_ctor_get(x_67, 1); +lean_inc(x_72); +lean_inc(x_71); +lean_dec(x_67); +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 +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; +lean_dec(x_57); +lean_dec(x_51); +x_74 = lean_unsigned_to_nat(1u); +x_75 = l_Lean_Syntax_getArg___rarg(x_56, x_74); +lean_dec(x_56); +lean_inc(x_6); +x_76 = l_Lean_Elab_toPreTerm(x_75, x_6, x_52); +if (lean_obj_tag(x_76) == 0) +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_77 = lean_ctor_get(x_76, 0); +lean_inc(x_77); +x_78 = lean_ctor_get(x_76, 1); +lean_inc(x_78); +lean_dec(x_76); +x_79 = l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__6; +x_80 = lean_expr_mk_app(x_79, x_50); +x_81 = lean_expr_mk_app(x_80, x_77); +x_23 = x_81; +x_24 = x_78; +goto block_49; +} +else +{ +uint8_t x_82; +lean_dec(x_50); +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_18); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_1); +x_82 = !lean_is_exclusive(x_76); +if (x_82 == 0) +{ +return x_76; +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_83 = lean_ctor_get(x_76, 0); +x_84 = lean_ctor_get(x_76, 1); +lean_inc(x_84); +lean_inc(x_83); +lean_dec(x_76); +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 +{ +lean_dec(x_52); +x_23 = x_50; +x_24 = x_51; +goto block_49; +} +} +} +} +} +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_array_get_size(x_2); +x_6 = lean_nat_dec_lt(x_1, x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +uint8_t x_7; +lean_dec(x_1); +x_7 = !lean_is_exclusive(x_4); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_4, 0); +lean_dec(x_8); +x_9 = l_Array_empty___closed__1; +x_10 = x_2; +lean_ctor_set(x_4, 0, x_10); +return x_4; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_11 = lean_ctor_get(x_4, 1); +lean_inc(x_11); +lean_dec(x_4); +x_12 = l_Array_empty___closed__1; +x_13 = x_2; +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_11); +return x_14; +} +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_15 = lean_array_fget(x_2, x_1); +x_16 = lean_box(0); +lean_inc(x_15); +x_17 = x_16; +x_18 = lean_array_fset(x_2, x_1, x_17); +x_19 = l_Lean_Syntax_getId___rarg(x_15); +x_20 = l___private_init_lean_elaborator_preterm_3__mkHoleFor(x_15, x_3, x_4); +if (lean_obj_tag(x_20) == 0) +{ +uint8_t x_21; +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +lean_object* x_22; uint8_t x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_20, 0); +lean_ctor_set(x_20, 0, x_16); +x_23 = 0; +x_24 = l_Lean_Elab_mkLocalDecl(x_19, x_22, x_23, x_3, x_20); +if (lean_obj_tag(x_24) == 0) +{ +uint8_t x_25; +x_25 = !lean_is_exclusive(x_24); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_26 = lean_ctor_get(x_24, 0); +x_27 = l___private_init_lean_elaborator_preterm_4__mkLocal(x_26); +lean_dec(x_26); +lean_ctor_set(x_24, 0, x_16); +x_28 = lean_unsigned_to_nat(1u); +x_29 = lean_nat_add(x_1, x_28); +x_30 = x_27; +x_31 = lean_array_fset(x_18, x_1, x_30); +lean_dec(x_1); +x_1 = x_29; +x_2 = x_31; +x_4 = x_24; +goto _start; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_33 = lean_ctor_get(x_24, 0); +x_34 = lean_ctor_get(x_24, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_24); +x_35 = l___private_init_lean_elaborator_preterm_4__mkLocal(x_33); +lean_dec(x_33); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_16); +lean_ctor_set(x_36, 1, x_34); +x_37 = lean_unsigned_to_nat(1u); +x_38 = lean_nat_add(x_1, x_37); +x_39 = x_35; +x_40 = lean_array_fset(x_18, x_1, x_39); +lean_dec(x_1); +x_1 = x_38; +x_2 = x_40; +x_4 = x_36; +goto _start; +} +} +else +{ +uint8_t x_42; +lean_dec(x_18); +lean_dec(x_15); +lean_dec(x_1); +x_42 = !lean_is_exclusive(x_24); +if (x_42 == 0) +{ +return x_24; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_24, 0); +x_44 = lean_ctor_get(x_24, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_24); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; uint8_t x_49; lean_object* x_50; +x_46 = lean_ctor_get(x_20, 0); +x_47 = lean_ctor_get(x_20, 1); +lean_inc(x_47); +lean_inc(x_46); +lean_dec(x_20); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_16); +lean_ctor_set(x_48, 1, x_47); +x_49 = 0; +x_50 = l_Lean_Elab_mkLocalDecl(x_19, x_46, x_49, x_3, x_48); +if (lean_obj_tag(x_50) == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_51 = lean_ctor_get(x_50, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_50, 1); +lean_inc(x_52); +if (lean_is_exclusive(x_50)) { + lean_ctor_release(x_50, 0); + lean_ctor_release(x_50, 1); + x_53 = x_50; +} else { + lean_dec_ref(x_50); + x_53 = lean_box(0); +} +x_54 = l___private_init_lean_elaborator_preterm_4__mkLocal(x_51); +lean_dec(x_51); +if (lean_is_scalar(x_53)) { + x_55 = lean_alloc_ctor(0, 2, 0); +} else { + x_55 = x_53; +} +lean_ctor_set(x_55, 0, x_16); +lean_ctor_set(x_55, 1, x_52); +x_56 = lean_unsigned_to_nat(1u); +x_57 = lean_nat_add(x_1, x_56); +x_58 = x_54; +x_59 = lean_array_fset(x_18, x_1, x_58); +lean_dec(x_1); +x_1 = x_57; +x_2 = x_59; +x_4 = x_55; +goto _start; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +lean_dec(x_18); +lean_dec(x_15); +lean_dec(x_1); +x_61 = lean_ctor_get(x_50, 0); +lean_inc(x_61); +x_62 = lean_ctor_get(x_50, 1); +lean_inc(x_62); +if (lean_is_exclusive(x_50)) { + lean_ctor_release(x_50, 0); + lean_ctor_release(x_50, 1); + x_63 = x_50; +} else { + lean_dec_ref(x_50); + x_63 = lean_box(0); +} +if (lean_is_scalar(x_63)) { + x_64 = lean_alloc_ctor(1, 2, 0); +} else { + x_64 = x_63; +} +lean_ctor_set(x_64, 0, x_61); +lean_ctor_set(x_64, 1, x_62); +return x_64; +} +} +} +else +{ +uint8_t x_65; +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_15); +lean_dec(x_1); +x_65 = !lean_is_exclusive(x_20); +if (x_65 == 0) +{ +return x_20; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_20, 0); +x_67 = lean_ctor_get(x_20, 1); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_20); +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; +} +} +} +} +} +lean_object* _init_l___private_init_lean_elaborator_preterm_5__processBinder___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_convertArrow___boxed), 3, 0); +x_1 = lean_mk_string("unknown binder kind"); return x_1; } } -lean_object* l___regBuiltinTermElab_Lean_Elab_convertArrow(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l_Lean_Parser_Term_arrow___elambda__1___closed__2; -x_3 = l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__2; -x_4 = l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__3; -x_5 = l_Lean_addBuiltinPreTermElab(x_2, x_3, x_4, x_1); -return x_5; -} -} -lean_object* _init_l_Lean_Elab_convertHole___rarg___closed__1() { +lean_object* _init_l___private_init_lean_elaborator_preterm_5__processBinder___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = lean_box(0); -x_2 = lean_expr_mk_mvar(x_1); +x_1 = l___private_init_lean_elaborator_preterm_5__processBinder___closed__1; +x_2 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_2, 0, x_1); return x_2; } } +lean_object* _init_l___private_init_lean_elaborator_preterm_5__processBinder___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(">> inst "); +return x_1; +} +} +lean_object* _init_l___private_init_lean_elaborator_preterm_5__processBinder___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(">> implict "); +return x_1; +} +} +lean_object* l___private_init_lean_elaborator_preterm_5__processBinder(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; uint8_t x_6; +x_4 = l_Lean_Syntax_getKind___rarg(x_1); +x_5 = l_Lean_Parser_Term_simpleBinder___elambda__1___closed__2; +x_6 = lean_name_dec_eq(x_4, x_5); +if (x_6 == 0) +{ +lean_object* x_7; uint8_t x_8; +x_7 = l_Lean_Parser_Term_explicitBinder___elambda__1___closed__2; +x_8 = lean_name_dec_eq(x_4, x_7); +if (x_8 == 0) +{ +lean_object* x_9; uint8_t x_10; +x_9 = l_Lean_Parser_Term_implicitBinder___elambda__1___closed__2; +x_10 = lean_name_dec_eq(x_4, x_9); +if (x_10 == 0) +{ +lean_object* x_11; uint8_t x_12; +x_11 = l_Lean_Parser_Term_instBinder___elambda__1___rarg___closed__2; +x_12 = lean_name_dec_eq(x_4, x_11); +lean_dec(x_4); +if (x_12 == 0) +{ +uint8_t x_13; +lean_dec(x_2); +lean_dec(x_1); +x_13 = !lean_is_exclusive(x_3); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_3, 0); +lean_dec(x_14); +x_15 = l___private_init_lean_elaborator_preterm_5__processBinder___closed__2; +lean_ctor_set_tag(x_3, 1); +lean_ctor_set(x_3, 0, x_15); +return x_3; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_3, 1); +lean_inc(x_16); +lean_dec(x_3); +x_17 = l___private_init_lean_elaborator_preterm_5__processBinder___closed__2; +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_19 = l_Lean_Syntax_formatStx___main___rarg(x_1); +x_20 = l_Lean_Options_empty; +x_21 = l_Lean_Format_pretty(x_19, x_20); +x_22 = l___private_init_lean_elaborator_preterm_5__processBinder___closed__3; +x_23 = lean_string_append(x_22, x_21); +lean_dec(x_21); +x_24 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +lean_closure_set(x_24, 0, x_23); +x_25 = l_Lean_Elab_runIOUnsafe___rarg(x_24, x_2, x_3); +lean_dec(x_2); +if (lean_obj_tag(x_25) == 0) +{ +uint8_t x_26; +x_26 = !lean_is_exclusive(x_25); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_25, 0); +lean_dec(x_27); +x_28 = l_Array_empty___closed__1; +lean_ctor_set(x_25, 0, x_28); +return x_25; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_25, 1); +lean_inc(x_29); +lean_dec(x_25); +x_30 = l_Array_empty___closed__1; +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +return x_31; +} +} +else +{ +uint8_t x_32; +x_32 = !lean_is_exclusive(x_25); +if (x_32 == 0) +{ +return x_25; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_25, 0); +x_34 = lean_ctor_get(x_25, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_25); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; +} +} +} +} +else +{ +lean_object* x_36; 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_dec(x_4); +x_36 = l_Lean_Syntax_formatStx___main___rarg(x_1); +x_37 = l_Lean_Options_empty; +x_38 = l_Lean_Format_pretty(x_36, x_37); +x_39 = l___private_init_lean_elaborator_preterm_5__processBinder___closed__4; +x_40 = lean_string_append(x_39, x_38); +lean_dec(x_38); +x_41 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +lean_closure_set(x_41, 0, x_40); +x_42 = l_Lean_Elab_runIOUnsafe___rarg(x_41, x_2, x_3); +lean_dec(x_2); +if (lean_obj_tag(x_42) == 0) +{ +uint8_t x_43; +x_43 = !lean_is_exclusive(x_42); +if (x_43 == 0) +{ +lean_object* x_44; lean_object* x_45; +x_44 = lean_ctor_get(x_42, 0); +lean_dec(x_44); +x_45 = l_Array_empty___closed__1; +lean_ctor_set(x_42, 0, x_45); +return x_42; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_42, 1); +lean_inc(x_46); +lean_dec(x_42); +x_47 = l_Array_empty___closed__1; +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_46); +return x_48; +} +} +else +{ +uint8_t x_49; +x_49 = !lean_is_exclusive(x_42); +if (x_49 == 0) +{ +return x_42; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_42, 0); +x_51 = lean_ctor_get(x_42, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_42); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +lean_dec(x_4); +x_53 = lean_unsigned_to_nat(1u); +x_54 = l_Lean_Syntax_getArg___rarg(x_1, x_53); +x_55 = l_Lean_Syntax_getArgs___rarg(x_54); +lean_dec(x_54); +x_56 = lean_unsigned_to_nat(2u); +x_57 = l_Lean_Syntax_getArg___rarg(x_1, x_56); +x_58 = lean_unsigned_to_nat(3u); +x_59 = l_Lean_Syntax_getArg___rarg(x_1, x_58); +lean_dec(x_1); +x_60 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; +x_61 = lean_unsigned_to_nat(0u); +x_62 = l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1(x_60, x_57, x_59, x_61, x_55, x_2, x_3); +lean_dec(x_59); +lean_dec(x_57); +return x_62; +} +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +lean_dec(x_4); +x_63 = lean_unsigned_to_nat(0u); +x_64 = l_Lean_Syntax_getArg___rarg(x_1, x_63); +lean_dec(x_1); +x_65 = l_Lean_Syntax_getArgs___rarg(x_64); +lean_dec(x_64); +x_66 = l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__2(x_63, x_65, x_2, x_3); +lean_dec(x_2); +return x_66; +} +} +} +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_3); +lean_dec(x_2); +return x_8; +} +} +lean_object* l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__2(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Array_miterateAux___main___at___private_init_lean_elaborator_preterm_6__processBinders___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_get_size(x_2); +x_8 = lean_nat_dec_lt(x_3, x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +uint8_t x_9; +lean_dec(x_5); +lean_dec(x_3); +x_9 = !lean_is_exclusive(x_6); +if (x_9 == 0) +{ +lean_object* x_10; +x_10 = lean_ctor_get(x_6, 0); +lean_dec(x_10); +lean_ctor_set(x_6, 0, x_4); +return x_6; +} +else +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_6, 1); +lean_inc(x_11); +lean_dec(x_6); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_4); +lean_ctor_set(x_12, 1, x_11); +return x_12; +} +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_13 = lean_array_fget(x_2, x_3); +x_14 = lean_unsigned_to_nat(1u); +x_15 = lean_nat_add(x_3, x_14); +lean_dec(x_3); +lean_inc(x_5); +x_16 = l___private_init_lean_elaborator_preterm_5__processBinder(x_13, x_5, x_6); +if (lean_obj_tag(x_16) == 0) +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_16); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_18 = lean_ctor_get(x_16, 0); +x_19 = lean_unsigned_to_nat(0u); +x_20 = l_Array_miterateAux___main___at_Array_append___spec__1___rarg(x_18, x_18, x_19, x_4); +lean_dec(x_18); +x_21 = lean_box(0); +lean_ctor_set(x_16, 0, x_21); +x_3 = x_15; +x_4 = x_20; +x_6 = x_16; +goto _start; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_23 = lean_ctor_get(x_16, 0); +x_24 = lean_ctor_get(x_16, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_16); +x_25 = lean_unsigned_to_nat(0u); +x_26 = l_Array_miterateAux___main___at_Array_append___spec__1___rarg(x_23, x_23, x_25, x_4); +lean_dec(x_23); +x_27 = lean_box(0); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_24); +x_3 = x_15; +x_4 = x_26; +x_6 = x_28; +goto _start; +} +} +else +{ +uint8_t x_30; +lean_dec(x_15); +lean_dec(x_5); +lean_dec(x_4); +x_30 = !lean_is_exclusive(x_16); +if (x_30 == 0) +{ +return x_16; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_16, 0); +x_32 = lean_ctor_get(x_16, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_16); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; +} +} +} +} +} +lean_object* l___private_init_lean_elaborator_preterm_6__processBinders(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_unsigned_to_nat(0u); +x_5 = l_Array_empty___closed__1; +x_6 = l_Array_miterateAux___main___at___private_init_lean_elaborator_preterm_6__processBinders___spec__1(x_1, x_1, x_4, x_5, x_2, x_3); +return x_6; +} +} +lean_object* l_Array_miterateAux___main___at___private_init_lean_elaborator_preterm_6__processBinders___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Array_miterateAux___main___at___private_init_lean_elaborator_preterm_6__processBinders___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_2); +lean_dec(x_1); +return x_7; +} +} +lean_object* l___private_init_lean_elaborator_preterm_6__processBinders___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_init_lean_elaborator_preterm_6__processBinders(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_Elab_convertForall(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_ctor_get(x_3, 1); +x_7 = lean_ctor_get(x_3, 0); +lean_dec(x_7); +x_8 = lean_box(0); +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_array_get(x_8, x_5, x_9); +x_11 = l_Lean_Syntax_getArgs___rarg(x_10); +lean_dec(x_10); +x_12 = lean_unsigned_to_nat(3u); +x_13 = lean_array_get(x_8, x_5, x_12); +x_14 = !lean_is_exclusive(x_6); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_15 = lean_ctor_get(x_6, 5); +x_16 = l_List_head___at_Lean_Elab_getScope___spec__1(x_15); +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_15); +lean_ctor_set(x_6, 5, x_17); +x_18 = lean_box(0); +lean_ctor_set(x_3, 0, x_18); +lean_inc(x_2); +x_19 = l___private_init_lean_elaborator_preterm_6__processBinders(x_11, x_2, x_3); +lean_dec(x_11); +if (lean_obj_tag(x_19) == 0) +{ +uint8_t x_20; +x_20 = !lean_is_exclusive(x_19); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_19, 0); +lean_ctor_set(x_19, 0, x_18); +lean_inc(x_2); +x_22 = l_Lean_Elab_toPreTerm(x_13, x_2, x_19); +if (lean_obj_tag(x_22) == 0) +{ +uint8_t x_23; +x_23 = !lean_is_exclusive(x_22); +if (x_23 == 0) +{ +lean_object* x_24; lean_object* x_25; +x_24 = lean_ctor_get(x_22, 0); +lean_ctor_set(x_22, 0, x_18); +x_25 = l_Lean_Elab_mkForall(x_21, x_24, x_2, x_22); +lean_dec(x_2); +if (lean_obj_tag(x_25) == 0) +{ +uint8_t x_26; +x_26 = !lean_is_exclusive(x_25); +if (x_26 == 0) +{ +lean_object* x_27; uint8_t x_28; +x_27 = lean_ctor_get(x_25, 1); +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; +x_29 = lean_ctor_get(x_27, 5); +x_30 = l_List_tail___rarg(x_29); +lean_dec(x_29); +lean_ctor_set(x_27, 5, x_30); +return x_25; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_31 = lean_ctor_get(x_27, 0); +x_32 = lean_ctor_get(x_27, 1); +x_33 = lean_ctor_get(x_27, 2); +x_34 = lean_ctor_get(x_27, 3); +x_35 = lean_ctor_get(x_27, 4); +x_36 = lean_ctor_get(x_27, 5); +lean_inc(x_36); +lean_inc(x_35); +lean_inc(x_34); +lean_inc(x_33); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_27); +x_37 = l_List_tail___rarg(x_36); +lean_dec(x_36); +x_38 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_38, 0, x_31); +lean_ctor_set(x_38, 1, x_32); +lean_ctor_set(x_38, 2, x_33); +lean_ctor_set(x_38, 3, x_34); +lean_ctor_set(x_38, 4, x_35); +lean_ctor_set(x_38, 5, x_37); +lean_ctor_set(x_25, 1, x_38); +return x_25; +} +} +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; +x_39 = lean_ctor_get(x_25, 1); +x_40 = lean_ctor_get(x_25, 0); +lean_inc(x_39); +lean_inc(x_40); +lean_dec(x_25); +x_41 = lean_ctor_get(x_39, 0); +lean_inc(x_41); +x_42 = lean_ctor_get(x_39, 1); +lean_inc(x_42); +x_43 = lean_ctor_get(x_39, 2); +lean_inc(x_43); +x_44 = lean_ctor_get(x_39, 3); +lean_inc(x_44); +x_45 = lean_ctor_get(x_39, 4); +lean_inc(x_45); +x_46 = lean_ctor_get(x_39, 5); +lean_inc(x_46); +if (lean_is_exclusive(x_39)) { + lean_ctor_release(x_39, 0); + lean_ctor_release(x_39, 1); + lean_ctor_release(x_39, 2); + lean_ctor_release(x_39, 3); + lean_ctor_release(x_39, 4); + lean_ctor_release(x_39, 5); + x_47 = x_39; +} else { + lean_dec_ref(x_39); + x_47 = lean_box(0); +} +x_48 = l_List_tail___rarg(x_46); +lean_dec(x_46); +if (lean_is_scalar(x_47)) { + x_49 = lean_alloc_ctor(0, 6, 0); +} else { + x_49 = x_47; +} +lean_ctor_set(x_49, 0, x_41); +lean_ctor_set(x_49, 1, x_42); +lean_ctor_set(x_49, 2, x_43); +lean_ctor_set(x_49, 3, x_44); +lean_ctor_set(x_49, 4, x_45); +lean_ctor_set(x_49, 5, x_48); +x_50 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_50, 0, x_40); +lean_ctor_set(x_50, 1, x_49); +return x_50; +} +} +else +{ +uint8_t x_51; +x_51 = !lean_is_exclusive(x_25); +if (x_51 == 0) +{ +return x_25; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_25, 0); +x_53 = lean_ctor_get(x_25, 1); +lean_inc(x_53); +lean_inc(x_52); +lean_dec(x_25); +x_54 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_53); +return x_54; +} +} +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_55 = lean_ctor_get(x_22, 0); +x_56 = lean_ctor_get(x_22, 1); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_22); +x_57 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_57, 0, x_18); +lean_ctor_set(x_57, 1, x_56); +x_58 = l_Lean_Elab_mkForall(x_21, x_55, x_2, x_57); +lean_dec(x_2); +if (lean_obj_tag(x_58) == 0) +{ +lean_object* x_59; 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; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_59 = lean_ctor_get(x_58, 1); +lean_inc(x_59); +x_60 = lean_ctor_get(x_58, 0); +lean_inc(x_60); +if (lean_is_exclusive(x_58)) { + lean_ctor_release(x_58, 0); + lean_ctor_release(x_58, 1); + x_61 = x_58; +} else { + lean_dec_ref(x_58); + x_61 = lean_box(0); +} +x_62 = lean_ctor_get(x_59, 0); +lean_inc(x_62); +x_63 = lean_ctor_get(x_59, 1); +lean_inc(x_63); +x_64 = lean_ctor_get(x_59, 2); +lean_inc(x_64); +x_65 = lean_ctor_get(x_59, 3); +lean_inc(x_65); +x_66 = lean_ctor_get(x_59, 4); +lean_inc(x_66); +x_67 = lean_ctor_get(x_59, 5); +lean_inc(x_67); +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + lean_ctor_release(x_59, 1); + lean_ctor_release(x_59, 2); + lean_ctor_release(x_59, 3); + lean_ctor_release(x_59, 4); + lean_ctor_release(x_59, 5); + x_68 = x_59; +} else { + lean_dec_ref(x_59); + x_68 = lean_box(0); +} +x_69 = l_List_tail___rarg(x_67); +lean_dec(x_67); +if (lean_is_scalar(x_68)) { + x_70 = lean_alloc_ctor(0, 6, 0); +} else { + x_70 = x_68; +} +lean_ctor_set(x_70, 0, x_62); +lean_ctor_set(x_70, 1, x_63); +lean_ctor_set(x_70, 2, x_64); +lean_ctor_set(x_70, 3, x_65); +lean_ctor_set(x_70, 4, x_66); +lean_ctor_set(x_70, 5, x_69); +if (lean_is_scalar(x_61)) { + x_71 = lean_alloc_ctor(0, 2, 0); +} else { + x_71 = x_61; +} +lean_ctor_set(x_71, 0, x_60); +lean_ctor_set(x_71, 1, x_70); +return x_71; +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_72 = lean_ctor_get(x_58, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_58, 1); +lean_inc(x_73); +if (lean_is_exclusive(x_58)) { + lean_ctor_release(x_58, 0); + lean_ctor_release(x_58, 1); + x_74 = x_58; +} else { + lean_dec_ref(x_58); + x_74 = lean_box(0); +} +if (lean_is_scalar(x_74)) { + x_75 = lean_alloc_ctor(1, 2, 0); +} else { + x_75 = x_74; +} +lean_ctor_set(x_75, 0, x_72); +lean_ctor_set(x_75, 1, x_73); +return x_75; +} +} +} +else +{ +uint8_t x_76; +lean_dec(x_21); +lean_dec(x_2); +x_76 = !lean_is_exclusive(x_22); +if (x_76 == 0) +{ +return x_22; +} +else +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_22, 0); +x_78 = lean_ctor_get(x_22, 1); +lean_inc(x_78); +lean_inc(x_77); +lean_dec(x_22); +x_79 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +return x_79; +} +} +} +else +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_80 = lean_ctor_get(x_19, 0); +x_81 = lean_ctor_get(x_19, 1); +lean_inc(x_81); +lean_inc(x_80); +lean_dec(x_19); +x_82 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_82, 0, x_18); +lean_ctor_set(x_82, 1, x_81); +lean_inc(x_2); +x_83 = l_Lean_Elab_toPreTerm(x_13, x_2, x_82); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_84 = lean_ctor_get(x_83, 0); +lean_inc(x_84); +x_85 = lean_ctor_get(x_83, 1); +lean_inc(x_85); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_86 = x_83; +} else { + lean_dec_ref(x_83); + x_86 = lean_box(0); +} +if (lean_is_scalar(x_86)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_86; +} +lean_ctor_set(x_87, 0, x_18); +lean_ctor_set(x_87, 1, x_85); +x_88 = l_Lean_Elab_mkForall(x_80, x_84, x_2, x_87); +lean_dec(x_2); +if (lean_obj_tag(x_88) == 0) +{ +lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_89 = lean_ctor_get(x_88, 1); +lean_inc(x_89); +x_90 = lean_ctor_get(x_88, 0); +lean_inc(x_90); +if (lean_is_exclusive(x_88)) { + lean_ctor_release(x_88, 0); + lean_ctor_release(x_88, 1); + x_91 = x_88; +} else { + lean_dec_ref(x_88); + x_91 = lean_box(0); +} +x_92 = lean_ctor_get(x_89, 0); +lean_inc(x_92); +x_93 = lean_ctor_get(x_89, 1); +lean_inc(x_93); +x_94 = lean_ctor_get(x_89, 2); +lean_inc(x_94); +x_95 = lean_ctor_get(x_89, 3); +lean_inc(x_95); +x_96 = lean_ctor_get(x_89, 4); +lean_inc(x_96); +x_97 = lean_ctor_get(x_89, 5); +lean_inc(x_97); +if (lean_is_exclusive(x_89)) { + lean_ctor_release(x_89, 0); + lean_ctor_release(x_89, 1); + lean_ctor_release(x_89, 2); + lean_ctor_release(x_89, 3); + lean_ctor_release(x_89, 4); + lean_ctor_release(x_89, 5); + x_98 = x_89; +} else { + lean_dec_ref(x_89); + x_98 = lean_box(0); +} +x_99 = l_List_tail___rarg(x_97); +lean_dec(x_97); +if (lean_is_scalar(x_98)) { + x_100 = lean_alloc_ctor(0, 6, 0); +} else { + x_100 = x_98; +} +lean_ctor_set(x_100, 0, x_92); +lean_ctor_set(x_100, 1, x_93); +lean_ctor_set(x_100, 2, x_94); +lean_ctor_set(x_100, 3, x_95); +lean_ctor_set(x_100, 4, x_96); +lean_ctor_set(x_100, 5, x_99); +if (lean_is_scalar(x_91)) { + x_101 = lean_alloc_ctor(0, 2, 0); +} else { + x_101 = x_91; +} +lean_ctor_set(x_101, 0, x_90); +lean_ctor_set(x_101, 1, x_100); +return x_101; +} +else +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_102 = lean_ctor_get(x_88, 0); +lean_inc(x_102); +x_103 = lean_ctor_get(x_88, 1); +lean_inc(x_103); +if (lean_is_exclusive(x_88)) { + lean_ctor_release(x_88, 0); + lean_ctor_release(x_88, 1); + x_104 = x_88; +} else { + lean_dec_ref(x_88); + x_104 = lean_box(0); +} +if (lean_is_scalar(x_104)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_104; +} +lean_ctor_set(x_105, 0, x_102); +lean_ctor_set(x_105, 1, x_103); +return x_105; +} +} +else +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; +lean_dec(x_80); +lean_dec(x_2); +x_106 = lean_ctor_get(x_83, 0); +lean_inc(x_106); +x_107 = lean_ctor_get(x_83, 1); +lean_inc(x_107); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_108 = x_83; +} else { + lean_dec_ref(x_83); + x_108 = lean_box(0); +} +if (lean_is_scalar(x_108)) { + x_109 = lean_alloc_ctor(1, 2, 0); +} else { + x_109 = x_108; +} +lean_ctor_set(x_109, 0, x_106); +lean_ctor_set(x_109, 1, x_107); +return x_109; +} +} +} +else +{ +uint8_t x_110; +lean_dec(x_13); +lean_dec(x_2); +x_110 = !lean_is_exclusive(x_19); +if (x_110 == 0) +{ +return x_19; +} +else +{ +lean_object* x_111; lean_object* x_112; lean_object* x_113; +x_111 = lean_ctor_get(x_19, 0); +x_112 = lean_ctor_get(x_19, 1); +lean_inc(x_112); +lean_inc(x_111); +lean_dec(x_19); +x_113 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_113, 0, x_111); +lean_ctor_set(x_113, 1, x_112); +return x_113; +} +} +} +else +{ +lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; +x_114 = lean_ctor_get(x_6, 0); +x_115 = lean_ctor_get(x_6, 1); +x_116 = lean_ctor_get(x_6, 2); +x_117 = lean_ctor_get(x_6, 3); +x_118 = lean_ctor_get(x_6, 4); +x_119 = lean_ctor_get(x_6, 5); +lean_inc(x_119); +lean_inc(x_118); +lean_inc(x_117); +lean_inc(x_116); +lean_inc(x_115); +lean_inc(x_114); +lean_dec(x_6); +x_120 = l_List_head___at_Lean_Elab_getScope___spec__1(x_119); +x_121 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_121, 0, x_120); +lean_ctor_set(x_121, 1, x_119); +x_122 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_122, 0, x_114); +lean_ctor_set(x_122, 1, x_115); +lean_ctor_set(x_122, 2, x_116); +lean_ctor_set(x_122, 3, x_117); +lean_ctor_set(x_122, 4, x_118); +lean_ctor_set(x_122, 5, x_121); +x_123 = lean_box(0); +lean_ctor_set(x_3, 1, x_122); +lean_ctor_set(x_3, 0, x_123); +lean_inc(x_2); +x_124 = l___private_init_lean_elaborator_preterm_6__processBinders(x_11, x_2, x_3); +lean_dec(x_11); +if (lean_obj_tag(x_124) == 0) +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; +x_125 = lean_ctor_get(x_124, 0); +lean_inc(x_125); +x_126 = lean_ctor_get(x_124, 1); +lean_inc(x_126); +if (lean_is_exclusive(x_124)) { + lean_ctor_release(x_124, 0); + lean_ctor_release(x_124, 1); + x_127 = x_124; +} else { + lean_dec_ref(x_124); + x_127 = lean_box(0); +} +if (lean_is_scalar(x_127)) { + x_128 = lean_alloc_ctor(0, 2, 0); +} else { + x_128 = x_127; +} +lean_ctor_set(x_128, 0, x_123); +lean_ctor_set(x_128, 1, x_126); +lean_inc(x_2); +x_129 = l_Lean_Elab_toPreTerm(x_13, x_2, x_128); +if (lean_obj_tag(x_129) == 0) +{ +lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; +x_130 = lean_ctor_get(x_129, 0); +lean_inc(x_130); +x_131 = lean_ctor_get(x_129, 1); +lean_inc(x_131); +if (lean_is_exclusive(x_129)) { + lean_ctor_release(x_129, 0); + lean_ctor_release(x_129, 1); + x_132 = x_129; +} else { + lean_dec_ref(x_129); + x_132 = lean_box(0); +} +if (lean_is_scalar(x_132)) { + x_133 = lean_alloc_ctor(0, 2, 0); +} else { + x_133 = x_132; +} +lean_ctor_set(x_133, 0, x_123); +lean_ctor_set(x_133, 1, x_131); +x_134 = l_Lean_Elab_mkForall(x_125, x_130, x_2, x_133); +lean_dec(x_2); +if (lean_obj_tag(x_134) == 0) +{ +lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; +x_135 = lean_ctor_get(x_134, 1); +lean_inc(x_135); +x_136 = lean_ctor_get(x_134, 0); +lean_inc(x_136); +if (lean_is_exclusive(x_134)) { + lean_ctor_release(x_134, 0); + lean_ctor_release(x_134, 1); + x_137 = x_134; +} else { + lean_dec_ref(x_134); + x_137 = lean_box(0); +} +x_138 = lean_ctor_get(x_135, 0); +lean_inc(x_138); +x_139 = lean_ctor_get(x_135, 1); +lean_inc(x_139); +x_140 = lean_ctor_get(x_135, 2); +lean_inc(x_140); +x_141 = lean_ctor_get(x_135, 3); +lean_inc(x_141); +x_142 = lean_ctor_get(x_135, 4); +lean_inc(x_142); +x_143 = lean_ctor_get(x_135, 5); +lean_inc(x_143); +if (lean_is_exclusive(x_135)) { + lean_ctor_release(x_135, 0); + lean_ctor_release(x_135, 1); + lean_ctor_release(x_135, 2); + lean_ctor_release(x_135, 3); + lean_ctor_release(x_135, 4); + lean_ctor_release(x_135, 5); + x_144 = x_135; +} else { + lean_dec_ref(x_135); + x_144 = lean_box(0); +} +x_145 = l_List_tail___rarg(x_143); +lean_dec(x_143); +if (lean_is_scalar(x_144)) { + x_146 = lean_alloc_ctor(0, 6, 0); +} else { + x_146 = x_144; +} +lean_ctor_set(x_146, 0, x_138); +lean_ctor_set(x_146, 1, x_139); +lean_ctor_set(x_146, 2, x_140); +lean_ctor_set(x_146, 3, x_141); +lean_ctor_set(x_146, 4, x_142); +lean_ctor_set(x_146, 5, x_145); +if (lean_is_scalar(x_137)) { + x_147 = lean_alloc_ctor(0, 2, 0); +} else { + x_147 = x_137; +} +lean_ctor_set(x_147, 0, x_136); +lean_ctor_set(x_147, 1, x_146); +return x_147; +} +else +{ +lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; +x_148 = lean_ctor_get(x_134, 0); +lean_inc(x_148); +x_149 = lean_ctor_get(x_134, 1); +lean_inc(x_149); +if (lean_is_exclusive(x_134)) { + lean_ctor_release(x_134, 0); + lean_ctor_release(x_134, 1); + x_150 = x_134; +} else { + lean_dec_ref(x_134); + x_150 = lean_box(0); +} +if (lean_is_scalar(x_150)) { + x_151 = lean_alloc_ctor(1, 2, 0); +} else { + x_151 = x_150; +} +lean_ctor_set(x_151, 0, x_148); +lean_ctor_set(x_151, 1, x_149); +return x_151; +} +} +else +{ +lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; +lean_dec(x_125); +lean_dec(x_2); +x_152 = lean_ctor_get(x_129, 0); +lean_inc(x_152); +x_153 = lean_ctor_get(x_129, 1); +lean_inc(x_153); +if (lean_is_exclusive(x_129)) { + lean_ctor_release(x_129, 0); + lean_ctor_release(x_129, 1); + x_154 = x_129; +} else { + lean_dec_ref(x_129); + x_154 = lean_box(0); +} +if (lean_is_scalar(x_154)) { + x_155 = lean_alloc_ctor(1, 2, 0); +} else { + x_155 = x_154; +} +lean_ctor_set(x_155, 0, x_152); +lean_ctor_set(x_155, 1, x_153); +return x_155; +} +} +else +{ +lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; +lean_dec(x_13); +lean_dec(x_2); +x_156 = lean_ctor_get(x_124, 0); +lean_inc(x_156); +x_157 = lean_ctor_get(x_124, 1); +lean_inc(x_157); +if (lean_is_exclusive(x_124)) { + lean_ctor_release(x_124, 0); + lean_ctor_release(x_124, 1); + x_158 = x_124; +} else { + lean_dec_ref(x_124); + x_158 = lean_box(0); +} +if (lean_is_scalar(x_158)) { + x_159 = lean_alloc_ctor(1, 2, 0); +} else { + x_159 = x_158; +} +lean_ctor_set(x_159, 0, x_156); +lean_ctor_set(x_159, 1, x_157); +return x_159; +} +} +} +else +{ +lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; +x_160 = lean_ctor_get(x_1, 1); +x_161 = lean_ctor_get(x_3, 1); +lean_inc(x_161); +lean_dec(x_3); +x_162 = lean_box(0); +x_163 = lean_unsigned_to_nat(1u); +x_164 = lean_array_get(x_162, x_160, x_163); +x_165 = l_Lean_Syntax_getArgs___rarg(x_164); +lean_dec(x_164); +x_166 = lean_unsigned_to_nat(3u); +x_167 = lean_array_get(x_162, x_160, x_166); +x_168 = lean_ctor_get(x_161, 0); +lean_inc(x_168); +x_169 = lean_ctor_get(x_161, 1); +lean_inc(x_169); +x_170 = lean_ctor_get(x_161, 2); +lean_inc(x_170); +x_171 = lean_ctor_get(x_161, 3); +lean_inc(x_171); +x_172 = lean_ctor_get(x_161, 4); +lean_inc(x_172); +x_173 = lean_ctor_get(x_161, 5); +lean_inc(x_173); +if (lean_is_exclusive(x_161)) { + lean_ctor_release(x_161, 0); + lean_ctor_release(x_161, 1); + lean_ctor_release(x_161, 2); + lean_ctor_release(x_161, 3); + lean_ctor_release(x_161, 4); + lean_ctor_release(x_161, 5); + x_174 = x_161; +} else { + lean_dec_ref(x_161); + x_174 = lean_box(0); +} +x_175 = l_List_head___at_Lean_Elab_getScope___spec__1(x_173); +x_176 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_176, 0, x_175); +lean_ctor_set(x_176, 1, x_173); +if (lean_is_scalar(x_174)) { + x_177 = lean_alloc_ctor(0, 6, 0); +} else { + x_177 = x_174; +} +lean_ctor_set(x_177, 0, x_168); +lean_ctor_set(x_177, 1, x_169); +lean_ctor_set(x_177, 2, x_170); +lean_ctor_set(x_177, 3, x_171); +lean_ctor_set(x_177, 4, x_172); +lean_ctor_set(x_177, 5, x_176); +x_178 = lean_box(0); +x_179 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_179, 0, x_178); +lean_ctor_set(x_179, 1, x_177); +lean_inc(x_2); +x_180 = l___private_init_lean_elaborator_preterm_6__processBinders(x_165, x_2, x_179); +lean_dec(x_165); +if (lean_obj_tag(x_180) == 0) +{ +lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; +x_181 = lean_ctor_get(x_180, 0); +lean_inc(x_181); +x_182 = lean_ctor_get(x_180, 1); +lean_inc(x_182); +if (lean_is_exclusive(x_180)) { + lean_ctor_release(x_180, 0); + lean_ctor_release(x_180, 1); + x_183 = x_180; +} else { + lean_dec_ref(x_180); + x_183 = lean_box(0); +} +if (lean_is_scalar(x_183)) { + x_184 = lean_alloc_ctor(0, 2, 0); +} else { + x_184 = x_183; +} +lean_ctor_set(x_184, 0, x_178); +lean_ctor_set(x_184, 1, x_182); +lean_inc(x_2); +x_185 = l_Lean_Elab_toPreTerm(x_167, x_2, x_184); +if (lean_obj_tag(x_185) == 0) +{ +lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; +x_186 = lean_ctor_get(x_185, 0); +lean_inc(x_186); +x_187 = lean_ctor_get(x_185, 1); +lean_inc(x_187); +if (lean_is_exclusive(x_185)) { + lean_ctor_release(x_185, 0); + lean_ctor_release(x_185, 1); + x_188 = x_185; +} else { + lean_dec_ref(x_185); + x_188 = lean_box(0); +} +if (lean_is_scalar(x_188)) { + x_189 = lean_alloc_ctor(0, 2, 0); +} else { + x_189 = x_188; +} +lean_ctor_set(x_189, 0, x_178); +lean_ctor_set(x_189, 1, x_187); +x_190 = l_Lean_Elab_mkForall(x_181, x_186, x_2, x_189); +lean_dec(x_2); +if (lean_obj_tag(x_190) == 0) +{ +lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; +x_191 = lean_ctor_get(x_190, 1); +lean_inc(x_191); +x_192 = lean_ctor_get(x_190, 0); +lean_inc(x_192); +if (lean_is_exclusive(x_190)) { + lean_ctor_release(x_190, 0); + lean_ctor_release(x_190, 1); + x_193 = x_190; +} else { + lean_dec_ref(x_190); + x_193 = lean_box(0); +} +x_194 = lean_ctor_get(x_191, 0); +lean_inc(x_194); +x_195 = lean_ctor_get(x_191, 1); +lean_inc(x_195); +x_196 = lean_ctor_get(x_191, 2); +lean_inc(x_196); +x_197 = lean_ctor_get(x_191, 3); +lean_inc(x_197); +x_198 = lean_ctor_get(x_191, 4); +lean_inc(x_198); +x_199 = lean_ctor_get(x_191, 5); +lean_inc(x_199); +if (lean_is_exclusive(x_191)) { + lean_ctor_release(x_191, 0); + lean_ctor_release(x_191, 1); + lean_ctor_release(x_191, 2); + lean_ctor_release(x_191, 3); + lean_ctor_release(x_191, 4); + lean_ctor_release(x_191, 5); + x_200 = x_191; +} else { + lean_dec_ref(x_191); + x_200 = lean_box(0); +} +x_201 = l_List_tail___rarg(x_199); +lean_dec(x_199); +if (lean_is_scalar(x_200)) { + x_202 = lean_alloc_ctor(0, 6, 0); +} else { + x_202 = x_200; +} +lean_ctor_set(x_202, 0, x_194); +lean_ctor_set(x_202, 1, x_195); +lean_ctor_set(x_202, 2, x_196); +lean_ctor_set(x_202, 3, x_197); +lean_ctor_set(x_202, 4, x_198); +lean_ctor_set(x_202, 5, x_201); +if (lean_is_scalar(x_193)) { + x_203 = lean_alloc_ctor(0, 2, 0); +} else { + x_203 = x_193; +} +lean_ctor_set(x_203, 0, x_192); +lean_ctor_set(x_203, 1, x_202); +return x_203; +} +else +{ +lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; +x_204 = lean_ctor_get(x_190, 0); +lean_inc(x_204); +x_205 = lean_ctor_get(x_190, 1); +lean_inc(x_205); +if (lean_is_exclusive(x_190)) { + lean_ctor_release(x_190, 0); + lean_ctor_release(x_190, 1); + x_206 = x_190; +} else { + lean_dec_ref(x_190); + x_206 = lean_box(0); +} +if (lean_is_scalar(x_206)) { + x_207 = lean_alloc_ctor(1, 2, 0); +} else { + x_207 = x_206; +} +lean_ctor_set(x_207, 0, x_204); +lean_ctor_set(x_207, 1, x_205); +return x_207; +} +} +else +{ +lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; +lean_dec(x_181); +lean_dec(x_2); +x_208 = lean_ctor_get(x_185, 0); +lean_inc(x_208); +x_209 = lean_ctor_get(x_185, 1); +lean_inc(x_209); +if (lean_is_exclusive(x_185)) { + lean_ctor_release(x_185, 0); + lean_ctor_release(x_185, 1); + x_210 = x_185; +} else { + lean_dec_ref(x_185); + x_210 = lean_box(0); +} +if (lean_is_scalar(x_210)) { + x_211 = lean_alloc_ctor(1, 2, 0); +} else { + x_211 = x_210; +} +lean_ctor_set(x_211, 0, x_208); +lean_ctor_set(x_211, 1, x_209); +return x_211; +} +} +else +{ +lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; +lean_dec(x_167); +lean_dec(x_2); +x_212 = lean_ctor_get(x_180, 0); +lean_inc(x_212); +x_213 = lean_ctor_get(x_180, 1); +lean_inc(x_213); +if (lean_is_exclusive(x_180)) { + lean_ctor_release(x_180, 0); + lean_ctor_release(x_180, 1); + x_214 = x_180; +} else { + lean_dec_ref(x_180); + x_214 = lean_box(0); +} +if (lean_is_scalar(x_214)) { + x_215 = lean_alloc_ctor(1, 2, 0); +} else { + x_215 = x_214; +} +lean_ctor_set(x_215, 0, x_212); +lean_ctor_set(x_215, 1, x_213); +return x_215; +} +} +} +} +lean_object* l_Lean_Elab_convertForall___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_convertForall(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_convertForall___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("convertForall"); +return x_1; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_convertForall___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltinTermElab_Lean_Elab_convertType___closed__2; +x_2 = l___regBuiltinTermElab_Lean_Elab_convertForall___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_convertForall___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_convertForall___boxed), 3, 0); +return x_1; +} +} +lean_object* l___regBuiltinTermElab_Lean_Elab_convertForall(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = l_Lean_Parser_Term_forall___elambda__1___closed__2; +x_3 = l___regBuiltinTermElab_Lean_Elab_convertForall___closed__2; +x_4 = l___regBuiltinTermElab_Lean_Elab_convertForall___closed__3; +x_5 = l_Lean_addBuiltinPreTermElab(x_2, x_3, x_4, x_1); +return x_5; +} +} lean_object* l_Lean_Elab_convertHole___rarg(lean_object* x_1) { _start: { @@ -3943,7 +5773,7 @@ if (x_2 == 0) lean_object* x_3; lean_object* x_4; x_3 = lean_ctor_get(x_1, 0); lean_dec(x_3); -x_4 = l_Lean_Elab_convertHole___rarg___closed__1; +x_4 = l___private_init_lean_elaborator_preterm_3__mkHoleFor___closed__1; lean_ctor_set(x_1, 0, x_4); return x_1; } @@ -3953,7 +5783,7 @@ lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_ctor_get(x_1, 1); lean_inc(x_5); lean_dec(x_1); -x_6 = l_Lean_Elab_convertHole___rarg___closed__1; +x_6 = l___private_init_lean_elaborator_preterm_3__mkHoleFor___closed__1; x_7 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_7, 0, x_6); lean_ctor_set(x_7, 1, x_5); @@ -4049,7 +5879,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Elab_convertSorry___rarg___closed__3; -x_2 = l_Lean_Elab_convertHole___rarg___closed__1; +x_2 = l___private_init_lean_elaborator_preterm_3__mkHoleFor___closed__1; x_3 = lean_expr_mk_app(x_1, x_2); return x_3; } @@ -4137,6 +5967,191 @@ x_5 = l_Lean_addBuiltinPreTermElab(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* _init_l_Lean_Elab_convertId___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unknown identifier '"); +return x_1; +} +} +lean_object* l_Lean_Elab_convertId(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_ctor_get(x_1, 1); +x_5 = l_Lean_Elab_localContext___rarg(x_3); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_7 = lean_ctor_get(x_5, 0); +x_8 = lean_ctor_get(x_5, 1); +x_9 = lean_box(0); +x_10 = lean_unsigned_to_nat(0u); +x_11 = lean_array_get(x_9, x_4, x_10); +x_12 = l_Lean_Syntax_getId___rarg(x_11); +lean_dec(x_11); +x_13 = lean_box(0); +lean_inc(x_8); +lean_ctor_set(x_5, 0, x_13); +lean_inc(x_12); +x_14 = lean_local_ctx_find_from_user_name(x_7, x_12); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +lean_dec(x_8); +x_15 = l_System_FilePath_dirName___closed__1; +x_16 = l_Lean_Name_toStringWithSep___main(x_15, x_12); +x_17 = l_Lean_Elab_convertId___closed__1; +x_18 = lean_string_append(x_17, x_16); +lean_dec(x_16); +x_19 = l_Char_HasRepr___closed__1; +x_20 = lean_string_append(x_18, x_19); +x_21 = l_Lean_Elab_logErrorAndThrow___rarg(x_1, x_20, x_2, x_5); +return x_21; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +lean_dec(x_5); +lean_dec(x_12); +x_22 = lean_ctor_get(x_14, 0); +lean_inc(x_22); +lean_dec(x_14); +x_23 = l___private_init_lean_elaborator_preterm_4__mkLocal(x_22); +lean_dec(x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_8); +return x_24; +} +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_25 = lean_ctor_get(x_5, 0); +x_26 = lean_ctor_get(x_5, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_5); +x_27 = lean_box(0); +x_28 = lean_unsigned_to_nat(0u); +x_29 = lean_array_get(x_27, x_4, x_28); +x_30 = l_Lean_Syntax_getId___rarg(x_29); +lean_dec(x_29); +x_31 = lean_box(0); +lean_inc(x_26); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_26); +lean_inc(x_30); +x_33 = lean_local_ctx_find_from_user_name(x_25, x_30); +if (lean_obj_tag(x_33) == 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_dec(x_26); +x_34 = l_System_FilePath_dirName___closed__1; +x_35 = l_Lean_Name_toStringWithSep___main(x_34, x_30); +x_36 = l_Lean_Elab_convertId___closed__1; +x_37 = lean_string_append(x_36, x_35); +lean_dec(x_35); +x_38 = l_Char_HasRepr___closed__1; +x_39 = lean_string_append(x_37, x_38); +x_40 = l_Lean_Elab_logErrorAndThrow___rarg(x_1, x_39, x_2, x_32); +return x_40; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +lean_dec(x_32); +lean_dec(x_30); +x_41 = lean_ctor_get(x_33, 0); +lean_inc(x_41); +lean_dec(x_33); +x_42 = l___private_init_lean_elaborator_preterm_4__mkLocal(x_41); +lean_dec(x_41); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_26); +return x_43; +} +} +} +else +{ +uint8_t x_44; +x_44 = !lean_is_exclusive(x_5); +if (x_44 == 0) +{ +return x_5; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_5, 0); +x_46 = lean_ctor_get(x_5, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_5); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +return x_47; +} +} +} +} +lean_object* l_Lean_Elab_convertId___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_convertId(x_1, x_2, x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_convertId___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("convertId"); +return x_1; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_convertId___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltinTermElab_Lean_Elab_convertType___closed__2; +x_2 = l___regBuiltinTermElab_Lean_Elab_convertId___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_convertId___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_convertId___boxed), 3, 0); +return x_1; +} +} +lean_object* l___regBuiltinTermElab_Lean_Elab_convertId(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = l_Lean_Parser_Term_id___elambda__1___closed__2; +x_3 = l___regBuiltinTermElab_Lean_Elab_convertId___closed__2; +x_4 = l___regBuiltinTermElab_Lean_Elab_convertId___closed__3; +x_5 = l_Lean_addBuiltinPreTermElab(x_2, x_3, x_4, x_1); +return x_5; +} +} lean_object* l_Lean_Elab_oldElaborate(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -5007,6 +7022,10 @@ l_Lean_mkAsIs___closed__1 = _init_l_Lean_mkAsIs___closed__1(); lean_mark_persistent(l_Lean_mkAsIs___closed__1); l_Lean_mkAsIs___closed__2 = _init_l_Lean_mkAsIs___closed__2(); lean_mark_persistent(l_Lean_mkAsIs___closed__2); +l_Lean_mkAsPattern___closed__1 = _init_l_Lean_mkAsPattern___closed__1(); +lean_mark_persistent(l_Lean_mkAsPattern___closed__1); +l_Lean_mkAsPattern___closed__2 = _init_l_Lean_mkAsPattern___closed__2(); +lean_mark_persistent(l_Lean_mkAsPattern___closed__2); l_Lean_mkPreTypeAscription___closed__1 = _init_l_Lean_mkPreTypeAscription___closed__1(); lean_mark_persistent(l_Lean_mkPreTypeAscription___closed__1); l_Lean_mkPreTypeAscription___closed__2 = _init_l_Lean_mkPreTypeAscription___closed__2(); @@ -5037,6 +7056,8 @@ l_Lean_Elab_toPreTerm___closed__3 = _init_l_Lean_Elab_toPreTerm___closed__3(); lean_mark_persistent(l_Lean_Elab_toPreTerm___closed__3); l_Lean_Elab_toPreTerm___closed__4 = _init_l_Lean_Elab_toPreTerm___closed__4(); lean_mark_persistent(l_Lean_Elab_toPreTerm___closed__4); +l___private_init_lean_elaborator_preterm_3__mkHoleFor___closed__1 = _init_l___private_init_lean_elaborator_preterm_3__mkHoleFor___closed__1(); +lean_mark_persistent(l___private_init_lean_elaborator_preterm_3__mkHoleFor___closed__1); l_Lean_Elab_convertType___rarg___closed__1 = _init_l_Lean_Elab_convertType___rarg___closed__1(); lean_mark_persistent(l_Lean_Elab_convertType___rarg___closed__1); l___regBuiltinTermElab_Lean_Elab_convertType___closed__1 = _init_l___regBuiltinTermElab_Lean_Elab_convertType___closed__1(); @@ -5075,16 +7096,34 @@ l___regBuiltinTermElab_Lean_Elab_convertSortApp___closed__3 = _init_l___regBuilt lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertSortApp___closed__3); w = l___regBuiltinTermElab_Lean_Elab_convertSortApp(w); if (lean_io_result_is_error(w)) return w; -l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__1 = _init_l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__1(); -lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__1); -l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__2 = _init_l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__2(); -lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__2); -l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__3 = _init_l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__3(); -lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertArrow___closed__3); -w = l___regBuiltinTermElab_Lean_Elab_convertArrow(w); +l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__1 = _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__1(); +lean_mark_persistent(l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__1); +l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__2 = _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__2(); +lean_mark_persistent(l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__2); +l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__3 = _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__3(); +lean_mark_persistent(l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__3); +l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__4 = _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__4(); +lean_mark_persistent(l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__4); +l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__5 = _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__5(); +lean_mark_persistent(l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__5); +l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__6 = _init_l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__6(); +lean_mark_persistent(l_Array_ummapAux___main___at___private_init_lean_elaborator_preterm_5__processBinder___spec__1___closed__6); +l___private_init_lean_elaborator_preterm_5__processBinder___closed__1 = _init_l___private_init_lean_elaborator_preterm_5__processBinder___closed__1(); +lean_mark_persistent(l___private_init_lean_elaborator_preterm_5__processBinder___closed__1); +l___private_init_lean_elaborator_preterm_5__processBinder___closed__2 = _init_l___private_init_lean_elaborator_preterm_5__processBinder___closed__2(); +lean_mark_persistent(l___private_init_lean_elaborator_preterm_5__processBinder___closed__2); +l___private_init_lean_elaborator_preterm_5__processBinder___closed__3 = _init_l___private_init_lean_elaborator_preterm_5__processBinder___closed__3(); +lean_mark_persistent(l___private_init_lean_elaborator_preterm_5__processBinder___closed__3); +l___private_init_lean_elaborator_preterm_5__processBinder___closed__4 = _init_l___private_init_lean_elaborator_preterm_5__processBinder___closed__4(); +lean_mark_persistent(l___private_init_lean_elaborator_preterm_5__processBinder___closed__4); +l___regBuiltinTermElab_Lean_Elab_convertForall___closed__1 = _init_l___regBuiltinTermElab_Lean_Elab_convertForall___closed__1(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertForall___closed__1); +l___regBuiltinTermElab_Lean_Elab_convertForall___closed__2 = _init_l___regBuiltinTermElab_Lean_Elab_convertForall___closed__2(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertForall___closed__2); +l___regBuiltinTermElab_Lean_Elab_convertForall___closed__3 = _init_l___regBuiltinTermElab_Lean_Elab_convertForall___closed__3(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertForall___closed__3); +w = l___regBuiltinTermElab_Lean_Elab_convertForall(w); if (lean_io_result_is_error(w)) return w; -l_Lean_Elab_convertHole___rarg___closed__1 = _init_l_Lean_Elab_convertHole___rarg___closed__1(); -lean_mark_persistent(l_Lean_Elab_convertHole___rarg___closed__1); l___regBuiltinTermElab_Lean_Elab_convertHole___closed__1 = _init_l___regBuiltinTermElab_Lean_Elab_convertHole___closed__1(); lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertHole___closed__1); l___regBuiltinTermElab_Lean_Elab_convertHole___closed__2 = _init_l___regBuiltinTermElab_Lean_Elab_convertHole___closed__2(); @@ -5109,6 +7148,16 @@ l___regBuiltinTermElab_Lean_Elab_convertSorry___closed__3 = _init_l___regBuiltin lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertSorry___closed__3); w = l___regBuiltinTermElab_Lean_Elab_convertSorry(w); if (lean_io_result_is_error(w)) return w; +l_Lean_Elab_convertId___closed__1 = _init_l_Lean_Elab_convertId___closed__1(); +lean_mark_persistent(l_Lean_Elab_convertId___closed__1); +l___regBuiltinTermElab_Lean_Elab_convertId___closed__1 = _init_l___regBuiltinTermElab_Lean_Elab_convertId___closed__1(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertId___closed__1); +l___regBuiltinTermElab_Lean_Elab_convertId___closed__2 = _init_l___regBuiltinTermElab_Lean_Elab_convertId___closed__2(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertId___closed__2); +l___regBuiltinTermElab_Lean_Elab_convertId___closed__3 = _init_l___regBuiltinTermElab_Lean_Elab_convertId___closed__3(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_convertId___closed__3); +w = l___regBuiltinTermElab_Lean_Elab_convertId(w); +if (lean_io_result_is_error(w)) return w; return w; } #ifdef __cplusplus diff --git a/src/stage0/init/lean/elaborator/term.c b/src/stage0/init/lean/elaborator/term.c index e80255bb6b..523e52837e 100644 --- a/src/stage0/init/lean/elaborator/term.c +++ b/src/stage0/init/lean/elaborator/term.c @@ -13,53 +13,91 @@ #ifdef __cplusplus extern "C" { #endif +extern lean_object* l_Lean_Parser_Term_cons___elambda__1___closed__1; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_ummapAux___main___at_Lean_Elab_elabTermAux___main___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg___closed__1; uint8_t lean_name_dec_eq(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabList___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkExplicitBinder___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_elabList___closed__4; extern lean_object* l_Array_empty___closed__1; lean_object* l_Lean_Elab_elabList___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); -lean_object* l_Lean_Elab_runIOUnsafe___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabList___closed__3; +lean_object* l_Lean_Elab_mkExplicitBinder___rarg___closed__4; lean_object* l_Lean_Elab_elabList(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_elabTermAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Syntax_formatStx___main___rarg(lean_object*); +extern lean_object* l_Lean_mkErrorStringWithPos___closed__1; +lean_object* l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabList___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_List_format___rarg___closed__2; +lean_object* l_Lean_Elab_elabList___closed__3; +lean_object* l_Lean_Elab_elabArrow___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__3; +lean_object* l_Lean_mkIdentFrom___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_elabList___closed__5; +lean_object* l_Lean_Elab_elabList___closed__1; lean_object* l_Array_uget(lean_object*, lean_object*, size_t, lean_object*); -lean_object* lean_io_prim_put_str(lean_object*, lean_object*); -extern lean_object* l_Lean_Options_empty; +extern lean_object* l_PersistentHashMap_mkCollisionNode___rarg___closed__1; +extern lean_object* l_Lean_Parser_Term_explicitBinder___elambda__1___closed__2; +lean_object* l_Array_mkEmpty(lean_object*, lean_object*); extern lean_object* l_Lean_termElabAttribute; lean_object* l_AssocList_find___main___at_Lean_Elab_elabTermAux___main___spec__3___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkExplicitBinder___rarg___closed__3; lean_object* l_HashMapImp_find___at_Lean_Elab_elabTermAux___main___spec__2___boxed(lean_object*, lean_object*); size_t lean_name_hash_usize(lean_object*); lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_elabTermAux___main___closed__1; +lean_object* l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__1; lean_object* l_RBNode_find___main___at_Lean_addBuiltinTermElab___spec__4(lean_object*, lean_object*); -lean_object* l_IO_println___at_Lean_Elab_elabList___spec__1(lean_object*, lean_object*); +extern lean_object* l_Option_HasRepr___rarg___closed__3; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArgs___rarg(lean_object*); +lean_object* l_Lean_Elab_elabArrow___closed__3; lean_object* l_Lean_addBuiltinTermElab(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___regBuiltinTermElab_Lean_Elab_elabArrow(lean_object*); lean_object* l_Array_fget(lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_list___elambda__1___closed__2; lean_object* lean_nat_add(lean_object*, lean_object*); +extern lean_object* l_Lean_nullKind; +extern lean_object* l_Prod_HasRepr___rarg___closed__1; +lean_object* l_Array_push(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkExplicitBinder___rarg___closed__5; +lean_object* l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__2; lean_object* l_Lean_Elab_elabTermAux___main___closed__2; +lean_object* l_Lean_Elab_elabList___closed__2; +lean_object* l_Lean_Elab_mkExplicitBinder___rarg___closed__1; lean_object* l_Lean_Elab_elabTermAux___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); +lean_object* l_Lean_mkAtom___rarg(lean_object*); size_t lean_usize_modn(size_t, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabList(lean_object*); -lean_object* l_IO_print___at_Lean_Elab_elabList___spec__2(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_arrow___elambda__1___closed__2; lean_object* l_Array_size(lean_object*, lean_object*); lean_object* l_Array_fset(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_get(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_elabTerm(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_find___at_Lean_Elab_elabTermAux___main___spec__1(lean_object*, lean_object*); lean_object* l_AssocList_find___main___at_Lean_Elab_elabTermAux___main___spec__3(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_forall___elambda__1___closed__2; +extern lean_object* l_Lean_Syntax_asNode___rarg___closed__1; +lean_object* l_Lean_Elab_mkExplicitBinder___rarg___closed__2; +lean_object* l_Lean_Elab_elabArrow(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_elabArrow___closed__1; +lean_object* l_Lean_Elab_elabArrow___closed__2; lean_object* l_Lean_SMap_find___at_Lean_Elab_elabTermAux___main___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_elabTermAux(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_forall___elambda__1___closed__1; lean_object* l_Lean_Elab_oldElaborate(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_IO_println___rarg___closed__1; +extern lean_object* l___private_init_lean_parser_module_2__mkEOI___closed__3; lean_object* l___regBuiltinTermElab_Lean_Elab_elabList___closed__2; extern lean_object* l___regBuiltinTermElab_Lean_Elab_convertType___closed__2; +lean_object* l_Lean_Elab_mkFreshName___rarg(lean_object*); +lean_object* l_Lean_Elab_mkExplicitBinder(lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabList___closed__1; lean_object* l_Lean_Elab_elabTermAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_find___at_Lean_Elab_elabTermAux___main___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkExplicitBinder___rarg___closed__6; lean_object* l_AssocList_find___main___at_Lean_Elab_elabTermAux___main___spec__3(lean_object* x_1, lean_object* x_2) { _start: { @@ -649,209 +687,365 @@ lean_dec(x_6); x_78 = lean_ctor_get(x_16, 0); lean_inc(x_78); lean_dec(x_16); +lean_inc(x_4); +lean_inc(x_2); x_79 = lean_apply_4(x_78, x_1, x_2, x_4, x_5); -return x_79; +if (lean_obj_tag(x_79) == 0) +{ +uint8_t x_80; +x_80 = !lean_is_exclusive(x_79); +if (x_80 == 0) +{ +lean_object* x_81; lean_object* x_82; +x_81 = lean_ctor_get(x_79, 0); +x_82 = lean_ctor_get(x_79, 1); +lean_inc(x_82); +lean_ctor_set(x_79, 0, x_11); +if (lean_obj_tag(x_81) == 4) +{ +lean_object* x_83; +lean_dec(x_79); +lean_dec(x_4); +lean_dec(x_2); +x_83 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_83, 0, x_81); +lean_ctor_set(x_83, 1, x_82); +return x_83; +} +else +{ +lean_dec(x_82); +x_1 = x_81; +x_5 = x_79; +goto _start; } } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_80 = lean_ctor_get(x_5, 1); -lean_inc(x_80); -lean_dec(x_5); -x_81 = lean_box(0); -lean_inc(x_80); -x_82 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_82, 0, x_81); -lean_ctor_set(x_82, 1, x_80); -x_83 = l_Lean_termElabAttribute; -x_84 = lean_ctor_get(x_83, 1); -lean_inc(x_84); -x_85 = lean_ctor_get(x_80, 0); +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_79, 0); +x_86 = lean_ctor_get(x_79, 1); +lean_inc(x_86); lean_inc(x_85); -lean_dec(x_80); -x_86 = l_Lean_PersistentEnvExtension_getState___rarg(x_84, x_85); -lean_dec(x_85); -x_87 = l_Lean_SMap_find___at_Lean_Elab_elabTermAux___main___spec__1(x_86, x_6); -lean_dec(x_86); -if (lean_obj_tag(x_87) == 0) +lean_dec(x_79); +lean_inc(x_86); +x_87 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_87, 0, x_11); +lean_ctor_set(x_87, 1, x_86); +if (lean_obj_tag(x_85) == 4) { -lean_object* x_88; lean_object* x_89; lean_object* x_90; +lean_object* x_88; +lean_dec(x_87); +lean_dec(x_4); +lean_dec(x_2); +x_88 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_88, 0, x_85); +lean_ctor_set(x_88, 1, x_86); +return x_88; +} +else +{ +lean_dec(x_86); +x_1 = x_85; +x_5 = x_87; +goto _start; +} +} +} +else +{ +uint8_t x_90; +lean_dec(x_4); +lean_dec(x_2); +x_90 = !lean_is_exclusive(x_79); +if (x_90 == 0) +{ +return x_79; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_79, 0); +x_92 = lean_ctor_get(x_79, 1); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_79); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; +} +} +} +} +else +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_94 = lean_ctor_get(x_5, 1); +lean_inc(x_94); +lean_dec(x_5); +x_95 = lean_box(0); +lean_inc(x_94); +x_96 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_96, 0, x_95); +lean_ctor_set(x_96, 1, x_94); +x_97 = l_Lean_termElabAttribute; +x_98 = lean_ctor_get(x_97, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_94, 0); +lean_inc(x_99); +lean_dec(x_94); +x_100 = l_Lean_PersistentEnvExtension_getState___rarg(x_98, x_99); +lean_dec(x_99); +x_101 = l_Lean_SMap_find___at_Lean_Elab_elabTermAux___main___spec__1(x_100, x_6); +lean_dec(x_100); +if (lean_obj_tag(x_101) == 0) +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); lean_ctor_release(x_1, 1); - x_88 = x_1; + x_102 = x_1; } else { lean_dec_ref(x_1); - x_88 = lean_box(0); + x_102 = lean_box(0); } -x_89 = lean_unsigned_to_nat(0u); +x_103 = lean_unsigned_to_nat(0u); lean_inc(x_4); -x_90 = l_Array_ummapAux___main___at_Lean_Elab_elabTermAux___main___spec__4(x_89, x_7, x_4, x_82); -if (lean_obj_tag(x_90) == 0) +x_104 = l_Array_ummapAux___main___at_Lean_Elab_elabTermAux___main___spec__4(x_103, x_7, x_4, x_96); +if (lean_obj_tag(x_104) == 0) { -lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; -x_91 = lean_ctor_get(x_90, 0); -lean_inc(x_91); -x_92 = lean_ctor_get(x_90, 1); -lean_inc(x_92); -if (lean_is_exclusive(x_90)) { - lean_ctor_release(x_90, 0); - lean_ctor_release(x_90, 1); - x_93 = x_90; +lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; +x_105 = lean_ctor_get(x_104, 0); +lean_inc(x_105); +x_106 = lean_ctor_get(x_104, 1); +lean_inc(x_106); +if (lean_is_exclusive(x_104)) { + lean_ctor_release(x_104, 0); + lean_ctor_release(x_104, 1); + x_107 = x_104; } else { - lean_dec_ref(x_90); - x_93 = lean_box(0); + lean_dec_ref(x_104); + x_107 = lean_box(0); } -lean_inc(x_92); -if (lean_is_scalar(x_93)) { - x_94 = lean_alloc_ctor(0, 2, 0); +lean_inc(x_106); +if (lean_is_scalar(x_107)) { + x_108 = lean_alloc_ctor(0, 2, 0); } else { - x_94 = x_93; + x_108 = x_107; } -lean_ctor_set(x_94, 0, x_81); -lean_ctor_set(x_94, 1, x_92); -if (lean_is_scalar(x_88)) { - x_95 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_108, 0, x_95); +lean_ctor_set(x_108, 1, x_106); +if (lean_is_scalar(x_102)) { + x_109 = lean_alloc_ctor(1, 2, 0); } else { - x_95 = x_88; + x_109 = x_102; } -lean_ctor_set(x_95, 0, x_6); -lean_ctor_set(x_95, 1, x_91); +lean_ctor_set(x_109, 0, x_6); +lean_ctor_set(x_109, 1, x_105); if (x_3 == 0) { -lean_object* x_96; -lean_dec(x_92); -x_96 = l_Lean_Elab_oldElaborate(x_95, x_2, x_4, x_94); -if (lean_obj_tag(x_96) == 0) +lean_object* x_110; +lean_dec(x_106); +x_110 = l_Lean_Elab_oldElaborate(x_109, x_2, x_4, x_108); +if (lean_obj_tag(x_110) == 0) { -lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; -x_97 = lean_ctor_get(x_96, 0); -lean_inc(x_97); -x_98 = lean_ctor_get(x_96, 1); -lean_inc(x_98); -if (lean_is_exclusive(x_96)) { - lean_ctor_release(x_96, 0); - lean_ctor_release(x_96, 1); - x_99 = x_96; +lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_111 = lean_ctor_get(x_110, 0); +lean_inc(x_111); +x_112 = lean_ctor_get(x_110, 1); +lean_inc(x_112); +if (lean_is_exclusive(x_110)) { + lean_ctor_release(x_110, 0); + lean_ctor_release(x_110, 1); + x_113 = x_110; } else { - lean_dec_ref(x_96); - x_99 = lean_box(0); + lean_dec_ref(x_110); + x_113 = lean_box(0); } -x_100 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_100, 0, x_97); -if (lean_is_scalar(x_99)) { - x_101 = lean_alloc_ctor(0, 2, 0); +x_114 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_114, 0, x_111); +if (lean_is_scalar(x_113)) { + x_115 = lean_alloc_ctor(0, 2, 0); } else { - x_101 = x_99; + x_115 = x_113; } -lean_ctor_set(x_101, 0, x_100); -lean_ctor_set(x_101, 1, x_98); -return x_101; +lean_ctor_set(x_115, 0, x_114); +lean_ctor_set(x_115, 1, x_112); +return x_115; } else { -lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; -x_102 = lean_ctor_get(x_96, 0); -lean_inc(x_102); -x_103 = lean_ctor_get(x_96, 1); -lean_inc(x_103); -if (lean_is_exclusive(x_96)) { - lean_ctor_release(x_96, 0); - lean_ctor_release(x_96, 1); - x_104 = x_96; +lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_116 = lean_ctor_get(x_110, 0); +lean_inc(x_116); +x_117 = lean_ctor_get(x_110, 1); +lean_inc(x_117); +if (lean_is_exclusive(x_110)) { + lean_ctor_release(x_110, 0); + lean_ctor_release(x_110, 1); + x_118 = x_110; } else { - lean_dec_ref(x_96); - x_104 = lean_box(0); + lean_dec_ref(x_110); + x_118 = lean_box(0); } -if (lean_is_scalar(x_104)) { - x_105 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_118)) { + x_119 = lean_alloc_ctor(1, 2, 0); } else { - x_105 = x_104; + x_119 = x_118; } -lean_ctor_set(x_105, 0, x_102); -lean_ctor_set(x_105, 1, x_103); -return x_105; +lean_ctor_set(x_119, 0, x_116); +lean_ctor_set(x_119, 1, x_117); +return x_119; } } else { -lean_object* x_106; -lean_dec(x_94); +lean_object* x_120; +lean_dec(x_108); lean_dec(x_4); lean_dec(x_2); -x_106 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_106, 0, x_95); -lean_ctor_set(x_106, 1, x_92); -return x_106; +x_120 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_120, 0, x_109); +lean_ctor_set(x_120, 1, x_106); +return x_120; } } else { -lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; -lean_dec(x_88); +lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; +lean_dec(x_102); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); -x_107 = lean_ctor_get(x_90, 0); -lean_inc(x_107); -x_108 = lean_ctor_get(x_90, 1); -lean_inc(x_108); -if (lean_is_exclusive(x_90)) { - lean_ctor_release(x_90, 0); - lean_ctor_release(x_90, 1); - x_109 = x_90; +x_121 = lean_ctor_get(x_104, 0); +lean_inc(x_121); +x_122 = lean_ctor_get(x_104, 1); +lean_inc(x_122); +if (lean_is_exclusive(x_104)) { + lean_ctor_release(x_104, 0); + lean_ctor_release(x_104, 1); + x_123 = x_104; } else { - lean_dec_ref(x_90); - x_109 = lean_box(0); + lean_dec_ref(x_104); + x_123 = lean_box(0); } -if (lean_is_scalar(x_109)) { - x_110 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_123)) { + x_124 = lean_alloc_ctor(1, 2, 0); } else { - x_110 = x_109; + x_124 = x_123; } -lean_ctor_set(x_110, 0, x_107); -lean_ctor_set(x_110, 1, x_108); -return x_110; +lean_ctor_set(x_124, 0, x_121); +lean_ctor_set(x_124, 1, x_122); +return x_124; } } else { -lean_object* x_111; lean_object* x_112; +lean_object* x_125; lean_object* x_126; lean_dec(x_7); lean_dec(x_6); -x_111 = lean_ctor_get(x_87, 0); -lean_inc(x_111); -lean_dec(x_87); -x_112 = lean_apply_4(x_111, x_1, x_2, x_4, x_82); -return x_112; +x_125 = lean_ctor_get(x_101, 0); +lean_inc(x_125); +lean_dec(x_101); +lean_inc(x_4); +lean_inc(x_2); +x_126 = lean_apply_4(x_125, x_1, x_2, x_4, x_96); +if (lean_obj_tag(x_126) == 0) +{ +lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; +x_127 = lean_ctor_get(x_126, 0); +lean_inc(x_127); +x_128 = lean_ctor_get(x_126, 1); +lean_inc(x_128); +if (lean_is_exclusive(x_126)) { + lean_ctor_release(x_126, 0); + lean_ctor_release(x_126, 1); + x_129 = x_126; +} else { + lean_dec_ref(x_126); + x_129 = lean_box(0); +} +lean_inc(x_128); +if (lean_is_scalar(x_129)) { + x_130 = lean_alloc_ctor(0, 2, 0); +} else { + x_130 = x_129; +} +lean_ctor_set(x_130, 0, x_95); +lean_ctor_set(x_130, 1, x_128); +if (lean_obj_tag(x_127) == 4) +{ +lean_object* x_131; +lean_dec(x_130); +lean_dec(x_4); +lean_dec(x_2); +x_131 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_131, 0, x_127); +lean_ctor_set(x_131, 1, x_128); +return x_131; +} +else +{ +lean_dec(x_128); +x_1 = x_127; +x_5 = x_130; +goto _start; +} +} +else +{ +lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; +lean_dec(x_4); +lean_dec(x_2); +x_133 = lean_ctor_get(x_126, 0); +lean_inc(x_133); +x_134 = lean_ctor_get(x_126, 1); +lean_inc(x_134); +if (lean_is_exclusive(x_126)) { + lean_ctor_release(x_126, 0); + lean_ctor_release(x_126, 1); + x_135 = x_126; +} else { + lean_dec_ref(x_126); + x_135 = lean_box(0); +} +if (lean_is_scalar(x_135)) { + x_136 = lean_alloc_ctor(1, 2, 0); +} else { + x_136 = x_135; +} +lean_ctor_set(x_136, 0, x_133); +lean_ctor_set(x_136, 1, x_134); +return x_136; +} } } } case 4: { -uint8_t x_113; +uint8_t x_137; lean_dec(x_4); lean_dec(x_2); -x_113 = !lean_is_exclusive(x_5); -if (x_113 == 0) +x_137 = !lean_is_exclusive(x_5); +if (x_137 == 0) { -lean_object* x_114; -x_114 = lean_ctor_get(x_5, 0); -lean_dec(x_114); +lean_object* x_138; +x_138 = lean_ctor_get(x_5, 0); +lean_dec(x_138); lean_ctor_set(x_5, 0, x_1); return x_5; } else { -lean_object* x_115; lean_object* x_116; -x_115 = lean_ctor_get(x_5, 1); -lean_inc(x_115); +lean_object* x_139; lean_object* x_140; +x_139 = lean_ctor_get(x_5, 1); +lean_inc(x_139); lean_dec(x_5); -x_116 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_116, 0, x_1); -lean_ctor_set(x_116, 1, x_115); -return x_116; +x_140 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_140, 0, x_1); +lean_ctor_set(x_140, 1, x_139); +return x_140; } } default: @@ -860,54 +1054,54 @@ lean_dec(x_4); lean_dec(x_2); if (x_3 == 0) { -uint8_t x_117; +uint8_t x_141; lean_dec(x_1); -x_117 = !lean_is_exclusive(x_5); -if (x_117 == 0) +x_141 = !lean_is_exclusive(x_5); +if (x_141 == 0) { -lean_object* x_118; lean_object* x_119; -x_118 = lean_ctor_get(x_5, 0); -lean_dec(x_118); -x_119 = l_Lean_Elab_elabTermAux___main___closed__2; +lean_object* x_142; lean_object* x_143; +x_142 = lean_ctor_get(x_5, 0); +lean_dec(x_142); +x_143 = l_Lean_Elab_elabTermAux___main___closed__2; lean_ctor_set_tag(x_5, 1); -lean_ctor_set(x_5, 0, x_119); +lean_ctor_set(x_5, 0, x_143); return x_5; } else { -lean_object* x_120; lean_object* x_121; lean_object* x_122; -x_120 = lean_ctor_get(x_5, 1); -lean_inc(x_120); +lean_object* x_144; lean_object* x_145; lean_object* x_146; +x_144 = lean_ctor_get(x_5, 1); +lean_inc(x_144); lean_dec(x_5); -x_121 = l_Lean_Elab_elabTermAux___main___closed__2; -x_122 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_122, 0, x_121); -lean_ctor_set(x_122, 1, x_120); -return x_122; +x_145 = l_Lean_Elab_elabTermAux___main___closed__2; +x_146 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_146, 0, x_145); +lean_ctor_set(x_146, 1, x_144); +return x_146; } } else { -uint8_t x_123; -x_123 = !lean_is_exclusive(x_5); -if (x_123 == 0) +uint8_t x_147; +x_147 = !lean_is_exclusive(x_5); +if (x_147 == 0) { -lean_object* x_124; -x_124 = lean_ctor_get(x_5, 0); -lean_dec(x_124); +lean_object* x_148; +x_148 = lean_ctor_get(x_5, 0); +lean_dec(x_148); lean_ctor_set(x_5, 0, x_1); return x_5; } else { -lean_object* x_125; lean_object* x_126; -x_125 = lean_ctor_get(x_5, 1); -lean_inc(x_125); +lean_object* x_149; lean_object* x_150; +x_149 = lean_ctor_get(x_5, 1); +lean_inc(x_149); lean_dec(x_5); -x_126 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_126, 0, x_1); -lean_ctor_set(x_126, 1, x_125); -return x_126; +x_150 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_150, 0, x_1); +lean_ctor_set(x_150, 1, x_149); +return x_150; } } } @@ -981,133 +1175,157 @@ x_6 = l_Lean_Elab_elabTermAux___main(x_1, x_2, x_5, x_3, x_4); return x_6; } } -lean_object* l_IO_print___at_Lean_Elab_elabList___spec__2(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabList___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_3 = l_Lean_Syntax_formatStx___main___rarg(x_1); -x_4 = l_Lean_Options_empty; -x_5 = l_Lean_Format_pretty(x_3, x_4); -x_6 = lean_io_prim_put_str(x_5, x_2); -lean_dec(x_5); -return x_6; -} -} -lean_object* l_IO_println___at_Lean_Elab_elabList___spec__1(lean_object* x_1, lean_object* x_2) { -_start: +lean_object* x_6; uint8_t x_7; +x_6 = lean_array_get_size(x_3); +x_7 = lean_nat_dec_lt(x_4, x_6); +lean_dec(x_6); +if (x_7 == 0) { -lean_object* x_3; -x_3 = l_IO_print___at_Lean_Elab_elabList___spec__2(x_1, x_2); -if (lean_obj_tag(x_3) == 0) -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_5 = lean_ctor_get(x_3, 0); -lean_dec(x_5); -x_6 = lean_box(0); -lean_ctor_set(x_3, 0, x_6); -x_7 = l_IO_println___rarg___closed__1; -x_8 = lean_io_prim_put_str(x_7, x_3); -return x_8; +lean_dec(x_4); +lean_dec(x_1); +return x_5; } else { -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_9 = lean_ctor_get(x_3, 1); -lean_inc(x_9); -lean_dec(x_3); -x_10 = lean_box(0); -x_11 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_11, 0, x_10); -lean_ctor_set(x_11, 1, x_9); -x_12 = l_IO_println___rarg___closed__1; -x_13 = lean_io_prim_put_str(x_12, x_11); -return x_13; +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_8 = lean_array_fget(x_3, x_4); +x_9 = lean_box(0); +x_10 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_10, 0, x_5); +lean_ctor_set(x_10, 1, x_9); +x_11 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_11, 0, x_8); +lean_ctor_set(x_11, 1, x_10); +lean_inc(x_1); +x_12 = l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg(x_1, x_11); +x_13 = lean_nat_add(x_4, x_2); +lean_dec(x_4); +x_4 = x_13; +x_5 = x_12; +goto _start; } } -else +} +lean_object* _init_l_Lean_Elab_elabList___closed__1() { +_start: { -uint8_t x_14; -x_14 = !lean_is_exclusive(x_3); -if (x_14 == 0) +lean_object* x_1; +x_1 = lean_mk_string("List"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_elabList___closed__2() { +_start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_elabList___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); return x_3; } -else +} +lean_object* _init_l_Lean_Elab_elabList___closed__3() { +_start: { -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_ctor_get(x_3, 0); -x_16 = lean_ctor_get(x_3, 1); -lean_inc(x_16); -lean_inc(x_15); -lean_dec(x_3); -x_17 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_16); -return x_17; +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_elabList___closed__2; +x_2 = l_Lean_Parser_Term_cons___elambda__1___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; } } +lean_object* _init_l_Lean_Elab_elabList___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("nil"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_elabList___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_elabList___closed__2; +x_2 = l_Lean_Elab_elabList___closed__4; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; } } lean_object* l_Lean_Elab_elabList(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_5; lean_object* x_6; -lean_inc(x_1); -x_5 = lean_alloc_closure((void*)(l_IO_println___at_Lean_Elab_elabList___spec__1), 2, 1); -lean_closure_set(x_5, 0, x_1); -x_6 = l_Lean_Elab_runIOUnsafe___rarg(x_5, x_3, x_4); -if (lean_obj_tag(x_6) == 0) +uint8_t x_5; +x_5 = !lean_is_exclusive(x_4); +if (x_5 == 0) { -uint8_t x_7; -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_6 = lean_ctor_get(x_1, 1); +x_7 = lean_ctor_get(x_4, 0); +lean_dec(x_7); +x_8 = lean_box(0); +x_9 = lean_unsigned_to_nat(0u); +x_10 = lean_array_get(x_8, x_6, x_9); +x_11 = l_Lean_Elab_elabList___closed__3; +x_12 = l_Lean_mkIdentFrom___rarg(x_10, x_11); +lean_dec(x_10); +x_13 = lean_unsigned_to_nat(1u); +x_14 = lean_array_get(x_8, x_6, x_13); +x_15 = l_Lean_Syntax_getArgs___rarg(x_14); +lean_dec(x_14); +x_16 = lean_unsigned_to_nat(2u); +x_17 = lean_array_get(x_8, x_6, x_16); +x_18 = l_Lean_Elab_elabList___closed__5; +x_19 = l_Lean_mkIdentFrom___rarg(x_17, x_18); +lean_dec(x_17); +x_20 = l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabList___spec__1(x_12, x_16, x_15, x_9, x_19); +lean_dec(x_15); +lean_ctor_set(x_4, 0, x_20); +return x_4; +} +else { -lean_object* x_8; -x_8 = lean_ctor_get(x_6, 0); -lean_dec(x_8); -lean_ctor_set(x_6, 0, x_1); +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_21 = lean_ctor_get(x_1, 1); +x_22 = lean_ctor_get(x_4, 1); +lean_inc(x_22); +lean_dec(x_4); +x_23 = lean_box(0); +x_24 = lean_unsigned_to_nat(0u); +x_25 = lean_array_get(x_23, x_21, x_24); +x_26 = l_Lean_Elab_elabList___closed__3; +x_27 = l_Lean_mkIdentFrom___rarg(x_25, x_26); +lean_dec(x_25); +x_28 = lean_unsigned_to_nat(1u); +x_29 = lean_array_get(x_23, x_21, x_28); +x_30 = l_Lean_Syntax_getArgs___rarg(x_29); +lean_dec(x_29); +x_31 = lean_unsigned_to_nat(2u); +x_32 = lean_array_get(x_23, x_21, x_31); +x_33 = l_Lean_Elab_elabList___closed__5; +x_34 = l_Lean_mkIdentFrom___rarg(x_32, x_33); +lean_dec(x_32); +x_35 = l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabList___spec__1(x_27, x_31, x_30, x_24, x_34); +lean_dec(x_30); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_22); +return x_36; +} +} +} +lean_object* l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabList___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_Syntax_mfoldArgsAux___main___at_Lean_Elab_elabList___spec__1(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +lean_dec(x_2); return x_6; } -else -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_dec(x_6); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_1); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -else -{ -uint8_t x_11; -lean_dec(x_1); -x_11 = !lean_is_exclusive(x_6); -if (x_11 == 0) -{ -return x_6; -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = lean_ctor_get(x_6, 0); -x_13 = lean_ctor_get(x_6, 1); -lean_inc(x_13); -lean_inc(x_12); -lean_dec(x_6); -x_14 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_14, 0, x_12); -lean_ctor_set(x_14, 1, x_13); -return x_14; -} -} -} } lean_object* l_Lean_Elab_elabList___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: @@ -1116,6 +1334,7 @@ lean_object* x_5; x_5 = l_Lean_Elab_elabList(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); +lean_dec(x_1); return x_5; } } @@ -1156,6 +1375,328 @@ x_5 = l_Lean_addBuiltinTermElab(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Prod_HasRepr___rarg___closed__1; +x_2 = l_Lean_mkAtom___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_mkErrorStringWithPos___closed__1; +x_2 = l_Lean_mkAtom___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg___closed__1; +x_2 = l_Lean_Elab_mkExplicitBinder___rarg___closed__2; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Option_HasRepr___rarg___closed__3; +x_2 = l_Lean_mkAtom___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(5u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_mkExplicitBinder___rarg___closed__5; +x_2 = l_Lean_Elab_mkExplicitBinder___rarg___closed__1; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_mkExplicitBinder___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_3 = l___private_init_lean_parser_module_2__mkEOI___closed__3; +x_4 = lean_array_push(x_3, x_1); +x_5 = l_Lean_nullKind; +x_6 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_4); +x_7 = l_Lean_Elab_mkExplicitBinder___rarg___closed__3; +x_8 = lean_array_push(x_7, x_2); +x_9 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_9, 0, x_5); +lean_ctor_set(x_9, 1, x_8); +x_10 = l_Lean_Elab_mkExplicitBinder___rarg___closed__6; +x_11 = lean_array_push(x_10, x_6); +x_12 = lean_array_push(x_11, x_9); +x_13 = l_Lean_Syntax_asNode___rarg___closed__1; +x_14 = lean_array_push(x_12, x_13); +x_15 = l_Lean_Elab_mkExplicitBinder___rarg___closed__4; +x_16 = lean_array_push(x_14, x_15); +x_17 = l_Lean_Parser_Term_explicitBinder___elambda__1___closed__2; +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +lean_object* l_Lean_Elab_mkExplicitBinder(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_mkExplicitBinder___rarg), 2, 0); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_elabArrow___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Term_forall___elambda__1___closed__1; +x_2 = l_Lean_mkAtom___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_elabArrow___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_List_format___rarg___closed__2; +x_2 = l_Lean_mkAtom___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_elabArrow___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_PersistentHashMap_mkCollisionNode___rarg___closed__1; +x_2 = l_Lean_Elab_elabArrow___closed__1; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_elabArrow(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_mkFreshName___rarg(x_4); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_7 = lean_ctor_get(x_5, 0); +x_8 = lean_ctor_get(x_1, 1); +lean_inc(x_8); +x_9 = l_Lean_mkIdentFrom___rarg(x_1, x_7); +x_10 = !lean_is_exclusive(x_1); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_11 = lean_ctor_get(x_1, 1); +lean_dec(x_11); +x_12 = lean_ctor_get(x_1, 0); +lean_dec(x_12); +x_13 = lean_box(0); +x_14 = lean_unsigned_to_nat(0u); +x_15 = lean_array_get(x_13, x_8, x_14); +x_16 = l_Lean_Elab_mkExplicitBinder___rarg(x_9, x_15); +x_17 = l___private_init_lean_parser_module_2__mkEOI___closed__3; +x_18 = lean_array_push(x_17, x_16); +x_19 = l_Lean_nullKind; +lean_ctor_set(x_1, 1, x_18); +lean_ctor_set(x_1, 0, x_19); +x_20 = l_Lean_Elab_elabArrow___closed__3; +x_21 = lean_array_push(x_20, x_1); +x_22 = l_Lean_Elab_elabArrow___closed__2; +x_23 = lean_array_push(x_21, x_22); +x_24 = lean_unsigned_to_nat(2u); +x_25 = lean_array_get(x_13, x_8, x_24); +lean_dec(x_8); +x_26 = lean_array_push(x_23, x_25); +x_27 = l_Lean_Parser_Term_forall___elambda__1___closed__2; +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_26); +lean_ctor_set(x_5, 0, x_28); +return x_5; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; +lean_dec(x_1); +x_29 = lean_box(0); +x_30 = lean_unsigned_to_nat(0u); +x_31 = lean_array_get(x_29, x_8, x_30); +x_32 = l_Lean_Elab_mkExplicitBinder___rarg(x_9, x_31); +x_33 = l___private_init_lean_parser_module_2__mkEOI___closed__3; +x_34 = lean_array_push(x_33, x_32); +x_35 = l_Lean_nullKind; +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_34); +x_37 = l_Lean_Elab_elabArrow___closed__3; +x_38 = lean_array_push(x_37, x_36); +x_39 = l_Lean_Elab_elabArrow___closed__2; +x_40 = lean_array_push(x_38, x_39); +x_41 = lean_unsigned_to_nat(2u); +x_42 = lean_array_get(x_29, x_8, x_41); +lean_dec(x_8); +x_43 = lean_array_push(x_40, x_42); +x_44 = l_Lean_Parser_Term_forall___elambda__1___closed__2; +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_43); +lean_ctor_set(x_5, 0, x_45); +return x_5; +} +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; 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; lean_object* x_67; lean_object* x_68; +x_46 = lean_ctor_get(x_5, 0); +x_47 = lean_ctor_get(x_5, 1); +lean_inc(x_47); +lean_inc(x_46); +lean_dec(x_5); +x_48 = lean_ctor_get(x_1, 1); +lean_inc(x_48); +x_49 = l_Lean_mkIdentFrom___rarg(x_1, x_46); +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + lean_ctor_release(x_1, 1); + x_50 = x_1; +} else { + lean_dec_ref(x_1); + x_50 = lean_box(0); +} +x_51 = lean_box(0); +x_52 = lean_unsigned_to_nat(0u); +x_53 = lean_array_get(x_51, x_48, x_52); +x_54 = l_Lean_Elab_mkExplicitBinder___rarg(x_49, x_53); +x_55 = l___private_init_lean_parser_module_2__mkEOI___closed__3; +x_56 = lean_array_push(x_55, x_54); +x_57 = l_Lean_nullKind; +if (lean_is_scalar(x_50)) { + x_58 = lean_alloc_ctor(1, 2, 0); +} else { + x_58 = x_50; +} +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_56); +x_59 = l_Lean_Elab_elabArrow___closed__3; +x_60 = lean_array_push(x_59, x_58); +x_61 = l_Lean_Elab_elabArrow___closed__2; +x_62 = lean_array_push(x_60, x_61); +x_63 = lean_unsigned_to_nat(2u); +x_64 = lean_array_get(x_51, x_48, x_63); +lean_dec(x_48); +x_65 = lean_array_push(x_62, x_64); +x_66 = l_Lean_Parser_Term_forall___elambda__1___closed__2; +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_66); +lean_ctor_set(x_67, 1, x_65); +x_68 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_47); +return x_68; +} +} +else +{ +uint8_t x_69; +lean_dec(x_1); +x_69 = !lean_is_exclusive(x_5); +if (x_69 == 0) +{ +return x_5; +} +else +{ +lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_70 = lean_ctor_get(x_5, 0); +x_71 = lean_ctor_get(x_5, 1); +lean_inc(x_71); +lean_inc(x_70); +lean_dec(x_5); +x_72 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_72, 0, x_70); +lean_ctor_set(x_72, 1, x_71); +return x_72; +} +} +} +} +lean_object* l_Lean_Elab_elabArrow___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_elabArrow(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_5; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("elabArrow"); +return x_1; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltinTermElab_Lean_Elab_convertType___closed__2; +x_2 = l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_elabArrow___boxed), 4, 0); +return x_1; +} +} +lean_object* l___regBuiltinTermElab_Lean_Elab_elabArrow(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = l_Lean_Parser_Term_arrow___elambda__1___closed__2; +x_3 = l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__2; +x_4 = l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__3; +x_5 = l_Lean_addBuiltinTermElab(x_2, x_3, x_4, x_1); +return x_5; +} +} lean_object* initialize_init_lean_elaborator_alias(lean_object*); lean_object* initialize_init_lean_elaborator_basic(lean_object*); lean_object* initialize_init_lean_elaborator_preterm(lean_object*); @@ -1174,6 +1715,16 @@ l_Lean_Elab_elabTermAux___main___closed__1 = _init_l_Lean_Elab_elabTermAux___mai lean_mark_persistent(l_Lean_Elab_elabTermAux___main___closed__1); l_Lean_Elab_elabTermAux___main___closed__2 = _init_l_Lean_Elab_elabTermAux___main___closed__2(); lean_mark_persistent(l_Lean_Elab_elabTermAux___main___closed__2); +l_Lean_Elab_elabList___closed__1 = _init_l_Lean_Elab_elabList___closed__1(); +lean_mark_persistent(l_Lean_Elab_elabList___closed__1); +l_Lean_Elab_elabList___closed__2 = _init_l_Lean_Elab_elabList___closed__2(); +lean_mark_persistent(l_Lean_Elab_elabList___closed__2); +l_Lean_Elab_elabList___closed__3 = _init_l_Lean_Elab_elabList___closed__3(); +lean_mark_persistent(l_Lean_Elab_elabList___closed__3); +l_Lean_Elab_elabList___closed__4 = _init_l_Lean_Elab_elabList___closed__4(); +lean_mark_persistent(l_Lean_Elab_elabList___closed__4); +l_Lean_Elab_elabList___closed__5 = _init_l_Lean_Elab_elabList___closed__5(); +lean_mark_persistent(l_Lean_Elab_elabList___closed__5); l___regBuiltinTermElab_Lean_Elab_elabList___closed__1 = _init_l___regBuiltinTermElab_Lean_Elab_elabList___closed__1(); lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_elabList___closed__1); l___regBuiltinTermElab_Lean_Elab_elabList___closed__2 = _init_l___regBuiltinTermElab_Lean_Elab_elabList___closed__2(); @@ -1182,6 +1733,32 @@ l___regBuiltinTermElab_Lean_Elab_elabList___closed__3 = _init_l___regBuiltinTerm lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_elabList___closed__3); w = l___regBuiltinTermElab_Lean_Elab_elabList(w); if (lean_io_result_is_error(w)) return w; +l_Lean_Elab_mkExplicitBinder___rarg___closed__1 = _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__1(); +lean_mark_persistent(l_Lean_Elab_mkExplicitBinder___rarg___closed__1); +l_Lean_Elab_mkExplicitBinder___rarg___closed__2 = _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__2(); +lean_mark_persistent(l_Lean_Elab_mkExplicitBinder___rarg___closed__2); +l_Lean_Elab_mkExplicitBinder___rarg___closed__3 = _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__3(); +lean_mark_persistent(l_Lean_Elab_mkExplicitBinder___rarg___closed__3); +l_Lean_Elab_mkExplicitBinder___rarg___closed__4 = _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__4(); +lean_mark_persistent(l_Lean_Elab_mkExplicitBinder___rarg___closed__4); +l_Lean_Elab_mkExplicitBinder___rarg___closed__5 = _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__5(); +lean_mark_persistent(l_Lean_Elab_mkExplicitBinder___rarg___closed__5); +l_Lean_Elab_mkExplicitBinder___rarg___closed__6 = _init_l_Lean_Elab_mkExplicitBinder___rarg___closed__6(); +lean_mark_persistent(l_Lean_Elab_mkExplicitBinder___rarg___closed__6); +l_Lean_Elab_elabArrow___closed__1 = _init_l_Lean_Elab_elabArrow___closed__1(); +lean_mark_persistent(l_Lean_Elab_elabArrow___closed__1); +l_Lean_Elab_elabArrow___closed__2 = _init_l_Lean_Elab_elabArrow___closed__2(); +lean_mark_persistent(l_Lean_Elab_elabArrow___closed__2); +l_Lean_Elab_elabArrow___closed__3 = _init_l_Lean_Elab_elabArrow___closed__3(); +lean_mark_persistent(l_Lean_Elab_elabArrow___closed__3); +l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__1 = _init_l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__1(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__1); +l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__2 = _init_l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__2(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__2); +l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__3 = _init_l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__3(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_elabArrow___closed__3); +w = l___regBuiltinTermElab_Lean_Elab_elabArrow(w); +if (lean_io_result_is_error(w)) return w; return w; } #ifdef __cplusplus diff --git a/src/stage0/init/lean/expr.c b/src/stage0/init/lean/expr.c index cb069d09bc..909706ae1d 100644 --- a/src/stage0/init/lean/expr.c +++ b/src/stage0/init/lean/expr.c @@ -34,6 +34,7 @@ lean_object* l_Lean_mkApp(lean_object*, lean_object*); lean_object* l_Lean_Expr_eqv___boxed(lean_object*, lean_object*); lean_object* l_Lean_mkDecIsTrue___closed__4; lean_object* lean_expr_mk_pi(lean_object*, uint8_t, lean_object*, lean_object*); +lean_object* lean_expr_instantiate(lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppNumArgsAux___boxed(lean_object*, lean_object*); lean_object* lean_expr_local(lean_object*, lean_object*, lean_object*, uint8_t); lean_object* lean_expr_mk_app(lean_object*, lean_object*); @@ -56,6 +57,8 @@ lean_object* l_Lean_Expr_Hashable___closed__1; uint8_t lean_expr_eqv(lean_object*, lean_object*); lean_object* l_Lean_MData_HasEmptyc; lean_object* l_Lean_Expr_dbgToString___boxed(lean_object*); +lean_object* l_Lean_Expr_instantiateRev___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Expr_instantiate___boxed(lean_object*, lean_object*); lean_object* l_Lean_Expr_elet___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppNumArgs(lean_object*); lean_object* l_Lean_mkDecIsTrue___closed__1; @@ -68,16 +71,20 @@ uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Expr_app___boxed(lean_object*, lean_object*); lean_object* l_Lean_mkDecIsTrue___closed__2; lean_object* l_Lean_Expr_getAppFn___main___boxed(lean_object*); +lean_object* lean_expr_instantiate_rev(lean_object*, lean_object*); lean_object* l_Lean_mkCApp(lean_object*, lean_object*); lean_object* l_Lean_mkDecIsTrue___closed__5; uint8_t l_Lean_Expr_isAppOfArity___main(lean_object*, lean_object*, lean_object*); lean_object* lean_expr_mk_mvar(lean_object*); lean_object* lean_expr_mk_bvar(lean_object*); +lean_object* lean_expr_abstract_range(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_proj___boxed(lean_object*, lean_object*, lean_object*); uint8_t lean_expr_lt(lean_object*, lean_object*); lean_object* l_Lean_mkDecIsTrue(lean_object*, lean_object*); +lean_object* l_Lean_Expr_abstract___boxed(lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*); lean_object* l_Lean_Expr_const___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Expr_abstractRange___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvar___boxed(lean_object*); lean_object* lean_expr_mk_lambda(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Expr_mdata___boxed(lean_object*, lean_object*); @@ -85,6 +92,7 @@ lean_object* l_Lean_Expr_HasBeq; lean_object* l_Lean_Expr_Hashable; lean_object* l_Lean_Expr_getAppNumArgs___boxed(lean_object*); lean_object* l_Lean_Expr_mvar___boxed(lean_object*); +lean_object* lean_expr_abstract(lean_object*, lean_object*); lean_object* l_Lean_Expr_local___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn___boxed(lean_object*); uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); @@ -592,6 +600,38 @@ x_5 = lean_box(x_4); return x_5; } } +lean_object* l_Lean_Expr_instantiate___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_expr_instantiate(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Expr_instantiateRev___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_expr_instantiate_rev(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Expr_abstract___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_expr_abstract(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Expr_abstractRange___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_expr_abstract_range(x_1, x_2, x_3); +return x_4; +} +} lean_object* l_Lean_mkConst(lean_object* x_1, lean_object* x_2) { _start: { diff --git a/src/stage0/init/lean/format.c b/src/stage0/init/lean/format.c index 11a9ad5bf6..1e89469fc2 100644 --- a/src/stage0/init/lean/format.c +++ b/src/stage0/init/lean/format.c @@ -117,6 +117,7 @@ lean_object* l_Lean_Format_paren___closed__3; lean_object* l_Lean_Format_repr___main___closed__10; lean_object* l_Lean_Format_Inhabited; lean_object* l_Lean_Format_getWidth___closed__4; +extern lean_object* l_String_Iterator_HasRepr___closed__2; extern lean_object* l_Prod_HasRepr___rarg___closed__1; lean_object* l_Lean_Format_repr___main___closed__12; lean_object* l_Lean_Format_indentOption(lean_object*); @@ -167,7 +168,6 @@ lean_object* l_Lean_Format_defWidth; lean_object* l_Lean_Format_unicodeOption(lean_object*); lean_object* l_Lean_formatEntry___closed__2; lean_object* l_Array_size(lean_object*, lean_object*); -lean_object* l_Lean_Format_flatten___main___closed__2; lean_object* l_Lean_Format_repr___main___closed__9; lean_object* l_Lean_Format_widthOption___closed__2; lean_object* l_Lean_Format_prefixJoin(lean_object*); @@ -347,16 +347,8 @@ return x_3; lean_object* _init_l_Lean_Format_flatten___main___closed__1() { _start: { -lean_object* x_1; -x_1 = lean_mk_string(" "); -return x_1; -} -} -lean_object* _init_l_Lean_Format_flatten___main___closed__2() { -_start: -{ lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Format_flatten___main___closed__1; +x_1 = l_String_Iterator_HasRepr___closed__2; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; @@ -369,7 +361,7 @@ switch (lean_obj_tag(x_1)) { case 1: { lean_object* x_2; -x_2 = l_Lean_Format_flatten___main___closed__2; +x_2 = l_Lean_Format_flatten___main___closed__1; return x_2; } case 3: @@ -3318,8 +3310,6 @@ l_Lean_Format_join___closed__1 = _init_l_Lean_Format_join___closed__1(); lean_mark_persistent(l_Lean_Format_join___closed__1); l_Lean_Format_flatten___main___closed__1 = _init_l_Lean_Format_flatten___main___closed__1(); lean_mark_persistent(l_Lean_Format_flatten___main___closed__1); -l_Lean_Format_flatten___main___closed__2 = _init_l_Lean_Format_flatten___main___closed__2(); -lean_mark_persistent(l_Lean_Format_flatten___main___closed__2); l_Lean_Format_spaceUptoLine___main___closed__1 = _init_l_Lean_Format_spaceUptoLine___main___closed__1(); lean_mark_persistent(l_Lean_Format_spaceUptoLine___main___closed__1); l_Lean_Format_spaceUptoLine___main___closed__2 = _init_l_Lean_Format_spaceUptoLine___main___closed__2(); diff --git a/src/stage0/init/lean/localcontext.c b/src/stage0/init/lean/localcontext.c index 87ac2d4c13..b075940cb1 100644 --- a/src/stage0/init/lean/localcontext.c +++ b/src/stage0/init/lean/localcontext.c @@ -58,6 +58,7 @@ lean_object* lean_local_ctx_mk_let_decl(lean_object*, lean_object*, lean_object* lean_object* l_Lean_LocalDecl_binderInfo___boxed(lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_foldlFrom___spec__7___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_mfoldlFrom___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_exprIsInhabited; lean_object* l_PersistentArray_getAux___main___at___private_init_lean_localcontext_1__popTailNoneAux___main___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_mfindAux___main___at_Lean_LocalContext_mfindDecl___spec__2(lean_object*); lean_object* l_PersistentArray_mfindRev___at_Lean_LocalContext_findFromUserName___spec__1___boxed(lean_object*, lean_object*); @@ -72,6 +73,7 @@ lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_mfindDecl___spec__4_ lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_findDecl___spec__4(lean_object*); lean_object* l_Lean_LocalDecl_name___boxed(lean_object*); lean_object* l_Lean_LocalContext_mfor___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_mk_pi(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Array_mfindRevAux___main___at_Lean_LocalContext_mfindDeclRev___spec__5(lean_object*); lean_object* l_Array_mfindRevAux___main___at_Lean_LocalContext_mfindDeclRev___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_Inhabited___closed__1; @@ -82,6 +84,7 @@ lean_object* l_Lean_LocalDecl_valueOpt___boxed(lean_object*); lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_mfindDecl___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfindRevAux___main___at_Lean_LocalContext_mfindDeclRev___spec__2___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mforAux___main___at_Lean_LocalContext_mfor___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_mk_let(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mforAux___main___at_Lean_LocalContext_mfor___spec__3(lean_object*); size_t l_USize_sub(size_t, size_t); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_mfoldl___spec__4(lean_object*); @@ -98,6 +101,7 @@ lean_object* l_Lean_LocalContext_findDeclRev(lean_object*); lean_object* l_PersistentArray_mfindRev___at_Lean_LocalContext_findDeclRev___spec__2___rarg___boxed(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_mfoldlFrom___spec__3___boxed(lean_object*); lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_findDecl___spec__5___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_LocalContext_mkBinding(uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_mfor___boxed(lean_object*); lean_object* l_PersistentArray_mfindAux___main___at_Lean_LocalContext_findDecl___spec__3___rarg(lean_object*, lean_object*); lean_object* l_Array_mfindRevAux___main___at_Lean_LocalContext_mfindDeclRev___spec__5___boxed(lean_object*); @@ -119,6 +123,7 @@ lean_object* l___private_init_lean_localcontext_1__popTailNoneAux___main(lean_ob lean_object* l_PersistentArray_mfind___at_Lean_LocalContext_mfindDecl___spec__1___boxed(lean_object*); lean_object* l_Lean_LocalContext_mkLocalDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_mfor___at_Lean_LocalContext_mfor___spec__1___boxed(lean_object*); +lean_object* l_Lean_LocalContext_mkLambda(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfindRevAux___main___at_Lean_LocalContext_findFromUserName___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_mfoldlFrom___spec__3(lean_object*); lean_object* l_PersistentArray_pop___rarg(lean_object*); @@ -179,6 +184,7 @@ uint8_t l_Lean_LocalDecl_binderInfo(lean_object*); lean_object* l_Array_mforAux___main___at_Lean_LocalContext_mfor___spec__4(lean_object*); lean_object* l_PersistentArray_mfoldlFrom___at_Lean_LocalContext_mfoldlFrom___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Lean_LocalContext_mkBinding___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfindRevAux___main___at_Lean_LocalContext_mfindDeclRev___spec__2(lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_LocalContext_find___spec__2(lean_object*, size_t, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); @@ -228,7 +234,9 @@ lean_object* l_Lean_LocalContext_mfoldl___at_Lean_LocalContext_foldl___spec__1__ lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_mfoldlFrom___spec__2___boxed(lean_object*); lean_object* l_PersistentArray_mfor___at_Lean_LocalContext_mfor___spec__1(lean_object*); lean_object* l_PersistentArray_mfoldlFrom___at_Lean_LocalContext_mfoldlFrom___spec__1___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkBinding___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mforAux___main___at_Lean_LocalContext_mfor___spec__4___boxed(lean_object*); +lean_object* lean_expr_abstract_range(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_mfoldl___boxed(lean_object*); lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_mfindDecl___spec__4___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mforAux___main___at_Lean_LocalContext_mfor___spec__5___boxed(lean_object*); @@ -275,6 +283,7 @@ lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_mfindDecl___spec__3_ lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_mfoldl___spec__4___boxed(lean_object*); lean_object* l_Lean_LocalContext_isSubPrefixOfAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_mfindRev___at_Lean_LocalContext_mfindDeclRev___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkForall___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_local_ctx_erase(lean_object*, lean_object*); lean_object* l_Lean_LocalContext_foldl___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_foldl___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -291,6 +300,7 @@ lean_object* l_Array_mforAux___main___at_Lean_LocalContext_mfor___spec__3___boxe lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_mfindDecl___spec__3___boxed(lean_object*); lean_object* l_PersistentArray_mfindRev___at_Lean_LocalContext_mfindDeclRev___spec__1___boxed(lean_object*); lean_object* l_Lean_LocalContext_isEmpty___boxed(lean_object*); +lean_object* lean_expr_mk_lambda(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_mfoldlFrom___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_index(lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_foldl___spec__5(lean_object*); @@ -311,6 +321,7 @@ lean_object* l_Array_set(lean_object*, lean_object*, lean_object*, lean_object*) lean_object* l_Array_mforAux___main___at_Lean_LocalContext_mfor___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfindRevAux___main___at_Lean_LocalContext_findDeclRev___spec__5(lean_object*); lean_object* l_Lean_LocalDecl_userName___boxed(lean_object*); +lean_object* lean_expr_abstract(lean_object*, lean_object*); lean_object* l_Lean_LocalContext_getUnusedNameAux(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_foldl___spec__6___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_foldlFrom___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -323,6 +334,7 @@ lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_mfoldl___spec__5_ lean_object* l_PersistentArray_mfindRevAux___main___at_Lean_LocalContext_mfindDeclRev___spec__3(lean_object*); lean_object* lean_usize_to_nat(size_t); lean_object* l_PersistentHashMap_findAux___main___at_Lean_LocalContext_find___spec__2___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkBinding___spec__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_mfoldlAux___main___at_Lean_LocalContext_foldlFrom___spec__4___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_LocalContext_mkLocalDecl___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_findDecl___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*); @@ -333,6 +345,8 @@ lean_object* l_Array_mfindRevAux___main___at_Lean_LocalContext_findFromUserName_ lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_foldlFrom___spec__8(lean_object*); lean_object* l_Lean_LocalContext_mfindDeclRev(lean_object*); lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_mfindDecl___spec__5(lean_object*); +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkLambda___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_LocalContext_mkForall(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_exprIsInhabited___closed__1; lean_object* l_PersistentHashMap_find___at_Lean_LocalContext_find___spec__1___boxed(lean_object*, lean_object*); lean_object* l_PersistentArray_mfindRevAux___main___at_Lean_LocalContext_findFromUserName___spec__3(lean_object*, lean_object*); @@ -6565,6 +6579,299 @@ x_4 = lean_box(x_3); return x_4; } } +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkBinding___spec__1(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; uint8_t x_7; +x_6 = lean_unsigned_to_nat(0u); +x_7 = lean_nat_dec_eq(x_4, x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_unsigned_to_nat(1u); +x_9 = lean_nat_sub(x_4, x_8); +lean_dec(x_4); +x_10 = l_Lean_exprIsInhabited; +x_11 = lean_array_get(x_10, x_3, x_9); +lean_inc(x_2); +x_12 = l_Lean_LocalContext_findFVar(x_2, x_11); +if (lean_obj_tag(x_12) == 0) +{ +x_4 = x_9; +goto _start; +} +else +{ +lean_object* x_14; +x_14 = lean_ctor_get(x_12, 0); +lean_inc(x_14); +lean_dec(x_12); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; +x_15 = lean_ctor_get(x_14, 2); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 3); +lean_inc(x_16); +x_17 = lean_ctor_get_uint8(x_14, sizeof(void*)*4); +lean_dec(x_14); +lean_inc(x_3); +lean_inc(x_9); +x_18 = lean_expr_abstract_range(x_16, x_9, x_3); +if (x_1 == 0) +{ +lean_object* x_19; +x_19 = lean_expr_mk_pi(x_15, x_17, x_18, x_5); +x_4 = x_9; +x_5 = x_19; +goto _start; +} +else +{ +lean_object* x_21; +x_21 = lean_expr_mk_lambda(x_15, x_17, x_18, x_5); +x_4 = x_9; +x_5 = x_21; +goto _start; +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_23 = lean_ctor_get(x_14, 2); +lean_inc(x_23); +x_24 = lean_ctor_get(x_14, 3); +lean_inc(x_24); +x_25 = lean_ctor_get(x_14, 4); +lean_inc(x_25); +lean_dec(x_14); +lean_inc(x_3); +lean_inc(x_9); +x_26 = lean_expr_abstract_range(x_24, x_9, x_3); +lean_inc(x_3); +lean_inc(x_9); +x_27 = lean_expr_abstract_range(x_25, x_9, x_3); +x_28 = lean_expr_mk_let(x_23, x_26, x_27, x_5); +x_4 = x_9; +x_5 = x_28; +goto _start; +} +} +} +else +{ +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_5; +} +} +} +lean_object* l_Lean_LocalContext_mkBinding(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +lean_inc(x_3); +x_5 = lean_expr_abstract(x_4, x_3); +x_6 = lean_array_get_size(x_3); +x_7 = l_Nat_foldRevAux___main___at_Lean_LocalContext_mkBinding___spec__1(x_1, x_2, x_3, x_6, x_5); +return x_7; +} +} +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkBinding___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +uint8_t x_6; lean_object* x_7; +x_6 = lean_unbox(x_1); +lean_dec(x_1); +x_7 = l_Nat_foldRevAux___main___at_Lean_LocalContext_mkBinding___spec__1(x_6, x_2, x_3, x_4, x_5); +return x_7; +} +} +lean_object* l_Lean_LocalContext_mkBinding___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_6; +x_5 = lean_unbox(x_1); +lean_dec(x_1); +x_6 = l_Lean_LocalContext_mkBinding(x_5, x_2, x_3, x_4); +return x_6; +} +} +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkLambda___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_unsigned_to_nat(0u); +x_6 = lean_nat_dec_eq(x_3, x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = lean_unsigned_to_nat(1u); +x_8 = lean_nat_sub(x_3, x_7); +lean_dec(x_3); +x_9 = l_Lean_exprIsInhabited; +x_10 = lean_array_get(x_9, x_2, x_8); +lean_inc(x_1); +x_11 = l_Lean_LocalContext_findFVar(x_1, x_10); +if (lean_obj_tag(x_11) == 0) +{ +x_3 = x_8; +goto _start; +} +else +{ +lean_object* x_13; +x_13 = lean_ctor_get(x_11, 0); +lean_inc(x_13); +lean_dec(x_11); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; +x_14 = lean_ctor_get(x_13, 2); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 3); +lean_inc(x_15); +x_16 = lean_ctor_get_uint8(x_13, sizeof(void*)*4); +lean_dec(x_13); +lean_inc(x_2); +lean_inc(x_8); +x_17 = lean_expr_abstract_range(x_15, x_8, x_2); +x_18 = lean_expr_mk_lambda(x_14, x_16, x_17, x_4); +x_3 = x_8; +x_4 = x_18; +goto _start; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_20 = lean_ctor_get(x_13, 2); +lean_inc(x_20); +x_21 = lean_ctor_get(x_13, 3); +lean_inc(x_21); +x_22 = lean_ctor_get(x_13, 4); +lean_inc(x_22); +lean_dec(x_13); +lean_inc(x_2); +lean_inc(x_8); +x_23 = lean_expr_abstract_range(x_21, x_8, x_2); +lean_inc(x_2); +lean_inc(x_8); +x_24 = lean_expr_abstract_range(x_22, x_8, x_2); +x_25 = lean_expr_mk_let(x_20, x_23, x_24, x_4); +x_3 = x_8; +x_4 = x_25; +goto _start; +} +} +} +else +{ +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} +} +lean_object* l_Lean_LocalContext_mkLambda(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +lean_inc(x_2); +x_4 = lean_expr_abstract(x_3, x_2); +x_5 = lean_array_get_size(x_2); +x_6 = l_Nat_foldRevAux___main___at_Lean_LocalContext_mkLambda___spec__1(x_1, x_2, x_5, x_4); +return x_6; +} +} +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkForall___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_unsigned_to_nat(0u); +x_6 = lean_nat_dec_eq(x_3, x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = lean_unsigned_to_nat(1u); +x_8 = lean_nat_sub(x_3, x_7); +lean_dec(x_3); +x_9 = l_Lean_exprIsInhabited; +x_10 = lean_array_get(x_9, x_2, x_8); +lean_inc(x_1); +x_11 = l_Lean_LocalContext_findFVar(x_1, x_10); +if (lean_obj_tag(x_11) == 0) +{ +x_3 = x_8; +goto _start; +} +else +{ +lean_object* x_13; +x_13 = lean_ctor_get(x_11, 0); +lean_inc(x_13); +lean_dec(x_11); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; +x_14 = lean_ctor_get(x_13, 2); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 3); +lean_inc(x_15); +x_16 = lean_ctor_get_uint8(x_13, sizeof(void*)*4); +lean_dec(x_13); +lean_inc(x_2); +lean_inc(x_8); +x_17 = lean_expr_abstract_range(x_15, x_8, x_2); +x_18 = lean_expr_mk_pi(x_14, x_16, x_17, x_4); +x_3 = x_8; +x_4 = x_18; +goto _start; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_20 = lean_ctor_get(x_13, 2); +lean_inc(x_20); +x_21 = lean_ctor_get(x_13, 3); +lean_inc(x_21); +x_22 = lean_ctor_get(x_13, 4); +lean_inc(x_22); +lean_dec(x_13); +lean_inc(x_2); +lean_inc(x_8); +x_23 = lean_expr_abstract_range(x_21, x_8, x_2); +lean_inc(x_2); +lean_inc(x_8); +x_24 = lean_expr_abstract_range(x_22, x_8, x_2); +x_25 = lean_expr_mk_let(x_20, x_23, x_24, x_4); +x_3 = x_8; +x_4 = x_25; +goto _start; +} +} +} +else +{ +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} +} +lean_object* l_Lean_LocalContext_mkForall(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +lean_inc(x_2); +x_4 = lean_expr_abstract(x_3, x_2); +x_5 = lean_array_get_size(x_2); +x_6 = l_Nat_foldRevAux___main___at_Lean_LocalContext_mkForall___spec__1(x_1, x_2, x_5, x_4); +return x_6; +} +} lean_object* initialize_init_data_persistentarray_basic(lean_object*); lean_object* initialize_init_data_persistenthashmap_basic(lean_object*); lean_object* initialize_init_lean_expr(lean_object*); diff --git a/src/stage0/init/lean/message.c b/src/stage0/init/lean/message.c index 8007c19486..45fa424e04 100644 --- a/src/stage0/init/lean/message.c +++ b/src/stage0/init/lean/message.c @@ -33,8 +33,8 @@ uint8_t l_Lean_MessageLog_isEmpty(lean_object*); lean_object* l_Lean_Message_toString___closed__4; lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_List_append___rarg(lean_object*, lean_object*); +extern lean_object* l_String_Iterator_HasRepr___closed__2; uint8_t l_List_isEmpty___rarg(lean_object*); -extern lean_object* l_Lean_Format_flatten___main___closed__1; lean_object* l_Lean_Message_HasToString___closed__1; uint8_t lean_string_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_mkErrorStringWithPos___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -70,7 +70,7 @@ x_9 = lean_string_append(x_8, x_5); x_10 = l_Nat_repr(x_3); x_11 = lean_string_append(x_9, x_10); lean_dec(x_10); -x_12 = l_Lean_Format_flatten___main___closed__1; +x_12 = l_String_Iterator_HasRepr___closed__2; x_13 = lean_string_append(x_11, x_12); x_14 = lean_string_append(x_13, x_4); return x_14; diff --git a/src/stage0/init/lean/parser/term.c b/src/stage0/init/lean/parser/term.c index c588f6bd0f..f06d0a181f 100644 --- a/src/stage0/init/lean/parser/term.c +++ b/src/stage0/init/lean/parser/term.c @@ -66,6 +66,7 @@ lean_object* l_Lean_Parser_Term_optType___closed__3; lean_object* l_Lean_Parser_Term_match___closed__1; lean_object* l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__10; lean_object* l_Lean_Parser_Term_structInstSource___elambda__1___rarg___closed__2; +lean_object* l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg___closed__1; lean_object* l_Lean_Parser_Term_parser_x21___closed__4; lean_object* l___regBuiltinParser_Lean_Parser_Term_borrowed(lean_object*); lean_object* l_Lean_Parser_Term_doPat___elambda__1___rarg___closed__1; @@ -206,6 +207,7 @@ lean_object* l_Lean_Parser_Term_orelse___elambda__1___closed__3; lean_object* l_Lean_Parser_Term_list___closed__4; lean_object* l_Lean_Parser_Term_mod___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_list___elambda__1___closed__10; +lean_object* l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_anonymousCtor___closed__4; lean_object* l_Lean_Parser_Term_quotedName___elambda__1___rarg___closed__1; lean_object* l_Lean_Parser_Term_show___closed__4; @@ -545,6 +547,7 @@ lean_object* l_Lean_Parser_Term_do___elambda__1___closed__7; lean_object* l_Lean_Parser_Term_type___elambda__1___rarg___closed__1; lean_object* l_Lean_Parser_Term_match___elambda__1___closed__6; extern lean_object* l_Lean_Parser_Level_paren___closed__4; +lean_object* l_Array_mkEmpty(lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_add___closed__1; lean_object* l_Lean_Parser_Term_arrow___closed__2; lean_object* l_Lean_Parser_Term_letIdLhs___closed__3; @@ -569,6 +572,7 @@ lean_object* l_Lean_Parser_Term_type___closed__2; lean_object* l_Lean_Parser_Term_doPat___closed__3; lean_object* l_Lean_Parser_Term_modN___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_manyAux___main___at_Lean_Parser_Term_letEqns___elambda__1___spec__1___closed__1; +lean_object* l_Lean_Parser_mkAppStx(lean_object*); lean_object* l_Lean_Parser_Term_le___closed__3; lean_object* l_Lean_Parser_Term_if___elambda__1___rarg___closed__2; lean_object* l_Lean_Parser_Term_mul___elambda__1___closed__3; @@ -738,6 +742,7 @@ lean_object* l_Lean_Parser_Term_let___closed__5; lean_object* l_Lean_Parser_Term_doExpr___elambda__1___rarg___closed__2; lean_object* l_Lean_Parser_Term_depArrow___elambda__1___closed__9; lean_object* l_Lean_Parser_Term_sub___elambda__1___closed__2; +lean_object* l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1(lean_object*); lean_object* l_Lean_Parser_Term_explicitUniv___elambda__1___closed__4; lean_object* l_Lean_Parser_Term_anonymousCtor___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinParser_Lean_Parser_Term_array(lean_object*); @@ -926,6 +931,7 @@ lean_object* l_Lean_Parser_Term_bracketedDoSeq___elambda__1___closed__2; lean_object* l_Lean_Parser_Term_structInst___elambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_cons___closed__3; lean_object* l_Lean_Parser_Term_leftArrow___elambda__1___rarg___closed__5; +lean_object* l_Array_push(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_seqRight___closed__1; lean_object* l_Lean_Parser_Term_prop___elambda__1___rarg___closed__7; lean_object* l_Lean_Parser_Term_heq___elambda__1___closed__2; @@ -1314,6 +1320,7 @@ lean_object* l_Lean_Parser_Term_inaccessible; lean_object* l_Lean_Parser_Term_if___elambda__1___rarg___closed__10; lean_object* l_Lean_Parser_Term_unicodeInfixR___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_leftArrow___elambda__1___rarg___closed__7; +lean_object* l_Lean_Parser_mkAppStx___rarg(lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_let___elambda__1___closed__1; lean_object* l_Lean_Parser_Term_fromTerm___elambda__1___rarg___closed__5; lean_object* l_Lean_Parser_Term_namedPattern___elambda__1___rarg___closed__8; @@ -28412,6 +28419,67 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* _init_l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(2u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +lean_object* l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +return x_1; +} +else +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_2, 1); +lean_inc(x_4); +lean_dec(x_2); +x_5 = l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg___closed__1; +x_6 = lean_array_push(x_5, x_1); +x_7 = lean_array_push(x_6, x_3); +x_8 = l_Lean_Parser_Term_app___elambda__1___closed__2; +x_9 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_7); +x_1 = x_9; +x_2 = x_4; +goto _start; +} +} +} +lean_object* l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Parser_mkAppStx___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Parser_mkAppStx(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Parser_mkAppStx___rarg), 2, 0); +return x_2; +} +} lean_object* initialize_init_lean_parser_parser(lean_object*); lean_object* initialize_init_lean_parser_level(lean_object*); static bool _G_initialized = false; @@ -31053,6 +31121,8 @@ l_Lean_Parser_Term_mapConstRev = _init_l_Lean_Parser_Term_mapConstRev(); lean_mark_persistent(l_Lean_Parser_Term_mapConstRev); w = l___regBuiltinParser_Lean_Parser_Term_mapConstRev(w); if (lean_io_result_is_error(w)) return w; +l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg___closed__1 = _init_l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg___closed__1(); +lean_mark_persistent(l_List_foldl___main___at_Lean_Parser_mkAppStx___spec__1___rarg___closed__1); return w; } #ifdef __cplusplus diff --git a/src/stage0/init/lean/syntax.c b/src/stage0/init/lean/syntax.c index 3f426f1c21..c8afc392a8 100644 --- a/src/stage0/init/lean/syntax.c +++ b/src/stage0/init/lean/syntax.c @@ -23,6 +23,7 @@ lean_object* l_Array_ummapAux___main___at_Lean_Syntax_mrewriteBottomUp___main___ lean_object* l_Lean_Syntax_toNat___rarg___boxed(lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_Syntax_reprint___main___spec__1(lean_object*); uint8_t lean_name_dec_eq(lean_object*, lean_object*); +lean_object* l_Lean_mkAtomFrom___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getHeadInfo___main___rarg___boxed(lean_object*); lean_object* l_Lean_Syntax_getNumArgs(lean_object*); lean_object* l_Lean_Syntax_setTailInfo___rarg(lean_object*, lean_object*); @@ -32,6 +33,7 @@ lean_object* l_Lean_Syntax_isNatLit(lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Syntax_ifNode(lean_object*, lean_object*); +lean_object* l_Lean_mkAtomFrom(lean_object*); lean_object* l_Lean_nullKind___closed__2; lean_object* l_Lean_stxInh(lean_object*); lean_object* l_Lean_Syntax_setArg(lean_object*); @@ -55,6 +57,7 @@ lean_object* l_Function_comp___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_reprint___main(lean_object*); lean_object* l_Lean_nullKind___closed__1; lean_object* l_Array_miterateAux___main___at_Lean_Syntax_reprint___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkIdentFrom___rarg(lean_object*, lean_object*); lean_object* l_Lean_Syntax_isNatLitAux___rarg(lean_object*, lean_object*); lean_object* l_Lean_Syntax_formatStx___main(lean_object*); lean_object* l_Lean_numLitKind; @@ -62,6 +65,7 @@ lean_object* l_Lean_Syntax_asNode___rarg(lean_object*); uint8_t l_Lean_Syntax_isIdent___rarg(lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_Syntax_reprint___main___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Format_joinSep___main___at_Lean_Syntax_formatStx___main___spec__2(lean_object*, lean_object*); +lean_object* l_List_toArrayAux___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Syntax_updateTrailing(lean_object*); lean_object* l___private_init_lean_syntax_3__updateLast___main___at_Lean_Syntax_setTailInfoAux___main___spec__1(lean_object*); lean_object* l_Lean_SyntaxNode_withArgs___rarg(lean_object*, lean_object*); @@ -69,12 +73,17 @@ lean_object* l_Lean_SyntaxNode_getArg(lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); lean_object* l___private_init_lean_syntax_2__updateLeadingAux___rarg(lean_object*, lean_object*); lean_object* l_Lean_Syntax_updateTrailing___main(lean_object*); +lean_object* l_Lean_mkNode___rarg(lean_object*, lean_object*); lean_object* l_Lean_Syntax_ifNode___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_init_lean_syntax_7__decodeHexLitAux___main(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Format_sbracket___closed__1; +lean_object* l_Lean_mkOptionalNode___rarg(lean_object*); +lean_object* l_List_redLength___main___rarg(lean_object*); +lean_object* l_Lean_mkOptionalNode(lean_object*); lean_object* l_Lean_SyntaxNode_getNumArgs___rarg(lean_object*); lean_object* l_Lean_Syntax_modifyArg___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_charLitKind___closed__2; +lean_object* l_Lean_mkIdentFrom(lean_object*); lean_object* l_Lean_Syntax_setTailInfo(lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*); lean_object* l_Array_ummapAux___main___at_Lean_Syntax_mrewriteBottomUp___main___spec__1___boxed(lean_object*, lean_object*); @@ -85,6 +94,7 @@ lean_object* l_Lean_Syntax_formatStx___main___rarg___closed__2; lean_object* l_Array_miterateAux___main___at_Lean_Syntax_reprint___main___spec__2(lean_object*); lean_object* l_Lean_Syntax_mrewriteBottomUp___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_mrewriteBottomUp(lean_object*, lean_object*); +lean_object* l_Array_mkEmpty(lean_object*, lean_object*); lean_object* l_Lean_mkNumLit(lean_object*, lean_object*); lean_object* l_Lean_SyntaxNode_withArgs(lean_object*, lean_object*); lean_object* l_Lean_Syntax_setTailInfoAux___rarg(lean_object*, lean_object*); @@ -105,6 +115,7 @@ lean_object* l_Lean_Syntax_setArg___rarg(lean_object*, lean_object*, lean_object lean_object* l_Array_mfindRevAux___main___at_Lean_Syntax_getTailInfo___main___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_init_lean_syntax_9__decodeNatLitVal___closed__1; lean_object* l_Lean_Syntax_getIdAt(lean_object*); +lean_object* l_Lean_mkAtomFrom___rarg(lean_object*, lean_object*); lean_object* l_Lean_Syntax_mreplace___main___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_updateTrailing___rarg(lean_object*, lean_object*); lean_object* l_Lean_Syntax_mreplace___boxed(lean_object*, lean_object*); @@ -114,6 +125,7 @@ lean_object* l_Lean_SyntaxNode_getKind(lean_object*); lean_object* l_Lean_Syntax_Lean_HasFormat___closed__1; lean_object* l_Lean_Syntax_updateTrailing___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Syntax_ifNodeKind(lean_object*, lean_object*); +lean_object* l_Lean_mkNode(lean_object*); lean_object* l_Lean_Syntax_setAtomVal(lean_object*); lean_object* l_List_map___main___at_Lean_Syntax_formatStx___main___spec__1(lean_object*); lean_object* l_Lean_Syntax_Lean_HasFormat(lean_object*); @@ -128,6 +140,7 @@ lean_object* l_Lean_SourceInfo_appendToLeading(lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_Lean_Syntax_mrewriteBottomUp___main___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SyntaxNode_getArg___rarg(lean_object*, lean_object*); +lean_object* l_Lean_mkAtom(lean_object*); uint8_t l_UInt32_decLe(uint32_t, uint32_t); uint8_t l_Lean_Syntax_isOfKind___rarg(lean_object*, lean_object*); lean_object* l___private_init_lean_syntax_2__updateLeadingAux(lean_object*); @@ -141,6 +154,7 @@ lean_object* l_Lean_Syntax_getHeadInfo___main(lean_object*); lean_object* l_Lean_SyntaxNode_getIdAt___rarg(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getNumArgs___rarg___boxed(lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* lean_mk_syntax_atom(lean_object*); lean_object* l_Lean_SourceInfo_truncateTrailing(lean_object*); lean_object* l_Lean_Syntax_isStrLit___rarg(lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_Syntax_reprint___main___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -217,12 +231,14 @@ lean_object* l___private_init_lean_syntax_8__decodeDecimalLitAux___main___boxed( uint8_t l_Char_isDigit(uint32_t); lean_object* l_Lean_Syntax_modifyArgs___rarg(lean_object*, lean_object*); lean_object* l___private_init_lean_syntax_3__updateLast___main___at_Lean_Syntax_setTailInfoAux___main___spec__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkNullNode(lean_object*); lean_object* l_Lean_Syntax_modifyArgs(lean_object*); lean_object* l_Array_ummapAux___main___at_Lean_Syntax_mrewriteBottomUp___main___spec__1___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_init_lean_syntax_3__updateLast___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getIdAt___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_Syntax_reprint___main___rarg___closed__1; lean_object* l_Lean_Syntax_getArgs___rarg___boxed(lean_object*); +lean_object* l_Lean_mkAtom___rarg(lean_object*); lean_object* l_Lean_Name_replacePrefix___main(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Format_sbracket___closed__3; lean_object* l_Lean_Syntax_rewriteBottomUp___rarg(lean_object*, lean_object*); @@ -233,6 +249,7 @@ extern lean_object* l_Lean_HasRepr___closed__1; lean_object* l___private_init_lean_syntax_3__updateLast___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_formatStx___main___rarg___closed__1; lean_object* lean_mk_syntax_list(lean_object*); +lean_object* l_Lean_mkNullNode___rarg(lean_object*); lean_object* l_Array_ummapAux___main___at_Lean_Syntax_rewriteBottomUp___spec__2___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_formatDataValue___closed__2; lean_object* lean_format_group(lean_object*); @@ -295,7 +312,6 @@ lean_object* l_Lean_SyntaxNode_getArgs___rarg(lean_object*); lean_object* l_Lean_Syntax_mreplace(lean_object*, lean_object*); lean_object* l_Lean_Syntax_rewriteBottomUp(lean_object*); lean_object* l_Lean_Syntax_isNatLitAux(lean_object*); -lean_object* lean_mk_syntax_atom(lean_object*); lean_object* l_Lean_Syntax_mreplace___main(lean_object*, lean_object*); lean_object* l_Lean_numLitKind___closed__1; lean_object* l_Lean_Syntax_ifNodeKind___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -303,6 +319,7 @@ lean_object* l_Lean_mkLit(lean_object*, lean_object*, lean_object*); lean_object* lean_nat_mul(lean_object*, lean_object*); lean_object* l___private_init_lean_syntax_5__decodeBinLitAux___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_mrewriteBottomUp___main___at_Lean_Syntax_rewriteBottomUp___spec__1(lean_object*); +lean_object* l_Lean_mkIdentFrom___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_Syntax_modifyArg___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getTailInfo___rarg___boxed(lean_object*); lean_object* l_Lean_Syntax_setArg___rarg___boxed(lean_object*, lean_object*, lean_object*); @@ -4674,6 +4691,103 @@ lean_ctor_set(x_3, 1, x_1); return x_3; } } +lean_object* l_Lean_mkAtom___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = lean_box(0); +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* l_Lean_mkAtom(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_mkAtom___rarg), 1, 0); +return x_2; +} +} +lean_object* l_Lean_mkNode___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_3 = l_List_redLength___main___rarg(x_2); +x_4 = lean_mk_empty_array_with_capacity(x_3); +lean_dec(x_3); +x_5 = l_List_toArrayAux___main___rarg(x_2, x_4); +x_6 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_6, 0, x_1); +lean_ctor_set(x_6, 1, x_5); +return x_6; +} +} +lean_object* l_Lean_mkNode(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_mkNode___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_mkNullNode___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_2 = l_List_redLength___main___rarg(x_1); +x_3 = lean_mk_empty_array_with_capacity(x_2); +lean_dec(x_2); +x_4 = l_List_toArrayAux___main___rarg(x_1, x_3); +x_5 = l_Lean_nullKind; +x_6 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_4); +return x_6; +} +} +lean_object* l_Lean_mkNullNode(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_mkNullNode___rarg), 1, 0); +return x_2; +} +} +lean_object* l_Lean_mkOptionalNode___rarg(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_2; +x_2 = l_Lean_Syntax_asNode___rarg___closed__1; +return x_2; +} +else +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_dec(x_1); +x_4 = lean_unsigned_to_nat(1u); +x_5 = lean_mk_array(x_4, x_3); +x_6 = l_Lean_nullKind; +x_7 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_5); +return x_7; +} +} +} +lean_object* l_Lean_mkOptionalNode(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_mkOptionalNode___rarg), 1, 0); +return x_2; +} +} lean_object* l_Lean_mkLit(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -5705,6 +5819,74 @@ lean_dec(x_1); return x_2; } } +lean_object* l_Lean_mkIdentFrom___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_3 = l_Lean_Syntax_getHeadInfo___main___rarg(x_1); +x_4 = l_System_FilePath_dirName___closed__1; +lean_inc(x_2); +x_5 = l_Lean_Name_toStringWithSep___main(x_4, x_2); +x_6 = lean_string_utf8_byte_size(x_5); +x_7 = lean_unsigned_to_nat(0u); +x_8 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_8, 0, x_5); +lean_ctor_set(x_8, 1, x_7); +lean_ctor_set(x_8, 2, x_6); +x_9 = lean_box(0); +x_10 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_10, 0, x_3); +lean_ctor_set(x_10, 1, x_8); +lean_ctor_set(x_10, 2, x_2); +lean_ctor_set(x_10, 3, x_9); +return x_10; +} +} +lean_object* l_Lean_mkIdentFrom(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_mkIdentFrom___rarg___boxed), 2, 0); +return x_2; +} +} +lean_object* l_Lean_mkIdentFrom___rarg___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_mkIdentFrom___rarg(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* l_Lean_mkAtomFrom___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; +x_3 = l_Lean_Syntax_getHeadInfo___main___rarg(x_1); +x_4 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_4, 0, x_3); +lean_ctor_set(x_4, 1, x_2); +return x_4; +} +} +lean_object* l_Lean_mkAtomFrom(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_mkAtomFrom___rarg___boxed), 2, 0); +return x_2; +} +} +lean_object* l_Lean_mkAtomFrom___rarg___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_mkAtomFrom___rarg(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} lean_object* initialize_init_lean_name(lean_object*); lean_object* initialize_init_lean_format(lean_object*); lean_object* initialize_init_data_array_default(lean_object*);