// Lean compiler output
// Module: Lean.Meta.Tactic.Grind.Arith.CommRing.Reify
// Imports: public import Lean.Meta.Tactic.Grind.Arith.CommRing.NonCommRingM public import Lean.Meta.Tactic.Grind.Arith.CommRing.NonCommSemiringM
#include <lean/lean.h>
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wunused-label"
#elif defined(__GNUC__) && !defined(__CLANG__)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#ifdef __cplusplus
extern "C" {
#endif
lean_object* l_Lean_Meta_Grind_Arith_CommRing_RingM_getCommRing(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_mkStr1(lean_object*);
lean_object* l_Lean_mkConst(lean_object*, lean_object*);
lean_object* l_Lean_Name_mkStr4(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_mkAppB(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_mkStr2(lean_object*, lean_object*);
lean_object* l_Lean_mkApp3(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_synthInstanceMeta_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_stringToMessageData(lean_object*);
lean_object* l_Lean_indentExpr(lean_object*);
lean_object* lean_st_ref_get(lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_checkInst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_mkApp4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_grind_canon(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Sym_shareCommon___redArg(lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_RingM_modifyCommRing___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Expr_appArg_x21(lean_object*);
uint8_t l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(lean_object*, lean_object*);
lean_object* lean_array_get_size(lean_object*);
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
lean_object* lean_array_fget_borrowed(lean_object*, lean_object*);
lean_object* lean_nat_add(lean_object*, lean_object*);
lean_object* l_Lean_Meta_getNatValue_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Level_ofNat(lean_object*);
extern lean_object* l_Lean_Nat_mkType;
lean_object* l_Lean_Meta_Grind_alreadyInternalized___redArg(lean_object*, lean_object*);
lean_object* lean_grind_internalize(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_SemiringM_getCommSemiring(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint64_t l_Lean_Meta_Sym_hashPtrExpr_unsafe__1(lean_object*);
size_t lean_uint64_to_usize(uint64_t);
size_t lean_usize_shift_left(size_t, size_t);
size_t lean_usize_sub(size_t, size_t);
size_t lean_usize_land(size_t, size_t);
lean_object* lean_usize_to_nat(size_t);
lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
size_t lean_usize_shift_right(size_t, size_t);
lean_object* lean_array_fget(lean_object*, lean_object*);
lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_PersistentArray_push___redArg(lean_object*, lean_object*);
lean_object* l_Lean_PersistentHashMap_mkCollisionNode___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
size_t lean_usize_add(size_t, size_t);
lean_object* lean_array_push(lean_object*, lean_object*);
lean_object* l_Lean_PersistentHashMap_mkEmptyEntries(lean_object*, lean_object*);
size_t lean_usize_mul(size_t, size_t);
uint8_t lean_usize_dec_le(size_t, size_t);
lean_object* l_Lean_PersistentHashMap_getCollisionNodeSize___redArg(lean_object*);
extern lean_object* l_Lean_Meta_Grind_Arith_CommRing_ringExt;
lean_object* l___private_Lean_Meta_Tactic_Grind_Types_0__Lean_Meta_Grind_SolverExtension_modifyStateImpl___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_setTermSemiringId(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_SolverExtension_markTerm___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_internalize___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_alreadyInternalized___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_instantiateMVarsIfMVarApp___redArg(lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_setTermRingId(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_getConfig___redArg(lean_object*);
lean_object* l_Lean_Meta_Grind_reportIssue(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Expr_cleanupAnnotations(lean_object*);
uint8_t l_Lean_Expr_isApp(lean_object*);
lean_object* l_Lean_Expr_appFnCleanup___redArg(lean_object*);
uint8_t l_Lean_Expr_isConstOf(lean_object*, lean_object*);
lean_object* l_Lean_Meta_getNatValue_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_nat_to_int(lean_object*);
lean_object* l_Lean_Expr_app___override(lean_object*, lean_object*);
lean_object* l_Lean_Meta_getIntValue_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_getSemiring(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_modifySemiring___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_setTermNonCommSemiringId(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_instantiateMVarsIfMVarApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_getRing(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_modifyRing___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_setTermNonCommRingId(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_getIntValue_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 35, .m_capacity = 35, .m_length = 34, .m_data = "ring term with unexpected instance"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___closed__0 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___closed__0_value;
static lean_once_cell_t l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___closed__1;
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__1(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__2(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__3(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__4(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__7(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__14(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__12(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__10(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 6, .m_capacity = 6, .m_length = 5, .m_data = "ofNat"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__1 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__1_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 7, .m_capacity = 7, .m_length = 6, .m_data = "BitVec"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__0 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__0_value;
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__2_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__0_value),LEAN_SCALAR_PTR_LITERAL(108, 178, 58, 132, 143, 189, 222, 74)}};
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__2_value_aux_0),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__1_value),LEAN_SCALAR_PTR_LITERAL(101, 105, 192, 171, 214, 131, 43, 105)}};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__2 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__2_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 6, .m_capacity = 6, .m_length = 5, .m_data = "OfNat"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__3 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__3_value;
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__3_value),LEAN_SCALAR_PTR_LITERAL(135, 241, 166, 108, 243, 216, 193, 244)}};
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4_value_aux_0),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__1_value),LEAN_SCALAR_PTR_LITERAL(2, 108, 58, 34, 100, 49, 50, 216)}};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 8, .m_capacity = 8, .m_length = 7, .m_data = "natCast"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__6 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__6_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__5_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 8, .m_capacity = 8, .m_length = 7, .m_data = "NatCast"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__5 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__5_value;
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__5_value),LEAN_SCALAR_PTR_LITERAL(65, 128, 63, 191, 243, 154, 52, 80)}};
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7_value_aux_0),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__6_value),LEAN_SCALAR_PTR_LITERAL(47, 224, 192, 179, 253, 143, 7, 98)}};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__9_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 8, .m_capacity = 8, .m_length = 7, .m_data = "intCast"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__9 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__9_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__8_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 8, .m_capacity = 8, .m_length = 7, .m_data = "IntCast"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__8 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__8_value;
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__8_value),LEAN_SCALAR_PTR_LITERAL(63, 186, 193, 83, 149, 255, 18, 69)}};
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10_value_aux_0),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__9_value),LEAN_SCALAR_PTR_LITERAL(190, 203, 124, 26, 63, 107, 241, 61)}};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__12_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 4, .m_capacity = 4, .m_length = 3, .m_data = "neg"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__12 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__12_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__11_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 4, .m_capacity = 4, .m_length = 3, .m_data = "Neg"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__11 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__11_value;
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__11_value),LEAN_SCALAR_PTR_LITERAL(94, 4, 109, 108, 64, 81, 153, 133)}};
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13_value_aux_0),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__12_value),LEAN_SCALAR_PTR_LITERAL(105, 26, 70, 221, 245, 238, 127, 238)}};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__15_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "hPow"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__15 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__15_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__14_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "HPow"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__14 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__14_value;
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__14_value),LEAN_SCALAR_PTR_LITERAL(155, 188, 136, 200, 106, 253, 76, 178)}};
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16_value_aux_0),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__15_value),LEAN_SCALAR_PTR_LITERAL(32, 63, 208, 57, 56, 184, 164, 144)}};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__18_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "hSub"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__18 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__18_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__17_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "HSub"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__17 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__17_value;
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__17_value),LEAN_SCALAR_PTR_LITERAL(121, 130, 45, 212, 110, 237, 236, 233)}};
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19_value_aux_0),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__18_value),LEAN_SCALAR_PTR_LITERAL(231, 253, 204, 163, 168, 77, 27, 58)}};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__21_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "hMul"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__21 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__21_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__20_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "HMul"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__20 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__20_value;
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__20_value),LEAN_SCALAR_PTR_LITERAL(254, 113, 255, 140, 142, 9, 169, 40)}};
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22_value_aux_0),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__21_value),LEAN_SCALAR_PTR_LITERAL(248, 227, 200, 215, 229, 255, 92, 22)}};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__24_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "hAdd"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__24 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__24_value;
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__23_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "HAdd"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__23 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__23_value;
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__23_value),LEAN_SCALAR_PTR_LITERAL(221, 239, 47, 196, 170, 166, 59, 144)}};
static const lean_ctor_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25_value_aux_0),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__24_value),LEAN_SCALAR_PTR_LITERAL(134, 172, 115, 219, 189, 252, 56, 148)}};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25_value;
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__3(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__4(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__5(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__9(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__8(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__10(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__11(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__12(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__13(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__14(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__15(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__16(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__17(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__17___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__18(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__19(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__21(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__20(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__23(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__24(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__25(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__25___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__22(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__22___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__26(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__26___boxed(lean_object**);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addMessageContextFull___at___00Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28_spec__31(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addMessageContextFull___at___00Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28_spec__31___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 32, .m_capacity = 32, .m_length = 31, .m_data = "`grind` failed to find instance"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__0 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__0_value;
static lean_once_cell_t l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1;
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8___boxed(lean_object**);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___lam__0(lean_object*, lean_object*);
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 9, .m_capacity = 9, .m_length = 8, .m_data = "instHMul"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__0 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__0_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__0_value),LEAN_SCALAR_PTR_LITERAL(177, 107, 107, 59, 202, 230, 169, 251)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__1 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__1_value;
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "Lean"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__2 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__2_value;
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 6, .m_capacity = 6, .m_length = 5, .m_data = "Grind"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__3 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__3_value;
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 9, .m_capacity = 9, .m_length = 8, .m_data = "Semiring"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__4 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__4_value;
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__5_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 6, .m_capacity = 6, .m_length = 5, .m_data = "toMul"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__5 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__5_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__2_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6_value_aux_0),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__3_value),LEAN_SCALAR_PTR_LITERAL(116, 4, 170, 185, 29, 24, 60, 188)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6_value_aux_1),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__4_value),LEAN_SCALAR_PTR_LITERAL(246, 150, 10, 46, 185, 54, 59, 167)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6_value_aux_2),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__5_value),LEAN_SCALAR_PTR_LITERAL(232, 23, 103, 115, 5, 120, 143, 98)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__7_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__20_value),LEAN_SCALAR_PTR_LITERAL(254, 113, 255, 140, 142, 9, 169, 40)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__7 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__7_value;
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__14_value),LEAN_SCALAR_PTR_LITERAL(155, 188, 136, 200, 106, 253, 76, 178)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__0 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__0_value;
static lean_once_cell_t l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1;
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "npow"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__2 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__2_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__2_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3_value_aux_0),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__3_value),LEAN_SCALAR_PTR_LITERAL(116, 4, 170, 185, 29, 24, 60, 188)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3_value_aux_1),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__4_value),LEAN_SCALAR_PTR_LITERAL(246, 150, 10, 46, 185, 54, 59, 167)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3_value_aux_2),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__2_value),LEAN_SCALAR_PTR_LITERAL(227, 91, 39, 101, 227, 157, 49, 255)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3_value;
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___lam__0(lean_object*, lean_object*);
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 9, .m_capacity = 9, .m_length = 8, .m_data = "instHAdd"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__0 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__0_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__0_value),LEAN_SCALAR_PTR_LITERAL(229, 81, 239, 34, 203, 244, 36, 133)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__1 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__1_value;
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 6, .m_capacity = 6, .m_length = 5, .m_data = "toAdd"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__2 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__2_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__2_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3_value_aux_0),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__3_value),LEAN_SCALAR_PTR_LITERAL(116, 4, 170, 185, 29, 24, 60, 188)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3_value_aux_1),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__4_value),LEAN_SCALAR_PTR_LITERAL(246, 150, 10, 46, 185, 54, 59, 167)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3_value_aux_2),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__2_value),LEAN_SCALAR_PTR_LITERAL(7, 205, 186, 60, 7, 38, 135, 75)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__23_value),LEAN_SCALAR_PTR_LITERAL(221, 239, 47, 196, 170, 166, 59, 144)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__4 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__4_value;
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___lam__0(lean_object*, lean_object*);
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "Ring"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__0 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__0_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__2_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1_value_aux_0),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__3_value),LEAN_SCALAR_PTR_LITERAL(116, 4, 170, 185, 29, 24, 60, 188)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1_value_aux_1),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__0_value),LEAN_SCALAR_PTR_LITERAL(196, 225, 111, 69, 82, 38, 249, 149)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1_value_aux_2),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__9_value),LEAN_SCALAR_PTR_LITERAL(1, 189, 244, 99, 68, 50, 19, 202)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__8_value),LEAN_SCALAR_PTR_LITERAL(63, 186, 193, 83, 149, 255, 18, 69)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__2 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__2_value;
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 4, .m_capacity = 4, .m_length = 3, .m_data = "Int"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__3 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__3_value;
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "cast"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__4 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__4_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__5_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__3_value),LEAN_SCALAR_PTR_LITERAL(61, 25, 98, 154, 117, 127, 69, 97)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__5_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__5_value_aux_0),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__4_value),LEAN_SCALAR_PTR_LITERAL(181, 4, 252, 84, 28, 16, 24, 6)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__5 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__5_value;
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__2_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0_value_aux_0),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__3_value),LEAN_SCALAR_PTR_LITERAL(116, 4, 170, 185, 29, 24, 60, 188)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0_value_aux_1),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__4_value),LEAN_SCALAR_PTR_LITERAL(246, 150, 10, 46, 185, 54, 59, 167)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0_value_aux_2),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__6_value),LEAN_SCALAR_PTR_LITERAL(84, 97, 73, 37, 143, 22, 233, 204)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__5_value),LEAN_SCALAR_PTR_LITERAL(65, 128, 63, 191, 243, 154, 52, 80)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__1 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__1_value;
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___lam__0(lean_object*, lean_object*);
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 9, .m_capacity = 9, .m_length = 8, .m_data = "instHSub"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__0 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__0_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__0_value),LEAN_SCALAR_PTR_LITERAL(32, 225, 92, 14, 170, 61, 170, 140)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__1 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__1_value;
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 6, .m_capacity = 6, .m_length = 5, .m_data = "toSub"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__2 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__2_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__2_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3_value_aux_0),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__3_value),LEAN_SCALAR_PTR_LITERAL(116, 4, 170, 185, 29, 24, 60, 188)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3_value_aux_1),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__0_value),LEAN_SCALAR_PTR_LITERAL(196, 225, 111, 69, 82, 38, 249, 149)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3_value_aux_2),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__2_value),LEAN_SCALAR_PTR_LITERAL(8, 241, 181, 204, 215, 46, 40, 252)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__17_value),LEAN_SCALAR_PTR_LITERAL(121, 130, 45, 212, 110, 237, 236, 233)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__4 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__4_value;
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13_spec__19(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13_spec__19___boxed(lean_object**);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___lam__0(lean_object*, lean_object*);
static const lean_string_object l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 6, .m_capacity = 6, .m_length = 5, .m_data = "toNeg"};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__0 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__0_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__2_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1_value_aux_0),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__3_value),LEAN_SCALAR_PTR_LITERAL(116, 4, 170, 185, 29, 24, 60, 188)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1_value_aux_1),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__0_value),LEAN_SCALAR_PTR_LITERAL(196, 225, 111, 69, 82, 38, 249, 149)}};
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1_value_aux_2),((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__0_value),LEAN_SCALAR_PTR_LITERAL(100, 233, 103, 154, 53, 22, 86, 139)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1_value;
static const lean_ctor_object l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__11_value),LEAN_SCALAR_PTR_LITERAL(94, 4, 109, 108, 64, 81, 153, 133)}};
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__2 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__2_value;
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_once_cell_t l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static size_t l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__0;
static lean_once_cell_t l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static size_t l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__1;
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg(lean_object*, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16_spec__24___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16___redArg(lean_object*, lean_object*, lean_object*);
static lean_once_cell_t l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg___closed__0;
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg(lean_object*, size_t, size_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17___redArg(size_t, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reify_x3f(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reify_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Nat_cast___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__9(lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3(lean_object*, lean_object*, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17(lean_object*, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16_spec__24(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3___boxed(lean_object**);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3_spec__5___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3_spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__0___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7_spec__13___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7_spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7_spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11_spec__14(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11_spec__14___boxed(lean_object**);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9_spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9_spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4_spec__7___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4_spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4_spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_ncreify_x3f(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_ncreify_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 39, .m_capacity = 39, .m_length = 38, .m_data = "semiring term with unexpected instance"};
static const lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___closed__0 = (const lean_object*)&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___closed__0_value;
static lean_once_cell_t l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___closed__1;
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__5(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__3(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__7(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4___lam__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4_spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1___lam__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2___boxed(lean_object**);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5___lam__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3___lam__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_closure_object l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_closure_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 245}, .m_fun = (void*)l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__0___boxed, .m_arity = 13, .m_num_fixed = 0, .m_objs = {} };
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__0 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__0_value;
static const lean_closure_object l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_closure_object) + sizeof(void*)*1, .m_other = 0, .m_tag = 245}, .m_fun = (void*)l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1___boxed, .m_arity = 14, .m_num_fixed = 1, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__0_value)} };
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__1 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__1_value;
static const lean_closure_object l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_closure_object) + sizeof(void*)*1, .m_other = 0, .m_tag = 245}, .m_fun = (void*)l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__2___boxed, .m_arity = 14, .m_num_fixed = 1, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__0_value)} };
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__2 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__2_value;
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreify_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreify_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4_spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__0___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2___boxed(lean_object**);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__3___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_closure_object l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_closure_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 245}, .m_fun = (void*)l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___lam__0___boxed, .m_arity = 13, .m_num_fixed = 0, .m_objs = {} };
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__0 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__0_value;
static const lean_closure_object l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_closure_object) + sizeof(void*)*1, .m_other = 0, .m_tag = 245}, .m_fun = (void*)l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1___boxed, .m_arity = 14, .m_num_fixed = 1, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__0_value)} };
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__1 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__1_value;
static const lean_closure_object l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_closure_object) + sizeof(void*)*1, .m_other = 0, .m_tag = 245}, .m_fun = (void*)l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__2___boxed, .m_arity = 14, .m_num_fixed = 1, .m_objs = {((lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__0_value)} };
static const lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__2 = (const lean_object*)&l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__2_value;
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0(lean_object* v_inst_1_, lean_object* v_toPure_2_, lean_object* v_____do__lift_3_){
_start:
{
lean_object* v___x_4_; uint8_t v___x_5_; lean_object* v___x_6_; lean_object* v___x_7_; 
v___x_4_ = l_Lean_Expr_appArg_x21(v_____do__lift_3_);
v___x_5_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_4_, v_inst_1_);
lean_dec_ref(v___x_4_);
v___x_6_ = lean_box(v___x_5_);
v___x_7_ = lean_apply_2(v_toPure_2_, lean_box(0), v___x_6_);
return v___x_7_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0___boxed(lean_object* v_inst_8_, lean_object* v_toPure_9_, lean_object* v_____do__lift_10_){
_start:
{
lean_object* v_res_11_; 
v_res_11_ = l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0(v_inst_8_, v_toPure_9_, v_____do__lift_10_);
lean_dec_ref(v_____do__lift_10_);
lean_dec_ref(v_inst_8_);
return v_res_11_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg(lean_object* v_inst_12_, lean_object* v_inst_13_, lean_object* v_inst_14_, lean_object* v_inst_15_, lean_object* v_inst_16_, lean_object* v_inst_17_){
_start:
{
lean_object* v_toApplicative_18_; lean_object* v_toBind_19_; lean_object* v_toPure_20_; lean_object* v___x_21_; lean_object* v___f_22_; lean_object* v___x_23_; 
v_toApplicative_18_ = lean_ctor_get(v_inst_14_, 0);
v_toBind_19_ = lean_ctor_get(v_inst_14_, 1);
lean_inc(v_toBind_19_);
v_toPure_20_ = lean_ctor_get(v_toApplicative_18_, 1);
lean_inc(v_toPure_20_);
v___x_21_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn___redArg(v_inst_12_, v_inst_13_, v_inst_14_, v_inst_15_, v_inst_16_);
v___f_22_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0___boxed), 3, 2);
lean_closure_set(v___f_22_, 0, v_inst_17_);
lean_closure_set(v___f_22_, 1, v_toPure_20_);
v___x_23_ = lean_apply_4(v_toBind_19_, lean_box(0), lean_box(0), v___x_21_, v___f_22_);
return v___x_23_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst(lean_object* v_m_24_, lean_object* v_inst_25_, lean_object* v_inst_26_, lean_object* v_inst_27_, lean_object* v_inst_28_, lean_object* v_inst_29_, lean_object* v_inst_30_){
_start:
{
lean_object* v___x_31_; 
v___x_31_ = l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg(v_inst_25_, v_inst_26_, v_inst_27_, v_inst_28_, v_inst_29_, v_inst_30_);
return v___x_31_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst___redArg(lean_object* v_inst_32_, lean_object* v_inst_33_, lean_object* v_inst_34_, lean_object* v_inst_35_, lean_object* v_inst_36_, lean_object* v_inst_37_){
_start:
{
lean_object* v_toApplicative_38_; lean_object* v_toBind_39_; lean_object* v_toPure_40_; lean_object* v___x_41_; lean_object* v___f_42_; lean_object* v___x_43_; 
v_toApplicative_38_ = lean_ctor_get(v_inst_34_, 0);
v_toBind_39_ = lean_ctor_get(v_inst_34_, 1);
lean_inc(v_toBind_39_);
v_toPure_40_ = lean_ctor_get(v_toApplicative_38_, 1);
lean_inc(v_toPure_40_);
v___x_41_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn___redArg(v_inst_32_, v_inst_33_, v_inst_34_, v_inst_35_, v_inst_36_);
v___f_42_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0___boxed), 3, 2);
lean_closure_set(v___f_42_, 0, v_inst_37_);
lean_closure_set(v___f_42_, 1, v_toPure_40_);
v___x_43_ = lean_apply_4(v_toBind_39_, lean_box(0), lean_box(0), v___x_41_, v___f_42_);
return v___x_43_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst(lean_object* v_m_44_, lean_object* v_inst_45_, lean_object* v_inst_46_, lean_object* v_inst_47_, lean_object* v_inst_48_, lean_object* v_inst_49_, lean_object* v_inst_50_){
_start:
{
lean_object* v___x_51_; 
v___x_51_ = l_Lean_Meta_Grind_Arith_CommRing_isMulInst___redArg(v_inst_45_, v_inst_46_, v_inst_47_, v_inst_48_, v_inst_49_, v_inst_50_);
return v___x_51_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst___redArg(lean_object* v_inst_52_, lean_object* v_inst_53_, lean_object* v_inst_54_, lean_object* v_inst_55_, lean_object* v_inst_56_, lean_object* v_inst_57_){
_start:
{
lean_object* v_toApplicative_58_; lean_object* v_toBind_59_; lean_object* v_toPure_60_; lean_object* v___x_61_; lean_object* v___f_62_; lean_object* v___x_63_; 
v_toApplicative_58_ = lean_ctor_get(v_inst_54_, 0);
v_toBind_59_ = lean_ctor_get(v_inst_54_, 1);
lean_inc(v_toBind_59_);
v_toPure_60_ = lean_ctor_get(v_toApplicative_58_, 1);
lean_inc(v_toPure_60_);
v___x_61_ = l_Lean_Meta_Grind_Arith_CommRing_getSubFn___redArg(v_inst_52_, v_inst_53_, v_inst_54_, v_inst_55_, v_inst_56_);
v___f_62_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0___boxed), 3, 2);
lean_closure_set(v___f_62_, 0, v_inst_57_);
lean_closure_set(v___f_62_, 1, v_toPure_60_);
v___x_63_ = lean_apply_4(v_toBind_59_, lean_box(0), lean_box(0), v___x_61_, v___f_62_);
return v___x_63_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst(lean_object* v_m_64_, lean_object* v_inst_65_, lean_object* v_inst_66_, lean_object* v_inst_67_, lean_object* v_inst_68_, lean_object* v_inst_69_, lean_object* v_inst_70_){
_start:
{
lean_object* v___x_71_; 
v___x_71_ = l_Lean_Meta_Grind_Arith_CommRing_isSubInst___redArg(v_inst_65_, v_inst_66_, v_inst_67_, v_inst_68_, v_inst_69_, v_inst_70_);
return v___x_71_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst___redArg(lean_object* v_inst_72_, lean_object* v_inst_73_, lean_object* v_inst_74_, lean_object* v_inst_75_, lean_object* v_inst_76_, lean_object* v_inst_77_){
_start:
{
lean_object* v_toApplicative_78_; lean_object* v_toBind_79_; lean_object* v_toPure_80_; lean_object* v___x_81_; lean_object* v___f_82_; lean_object* v___x_83_; 
v_toApplicative_78_ = lean_ctor_get(v_inst_74_, 0);
v_toBind_79_ = lean_ctor_get(v_inst_74_, 1);
lean_inc(v_toBind_79_);
v_toPure_80_ = lean_ctor_get(v_toApplicative_78_, 1);
lean_inc(v_toPure_80_);
v___x_81_ = l_Lean_Meta_Grind_Arith_CommRing_getNegFn___redArg(v_inst_72_, v_inst_73_, v_inst_74_, v_inst_75_, v_inst_76_);
v___f_82_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0___boxed), 3, 2);
lean_closure_set(v___f_82_, 0, v_inst_77_);
lean_closure_set(v___f_82_, 1, v_toPure_80_);
v___x_83_ = lean_apply_4(v_toBind_79_, lean_box(0), lean_box(0), v___x_81_, v___f_82_);
return v___x_83_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst(lean_object* v_m_84_, lean_object* v_inst_85_, lean_object* v_inst_86_, lean_object* v_inst_87_, lean_object* v_inst_88_, lean_object* v_inst_89_, lean_object* v_inst_90_){
_start:
{
lean_object* v___x_91_; 
v___x_91_ = l_Lean_Meta_Grind_Arith_CommRing_isNegInst___redArg(v_inst_85_, v_inst_86_, v_inst_87_, v_inst_88_, v_inst_89_, v_inst_90_);
return v___x_91_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst___redArg(lean_object* v_inst_92_, lean_object* v_inst_93_, lean_object* v_inst_94_, lean_object* v_inst_95_, lean_object* v_inst_96_, lean_object* v_inst_97_){
_start:
{
lean_object* v_toApplicative_98_; lean_object* v_toBind_99_; lean_object* v_toPure_100_; lean_object* v___x_101_; lean_object* v___f_102_; lean_object* v___x_103_; 
v_toApplicative_98_ = lean_ctor_get(v_inst_94_, 0);
v_toBind_99_ = lean_ctor_get(v_inst_94_, 1);
lean_inc(v_toBind_99_);
v_toPure_100_ = lean_ctor_get(v_toApplicative_98_, 1);
lean_inc(v_toPure_100_);
v___x_101_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn___redArg(v_inst_92_, v_inst_93_, v_inst_94_, v_inst_95_, v_inst_96_);
v___f_102_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0___boxed), 3, 2);
lean_closure_set(v___f_102_, 0, v_inst_97_);
lean_closure_set(v___f_102_, 1, v_toPure_100_);
v___x_103_ = lean_apply_4(v_toBind_99_, lean_box(0), lean_box(0), v___x_101_, v___f_102_);
return v___x_103_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst(lean_object* v_m_104_, lean_object* v_inst_105_, lean_object* v_inst_106_, lean_object* v_inst_107_, lean_object* v_inst_108_, lean_object* v_inst_109_, lean_object* v_inst_110_){
_start:
{
lean_object* v___x_111_; 
v___x_111_ = l_Lean_Meta_Grind_Arith_CommRing_isPowInst___redArg(v_inst_105_, v_inst_106_, v_inst_107_, v_inst_108_, v_inst_109_, v_inst_110_);
return v___x_111_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___redArg(lean_object* v_inst_112_, lean_object* v_inst_113_, lean_object* v_inst_114_, lean_object* v_inst_115_, lean_object* v_inst_116_){
_start:
{
lean_object* v_toApplicative_117_; lean_object* v_toBind_118_; lean_object* v_toPure_119_; lean_object* v___x_120_; lean_object* v___f_121_; lean_object* v___x_122_; 
v_toApplicative_117_ = lean_ctor_get(v_inst_113_, 0);
v_toBind_118_ = lean_ctor_get(v_inst_113_, 1);
lean_inc(v_toBind_118_);
v_toPure_119_ = lean_ctor_get(v_toApplicative_117_, 1);
lean_inc(v_toPure_119_);
v___x_120_ = l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___redArg(v_inst_112_, v_inst_113_, v_inst_114_, v_inst_115_);
v___f_121_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0___boxed), 3, 2);
lean_closure_set(v___f_121_, 0, v_inst_116_);
lean_closure_set(v___f_121_, 1, v_toPure_119_);
v___x_122_ = lean_apply_4(v_toBind_118_, lean_box(0), lean_box(0), v___x_120_, v___f_121_);
return v___x_122_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst(lean_object* v_m_123_, lean_object* v_inst_124_, lean_object* v_inst_125_, lean_object* v_inst_126_, lean_object* v_inst_127_, lean_object* v_inst_128_){
_start:
{
lean_object* v___x_129_; 
v___x_129_ = l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___redArg(v_inst_124_, v_inst_125_, v_inst_126_, v_inst_127_, v_inst_128_);
return v___x_129_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___redArg(lean_object* v_inst_130_, lean_object* v_inst_131_, lean_object* v_inst_132_, lean_object* v_inst_133_, lean_object* v_inst_134_){
_start:
{
lean_object* v_toApplicative_135_; lean_object* v_toBind_136_; lean_object* v_toPure_137_; lean_object* v___x_138_; lean_object* v___f_139_; lean_object* v___x_140_; 
v_toApplicative_135_ = lean_ctor_get(v_inst_131_, 0);
v_toBind_136_ = lean_ctor_get(v_inst_131_, 1);
lean_inc(v_toBind_136_);
v_toPure_137_ = lean_ctor_get(v_toApplicative_135_, 1);
lean_inc(v_toPure_137_);
v___x_138_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___redArg(v_inst_130_, v_inst_131_, v_inst_132_, v_inst_133_);
v___f_139_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg___lam__0___boxed), 3, 2);
lean_closure_set(v___f_139_, 0, v_inst_134_);
lean_closure_set(v___f_139_, 1, v_toPure_137_);
v___x_140_ = lean_apply_4(v_toBind_136_, lean_box(0), lean_box(0), v___x_138_, v___f_139_);
return v___x_140_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst(lean_object* v_m_141_, lean_object* v_inst_142_, lean_object* v_inst_143_, lean_object* v_inst_144_, lean_object* v_inst_145_, lean_object* v_inst_146_){
_start:
{
lean_object* v___x_147_; 
v___x_147_ = l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___redArg(v_inst_142_, v_inst_143_, v_inst_144_, v_inst_145_, v_inst_146_);
return v___x_147_;
}
}
static lean_object* _init_l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___closed__1(void){
_start:
{
lean_object* v___x_149_; lean_object* v___x_150_; 
v___x_149_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___closed__0));
v___x_150_ = l_Lean_stringToMessageData(v___x_149_);
return v___x_150_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg(lean_object* v_e_151_, lean_object* v_a_152_, lean_object* v_a_153_, lean_object* v_a_154_, lean_object* v_a_155_, lean_object* v_a_156_, lean_object* v_a_157_, lean_object* v_a_158_, lean_object* v_a_159_, lean_object* v_a_160_){
_start:
{
lean_object* v___x_162_; 
v___x_162_ = l_Lean_Meta_Grind_getConfig___redArg(v_a_153_);
if (lean_obj_tag(v___x_162_) == 0)
{
lean_object* v_a_163_; lean_object* v___x_165_; uint8_t v_isShared_166_; uint8_t v_isSharedCheck_176_; 
v_a_163_ = lean_ctor_get(v___x_162_, 0);
v_isSharedCheck_176_ = !lean_is_exclusive(v___x_162_);
if (v_isSharedCheck_176_ == 0)
{
v___x_165_ = v___x_162_;
v_isShared_166_ = v_isSharedCheck_176_;
goto v_resetjp_164_;
}
else
{
lean_inc(v_a_163_);
lean_dec(v___x_162_);
v___x_165_ = lean_box(0);
v_isShared_166_ = v_isSharedCheck_176_;
goto v_resetjp_164_;
}
v_resetjp_164_:
{
uint8_t v_verbose_167_; 
v_verbose_167_ = lean_ctor_get_uint8(v_a_163_, sizeof(void*)*11 + 15);
lean_dec(v_a_163_);
if (v_verbose_167_ == 0)
{
lean_object* v___x_168_; lean_object* v___x_170_; 
lean_dec_ref(v_e_151_);
v___x_168_ = lean_box(0);
if (v_isShared_166_ == 0)
{
lean_ctor_set(v___x_165_, 0, v___x_168_);
v___x_170_ = v___x_165_;
goto v_reusejp_169_;
}
else
{
lean_object* v_reuseFailAlloc_171_; 
v_reuseFailAlloc_171_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_171_, 0, v___x_168_);
v___x_170_ = v_reuseFailAlloc_171_;
goto v_reusejp_169_;
}
v_reusejp_169_:
{
return v___x_170_;
}
}
else
{
lean_object* v___x_172_; lean_object* v___x_173_; lean_object* v___x_174_; lean_object* v___x_175_; 
lean_del_object(v___x_165_);
v___x_172_ = lean_obj_once(&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___closed__1, &l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___closed__1_once, _init_l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___closed__1);
v___x_173_ = l_Lean_indentExpr(v_e_151_);
v___x_174_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_174_, 0, v___x_172_);
lean_ctor_set(v___x_174_, 1, v___x_173_);
v___x_175_ = l_Lean_Meta_Grind_reportIssue(v___x_174_, v_a_152_, v_a_153_, v_a_154_, v_a_155_, v_a_156_, v_a_157_, v_a_158_, v_a_159_, v_a_160_);
return v___x_175_;
}
}
}
else
{
lean_object* v_a_177_; lean_object* v___x_179_; uint8_t v_isShared_180_; uint8_t v_isSharedCheck_184_; 
lean_dec_ref(v_e_151_);
v_a_177_ = lean_ctor_get(v___x_162_, 0);
v_isSharedCheck_184_ = !lean_is_exclusive(v___x_162_);
if (v_isSharedCheck_184_ == 0)
{
v___x_179_ = v___x_162_;
v_isShared_180_ = v_isSharedCheck_184_;
goto v_resetjp_178_;
}
else
{
lean_inc(v_a_177_);
lean_dec(v___x_162_);
v___x_179_ = lean_box(0);
v_isShared_180_ = v_isSharedCheck_184_;
goto v_resetjp_178_;
}
v_resetjp_178_:
{
lean_object* v___x_182_; 
if (v_isShared_180_ == 0)
{
v___x_182_ = v___x_179_;
goto v_reusejp_181_;
}
else
{
lean_object* v_reuseFailAlloc_183_; 
v_reuseFailAlloc_183_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_183_, 0, v_a_177_);
v___x_182_ = v_reuseFailAlloc_183_;
goto v_reusejp_181_;
}
v_reusejp_181_:
{
return v___x_182_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg___boxed(lean_object* v_e_185_, lean_object* v_a_186_, lean_object* v_a_187_, lean_object* v_a_188_, lean_object* v_a_189_, lean_object* v_a_190_, lean_object* v_a_191_, lean_object* v_a_192_, lean_object* v_a_193_, lean_object* v_a_194_, lean_object* v_a_195_){
_start:
{
lean_object* v_res_196_; 
v_res_196_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg(v_e_185_, v_a_186_, v_a_187_, v_a_188_, v_a_189_, v_a_190_, v_a_191_, v_a_192_, v_a_193_, v_a_194_);
lean_dec(v_a_194_);
lean_dec_ref(v_a_193_);
lean_dec(v_a_192_);
lean_dec_ref(v_a_191_);
lean_dec(v_a_190_);
lean_dec_ref(v_a_189_);
lean_dec(v_a_188_);
lean_dec_ref(v_a_187_);
lean_dec(v_a_186_);
return v_res_196_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue(lean_object* v_e_197_, lean_object* v_a_198_, lean_object* v_a_199_, lean_object* v_a_200_, lean_object* v_a_201_, lean_object* v_a_202_, lean_object* v_a_203_, lean_object* v_a_204_, lean_object* v_a_205_, lean_object* v_a_206_, lean_object* v_a_207_){
_start:
{
lean_object* v___x_209_; 
v___x_209_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg(v_e_197_, v_a_199_, v_a_200_, v_a_201_, v_a_202_, v_a_203_, v_a_204_, v_a_205_, v_a_206_, v_a_207_);
return v___x_209_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___boxed(lean_object* v_e_210_, lean_object* v_a_211_, lean_object* v_a_212_, lean_object* v_a_213_, lean_object* v_a_214_, lean_object* v_a_215_, lean_object* v_a_216_, lean_object* v_a_217_, lean_object* v_a_218_, lean_object* v_a_219_, lean_object* v_a_220_, lean_object* v_a_221_){
_start:
{
lean_object* v_res_222_; 
v_res_222_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue(v_e_210_, v_a_211_, v_a_212_, v_a_213_, v_a_214_, v_a_215_, v_a_216_, v_a_217_, v_a_218_, v_a_219_, v_a_220_);
lean_dec(v_a_220_);
lean_dec_ref(v_a_219_);
lean_dec(v_a_218_);
lean_dec_ref(v_a_217_);
lean_dec(v_a_216_);
lean_dec_ref(v_a_215_);
lean_dec(v_a_214_);
lean_dec_ref(v_a_213_);
lean_dec(v_a_212_);
lean_dec(v_a_211_);
return v_res_222_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__0(lean_object* v_toPure_223_, lean_object* v_toVar_224_, lean_object* v_e_225_, lean_object* v_____x_226_){
_start:
{
if (lean_obj_tag(v_____x_226_) == 1)
{
lean_object* v_val_227_; lean_object* v___x_229_; uint8_t v_isShared_230_; uint8_t v_isSharedCheck_235_; 
lean_dec_ref(v_e_225_);
lean_dec(v_toVar_224_);
v_val_227_ = lean_ctor_get(v_____x_226_, 0);
v_isSharedCheck_235_ = !lean_is_exclusive(v_____x_226_);
if (v_isSharedCheck_235_ == 0)
{
v___x_229_ = v_____x_226_;
v_isShared_230_ = v_isSharedCheck_235_;
goto v_resetjp_228_;
}
else
{
lean_inc(v_val_227_);
lean_dec(v_____x_226_);
v___x_229_ = lean_box(0);
v_isShared_230_ = v_isSharedCheck_235_;
goto v_resetjp_228_;
}
v_resetjp_228_:
{
lean_object* v___x_232_; 
if (v_isShared_230_ == 0)
{
v___x_232_ = v___x_229_;
goto v_reusejp_231_;
}
else
{
lean_object* v_reuseFailAlloc_234_; 
v_reuseFailAlloc_234_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_234_, 0, v_val_227_);
v___x_232_ = v_reuseFailAlloc_234_;
goto v_reusejp_231_;
}
v_reusejp_231_:
{
lean_object* v___x_233_; 
v___x_233_ = lean_apply_2(v_toPure_223_, lean_box(0), v___x_232_);
return v___x_233_;
}
}
}
else
{
lean_object* v___x_236_; 
lean_dec(v_____x_226_);
lean_dec(v_toPure_223_);
v___x_236_ = lean_apply_1(v_toVar_224_, v_e_225_);
return v___x_236_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__1(lean_object* v_toPure_237_, lean_object* v_toVar_238_, lean_object* v_e_239_, lean_object* v_____x_240_){
_start:
{
if (lean_obj_tag(v_____x_240_) == 1)
{
lean_object* v_val_241_; lean_object* v___x_243_; uint8_t v_isShared_244_; uint8_t v_isSharedCheck_249_; 
lean_dec_ref(v_e_239_);
lean_dec(v_toVar_238_);
v_val_241_ = lean_ctor_get(v_____x_240_, 0);
v_isSharedCheck_249_ = !lean_is_exclusive(v_____x_240_);
if (v_isSharedCheck_249_ == 0)
{
v___x_243_ = v_____x_240_;
v_isShared_244_ = v_isSharedCheck_249_;
goto v_resetjp_242_;
}
else
{
lean_inc(v_val_241_);
lean_dec(v_____x_240_);
v___x_243_ = lean_box(0);
v_isShared_244_ = v_isSharedCheck_249_;
goto v_resetjp_242_;
}
v_resetjp_242_:
{
lean_object* v___x_246_; 
if (v_isShared_244_ == 0)
{
lean_ctor_set_tag(v___x_243_, 2);
v___x_246_ = v___x_243_;
goto v_reusejp_245_;
}
else
{
lean_object* v_reuseFailAlloc_248_; 
v_reuseFailAlloc_248_ = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(v_reuseFailAlloc_248_, 0, v_val_241_);
v___x_246_ = v_reuseFailAlloc_248_;
goto v_reusejp_245_;
}
v_reusejp_245_:
{
lean_object* v___x_247_; 
v___x_247_ = lean_apply_2(v_toPure_237_, lean_box(0), v___x_246_);
return v___x_247_;
}
}
}
else
{
lean_object* v___x_250_; 
lean_dec(v_____x_240_);
lean_dec(v_toPure_237_);
v___x_250_ = lean_apply_1(v_toVar_238_, v_e_239_);
return v___x_250_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__2(lean_object* v_toPure_251_, lean_object* v_____do__lift_252_){
_start:
{
lean_object* v___x_253_; lean_object* v___x_254_; 
v___x_253_ = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(v___x_253_, 0, v_____do__lift_252_);
v___x_254_ = lean_apply_2(v_toPure_251_, lean_box(0), v___x_253_);
return v___x_254_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__3(lean_object* v_toPure_255_, lean_object* v_toVar_256_, lean_object* v_e_257_, lean_object* v_____x_258_){
_start:
{
if (lean_obj_tag(v_____x_258_) == 1)
{
lean_object* v_val_259_; lean_object* v___x_261_; uint8_t v_isShared_262_; uint8_t v_isSharedCheck_268_; 
lean_dec_ref(v_e_257_);
lean_dec(v_toVar_256_);
v_val_259_ = lean_ctor_get(v_____x_258_, 0);
v_isSharedCheck_268_ = !lean_is_exclusive(v_____x_258_);
if (v_isSharedCheck_268_ == 0)
{
v___x_261_ = v_____x_258_;
v_isShared_262_ = v_isSharedCheck_268_;
goto v_resetjp_260_;
}
else
{
lean_inc(v_val_259_);
lean_dec(v_____x_258_);
v___x_261_ = lean_box(0);
v_isShared_262_ = v_isSharedCheck_268_;
goto v_resetjp_260_;
}
v_resetjp_260_:
{
lean_object* v___x_263_; lean_object* v___x_265_; 
v___x_263_ = lean_nat_to_int(v_val_259_);
if (v_isShared_262_ == 0)
{
lean_ctor_set_tag(v___x_261_, 0);
lean_ctor_set(v___x_261_, 0, v___x_263_);
v___x_265_ = v___x_261_;
goto v_reusejp_264_;
}
else
{
lean_object* v_reuseFailAlloc_267_; 
v_reuseFailAlloc_267_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_267_, 0, v___x_263_);
v___x_265_ = v_reuseFailAlloc_267_;
goto v_reusejp_264_;
}
v_reusejp_264_:
{
lean_object* v___x_266_; 
v___x_266_ = lean_apply_2(v_toPure_255_, lean_box(0), v___x_265_);
return v___x_266_;
}
}
}
else
{
lean_object* v___x_269_; 
lean_dec(v_____x_258_);
lean_dec(v_toPure_255_);
v___x_269_ = lean_apply_1(v_toVar_256_, v_e_257_);
return v___x_269_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__4(lean_object* v_____do__lift_270_, lean_object* v_toPure_271_, lean_object* v_____do__lift_272_){
_start:
{
lean_object* v___x_273_; lean_object* v___x_274_; 
v___x_273_ = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(v___x_273_, 0, v_____do__lift_270_);
lean_ctor_set(v___x_273_, 1, v_____do__lift_272_);
v___x_274_ = lean_apply_2(v_toPure_271_, lean_box(0), v___x_273_);
return v___x_274_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__7(lean_object* v_____do__lift_275_, lean_object* v_toPure_276_, lean_object* v_____do__lift_277_){
_start:
{
lean_object* v___x_278_; lean_object* v___x_279_; 
v___x_278_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_278_, 0, v_____do__lift_275_);
lean_ctor_set(v___x_278_, 1, v_____do__lift_277_);
v___x_279_ = lean_apply_2(v_toPure_276_, lean_box(0), v___x_278_);
return v___x_279_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__14(lean_object* v_asVar_280_, lean_object* v_e_281_, lean_object* v_arg_282_, lean_object* v_inst_283_, lean_object* v_toBind_284_, lean_object* v___f_285_, uint8_t v_____do__lift_286_){
_start:
{
if (v_____do__lift_286_ == 0)
{
lean_object* v___x_287_; 
lean_dec(v___f_285_);
lean_dec(v_toBind_284_);
lean_dec(v_inst_283_);
lean_dec_ref(v_arg_282_);
v___x_287_ = lean_apply_1(v_asVar_280_, v_e_281_);
return v___x_287_;
}
else
{
lean_object* v___x_288_; lean_object* v___x_289_; lean_object* v___x_290_; 
lean_dec_ref(v_e_281_);
lean_dec(v_asVar_280_);
v___x_288_ = lean_alloc_closure((void*)(l_Lean_Meta_getIntValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_288_, 0, v_arg_282_);
v___x_289_ = lean_apply_2(v_inst_283_, lean_box(0), v___x_288_);
v___x_290_ = lean_apply_4(v_toBind_284_, lean_box(0), lean_box(0), v___x_289_, v___f_285_);
return v___x_290_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__14___boxed(lean_object* v_asVar_291_, lean_object* v_e_292_, lean_object* v_arg_293_, lean_object* v_inst_294_, lean_object* v_toBind_295_, lean_object* v___f_296_, lean_object* v_____do__lift_297_){
_start:
{
uint8_t v_____do__lift_5188__boxed_298_; lean_object* v_res_299_; 
v_____do__lift_5188__boxed_298_ = lean_unbox(v_____do__lift_297_);
v_res_299_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__14(v_asVar_291_, v_e_292_, v_arg_293_, v_inst_294_, v_toBind_295_, v___f_296_, v_____do__lift_5188__boxed_298_);
return v_res_299_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__12(lean_object* v_val_300_, lean_object* v_toPure_301_, lean_object* v_____do__lift_302_){
_start:
{
lean_object* v___x_303_; lean_object* v___x_304_; 
v___x_303_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_303_, 0, v_____do__lift_302_);
lean_ctor_set(v___x_303_, 1, v_val_300_);
v___x_304_ = lean_apply_2(v_toPure_301_, lean_box(0), v___x_303_);
return v___x_304_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__10(lean_object* v_____do__lift_305_, lean_object* v_toPure_306_, lean_object* v_____do__lift_307_){
_start:
{
lean_object* v___x_308_; lean_object* v___x_309_; 
v___x_308_ = lean_alloc_ctor(6, 2, 0);
lean_ctor_set(v___x_308_, 0, v_____do__lift_305_);
lean_ctor_set(v___x_308_, 1, v_____do__lift_307_);
v___x_309_ = lean_apply_2(v_toPure_306_, lean_box(0), v___x_308_);
return v___x_309_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__11(lean_object* v_asVar_310_, lean_object* v_e_311_, lean_object* v_arg_312_, lean_object* v_inst_313_, lean_object* v_toBind_314_, lean_object* v___f_315_, uint8_t v_____do__lift_316_){
_start:
{
if (v_____do__lift_316_ == 0)
{
lean_object* v___x_317_; 
lean_dec(v___f_315_);
lean_dec(v_toBind_314_);
lean_dec(v_inst_313_);
lean_dec_ref(v_arg_312_);
v___x_317_ = lean_apply_1(v_asVar_310_, v_e_311_);
return v___x_317_;
}
else
{
lean_object* v___x_318_; lean_object* v___x_319_; lean_object* v___x_320_; 
lean_dec_ref(v_e_311_);
lean_dec(v_asVar_310_);
v___x_318_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_318_, 0, v_arg_312_);
v___x_319_ = lean_apply_2(v_inst_313_, lean_box(0), v___x_318_);
v___x_320_ = lean_apply_4(v_toBind_314_, lean_box(0), lean_box(0), v___x_319_, v___f_315_);
return v___x_320_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__11___boxed(lean_object* v_asVar_321_, lean_object* v_e_322_, lean_object* v_arg_323_, lean_object* v_inst_324_, lean_object* v_toBind_325_, lean_object* v___f_326_, lean_object* v_____do__lift_327_){
_start:
{
uint8_t v_____do__lift_5224__boxed_328_; lean_object* v_res_329_; 
v_____do__lift_5224__boxed_328_ = lean_unbox(v_____do__lift_327_);
v_res_329_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__11(v_asVar_321_, v_e_322_, v_arg_323_, v_inst_324_, v_toBind_325_, v___f_326_, v_____do__lift_5224__boxed_328_);
return v_res_329_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__6(lean_object* v_asVar_374_, lean_object* v_e_375_, lean_object* v_inst_376_, lean_object* v_inst_377_, lean_object* v_inst_378_, lean_object* v_inst_379_, lean_object* v_inst_380_, lean_object* v_toVar_381_, lean_object* v_arg_382_, lean_object* v_toBind_383_, lean_object* v___f_384_, uint8_t v_____do__lift_385_){
_start:
{
if (v_____do__lift_385_ == 0)
{
lean_object* v___x_386_; 
lean_dec(v___f_384_);
lean_dec(v_toBind_383_);
lean_dec_ref(v_arg_382_);
lean_dec(v_toVar_381_);
lean_dec_ref(v_inst_380_);
lean_dec_ref(v_inst_379_);
lean_dec_ref(v_inst_378_);
lean_dec_ref(v_inst_377_);
lean_dec(v_inst_376_);
v___x_386_ = lean_apply_1(v_asVar_374_, v_e_375_);
return v___x_386_;
}
else
{
lean_object* v___x_387_; lean_object* v___x_388_; 
lean_dec_ref(v_e_375_);
v___x_387_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(v_inst_376_, v_inst_377_, v_inst_378_, v_inst_379_, v_inst_380_, v_toVar_381_, v_asVar_374_, v_arg_382_);
v___x_388_ = lean_apply_4(v_toBind_383_, lean_box(0), lean_box(0), v___x_387_, v___f_384_);
return v___x_388_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__6___boxed(lean_object* v_asVar_389_, lean_object* v_e_390_, lean_object* v_inst_391_, lean_object* v_inst_392_, lean_object* v_inst_393_, lean_object* v_inst_394_, lean_object* v_inst_395_, lean_object* v_toVar_396_, lean_object* v_arg_397_, lean_object* v_toBind_398_, lean_object* v___f_399_, lean_object* v_____do__lift_400_){
_start:
{
uint8_t v_____do__lift_5322__boxed_401_; lean_object* v_res_402_; 
v_____do__lift_5322__boxed_401_ = lean_unbox(v_____do__lift_400_);
v_res_402_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__6(v_asVar_389_, v_e_390_, v_inst_391_, v_inst_392_, v_inst_393_, v_inst_394_, v_inst_395_, v_toVar_396_, v_arg_397_, v_toBind_398_, v___f_399_, v_____do__lift_5322__boxed_401_);
return v_res_402_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__8(lean_object* v_toPure_403_, lean_object* v_inst_404_, lean_object* v_inst_405_, lean_object* v_inst_406_, lean_object* v_inst_407_, lean_object* v_inst_408_, lean_object* v_toVar_409_, lean_object* v_asVar_410_, lean_object* v_arg_411_, lean_object* v_toBind_412_, lean_object* v_____do__lift_413_){
_start:
{
lean_object* v___f_414_; lean_object* v___x_415_; lean_object* v___x_416_; 
v___f_414_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__7), 3, 2);
lean_closure_set(v___f_414_, 0, v_____do__lift_413_);
lean_closure_set(v___f_414_, 1, v_toPure_403_);
v___x_415_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(v_inst_404_, v_inst_405_, v_inst_406_, v_inst_407_, v_inst_408_, v_toVar_409_, v_asVar_410_, v_arg_411_);
v___x_416_ = lean_apply_4(v_toBind_412_, lean_box(0), lean_box(0), v___x_415_, v___f_414_);
return v___x_416_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__9(lean_object* v_toPure_417_, lean_object* v_inst_418_, lean_object* v_inst_419_, lean_object* v_inst_420_, lean_object* v_inst_421_, lean_object* v_inst_422_, lean_object* v_toVar_423_, lean_object* v_asVar_424_, lean_object* v_arg_425_, lean_object* v_toBind_426_, lean_object* v_____do__lift_427_){
_start:
{
lean_object* v___f_428_; lean_object* v___x_429_; lean_object* v___x_430_; 
v___f_428_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__10), 3, 2);
lean_closure_set(v___f_428_, 0, v_____do__lift_427_);
lean_closure_set(v___f_428_, 1, v_toPure_417_);
v___x_429_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(v_inst_418_, v_inst_419_, v_inst_420_, v_inst_421_, v_inst_422_, v_toVar_423_, v_asVar_424_, v_arg_425_);
v___x_430_ = lean_apply_4(v_toBind_426_, lean_box(0), lean_box(0), v___x_429_, v___f_428_);
return v___x_430_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__13(lean_object* v_toPure_431_, lean_object* v_asVar_432_, lean_object* v_e_433_, lean_object* v_inst_434_, lean_object* v_inst_435_, lean_object* v_inst_436_, lean_object* v_inst_437_, lean_object* v_inst_438_, lean_object* v_toVar_439_, lean_object* v_arg_440_, lean_object* v_toBind_441_, lean_object* v_arg_442_, lean_object* v_____x_443_){
_start:
{
if (lean_obj_tag(v_____x_443_) == 1)
{
lean_object* v_val_444_; lean_object* v___f_445_; lean_object* v___f_446_; lean_object* v___x_447_; lean_object* v___x_448_; 
v_val_444_ = lean_ctor_get(v_____x_443_, 0);
lean_inc(v_val_444_);
lean_dec_ref(v_____x_443_);
v___f_445_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__12), 3, 2);
lean_closure_set(v___f_445_, 0, v_val_444_);
lean_closure_set(v___f_445_, 1, v_toPure_431_);
lean_inc(v_toBind_441_);
lean_inc_ref(v_inst_438_);
lean_inc_ref(v_inst_437_);
lean_inc_ref(v_inst_436_);
lean_inc_ref(v_inst_435_);
lean_inc(v_inst_434_);
v___f_446_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__6___boxed), 12, 11);
lean_closure_set(v___f_446_, 0, v_asVar_432_);
lean_closure_set(v___f_446_, 1, v_e_433_);
lean_closure_set(v___f_446_, 2, v_inst_434_);
lean_closure_set(v___f_446_, 3, v_inst_435_);
lean_closure_set(v___f_446_, 4, v_inst_436_);
lean_closure_set(v___f_446_, 5, v_inst_437_);
lean_closure_set(v___f_446_, 6, v_inst_438_);
lean_closure_set(v___f_446_, 7, v_toVar_439_);
lean_closure_set(v___f_446_, 8, v_arg_440_);
lean_closure_set(v___f_446_, 9, v_toBind_441_);
lean_closure_set(v___f_446_, 10, v___f_445_);
v___x_447_ = l_Lean_Meta_Grind_Arith_CommRing_isPowInst___redArg(v_inst_434_, v_inst_435_, v_inst_436_, v_inst_437_, v_inst_438_, v_arg_442_);
v___x_448_ = lean_apply_4(v_toBind_441_, lean_box(0), lean_box(0), v___x_447_, v___f_446_);
return v___x_448_;
}
else
{
lean_object* v___x_449_; 
lean_dec(v_____x_443_);
lean_dec_ref(v_arg_442_);
lean_dec(v_toBind_441_);
lean_dec_ref(v_arg_440_);
lean_dec_ref(v_inst_438_);
lean_dec_ref(v_inst_437_);
lean_dec_ref(v_inst_436_);
lean_dec_ref(v_inst_435_);
lean_dec(v_inst_434_);
lean_dec(v_asVar_432_);
lean_dec(v_toPure_431_);
v___x_449_ = lean_apply_1(v_toVar_439_, v_e_433_);
return v___x_449_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15(lean_object* v_toVar_450_, lean_object* v_e_451_, lean_object* v_inst_452_, lean_object* v_toBind_453_, lean_object* v___f_454_, lean_object* v_toPure_455_, lean_object* v_inst_456_, lean_object* v_inst_457_, lean_object* v_inst_458_, lean_object* v_inst_459_, lean_object* v_asVar_460_, lean_object* v___f_461_, lean_object* v___f_462_, lean_object* v___f_463_, lean_object* v_____x_464_){
_start:
{
lean_object* v_n_466_; lean_object* v___x_470_; uint8_t v___x_471_; 
v___x_470_ = l_Lean_Expr_cleanupAnnotations(v_____x_464_);
v___x_471_ = l_Lean_Expr_isApp(v___x_470_);
if (v___x_471_ == 0)
{
lean_object* v___x_472_; 
lean_dec_ref(v___x_470_);
lean_dec(v___f_463_);
lean_dec(v___f_462_);
lean_dec(v___f_461_);
lean_dec(v_asVar_460_);
lean_dec_ref(v_inst_459_);
lean_dec_ref(v_inst_458_);
lean_dec_ref(v_inst_457_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec(v___f_454_);
lean_dec(v_toBind_453_);
lean_dec(v_inst_452_);
v___x_472_ = lean_apply_1(v_toVar_450_, v_e_451_);
return v___x_472_;
}
else
{
lean_object* v_arg_473_; lean_object* v___x_474_; uint8_t v___x_475_; 
v_arg_473_ = lean_ctor_get(v___x_470_, 1);
lean_inc_ref(v_arg_473_);
v___x_474_ = l_Lean_Expr_appFnCleanup___redArg(v___x_470_);
v___x_475_ = l_Lean_Expr_isApp(v___x_474_);
if (v___x_475_ == 0)
{
lean_object* v___x_476_; 
lean_dec_ref(v___x_474_);
lean_dec_ref(v_arg_473_);
lean_dec(v___f_463_);
lean_dec(v___f_462_);
lean_dec(v___f_461_);
lean_dec(v_asVar_460_);
lean_dec_ref(v_inst_459_);
lean_dec_ref(v_inst_458_);
lean_dec_ref(v_inst_457_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec(v___f_454_);
lean_dec(v_toBind_453_);
lean_dec(v_inst_452_);
v___x_476_ = lean_apply_1(v_toVar_450_, v_e_451_);
return v___x_476_;
}
else
{
lean_object* v_arg_477_; lean_object* v___x_478_; lean_object* v___x_479_; uint8_t v___x_480_; 
v_arg_477_ = lean_ctor_get(v___x_474_, 1);
lean_inc_ref(v_arg_477_);
v___x_478_ = l_Lean_Expr_appFnCleanup___redArg(v___x_474_);
v___x_479_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__2));
v___x_480_ = l_Lean_Expr_isConstOf(v___x_478_, v___x_479_);
if (v___x_480_ == 0)
{
uint8_t v___x_481_; 
v___x_481_ = l_Lean_Expr_isApp(v___x_478_);
if (v___x_481_ == 0)
{
lean_object* v___x_482_; 
lean_dec_ref(v___x_478_);
lean_dec_ref(v_arg_477_);
lean_dec_ref(v_arg_473_);
lean_dec(v___f_463_);
lean_dec(v___f_462_);
lean_dec(v___f_461_);
lean_dec(v_asVar_460_);
lean_dec_ref(v_inst_459_);
lean_dec_ref(v_inst_458_);
lean_dec_ref(v_inst_457_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec(v___f_454_);
lean_dec(v_toBind_453_);
lean_dec(v_inst_452_);
v___x_482_ = lean_apply_1(v_toVar_450_, v_e_451_);
return v___x_482_;
}
else
{
lean_object* v_arg_483_; lean_object* v___x_484_; lean_object* v___x_485_; uint8_t v___x_486_; 
v_arg_483_ = lean_ctor_get(v___x_478_, 1);
lean_inc_ref(v_arg_483_);
v___x_484_ = l_Lean_Expr_appFnCleanup___redArg(v___x_478_);
v___x_485_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_486_ = l_Lean_Expr_isConstOf(v___x_484_, v___x_485_);
if (v___x_486_ == 0)
{
lean_object* v___x_487_; uint8_t v___x_488_; 
lean_dec(v___f_454_);
v___x_487_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_488_ = l_Lean_Expr_isConstOf(v___x_484_, v___x_487_);
if (v___x_488_ == 0)
{
lean_object* v___x_489_; uint8_t v___x_490_; 
lean_dec(v___f_463_);
v___x_489_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10));
v___x_490_ = l_Lean_Expr_isConstOf(v___x_484_, v___x_489_);
if (v___x_490_ == 0)
{
lean_object* v___x_491_; uint8_t v___x_492_; 
lean_dec(v___f_462_);
v___x_491_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13));
v___x_492_ = l_Lean_Expr_isConstOf(v___x_484_, v___x_491_);
if (v___x_492_ == 0)
{
uint8_t v___x_493_; 
lean_dec(v___f_461_);
v___x_493_ = l_Lean_Expr_isApp(v___x_484_);
if (v___x_493_ == 0)
{
lean_object* v___x_494_; 
lean_dec_ref(v___x_484_);
lean_dec_ref(v_arg_483_);
lean_dec_ref(v_arg_477_);
lean_dec_ref(v_arg_473_);
lean_dec(v_asVar_460_);
lean_dec_ref(v_inst_459_);
lean_dec_ref(v_inst_458_);
lean_dec_ref(v_inst_457_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec(v_toBind_453_);
lean_dec(v_inst_452_);
v___x_494_ = lean_apply_1(v_toVar_450_, v_e_451_);
return v___x_494_;
}
else
{
lean_object* v___x_495_; uint8_t v___x_496_; 
v___x_495_ = l_Lean_Expr_appFnCleanup___redArg(v___x_484_);
v___x_496_ = l_Lean_Expr_isApp(v___x_495_);
if (v___x_496_ == 0)
{
lean_object* v___x_497_; 
lean_dec_ref(v___x_495_);
lean_dec_ref(v_arg_483_);
lean_dec_ref(v_arg_477_);
lean_dec_ref(v_arg_473_);
lean_dec(v_asVar_460_);
lean_dec_ref(v_inst_459_);
lean_dec_ref(v_inst_458_);
lean_dec_ref(v_inst_457_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec(v_toBind_453_);
lean_dec(v_inst_452_);
v___x_497_ = lean_apply_1(v_toVar_450_, v_e_451_);
return v___x_497_;
}
else
{
lean_object* v___x_498_; uint8_t v___x_499_; 
v___x_498_ = l_Lean_Expr_appFnCleanup___redArg(v___x_495_);
v___x_499_ = l_Lean_Expr_isApp(v___x_498_);
if (v___x_499_ == 0)
{
lean_object* v___x_500_; 
lean_dec_ref(v___x_498_);
lean_dec_ref(v_arg_483_);
lean_dec_ref(v_arg_477_);
lean_dec_ref(v_arg_473_);
lean_dec(v_asVar_460_);
lean_dec_ref(v_inst_459_);
lean_dec_ref(v_inst_458_);
lean_dec_ref(v_inst_457_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec(v_toBind_453_);
lean_dec(v_inst_452_);
v___x_500_ = lean_apply_1(v_toVar_450_, v_e_451_);
return v___x_500_;
}
else
{
lean_object* v___x_501_; lean_object* v___x_502_; uint8_t v___x_503_; 
v___x_501_ = l_Lean_Expr_appFnCleanup___redArg(v___x_498_);
v___x_502_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_503_ = l_Lean_Expr_isConstOf(v___x_501_, v___x_502_);
if (v___x_503_ == 0)
{
lean_object* v___x_504_; uint8_t v___x_505_; 
v___x_504_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19));
v___x_505_ = l_Lean_Expr_isConstOf(v___x_501_, v___x_504_);
if (v___x_505_ == 0)
{
lean_object* v___x_506_; uint8_t v___x_507_; 
v___x_506_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_507_ = l_Lean_Expr_isConstOf(v___x_501_, v___x_506_);
if (v___x_507_ == 0)
{
lean_object* v___x_508_; uint8_t v___x_509_; 
v___x_508_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_509_ = l_Lean_Expr_isConstOf(v___x_501_, v___x_508_);
lean_dec_ref(v___x_501_);
if (v___x_509_ == 0)
{
lean_object* v___x_510_; 
lean_dec_ref(v_arg_483_);
lean_dec_ref(v_arg_477_);
lean_dec_ref(v_arg_473_);
lean_dec(v_asVar_460_);
lean_dec_ref(v_inst_459_);
lean_dec_ref(v_inst_458_);
lean_dec_ref(v_inst_457_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec(v_toBind_453_);
lean_dec(v_inst_452_);
v___x_510_ = lean_apply_1(v_toVar_450_, v_e_451_);
return v___x_510_;
}
else
{
lean_object* v___f_511_; lean_object* v___f_512_; lean_object* v___x_513_; lean_object* v___x_514_; 
lean_inc(v_toBind_453_);
lean_inc(v_asVar_460_);
lean_inc(v_toVar_450_);
lean_inc_ref(v_inst_459_);
lean_inc_ref(v_inst_458_);
lean_inc_ref(v_inst_457_);
lean_inc_ref(v_inst_456_);
lean_inc(v_inst_452_);
v___f_511_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__5), 11, 10);
lean_closure_set(v___f_511_, 0, v_toPure_455_);
lean_closure_set(v___f_511_, 1, v_inst_452_);
lean_closure_set(v___f_511_, 2, v_inst_456_);
lean_closure_set(v___f_511_, 3, v_inst_457_);
lean_closure_set(v___f_511_, 4, v_inst_458_);
lean_closure_set(v___f_511_, 5, v_inst_459_);
lean_closure_set(v___f_511_, 6, v_toVar_450_);
lean_closure_set(v___f_511_, 7, v_asVar_460_);
lean_closure_set(v___f_511_, 8, v_arg_473_);
lean_closure_set(v___f_511_, 9, v_toBind_453_);
lean_inc(v_toBind_453_);
lean_inc_ref(v_inst_459_);
lean_inc_ref(v_inst_458_);
lean_inc_ref(v_inst_457_);
lean_inc_ref(v_inst_456_);
lean_inc(v_inst_452_);
v___f_512_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__6___boxed), 12, 11);
lean_closure_set(v___f_512_, 0, v_asVar_460_);
lean_closure_set(v___f_512_, 1, v_e_451_);
lean_closure_set(v___f_512_, 2, v_inst_452_);
lean_closure_set(v___f_512_, 3, v_inst_456_);
lean_closure_set(v___f_512_, 4, v_inst_457_);
lean_closure_set(v___f_512_, 5, v_inst_458_);
lean_closure_set(v___f_512_, 6, v_inst_459_);
lean_closure_set(v___f_512_, 7, v_toVar_450_);
lean_closure_set(v___f_512_, 8, v_arg_477_);
lean_closure_set(v___f_512_, 9, v_toBind_453_);
lean_closure_set(v___f_512_, 10, v___f_511_);
v___x_513_ = l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg(v_inst_452_, v_inst_456_, v_inst_457_, v_inst_458_, v_inst_459_, v_arg_483_);
v___x_514_ = lean_apply_4(v_toBind_453_, lean_box(0), lean_box(0), v___x_513_, v___f_512_);
return v___x_514_;
}
}
else
{
lean_object* v___f_515_; lean_object* v___f_516_; lean_object* v___x_517_; lean_object* v___x_518_; 
lean_dec_ref(v___x_501_);
lean_inc(v_toBind_453_);
lean_inc(v_asVar_460_);
lean_inc(v_toVar_450_);
lean_inc_ref(v_inst_459_);
lean_inc_ref(v_inst_458_);
lean_inc_ref(v_inst_457_);
lean_inc_ref(v_inst_456_);
lean_inc(v_inst_452_);
v___f_515_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__8), 11, 10);
lean_closure_set(v___f_515_, 0, v_toPure_455_);
lean_closure_set(v___f_515_, 1, v_inst_452_);
lean_closure_set(v___f_515_, 2, v_inst_456_);
lean_closure_set(v___f_515_, 3, v_inst_457_);
lean_closure_set(v___f_515_, 4, v_inst_458_);
lean_closure_set(v___f_515_, 5, v_inst_459_);
lean_closure_set(v___f_515_, 6, v_toVar_450_);
lean_closure_set(v___f_515_, 7, v_asVar_460_);
lean_closure_set(v___f_515_, 8, v_arg_473_);
lean_closure_set(v___f_515_, 9, v_toBind_453_);
lean_inc(v_toBind_453_);
lean_inc_ref(v_inst_459_);
lean_inc_ref(v_inst_458_);
lean_inc_ref(v_inst_457_);
lean_inc_ref(v_inst_456_);
lean_inc(v_inst_452_);
v___f_516_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__6___boxed), 12, 11);
lean_closure_set(v___f_516_, 0, v_asVar_460_);
lean_closure_set(v___f_516_, 1, v_e_451_);
lean_closure_set(v___f_516_, 2, v_inst_452_);
lean_closure_set(v___f_516_, 3, v_inst_456_);
lean_closure_set(v___f_516_, 4, v_inst_457_);
lean_closure_set(v___f_516_, 5, v_inst_458_);
lean_closure_set(v___f_516_, 6, v_inst_459_);
lean_closure_set(v___f_516_, 7, v_toVar_450_);
lean_closure_set(v___f_516_, 8, v_arg_477_);
lean_closure_set(v___f_516_, 9, v_toBind_453_);
lean_closure_set(v___f_516_, 10, v___f_515_);
v___x_517_ = l_Lean_Meta_Grind_Arith_CommRing_isMulInst___redArg(v_inst_452_, v_inst_456_, v_inst_457_, v_inst_458_, v_inst_459_, v_arg_483_);
v___x_518_ = lean_apply_4(v_toBind_453_, lean_box(0), lean_box(0), v___x_517_, v___f_516_);
return v___x_518_;
}
}
else
{
lean_object* v___f_519_; lean_object* v___f_520_; lean_object* v___x_521_; lean_object* v___x_522_; 
lean_dec_ref(v___x_501_);
lean_inc(v_toBind_453_);
lean_inc(v_asVar_460_);
lean_inc(v_toVar_450_);
lean_inc_ref(v_inst_459_);
lean_inc_ref(v_inst_458_);
lean_inc_ref(v_inst_457_);
lean_inc_ref(v_inst_456_);
lean_inc(v_inst_452_);
v___f_519_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__9), 11, 10);
lean_closure_set(v___f_519_, 0, v_toPure_455_);
lean_closure_set(v___f_519_, 1, v_inst_452_);
lean_closure_set(v___f_519_, 2, v_inst_456_);
lean_closure_set(v___f_519_, 3, v_inst_457_);
lean_closure_set(v___f_519_, 4, v_inst_458_);
lean_closure_set(v___f_519_, 5, v_inst_459_);
lean_closure_set(v___f_519_, 6, v_toVar_450_);
lean_closure_set(v___f_519_, 7, v_asVar_460_);
lean_closure_set(v___f_519_, 8, v_arg_473_);
lean_closure_set(v___f_519_, 9, v_toBind_453_);
lean_inc(v_toBind_453_);
lean_inc_ref(v_inst_459_);
lean_inc_ref(v_inst_458_);
lean_inc_ref(v_inst_457_);
lean_inc_ref(v_inst_456_);
lean_inc(v_inst_452_);
v___f_520_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__6___boxed), 12, 11);
lean_closure_set(v___f_520_, 0, v_asVar_460_);
lean_closure_set(v___f_520_, 1, v_e_451_);
lean_closure_set(v___f_520_, 2, v_inst_452_);
lean_closure_set(v___f_520_, 3, v_inst_456_);
lean_closure_set(v___f_520_, 4, v_inst_457_);
lean_closure_set(v___f_520_, 5, v_inst_458_);
lean_closure_set(v___f_520_, 6, v_inst_459_);
lean_closure_set(v___f_520_, 7, v_toVar_450_);
lean_closure_set(v___f_520_, 8, v_arg_477_);
lean_closure_set(v___f_520_, 9, v_toBind_453_);
lean_closure_set(v___f_520_, 10, v___f_519_);
v___x_521_ = l_Lean_Meta_Grind_Arith_CommRing_isSubInst___redArg(v_inst_452_, v_inst_456_, v_inst_457_, v_inst_458_, v_inst_459_, v_arg_483_);
v___x_522_ = lean_apply_4(v_toBind_453_, lean_box(0), lean_box(0), v___x_521_, v___f_520_);
return v___x_522_;
}
}
else
{
lean_object* v___f_523_; lean_object* v___x_524_; lean_object* v___x_525_; lean_object* v___x_526_; 
lean_dec_ref(v___x_501_);
lean_inc(v_toBind_453_);
lean_inc(v_inst_452_);
v___f_523_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__13), 13, 12);
lean_closure_set(v___f_523_, 0, v_toPure_455_);
lean_closure_set(v___f_523_, 1, v_asVar_460_);
lean_closure_set(v___f_523_, 2, v_e_451_);
lean_closure_set(v___f_523_, 3, v_inst_452_);
lean_closure_set(v___f_523_, 4, v_inst_456_);
lean_closure_set(v___f_523_, 5, v_inst_457_);
lean_closure_set(v___f_523_, 6, v_inst_458_);
lean_closure_set(v___f_523_, 7, v_inst_459_);
lean_closure_set(v___f_523_, 8, v_toVar_450_);
lean_closure_set(v___f_523_, 9, v_arg_477_);
lean_closure_set(v___f_523_, 10, v_toBind_453_);
lean_closure_set(v___f_523_, 11, v_arg_483_);
v___x_524_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_524_, 0, v_arg_473_);
v___x_525_ = lean_apply_2(v_inst_452_, lean_box(0), v___x_524_);
v___x_526_ = lean_apply_4(v_toBind_453_, lean_box(0), lean_box(0), v___x_525_, v___f_523_);
return v___x_526_;
}
}
}
}
}
else
{
lean_object* v___f_527_; lean_object* v___x_528_; lean_object* v___x_529_; 
lean_dec_ref(v___x_484_);
lean_dec_ref(v_arg_483_);
lean_dec(v_toPure_455_);
lean_inc(v_toBind_453_);
lean_inc_ref(v_inst_459_);
lean_inc_ref(v_inst_458_);
lean_inc_ref(v_inst_457_);
lean_inc_ref(v_inst_456_);
lean_inc(v_inst_452_);
v___f_527_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__6___boxed), 12, 11);
lean_closure_set(v___f_527_, 0, v_asVar_460_);
lean_closure_set(v___f_527_, 1, v_e_451_);
lean_closure_set(v___f_527_, 2, v_inst_452_);
lean_closure_set(v___f_527_, 3, v_inst_456_);
lean_closure_set(v___f_527_, 4, v_inst_457_);
lean_closure_set(v___f_527_, 5, v_inst_458_);
lean_closure_set(v___f_527_, 6, v_inst_459_);
lean_closure_set(v___f_527_, 7, v_toVar_450_);
lean_closure_set(v___f_527_, 8, v_arg_473_);
lean_closure_set(v___f_527_, 9, v_toBind_453_);
lean_closure_set(v___f_527_, 10, v___f_461_);
v___x_528_ = l_Lean_Meta_Grind_Arith_CommRing_isNegInst___redArg(v_inst_452_, v_inst_456_, v_inst_457_, v_inst_458_, v_inst_459_, v_arg_477_);
v___x_529_ = lean_apply_4(v_toBind_453_, lean_box(0), lean_box(0), v___x_528_, v___f_527_);
return v___x_529_;
}
}
else
{
lean_object* v___f_530_; lean_object* v___x_531_; lean_object* v___x_532_; 
lean_dec_ref(v___x_484_);
lean_dec_ref(v_arg_483_);
lean_dec(v___f_461_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec(v_toVar_450_);
lean_inc(v_toBind_453_);
lean_inc(v_inst_452_);
v___f_530_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__14___boxed), 7, 6);
lean_closure_set(v___f_530_, 0, v_asVar_460_);
lean_closure_set(v___f_530_, 1, v_e_451_);
lean_closure_set(v___f_530_, 2, v_arg_473_);
lean_closure_set(v___f_530_, 3, v_inst_452_);
lean_closure_set(v___f_530_, 4, v_toBind_453_);
lean_closure_set(v___f_530_, 5, v___f_462_);
v___x_531_ = l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___redArg(v_inst_452_, v_inst_457_, v_inst_458_, v_inst_459_, v_arg_477_);
v___x_532_ = lean_apply_4(v_toBind_453_, lean_box(0), lean_box(0), v___x_531_, v___f_530_);
return v___x_532_;
}
}
else
{
lean_object* v___f_533_; lean_object* v___x_534_; lean_object* v___x_535_; 
lean_dec_ref(v___x_484_);
lean_dec_ref(v_arg_483_);
lean_dec(v___f_462_);
lean_dec(v___f_461_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec(v_toVar_450_);
lean_inc(v_toBind_453_);
lean_inc(v_inst_452_);
v___f_533_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__11___boxed), 7, 6);
lean_closure_set(v___f_533_, 0, v_asVar_460_);
lean_closure_set(v___f_533_, 1, v_e_451_);
lean_closure_set(v___f_533_, 2, v_arg_473_);
lean_closure_set(v___f_533_, 3, v_inst_452_);
lean_closure_set(v___f_533_, 4, v_toBind_453_);
lean_closure_set(v___f_533_, 5, v___f_463_);
v___x_534_ = l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___redArg(v_inst_452_, v_inst_457_, v_inst_458_, v_inst_459_, v_arg_477_);
v___x_535_ = lean_apply_4(v_toBind_453_, lean_box(0), lean_box(0), v___x_534_, v___f_533_);
return v___x_535_;
}
}
else
{
lean_dec_ref(v___x_484_);
lean_dec_ref(v_arg_483_);
lean_dec_ref(v_arg_473_);
lean_dec(v___f_463_);
lean_dec(v___f_462_);
lean_dec(v___f_461_);
lean_dec(v_asVar_460_);
lean_dec_ref(v_inst_459_);
lean_dec_ref(v_inst_458_);
lean_dec_ref(v_inst_457_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec_ref(v_e_451_);
lean_dec(v_toVar_450_);
v_n_466_ = v_arg_477_;
goto v___jp_465_;
}
}
}
else
{
lean_dec_ref(v___x_478_);
lean_dec_ref(v_arg_477_);
lean_dec(v___f_463_);
lean_dec(v___f_462_);
lean_dec(v___f_461_);
lean_dec(v_asVar_460_);
lean_dec_ref(v_inst_459_);
lean_dec_ref(v_inst_458_);
lean_dec_ref(v_inst_457_);
lean_dec_ref(v_inst_456_);
lean_dec(v_toPure_455_);
lean_dec_ref(v_e_451_);
lean_dec(v_toVar_450_);
v_n_466_ = v_arg_473_;
goto v___jp_465_;
}
}
}
v___jp_465_:
{
lean_object* v___x_467_; lean_object* v___x_468_; lean_object* v___x_469_; 
v___x_467_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_467_, 0, v_n_466_);
v___x_468_ = lean_apply_2(v_inst_452_, lean_box(0), v___x_467_);
v___x_469_ = lean_apply_4(v_toBind_453_, lean_box(0), lean_box(0), v___x_468_, v___f_454_);
return v___x_469_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(lean_object* v_inst_536_, lean_object* v_inst_537_, lean_object* v_inst_538_, lean_object* v_inst_539_, lean_object* v_inst_540_, lean_object* v_toVar_541_, lean_object* v_asVar_542_, lean_object* v_e_543_){
_start:
{
lean_object* v_toApplicative_544_; lean_object* v_toBind_545_; lean_object* v_toPure_546_; lean_object* v___x_547_; lean_object* v___x_548_; lean_object* v___f_549_; lean_object* v___f_550_; lean_object* v___f_551_; lean_object* v___f_552_; lean_object* v___f_553_; lean_object* v___x_554_; 
v_toApplicative_544_ = lean_ctor_get(v_inst_538_, 0);
v_toBind_545_ = lean_ctor_get(v_inst_538_, 1);
lean_inc(v_toBind_545_);
v_toPure_546_ = lean_ctor_get(v_toApplicative_544_, 1);
lean_inc(v_toPure_546_);
lean_inc_ref(v_e_543_);
v___x_547_ = lean_alloc_closure((void*)(l_Lean_Meta_instantiateMVarsIfMVarApp___boxed), 6, 1);
lean_closure_set(v___x_547_, 0, v_e_543_);
lean_inc(v_inst_536_);
v___x_548_ = lean_apply_2(v_inst_536_, lean_box(0), v___x_547_);
lean_inc_ref(v_e_543_);
lean_inc(v_toVar_541_);
lean_inc(v_toPure_546_);
v___f_549_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__0), 4, 3);
lean_closure_set(v___f_549_, 0, v_toPure_546_);
lean_closure_set(v___f_549_, 1, v_toVar_541_);
lean_closure_set(v___f_549_, 2, v_e_543_);
lean_inc_ref(v_e_543_);
lean_inc(v_toVar_541_);
lean_inc(v_toPure_546_);
v___f_550_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__1), 4, 3);
lean_closure_set(v___f_550_, 0, v_toPure_546_);
lean_closure_set(v___f_550_, 1, v_toVar_541_);
lean_closure_set(v___f_550_, 2, v_e_543_);
lean_inc(v_toPure_546_);
v___f_551_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__2), 2, 1);
lean_closure_set(v___f_551_, 0, v_toPure_546_);
lean_inc_ref(v_e_543_);
lean_inc(v_toVar_541_);
lean_inc(v_toPure_546_);
v___f_552_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__3), 4, 3);
lean_closure_set(v___f_552_, 0, v_toPure_546_);
lean_closure_set(v___f_552_, 1, v_toVar_541_);
lean_closure_set(v___f_552_, 2, v_e_543_);
lean_inc(v_toBind_545_);
v___f_553_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15), 15, 14);
lean_closure_set(v___f_553_, 0, v_toVar_541_);
lean_closure_set(v___f_553_, 1, v_e_543_);
lean_closure_set(v___f_553_, 2, v_inst_536_);
lean_closure_set(v___f_553_, 3, v_toBind_545_);
lean_closure_set(v___f_553_, 4, v___f_552_);
lean_closure_set(v___f_553_, 5, v_toPure_546_);
lean_closure_set(v___f_553_, 6, v_inst_537_);
lean_closure_set(v___f_553_, 7, v_inst_538_);
lean_closure_set(v___f_553_, 8, v_inst_539_);
lean_closure_set(v___f_553_, 9, v_inst_540_);
lean_closure_set(v___f_553_, 10, v_asVar_542_);
lean_closure_set(v___f_553_, 11, v___f_551_);
lean_closure_set(v___f_553_, 12, v___f_550_);
lean_closure_set(v___f_553_, 13, v___f_549_);
v___x_554_ = lean_apply_4(v_toBind_545_, lean_box(0), lean_box(0), v___x_548_, v___f_553_);
return v___x_554_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__5(lean_object* v_toPure_555_, lean_object* v_inst_556_, lean_object* v_inst_557_, lean_object* v_inst_558_, lean_object* v_inst_559_, lean_object* v_inst_560_, lean_object* v_toVar_561_, lean_object* v_asVar_562_, lean_object* v_arg_563_, lean_object* v_toBind_564_, lean_object* v_____do__lift_565_){
_start:
{
lean_object* v___f_566_; lean_object* v___x_567_; lean_object* v___x_568_; 
v___f_566_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__4), 3, 2);
lean_closure_set(v___f_566_, 0, v_____do__lift_565_);
lean_closure_set(v___f_566_, 1, v_toPure_555_);
v___x_567_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(v_inst_556_, v_inst_557_, v_inst_558_, v_inst_559_, v_inst_560_, v_toVar_561_, v_asVar_562_, v_arg_563_);
v___x_568_ = lean_apply_4(v_toBind_564_, lean_box(0), lean_box(0), v___x_567_, v___f_566_);
return v___x_568_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go(lean_object* v_m_569_, lean_object* v_inst_570_, lean_object* v_inst_571_, lean_object* v_inst_572_, lean_object* v_inst_573_, lean_object* v_inst_574_, lean_object* v_toVar_575_, lean_object* v_asVar_576_, lean_object* v_e_577_){
_start:
{
lean_object* v___x_578_; 
v___x_578_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(v_inst_570_, v_inst_571_, v_inst_572_, v_inst_573_, v_inst_574_, v_toVar_575_, v_asVar_576_, v_e_577_);
return v___x_578_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__0(lean_object* v_inst_579_, lean_object* v_inst_580_, lean_object* v_inst_581_, lean_object* v_inst_582_, lean_object* v_e_583_, lean_object* v_____r_584_){
_start:
{
lean_object* v___x_585_; 
v___x_585_ = l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___redArg(v_inst_579_, v_inst_580_, v_inst_581_, v_inst_582_, v_e_583_);
return v___x_585_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__1(lean_object* v_e_586_, lean_object* v_gen_587_, lean_object* v_inst_588_, lean_object* v_toBind_589_, lean_object* v___f_590_, lean_object* v_inst_591_, lean_object* v_inst_592_, lean_object* v_inst_593_, uint8_t v_____do__lift_594_){
_start:
{
if (v_____do__lift_594_ == 0)
{
lean_object* v___x_595_; lean_object* v___x_596_; lean_object* v___x_597_; lean_object* v___x_598_; 
lean_dec(v_inst_593_);
lean_dec_ref(v_inst_592_);
lean_dec_ref(v_inst_591_);
v___x_595_ = lean_box(0);
v___x_596_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_internalize___boxed), 14, 3);
lean_closure_set(v___x_596_, 0, v_e_586_);
lean_closure_set(v___x_596_, 1, v_gen_587_);
lean_closure_set(v___x_596_, 2, v___x_595_);
v___x_597_ = lean_apply_2(v_inst_588_, lean_box(0), v___x_596_);
v___x_598_ = lean_apply_4(v_toBind_589_, lean_box(0), lean_box(0), v___x_597_, v___f_590_);
return v___x_598_;
}
else
{
lean_object* v___x_599_; 
lean_dec(v___f_590_);
lean_dec(v_toBind_589_);
lean_dec(v_gen_587_);
v___x_599_ = l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___redArg(v_inst_588_, v_inst_591_, v_inst_592_, v_inst_593_, v_e_586_);
return v___x_599_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__1___boxed(lean_object* v_e_600_, lean_object* v_gen_601_, lean_object* v_inst_602_, lean_object* v_toBind_603_, lean_object* v___f_604_, lean_object* v_inst_605_, lean_object* v_inst_606_, lean_object* v_inst_607_, lean_object* v_____do__lift_608_){
_start:
{
uint8_t v_____do__lift_5086__boxed_609_; lean_object* v_res_610_; 
v_____do__lift_5086__boxed_609_ = lean_unbox(v_____do__lift_608_);
v_res_610_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__1(v_e_600_, v_gen_601_, v_inst_602_, v_toBind_603_, v___f_604_, v_inst_605_, v_inst_606_, v_inst_607_, v_____do__lift_5086__boxed_609_);
return v_res_610_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__2(lean_object* v_inst_611_, lean_object* v_inst_612_, lean_object* v_inst_613_, lean_object* v_inst_614_, lean_object* v_gen_615_, lean_object* v_toBind_616_, lean_object* v_e_617_){
_start:
{
lean_object* v___f_618_; lean_object* v___f_619_; lean_object* v___x_620_; lean_object* v___x_621_; lean_object* v___x_622_; 
lean_inc_ref(v_e_617_);
lean_inc(v_inst_614_);
lean_inc_ref(v_inst_613_);
lean_inc_ref(v_inst_612_);
lean_inc(v_inst_611_);
v___f_618_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__0), 6, 5);
lean_closure_set(v___f_618_, 0, v_inst_611_);
lean_closure_set(v___f_618_, 1, v_inst_612_);
lean_closure_set(v___f_618_, 2, v_inst_613_);
lean_closure_set(v___f_618_, 3, v_inst_614_);
lean_closure_set(v___f_618_, 4, v_e_617_);
lean_inc(v_toBind_616_);
lean_inc(v_inst_611_);
lean_inc_ref(v_e_617_);
v___f_619_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__1___boxed), 9, 8);
lean_closure_set(v___f_619_, 0, v_e_617_);
lean_closure_set(v___f_619_, 1, v_gen_615_);
lean_closure_set(v___f_619_, 2, v_inst_611_);
lean_closure_set(v___f_619_, 3, v_toBind_616_);
lean_closure_set(v___f_619_, 4, v___f_618_);
lean_closure_set(v___f_619_, 5, v_inst_612_);
lean_closure_set(v___f_619_, 6, v_inst_613_);
lean_closure_set(v___f_619_, 7, v_inst_614_);
v___x_620_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_alreadyInternalized___boxed), 12, 1);
lean_closure_set(v___x_620_, 0, v_e_617_);
v___x_621_ = lean_apply_2(v_inst_611_, lean_box(0), v___x_620_);
v___x_622_ = lean_apply_4(v_toBind_616_, lean_box(0), lean_box(0), v___x_621_, v___f_619_);
return v___x_622_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__3(lean_object* v_toPure_623_, lean_object* v_____do__lift_624_){
_start:
{
lean_object* v___x_625_; lean_object* v___x_626_; lean_object* v___x_627_; 
v___x_625_ = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(v___x_625_, 0, v_____do__lift_624_);
v___x_626_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_626_, 0, v___x_625_);
v___x_627_ = lean_apply_2(v_toPure_623_, lean_box(0), v___x_626_);
return v___x_627_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__4(lean_object* v_toPure_628_, lean_object* v_____do__lift_629_){
_start:
{
lean_object* v___x_630_; lean_object* v___x_631_; 
v___x_630_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_630_, 0, v_____do__lift_629_);
v___x_631_ = lean_apply_2(v_toPure_628_, lean_box(0), v___x_630_);
return v___x_631_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__5(lean_object* v_toPure_632_, lean_object* v_____do__lift_633_){
_start:
{
lean_object* v___x_634_; lean_object* v___x_635_; 
v___x_634_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_634_, 0, v_____do__lift_633_);
v___x_635_ = lean_apply_2(v_toPure_632_, lean_box(0), v___x_634_);
return v___x_635_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__6(lean_object* v_mkVar_636_, lean_object* v_e_637_, lean_object* v_toBind_638_, lean_object* v___f_639_, lean_object* v_____r_640_){
_start:
{
lean_object* v___x_641_; lean_object* v___x_642_; 
v___x_641_ = lean_apply_1(v_mkVar_636_, v_e_637_);
v___x_642_ = lean_apply_4(v_toBind_638_, lean_box(0), lean_box(0), v___x_641_, v___f_639_);
return v___x_642_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__7(lean_object* v_mkVar_643_, lean_object* v_toBind_644_, lean_object* v___f_645_, lean_object* v_inst_646_, lean_object* v_e_647_){
_start:
{
lean_object* v___f_648_; lean_object* v___x_649_; lean_object* v___x_650_; lean_object* v___x_651_; 
lean_inc(v_toBind_644_);
lean_inc_ref(v_e_647_);
v___f_648_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__6), 5, 4);
lean_closure_set(v___f_648_, 0, v_mkVar_643_);
lean_closure_set(v___f_648_, 1, v_e_647_);
lean_closure_set(v___f_648_, 2, v_toBind_644_);
lean_closure_set(v___f_648_, 3, v___f_645_);
v___x_649_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___boxed), 12, 1);
lean_closure_set(v___x_649_, 0, v_e_647_);
v___x_650_ = lean_apply_2(v_inst_646_, lean_box(0), v___x_649_);
v___x_651_ = lean_apply_4(v_toBind_644_, lean_box(0), lean_box(0), v___x_650_, v___f_648_);
return v___x_651_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__9(lean_object* v_mkVar_652_, lean_object* v_toBind_653_, lean_object* v___f_654_, lean_object* v_e_655_){
_start:
{
lean_object* v___x_656_; lean_object* v___x_657_; 
v___x_656_ = lean_apply_1(v_mkVar_652_, v_e_655_);
v___x_657_ = lean_apply_4(v_toBind_653_, lean_box(0), lean_box(0), v___x_656_, v___f_654_);
return v___x_657_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__8(uint8_t v_skipVar_658_, lean_object* v_toVar_659_, lean_object* v_toBind_660_, lean_object* v___f_661_, lean_object* v_toPure_662_, lean_object* v_e_663_){
_start:
{
if (v_skipVar_658_ == 0)
{
lean_object* v___x_664_; lean_object* v___x_665_; 
lean_dec(v_toPure_662_);
v___x_664_ = lean_apply_1(v_toVar_659_, v_e_663_);
v___x_665_ = lean_apply_4(v_toBind_660_, lean_box(0), lean_box(0), v___x_664_, v___f_661_);
return v___x_665_;
}
else
{
lean_object* v___x_666_; lean_object* v___x_667_; 
lean_dec_ref(v_e_663_);
lean_dec(v___f_661_);
lean_dec(v_toBind_660_);
lean_dec(v_toVar_659_);
v___x_666_ = lean_box(0);
v___x_667_ = lean_apply_2(v_toPure_662_, lean_box(0), v___x_666_);
return v___x_667_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__8___boxed(lean_object* v_skipVar_668_, lean_object* v_toVar_669_, lean_object* v_toBind_670_, lean_object* v___f_671_, lean_object* v_toPure_672_, lean_object* v_e_673_){
_start:
{
uint8_t v_skipVar_boxed_674_; lean_object* v_res_675_; 
v_skipVar_boxed_674_ = lean_unbox(v_skipVar_668_);
v_res_675_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__8(v_skipVar_boxed_674_, v_toVar_669_, v_toBind_670_, v___f_671_, v_toPure_672_, v_e_673_);
return v_res_675_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__10(lean_object* v_toPure_676_, lean_object* v_toTopVar_677_, lean_object* v_e_678_, lean_object* v_____x_679_){
_start:
{
if (lean_obj_tag(v_____x_679_) == 1)
{
lean_object* v_val_680_; lean_object* v___x_682_; uint8_t v_isShared_683_; uint8_t v_isSharedCheck_689_; 
lean_dec_ref(v_e_678_);
lean_dec(v_toTopVar_677_);
v_val_680_ = lean_ctor_get(v_____x_679_, 0);
v_isSharedCheck_689_ = !lean_is_exclusive(v_____x_679_);
if (v_isSharedCheck_689_ == 0)
{
v___x_682_ = v_____x_679_;
v_isShared_683_ = v_isSharedCheck_689_;
goto v_resetjp_681_;
}
else
{
lean_inc(v_val_680_);
lean_dec(v_____x_679_);
v___x_682_ = lean_box(0);
v_isShared_683_ = v_isSharedCheck_689_;
goto v_resetjp_681_;
}
v_resetjp_681_:
{
lean_object* v___x_684_; lean_object* v___x_686_; 
v___x_684_ = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(v___x_684_, 0, v_val_680_);
if (v_isShared_683_ == 0)
{
lean_ctor_set(v___x_682_, 0, v___x_684_);
v___x_686_ = v___x_682_;
goto v_reusejp_685_;
}
else
{
lean_object* v_reuseFailAlloc_688_; 
v_reuseFailAlloc_688_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_688_, 0, v___x_684_);
v___x_686_ = v_reuseFailAlloc_688_;
goto v_reusejp_685_;
}
v_reusejp_685_:
{
lean_object* v___x_687_; 
v___x_687_ = lean_apply_2(v_toPure_676_, lean_box(0), v___x_686_);
return v___x_687_;
}
}
}
else
{
lean_object* v___x_690_; 
lean_dec(v_____x_679_);
lean_dec(v_toPure_676_);
v___x_690_ = lean_apply_1(v_toTopVar_677_, v_e_678_);
return v___x_690_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__11(lean_object* v_toPure_691_, lean_object* v_toTopVar_692_, lean_object* v_e_693_, lean_object* v_____x_694_){
_start:
{
if (lean_obj_tag(v_____x_694_) == 1)
{
lean_object* v_val_695_; lean_object* v___x_697_; uint8_t v_isShared_698_; uint8_t v_isSharedCheck_704_; 
lean_dec_ref(v_e_693_);
lean_dec(v_toTopVar_692_);
v_val_695_ = lean_ctor_get(v_____x_694_, 0);
v_isSharedCheck_704_ = !lean_is_exclusive(v_____x_694_);
if (v_isSharedCheck_704_ == 0)
{
v___x_697_ = v_____x_694_;
v_isShared_698_ = v_isSharedCheck_704_;
goto v_resetjp_696_;
}
else
{
lean_inc(v_val_695_);
lean_dec(v_____x_694_);
v___x_697_ = lean_box(0);
v_isShared_698_ = v_isSharedCheck_704_;
goto v_resetjp_696_;
}
v_resetjp_696_:
{
lean_object* v___x_699_; lean_object* v___x_701_; 
v___x_699_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_699_, 0, v_val_695_);
if (v_isShared_698_ == 0)
{
lean_ctor_set(v___x_697_, 0, v___x_699_);
v___x_701_ = v___x_697_;
goto v_reusejp_700_;
}
else
{
lean_object* v_reuseFailAlloc_703_; 
v_reuseFailAlloc_703_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_703_, 0, v___x_699_);
v___x_701_ = v_reuseFailAlloc_703_;
goto v_reusejp_700_;
}
v_reusejp_700_:
{
lean_object* v___x_702_; 
v___x_702_ = lean_apply_2(v_toPure_691_, lean_box(0), v___x_701_);
return v___x_702_;
}
}
}
else
{
lean_object* v___x_705_; 
lean_dec(v_____x_694_);
lean_dec(v_toPure_691_);
v___x_705_ = lean_apply_1(v_toTopVar_692_, v_e_693_);
return v___x_705_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__12(lean_object* v_toTopVar_706_, lean_object* v_e_707_, lean_object* v_____r_708_){
_start:
{
lean_object* v___x_709_; 
v___x_709_ = lean_apply_1(v_toTopVar_706_, v_e_707_);
return v___x_709_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__13(lean_object* v_toTopVar_710_, lean_object* v_inst_711_, lean_object* v_toBind_712_, lean_object* v_e_713_){
_start:
{
lean_object* v___f_714_; lean_object* v___x_715_; lean_object* v___x_716_; lean_object* v___x_717_; 
lean_inc_ref(v_e_713_);
v___f_714_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__12), 3, 2);
lean_closure_set(v___f_714_, 0, v_toTopVar_710_);
lean_closure_set(v___f_714_, 1, v_e_713_);
v___x_715_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___boxed), 12, 1);
lean_closure_set(v___x_715_, 0, v_e_713_);
v___x_716_ = lean_apply_2(v_inst_711_, lean_box(0), v___x_715_);
v___x_717_ = lean_apply_4(v_toBind_712_, lean_box(0), lean_box(0), v___x_716_, v___f_714_);
return v___x_717_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__14(lean_object* v_toPure_718_, lean_object* v_asTopVar_719_, lean_object* v_e_720_, lean_object* v_____x_721_){
_start:
{
if (lean_obj_tag(v_____x_721_) == 1)
{
lean_object* v_val_722_; lean_object* v___x_724_; uint8_t v_isShared_725_; uint8_t v_isSharedCheck_732_; 
lean_dec_ref(v_e_720_);
lean_dec(v_asTopVar_719_);
v_val_722_ = lean_ctor_get(v_____x_721_, 0);
v_isSharedCheck_732_ = !lean_is_exclusive(v_____x_721_);
if (v_isSharedCheck_732_ == 0)
{
v___x_724_ = v_____x_721_;
v_isShared_725_ = v_isSharedCheck_732_;
goto v_resetjp_723_;
}
else
{
lean_inc(v_val_722_);
lean_dec(v_____x_721_);
v___x_724_ = lean_box(0);
v_isShared_725_ = v_isSharedCheck_732_;
goto v_resetjp_723_;
}
v_resetjp_723_:
{
lean_object* v___x_726_; lean_object* v___x_727_; lean_object* v___x_729_; 
v___x_726_ = lean_nat_to_int(v_val_722_);
v___x_727_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_727_, 0, v___x_726_);
if (v_isShared_725_ == 0)
{
lean_ctor_set(v___x_724_, 0, v___x_727_);
v___x_729_ = v___x_724_;
goto v_reusejp_728_;
}
else
{
lean_object* v_reuseFailAlloc_731_; 
v_reuseFailAlloc_731_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_731_, 0, v___x_727_);
v___x_729_ = v_reuseFailAlloc_731_;
goto v_reusejp_728_;
}
v_reusejp_728_:
{
lean_object* v___x_730_; 
v___x_730_ = lean_apply_2(v_toPure_718_, lean_box(0), v___x_729_);
return v___x_730_;
}
}
}
else
{
lean_object* v___x_733_; 
lean_dec(v_____x_721_);
lean_dec(v_toPure_718_);
v___x_733_ = lean_apply_1(v_asTopVar_719_, v_e_720_);
return v___x_733_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__15(lean_object* v_____do__lift_734_, lean_object* v_toPure_735_, lean_object* v_____do__lift_736_){
_start:
{
lean_object* v___x_737_; lean_object* v___x_738_; lean_object* v___x_739_; 
v___x_737_ = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(v___x_737_, 0, v_____do__lift_734_);
lean_ctor_set(v___x_737_, 1, v_____do__lift_736_);
v___x_738_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_738_, 0, v___x_737_);
v___x_739_ = lean_apply_2(v_toPure_735_, lean_box(0), v___x_738_);
return v___x_739_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__16(lean_object* v_toPure_740_, lean_object* v_inst_741_, lean_object* v_inst_742_, lean_object* v_inst_743_, lean_object* v_inst_744_, lean_object* v_inst_745_, lean_object* v_toVar_746_, lean_object* v_asVar_747_, lean_object* v_arg_748_, lean_object* v_toBind_749_, lean_object* v_____do__lift_750_){
_start:
{
lean_object* v___f_751_; lean_object* v___x_752_; lean_object* v___x_753_; 
v___f_751_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__15), 3, 2);
lean_closure_set(v___f_751_, 0, v_____do__lift_750_);
lean_closure_set(v___f_751_, 1, v_toPure_740_);
v___x_752_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(v_inst_741_, v_inst_742_, v_inst_743_, v_inst_744_, v_inst_745_, v_toVar_746_, v_asVar_747_, v_arg_748_);
v___x_753_ = lean_apply_4(v_toBind_749_, lean_box(0), lean_box(0), v___x_752_, v___f_751_);
return v___x_753_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__17(lean_object* v_asTopVar_754_, lean_object* v_e_755_, lean_object* v_inst_756_, lean_object* v_inst_757_, lean_object* v_inst_758_, lean_object* v_inst_759_, lean_object* v_inst_760_, lean_object* v_toVar_761_, lean_object* v_asVar_762_, lean_object* v_arg_763_, lean_object* v_toBind_764_, lean_object* v___f_765_, uint8_t v_____do__lift_766_){
_start:
{
if (v_____do__lift_766_ == 0)
{
lean_object* v___x_767_; 
lean_dec(v___f_765_);
lean_dec(v_toBind_764_);
lean_dec_ref(v_arg_763_);
lean_dec(v_asVar_762_);
lean_dec(v_toVar_761_);
lean_dec_ref(v_inst_760_);
lean_dec_ref(v_inst_759_);
lean_dec_ref(v_inst_758_);
lean_dec_ref(v_inst_757_);
lean_dec(v_inst_756_);
v___x_767_ = lean_apply_1(v_asTopVar_754_, v_e_755_);
return v___x_767_;
}
else
{
lean_object* v___x_768_; lean_object* v___x_769_; 
lean_dec_ref(v_e_755_);
lean_dec(v_asTopVar_754_);
v___x_768_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(v_inst_756_, v_inst_757_, v_inst_758_, v_inst_759_, v_inst_760_, v_toVar_761_, v_asVar_762_, v_arg_763_);
v___x_769_ = lean_apply_4(v_toBind_764_, lean_box(0), lean_box(0), v___x_768_, v___f_765_);
return v___x_769_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__17___boxed(lean_object* v_asTopVar_770_, lean_object* v_e_771_, lean_object* v_inst_772_, lean_object* v_inst_773_, lean_object* v_inst_774_, lean_object* v_inst_775_, lean_object* v_inst_776_, lean_object* v_toVar_777_, lean_object* v_asVar_778_, lean_object* v_arg_779_, lean_object* v_toBind_780_, lean_object* v___f_781_, lean_object* v_____do__lift_782_){
_start:
{
uint8_t v_____do__lift_5309__boxed_783_; lean_object* v_res_784_; 
v_____do__lift_5309__boxed_783_ = lean_unbox(v_____do__lift_782_);
v_res_784_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__17(v_asTopVar_770_, v_e_771_, v_inst_772_, v_inst_773_, v_inst_774_, v_inst_775_, v_inst_776_, v_toVar_777_, v_asVar_778_, v_arg_779_, v_toBind_780_, v___f_781_, v_____do__lift_5309__boxed_783_);
return v_res_784_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__18(lean_object* v_____do__lift_785_, lean_object* v_toPure_786_, lean_object* v_____do__lift_787_){
_start:
{
lean_object* v___x_788_; lean_object* v___x_789_; lean_object* v___x_790_; 
v___x_788_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_788_, 0, v_____do__lift_785_);
lean_ctor_set(v___x_788_, 1, v_____do__lift_787_);
v___x_789_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_789_, 0, v___x_788_);
v___x_790_ = lean_apply_2(v_toPure_786_, lean_box(0), v___x_789_);
return v___x_790_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__19(lean_object* v_toPure_791_, lean_object* v_inst_792_, lean_object* v_inst_793_, lean_object* v_inst_794_, lean_object* v_inst_795_, lean_object* v_inst_796_, lean_object* v_toVar_797_, lean_object* v_asVar_798_, lean_object* v_arg_799_, lean_object* v_toBind_800_, lean_object* v_____do__lift_801_){
_start:
{
lean_object* v___f_802_; lean_object* v___x_803_; lean_object* v___x_804_; 
v___f_802_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__18), 3, 2);
lean_closure_set(v___f_802_, 0, v_____do__lift_801_);
lean_closure_set(v___f_802_, 1, v_toPure_791_);
v___x_803_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(v_inst_792_, v_inst_793_, v_inst_794_, v_inst_795_, v_inst_796_, v_toVar_797_, v_asVar_798_, v_arg_799_);
v___x_804_ = lean_apply_4(v_toBind_800_, lean_box(0), lean_box(0), v___x_803_, v___f_802_);
return v___x_804_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__21(lean_object* v_____do__lift_805_, lean_object* v_toPure_806_, lean_object* v_____do__lift_807_){
_start:
{
lean_object* v___x_808_; lean_object* v___x_809_; lean_object* v___x_810_; 
v___x_808_ = lean_alloc_ctor(6, 2, 0);
lean_ctor_set(v___x_808_, 0, v_____do__lift_805_);
lean_ctor_set(v___x_808_, 1, v_____do__lift_807_);
v___x_809_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_809_, 0, v___x_808_);
v___x_810_ = lean_apply_2(v_toPure_806_, lean_box(0), v___x_809_);
return v___x_810_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__20(lean_object* v_toPure_811_, lean_object* v_inst_812_, lean_object* v_inst_813_, lean_object* v_inst_814_, lean_object* v_inst_815_, lean_object* v_inst_816_, lean_object* v_toVar_817_, lean_object* v_asVar_818_, lean_object* v_arg_819_, lean_object* v_toBind_820_, lean_object* v_____do__lift_821_){
_start:
{
lean_object* v___f_822_; lean_object* v___x_823_; lean_object* v___x_824_; 
v___f_822_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__21), 3, 2);
lean_closure_set(v___f_822_, 0, v_____do__lift_821_);
lean_closure_set(v___f_822_, 1, v_toPure_811_);
v___x_823_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg(v_inst_812_, v_inst_813_, v_inst_814_, v_inst_815_, v_inst_816_, v_toVar_817_, v_asVar_818_, v_arg_819_);
v___x_824_ = lean_apply_4(v_toBind_820_, lean_box(0), lean_box(0), v___x_823_, v___f_822_);
return v___x_824_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__23(lean_object* v_val_825_, lean_object* v_toPure_826_, lean_object* v_____do__lift_827_){
_start:
{
lean_object* v___x_828_; lean_object* v___x_829_; lean_object* v___x_830_; 
v___x_828_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_828_, 0, v_____do__lift_827_);
lean_ctor_set(v___x_828_, 1, v_val_825_);
v___x_829_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_829_, 0, v___x_828_);
v___x_830_ = lean_apply_2(v_toPure_826_, lean_box(0), v___x_829_);
return v___x_830_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__24(lean_object* v_toPure_831_, lean_object* v_asTopVar_832_, lean_object* v_e_833_, lean_object* v_inst_834_, lean_object* v_inst_835_, lean_object* v_inst_836_, lean_object* v_inst_837_, lean_object* v_inst_838_, lean_object* v_toVar_839_, lean_object* v_asVar_840_, lean_object* v_arg_841_, lean_object* v_toBind_842_, lean_object* v_arg_843_, lean_object* v_____x_844_){
_start:
{
if (lean_obj_tag(v_____x_844_) == 1)
{
lean_object* v_val_845_; lean_object* v___f_846_; lean_object* v___f_847_; lean_object* v___x_848_; lean_object* v___x_849_; 
v_val_845_ = lean_ctor_get(v_____x_844_, 0);
lean_inc(v_val_845_);
lean_dec_ref(v_____x_844_);
v___f_846_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__23), 3, 2);
lean_closure_set(v___f_846_, 0, v_val_845_);
lean_closure_set(v___f_846_, 1, v_toPure_831_);
lean_inc(v_toBind_842_);
lean_inc_ref(v_inst_838_);
lean_inc_ref(v_inst_837_);
lean_inc_ref(v_inst_836_);
lean_inc_ref(v_inst_835_);
lean_inc(v_inst_834_);
v___f_847_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__17___boxed), 13, 12);
lean_closure_set(v___f_847_, 0, v_asTopVar_832_);
lean_closure_set(v___f_847_, 1, v_e_833_);
lean_closure_set(v___f_847_, 2, v_inst_834_);
lean_closure_set(v___f_847_, 3, v_inst_835_);
lean_closure_set(v___f_847_, 4, v_inst_836_);
lean_closure_set(v___f_847_, 5, v_inst_837_);
lean_closure_set(v___f_847_, 6, v_inst_838_);
lean_closure_set(v___f_847_, 7, v_toVar_839_);
lean_closure_set(v___f_847_, 8, v_asVar_840_);
lean_closure_set(v___f_847_, 9, v_arg_841_);
lean_closure_set(v___f_847_, 10, v_toBind_842_);
lean_closure_set(v___f_847_, 11, v___f_846_);
v___x_848_ = l_Lean_Meta_Grind_Arith_CommRing_isPowInst___redArg(v_inst_834_, v_inst_835_, v_inst_836_, v_inst_837_, v_inst_838_, v_arg_843_);
v___x_849_ = lean_apply_4(v_toBind_842_, lean_box(0), lean_box(0), v___x_848_, v___f_847_);
return v___x_849_;
}
else
{
lean_object* v___x_850_; 
lean_dec(v_____x_844_);
lean_dec_ref(v_arg_843_);
lean_dec(v_toBind_842_);
lean_dec_ref(v_arg_841_);
lean_dec(v_asVar_840_);
lean_dec(v_toVar_839_);
lean_dec_ref(v_inst_838_);
lean_dec_ref(v_inst_837_);
lean_dec_ref(v_inst_836_);
lean_dec_ref(v_inst_835_);
lean_dec(v_inst_834_);
lean_dec(v_toPure_831_);
v___x_850_ = lean_apply_1(v_asTopVar_832_, v_e_833_);
return v___x_850_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__25(lean_object* v_asTopVar_851_, lean_object* v_e_852_, lean_object* v_arg_853_, lean_object* v_inst_854_, lean_object* v_toBind_855_, lean_object* v___f_856_, uint8_t v_____do__lift_857_){
_start:
{
if (v_____do__lift_857_ == 0)
{
lean_object* v___x_858_; 
lean_dec(v___f_856_);
lean_dec(v_toBind_855_);
lean_dec(v_inst_854_);
lean_dec_ref(v_arg_853_);
v___x_858_ = lean_apply_1(v_asTopVar_851_, v_e_852_);
return v___x_858_;
}
else
{
lean_object* v___x_859_; lean_object* v___x_860_; lean_object* v___x_861_; 
lean_dec_ref(v_e_852_);
lean_dec(v_asTopVar_851_);
v___x_859_ = lean_alloc_closure((void*)(l_Lean_Meta_getIntValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_859_, 0, v_arg_853_);
v___x_860_ = lean_apply_2(v_inst_854_, lean_box(0), v___x_859_);
v___x_861_ = lean_apply_4(v_toBind_855_, lean_box(0), lean_box(0), v___x_860_, v___f_856_);
return v___x_861_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__25___boxed(lean_object* v_asTopVar_862_, lean_object* v_e_863_, lean_object* v_arg_864_, lean_object* v_inst_865_, lean_object* v_toBind_866_, lean_object* v___f_867_, lean_object* v_____do__lift_868_){
_start:
{
uint8_t v_____do__lift_5433__boxed_869_; lean_object* v_res_870_; 
v_____do__lift_5433__boxed_869_ = lean_unbox(v_____do__lift_868_);
v_res_870_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__25(v_asTopVar_862_, v_e_863_, v_arg_864_, v_inst_865_, v_toBind_866_, v___f_867_, v_____do__lift_5433__boxed_869_);
return v_res_870_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__22(lean_object* v_asTopVar_871_, lean_object* v_e_872_, lean_object* v_arg_873_, lean_object* v_inst_874_, lean_object* v_toBind_875_, lean_object* v___f_876_, uint8_t v_____do__lift_877_){
_start:
{
if (v_____do__lift_877_ == 0)
{
lean_object* v___x_878_; 
lean_dec(v___f_876_);
lean_dec(v_toBind_875_);
lean_dec(v_inst_874_);
lean_dec_ref(v_arg_873_);
v___x_878_ = lean_apply_1(v_asTopVar_871_, v_e_872_);
return v___x_878_;
}
else
{
lean_object* v___x_879_; lean_object* v___x_880_; lean_object* v___x_881_; 
lean_dec_ref(v_e_872_);
lean_dec(v_asTopVar_871_);
v___x_879_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_879_, 0, v_arg_873_);
v___x_880_ = lean_apply_2(v_inst_874_, lean_box(0), v___x_879_);
v___x_881_ = lean_apply_4(v_toBind_875_, lean_box(0), lean_box(0), v___x_880_, v___f_876_);
return v___x_881_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__22___boxed(lean_object* v_asTopVar_882_, lean_object* v_e_883_, lean_object* v_arg_884_, lean_object* v_inst_885_, lean_object* v_toBind_886_, lean_object* v___f_887_, lean_object* v_____do__lift_888_){
_start:
{
uint8_t v_____do__lift_5453__boxed_889_; lean_object* v_res_890_; 
v_____do__lift_5453__boxed_889_ = lean_unbox(v_____do__lift_888_);
v_res_890_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__22(v_asTopVar_882_, v_e_883_, v_arg_884_, v_inst_885_, v_toBind_886_, v___f_887_, v_____do__lift_5453__boxed_889_);
return v_res_890_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__26(lean_object* v_toTopVar_891_, lean_object* v_e_892_, lean_object* v_toPure_893_, lean_object* v_inst_894_, lean_object* v_inst_895_, lean_object* v_inst_896_, lean_object* v_inst_897_, lean_object* v_inst_898_, lean_object* v_toVar_899_, lean_object* v_asVar_900_, lean_object* v_toBind_901_, lean_object* v_asTopVar_902_, lean_object* v___f_903_, lean_object* v___f_904_, lean_object* v___f_905_, lean_object* v___f_906_, lean_object* v_____x_907_){
_start:
{
lean_object* v___x_908_; uint8_t v___x_909_; 
v___x_908_ = l_Lean_Expr_cleanupAnnotations(v_____x_907_);
v___x_909_ = l_Lean_Expr_isApp(v___x_908_);
if (v___x_909_ == 0)
{
lean_object* v___x_910_; 
lean_dec_ref(v___x_908_);
lean_dec(v___f_906_);
lean_dec(v___f_905_);
lean_dec(v___f_904_);
lean_dec(v___f_903_);
lean_dec(v_asTopVar_902_);
lean_dec(v_toBind_901_);
lean_dec(v_asVar_900_);
lean_dec(v_toVar_899_);
lean_dec_ref(v_inst_898_);
lean_dec_ref(v_inst_897_);
lean_dec_ref(v_inst_896_);
lean_dec_ref(v_inst_895_);
lean_dec(v_inst_894_);
lean_dec(v_toPure_893_);
v___x_910_ = lean_apply_1(v_toTopVar_891_, v_e_892_);
return v___x_910_;
}
else
{
lean_object* v_arg_911_; lean_object* v___x_912_; uint8_t v___x_913_; 
v_arg_911_ = lean_ctor_get(v___x_908_, 1);
lean_inc_ref(v_arg_911_);
v___x_912_ = l_Lean_Expr_appFnCleanup___redArg(v___x_908_);
v___x_913_ = l_Lean_Expr_isApp(v___x_912_);
if (v___x_913_ == 0)
{
lean_object* v___x_914_; 
lean_dec_ref(v___x_912_);
lean_dec_ref(v_arg_911_);
lean_dec(v___f_906_);
lean_dec(v___f_905_);
lean_dec(v___f_904_);
lean_dec(v___f_903_);
lean_dec(v_asTopVar_902_);
lean_dec(v_toBind_901_);
lean_dec(v_asVar_900_);
lean_dec(v_toVar_899_);
lean_dec_ref(v_inst_898_);
lean_dec_ref(v_inst_897_);
lean_dec_ref(v_inst_896_);
lean_dec_ref(v_inst_895_);
lean_dec(v_inst_894_);
lean_dec(v_toPure_893_);
v___x_914_ = lean_apply_1(v_toTopVar_891_, v_e_892_);
return v___x_914_;
}
else
{
lean_object* v_arg_915_; lean_object* v___x_916_; uint8_t v___x_917_; 
v_arg_915_ = lean_ctor_get(v___x_912_, 1);
lean_inc_ref(v_arg_915_);
v___x_916_ = l_Lean_Expr_appFnCleanup___redArg(v___x_912_);
v___x_917_ = l_Lean_Expr_isApp(v___x_916_);
if (v___x_917_ == 0)
{
lean_object* v___x_918_; 
lean_dec_ref(v___x_916_);
lean_dec_ref(v_arg_915_);
lean_dec_ref(v_arg_911_);
lean_dec(v___f_906_);
lean_dec(v___f_905_);
lean_dec(v___f_904_);
lean_dec(v___f_903_);
lean_dec(v_asTopVar_902_);
lean_dec(v_toBind_901_);
lean_dec(v_asVar_900_);
lean_dec(v_toVar_899_);
lean_dec_ref(v_inst_898_);
lean_dec_ref(v_inst_897_);
lean_dec_ref(v_inst_896_);
lean_dec_ref(v_inst_895_);
lean_dec(v_inst_894_);
lean_dec(v_toPure_893_);
v___x_918_ = lean_apply_1(v_toTopVar_891_, v_e_892_);
return v___x_918_;
}
else
{
lean_object* v_arg_919_; lean_object* v___x_920_; lean_object* v___x_921_; uint8_t v___x_922_; 
v_arg_919_ = lean_ctor_get(v___x_916_, 1);
lean_inc_ref(v_arg_919_);
v___x_920_ = l_Lean_Expr_appFnCleanup___redArg(v___x_916_);
v___x_921_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_922_ = l_Lean_Expr_isConstOf(v___x_920_, v___x_921_);
if (v___x_922_ == 0)
{
lean_object* v___x_923_; uint8_t v___x_924_; 
lean_dec(v___f_906_);
v___x_923_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_924_ = l_Lean_Expr_isConstOf(v___x_920_, v___x_923_);
if (v___x_924_ == 0)
{
lean_object* v___x_925_; uint8_t v___x_926_; 
lean_dec(v___f_905_);
v___x_925_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10));
v___x_926_ = l_Lean_Expr_isConstOf(v___x_920_, v___x_925_);
if (v___x_926_ == 0)
{
lean_object* v___x_927_; uint8_t v___x_928_; 
lean_dec(v___f_904_);
v___x_927_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13));
v___x_928_ = l_Lean_Expr_isConstOf(v___x_920_, v___x_927_);
if (v___x_928_ == 0)
{
uint8_t v___x_929_; 
lean_dec(v___f_903_);
v___x_929_ = l_Lean_Expr_isApp(v___x_920_);
if (v___x_929_ == 0)
{
lean_object* v___x_930_; 
lean_dec_ref(v___x_920_);
lean_dec_ref(v_arg_919_);
lean_dec_ref(v_arg_915_);
lean_dec_ref(v_arg_911_);
lean_dec(v_asTopVar_902_);
lean_dec(v_toBind_901_);
lean_dec(v_asVar_900_);
lean_dec(v_toVar_899_);
lean_dec_ref(v_inst_898_);
lean_dec_ref(v_inst_897_);
lean_dec_ref(v_inst_896_);
lean_dec_ref(v_inst_895_);
lean_dec(v_inst_894_);
lean_dec(v_toPure_893_);
v___x_930_ = lean_apply_1(v_toTopVar_891_, v_e_892_);
return v___x_930_;
}
else
{
lean_object* v___x_931_; uint8_t v___x_932_; 
v___x_931_ = l_Lean_Expr_appFnCleanup___redArg(v___x_920_);
v___x_932_ = l_Lean_Expr_isApp(v___x_931_);
if (v___x_932_ == 0)
{
lean_object* v___x_933_; 
lean_dec_ref(v___x_931_);
lean_dec_ref(v_arg_919_);
lean_dec_ref(v_arg_915_);
lean_dec_ref(v_arg_911_);
lean_dec(v_asTopVar_902_);
lean_dec(v_toBind_901_);
lean_dec(v_asVar_900_);
lean_dec(v_toVar_899_);
lean_dec_ref(v_inst_898_);
lean_dec_ref(v_inst_897_);
lean_dec_ref(v_inst_896_);
lean_dec_ref(v_inst_895_);
lean_dec(v_inst_894_);
lean_dec(v_toPure_893_);
v___x_933_ = lean_apply_1(v_toTopVar_891_, v_e_892_);
return v___x_933_;
}
else
{
lean_object* v___x_934_; uint8_t v___x_935_; 
v___x_934_ = l_Lean_Expr_appFnCleanup___redArg(v___x_931_);
v___x_935_ = l_Lean_Expr_isApp(v___x_934_);
if (v___x_935_ == 0)
{
lean_object* v___x_936_; 
lean_dec_ref(v___x_934_);
lean_dec_ref(v_arg_919_);
lean_dec_ref(v_arg_915_);
lean_dec_ref(v_arg_911_);
lean_dec(v_asTopVar_902_);
lean_dec(v_toBind_901_);
lean_dec(v_asVar_900_);
lean_dec(v_toVar_899_);
lean_dec_ref(v_inst_898_);
lean_dec_ref(v_inst_897_);
lean_dec_ref(v_inst_896_);
lean_dec_ref(v_inst_895_);
lean_dec(v_inst_894_);
lean_dec(v_toPure_893_);
v___x_936_ = lean_apply_1(v_toTopVar_891_, v_e_892_);
return v___x_936_;
}
else
{
lean_object* v___x_937_; lean_object* v___x_938_; uint8_t v___x_939_; 
v___x_937_ = l_Lean_Expr_appFnCleanup___redArg(v___x_934_);
v___x_938_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_939_ = l_Lean_Expr_isConstOf(v___x_937_, v___x_938_);
if (v___x_939_ == 0)
{
lean_object* v___x_940_; uint8_t v___x_941_; 
v___x_940_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19));
v___x_941_ = l_Lean_Expr_isConstOf(v___x_937_, v___x_940_);
if (v___x_941_ == 0)
{
lean_object* v___x_942_; uint8_t v___x_943_; 
v___x_942_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_943_ = l_Lean_Expr_isConstOf(v___x_937_, v___x_942_);
if (v___x_943_ == 0)
{
lean_object* v___x_944_; uint8_t v___x_945_; 
v___x_944_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_945_ = l_Lean_Expr_isConstOf(v___x_937_, v___x_944_);
lean_dec_ref(v___x_937_);
if (v___x_945_ == 0)
{
lean_object* v___x_946_; 
lean_dec_ref(v_arg_919_);
lean_dec_ref(v_arg_915_);
lean_dec_ref(v_arg_911_);
lean_dec(v_asTopVar_902_);
lean_dec(v_toBind_901_);
lean_dec(v_asVar_900_);
lean_dec(v_toVar_899_);
lean_dec_ref(v_inst_898_);
lean_dec_ref(v_inst_897_);
lean_dec_ref(v_inst_896_);
lean_dec_ref(v_inst_895_);
lean_dec(v_inst_894_);
lean_dec(v_toPure_893_);
v___x_946_ = lean_apply_1(v_toTopVar_891_, v_e_892_);
return v___x_946_;
}
else
{
lean_object* v___f_947_; lean_object* v___f_948_; lean_object* v___x_949_; lean_object* v___x_950_; 
lean_dec(v_toTopVar_891_);
lean_inc(v_toBind_901_);
lean_inc(v_asVar_900_);
lean_inc(v_toVar_899_);
lean_inc_ref(v_inst_898_);
lean_inc_ref(v_inst_897_);
lean_inc_ref(v_inst_896_);
lean_inc_ref(v_inst_895_);
lean_inc(v_inst_894_);
v___f_947_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__16), 11, 10);
lean_closure_set(v___f_947_, 0, v_toPure_893_);
lean_closure_set(v___f_947_, 1, v_inst_894_);
lean_closure_set(v___f_947_, 2, v_inst_895_);
lean_closure_set(v___f_947_, 3, v_inst_896_);
lean_closure_set(v___f_947_, 4, v_inst_897_);
lean_closure_set(v___f_947_, 5, v_inst_898_);
lean_closure_set(v___f_947_, 6, v_toVar_899_);
lean_closure_set(v___f_947_, 7, v_asVar_900_);
lean_closure_set(v___f_947_, 8, v_arg_911_);
lean_closure_set(v___f_947_, 9, v_toBind_901_);
lean_inc(v_toBind_901_);
lean_inc_ref(v_inst_898_);
lean_inc_ref(v_inst_897_);
lean_inc_ref(v_inst_896_);
lean_inc_ref(v_inst_895_);
lean_inc(v_inst_894_);
v___f_948_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__17___boxed), 13, 12);
lean_closure_set(v___f_948_, 0, v_asTopVar_902_);
lean_closure_set(v___f_948_, 1, v_e_892_);
lean_closure_set(v___f_948_, 2, v_inst_894_);
lean_closure_set(v___f_948_, 3, v_inst_895_);
lean_closure_set(v___f_948_, 4, v_inst_896_);
lean_closure_set(v___f_948_, 5, v_inst_897_);
lean_closure_set(v___f_948_, 6, v_inst_898_);
lean_closure_set(v___f_948_, 7, v_toVar_899_);
lean_closure_set(v___f_948_, 8, v_asVar_900_);
lean_closure_set(v___f_948_, 9, v_arg_915_);
lean_closure_set(v___f_948_, 10, v_toBind_901_);
lean_closure_set(v___f_948_, 11, v___f_947_);
v___x_949_ = l_Lean_Meta_Grind_Arith_CommRing_isAddInst___redArg(v_inst_894_, v_inst_895_, v_inst_896_, v_inst_897_, v_inst_898_, v_arg_919_);
v___x_950_ = lean_apply_4(v_toBind_901_, lean_box(0), lean_box(0), v___x_949_, v___f_948_);
return v___x_950_;
}
}
else
{
lean_object* v___f_951_; lean_object* v___f_952_; lean_object* v___x_953_; lean_object* v___x_954_; 
lean_dec_ref(v___x_937_);
lean_dec(v_toTopVar_891_);
lean_inc(v_toBind_901_);
lean_inc(v_asVar_900_);
lean_inc(v_toVar_899_);
lean_inc_ref(v_inst_898_);
lean_inc_ref(v_inst_897_);
lean_inc_ref(v_inst_896_);
lean_inc_ref(v_inst_895_);
lean_inc(v_inst_894_);
v___f_951_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__19), 11, 10);
lean_closure_set(v___f_951_, 0, v_toPure_893_);
lean_closure_set(v___f_951_, 1, v_inst_894_);
lean_closure_set(v___f_951_, 2, v_inst_895_);
lean_closure_set(v___f_951_, 3, v_inst_896_);
lean_closure_set(v___f_951_, 4, v_inst_897_);
lean_closure_set(v___f_951_, 5, v_inst_898_);
lean_closure_set(v___f_951_, 6, v_toVar_899_);
lean_closure_set(v___f_951_, 7, v_asVar_900_);
lean_closure_set(v___f_951_, 8, v_arg_911_);
lean_closure_set(v___f_951_, 9, v_toBind_901_);
lean_inc(v_toBind_901_);
lean_inc_ref(v_inst_898_);
lean_inc_ref(v_inst_897_);
lean_inc_ref(v_inst_896_);
lean_inc_ref(v_inst_895_);
lean_inc(v_inst_894_);
v___f_952_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__17___boxed), 13, 12);
lean_closure_set(v___f_952_, 0, v_asTopVar_902_);
lean_closure_set(v___f_952_, 1, v_e_892_);
lean_closure_set(v___f_952_, 2, v_inst_894_);
lean_closure_set(v___f_952_, 3, v_inst_895_);
lean_closure_set(v___f_952_, 4, v_inst_896_);
lean_closure_set(v___f_952_, 5, v_inst_897_);
lean_closure_set(v___f_952_, 6, v_inst_898_);
lean_closure_set(v___f_952_, 7, v_toVar_899_);
lean_closure_set(v___f_952_, 8, v_asVar_900_);
lean_closure_set(v___f_952_, 9, v_arg_915_);
lean_closure_set(v___f_952_, 10, v_toBind_901_);
lean_closure_set(v___f_952_, 11, v___f_951_);
v___x_953_ = l_Lean_Meta_Grind_Arith_CommRing_isMulInst___redArg(v_inst_894_, v_inst_895_, v_inst_896_, v_inst_897_, v_inst_898_, v_arg_919_);
v___x_954_ = lean_apply_4(v_toBind_901_, lean_box(0), lean_box(0), v___x_953_, v___f_952_);
return v___x_954_;
}
}
else
{
lean_object* v___f_955_; lean_object* v___f_956_; lean_object* v___x_957_; lean_object* v___x_958_; 
lean_dec_ref(v___x_937_);
lean_dec(v_toTopVar_891_);
lean_inc(v_toBind_901_);
lean_inc(v_asVar_900_);
lean_inc(v_toVar_899_);
lean_inc_ref(v_inst_898_);
lean_inc_ref(v_inst_897_);
lean_inc_ref(v_inst_896_);
lean_inc_ref(v_inst_895_);
lean_inc(v_inst_894_);
v___f_955_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__20), 11, 10);
lean_closure_set(v___f_955_, 0, v_toPure_893_);
lean_closure_set(v___f_955_, 1, v_inst_894_);
lean_closure_set(v___f_955_, 2, v_inst_895_);
lean_closure_set(v___f_955_, 3, v_inst_896_);
lean_closure_set(v___f_955_, 4, v_inst_897_);
lean_closure_set(v___f_955_, 5, v_inst_898_);
lean_closure_set(v___f_955_, 6, v_toVar_899_);
lean_closure_set(v___f_955_, 7, v_asVar_900_);
lean_closure_set(v___f_955_, 8, v_arg_911_);
lean_closure_set(v___f_955_, 9, v_toBind_901_);
lean_inc(v_toBind_901_);
lean_inc_ref(v_inst_898_);
lean_inc_ref(v_inst_897_);
lean_inc_ref(v_inst_896_);
lean_inc_ref(v_inst_895_);
lean_inc(v_inst_894_);
v___f_956_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__17___boxed), 13, 12);
lean_closure_set(v___f_956_, 0, v_asTopVar_902_);
lean_closure_set(v___f_956_, 1, v_e_892_);
lean_closure_set(v___f_956_, 2, v_inst_894_);
lean_closure_set(v___f_956_, 3, v_inst_895_);
lean_closure_set(v___f_956_, 4, v_inst_896_);
lean_closure_set(v___f_956_, 5, v_inst_897_);
lean_closure_set(v___f_956_, 6, v_inst_898_);
lean_closure_set(v___f_956_, 7, v_toVar_899_);
lean_closure_set(v___f_956_, 8, v_asVar_900_);
lean_closure_set(v___f_956_, 9, v_arg_915_);
lean_closure_set(v___f_956_, 10, v_toBind_901_);
lean_closure_set(v___f_956_, 11, v___f_955_);
v___x_957_ = l_Lean_Meta_Grind_Arith_CommRing_isSubInst___redArg(v_inst_894_, v_inst_895_, v_inst_896_, v_inst_897_, v_inst_898_, v_arg_919_);
v___x_958_ = lean_apply_4(v_toBind_901_, lean_box(0), lean_box(0), v___x_957_, v___f_956_);
return v___x_958_;
}
}
else
{
lean_object* v___f_959_; lean_object* v___x_960_; lean_object* v___x_961_; lean_object* v___x_962_; 
lean_dec_ref(v___x_937_);
lean_dec(v_toTopVar_891_);
lean_inc(v_toBind_901_);
lean_inc(v_inst_894_);
v___f_959_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__24), 14, 13);
lean_closure_set(v___f_959_, 0, v_toPure_893_);
lean_closure_set(v___f_959_, 1, v_asTopVar_902_);
lean_closure_set(v___f_959_, 2, v_e_892_);
lean_closure_set(v___f_959_, 3, v_inst_894_);
lean_closure_set(v___f_959_, 4, v_inst_895_);
lean_closure_set(v___f_959_, 5, v_inst_896_);
lean_closure_set(v___f_959_, 6, v_inst_897_);
lean_closure_set(v___f_959_, 7, v_inst_898_);
lean_closure_set(v___f_959_, 8, v_toVar_899_);
lean_closure_set(v___f_959_, 9, v_asVar_900_);
lean_closure_set(v___f_959_, 10, v_arg_915_);
lean_closure_set(v___f_959_, 11, v_toBind_901_);
lean_closure_set(v___f_959_, 12, v_arg_919_);
v___x_960_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_960_, 0, v_arg_911_);
v___x_961_ = lean_apply_2(v_inst_894_, lean_box(0), v___x_960_);
v___x_962_ = lean_apply_4(v_toBind_901_, lean_box(0), lean_box(0), v___x_961_, v___f_959_);
return v___x_962_;
}
}
}
}
}
else
{
lean_object* v___f_963_; lean_object* v___x_964_; lean_object* v___x_965_; 
lean_dec_ref(v___x_920_);
lean_dec_ref(v_arg_919_);
lean_dec(v_toPure_893_);
lean_dec(v_toTopVar_891_);
lean_inc(v_toBind_901_);
lean_inc_ref(v_inst_898_);
lean_inc_ref(v_inst_897_);
lean_inc_ref(v_inst_896_);
lean_inc_ref(v_inst_895_);
lean_inc(v_inst_894_);
v___f_963_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__17___boxed), 13, 12);
lean_closure_set(v___f_963_, 0, v_asTopVar_902_);
lean_closure_set(v___f_963_, 1, v_e_892_);
lean_closure_set(v___f_963_, 2, v_inst_894_);
lean_closure_set(v___f_963_, 3, v_inst_895_);
lean_closure_set(v___f_963_, 4, v_inst_896_);
lean_closure_set(v___f_963_, 5, v_inst_897_);
lean_closure_set(v___f_963_, 6, v_inst_898_);
lean_closure_set(v___f_963_, 7, v_toVar_899_);
lean_closure_set(v___f_963_, 8, v_asVar_900_);
lean_closure_set(v___f_963_, 9, v_arg_911_);
lean_closure_set(v___f_963_, 10, v_toBind_901_);
lean_closure_set(v___f_963_, 11, v___f_903_);
v___x_964_ = l_Lean_Meta_Grind_Arith_CommRing_isNegInst___redArg(v_inst_894_, v_inst_895_, v_inst_896_, v_inst_897_, v_inst_898_, v_arg_915_);
v___x_965_ = lean_apply_4(v_toBind_901_, lean_box(0), lean_box(0), v___x_964_, v___f_963_);
return v___x_965_;
}
}
else
{
lean_object* v___f_966_; lean_object* v___x_967_; lean_object* v___x_968_; 
lean_dec_ref(v___x_920_);
lean_dec_ref(v_arg_919_);
lean_dec(v___f_903_);
lean_dec(v_asVar_900_);
lean_dec(v_toVar_899_);
lean_dec_ref(v_inst_895_);
lean_dec(v_toPure_893_);
lean_dec(v_toTopVar_891_);
lean_inc(v_toBind_901_);
lean_inc(v_inst_894_);
v___f_966_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__25___boxed), 7, 6);
lean_closure_set(v___f_966_, 0, v_asTopVar_902_);
lean_closure_set(v___f_966_, 1, v_e_892_);
lean_closure_set(v___f_966_, 2, v_arg_911_);
lean_closure_set(v___f_966_, 3, v_inst_894_);
lean_closure_set(v___f_966_, 4, v_toBind_901_);
lean_closure_set(v___f_966_, 5, v___f_904_);
v___x_967_ = l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___redArg(v_inst_894_, v_inst_896_, v_inst_897_, v_inst_898_, v_arg_915_);
v___x_968_ = lean_apply_4(v_toBind_901_, lean_box(0), lean_box(0), v___x_967_, v___f_966_);
return v___x_968_;
}
}
else
{
lean_object* v___f_969_; lean_object* v___x_970_; lean_object* v___x_971_; 
lean_dec_ref(v___x_920_);
lean_dec_ref(v_arg_919_);
lean_dec(v___f_904_);
lean_dec(v___f_903_);
lean_dec(v_asVar_900_);
lean_dec(v_toVar_899_);
lean_dec_ref(v_inst_895_);
lean_dec(v_toPure_893_);
lean_dec(v_toTopVar_891_);
lean_inc(v_toBind_901_);
lean_inc(v_inst_894_);
v___f_969_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__22___boxed), 7, 6);
lean_closure_set(v___f_969_, 0, v_asTopVar_902_);
lean_closure_set(v___f_969_, 1, v_e_892_);
lean_closure_set(v___f_969_, 2, v_arg_911_);
lean_closure_set(v___f_969_, 3, v_inst_894_);
lean_closure_set(v___f_969_, 4, v_toBind_901_);
lean_closure_set(v___f_969_, 5, v___f_905_);
v___x_970_ = l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___redArg(v_inst_894_, v_inst_896_, v_inst_897_, v_inst_898_, v_arg_915_);
v___x_971_ = lean_apply_4(v_toBind_901_, lean_box(0), lean_box(0), v___x_970_, v___f_969_);
return v___x_971_;
}
}
else
{
lean_object* v___x_972_; lean_object* v___x_973_; lean_object* v___x_974_; 
lean_dec_ref(v___x_920_);
lean_dec_ref(v_arg_919_);
lean_dec_ref(v_arg_911_);
lean_dec(v___f_905_);
lean_dec(v___f_904_);
lean_dec(v___f_903_);
lean_dec(v_asTopVar_902_);
lean_dec(v_asVar_900_);
lean_dec(v_toVar_899_);
lean_dec_ref(v_inst_898_);
lean_dec_ref(v_inst_897_);
lean_dec_ref(v_inst_896_);
lean_dec_ref(v_inst_895_);
lean_dec(v_toPure_893_);
lean_dec_ref(v_e_892_);
lean_dec(v_toTopVar_891_);
v___x_972_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_972_, 0, v_arg_915_);
v___x_973_ = lean_apply_2(v_inst_894_, lean_box(0), v___x_972_);
v___x_974_ = lean_apply_4(v_toBind_901_, lean_box(0), lean_box(0), v___x_973_, v___f_906_);
return v___x_974_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__26___boxed(lean_object** _args){
lean_object* v_toTopVar_975_ = _args[0];
lean_object* v_e_976_ = _args[1];
lean_object* v_toPure_977_ = _args[2];
lean_object* v_inst_978_ = _args[3];
lean_object* v_inst_979_ = _args[4];
lean_object* v_inst_980_ = _args[5];
lean_object* v_inst_981_ = _args[6];
lean_object* v_inst_982_ = _args[7];
lean_object* v_toVar_983_ = _args[8];
lean_object* v_asVar_984_ = _args[9];
lean_object* v_toBind_985_ = _args[10];
lean_object* v_asTopVar_986_ = _args[11];
lean_object* v___f_987_ = _args[12];
lean_object* v___f_988_ = _args[13];
lean_object* v___f_989_ = _args[14];
lean_object* v___f_990_ = _args[15];
lean_object* v_____x_991_ = _args[16];
_start:
{
lean_object* v_res_992_; 
v_res_992_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__26(v_toTopVar_975_, v_e_976_, v_toPure_977_, v_inst_978_, v_inst_979_, v_inst_980_, v_inst_981_, v_inst_982_, v_toVar_983_, v_asVar_984_, v_toBind_985_, v_asTopVar_986_, v___f_987_, v___f_988_, v___f_989_, v___f_990_, v_____x_991_);
return v_res_992_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg(lean_object* v_inst_993_, lean_object* v_inst_994_, lean_object* v_inst_995_, lean_object* v_inst_996_, lean_object* v_inst_997_, lean_object* v_inst_998_, lean_object* v_inst_999_, lean_object* v_e_1000_, uint8_t v_skipVar_1001_, lean_object* v_gen_1002_){
_start:
{
lean_object* v_toApplicative_1003_; lean_object* v_toBind_1004_; lean_object* v_toPure_1005_; lean_object* v_mkVar_1006_; lean_object* v___f_1007_; lean_object* v___f_1008_; lean_object* v___f_1009_; lean_object* v_asVar_1010_; lean_object* v_toVar_1011_; lean_object* v___x_1012_; lean_object* v_toTopVar_1013_; lean_object* v___f_1014_; lean_object* v___f_1015_; lean_object* v_asTopVar_1016_; lean_object* v___f_1017_; lean_object* v___f_1018_; lean_object* v___x_1019_; lean_object* v___x_1020_; lean_object* v___x_1021_; 
v_toApplicative_1003_ = lean_ctor_get(v_inst_995_, 0);
v_toBind_1004_ = lean_ctor_get(v_inst_995_, 1);
lean_inc(v_toBind_1004_);
v_toPure_1005_ = lean_ctor_get(v_toApplicative_1003_, 1);
lean_inc(v_toPure_1005_);
lean_inc(v_toBind_1004_);
lean_inc_ref(v_inst_997_);
lean_inc_ref(v_inst_995_);
lean_inc(v_inst_998_);
v_mkVar_1006_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__2), 7, 6);
lean_closure_set(v_mkVar_1006_, 0, v_inst_998_);
lean_closure_set(v_mkVar_1006_, 1, v_inst_995_);
lean_closure_set(v_mkVar_1006_, 2, v_inst_997_);
lean_closure_set(v_mkVar_1006_, 3, v_inst_999_);
lean_closure_set(v_mkVar_1006_, 4, v_gen_1002_);
lean_closure_set(v_mkVar_1006_, 5, v_toBind_1004_);
lean_inc(v_toPure_1005_);
v___f_1007_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__3), 2, 1);
lean_closure_set(v___f_1007_, 0, v_toPure_1005_);
lean_inc(v_toPure_1005_);
v___f_1008_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__4), 2, 1);
lean_closure_set(v___f_1008_, 0, v_toPure_1005_);
lean_inc(v_toPure_1005_);
v___f_1009_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__5), 2, 1);
lean_closure_set(v___f_1009_, 0, v_toPure_1005_);
lean_inc(v_inst_998_);
lean_inc_ref(v___f_1009_);
lean_inc(v_toBind_1004_);
lean_inc_ref(v_mkVar_1006_);
v_asVar_1010_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__7), 5, 4);
lean_closure_set(v_asVar_1010_, 0, v_mkVar_1006_);
lean_closure_set(v_asVar_1010_, 1, v_toBind_1004_);
lean_closure_set(v_asVar_1010_, 2, v___f_1009_);
lean_closure_set(v_asVar_1010_, 3, v_inst_998_);
lean_inc(v_toBind_1004_);
v_toVar_1011_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__9), 4, 3);
lean_closure_set(v_toVar_1011_, 0, v_mkVar_1006_);
lean_closure_set(v_toVar_1011_, 1, v_toBind_1004_);
lean_closure_set(v_toVar_1011_, 2, v___f_1009_);
v___x_1012_ = lean_box(v_skipVar_1001_);
lean_inc(v_toPure_1005_);
lean_inc(v_toBind_1004_);
lean_inc_ref(v_toVar_1011_);
v_toTopVar_1013_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__8___boxed), 6, 5);
lean_closure_set(v_toTopVar_1013_, 0, v___x_1012_);
lean_closure_set(v_toTopVar_1013_, 1, v_toVar_1011_);
lean_closure_set(v_toTopVar_1013_, 2, v_toBind_1004_);
lean_closure_set(v_toTopVar_1013_, 3, v___f_1008_);
lean_closure_set(v_toTopVar_1013_, 4, v_toPure_1005_);
lean_inc_ref(v_e_1000_);
lean_inc_ref(v_toTopVar_1013_);
lean_inc(v_toPure_1005_);
v___f_1014_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__10), 4, 3);
lean_closure_set(v___f_1014_, 0, v_toPure_1005_);
lean_closure_set(v___f_1014_, 1, v_toTopVar_1013_);
lean_closure_set(v___f_1014_, 2, v_e_1000_);
lean_inc_ref(v_e_1000_);
lean_inc_ref(v_toTopVar_1013_);
lean_inc(v_toPure_1005_);
v___f_1015_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__11), 4, 3);
lean_closure_set(v___f_1015_, 0, v_toPure_1005_);
lean_closure_set(v___f_1015_, 1, v_toTopVar_1013_);
lean_closure_set(v___f_1015_, 2, v_e_1000_);
lean_inc(v_toBind_1004_);
lean_inc_ref(v_toTopVar_1013_);
v_asTopVar_1016_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__13), 4, 3);
lean_closure_set(v_asTopVar_1016_, 0, v_toTopVar_1013_);
lean_closure_set(v_asTopVar_1016_, 1, v_inst_998_);
lean_closure_set(v_asTopVar_1016_, 2, v_toBind_1004_);
lean_inc_ref(v_e_1000_);
lean_inc_ref(v_asTopVar_1016_);
lean_inc(v_toPure_1005_);
v___f_1017_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__14), 4, 3);
lean_closure_set(v___f_1017_, 0, v_toPure_1005_);
lean_closure_set(v___f_1017_, 1, v_asTopVar_1016_);
lean_closure_set(v___f_1017_, 2, v_e_1000_);
lean_inc(v_toBind_1004_);
lean_inc(v_inst_993_);
lean_inc_ref(v_e_1000_);
v___f_1018_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__26___boxed), 17, 16);
lean_closure_set(v___f_1018_, 0, v_toTopVar_1013_);
lean_closure_set(v___f_1018_, 1, v_e_1000_);
lean_closure_set(v___f_1018_, 2, v_toPure_1005_);
lean_closure_set(v___f_1018_, 3, v_inst_993_);
lean_closure_set(v___f_1018_, 4, v_inst_994_);
lean_closure_set(v___f_1018_, 5, v_inst_995_);
lean_closure_set(v___f_1018_, 6, v_inst_996_);
lean_closure_set(v___f_1018_, 7, v_inst_997_);
lean_closure_set(v___f_1018_, 8, v_toVar_1011_);
lean_closure_set(v___f_1018_, 9, v_asVar_1010_);
lean_closure_set(v___f_1018_, 10, v_toBind_1004_);
lean_closure_set(v___f_1018_, 11, v_asTopVar_1016_);
lean_closure_set(v___f_1018_, 12, v___f_1007_);
lean_closure_set(v___f_1018_, 13, v___f_1014_);
lean_closure_set(v___f_1018_, 14, v___f_1015_);
lean_closure_set(v___f_1018_, 15, v___f_1017_);
v___x_1019_ = lean_alloc_closure((void*)(l_Lean_Meta_instantiateMVarsIfMVarApp___boxed), 6, 1);
lean_closure_set(v___x_1019_, 0, v_e_1000_);
v___x_1020_ = lean_apply_2(v_inst_993_, lean_box(0), v___x_1019_);
v___x_1021_ = lean_apply_4(v_toBind_1004_, lean_box(0), lean_box(0), v___x_1020_, v___f_1018_);
return v___x_1021_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___boxed(lean_object* v_inst_1022_, lean_object* v_inst_1023_, lean_object* v_inst_1024_, lean_object* v_inst_1025_, lean_object* v_inst_1026_, lean_object* v_inst_1027_, lean_object* v_inst_1028_, lean_object* v_e_1029_, lean_object* v_skipVar_1030_, lean_object* v_gen_1031_){
_start:
{
uint8_t v_skipVar_boxed_1032_; lean_object* v_res_1033_; 
v_skipVar_boxed_1032_ = lean_unbox(v_skipVar_1030_);
v_res_1033_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg(v_inst_1022_, v_inst_1023_, v_inst_1024_, v_inst_1025_, v_inst_1026_, v_inst_1027_, v_inst_1028_, v_e_1029_, v_skipVar_boxed_1032_, v_gen_1031_);
return v_res_1033_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f(lean_object* v_m_1034_, lean_object* v_inst_1035_, lean_object* v_inst_1036_, lean_object* v_inst_1037_, lean_object* v_inst_1038_, lean_object* v_inst_1039_, lean_object* v_inst_1040_, lean_object* v_inst_1041_, lean_object* v_e_1042_, uint8_t v_skipVar_1043_, lean_object* v_gen_1044_){
_start:
{
lean_object* v___x_1045_; 
v___x_1045_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg(v_inst_1035_, v_inst_1036_, v_inst_1037_, v_inst_1038_, v_inst_1039_, v_inst_1040_, v_inst_1041_, v_e_1042_, v_skipVar_1043_, v_gen_1044_);
return v___x_1045_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___boxed(lean_object* v_m_1046_, lean_object* v_inst_1047_, lean_object* v_inst_1048_, lean_object* v_inst_1049_, lean_object* v_inst_1050_, lean_object* v_inst_1051_, lean_object* v_inst_1052_, lean_object* v_inst_1053_, lean_object* v_e_1054_, lean_object* v_skipVar_1055_, lean_object* v_gen_1056_){
_start:
{
uint8_t v_skipVar_boxed_1057_; lean_object* v_res_1058_; 
v_skipVar_boxed_1057_ = lean_unbox(v_skipVar_1055_);
v_res_1058_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f(v_m_1046_, v_inst_1047_, v_inst_1048_, v_inst_1049_, v_inst_1050_, v_inst_1051_, v_inst_1052_, v_inst_1053_, v_e_1054_, v_skipVar_boxed_1057_, v_gen_1056_);
return v_res_1058_;
}
}
LEAN_EXPORT lean_object* l_Lean_addMessageContextFull___at___00Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28_spec__31(lean_object* v_msgData_1059_, lean_object* v___y_1060_, lean_object* v___y_1061_, lean_object* v___y_1062_, lean_object* v___y_1063_){
_start:
{
lean_object* v___x_1065_; lean_object* v_env_1066_; lean_object* v___x_1067_; lean_object* v_mctx_1068_; lean_object* v_lctx_1069_; lean_object* v_options_1070_; lean_object* v___x_1071_; lean_object* v___x_1072_; lean_object* v___x_1073_; 
v___x_1065_ = lean_st_ref_get(v___y_1063_);
v_env_1066_ = lean_ctor_get(v___x_1065_, 0);
lean_inc_ref(v_env_1066_);
lean_dec(v___x_1065_);
v___x_1067_ = lean_st_ref_get(v___y_1061_);
v_mctx_1068_ = lean_ctor_get(v___x_1067_, 0);
lean_inc_ref(v_mctx_1068_);
lean_dec(v___x_1067_);
v_lctx_1069_ = lean_ctor_get(v___y_1060_, 2);
v_options_1070_ = lean_ctor_get(v___y_1062_, 2);
lean_inc_ref(v_options_1070_);
lean_inc_ref(v_lctx_1069_);
v___x_1071_ = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(v___x_1071_, 0, v_env_1066_);
lean_ctor_set(v___x_1071_, 1, v_mctx_1068_);
lean_ctor_set(v___x_1071_, 2, v_lctx_1069_);
lean_ctor_set(v___x_1071_, 3, v_options_1070_);
v___x_1072_ = lean_alloc_ctor(3, 2, 0);
lean_ctor_set(v___x_1072_, 0, v___x_1071_);
lean_ctor_set(v___x_1072_, 1, v_msgData_1059_);
v___x_1073_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_1073_, 0, v___x_1072_);
return v___x_1073_;
}
}
LEAN_EXPORT lean_object* l_Lean_addMessageContextFull___at___00Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28_spec__31___boxed(lean_object* v_msgData_1074_, lean_object* v___y_1075_, lean_object* v___y_1076_, lean_object* v___y_1077_, lean_object* v___y_1078_, lean_object* v___y_1079_){
_start:
{
lean_object* v_res_1080_; 
v_res_1080_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28_spec__31(v_msgData_1074_, v___y_1075_, v___y_1076_, v___y_1077_, v___y_1078_);
lean_dec(v___y_1078_);
lean_dec_ref(v___y_1077_);
lean_dec(v___y_1076_);
lean_dec_ref(v___y_1075_);
return v_res_1080_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28___redArg(lean_object* v_msg_1081_, lean_object* v___y_1082_, lean_object* v___y_1083_, lean_object* v___y_1084_, lean_object* v___y_1085_){
_start:
{
lean_object* v_ref_1087_; lean_object* v___x_1088_; lean_object* v_a_1089_; lean_object* v___x_1091_; uint8_t v_isShared_1092_; uint8_t v_isSharedCheck_1097_; 
v_ref_1087_ = lean_ctor_get(v___y_1084_, 5);
v___x_1088_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28_spec__31(v_msg_1081_, v___y_1082_, v___y_1083_, v___y_1084_, v___y_1085_);
v_a_1089_ = lean_ctor_get(v___x_1088_, 0);
v_isSharedCheck_1097_ = !lean_is_exclusive(v___x_1088_);
if (v_isSharedCheck_1097_ == 0)
{
v___x_1091_ = v___x_1088_;
v_isShared_1092_ = v_isSharedCheck_1097_;
goto v_resetjp_1090_;
}
else
{
lean_inc(v_a_1089_);
lean_dec(v___x_1088_);
v___x_1091_ = lean_box(0);
v_isShared_1092_ = v_isSharedCheck_1097_;
goto v_resetjp_1090_;
}
v_resetjp_1090_:
{
lean_object* v___x_1093_; lean_object* v___x_1095_; 
lean_inc(v_ref_1087_);
v___x_1093_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1093_, 0, v_ref_1087_);
lean_ctor_set(v___x_1093_, 1, v_a_1089_);
if (v_isShared_1092_ == 0)
{
lean_ctor_set_tag(v___x_1091_, 1);
lean_ctor_set(v___x_1091_, 0, v___x_1093_);
v___x_1095_ = v___x_1091_;
goto v_reusejp_1094_;
}
else
{
lean_object* v_reuseFailAlloc_1096_; 
v_reuseFailAlloc_1096_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1096_, 0, v___x_1093_);
v___x_1095_ = v_reuseFailAlloc_1096_;
goto v_reusejp_1094_;
}
v_reusejp_1094_:
{
return v___x_1095_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28___redArg___boxed(lean_object* v_msg_1098_, lean_object* v___y_1099_, lean_object* v___y_1100_, lean_object* v___y_1101_, lean_object* v___y_1102_, lean_object* v___y_1103_){
_start:
{
lean_object* v_res_1104_; 
v_res_1104_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28___redArg(v_msg_1098_, v___y_1099_, v___y_1100_, v___y_1101_, v___y_1102_);
lean_dec(v___y_1102_);
lean_dec_ref(v___y_1101_);
lean_dec(v___y_1100_);
lean_dec_ref(v___y_1099_);
return v_res_1104_;
}
}
static lean_object* _init_l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1(void){
_start:
{
lean_object* v___x_1106_; lean_object* v___x_1107_; 
v___x_1106_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__0));
v___x_1107_ = l_Lean_stringToMessageData(v___x_1106_);
return v___x_1107_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20(lean_object* v_type_1108_, lean_object* v___y_1109_, lean_object* v___y_1110_, lean_object* v___y_1111_, lean_object* v___y_1112_, lean_object* v___y_1113_, lean_object* v___y_1114_, lean_object* v___y_1115_, lean_object* v___y_1116_, lean_object* v___y_1117_, lean_object* v___y_1118_, lean_object* v___y_1119_){
_start:
{
lean_object* v___x_1121_; 
lean_inc(v___y_1119_);
lean_inc_ref(v___y_1118_);
lean_inc(v___y_1117_);
lean_inc_ref(v___y_1116_);
lean_inc_ref(v_type_1108_);
v___x_1121_ = l_Lean_Meta_Grind_synthInstanceMeta_x3f(v_type_1108_, v___y_1116_, v___y_1117_, v___y_1118_, v___y_1119_);
if (lean_obj_tag(v___x_1121_) == 0)
{
lean_object* v_a_1122_; lean_object* v___x_1124_; uint8_t v_isShared_1125_; uint8_t v_isSharedCheck_1134_; 
v_a_1122_ = lean_ctor_get(v___x_1121_, 0);
v_isSharedCheck_1134_ = !lean_is_exclusive(v___x_1121_);
if (v_isSharedCheck_1134_ == 0)
{
v___x_1124_ = v___x_1121_;
v_isShared_1125_ = v_isSharedCheck_1134_;
goto v_resetjp_1123_;
}
else
{
lean_inc(v_a_1122_);
lean_dec(v___x_1121_);
v___x_1124_ = lean_box(0);
v_isShared_1125_ = v_isSharedCheck_1134_;
goto v_resetjp_1123_;
}
v_resetjp_1123_:
{
if (lean_obj_tag(v_a_1122_) == 1)
{
lean_object* v_val_1126_; lean_object* v___x_1128_; 
lean_dec(v___y_1119_);
lean_dec_ref(v___y_1118_);
lean_dec(v___y_1117_);
lean_dec_ref(v___y_1116_);
lean_dec_ref(v_type_1108_);
v_val_1126_ = lean_ctor_get(v_a_1122_, 0);
lean_inc(v_val_1126_);
lean_dec_ref(v_a_1122_);
if (v_isShared_1125_ == 0)
{
lean_ctor_set(v___x_1124_, 0, v_val_1126_);
v___x_1128_ = v___x_1124_;
goto v_reusejp_1127_;
}
else
{
lean_object* v_reuseFailAlloc_1129_; 
v_reuseFailAlloc_1129_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1129_, 0, v_val_1126_);
v___x_1128_ = v_reuseFailAlloc_1129_;
goto v_reusejp_1127_;
}
v_reusejp_1127_:
{
return v___x_1128_;
}
}
else
{
lean_object* v___x_1130_; lean_object* v___x_1131_; lean_object* v___x_1132_; lean_object* v___x_1133_; 
lean_del_object(v___x_1124_);
lean_dec(v_a_1122_);
v___x_1130_ = lean_obj_once(&l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1, &l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1_once, _init_l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1);
v___x_1131_ = l_Lean_indentExpr(v_type_1108_);
v___x_1132_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1132_, 0, v___x_1130_);
lean_ctor_set(v___x_1132_, 1, v___x_1131_);
v___x_1133_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28___redArg(v___x_1132_, v___y_1116_, v___y_1117_, v___y_1118_, v___y_1119_);
lean_dec(v___y_1119_);
lean_dec_ref(v___y_1118_);
lean_dec(v___y_1117_);
lean_dec_ref(v___y_1116_);
return v___x_1133_;
}
}
}
else
{
lean_object* v_a_1135_; lean_object* v___x_1137_; uint8_t v_isShared_1138_; uint8_t v_isSharedCheck_1142_; 
lean_dec(v___y_1119_);
lean_dec_ref(v___y_1118_);
lean_dec(v___y_1117_);
lean_dec_ref(v___y_1116_);
lean_dec_ref(v_type_1108_);
v_a_1135_ = lean_ctor_get(v___x_1121_, 0);
v_isSharedCheck_1142_ = !lean_is_exclusive(v___x_1121_);
if (v_isSharedCheck_1142_ == 0)
{
v___x_1137_ = v___x_1121_;
v_isShared_1138_ = v_isSharedCheck_1142_;
goto v_resetjp_1136_;
}
else
{
lean_inc(v_a_1135_);
lean_dec(v___x_1121_);
v___x_1137_ = lean_box(0);
v_isShared_1138_ = v_isSharedCheck_1142_;
goto v_resetjp_1136_;
}
v_resetjp_1136_:
{
lean_object* v___x_1140_; 
if (v_isShared_1138_ == 0)
{
v___x_1140_ = v___x_1137_;
goto v_reusejp_1139_;
}
else
{
lean_object* v_reuseFailAlloc_1141_; 
v_reuseFailAlloc_1141_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1141_, 0, v_a_1135_);
v___x_1140_ = v_reuseFailAlloc_1141_;
goto v_reusejp_1139_;
}
v_reusejp_1139_:
{
return v___x_1140_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___boxed(lean_object* v_type_1143_, lean_object* v___y_1144_, lean_object* v___y_1145_, lean_object* v___y_1146_, lean_object* v___y_1147_, lean_object* v___y_1148_, lean_object* v___y_1149_, lean_object* v___y_1150_, lean_object* v___y_1151_, lean_object* v___y_1152_, lean_object* v___y_1153_, lean_object* v___y_1154_, lean_object* v___y_1155_){
_start:
{
lean_object* v_res_1156_; 
v_res_1156_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20(v_type_1143_, v___y_1144_, v___y_1145_, v___y_1146_, v___y_1147_, v___y_1148_, v___y_1149_, v___y_1150_, v___y_1151_, v___y_1152_, v___y_1153_, v___y_1154_);
lean_dec(v___y_1150_);
lean_dec_ref(v___y_1149_);
lean_dec(v___y_1148_);
lean_dec_ref(v___y_1147_);
lean_dec(v___y_1146_);
lean_dec(v___y_1145_);
lean_dec_ref(v___y_1144_);
return v_res_1156_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8(lean_object* v_type_1157_, lean_object* v_u_1158_, lean_object* v_instDeclName_1159_, lean_object* v_declName_1160_, lean_object* v_expectedInst_1161_, lean_object* v___y_1162_, lean_object* v___y_1163_, lean_object* v___y_1164_, lean_object* v___y_1165_, lean_object* v___y_1166_, lean_object* v___y_1167_, lean_object* v___y_1168_, lean_object* v___y_1169_, lean_object* v___y_1170_, lean_object* v___y_1171_, lean_object* v___y_1172_){
_start:
{
lean_object* v___x_1174_; lean_object* v___x_1175_; lean_object* v___x_1176_; lean_object* v___x_1177_; lean_object* v___x_1178_; lean_object* v___x_1179_; lean_object* v___x_1180_; 
v___x_1174_ = lean_box(0);
lean_inc(v_u_1158_);
v___x_1175_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_1175_, 0, v_u_1158_);
lean_ctor_set(v___x_1175_, 1, v___x_1174_);
lean_inc(v_u_1158_);
v___x_1176_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_1176_, 0, v_u_1158_);
lean_ctor_set(v___x_1176_, 1, v___x_1175_);
v___x_1177_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_1177_, 0, v_u_1158_);
lean_ctor_set(v___x_1177_, 1, v___x_1176_);
lean_inc_ref(v___x_1177_);
v___x_1178_ = l_Lean_mkConst(v_instDeclName_1159_, v___x_1177_);
lean_inc_ref_n(v_type_1157_, 3);
v___x_1179_ = l_Lean_mkApp3(v___x_1178_, v_type_1157_, v_type_1157_, v_type_1157_);
lean_inc(v___y_1172_);
lean_inc_ref(v___y_1171_);
lean_inc(v___y_1170_);
lean_inc_ref(v___y_1169_);
v___x_1180_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20(v___x_1179_, v___y_1162_, v___y_1163_, v___y_1164_, v___y_1165_, v___y_1166_, v___y_1167_, v___y_1168_, v___y_1169_, v___y_1170_, v___y_1171_, v___y_1172_);
if (lean_obj_tag(v___x_1180_) == 0)
{
lean_object* v_a_1181_; lean_object* v___x_1182_; 
v_a_1181_ = lean_ctor_get(v___x_1180_, 0);
lean_inc(v_a_1181_);
lean_dec_ref(v___x_1180_);
lean_inc(v___y_1172_);
lean_inc_ref(v___y_1171_);
lean_inc(v___y_1170_);
lean_inc_ref(v___y_1169_);
lean_inc(v_a_1181_);
lean_inc(v_declName_1160_);
v___x_1182_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v_declName_1160_, v_a_1181_, v_expectedInst_1161_, v___y_1169_, v___y_1170_, v___y_1171_, v___y_1172_);
if (lean_obj_tag(v___x_1182_) == 0)
{
lean_object* v___x_1183_; lean_object* v___x_1184_; lean_object* v___x_1185_; 
lean_dec_ref(v___x_1182_);
v___x_1183_ = l_Lean_mkConst(v_declName_1160_, v___x_1177_);
lean_inc_ref_n(v_type_1157_, 2);
v___x_1184_ = l_Lean_mkApp4(v___x_1183_, v_type_1157_, v_type_1157_, v_type_1157_, v_a_1181_);
lean_inc(v___y_1168_);
v___x_1185_ = lean_grind_canon(v___x_1184_, v___y_1163_, v___y_1164_, v___y_1165_, v___y_1166_, v___y_1167_, v___y_1168_, v___y_1169_, v___y_1170_, v___y_1171_, v___y_1172_);
if (lean_obj_tag(v___x_1185_) == 0)
{
lean_object* v_a_1186_; lean_object* v___x_1187_; 
v_a_1186_ = lean_ctor_get(v___x_1185_, 0);
lean_inc(v_a_1186_);
lean_dec_ref(v___x_1185_);
v___x_1187_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_1186_, v___y_1168_);
lean_dec(v___y_1168_);
return v___x_1187_;
}
else
{
lean_dec(v___y_1168_);
return v___x_1185_;
}
}
else
{
lean_object* v_a_1188_; lean_object* v___x_1190_; uint8_t v_isShared_1191_; uint8_t v_isSharedCheck_1195_; 
lean_dec(v_a_1181_);
lean_dec_ref(v___x_1177_);
lean_dec(v___y_1172_);
lean_dec_ref(v___y_1171_);
lean_dec(v___y_1170_);
lean_dec_ref(v___y_1169_);
lean_dec(v___y_1168_);
lean_dec_ref(v___y_1167_);
lean_dec(v___y_1166_);
lean_dec_ref(v___y_1165_);
lean_dec(v___y_1164_);
lean_dec(v___y_1163_);
lean_dec(v_declName_1160_);
lean_dec_ref(v_type_1157_);
v_a_1188_ = lean_ctor_get(v___x_1182_, 0);
v_isSharedCheck_1195_ = !lean_is_exclusive(v___x_1182_);
if (v_isSharedCheck_1195_ == 0)
{
v___x_1190_ = v___x_1182_;
v_isShared_1191_ = v_isSharedCheck_1195_;
goto v_resetjp_1189_;
}
else
{
lean_inc(v_a_1188_);
lean_dec(v___x_1182_);
v___x_1190_ = lean_box(0);
v_isShared_1191_ = v_isSharedCheck_1195_;
goto v_resetjp_1189_;
}
v_resetjp_1189_:
{
lean_object* v___x_1193_; 
if (v_isShared_1191_ == 0)
{
v___x_1193_ = v___x_1190_;
goto v_reusejp_1192_;
}
else
{
lean_object* v_reuseFailAlloc_1194_; 
v_reuseFailAlloc_1194_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1194_, 0, v_a_1188_);
v___x_1193_ = v_reuseFailAlloc_1194_;
goto v_reusejp_1192_;
}
v_reusejp_1192_:
{
return v___x_1193_;
}
}
}
}
else
{
lean_dec_ref(v___x_1177_);
lean_dec(v___y_1172_);
lean_dec_ref(v___y_1171_);
lean_dec(v___y_1170_);
lean_dec_ref(v___y_1169_);
lean_dec(v___y_1168_);
lean_dec_ref(v___y_1167_);
lean_dec(v___y_1166_);
lean_dec_ref(v___y_1165_);
lean_dec(v___y_1164_);
lean_dec(v___y_1163_);
lean_dec_ref(v_expectedInst_1161_);
lean_dec(v_declName_1160_);
lean_dec_ref(v_type_1157_);
return v___x_1180_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8___boxed(lean_object** _args){
lean_object* v_type_1196_ = _args[0];
lean_object* v_u_1197_ = _args[1];
lean_object* v_instDeclName_1198_ = _args[2];
lean_object* v_declName_1199_ = _args[3];
lean_object* v_expectedInst_1200_ = _args[4];
lean_object* v___y_1201_ = _args[5];
lean_object* v___y_1202_ = _args[6];
lean_object* v___y_1203_ = _args[7];
lean_object* v___y_1204_ = _args[8];
lean_object* v___y_1205_ = _args[9];
lean_object* v___y_1206_ = _args[10];
lean_object* v___y_1207_ = _args[11];
lean_object* v___y_1208_ = _args[12];
lean_object* v___y_1209_ = _args[13];
lean_object* v___y_1210_ = _args[14];
lean_object* v___y_1211_ = _args[15];
lean_object* v___y_1212_ = _args[16];
_start:
{
lean_object* v_res_1213_; 
v_res_1213_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8(v_type_1196_, v_u_1197_, v_instDeclName_1198_, v_declName_1199_, v_expectedInst_1200_, v___y_1201_, v___y_1202_, v___y_1203_, v___y_1204_, v___y_1205_, v___y_1206_, v___y_1207_, v___y_1208_, v___y_1209_, v___y_1210_, v___y_1211_);
lean_dec_ref(v___y_1201_);
return v_res_1213_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___lam__0(lean_object* v_a_1214_, lean_object* v_s_1215_){
_start:
{
lean_object* v_toRing_1216_; lean_object* v_invFn_x3f_1217_; lean_object* v_semiringId_x3f_1218_; lean_object* v_commSemiringInst_1219_; lean_object* v_commRingInst_1220_; lean_object* v_noZeroDivInst_x3f_1221_; lean_object* v_fieldInst_x3f_1222_; lean_object* v_denoteEntries_1223_; lean_object* v_nextId_1224_; lean_object* v_steps_1225_; lean_object* v_queue_1226_; lean_object* v_basis_1227_; lean_object* v_diseqs_1228_; uint8_t v_recheck_1229_; lean_object* v_invSet_1230_; lean_object* v_numEq0_x3f_1231_; uint8_t v_numEq0Updated_1232_; lean_object* v___x_1234_; uint8_t v_isShared_1235_; uint8_t v_isSharedCheck_1264_; 
v_toRing_1216_ = lean_ctor_get(v_s_1215_, 0);
v_invFn_x3f_1217_ = lean_ctor_get(v_s_1215_, 1);
v_semiringId_x3f_1218_ = lean_ctor_get(v_s_1215_, 2);
v_commSemiringInst_1219_ = lean_ctor_get(v_s_1215_, 3);
v_commRingInst_1220_ = lean_ctor_get(v_s_1215_, 4);
v_noZeroDivInst_x3f_1221_ = lean_ctor_get(v_s_1215_, 5);
v_fieldInst_x3f_1222_ = lean_ctor_get(v_s_1215_, 6);
v_denoteEntries_1223_ = lean_ctor_get(v_s_1215_, 7);
v_nextId_1224_ = lean_ctor_get(v_s_1215_, 8);
v_steps_1225_ = lean_ctor_get(v_s_1215_, 9);
v_queue_1226_ = lean_ctor_get(v_s_1215_, 10);
v_basis_1227_ = lean_ctor_get(v_s_1215_, 11);
v_diseqs_1228_ = lean_ctor_get(v_s_1215_, 12);
v_recheck_1229_ = lean_ctor_get_uint8(v_s_1215_, sizeof(void*)*15);
v_invSet_1230_ = lean_ctor_get(v_s_1215_, 13);
v_numEq0_x3f_1231_ = lean_ctor_get(v_s_1215_, 14);
v_numEq0Updated_1232_ = lean_ctor_get_uint8(v_s_1215_, sizeof(void*)*15 + 1);
v_isSharedCheck_1264_ = !lean_is_exclusive(v_s_1215_);
if (v_isSharedCheck_1264_ == 0)
{
v___x_1234_ = v_s_1215_;
v_isShared_1235_ = v_isSharedCheck_1264_;
goto v_resetjp_1233_;
}
else
{
lean_inc(v_numEq0_x3f_1231_);
lean_inc(v_invSet_1230_);
lean_inc(v_diseqs_1228_);
lean_inc(v_basis_1227_);
lean_inc(v_queue_1226_);
lean_inc(v_steps_1225_);
lean_inc(v_nextId_1224_);
lean_inc(v_denoteEntries_1223_);
lean_inc(v_fieldInst_x3f_1222_);
lean_inc(v_noZeroDivInst_x3f_1221_);
lean_inc(v_commRingInst_1220_);
lean_inc(v_commSemiringInst_1219_);
lean_inc(v_semiringId_x3f_1218_);
lean_inc(v_invFn_x3f_1217_);
lean_inc(v_toRing_1216_);
lean_dec(v_s_1215_);
v___x_1234_ = lean_box(0);
v_isShared_1235_ = v_isSharedCheck_1264_;
goto v_resetjp_1233_;
}
v_resetjp_1233_:
{
lean_object* v_id_1236_; lean_object* v_type_1237_; lean_object* v_u_1238_; lean_object* v_ringInst_1239_; lean_object* v_semiringInst_1240_; lean_object* v_charInst_x3f_1241_; lean_object* v_addFn_x3f_1242_; lean_object* v_subFn_x3f_1243_; lean_object* v_negFn_x3f_1244_; lean_object* v_powFn_x3f_1245_; lean_object* v_intCastFn_x3f_1246_; lean_object* v_natCastFn_x3f_1247_; lean_object* v_one_x3f_1248_; lean_object* v_vars_1249_; lean_object* v_varMap_1250_; lean_object* v_denote_1251_; lean_object* v___x_1253_; uint8_t v_isShared_1254_; uint8_t v_isSharedCheck_1262_; 
v_id_1236_ = lean_ctor_get(v_toRing_1216_, 0);
v_type_1237_ = lean_ctor_get(v_toRing_1216_, 1);
v_u_1238_ = lean_ctor_get(v_toRing_1216_, 2);
v_ringInst_1239_ = lean_ctor_get(v_toRing_1216_, 3);
v_semiringInst_1240_ = lean_ctor_get(v_toRing_1216_, 4);
v_charInst_x3f_1241_ = lean_ctor_get(v_toRing_1216_, 5);
v_addFn_x3f_1242_ = lean_ctor_get(v_toRing_1216_, 6);
v_subFn_x3f_1243_ = lean_ctor_get(v_toRing_1216_, 8);
v_negFn_x3f_1244_ = lean_ctor_get(v_toRing_1216_, 9);
v_powFn_x3f_1245_ = lean_ctor_get(v_toRing_1216_, 10);
v_intCastFn_x3f_1246_ = lean_ctor_get(v_toRing_1216_, 11);
v_natCastFn_x3f_1247_ = lean_ctor_get(v_toRing_1216_, 12);
v_one_x3f_1248_ = lean_ctor_get(v_toRing_1216_, 13);
v_vars_1249_ = lean_ctor_get(v_toRing_1216_, 14);
v_varMap_1250_ = lean_ctor_get(v_toRing_1216_, 15);
v_denote_1251_ = lean_ctor_get(v_toRing_1216_, 16);
v_isSharedCheck_1262_ = !lean_is_exclusive(v_toRing_1216_);
if (v_isSharedCheck_1262_ == 0)
{
lean_object* v_unused_1263_; 
v_unused_1263_ = lean_ctor_get(v_toRing_1216_, 7);
lean_dec(v_unused_1263_);
v___x_1253_ = v_toRing_1216_;
v_isShared_1254_ = v_isSharedCheck_1262_;
goto v_resetjp_1252_;
}
else
{
lean_inc(v_denote_1251_);
lean_inc(v_varMap_1250_);
lean_inc(v_vars_1249_);
lean_inc(v_one_x3f_1248_);
lean_inc(v_natCastFn_x3f_1247_);
lean_inc(v_intCastFn_x3f_1246_);
lean_inc(v_powFn_x3f_1245_);
lean_inc(v_negFn_x3f_1244_);
lean_inc(v_subFn_x3f_1243_);
lean_inc(v_addFn_x3f_1242_);
lean_inc(v_charInst_x3f_1241_);
lean_inc(v_semiringInst_1240_);
lean_inc(v_ringInst_1239_);
lean_inc(v_u_1238_);
lean_inc(v_type_1237_);
lean_inc(v_id_1236_);
lean_dec(v_toRing_1216_);
v___x_1253_ = lean_box(0);
v_isShared_1254_ = v_isSharedCheck_1262_;
goto v_resetjp_1252_;
}
v_resetjp_1252_:
{
lean_object* v___x_1255_; lean_object* v___x_1257_; 
v___x_1255_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_1255_, 0, v_a_1214_);
if (v_isShared_1254_ == 0)
{
lean_ctor_set(v___x_1253_, 7, v___x_1255_);
v___x_1257_ = v___x_1253_;
goto v_reusejp_1256_;
}
else
{
lean_object* v_reuseFailAlloc_1261_; 
v_reuseFailAlloc_1261_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_1261_, 0, v_id_1236_);
lean_ctor_set(v_reuseFailAlloc_1261_, 1, v_type_1237_);
lean_ctor_set(v_reuseFailAlloc_1261_, 2, v_u_1238_);
lean_ctor_set(v_reuseFailAlloc_1261_, 3, v_ringInst_1239_);
lean_ctor_set(v_reuseFailAlloc_1261_, 4, v_semiringInst_1240_);
lean_ctor_set(v_reuseFailAlloc_1261_, 5, v_charInst_x3f_1241_);
lean_ctor_set(v_reuseFailAlloc_1261_, 6, v_addFn_x3f_1242_);
lean_ctor_set(v_reuseFailAlloc_1261_, 7, v___x_1255_);
lean_ctor_set(v_reuseFailAlloc_1261_, 8, v_subFn_x3f_1243_);
lean_ctor_set(v_reuseFailAlloc_1261_, 9, v_negFn_x3f_1244_);
lean_ctor_set(v_reuseFailAlloc_1261_, 10, v_powFn_x3f_1245_);
lean_ctor_set(v_reuseFailAlloc_1261_, 11, v_intCastFn_x3f_1246_);
lean_ctor_set(v_reuseFailAlloc_1261_, 12, v_natCastFn_x3f_1247_);
lean_ctor_set(v_reuseFailAlloc_1261_, 13, v_one_x3f_1248_);
lean_ctor_set(v_reuseFailAlloc_1261_, 14, v_vars_1249_);
lean_ctor_set(v_reuseFailAlloc_1261_, 15, v_varMap_1250_);
lean_ctor_set(v_reuseFailAlloc_1261_, 16, v_denote_1251_);
v___x_1257_ = v_reuseFailAlloc_1261_;
goto v_reusejp_1256_;
}
v_reusejp_1256_:
{
lean_object* v___x_1259_; 
if (v_isShared_1235_ == 0)
{
lean_ctor_set(v___x_1234_, 0, v___x_1257_);
v___x_1259_ = v___x_1234_;
goto v_reusejp_1258_;
}
else
{
lean_object* v_reuseFailAlloc_1260_; 
v_reuseFailAlloc_1260_ = lean_alloc_ctor(0, 15, 2);
lean_ctor_set(v_reuseFailAlloc_1260_, 0, v___x_1257_);
lean_ctor_set(v_reuseFailAlloc_1260_, 1, v_invFn_x3f_1217_);
lean_ctor_set(v_reuseFailAlloc_1260_, 2, v_semiringId_x3f_1218_);
lean_ctor_set(v_reuseFailAlloc_1260_, 3, v_commSemiringInst_1219_);
lean_ctor_set(v_reuseFailAlloc_1260_, 4, v_commRingInst_1220_);
lean_ctor_set(v_reuseFailAlloc_1260_, 5, v_noZeroDivInst_x3f_1221_);
lean_ctor_set(v_reuseFailAlloc_1260_, 6, v_fieldInst_x3f_1222_);
lean_ctor_set(v_reuseFailAlloc_1260_, 7, v_denoteEntries_1223_);
lean_ctor_set(v_reuseFailAlloc_1260_, 8, v_nextId_1224_);
lean_ctor_set(v_reuseFailAlloc_1260_, 9, v_steps_1225_);
lean_ctor_set(v_reuseFailAlloc_1260_, 10, v_queue_1226_);
lean_ctor_set(v_reuseFailAlloc_1260_, 11, v_basis_1227_);
lean_ctor_set(v_reuseFailAlloc_1260_, 12, v_diseqs_1228_);
lean_ctor_set(v_reuseFailAlloc_1260_, 13, v_invSet_1230_);
lean_ctor_set(v_reuseFailAlloc_1260_, 14, v_numEq0_x3f_1231_);
lean_ctor_set_uint8(v_reuseFailAlloc_1260_, sizeof(void*)*15, v_recheck_1229_);
lean_ctor_set_uint8(v_reuseFailAlloc_1260_, sizeof(void*)*15 + 1, v_numEq0Updated_1232_);
v___x_1259_ = v_reuseFailAlloc_1260_;
goto v_reusejp_1258_;
}
v_reusejp_1258_:
{
return v___x_1259_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7(lean_object* v___y_1279_, lean_object* v___y_1280_, lean_object* v___y_1281_, lean_object* v___y_1282_, lean_object* v___y_1283_, lean_object* v___y_1284_, lean_object* v___y_1285_, lean_object* v___y_1286_, lean_object* v___y_1287_, lean_object* v___y_1288_, lean_object* v___y_1289_){
_start:
{
lean_object* v___x_1291_; 
v___x_1291_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_getCommRing(v___y_1279_, v___y_1280_, v___y_1281_, v___y_1282_, v___y_1283_, v___y_1284_, v___y_1285_, v___y_1286_, v___y_1287_, v___y_1288_, v___y_1289_);
if (lean_obj_tag(v___x_1291_) == 0)
{
lean_object* v_a_1292_; lean_object* v___x_1294_; uint8_t v_isShared_1295_; uint8_t v_isSharedCheck_1335_; 
v_a_1292_ = lean_ctor_get(v___x_1291_, 0);
v_isSharedCheck_1335_ = !lean_is_exclusive(v___x_1291_);
if (v_isSharedCheck_1335_ == 0)
{
v___x_1294_ = v___x_1291_;
v_isShared_1295_ = v_isSharedCheck_1335_;
goto v_resetjp_1293_;
}
else
{
lean_inc(v_a_1292_);
lean_dec(v___x_1291_);
v___x_1294_ = lean_box(0);
v_isShared_1295_ = v_isSharedCheck_1335_;
goto v_resetjp_1293_;
}
v_resetjp_1293_:
{
lean_object* v_toRing_1296_; lean_object* v_mulFn_x3f_1297_; 
v_toRing_1296_ = lean_ctor_get(v_a_1292_, 0);
lean_inc_ref(v_toRing_1296_);
lean_dec(v_a_1292_);
v_mulFn_x3f_1297_ = lean_ctor_get(v_toRing_1296_, 7);
if (lean_obj_tag(v_mulFn_x3f_1297_) == 1)
{
lean_object* v_val_1298_; lean_object* v___x_1300_; 
lean_inc_ref(v_mulFn_x3f_1297_);
lean_dec_ref(v_toRing_1296_);
lean_dec(v___y_1289_);
lean_dec_ref(v___y_1288_);
lean_dec(v___y_1287_);
lean_dec_ref(v___y_1286_);
lean_dec(v___y_1285_);
lean_dec_ref(v___y_1284_);
lean_dec(v___y_1283_);
lean_dec_ref(v___y_1282_);
lean_dec(v___y_1281_);
lean_dec(v___y_1280_);
lean_dec_ref(v___y_1279_);
v_val_1298_ = lean_ctor_get(v_mulFn_x3f_1297_, 0);
lean_inc(v_val_1298_);
lean_dec_ref(v_mulFn_x3f_1297_);
if (v_isShared_1295_ == 0)
{
lean_ctor_set(v___x_1294_, 0, v_val_1298_);
v___x_1300_ = v___x_1294_;
goto v_reusejp_1299_;
}
else
{
lean_object* v_reuseFailAlloc_1301_; 
v_reuseFailAlloc_1301_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1301_, 0, v_val_1298_);
v___x_1300_ = v_reuseFailAlloc_1301_;
goto v_reusejp_1299_;
}
v_reusejp_1299_:
{
return v___x_1300_;
}
}
else
{
lean_object* v_type_1302_; lean_object* v_u_1303_; lean_object* v_semiringInst_1304_; lean_object* v___x_1305_; lean_object* v___x_1306_; lean_object* v___x_1307_; lean_object* v___x_1308_; lean_object* v___x_1309_; lean_object* v___x_1310_; lean_object* v___x_1311_; lean_object* v_expectedInst_1312_; lean_object* v___x_1313_; lean_object* v___x_1314_; lean_object* v___x_1315_; 
lean_del_object(v___x_1294_);
v_type_1302_ = lean_ctor_get(v_toRing_1296_, 1);
lean_inc_ref(v_type_1302_);
v_u_1303_ = lean_ctor_get(v_toRing_1296_, 2);
lean_inc(v_u_1303_);
v_semiringInst_1304_ = lean_ctor_get(v_toRing_1296_, 4);
lean_inc_ref(v_semiringInst_1304_);
lean_dec_ref(v_toRing_1296_);
v___x_1305_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__1));
v___x_1306_ = lean_box(0);
lean_inc(v_u_1303_);
v___x_1307_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_1307_, 0, v_u_1303_);
lean_ctor_set(v___x_1307_, 1, v___x_1306_);
lean_inc_ref(v___x_1307_);
v___x_1308_ = l_Lean_mkConst(v___x_1305_, v___x_1307_);
v___x_1309_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6));
v___x_1310_ = l_Lean_mkConst(v___x_1309_, v___x_1307_);
lean_inc_ref(v_type_1302_);
v___x_1311_ = l_Lean_mkAppB(v___x_1310_, v_type_1302_, v_semiringInst_1304_);
lean_inc_ref(v_type_1302_);
v_expectedInst_1312_ = l_Lean_mkAppB(v___x_1308_, v_type_1302_, v___x_1311_);
v___x_1313_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__7));
v___x_1314_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
lean_inc(v___y_1280_);
v___x_1315_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8(v_type_1302_, v_u_1303_, v___x_1313_, v___x_1314_, v_expectedInst_1312_, v___y_1279_, v___y_1280_, v___y_1281_, v___y_1282_, v___y_1283_, v___y_1284_, v___y_1285_, v___y_1286_, v___y_1287_, v___y_1288_, v___y_1289_);
if (lean_obj_tag(v___x_1315_) == 0)
{
lean_object* v_a_1316_; lean_object* v___f_1317_; lean_object* v___x_1318_; 
v_a_1316_ = lean_ctor_get(v___x_1315_, 0);
lean_inc(v_a_1316_);
lean_dec_ref(v___x_1315_);
lean_inc(v_a_1316_);
v___f_1317_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___lam__0), 2, 1);
lean_closure_set(v___f_1317_, 0, v_a_1316_);
v___x_1318_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_modifyCommRing___redArg(v___f_1317_, v___y_1279_, v___y_1280_);
lean_dec(v___y_1280_);
if (lean_obj_tag(v___x_1318_) == 0)
{
lean_object* v___x_1320_; uint8_t v_isShared_1321_; uint8_t v_isSharedCheck_1325_; 
v_isSharedCheck_1325_ = !lean_is_exclusive(v___x_1318_);
if (v_isSharedCheck_1325_ == 0)
{
lean_object* v_unused_1326_; 
v_unused_1326_ = lean_ctor_get(v___x_1318_, 0);
lean_dec(v_unused_1326_);
v___x_1320_ = v___x_1318_;
v_isShared_1321_ = v_isSharedCheck_1325_;
goto v_resetjp_1319_;
}
else
{
lean_dec(v___x_1318_);
v___x_1320_ = lean_box(0);
v_isShared_1321_ = v_isSharedCheck_1325_;
goto v_resetjp_1319_;
}
v_resetjp_1319_:
{
lean_object* v___x_1323_; 
if (v_isShared_1321_ == 0)
{
lean_ctor_set(v___x_1320_, 0, v_a_1316_);
v___x_1323_ = v___x_1320_;
goto v_reusejp_1322_;
}
else
{
lean_object* v_reuseFailAlloc_1324_; 
v_reuseFailAlloc_1324_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1324_, 0, v_a_1316_);
v___x_1323_ = v_reuseFailAlloc_1324_;
goto v_reusejp_1322_;
}
v_reusejp_1322_:
{
return v___x_1323_;
}
}
}
else
{
lean_object* v_a_1327_; lean_object* v___x_1329_; uint8_t v_isShared_1330_; uint8_t v_isSharedCheck_1334_; 
lean_dec(v_a_1316_);
v_a_1327_ = lean_ctor_get(v___x_1318_, 0);
v_isSharedCheck_1334_ = !lean_is_exclusive(v___x_1318_);
if (v_isSharedCheck_1334_ == 0)
{
v___x_1329_ = v___x_1318_;
v_isShared_1330_ = v_isSharedCheck_1334_;
goto v_resetjp_1328_;
}
else
{
lean_inc(v_a_1327_);
lean_dec(v___x_1318_);
v___x_1329_ = lean_box(0);
v_isShared_1330_ = v_isSharedCheck_1334_;
goto v_resetjp_1328_;
}
v_resetjp_1328_:
{
lean_object* v___x_1332_; 
if (v_isShared_1330_ == 0)
{
v___x_1332_ = v___x_1329_;
goto v_reusejp_1331_;
}
else
{
lean_object* v_reuseFailAlloc_1333_; 
v_reuseFailAlloc_1333_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1333_, 0, v_a_1327_);
v___x_1332_ = v_reuseFailAlloc_1333_;
goto v_reusejp_1331_;
}
v_reusejp_1331_:
{
return v___x_1332_;
}
}
}
}
else
{
lean_dec(v___y_1280_);
lean_dec_ref(v___y_1279_);
return v___x_1315_;
}
}
}
}
else
{
lean_object* v_a_1336_; lean_object* v___x_1338_; uint8_t v_isShared_1339_; uint8_t v_isSharedCheck_1343_; 
lean_dec(v___y_1289_);
lean_dec_ref(v___y_1288_);
lean_dec(v___y_1287_);
lean_dec_ref(v___y_1286_);
lean_dec(v___y_1285_);
lean_dec_ref(v___y_1284_);
lean_dec(v___y_1283_);
lean_dec_ref(v___y_1282_);
lean_dec(v___y_1281_);
lean_dec(v___y_1280_);
lean_dec_ref(v___y_1279_);
v_a_1336_ = lean_ctor_get(v___x_1291_, 0);
v_isSharedCheck_1343_ = !lean_is_exclusive(v___x_1291_);
if (v_isSharedCheck_1343_ == 0)
{
v___x_1338_ = v___x_1291_;
v_isShared_1339_ = v_isSharedCheck_1343_;
goto v_resetjp_1337_;
}
else
{
lean_inc(v_a_1336_);
lean_dec(v___x_1291_);
v___x_1338_ = lean_box(0);
v_isShared_1339_ = v_isSharedCheck_1343_;
goto v_resetjp_1337_;
}
v_resetjp_1337_:
{
lean_object* v___x_1341_; 
if (v_isShared_1339_ == 0)
{
v___x_1341_ = v___x_1338_;
goto v_reusejp_1340_;
}
else
{
lean_object* v_reuseFailAlloc_1342_; 
v_reuseFailAlloc_1342_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1342_, 0, v_a_1336_);
v___x_1341_ = v_reuseFailAlloc_1342_;
goto v_reusejp_1340_;
}
v_reusejp_1340_:
{
return v___x_1341_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___boxed(lean_object* v___y_1344_, lean_object* v___y_1345_, lean_object* v___y_1346_, lean_object* v___y_1347_, lean_object* v___y_1348_, lean_object* v___y_1349_, lean_object* v___y_1350_, lean_object* v___y_1351_, lean_object* v___y_1352_, lean_object* v___y_1353_, lean_object* v___y_1354_, lean_object* v___y_1355_){
_start:
{
lean_object* v_res_1356_; 
v_res_1356_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7(v___y_1344_, v___y_1345_, v___y_1346_, v___y_1347_, v___y_1348_, v___y_1349_, v___y_1350_, v___y_1351_, v___y_1352_, v___y_1353_, v___y_1354_);
return v_res_1356_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3(lean_object* v_inst_1357_, lean_object* v___y_1358_, lean_object* v___y_1359_, lean_object* v___y_1360_, lean_object* v___y_1361_, lean_object* v___y_1362_, lean_object* v___y_1363_, lean_object* v___y_1364_, lean_object* v___y_1365_, lean_object* v___y_1366_, lean_object* v___y_1367_, lean_object* v___y_1368_){
_start:
{
lean_object* v___x_1370_; 
v___x_1370_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7(v___y_1358_, v___y_1359_, v___y_1360_, v___y_1361_, v___y_1362_, v___y_1363_, v___y_1364_, v___y_1365_, v___y_1366_, v___y_1367_, v___y_1368_);
if (lean_obj_tag(v___x_1370_) == 0)
{
lean_object* v_a_1371_; lean_object* v___x_1373_; uint8_t v_isShared_1374_; uint8_t v_isSharedCheck_1381_; 
v_a_1371_ = lean_ctor_get(v___x_1370_, 0);
v_isSharedCheck_1381_ = !lean_is_exclusive(v___x_1370_);
if (v_isSharedCheck_1381_ == 0)
{
v___x_1373_ = v___x_1370_;
v_isShared_1374_ = v_isSharedCheck_1381_;
goto v_resetjp_1372_;
}
else
{
lean_inc(v_a_1371_);
lean_dec(v___x_1370_);
v___x_1373_ = lean_box(0);
v_isShared_1374_ = v_isSharedCheck_1381_;
goto v_resetjp_1372_;
}
v_resetjp_1372_:
{
lean_object* v___x_1375_; uint8_t v___x_1376_; lean_object* v___x_1377_; lean_object* v___x_1379_; 
v___x_1375_ = l_Lean_Expr_appArg_x21(v_a_1371_);
lean_dec(v_a_1371_);
v___x_1376_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_1375_, v_inst_1357_);
lean_dec_ref(v___x_1375_);
v___x_1377_ = lean_box(v___x_1376_);
if (v_isShared_1374_ == 0)
{
lean_ctor_set(v___x_1373_, 0, v___x_1377_);
v___x_1379_ = v___x_1373_;
goto v_reusejp_1378_;
}
else
{
lean_object* v_reuseFailAlloc_1380_; 
v_reuseFailAlloc_1380_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1380_, 0, v___x_1377_);
v___x_1379_ = v_reuseFailAlloc_1380_;
goto v_reusejp_1378_;
}
v_reusejp_1378_:
{
return v___x_1379_;
}
}
}
else
{
lean_object* v_a_1382_; lean_object* v___x_1384_; uint8_t v_isShared_1385_; uint8_t v_isSharedCheck_1389_; 
v_a_1382_ = lean_ctor_get(v___x_1370_, 0);
v_isSharedCheck_1389_ = !lean_is_exclusive(v___x_1370_);
if (v_isSharedCheck_1389_ == 0)
{
v___x_1384_ = v___x_1370_;
v_isShared_1385_ = v_isSharedCheck_1389_;
goto v_resetjp_1383_;
}
else
{
lean_inc(v_a_1382_);
lean_dec(v___x_1370_);
v___x_1384_ = lean_box(0);
v_isShared_1385_ = v_isSharedCheck_1389_;
goto v_resetjp_1383_;
}
v_resetjp_1383_:
{
lean_object* v___x_1387_; 
if (v_isShared_1385_ == 0)
{
v___x_1387_ = v___x_1384_;
goto v_reusejp_1386_;
}
else
{
lean_object* v_reuseFailAlloc_1388_; 
v_reuseFailAlloc_1388_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1388_, 0, v_a_1382_);
v___x_1387_ = v_reuseFailAlloc_1388_;
goto v_reusejp_1386_;
}
v_reusejp_1386_:
{
return v___x_1387_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3___boxed(lean_object* v_inst_1390_, lean_object* v___y_1391_, lean_object* v___y_1392_, lean_object* v___y_1393_, lean_object* v___y_1394_, lean_object* v___y_1395_, lean_object* v___y_1396_, lean_object* v___y_1397_, lean_object* v___y_1398_, lean_object* v___y_1399_, lean_object* v___y_1400_, lean_object* v___y_1401_, lean_object* v___y_1402_){
_start:
{
lean_object* v_res_1403_; 
v_res_1403_ = l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3(v_inst_1390_, v___y_1391_, v___y_1392_, v___y_1393_, v___y_1394_, v___y_1395_, v___y_1396_, v___y_1397_, v___y_1398_, v___y_1399_, v___y_1400_, v___y_1401_);
lean_dec_ref(v_inst_1390_);
return v_res_1403_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__1(lean_object* v_mkVar_1404_, lean_object* v_e_1405_, lean_object* v___y_1406_, lean_object* v___y_1407_, lean_object* v___y_1408_, lean_object* v___y_1409_, lean_object* v___y_1410_, lean_object* v___y_1411_, lean_object* v___y_1412_, lean_object* v___y_1413_, lean_object* v___y_1414_, lean_object* v___y_1415_, lean_object* v___y_1416_){
_start:
{
lean_object* v___x_1418_; 
v___x_1418_ = lean_apply_13(v_mkVar_1404_, v_e_1405_, v___y_1406_, v___y_1407_, v___y_1408_, v___y_1409_, v___y_1410_, v___y_1411_, v___y_1412_, v___y_1413_, v___y_1414_, v___y_1415_, v___y_1416_, lean_box(0));
if (lean_obj_tag(v___x_1418_) == 0)
{
lean_object* v_a_1419_; lean_object* v___x_1421_; uint8_t v_isShared_1422_; uint8_t v_isSharedCheck_1427_; 
v_a_1419_ = lean_ctor_get(v___x_1418_, 0);
v_isSharedCheck_1427_ = !lean_is_exclusive(v___x_1418_);
if (v_isSharedCheck_1427_ == 0)
{
v___x_1421_ = v___x_1418_;
v_isShared_1422_ = v_isSharedCheck_1427_;
goto v_resetjp_1420_;
}
else
{
lean_inc(v_a_1419_);
lean_dec(v___x_1418_);
v___x_1421_ = lean_box(0);
v_isShared_1422_ = v_isSharedCheck_1427_;
goto v_resetjp_1420_;
}
v_resetjp_1420_:
{
lean_object* v___x_1423_; lean_object* v___x_1425_; 
v___x_1423_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_1423_, 0, v_a_1419_);
if (v_isShared_1422_ == 0)
{
lean_ctor_set(v___x_1421_, 0, v___x_1423_);
v___x_1425_ = v___x_1421_;
goto v_reusejp_1424_;
}
else
{
lean_object* v_reuseFailAlloc_1426_; 
v_reuseFailAlloc_1426_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1426_, 0, v___x_1423_);
v___x_1425_ = v_reuseFailAlloc_1426_;
goto v_reusejp_1424_;
}
v_reusejp_1424_:
{
return v___x_1425_;
}
}
}
else
{
lean_object* v_a_1428_; lean_object* v___x_1430_; uint8_t v_isShared_1431_; uint8_t v_isSharedCheck_1435_; 
v_a_1428_ = lean_ctor_get(v___x_1418_, 0);
v_isSharedCheck_1435_ = !lean_is_exclusive(v___x_1418_);
if (v_isSharedCheck_1435_ == 0)
{
v___x_1430_ = v___x_1418_;
v_isShared_1431_ = v_isSharedCheck_1435_;
goto v_resetjp_1429_;
}
else
{
lean_inc(v_a_1428_);
lean_dec(v___x_1418_);
v___x_1430_ = lean_box(0);
v_isShared_1431_ = v_isSharedCheck_1435_;
goto v_resetjp_1429_;
}
v_resetjp_1429_:
{
lean_object* v___x_1433_; 
if (v_isShared_1431_ == 0)
{
v___x_1433_ = v___x_1430_;
goto v_reusejp_1432_;
}
else
{
lean_object* v_reuseFailAlloc_1434_; 
v_reuseFailAlloc_1434_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1434_, 0, v_a_1428_);
v___x_1433_ = v_reuseFailAlloc_1434_;
goto v_reusejp_1432_;
}
v_reusejp_1432_:
{
return v___x_1433_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__1___boxed(lean_object* v_mkVar_1436_, lean_object* v_e_1437_, lean_object* v___y_1438_, lean_object* v___y_1439_, lean_object* v___y_1440_, lean_object* v___y_1441_, lean_object* v___y_1442_, lean_object* v___y_1443_, lean_object* v___y_1444_, lean_object* v___y_1445_, lean_object* v___y_1446_, lean_object* v___y_1447_, lean_object* v___y_1448_, lean_object* v___y_1449_){
_start:
{
lean_object* v_res_1450_; 
v_res_1450_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__1(v_mkVar_1436_, v_e_1437_, v___y_1438_, v___y_1439_, v___y_1440_, v___y_1441_, v___y_1442_, v___y_1443_, v___y_1444_, v___y_1445_, v___y_1446_, v___y_1447_, v___y_1448_);
return v_res_1450_;
}
}
static lean_object* _init_l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1(void){
_start:
{
lean_object* v___x_1453_; lean_object* v___x_1454_; 
v___x_1453_ = lean_unsigned_to_nat(0u);
v___x_1454_ = l_Lean_Level_ofNat(v___x_1453_);
return v___x_1454_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16(lean_object* v_u_1461_, lean_object* v_type_1462_, lean_object* v_semiringInst_1463_, lean_object* v___y_1464_, lean_object* v___y_1465_, lean_object* v___y_1466_, lean_object* v___y_1467_, lean_object* v___y_1468_, lean_object* v___y_1469_, lean_object* v___y_1470_, lean_object* v___y_1471_, lean_object* v___y_1472_, lean_object* v___y_1473_, lean_object* v___y_1474_){
_start:
{
lean_object* v___x_1476_; lean_object* v___x_1477_; lean_object* v___x_1478_; lean_object* v___x_1479_; lean_object* v___x_1480_; lean_object* v___x_1481_; lean_object* v___x_1482_; lean_object* v___x_1483_; lean_object* v___x_1484_; lean_object* v___x_1485_; 
v___x_1476_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__0));
v___x_1477_ = lean_obj_once(&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1, &l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1_once, _init_l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1);
v___x_1478_ = lean_box(0);
lean_inc(v_u_1461_);
v___x_1479_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_1479_, 0, v_u_1461_);
lean_ctor_set(v___x_1479_, 1, v___x_1478_);
lean_inc_ref(v___x_1479_);
v___x_1480_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_1480_, 0, v___x_1477_);
lean_ctor_set(v___x_1480_, 1, v___x_1479_);
v___x_1481_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_1481_, 0, v_u_1461_);
lean_ctor_set(v___x_1481_, 1, v___x_1480_);
lean_inc_ref(v___x_1481_);
v___x_1482_ = l_Lean_mkConst(v___x_1476_, v___x_1481_);
v___x_1483_ = l_Lean_Nat_mkType;
lean_inc_ref_n(v_type_1462_, 2);
v___x_1484_ = l_Lean_mkApp3(v___x_1482_, v_type_1462_, v___x_1483_, v_type_1462_);
lean_inc(v___y_1474_);
lean_inc_ref(v___y_1473_);
lean_inc(v___y_1472_);
lean_inc_ref(v___y_1471_);
v___x_1485_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20(v___x_1484_, v___y_1464_, v___y_1465_, v___y_1466_, v___y_1467_, v___y_1468_, v___y_1469_, v___y_1470_, v___y_1471_, v___y_1472_, v___y_1473_, v___y_1474_);
if (lean_obj_tag(v___x_1485_) == 0)
{
lean_object* v_a_1486_; lean_object* v___x_1487_; lean_object* v___x_1488_; lean_object* v_inst_x27_1489_; lean_object* v___x_1490_; lean_object* v___x_1491_; 
v_a_1486_ = lean_ctor_get(v___x_1485_, 0);
lean_inc(v_a_1486_);
lean_dec_ref(v___x_1485_);
v___x_1487_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3));
v___x_1488_ = l_Lean_mkConst(v___x_1487_, v___x_1479_);
lean_inc_ref(v_type_1462_);
v_inst_x27_1489_ = l_Lean_mkAppB(v___x_1488_, v_type_1462_, v_semiringInst_1463_);
v___x_1490_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
lean_inc(v___y_1474_);
lean_inc_ref(v___y_1473_);
lean_inc(v___y_1472_);
lean_inc_ref(v___y_1471_);
lean_inc(v_a_1486_);
v___x_1491_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v___x_1490_, v_a_1486_, v_inst_x27_1489_, v___y_1471_, v___y_1472_, v___y_1473_, v___y_1474_);
if (lean_obj_tag(v___x_1491_) == 0)
{
lean_object* v___x_1492_; lean_object* v___x_1493_; lean_object* v___x_1494_; 
lean_dec_ref(v___x_1491_);
v___x_1492_ = l_Lean_mkConst(v___x_1490_, v___x_1481_);
lean_inc_ref(v_type_1462_);
v___x_1493_ = l_Lean_mkApp4(v___x_1492_, v_type_1462_, v___x_1483_, v_type_1462_, v_a_1486_);
lean_inc(v___y_1470_);
v___x_1494_ = lean_grind_canon(v___x_1493_, v___y_1465_, v___y_1466_, v___y_1467_, v___y_1468_, v___y_1469_, v___y_1470_, v___y_1471_, v___y_1472_, v___y_1473_, v___y_1474_);
if (lean_obj_tag(v___x_1494_) == 0)
{
lean_object* v_a_1495_; lean_object* v___x_1496_; 
v_a_1495_ = lean_ctor_get(v___x_1494_, 0);
lean_inc(v_a_1495_);
lean_dec_ref(v___x_1494_);
v___x_1496_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_1495_, v___y_1470_);
lean_dec(v___y_1470_);
return v___x_1496_;
}
else
{
lean_dec(v___y_1470_);
return v___x_1494_;
}
}
else
{
lean_object* v_a_1497_; lean_object* v___x_1499_; uint8_t v_isShared_1500_; uint8_t v_isSharedCheck_1504_; 
lean_dec(v_a_1486_);
lean_dec_ref(v___x_1481_);
lean_dec(v___y_1474_);
lean_dec_ref(v___y_1473_);
lean_dec(v___y_1472_);
lean_dec_ref(v___y_1471_);
lean_dec(v___y_1470_);
lean_dec_ref(v___y_1469_);
lean_dec(v___y_1468_);
lean_dec_ref(v___y_1467_);
lean_dec(v___y_1466_);
lean_dec(v___y_1465_);
lean_dec_ref(v_type_1462_);
v_a_1497_ = lean_ctor_get(v___x_1491_, 0);
v_isSharedCheck_1504_ = !lean_is_exclusive(v___x_1491_);
if (v_isSharedCheck_1504_ == 0)
{
v___x_1499_ = v___x_1491_;
v_isShared_1500_ = v_isSharedCheck_1504_;
goto v_resetjp_1498_;
}
else
{
lean_inc(v_a_1497_);
lean_dec(v___x_1491_);
v___x_1499_ = lean_box(0);
v_isShared_1500_ = v_isSharedCheck_1504_;
goto v_resetjp_1498_;
}
v_resetjp_1498_:
{
lean_object* v___x_1502_; 
if (v_isShared_1500_ == 0)
{
v___x_1502_ = v___x_1499_;
goto v_reusejp_1501_;
}
else
{
lean_object* v_reuseFailAlloc_1503_; 
v_reuseFailAlloc_1503_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1503_, 0, v_a_1497_);
v___x_1502_ = v_reuseFailAlloc_1503_;
goto v_reusejp_1501_;
}
v_reusejp_1501_:
{
return v___x_1502_;
}
}
}
}
else
{
lean_dec_ref(v___x_1481_);
lean_dec_ref(v___x_1479_);
lean_dec(v___y_1474_);
lean_dec_ref(v___y_1473_);
lean_dec(v___y_1472_);
lean_dec_ref(v___y_1471_);
lean_dec(v___y_1470_);
lean_dec_ref(v___y_1469_);
lean_dec(v___y_1468_);
lean_dec_ref(v___y_1467_);
lean_dec(v___y_1466_);
lean_dec(v___y_1465_);
lean_dec_ref(v_semiringInst_1463_);
lean_dec_ref(v_type_1462_);
return v___x_1485_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___boxed(lean_object* v_u_1505_, lean_object* v_type_1506_, lean_object* v_semiringInst_1507_, lean_object* v___y_1508_, lean_object* v___y_1509_, lean_object* v___y_1510_, lean_object* v___y_1511_, lean_object* v___y_1512_, lean_object* v___y_1513_, lean_object* v___y_1514_, lean_object* v___y_1515_, lean_object* v___y_1516_, lean_object* v___y_1517_, lean_object* v___y_1518_, lean_object* v___y_1519_){
_start:
{
lean_object* v_res_1520_; 
v_res_1520_ = l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16(v_u_1505_, v_type_1506_, v_semiringInst_1507_, v___y_1508_, v___y_1509_, v___y_1510_, v___y_1511_, v___y_1512_, v___y_1513_, v___y_1514_, v___y_1515_, v___y_1516_, v___y_1517_, v___y_1518_);
lean_dec_ref(v___y_1508_);
return v_res_1520_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11___lam__0(lean_object* v_a_1521_, lean_object* v_s_1522_){
_start:
{
lean_object* v_toRing_1523_; lean_object* v_invFn_x3f_1524_; lean_object* v_semiringId_x3f_1525_; lean_object* v_commSemiringInst_1526_; lean_object* v_commRingInst_1527_; lean_object* v_noZeroDivInst_x3f_1528_; lean_object* v_fieldInst_x3f_1529_; lean_object* v_denoteEntries_1530_; lean_object* v_nextId_1531_; lean_object* v_steps_1532_; lean_object* v_queue_1533_; lean_object* v_basis_1534_; lean_object* v_diseqs_1535_; uint8_t v_recheck_1536_; lean_object* v_invSet_1537_; lean_object* v_numEq0_x3f_1538_; uint8_t v_numEq0Updated_1539_; lean_object* v___x_1541_; uint8_t v_isShared_1542_; uint8_t v_isSharedCheck_1571_; 
v_toRing_1523_ = lean_ctor_get(v_s_1522_, 0);
v_invFn_x3f_1524_ = lean_ctor_get(v_s_1522_, 1);
v_semiringId_x3f_1525_ = lean_ctor_get(v_s_1522_, 2);
v_commSemiringInst_1526_ = lean_ctor_get(v_s_1522_, 3);
v_commRingInst_1527_ = lean_ctor_get(v_s_1522_, 4);
v_noZeroDivInst_x3f_1528_ = lean_ctor_get(v_s_1522_, 5);
v_fieldInst_x3f_1529_ = lean_ctor_get(v_s_1522_, 6);
v_denoteEntries_1530_ = lean_ctor_get(v_s_1522_, 7);
v_nextId_1531_ = lean_ctor_get(v_s_1522_, 8);
v_steps_1532_ = lean_ctor_get(v_s_1522_, 9);
v_queue_1533_ = lean_ctor_get(v_s_1522_, 10);
v_basis_1534_ = lean_ctor_get(v_s_1522_, 11);
v_diseqs_1535_ = lean_ctor_get(v_s_1522_, 12);
v_recheck_1536_ = lean_ctor_get_uint8(v_s_1522_, sizeof(void*)*15);
v_invSet_1537_ = lean_ctor_get(v_s_1522_, 13);
v_numEq0_x3f_1538_ = lean_ctor_get(v_s_1522_, 14);
v_numEq0Updated_1539_ = lean_ctor_get_uint8(v_s_1522_, sizeof(void*)*15 + 1);
v_isSharedCheck_1571_ = !lean_is_exclusive(v_s_1522_);
if (v_isSharedCheck_1571_ == 0)
{
v___x_1541_ = v_s_1522_;
v_isShared_1542_ = v_isSharedCheck_1571_;
goto v_resetjp_1540_;
}
else
{
lean_inc(v_numEq0_x3f_1538_);
lean_inc(v_invSet_1537_);
lean_inc(v_diseqs_1535_);
lean_inc(v_basis_1534_);
lean_inc(v_queue_1533_);
lean_inc(v_steps_1532_);
lean_inc(v_nextId_1531_);
lean_inc(v_denoteEntries_1530_);
lean_inc(v_fieldInst_x3f_1529_);
lean_inc(v_noZeroDivInst_x3f_1528_);
lean_inc(v_commRingInst_1527_);
lean_inc(v_commSemiringInst_1526_);
lean_inc(v_semiringId_x3f_1525_);
lean_inc(v_invFn_x3f_1524_);
lean_inc(v_toRing_1523_);
lean_dec(v_s_1522_);
v___x_1541_ = lean_box(0);
v_isShared_1542_ = v_isSharedCheck_1571_;
goto v_resetjp_1540_;
}
v_resetjp_1540_:
{
lean_object* v_id_1543_; lean_object* v_type_1544_; lean_object* v_u_1545_; lean_object* v_ringInst_1546_; lean_object* v_semiringInst_1547_; lean_object* v_charInst_x3f_1548_; lean_object* v_addFn_x3f_1549_; lean_object* v_mulFn_x3f_1550_; lean_object* v_subFn_x3f_1551_; lean_object* v_negFn_x3f_1552_; lean_object* v_intCastFn_x3f_1553_; lean_object* v_natCastFn_x3f_1554_; lean_object* v_one_x3f_1555_; lean_object* v_vars_1556_; lean_object* v_varMap_1557_; lean_object* v_denote_1558_; lean_object* v___x_1560_; uint8_t v_isShared_1561_; uint8_t v_isSharedCheck_1569_; 
v_id_1543_ = lean_ctor_get(v_toRing_1523_, 0);
v_type_1544_ = lean_ctor_get(v_toRing_1523_, 1);
v_u_1545_ = lean_ctor_get(v_toRing_1523_, 2);
v_ringInst_1546_ = lean_ctor_get(v_toRing_1523_, 3);
v_semiringInst_1547_ = lean_ctor_get(v_toRing_1523_, 4);
v_charInst_x3f_1548_ = lean_ctor_get(v_toRing_1523_, 5);
v_addFn_x3f_1549_ = lean_ctor_get(v_toRing_1523_, 6);
v_mulFn_x3f_1550_ = lean_ctor_get(v_toRing_1523_, 7);
v_subFn_x3f_1551_ = lean_ctor_get(v_toRing_1523_, 8);
v_negFn_x3f_1552_ = lean_ctor_get(v_toRing_1523_, 9);
v_intCastFn_x3f_1553_ = lean_ctor_get(v_toRing_1523_, 11);
v_natCastFn_x3f_1554_ = lean_ctor_get(v_toRing_1523_, 12);
v_one_x3f_1555_ = lean_ctor_get(v_toRing_1523_, 13);
v_vars_1556_ = lean_ctor_get(v_toRing_1523_, 14);
v_varMap_1557_ = lean_ctor_get(v_toRing_1523_, 15);
v_denote_1558_ = lean_ctor_get(v_toRing_1523_, 16);
v_isSharedCheck_1569_ = !lean_is_exclusive(v_toRing_1523_);
if (v_isSharedCheck_1569_ == 0)
{
lean_object* v_unused_1570_; 
v_unused_1570_ = lean_ctor_get(v_toRing_1523_, 10);
lean_dec(v_unused_1570_);
v___x_1560_ = v_toRing_1523_;
v_isShared_1561_ = v_isSharedCheck_1569_;
goto v_resetjp_1559_;
}
else
{
lean_inc(v_denote_1558_);
lean_inc(v_varMap_1557_);
lean_inc(v_vars_1556_);
lean_inc(v_one_x3f_1555_);
lean_inc(v_natCastFn_x3f_1554_);
lean_inc(v_intCastFn_x3f_1553_);
lean_inc(v_negFn_x3f_1552_);
lean_inc(v_subFn_x3f_1551_);
lean_inc(v_mulFn_x3f_1550_);
lean_inc(v_addFn_x3f_1549_);
lean_inc(v_charInst_x3f_1548_);
lean_inc(v_semiringInst_1547_);
lean_inc(v_ringInst_1546_);
lean_inc(v_u_1545_);
lean_inc(v_type_1544_);
lean_inc(v_id_1543_);
lean_dec(v_toRing_1523_);
v___x_1560_ = lean_box(0);
v_isShared_1561_ = v_isSharedCheck_1569_;
goto v_resetjp_1559_;
}
v_resetjp_1559_:
{
lean_object* v___x_1562_; lean_object* v___x_1564_; 
v___x_1562_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_1562_, 0, v_a_1521_);
if (v_isShared_1561_ == 0)
{
lean_ctor_set(v___x_1560_, 10, v___x_1562_);
v___x_1564_ = v___x_1560_;
goto v_reusejp_1563_;
}
else
{
lean_object* v_reuseFailAlloc_1568_; 
v_reuseFailAlloc_1568_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_1568_, 0, v_id_1543_);
lean_ctor_set(v_reuseFailAlloc_1568_, 1, v_type_1544_);
lean_ctor_set(v_reuseFailAlloc_1568_, 2, v_u_1545_);
lean_ctor_set(v_reuseFailAlloc_1568_, 3, v_ringInst_1546_);
lean_ctor_set(v_reuseFailAlloc_1568_, 4, v_semiringInst_1547_);
lean_ctor_set(v_reuseFailAlloc_1568_, 5, v_charInst_x3f_1548_);
lean_ctor_set(v_reuseFailAlloc_1568_, 6, v_addFn_x3f_1549_);
lean_ctor_set(v_reuseFailAlloc_1568_, 7, v_mulFn_x3f_1550_);
lean_ctor_set(v_reuseFailAlloc_1568_, 8, v_subFn_x3f_1551_);
lean_ctor_set(v_reuseFailAlloc_1568_, 9, v_negFn_x3f_1552_);
lean_ctor_set(v_reuseFailAlloc_1568_, 10, v___x_1562_);
lean_ctor_set(v_reuseFailAlloc_1568_, 11, v_intCastFn_x3f_1553_);
lean_ctor_set(v_reuseFailAlloc_1568_, 12, v_natCastFn_x3f_1554_);
lean_ctor_set(v_reuseFailAlloc_1568_, 13, v_one_x3f_1555_);
lean_ctor_set(v_reuseFailAlloc_1568_, 14, v_vars_1556_);
lean_ctor_set(v_reuseFailAlloc_1568_, 15, v_varMap_1557_);
lean_ctor_set(v_reuseFailAlloc_1568_, 16, v_denote_1558_);
v___x_1564_ = v_reuseFailAlloc_1568_;
goto v_reusejp_1563_;
}
v_reusejp_1563_:
{
lean_object* v___x_1566_; 
if (v_isShared_1542_ == 0)
{
lean_ctor_set(v___x_1541_, 0, v___x_1564_);
v___x_1566_ = v___x_1541_;
goto v_reusejp_1565_;
}
else
{
lean_object* v_reuseFailAlloc_1567_; 
v_reuseFailAlloc_1567_ = lean_alloc_ctor(0, 15, 2);
lean_ctor_set(v_reuseFailAlloc_1567_, 0, v___x_1564_);
lean_ctor_set(v_reuseFailAlloc_1567_, 1, v_invFn_x3f_1524_);
lean_ctor_set(v_reuseFailAlloc_1567_, 2, v_semiringId_x3f_1525_);
lean_ctor_set(v_reuseFailAlloc_1567_, 3, v_commSemiringInst_1526_);
lean_ctor_set(v_reuseFailAlloc_1567_, 4, v_commRingInst_1527_);
lean_ctor_set(v_reuseFailAlloc_1567_, 5, v_noZeroDivInst_x3f_1528_);
lean_ctor_set(v_reuseFailAlloc_1567_, 6, v_fieldInst_x3f_1529_);
lean_ctor_set(v_reuseFailAlloc_1567_, 7, v_denoteEntries_1530_);
lean_ctor_set(v_reuseFailAlloc_1567_, 8, v_nextId_1531_);
lean_ctor_set(v_reuseFailAlloc_1567_, 9, v_steps_1532_);
lean_ctor_set(v_reuseFailAlloc_1567_, 10, v_queue_1533_);
lean_ctor_set(v_reuseFailAlloc_1567_, 11, v_basis_1534_);
lean_ctor_set(v_reuseFailAlloc_1567_, 12, v_diseqs_1535_);
lean_ctor_set(v_reuseFailAlloc_1567_, 13, v_invSet_1537_);
lean_ctor_set(v_reuseFailAlloc_1567_, 14, v_numEq0_x3f_1538_);
lean_ctor_set_uint8(v_reuseFailAlloc_1567_, sizeof(void*)*15, v_recheck_1536_);
lean_ctor_set_uint8(v_reuseFailAlloc_1567_, sizeof(void*)*15 + 1, v_numEq0Updated_1539_);
v___x_1566_ = v_reuseFailAlloc_1567_;
goto v_reusejp_1565_;
}
v_reusejp_1565_:
{
return v___x_1566_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11(lean_object* v___y_1572_, lean_object* v___y_1573_, lean_object* v___y_1574_, lean_object* v___y_1575_, lean_object* v___y_1576_, lean_object* v___y_1577_, lean_object* v___y_1578_, lean_object* v___y_1579_, lean_object* v___y_1580_, lean_object* v___y_1581_, lean_object* v___y_1582_){
_start:
{
lean_object* v___x_1584_; 
v___x_1584_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_getCommRing(v___y_1572_, v___y_1573_, v___y_1574_, v___y_1575_, v___y_1576_, v___y_1577_, v___y_1578_, v___y_1579_, v___y_1580_, v___y_1581_, v___y_1582_);
if (lean_obj_tag(v___x_1584_) == 0)
{
lean_object* v_a_1585_; lean_object* v___x_1587_; uint8_t v_isShared_1588_; uint8_t v_isSharedCheck_1618_; 
v_a_1585_ = lean_ctor_get(v___x_1584_, 0);
v_isSharedCheck_1618_ = !lean_is_exclusive(v___x_1584_);
if (v_isSharedCheck_1618_ == 0)
{
v___x_1587_ = v___x_1584_;
v_isShared_1588_ = v_isSharedCheck_1618_;
goto v_resetjp_1586_;
}
else
{
lean_inc(v_a_1585_);
lean_dec(v___x_1584_);
v___x_1587_ = lean_box(0);
v_isShared_1588_ = v_isSharedCheck_1618_;
goto v_resetjp_1586_;
}
v_resetjp_1586_:
{
lean_object* v_toRing_1589_; lean_object* v_powFn_x3f_1590_; 
v_toRing_1589_ = lean_ctor_get(v_a_1585_, 0);
lean_inc_ref(v_toRing_1589_);
lean_dec(v_a_1585_);
v_powFn_x3f_1590_ = lean_ctor_get(v_toRing_1589_, 10);
if (lean_obj_tag(v_powFn_x3f_1590_) == 1)
{
lean_object* v_val_1591_; lean_object* v___x_1593_; 
lean_inc_ref(v_powFn_x3f_1590_);
lean_dec_ref(v_toRing_1589_);
lean_dec(v___y_1582_);
lean_dec_ref(v___y_1581_);
lean_dec(v___y_1580_);
lean_dec_ref(v___y_1579_);
lean_dec(v___y_1578_);
lean_dec_ref(v___y_1577_);
lean_dec(v___y_1576_);
lean_dec_ref(v___y_1575_);
lean_dec(v___y_1574_);
lean_dec(v___y_1573_);
lean_dec_ref(v___y_1572_);
v_val_1591_ = lean_ctor_get(v_powFn_x3f_1590_, 0);
lean_inc(v_val_1591_);
lean_dec_ref(v_powFn_x3f_1590_);
if (v_isShared_1588_ == 0)
{
lean_ctor_set(v___x_1587_, 0, v_val_1591_);
v___x_1593_ = v___x_1587_;
goto v_reusejp_1592_;
}
else
{
lean_object* v_reuseFailAlloc_1594_; 
v_reuseFailAlloc_1594_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1594_, 0, v_val_1591_);
v___x_1593_ = v_reuseFailAlloc_1594_;
goto v_reusejp_1592_;
}
v_reusejp_1592_:
{
return v___x_1593_;
}
}
else
{
lean_object* v_type_1595_; lean_object* v_u_1596_; lean_object* v_semiringInst_1597_; lean_object* v___x_1598_; 
lean_del_object(v___x_1587_);
v_type_1595_ = lean_ctor_get(v_toRing_1589_, 1);
lean_inc_ref(v_type_1595_);
v_u_1596_ = lean_ctor_get(v_toRing_1589_, 2);
lean_inc(v_u_1596_);
v_semiringInst_1597_ = lean_ctor_get(v_toRing_1589_, 4);
lean_inc_ref(v_semiringInst_1597_);
lean_dec_ref(v_toRing_1589_);
lean_inc(v___y_1573_);
v___x_1598_ = l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16(v_u_1596_, v_type_1595_, v_semiringInst_1597_, v___y_1572_, v___y_1573_, v___y_1574_, v___y_1575_, v___y_1576_, v___y_1577_, v___y_1578_, v___y_1579_, v___y_1580_, v___y_1581_, v___y_1582_);
if (lean_obj_tag(v___x_1598_) == 0)
{
lean_object* v_a_1599_; lean_object* v___f_1600_; lean_object* v___x_1601_; 
v_a_1599_ = lean_ctor_get(v___x_1598_, 0);
lean_inc(v_a_1599_);
lean_dec_ref(v___x_1598_);
lean_inc(v_a_1599_);
v___f_1600_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11___lam__0), 2, 1);
lean_closure_set(v___f_1600_, 0, v_a_1599_);
v___x_1601_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_modifyCommRing___redArg(v___f_1600_, v___y_1572_, v___y_1573_);
lean_dec(v___y_1573_);
if (lean_obj_tag(v___x_1601_) == 0)
{
lean_object* v___x_1603_; uint8_t v_isShared_1604_; uint8_t v_isSharedCheck_1608_; 
v_isSharedCheck_1608_ = !lean_is_exclusive(v___x_1601_);
if (v_isSharedCheck_1608_ == 0)
{
lean_object* v_unused_1609_; 
v_unused_1609_ = lean_ctor_get(v___x_1601_, 0);
lean_dec(v_unused_1609_);
v___x_1603_ = v___x_1601_;
v_isShared_1604_ = v_isSharedCheck_1608_;
goto v_resetjp_1602_;
}
else
{
lean_dec(v___x_1601_);
v___x_1603_ = lean_box(0);
v_isShared_1604_ = v_isSharedCheck_1608_;
goto v_resetjp_1602_;
}
v_resetjp_1602_:
{
lean_object* v___x_1606_; 
if (v_isShared_1604_ == 0)
{
lean_ctor_set(v___x_1603_, 0, v_a_1599_);
v___x_1606_ = v___x_1603_;
goto v_reusejp_1605_;
}
else
{
lean_object* v_reuseFailAlloc_1607_; 
v_reuseFailAlloc_1607_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1607_, 0, v_a_1599_);
v___x_1606_ = v_reuseFailAlloc_1607_;
goto v_reusejp_1605_;
}
v_reusejp_1605_:
{
return v___x_1606_;
}
}
}
else
{
lean_object* v_a_1610_; lean_object* v___x_1612_; uint8_t v_isShared_1613_; uint8_t v_isSharedCheck_1617_; 
lean_dec(v_a_1599_);
v_a_1610_ = lean_ctor_get(v___x_1601_, 0);
v_isSharedCheck_1617_ = !lean_is_exclusive(v___x_1601_);
if (v_isSharedCheck_1617_ == 0)
{
v___x_1612_ = v___x_1601_;
v_isShared_1613_ = v_isSharedCheck_1617_;
goto v_resetjp_1611_;
}
else
{
lean_inc(v_a_1610_);
lean_dec(v___x_1601_);
v___x_1612_ = lean_box(0);
v_isShared_1613_ = v_isSharedCheck_1617_;
goto v_resetjp_1611_;
}
v_resetjp_1611_:
{
lean_object* v___x_1615_; 
if (v_isShared_1613_ == 0)
{
v___x_1615_ = v___x_1612_;
goto v_reusejp_1614_;
}
else
{
lean_object* v_reuseFailAlloc_1616_; 
v_reuseFailAlloc_1616_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1616_, 0, v_a_1610_);
v___x_1615_ = v_reuseFailAlloc_1616_;
goto v_reusejp_1614_;
}
v_reusejp_1614_:
{
return v___x_1615_;
}
}
}
}
else
{
lean_dec(v___y_1573_);
lean_dec_ref(v___y_1572_);
return v___x_1598_;
}
}
}
}
else
{
lean_object* v_a_1619_; lean_object* v___x_1621_; uint8_t v_isShared_1622_; uint8_t v_isSharedCheck_1626_; 
lean_dec(v___y_1582_);
lean_dec_ref(v___y_1581_);
lean_dec(v___y_1580_);
lean_dec_ref(v___y_1579_);
lean_dec(v___y_1578_);
lean_dec_ref(v___y_1577_);
lean_dec(v___y_1576_);
lean_dec_ref(v___y_1575_);
lean_dec(v___y_1574_);
lean_dec(v___y_1573_);
lean_dec_ref(v___y_1572_);
v_a_1619_ = lean_ctor_get(v___x_1584_, 0);
v_isSharedCheck_1626_ = !lean_is_exclusive(v___x_1584_);
if (v_isSharedCheck_1626_ == 0)
{
v___x_1621_ = v___x_1584_;
v_isShared_1622_ = v_isSharedCheck_1626_;
goto v_resetjp_1620_;
}
else
{
lean_inc(v_a_1619_);
lean_dec(v___x_1584_);
v___x_1621_ = lean_box(0);
v_isShared_1622_ = v_isSharedCheck_1626_;
goto v_resetjp_1620_;
}
v_resetjp_1620_:
{
lean_object* v___x_1624_; 
if (v_isShared_1622_ == 0)
{
v___x_1624_ = v___x_1621_;
goto v_reusejp_1623_;
}
else
{
lean_object* v_reuseFailAlloc_1625_; 
v_reuseFailAlloc_1625_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1625_, 0, v_a_1619_);
v___x_1624_ = v_reuseFailAlloc_1625_;
goto v_reusejp_1623_;
}
v_reusejp_1623_:
{
return v___x_1624_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11___boxed(lean_object* v___y_1627_, lean_object* v___y_1628_, lean_object* v___y_1629_, lean_object* v___y_1630_, lean_object* v___y_1631_, lean_object* v___y_1632_, lean_object* v___y_1633_, lean_object* v___y_1634_, lean_object* v___y_1635_, lean_object* v___y_1636_, lean_object* v___y_1637_, lean_object* v___y_1638_){
_start:
{
lean_object* v_res_1639_; 
v_res_1639_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11(v___y_1627_, v___y_1628_, v___y_1629_, v___y_1630_, v___y_1631_, v___y_1632_, v___y_1633_, v___y_1634_, v___y_1635_, v___y_1636_, v___y_1637_);
return v_res_1639_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5(lean_object* v_inst_1640_, lean_object* v___y_1641_, lean_object* v___y_1642_, lean_object* v___y_1643_, lean_object* v___y_1644_, lean_object* v___y_1645_, lean_object* v___y_1646_, lean_object* v___y_1647_, lean_object* v___y_1648_, lean_object* v___y_1649_, lean_object* v___y_1650_, lean_object* v___y_1651_){
_start:
{
lean_object* v___x_1653_; 
v___x_1653_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11(v___y_1641_, v___y_1642_, v___y_1643_, v___y_1644_, v___y_1645_, v___y_1646_, v___y_1647_, v___y_1648_, v___y_1649_, v___y_1650_, v___y_1651_);
if (lean_obj_tag(v___x_1653_) == 0)
{
lean_object* v_a_1654_; lean_object* v___x_1656_; uint8_t v_isShared_1657_; uint8_t v_isSharedCheck_1664_; 
v_a_1654_ = lean_ctor_get(v___x_1653_, 0);
v_isSharedCheck_1664_ = !lean_is_exclusive(v___x_1653_);
if (v_isSharedCheck_1664_ == 0)
{
v___x_1656_ = v___x_1653_;
v_isShared_1657_ = v_isSharedCheck_1664_;
goto v_resetjp_1655_;
}
else
{
lean_inc(v_a_1654_);
lean_dec(v___x_1653_);
v___x_1656_ = lean_box(0);
v_isShared_1657_ = v_isSharedCheck_1664_;
goto v_resetjp_1655_;
}
v_resetjp_1655_:
{
lean_object* v___x_1658_; uint8_t v___x_1659_; lean_object* v___x_1660_; lean_object* v___x_1662_; 
v___x_1658_ = l_Lean_Expr_appArg_x21(v_a_1654_);
lean_dec(v_a_1654_);
v___x_1659_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_1658_, v_inst_1640_);
lean_dec_ref(v___x_1658_);
v___x_1660_ = lean_box(v___x_1659_);
if (v_isShared_1657_ == 0)
{
lean_ctor_set(v___x_1656_, 0, v___x_1660_);
v___x_1662_ = v___x_1656_;
goto v_reusejp_1661_;
}
else
{
lean_object* v_reuseFailAlloc_1663_; 
v_reuseFailAlloc_1663_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1663_, 0, v___x_1660_);
v___x_1662_ = v_reuseFailAlloc_1663_;
goto v_reusejp_1661_;
}
v_reusejp_1661_:
{
return v___x_1662_;
}
}
}
else
{
lean_object* v_a_1665_; lean_object* v___x_1667_; uint8_t v_isShared_1668_; uint8_t v_isSharedCheck_1672_; 
v_a_1665_ = lean_ctor_get(v___x_1653_, 0);
v_isSharedCheck_1672_ = !lean_is_exclusive(v___x_1653_);
if (v_isSharedCheck_1672_ == 0)
{
v___x_1667_ = v___x_1653_;
v_isShared_1668_ = v_isSharedCheck_1672_;
goto v_resetjp_1666_;
}
else
{
lean_inc(v_a_1665_);
lean_dec(v___x_1653_);
v___x_1667_ = lean_box(0);
v_isShared_1668_ = v_isSharedCheck_1672_;
goto v_resetjp_1666_;
}
v_resetjp_1666_:
{
lean_object* v___x_1670_; 
if (v_isShared_1668_ == 0)
{
v___x_1670_ = v___x_1667_;
goto v_reusejp_1669_;
}
else
{
lean_object* v_reuseFailAlloc_1671_; 
v_reuseFailAlloc_1671_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1671_, 0, v_a_1665_);
v___x_1670_ = v_reuseFailAlloc_1671_;
goto v_reusejp_1669_;
}
v_reusejp_1669_:
{
return v___x_1670_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5___boxed(lean_object* v_inst_1673_, lean_object* v___y_1674_, lean_object* v___y_1675_, lean_object* v___y_1676_, lean_object* v___y_1677_, lean_object* v___y_1678_, lean_object* v___y_1679_, lean_object* v___y_1680_, lean_object* v___y_1681_, lean_object* v___y_1682_, lean_object* v___y_1683_, lean_object* v___y_1684_, lean_object* v___y_1685_){
_start:
{
lean_object* v_res_1686_; 
v_res_1686_ = l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5(v_inst_1673_, v___y_1674_, v___y_1675_, v___y_1676_, v___y_1677_, v___y_1678_, v___y_1679_, v___y_1680_, v___y_1681_, v___y_1682_, v___y_1683_, v___y_1684_);
lean_dec_ref(v_inst_1673_);
return v_res_1686_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___lam__0(lean_object* v_a_1687_, lean_object* v_s_1688_){
_start:
{
lean_object* v_toRing_1689_; lean_object* v_invFn_x3f_1690_; lean_object* v_semiringId_x3f_1691_; lean_object* v_commSemiringInst_1692_; lean_object* v_commRingInst_1693_; lean_object* v_noZeroDivInst_x3f_1694_; lean_object* v_fieldInst_x3f_1695_; lean_object* v_denoteEntries_1696_; lean_object* v_nextId_1697_; lean_object* v_steps_1698_; lean_object* v_queue_1699_; lean_object* v_basis_1700_; lean_object* v_diseqs_1701_; uint8_t v_recheck_1702_; lean_object* v_invSet_1703_; lean_object* v_numEq0_x3f_1704_; uint8_t v_numEq0Updated_1705_; lean_object* v___x_1707_; uint8_t v_isShared_1708_; uint8_t v_isSharedCheck_1737_; 
v_toRing_1689_ = lean_ctor_get(v_s_1688_, 0);
v_invFn_x3f_1690_ = lean_ctor_get(v_s_1688_, 1);
v_semiringId_x3f_1691_ = lean_ctor_get(v_s_1688_, 2);
v_commSemiringInst_1692_ = lean_ctor_get(v_s_1688_, 3);
v_commRingInst_1693_ = lean_ctor_get(v_s_1688_, 4);
v_noZeroDivInst_x3f_1694_ = lean_ctor_get(v_s_1688_, 5);
v_fieldInst_x3f_1695_ = lean_ctor_get(v_s_1688_, 6);
v_denoteEntries_1696_ = lean_ctor_get(v_s_1688_, 7);
v_nextId_1697_ = lean_ctor_get(v_s_1688_, 8);
v_steps_1698_ = lean_ctor_get(v_s_1688_, 9);
v_queue_1699_ = lean_ctor_get(v_s_1688_, 10);
v_basis_1700_ = lean_ctor_get(v_s_1688_, 11);
v_diseqs_1701_ = lean_ctor_get(v_s_1688_, 12);
v_recheck_1702_ = lean_ctor_get_uint8(v_s_1688_, sizeof(void*)*15);
v_invSet_1703_ = lean_ctor_get(v_s_1688_, 13);
v_numEq0_x3f_1704_ = lean_ctor_get(v_s_1688_, 14);
v_numEq0Updated_1705_ = lean_ctor_get_uint8(v_s_1688_, sizeof(void*)*15 + 1);
v_isSharedCheck_1737_ = !lean_is_exclusive(v_s_1688_);
if (v_isSharedCheck_1737_ == 0)
{
v___x_1707_ = v_s_1688_;
v_isShared_1708_ = v_isSharedCheck_1737_;
goto v_resetjp_1706_;
}
else
{
lean_inc(v_numEq0_x3f_1704_);
lean_inc(v_invSet_1703_);
lean_inc(v_diseqs_1701_);
lean_inc(v_basis_1700_);
lean_inc(v_queue_1699_);
lean_inc(v_steps_1698_);
lean_inc(v_nextId_1697_);
lean_inc(v_denoteEntries_1696_);
lean_inc(v_fieldInst_x3f_1695_);
lean_inc(v_noZeroDivInst_x3f_1694_);
lean_inc(v_commRingInst_1693_);
lean_inc(v_commSemiringInst_1692_);
lean_inc(v_semiringId_x3f_1691_);
lean_inc(v_invFn_x3f_1690_);
lean_inc(v_toRing_1689_);
lean_dec(v_s_1688_);
v___x_1707_ = lean_box(0);
v_isShared_1708_ = v_isSharedCheck_1737_;
goto v_resetjp_1706_;
}
v_resetjp_1706_:
{
lean_object* v_id_1709_; lean_object* v_type_1710_; lean_object* v_u_1711_; lean_object* v_ringInst_1712_; lean_object* v_semiringInst_1713_; lean_object* v_charInst_x3f_1714_; lean_object* v_mulFn_x3f_1715_; lean_object* v_subFn_x3f_1716_; lean_object* v_negFn_x3f_1717_; lean_object* v_powFn_x3f_1718_; lean_object* v_intCastFn_x3f_1719_; lean_object* v_natCastFn_x3f_1720_; lean_object* v_one_x3f_1721_; lean_object* v_vars_1722_; lean_object* v_varMap_1723_; lean_object* v_denote_1724_; lean_object* v___x_1726_; uint8_t v_isShared_1727_; uint8_t v_isSharedCheck_1735_; 
v_id_1709_ = lean_ctor_get(v_toRing_1689_, 0);
v_type_1710_ = lean_ctor_get(v_toRing_1689_, 1);
v_u_1711_ = lean_ctor_get(v_toRing_1689_, 2);
v_ringInst_1712_ = lean_ctor_get(v_toRing_1689_, 3);
v_semiringInst_1713_ = lean_ctor_get(v_toRing_1689_, 4);
v_charInst_x3f_1714_ = lean_ctor_get(v_toRing_1689_, 5);
v_mulFn_x3f_1715_ = lean_ctor_get(v_toRing_1689_, 7);
v_subFn_x3f_1716_ = lean_ctor_get(v_toRing_1689_, 8);
v_negFn_x3f_1717_ = lean_ctor_get(v_toRing_1689_, 9);
v_powFn_x3f_1718_ = lean_ctor_get(v_toRing_1689_, 10);
v_intCastFn_x3f_1719_ = lean_ctor_get(v_toRing_1689_, 11);
v_natCastFn_x3f_1720_ = lean_ctor_get(v_toRing_1689_, 12);
v_one_x3f_1721_ = lean_ctor_get(v_toRing_1689_, 13);
v_vars_1722_ = lean_ctor_get(v_toRing_1689_, 14);
v_varMap_1723_ = lean_ctor_get(v_toRing_1689_, 15);
v_denote_1724_ = lean_ctor_get(v_toRing_1689_, 16);
v_isSharedCheck_1735_ = !lean_is_exclusive(v_toRing_1689_);
if (v_isSharedCheck_1735_ == 0)
{
lean_object* v_unused_1736_; 
v_unused_1736_ = lean_ctor_get(v_toRing_1689_, 6);
lean_dec(v_unused_1736_);
v___x_1726_ = v_toRing_1689_;
v_isShared_1727_ = v_isSharedCheck_1735_;
goto v_resetjp_1725_;
}
else
{
lean_inc(v_denote_1724_);
lean_inc(v_varMap_1723_);
lean_inc(v_vars_1722_);
lean_inc(v_one_x3f_1721_);
lean_inc(v_natCastFn_x3f_1720_);
lean_inc(v_intCastFn_x3f_1719_);
lean_inc(v_powFn_x3f_1718_);
lean_inc(v_negFn_x3f_1717_);
lean_inc(v_subFn_x3f_1716_);
lean_inc(v_mulFn_x3f_1715_);
lean_inc(v_charInst_x3f_1714_);
lean_inc(v_semiringInst_1713_);
lean_inc(v_ringInst_1712_);
lean_inc(v_u_1711_);
lean_inc(v_type_1710_);
lean_inc(v_id_1709_);
lean_dec(v_toRing_1689_);
v___x_1726_ = lean_box(0);
v_isShared_1727_ = v_isSharedCheck_1735_;
goto v_resetjp_1725_;
}
v_resetjp_1725_:
{
lean_object* v___x_1728_; lean_object* v___x_1730_; 
v___x_1728_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_1728_, 0, v_a_1687_);
if (v_isShared_1727_ == 0)
{
lean_ctor_set(v___x_1726_, 6, v___x_1728_);
v___x_1730_ = v___x_1726_;
goto v_reusejp_1729_;
}
else
{
lean_object* v_reuseFailAlloc_1734_; 
v_reuseFailAlloc_1734_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_1734_, 0, v_id_1709_);
lean_ctor_set(v_reuseFailAlloc_1734_, 1, v_type_1710_);
lean_ctor_set(v_reuseFailAlloc_1734_, 2, v_u_1711_);
lean_ctor_set(v_reuseFailAlloc_1734_, 3, v_ringInst_1712_);
lean_ctor_set(v_reuseFailAlloc_1734_, 4, v_semiringInst_1713_);
lean_ctor_set(v_reuseFailAlloc_1734_, 5, v_charInst_x3f_1714_);
lean_ctor_set(v_reuseFailAlloc_1734_, 6, v___x_1728_);
lean_ctor_set(v_reuseFailAlloc_1734_, 7, v_mulFn_x3f_1715_);
lean_ctor_set(v_reuseFailAlloc_1734_, 8, v_subFn_x3f_1716_);
lean_ctor_set(v_reuseFailAlloc_1734_, 9, v_negFn_x3f_1717_);
lean_ctor_set(v_reuseFailAlloc_1734_, 10, v_powFn_x3f_1718_);
lean_ctor_set(v_reuseFailAlloc_1734_, 11, v_intCastFn_x3f_1719_);
lean_ctor_set(v_reuseFailAlloc_1734_, 12, v_natCastFn_x3f_1720_);
lean_ctor_set(v_reuseFailAlloc_1734_, 13, v_one_x3f_1721_);
lean_ctor_set(v_reuseFailAlloc_1734_, 14, v_vars_1722_);
lean_ctor_set(v_reuseFailAlloc_1734_, 15, v_varMap_1723_);
lean_ctor_set(v_reuseFailAlloc_1734_, 16, v_denote_1724_);
v___x_1730_ = v_reuseFailAlloc_1734_;
goto v_reusejp_1729_;
}
v_reusejp_1729_:
{
lean_object* v___x_1732_; 
if (v_isShared_1708_ == 0)
{
lean_ctor_set(v___x_1707_, 0, v___x_1730_);
v___x_1732_ = v___x_1707_;
goto v_reusejp_1731_;
}
else
{
lean_object* v_reuseFailAlloc_1733_; 
v_reuseFailAlloc_1733_ = lean_alloc_ctor(0, 15, 2);
lean_ctor_set(v_reuseFailAlloc_1733_, 0, v___x_1730_);
lean_ctor_set(v_reuseFailAlloc_1733_, 1, v_invFn_x3f_1690_);
lean_ctor_set(v_reuseFailAlloc_1733_, 2, v_semiringId_x3f_1691_);
lean_ctor_set(v_reuseFailAlloc_1733_, 3, v_commSemiringInst_1692_);
lean_ctor_set(v_reuseFailAlloc_1733_, 4, v_commRingInst_1693_);
lean_ctor_set(v_reuseFailAlloc_1733_, 5, v_noZeroDivInst_x3f_1694_);
lean_ctor_set(v_reuseFailAlloc_1733_, 6, v_fieldInst_x3f_1695_);
lean_ctor_set(v_reuseFailAlloc_1733_, 7, v_denoteEntries_1696_);
lean_ctor_set(v_reuseFailAlloc_1733_, 8, v_nextId_1697_);
lean_ctor_set(v_reuseFailAlloc_1733_, 9, v_steps_1698_);
lean_ctor_set(v_reuseFailAlloc_1733_, 10, v_queue_1699_);
lean_ctor_set(v_reuseFailAlloc_1733_, 11, v_basis_1700_);
lean_ctor_set(v_reuseFailAlloc_1733_, 12, v_diseqs_1701_);
lean_ctor_set(v_reuseFailAlloc_1733_, 13, v_invSet_1703_);
lean_ctor_set(v_reuseFailAlloc_1733_, 14, v_numEq0_x3f_1704_);
lean_ctor_set_uint8(v_reuseFailAlloc_1733_, sizeof(void*)*15, v_recheck_1702_);
lean_ctor_set_uint8(v_reuseFailAlloc_1733_, sizeof(void*)*15 + 1, v_numEq0Updated_1705_);
v___x_1732_ = v_reuseFailAlloc_1733_;
goto v_reusejp_1731_;
}
v_reusejp_1731_:
{
return v___x_1732_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4(lean_object* v___y_1749_, lean_object* v___y_1750_, lean_object* v___y_1751_, lean_object* v___y_1752_, lean_object* v___y_1753_, lean_object* v___y_1754_, lean_object* v___y_1755_, lean_object* v___y_1756_, lean_object* v___y_1757_, lean_object* v___y_1758_, lean_object* v___y_1759_){
_start:
{
lean_object* v___x_1761_; 
v___x_1761_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_getCommRing(v___y_1749_, v___y_1750_, v___y_1751_, v___y_1752_, v___y_1753_, v___y_1754_, v___y_1755_, v___y_1756_, v___y_1757_, v___y_1758_, v___y_1759_);
if (lean_obj_tag(v___x_1761_) == 0)
{
lean_object* v_a_1762_; lean_object* v___x_1764_; uint8_t v_isShared_1765_; uint8_t v_isSharedCheck_1805_; 
v_a_1762_ = lean_ctor_get(v___x_1761_, 0);
v_isSharedCheck_1805_ = !lean_is_exclusive(v___x_1761_);
if (v_isSharedCheck_1805_ == 0)
{
v___x_1764_ = v___x_1761_;
v_isShared_1765_ = v_isSharedCheck_1805_;
goto v_resetjp_1763_;
}
else
{
lean_inc(v_a_1762_);
lean_dec(v___x_1761_);
v___x_1764_ = lean_box(0);
v_isShared_1765_ = v_isSharedCheck_1805_;
goto v_resetjp_1763_;
}
v_resetjp_1763_:
{
lean_object* v_toRing_1766_; lean_object* v_addFn_x3f_1767_; 
v_toRing_1766_ = lean_ctor_get(v_a_1762_, 0);
lean_inc_ref(v_toRing_1766_);
lean_dec(v_a_1762_);
v_addFn_x3f_1767_ = lean_ctor_get(v_toRing_1766_, 6);
if (lean_obj_tag(v_addFn_x3f_1767_) == 1)
{
lean_object* v_val_1768_; lean_object* v___x_1770_; 
lean_inc_ref(v_addFn_x3f_1767_);
lean_dec_ref(v_toRing_1766_);
lean_dec(v___y_1759_);
lean_dec_ref(v___y_1758_);
lean_dec(v___y_1757_);
lean_dec_ref(v___y_1756_);
lean_dec(v___y_1755_);
lean_dec_ref(v___y_1754_);
lean_dec(v___y_1753_);
lean_dec_ref(v___y_1752_);
lean_dec(v___y_1751_);
lean_dec(v___y_1750_);
lean_dec_ref(v___y_1749_);
v_val_1768_ = lean_ctor_get(v_addFn_x3f_1767_, 0);
lean_inc(v_val_1768_);
lean_dec_ref(v_addFn_x3f_1767_);
if (v_isShared_1765_ == 0)
{
lean_ctor_set(v___x_1764_, 0, v_val_1768_);
v___x_1770_ = v___x_1764_;
goto v_reusejp_1769_;
}
else
{
lean_object* v_reuseFailAlloc_1771_; 
v_reuseFailAlloc_1771_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1771_, 0, v_val_1768_);
v___x_1770_ = v_reuseFailAlloc_1771_;
goto v_reusejp_1769_;
}
v_reusejp_1769_:
{
return v___x_1770_;
}
}
else
{
lean_object* v_type_1772_; lean_object* v_u_1773_; lean_object* v_semiringInst_1774_; lean_object* v___x_1775_; lean_object* v___x_1776_; lean_object* v___x_1777_; lean_object* v___x_1778_; lean_object* v___x_1779_; lean_object* v___x_1780_; lean_object* v___x_1781_; lean_object* v_expectedInst_1782_; lean_object* v___x_1783_; lean_object* v___x_1784_; lean_object* v___x_1785_; 
lean_del_object(v___x_1764_);
v_type_1772_ = lean_ctor_get(v_toRing_1766_, 1);
lean_inc_ref(v_type_1772_);
v_u_1773_ = lean_ctor_get(v_toRing_1766_, 2);
lean_inc(v_u_1773_);
v_semiringInst_1774_ = lean_ctor_get(v_toRing_1766_, 4);
lean_inc_ref(v_semiringInst_1774_);
lean_dec_ref(v_toRing_1766_);
v___x_1775_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__1));
v___x_1776_ = lean_box(0);
lean_inc(v_u_1773_);
v___x_1777_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_1777_, 0, v_u_1773_);
lean_ctor_set(v___x_1777_, 1, v___x_1776_);
lean_inc_ref(v___x_1777_);
v___x_1778_ = l_Lean_mkConst(v___x_1775_, v___x_1777_);
v___x_1779_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3));
v___x_1780_ = l_Lean_mkConst(v___x_1779_, v___x_1777_);
lean_inc_ref(v_type_1772_);
v___x_1781_ = l_Lean_mkAppB(v___x_1780_, v_type_1772_, v_semiringInst_1774_);
lean_inc_ref(v_type_1772_);
v_expectedInst_1782_ = l_Lean_mkAppB(v___x_1778_, v_type_1772_, v___x_1781_);
v___x_1783_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__4));
v___x_1784_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
lean_inc(v___y_1750_);
v___x_1785_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8(v_type_1772_, v_u_1773_, v___x_1783_, v___x_1784_, v_expectedInst_1782_, v___y_1749_, v___y_1750_, v___y_1751_, v___y_1752_, v___y_1753_, v___y_1754_, v___y_1755_, v___y_1756_, v___y_1757_, v___y_1758_, v___y_1759_);
if (lean_obj_tag(v___x_1785_) == 0)
{
lean_object* v_a_1786_; lean_object* v___f_1787_; lean_object* v___x_1788_; 
v_a_1786_ = lean_ctor_get(v___x_1785_, 0);
lean_inc(v_a_1786_);
lean_dec_ref(v___x_1785_);
lean_inc(v_a_1786_);
v___f_1787_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___lam__0), 2, 1);
lean_closure_set(v___f_1787_, 0, v_a_1786_);
v___x_1788_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_modifyCommRing___redArg(v___f_1787_, v___y_1749_, v___y_1750_);
lean_dec(v___y_1750_);
if (lean_obj_tag(v___x_1788_) == 0)
{
lean_object* v___x_1790_; uint8_t v_isShared_1791_; uint8_t v_isSharedCheck_1795_; 
v_isSharedCheck_1795_ = !lean_is_exclusive(v___x_1788_);
if (v_isSharedCheck_1795_ == 0)
{
lean_object* v_unused_1796_; 
v_unused_1796_ = lean_ctor_get(v___x_1788_, 0);
lean_dec(v_unused_1796_);
v___x_1790_ = v___x_1788_;
v_isShared_1791_ = v_isSharedCheck_1795_;
goto v_resetjp_1789_;
}
else
{
lean_dec(v___x_1788_);
v___x_1790_ = lean_box(0);
v_isShared_1791_ = v_isSharedCheck_1795_;
goto v_resetjp_1789_;
}
v_resetjp_1789_:
{
lean_object* v___x_1793_; 
if (v_isShared_1791_ == 0)
{
lean_ctor_set(v___x_1790_, 0, v_a_1786_);
v___x_1793_ = v___x_1790_;
goto v_reusejp_1792_;
}
else
{
lean_object* v_reuseFailAlloc_1794_; 
v_reuseFailAlloc_1794_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1794_, 0, v_a_1786_);
v___x_1793_ = v_reuseFailAlloc_1794_;
goto v_reusejp_1792_;
}
v_reusejp_1792_:
{
return v___x_1793_;
}
}
}
else
{
lean_object* v_a_1797_; lean_object* v___x_1799_; uint8_t v_isShared_1800_; uint8_t v_isSharedCheck_1804_; 
lean_dec(v_a_1786_);
v_a_1797_ = lean_ctor_get(v___x_1788_, 0);
v_isSharedCheck_1804_ = !lean_is_exclusive(v___x_1788_);
if (v_isSharedCheck_1804_ == 0)
{
v___x_1799_ = v___x_1788_;
v_isShared_1800_ = v_isSharedCheck_1804_;
goto v_resetjp_1798_;
}
else
{
lean_inc(v_a_1797_);
lean_dec(v___x_1788_);
v___x_1799_ = lean_box(0);
v_isShared_1800_ = v_isSharedCheck_1804_;
goto v_resetjp_1798_;
}
v_resetjp_1798_:
{
lean_object* v___x_1802_; 
if (v_isShared_1800_ == 0)
{
v___x_1802_ = v___x_1799_;
goto v_reusejp_1801_;
}
else
{
lean_object* v_reuseFailAlloc_1803_; 
v_reuseFailAlloc_1803_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1803_, 0, v_a_1797_);
v___x_1802_ = v_reuseFailAlloc_1803_;
goto v_reusejp_1801_;
}
v_reusejp_1801_:
{
return v___x_1802_;
}
}
}
}
else
{
lean_dec(v___y_1750_);
lean_dec_ref(v___y_1749_);
return v___x_1785_;
}
}
}
}
else
{
lean_object* v_a_1806_; lean_object* v___x_1808_; uint8_t v_isShared_1809_; uint8_t v_isSharedCheck_1813_; 
lean_dec(v___y_1759_);
lean_dec_ref(v___y_1758_);
lean_dec(v___y_1757_);
lean_dec_ref(v___y_1756_);
lean_dec(v___y_1755_);
lean_dec_ref(v___y_1754_);
lean_dec(v___y_1753_);
lean_dec_ref(v___y_1752_);
lean_dec(v___y_1751_);
lean_dec(v___y_1750_);
lean_dec_ref(v___y_1749_);
v_a_1806_ = lean_ctor_get(v___x_1761_, 0);
v_isSharedCheck_1813_ = !lean_is_exclusive(v___x_1761_);
if (v_isSharedCheck_1813_ == 0)
{
v___x_1808_ = v___x_1761_;
v_isShared_1809_ = v_isSharedCheck_1813_;
goto v_resetjp_1807_;
}
else
{
lean_inc(v_a_1806_);
lean_dec(v___x_1761_);
v___x_1808_ = lean_box(0);
v_isShared_1809_ = v_isSharedCheck_1813_;
goto v_resetjp_1807_;
}
v_resetjp_1807_:
{
lean_object* v___x_1811_; 
if (v_isShared_1809_ == 0)
{
v___x_1811_ = v___x_1808_;
goto v_reusejp_1810_;
}
else
{
lean_object* v_reuseFailAlloc_1812_; 
v_reuseFailAlloc_1812_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1812_, 0, v_a_1806_);
v___x_1811_ = v_reuseFailAlloc_1812_;
goto v_reusejp_1810_;
}
v_reusejp_1810_:
{
return v___x_1811_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___boxed(lean_object* v___y_1814_, lean_object* v___y_1815_, lean_object* v___y_1816_, lean_object* v___y_1817_, lean_object* v___y_1818_, lean_object* v___y_1819_, lean_object* v___y_1820_, lean_object* v___y_1821_, lean_object* v___y_1822_, lean_object* v___y_1823_, lean_object* v___y_1824_, lean_object* v___y_1825_){
_start:
{
lean_object* v_res_1826_; 
v_res_1826_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4(v___y_1814_, v___y_1815_, v___y_1816_, v___y_1817_, v___y_1818_, v___y_1819_, v___y_1820_, v___y_1821_, v___y_1822_, v___y_1823_, v___y_1824_);
return v_res_1826_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1(lean_object* v_inst_1827_, lean_object* v___y_1828_, lean_object* v___y_1829_, lean_object* v___y_1830_, lean_object* v___y_1831_, lean_object* v___y_1832_, lean_object* v___y_1833_, lean_object* v___y_1834_, lean_object* v___y_1835_, lean_object* v___y_1836_, lean_object* v___y_1837_, lean_object* v___y_1838_){
_start:
{
lean_object* v___x_1840_; 
v___x_1840_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4(v___y_1828_, v___y_1829_, v___y_1830_, v___y_1831_, v___y_1832_, v___y_1833_, v___y_1834_, v___y_1835_, v___y_1836_, v___y_1837_, v___y_1838_);
if (lean_obj_tag(v___x_1840_) == 0)
{
lean_object* v_a_1841_; lean_object* v___x_1843_; uint8_t v_isShared_1844_; uint8_t v_isSharedCheck_1851_; 
v_a_1841_ = lean_ctor_get(v___x_1840_, 0);
v_isSharedCheck_1851_ = !lean_is_exclusive(v___x_1840_);
if (v_isSharedCheck_1851_ == 0)
{
v___x_1843_ = v___x_1840_;
v_isShared_1844_ = v_isSharedCheck_1851_;
goto v_resetjp_1842_;
}
else
{
lean_inc(v_a_1841_);
lean_dec(v___x_1840_);
v___x_1843_ = lean_box(0);
v_isShared_1844_ = v_isSharedCheck_1851_;
goto v_resetjp_1842_;
}
v_resetjp_1842_:
{
lean_object* v___x_1845_; uint8_t v___x_1846_; lean_object* v___x_1847_; lean_object* v___x_1849_; 
v___x_1845_ = l_Lean_Expr_appArg_x21(v_a_1841_);
lean_dec(v_a_1841_);
v___x_1846_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_1845_, v_inst_1827_);
lean_dec_ref(v___x_1845_);
v___x_1847_ = lean_box(v___x_1846_);
if (v_isShared_1844_ == 0)
{
lean_ctor_set(v___x_1843_, 0, v___x_1847_);
v___x_1849_ = v___x_1843_;
goto v_reusejp_1848_;
}
else
{
lean_object* v_reuseFailAlloc_1850_; 
v_reuseFailAlloc_1850_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1850_, 0, v___x_1847_);
v___x_1849_ = v_reuseFailAlloc_1850_;
goto v_reusejp_1848_;
}
v_reusejp_1848_:
{
return v___x_1849_;
}
}
}
else
{
lean_object* v_a_1852_; lean_object* v___x_1854_; uint8_t v_isShared_1855_; uint8_t v_isSharedCheck_1859_; 
v_a_1852_ = lean_ctor_get(v___x_1840_, 0);
v_isSharedCheck_1859_ = !lean_is_exclusive(v___x_1840_);
if (v_isSharedCheck_1859_ == 0)
{
v___x_1854_ = v___x_1840_;
v_isShared_1855_ = v_isSharedCheck_1859_;
goto v_resetjp_1853_;
}
else
{
lean_inc(v_a_1852_);
lean_dec(v___x_1840_);
v___x_1854_ = lean_box(0);
v_isShared_1855_ = v_isSharedCheck_1859_;
goto v_resetjp_1853_;
}
v_resetjp_1853_:
{
lean_object* v___x_1857_; 
if (v_isShared_1855_ == 0)
{
v___x_1857_ = v___x_1854_;
goto v_reusejp_1856_;
}
else
{
lean_object* v_reuseFailAlloc_1858_; 
v_reuseFailAlloc_1858_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1858_, 0, v_a_1852_);
v___x_1857_ = v_reuseFailAlloc_1858_;
goto v_reusejp_1856_;
}
v_reusejp_1856_:
{
return v___x_1857_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1___boxed(lean_object* v_inst_1860_, lean_object* v___y_1861_, lean_object* v___y_1862_, lean_object* v___y_1863_, lean_object* v___y_1864_, lean_object* v___y_1865_, lean_object* v___y_1866_, lean_object* v___y_1867_, lean_object* v___y_1868_, lean_object* v___y_1869_, lean_object* v___y_1870_, lean_object* v___y_1871_, lean_object* v___y_1872_){
_start:
{
lean_object* v_res_1873_; 
v_res_1873_ = l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1(v_inst_1860_, v___y_1861_, v___y_1862_, v___y_1863_, v___y_1864_, v___y_1865_, v___y_1866_, v___y_1867_, v___y_1868_, v___y_1869_, v___y_1870_, v___y_1871_);
lean_dec_ref(v_inst_1860_);
return v_res_1873_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___lam__0(lean_object* v_a_1874_, lean_object* v_s_1875_){
_start:
{
lean_object* v_toRing_1876_; lean_object* v_invFn_x3f_1877_; lean_object* v_semiringId_x3f_1878_; lean_object* v_commSemiringInst_1879_; lean_object* v_commRingInst_1880_; lean_object* v_noZeroDivInst_x3f_1881_; lean_object* v_fieldInst_x3f_1882_; lean_object* v_denoteEntries_1883_; lean_object* v_nextId_1884_; lean_object* v_steps_1885_; lean_object* v_queue_1886_; lean_object* v_basis_1887_; lean_object* v_diseqs_1888_; uint8_t v_recheck_1889_; lean_object* v_invSet_1890_; lean_object* v_numEq0_x3f_1891_; uint8_t v_numEq0Updated_1892_; lean_object* v___x_1894_; uint8_t v_isShared_1895_; uint8_t v_isSharedCheck_1924_; 
v_toRing_1876_ = lean_ctor_get(v_s_1875_, 0);
v_invFn_x3f_1877_ = lean_ctor_get(v_s_1875_, 1);
v_semiringId_x3f_1878_ = lean_ctor_get(v_s_1875_, 2);
v_commSemiringInst_1879_ = lean_ctor_get(v_s_1875_, 3);
v_commRingInst_1880_ = lean_ctor_get(v_s_1875_, 4);
v_noZeroDivInst_x3f_1881_ = lean_ctor_get(v_s_1875_, 5);
v_fieldInst_x3f_1882_ = lean_ctor_get(v_s_1875_, 6);
v_denoteEntries_1883_ = lean_ctor_get(v_s_1875_, 7);
v_nextId_1884_ = lean_ctor_get(v_s_1875_, 8);
v_steps_1885_ = lean_ctor_get(v_s_1875_, 9);
v_queue_1886_ = lean_ctor_get(v_s_1875_, 10);
v_basis_1887_ = lean_ctor_get(v_s_1875_, 11);
v_diseqs_1888_ = lean_ctor_get(v_s_1875_, 12);
v_recheck_1889_ = lean_ctor_get_uint8(v_s_1875_, sizeof(void*)*15);
v_invSet_1890_ = lean_ctor_get(v_s_1875_, 13);
v_numEq0_x3f_1891_ = lean_ctor_get(v_s_1875_, 14);
v_numEq0Updated_1892_ = lean_ctor_get_uint8(v_s_1875_, sizeof(void*)*15 + 1);
v_isSharedCheck_1924_ = !lean_is_exclusive(v_s_1875_);
if (v_isSharedCheck_1924_ == 0)
{
v___x_1894_ = v_s_1875_;
v_isShared_1895_ = v_isSharedCheck_1924_;
goto v_resetjp_1893_;
}
else
{
lean_inc(v_numEq0_x3f_1891_);
lean_inc(v_invSet_1890_);
lean_inc(v_diseqs_1888_);
lean_inc(v_basis_1887_);
lean_inc(v_queue_1886_);
lean_inc(v_steps_1885_);
lean_inc(v_nextId_1884_);
lean_inc(v_denoteEntries_1883_);
lean_inc(v_fieldInst_x3f_1882_);
lean_inc(v_noZeroDivInst_x3f_1881_);
lean_inc(v_commRingInst_1880_);
lean_inc(v_commSemiringInst_1879_);
lean_inc(v_semiringId_x3f_1878_);
lean_inc(v_invFn_x3f_1877_);
lean_inc(v_toRing_1876_);
lean_dec(v_s_1875_);
v___x_1894_ = lean_box(0);
v_isShared_1895_ = v_isSharedCheck_1924_;
goto v_resetjp_1893_;
}
v_resetjp_1893_:
{
lean_object* v_id_1896_; lean_object* v_type_1897_; lean_object* v_u_1898_; lean_object* v_ringInst_1899_; lean_object* v_semiringInst_1900_; lean_object* v_charInst_x3f_1901_; lean_object* v_addFn_x3f_1902_; lean_object* v_mulFn_x3f_1903_; lean_object* v_subFn_x3f_1904_; lean_object* v_negFn_x3f_1905_; lean_object* v_powFn_x3f_1906_; lean_object* v_natCastFn_x3f_1907_; lean_object* v_one_x3f_1908_; lean_object* v_vars_1909_; lean_object* v_varMap_1910_; lean_object* v_denote_1911_; lean_object* v___x_1913_; uint8_t v_isShared_1914_; uint8_t v_isSharedCheck_1922_; 
v_id_1896_ = lean_ctor_get(v_toRing_1876_, 0);
v_type_1897_ = lean_ctor_get(v_toRing_1876_, 1);
v_u_1898_ = lean_ctor_get(v_toRing_1876_, 2);
v_ringInst_1899_ = lean_ctor_get(v_toRing_1876_, 3);
v_semiringInst_1900_ = lean_ctor_get(v_toRing_1876_, 4);
v_charInst_x3f_1901_ = lean_ctor_get(v_toRing_1876_, 5);
v_addFn_x3f_1902_ = lean_ctor_get(v_toRing_1876_, 6);
v_mulFn_x3f_1903_ = lean_ctor_get(v_toRing_1876_, 7);
v_subFn_x3f_1904_ = lean_ctor_get(v_toRing_1876_, 8);
v_negFn_x3f_1905_ = lean_ctor_get(v_toRing_1876_, 9);
v_powFn_x3f_1906_ = lean_ctor_get(v_toRing_1876_, 10);
v_natCastFn_x3f_1907_ = lean_ctor_get(v_toRing_1876_, 12);
v_one_x3f_1908_ = lean_ctor_get(v_toRing_1876_, 13);
v_vars_1909_ = lean_ctor_get(v_toRing_1876_, 14);
v_varMap_1910_ = lean_ctor_get(v_toRing_1876_, 15);
v_denote_1911_ = lean_ctor_get(v_toRing_1876_, 16);
v_isSharedCheck_1922_ = !lean_is_exclusive(v_toRing_1876_);
if (v_isSharedCheck_1922_ == 0)
{
lean_object* v_unused_1923_; 
v_unused_1923_ = lean_ctor_get(v_toRing_1876_, 11);
lean_dec(v_unused_1923_);
v___x_1913_ = v_toRing_1876_;
v_isShared_1914_ = v_isSharedCheck_1922_;
goto v_resetjp_1912_;
}
else
{
lean_inc(v_denote_1911_);
lean_inc(v_varMap_1910_);
lean_inc(v_vars_1909_);
lean_inc(v_one_x3f_1908_);
lean_inc(v_natCastFn_x3f_1907_);
lean_inc(v_powFn_x3f_1906_);
lean_inc(v_negFn_x3f_1905_);
lean_inc(v_subFn_x3f_1904_);
lean_inc(v_mulFn_x3f_1903_);
lean_inc(v_addFn_x3f_1902_);
lean_inc(v_charInst_x3f_1901_);
lean_inc(v_semiringInst_1900_);
lean_inc(v_ringInst_1899_);
lean_inc(v_u_1898_);
lean_inc(v_type_1897_);
lean_inc(v_id_1896_);
lean_dec(v_toRing_1876_);
v___x_1913_ = lean_box(0);
v_isShared_1914_ = v_isSharedCheck_1922_;
goto v_resetjp_1912_;
}
v_resetjp_1912_:
{
lean_object* v___x_1915_; lean_object* v___x_1917_; 
v___x_1915_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_1915_, 0, v_a_1874_);
if (v_isShared_1914_ == 0)
{
lean_ctor_set(v___x_1913_, 11, v___x_1915_);
v___x_1917_ = v___x_1913_;
goto v_reusejp_1916_;
}
else
{
lean_object* v_reuseFailAlloc_1921_; 
v_reuseFailAlloc_1921_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_1921_, 0, v_id_1896_);
lean_ctor_set(v_reuseFailAlloc_1921_, 1, v_type_1897_);
lean_ctor_set(v_reuseFailAlloc_1921_, 2, v_u_1898_);
lean_ctor_set(v_reuseFailAlloc_1921_, 3, v_ringInst_1899_);
lean_ctor_set(v_reuseFailAlloc_1921_, 4, v_semiringInst_1900_);
lean_ctor_set(v_reuseFailAlloc_1921_, 5, v_charInst_x3f_1901_);
lean_ctor_set(v_reuseFailAlloc_1921_, 6, v_addFn_x3f_1902_);
lean_ctor_set(v_reuseFailAlloc_1921_, 7, v_mulFn_x3f_1903_);
lean_ctor_set(v_reuseFailAlloc_1921_, 8, v_subFn_x3f_1904_);
lean_ctor_set(v_reuseFailAlloc_1921_, 9, v_negFn_x3f_1905_);
lean_ctor_set(v_reuseFailAlloc_1921_, 10, v_powFn_x3f_1906_);
lean_ctor_set(v_reuseFailAlloc_1921_, 11, v___x_1915_);
lean_ctor_set(v_reuseFailAlloc_1921_, 12, v_natCastFn_x3f_1907_);
lean_ctor_set(v_reuseFailAlloc_1921_, 13, v_one_x3f_1908_);
lean_ctor_set(v_reuseFailAlloc_1921_, 14, v_vars_1909_);
lean_ctor_set(v_reuseFailAlloc_1921_, 15, v_varMap_1910_);
lean_ctor_set(v_reuseFailAlloc_1921_, 16, v_denote_1911_);
v___x_1917_ = v_reuseFailAlloc_1921_;
goto v_reusejp_1916_;
}
v_reusejp_1916_:
{
lean_object* v___x_1919_; 
if (v_isShared_1895_ == 0)
{
lean_ctor_set(v___x_1894_, 0, v___x_1917_);
v___x_1919_ = v___x_1894_;
goto v_reusejp_1918_;
}
else
{
lean_object* v_reuseFailAlloc_1920_; 
v_reuseFailAlloc_1920_ = lean_alloc_ctor(0, 15, 2);
lean_ctor_set(v_reuseFailAlloc_1920_, 0, v___x_1917_);
lean_ctor_set(v_reuseFailAlloc_1920_, 1, v_invFn_x3f_1877_);
lean_ctor_set(v_reuseFailAlloc_1920_, 2, v_semiringId_x3f_1878_);
lean_ctor_set(v_reuseFailAlloc_1920_, 3, v_commSemiringInst_1879_);
lean_ctor_set(v_reuseFailAlloc_1920_, 4, v_commRingInst_1880_);
lean_ctor_set(v_reuseFailAlloc_1920_, 5, v_noZeroDivInst_x3f_1881_);
lean_ctor_set(v_reuseFailAlloc_1920_, 6, v_fieldInst_x3f_1882_);
lean_ctor_set(v_reuseFailAlloc_1920_, 7, v_denoteEntries_1883_);
lean_ctor_set(v_reuseFailAlloc_1920_, 8, v_nextId_1884_);
lean_ctor_set(v_reuseFailAlloc_1920_, 9, v_steps_1885_);
lean_ctor_set(v_reuseFailAlloc_1920_, 10, v_queue_1886_);
lean_ctor_set(v_reuseFailAlloc_1920_, 11, v_basis_1887_);
lean_ctor_set(v_reuseFailAlloc_1920_, 12, v_diseqs_1888_);
lean_ctor_set(v_reuseFailAlloc_1920_, 13, v_invSet_1890_);
lean_ctor_set(v_reuseFailAlloc_1920_, 14, v_numEq0_x3f_1891_);
lean_ctor_set_uint8(v_reuseFailAlloc_1920_, sizeof(void*)*15, v_recheck_1889_);
lean_ctor_set_uint8(v_reuseFailAlloc_1920_, sizeof(void*)*15 + 1, v_numEq0Updated_1892_);
v___x_1919_ = v_reuseFailAlloc_1920_;
goto v_reusejp_1918_;
}
v_reusejp_1918_:
{
return v___x_1919_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15(lean_object* v___y_1938_, lean_object* v___y_1939_, lean_object* v___y_1940_, lean_object* v___y_1941_, lean_object* v___y_1942_, lean_object* v___y_1943_, lean_object* v___y_1944_, lean_object* v___y_1945_, lean_object* v___y_1946_, lean_object* v___y_1947_, lean_object* v___y_1948_){
_start:
{
lean_object* v___y_1951_; lean_object* v___y_1952_; lean_object* v___y_1953_; lean_object* v___x_1973_; 
v___x_1973_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_getCommRing(v___y_1938_, v___y_1939_, v___y_1940_, v___y_1941_, v___y_1942_, v___y_1943_, v___y_1944_, v___y_1945_, v___y_1946_, v___y_1947_, v___y_1948_);
if (lean_obj_tag(v___x_1973_) == 0)
{
lean_object* v_a_1974_; lean_object* v___x_1976_; uint8_t v_isShared_1977_; uint8_t v_isSharedCheck_2035_; 
v_a_1974_ = lean_ctor_get(v___x_1973_, 0);
v_isSharedCheck_2035_ = !lean_is_exclusive(v___x_1973_);
if (v_isSharedCheck_2035_ == 0)
{
v___x_1976_ = v___x_1973_;
v_isShared_1977_ = v_isSharedCheck_2035_;
goto v_resetjp_1975_;
}
else
{
lean_inc(v_a_1974_);
lean_dec(v___x_1973_);
v___x_1976_ = lean_box(0);
v_isShared_1977_ = v_isSharedCheck_2035_;
goto v_resetjp_1975_;
}
v_resetjp_1975_:
{
lean_object* v_toRing_1978_; lean_object* v_intCastFn_x3f_1979_; 
v_toRing_1978_ = lean_ctor_get(v_a_1974_, 0);
lean_inc_ref(v_toRing_1978_);
lean_dec(v_a_1974_);
v_intCastFn_x3f_1979_ = lean_ctor_get(v_toRing_1978_, 11);
if (lean_obj_tag(v_intCastFn_x3f_1979_) == 1)
{
lean_object* v_val_1980_; lean_object* v___x_1982_; 
lean_inc_ref(v_intCastFn_x3f_1979_);
lean_dec_ref(v_toRing_1978_);
lean_dec(v___y_1948_);
lean_dec_ref(v___y_1947_);
lean_dec(v___y_1946_);
lean_dec_ref(v___y_1945_);
lean_dec(v___y_1944_);
lean_dec_ref(v___y_1943_);
lean_dec(v___y_1942_);
lean_dec_ref(v___y_1941_);
lean_dec(v___y_1940_);
lean_dec(v___y_1939_);
lean_dec_ref(v___y_1938_);
v_val_1980_ = lean_ctor_get(v_intCastFn_x3f_1979_, 0);
lean_inc(v_val_1980_);
lean_dec_ref(v_intCastFn_x3f_1979_);
if (v_isShared_1977_ == 0)
{
lean_ctor_set(v___x_1976_, 0, v_val_1980_);
v___x_1982_ = v___x_1976_;
goto v_reusejp_1981_;
}
else
{
lean_object* v_reuseFailAlloc_1983_; 
v_reuseFailAlloc_1983_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1983_, 0, v_val_1980_);
v___x_1982_ = v_reuseFailAlloc_1983_;
goto v_reusejp_1981_;
}
v_reusejp_1981_:
{
return v___x_1982_;
}
}
else
{
lean_object* v_type_1984_; lean_object* v_u_1985_; lean_object* v_ringInst_1986_; lean_object* v___x_1987_; lean_object* v___x_1988_; lean_object* v___x_1989_; lean_object* v___x_1990_; lean_object* v_inst_x27_1991_; lean_object* v_inst_1993_; lean_object* v___y_1994_; lean_object* v___y_1995_; lean_object* v___y_1996_; lean_object* v___y_1997_; lean_object* v___y_1998_; lean_object* v___y_1999_; lean_object* v___y_2000_; lean_object* v___y_2001_; lean_object* v___y_2002_; lean_object* v___y_2003_; lean_object* v___y_2004_; lean_object* v___x_2011_; lean_object* v___x_2012_; lean_object* v_instType_2013_; lean_object* v___x_2014_; 
lean_del_object(v___x_1976_);
v_type_1984_ = lean_ctor_get(v_toRing_1978_, 1);
lean_inc_ref(v_type_1984_);
v_u_1985_ = lean_ctor_get(v_toRing_1978_, 2);
lean_inc(v_u_1985_);
v_ringInst_1986_ = lean_ctor_get(v_toRing_1978_, 3);
lean_inc_ref(v_ringInst_1986_);
lean_dec_ref(v_toRing_1978_);
v___x_1987_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1));
v___x_1988_ = lean_box(0);
v___x_1989_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_1989_, 0, v_u_1985_);
lean_ctor_set(v___x_1989_, 1, v___x_1988_);
lean_inc_ref(v___x_1989_);
v___x_1990_ = l_Lean_mkConst(v___x_1987_, v___x_1989_);
lean_inc_ref(v_type_1984_);
v_inst_x27_1991_ = l_Lean_mkAppB(v___x_1990_, v_type_1984_, v_ringInst_1986_);
v___x_2011_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__2));
lean_inc_ref(v___x_1989_);
v___x_2012_ = l_Lean_mkConst(v___x_2011_, v___x_1989_);
lean_inc_ref(v_type_1984_);
v_instType_2013_ = l_Lean_Expr_app___override(v___x_2012_, v_type_1984_);
lean_inc(v___y_1948_);
lean_inc_ref(v___y_1947_);
lean_inc(v___y_1946_);
lean_inc_ref(v___y_1945_);
v___x_2014_ = l_Lean_Meta_Grind_synthInstanceMeta_x3f(v_instType_2013_, v___y_1945_, v___y_1946_, v___y_1947_, v___y_1948_);
if (lean_obj_tag(v___x_2014_) == 0)
{
lean_object* v_a_2015_; 
v_a_2015_ = lean_ctor_get(v___x_2014_, 0);
lean_inc(v_a_2015_);
lean_dec_ref(v___x_2014_);
if (lean_obj_tag(v_a_2015_) == 0)
{
v_inst_1993_ = v_inst_x27_1991_;
v___y_1994_ = v___y_1938_;
v___y_1995_ = v___y_1939_;
v___y_1996_ = v___y_1940_;
v___y_1997_ = v___y_1941_;
v___y_1998_ = v___y_1942_;
v___y_1999_ = v___y_1943_;
v___y_2000_ = v___y_1944_;
v___y_2001_ = v___y_1945_;
v___y_2002_ = v___y_1946_;
v___y_2003_ = v___y_1947_;
v___y_2004_ = v___y_1948_;
goto v___jp_1992_;
}
else
{
lean_object* v_val_2016_; lean_object* v___x_2017_; lean_object* v___x_2018_; 
v_val_2016_ = lean_ctor_get(v_a_2015_, 0);
lean_inc(v_val_2016_);
lean_dec_ref(v_a_2015_);
v___x_2017_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__5));
lean_inc(v___y_1948_);
lean_inc_ref(v___y_1947_);
lean_inc(v___y_1946_);
lean_inc_ref(v___y_1945_);
lean_inc(v_val_2016_);
v___x_2018_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v___x_2017_, v_val_2016_, v_inst_x27_1991_, v___y_1945_, v___y_1946_, v___y_1947_, v___y_1948_);
if (lean_obj_tag(v___x_2018_) == 0)
{
lean_dec_ref(v___x_2018_);
v_inst_1993_ = v_val_2016_;
v___y_1994_ = v___y_1938_;
v___y_1995_ = v___y_1939_;
v___y_1996_ = v___y_1940_;
v___y_1997_ = v___y_1941_;
v___y_1998_ = v___y_1942_;
v___y_1999_ = v___y_1943_;
v___y_2000_ = v___y_1944_;
v___y_2001_ = v___y_1945_;
v___y_2002_ = v___y_1946_;
v___y_2003_ = v___y_1947_;
v___y_2004_ = v___y_1948_;
goto v___jp_1992_;
}
else
{
lean_object* v_a_2019_; lean_object* v___x_2021_; uint8_t v_isShared_2022_; uint8_t v_isSharedCheck_2026_; 
lean_dec(v_val_2016_);
lean_dec_ref(v___x_1989_);
lean_dec_ref(v_type_1984_);
lean_dec(v___y_1948_);
lean_dec_ref(v___y_1947_);
lean_dec(v___y_1946_);
lean_dec_ref(v___y_1945_);
lean_dec(v___y_1944_);
lean_dec_ref(v___y_1943_);
lean_dec(v___y_1942_);
lean_dec_ref(v___y_1941_);
lean_dec(v___y_1940_);
lean_dec(v___y_1939_);
lean_dec_ref(v___y_1938_);
v_a_2019_ = lean_ctor_get(v___x_2018_, 0);
v_isSharedCheck_2026_ = !lean_is_exclusive(v___x_2018_);
if (v_isSharedCheck_2026_ == 0)
{
v___x_2021_ = v___x_2018_;
v_isShared_2022_ = v_isSharedCheck_2026_;
goto v_resetjp_2020_;
}
else
{
lean_inc(v_a_2019_);
lean_dec(v___x_2018_);
v___x_2021_ = lean_box(0);
v_isShared_2022_ = v_isSharedCheck_2026_;
goto v_resetjp_2020_;
}
v_resetjp_2020_:
{
lean_object* v___x_2024_; 
if (v_isShared_2022_ == 0)
{
v___x_2024_ = v___x_2021_;
goto v_reusejp_2023_;
}
else
{
lean_object* v_reuseFailAlloc_2025_; 
v_reuseFailAlloc_2025_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2025_, 0, v_a_2019_);
v___x_2024_ = v_reuseFailAlloc_2025_;
goto v_reusejp_2023_;
}
v_reusejp_2023_:
{
return v___x_2024_;
}
}
}
}
}
else
{
lean_object* v_a_2027_; lean_object* v___x_2029_; uint8_t v_isShared_2030_; uint8_t v_isSharedCheck_2034_; 
lean_dec_ref(v_inst_x27_1991_);
lean_dec_ref(v___x_1989_);
lean_dec_ref(v_type_1984_);
lean_dec(v___y_1948_);
lean_dec_ref(v___y_1947_);
lean_dec(v___y_1946_);
lean_dec_ref(v___y_1945_);
lean_dec(v___y_1944_);
lean_dec_ref(v___y_1943_);
lean_dec(v___y_1942_);
lean_dec_ref(v___y_1941_);
lean_dec(v___y_1940_);
lean_dec(v___y_1939_);
lean_dec_ref(v___y_1938_);
v_a_2027_ = lean_ctor_get(v___x_2014_, 0);
v_isSharedCheck_2034_ = !lean_is_exclusive(v___x_2014_);
if (v_isSharedCheck_2034_ == 0)
{
v___x_2029_ = v___x_2014_;
v_isShared_2030_ = v_isSharedCheck_2034_;
goto v_resetjp_2028_;
}
else
{
lean_inc(v_a_2027_);
lean_dec(v___x_2014_);
v___x_2029_ = lean_box(0);
v_isShared_2030_ = v_isSharedCheck_2034_;
goto v_resetjp_2028_;
}
v_resetjp_2028_:
{
lean_object* v___x_2032_; 
if (v_isShared_2030_ == 0)
{
v___x_2032_ = v___x_2029_;
goto v_reusejp_2031_;
}
else
{
lean_object* v_reuseFailAlloc_2033_; 
v_reuseFailAlloc_2033_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2033_, 0, v_a_2027_);
v___x_2032_ = v_reuseFailAlloc_2033_;
goto v_reusejp_2031_;
}
v_reusejp_2031_:
{
return v___x_2032_;
}
}
}
v___jp_1992_:
{
lean_object* v___x_2005_; lean_object* v___x_2006_; lean_object* v___x_2007_; lean_object* v___x_2008_; 
v___x_2005_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10));
v___x_2006_ = l_Lean_mkConst(v___x_2005_, v___x_1989_);
v___x_2007_ = l_Lean_mkAppB(v___x_2006_, v_type_1984_, v_inst_1993_);
lean_inc(v___y_2000_);
lean_inc(v___y_1995_);
v___x_2008_ = lean_grind_canon(v___x_2007_, v___y_1995_, v___y_1996_, v___y_1997_, v___y_1998_, v___y_1999_, v___y_2000_, v___y_2001_, v___y_2002_, v___y_2003_, v___y_2004_);
if (lean_obj_tag(v___x_2008_) == 0)
{
lean_object* v_a_2009_; lean_object* v___x_2010_; 
v_a_2009_ = lean_ctor_get(v___x_2008_, 0);
lean_inc(v_a_2009_);
lean_dec_ref(v___x_2008_);
v___x_2010_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_2009_, v___y_2000_);
lean_dec(v___y_2000_);
v___y_1951_ = v___y_1994_;
v___y_1952_ = v___y_1995_;
v___y_1953_ = v___x_2010_;
goto v___jp_1950_;
}
else
{
lean_dec(v___y_2000_);
v___y_1951_ = v___y_1994_;
v___y_1952_ = v___y_1995_;
v___y_1953_ = v___x_2008_;
goto v___jp_1950_;
}
}
}
}
}
else
{
lean_object* v_a_2036_; lean_object* v___x_2038_; uint8_t v_isShared_2039_; uint8_t v_isSharedCheck_2043_; 
lean_dec(v___y_1948_);
lean_dec_ref(v___y_1947_);
lean_dec(v___y_1946_);
lean_dec_ref(v___y_1945_);
lean_dec(v___y_1944_);
lean_dec_ref(v___y_1943_);
lean_dec(v___y_1942_);
lean_dec_ref(v___y_1941_);
lean_dec(v___y_1940_);
lean_dec(v___y_1939_);
lean_dec_ref(v___y_1938_);
v_a_2036_ = lean_ctor_get(v___x_1973_, 0);
v_isSharedCheck_2043_ = !lean_is_exclusive(v___x_1973_);
if (v_isSharedCheck_2043_ == 0)
{
v___x_2038_ = v___x_1973_;
v_isShared_2039_ = v_isSharedCheck_2043_;
goto v_resetjp_2037_;
}
else
{
lean_inc(v_a_2036_);
lean_dec(v___x_1973_);
v___x_2038_ = lean_box(0);
v_isShared_2039_ = v_isSharedCheck_2043_;
goto v_resetjp_2037_;
}
v_resetjp_2037_:
{
lean_object* v___x_2041_; 
if (v_isShared_2039_ == 0)
{
v___x_2041_ = v___x_2038_;
goto v_reusejp_2040_;
}
else
{
lean_object* v_reuseFailAlloc_2042_; 
v_reuseFailAlloc_2042_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2042_, 0, v_a_2036_);
v___x_2041_ = v_reuseFailAlloc_2042_;
goto v_reusejp_2040_;
}
v_reusejp_2040_:
{
return v___x_2041_;
}
}
}
v___jp_1950_:
{
if (lean_obj_tag(v___y_1953_) == 0)
{
lean_object* v_a_1954_; lean_object* v___f_1955_; lean_object* v___x_1956_; 
v_a_1954_ = lean_ctor_get(v___y_1953_, 0);
lean_inc(v_a_1954_);
lean_dec_ref(v___y_1953_);
lean_inc(v_a_1954_);
v___f_1955_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___lam__0), 2, 1);
lean_closure_set(v___f_1955_, 0, v_a_1954_);
v___x_1956_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_modifyCommRing___redArg(v___f_1955_, v___y_1951_, v___y_1952_);
lean_dec(v___y_1952_);
if (lean_obj_tag(v___x_1956_) == 0)
{
lean_object* v___x_1958_; uint8_t v_isShared_1959_; uint8_t v_isSharedCheck_1963_; 
v_isSharedCheck_1963_ = !lean_is_exclusive(v___x_1956_);
if (v_isSharedCheck_1963_ == 0)
{
lean_object* v_unused_1964_; 
v_unused_1964_ = lean_ctor_get(v___x_1956_, 0);
lean_dec(v_unused_1964_);
v___x_1958_ = v___x_1956_;
v_isShared_1959_ = v_isSharedCheck_1963_;
goto v_resetjp_1957_;
}
else
{
lean_dec(v___x_1956_);
v___x_1958_ = lean_box(0);
v_isShared_1959_ = v_isSharedCheck_1963_;
goto v_resetjp_1957_;
}
v_resetjp_1957_:
{
lean_object* v___x_1961_; 
if (v_isShared_1959_ == 0)
{
lean_ctor_set(v___x_1958_, 0, v_a_1954_);
v___x_1961_ = v___x_1958_;
goto v_reusejp_1960_;
}
else
{
lean_object* v_reuseFailAlloc_1962_; 
v_reuseFailAlloc_1962_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1962_, 0, v_a_1954_);
v___x_1961_ = v_reuseFailAlloc_1962_;
goto v_reusejp_1960_;
}
v_reusejp_1960_:
{
return v___x_1961_;
}
}
}
else
{
lean_object* v_a_1965_; lean_object* v___x_1967_; uint8_t v_isShared_1968_; uint8_t v_isSharedCheck_1972_; 
lean_dec(v_a_1954_);
v_a_1965_ = lean_ctor_get(v___x_1956_, 0);
v_isSharedCheck_1972_ = !lean_is_exclusive(v___x_1956_);
if (v_isSharedCheck_1972_ == 0)
{
v___x_1967_ = v___x_1956_;
v_isShared_1968_ = v_isSharedCheck_1972_;
goto v_resetjp_1966_;
}
else
{
lean_inc(v_a_1965_);
lean_dec(v___x_1956_);
v___x_1967_ = lean_box(0);
v_isShared_1968_ = v_isSharedCheck_1972_;
goto v_resetjp_1966_;
}
v_resetjp_1966_:
{
lean_object* v___x_1970_; 
if (v_isShared_1968_ == 0)
{
v___x_1970_ = v___x_1967_;
goto v_reusejp_1969_;
}
else
{
lean_object* v_reuseFailAlloc_1971_; 
v_reuseFailAlloc_1971_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1971_, 0, v_a_1965_);
v___x_1970_ = v_reuseFailAlloc_1971_;
goto v_reusejp_1969_;
}
v_reusejp_1969_:
{
return v___x_1970_;
}
}
}
}
else
{
lean_dec(v___y_1952_);
lean_dec_ref(v___y_1951_);
return v___y_1953_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___boxed(lean_object* v___y_2044_, lean_object* v___y_2045_, lean_object* v___y_2046_, lean_object* v___y_2047_, lean_object* v___y_2048_, lean_object* v___y_2049_, lean_object* v___y_2050_, lean_object* v___y_2051_, lean_object* v___y_2052_, lean_object* v___y_2053_, lean_object* v___y_2054_, lean_object* v___y_2055_){
_start:
{
lean_object* v_res_2056_; 
v_res_2056_ = l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15(v___y_2044_, v___y_2045_, v___y_2046_, v___y_2047_, v___y_2048_, v___y_2049_, v___y_2050_, v___y_2051_, v___y_2052_, v___y_2053_, v___y_2054_);
return v_res_2056_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7(lean_object* v_inst_2057_, lean_object* v___y_2058_, lean_object* v___y_2059_, lean_object* v___y_2060_, lean_object* v___y_2061_, lean_object* v___y_2062_, lean_object* v___y_2063_, lean_object* v___y_2064_, lean_object* v___y_2065_, lean_object* v___y_2066_, lean_object* v___y_2067_, lean_object* v___y_2068_){
_start:
{
lean_object* v___x_2070_; 
v___x_2070_ = l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15(v___y_2058_, v___y_2059_, v___y_2060_, v___y_2061_, v___y_2062_, v___y_2063_, v___y_2064_, v___y_2065_, v___y_2066_, v___y_2067_, v___y_2068_);
if (lean_obj_tag(v___x_2070_) == 0)
{
lean_object* v_a_2071_; lean_object* v___x_2073_; uint8_t v_isShared_2074_; uint8_t v_isSharedCheck_2081_; 
v_a_2071_ = lean_ctor_get(v___x_2070_, 0);
v_isSharedCheck_2081_ = !lean_is_exclusive(v___x_2070_);
if (v_isSharedCheck_2081_ == 0)
{
v___x_2073_ = v___x_2070_;
v_isShared_2074_ = v_isSharedCheck_2081_;
goto v_resetjp_2072_;
}
else
{
lean_inc(v_a_2071_);
lean_dec(v___x_2070_);
v___x_2073_ = lean_box(0);
v_isShared_2074_ = v_isSharedCheck_2081_;
goto v_resetjp_2072_;
}
v_resetjp_2072_:
{
lean_object* v___x_2075_; uint8_t v___x_2076_; lean_object* v___x_2077_; lean_object* v___x_2079_; 
v___x_2075_ = l_Lean_Expr_appArg_x21(v_a_2071_);
lean_dec(v_a_2071_);
v___x_2076_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_2075_, v_inst_2057_);
lean_dec_ref(v___x_2075_);
v___x_2077_ = lean_box(v___x_2076_);
if (v_isShared_2074_ == 0)
{
lean_ctor_set(v___x_2073_, 0, v___x_2077_);
v___x_2079_ = v___x_2073_;
goto v_reusejp_2078_;
}
else
{
lean_object* v_reuseFailAlloc_2080_; 
v_reuseFailAlloc_2080_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2080_, 0, v___x_2077_);
v___x_2079_ = v_reuseFailAlloc_2080_;
goto v_reusejp_2078_;
}
v_reusejp_2078_:
{
return v___x_2079_;
}
}
}
else
{
lean_object* v_a_2082_; lean_object* v___x_2084_; uint8_t v_isShared_2085_; uint8_t v_isSharedCheck_2089_; 
v_a_2082_ = lean_ctor_get(v___x_2070_, 0);
v_isSharedCheck_2089_ = !lean_is_exclusive(v___x_2070_);
if (v_isSharedCheck_2089_ == 0)
{
v___x_2084_ = v___x_2070_;
v_isShared_2085_ = v_isSharedCheck_2089_;
goto v_resetjp_2083_;
}
else
{
lean_inc(v_a_2082_);
lean_dec(v___x_2070_);
v___x_2084_ = lean_box(0);
v_isShared_2085_ = v_isSharedCheck_2089_;
goto v_resetjp_2083_;
}
v_resetjp_2083_:
{
lean_object* v___x_2087_; 
if (v_isShared_2085_ == 0)
{
v___x_2087_ = v___x_2084_;
goto v_reusejp_2086_;
}
else
{
lean_object* v_reuseFailAlloc_2088_; 
v_reuseFailAlloc_2088_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2088_, 0, v_a_2082_);
v___x_2087_ = v_reuseFailAlloc_2088_;
goto v_reusejp_2086_;
}
v_reusejp_2086_:
{
return v___x_2087_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7___boxed(lean_object* v_inst_2090_, lean_object* v___y_2091_, lean_object* v___y_2092_, lean_object* v___y_2093_, lean_object* v___y_2094_, lean_object* v___y_2095_, lean_object* v___y_2096_, lean_object* v___y_2097_, lean_object* v___y_2098_, lean_object* v___y_2099_, lean_object* v___y_2100_, lean_object* v___y_2101_, lean_object* v___y_2102_){
_start:
{
lean_object* v_res_2103_; 
v_res_2103_ = l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7(v_inst_2090_, v___y_2091_, v___y_2092_, v___y_2093_, v___y_2094_, v___y_2095_, v___y_2096_, v___y_2097_, v___y_2098_, v___y_2099_, v___y_2100_, v___y_2101_);
lean_dec_ref(v_inst_2090_);
return v_res_2103_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg(lean_object* v_u_2111_, lean_object* v_type_2112_, lean_object* v_semiringInst_2113_, lean_object* v___y_2114_, lean_object* v___y_2115_, lean_object* v___y_2116_, lean_object* v___y_2117_, lean_object* v___y_2118_, lean_object* v___y_2119_, lean_object* v___y_2120_, lean_object* v___y_2121_, lean_object* v___y_2122_, lean_object* v___y_2123_){
_start:
{
lean_object* v___x_2125_; lean_object* v___x_2126_; lean_object* v___x_2127_; lean_object* v___x_2128_; lean_object* v_inst_x27_2129_; lean_object* v_inst_2131_; lean_object* v___y_2132_; lean_object* v___y_2133_; lean_object* v___y_2134_; lean_object* v___y_2135_; lean_object* v___y_2136_; lean_object* v___y_2137_; lean_object* v___y_2138_; lean_object* v___y_2139_; lean_object* v___y_2140_; lean_object* v___y_2141_; lean_object* v___x_2148_; lean_object* v___x_2149_; lean_object* v_instType_2150_; lean_object* v___x_2151_; 
v___x_2125_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0));
v___x_2126_ = lean_box(0);
v___x_2127_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_2127_, 0, v_u_2111_);
lean_ctor_set(v___x_2127_, 1, v___x_2126_);
lean_inc_ref(v___x_2127_);
v___x_2128_ = l_Lean_mkConst(v___x_2125_, v___x_2127_);
lean_inc_ref(v_type_2112_);
v_inst_x27_2129_ = l_Lean_mkAppB(v___x_2128_, v_type_2112_, v_semiringInst_2113_);
v___x_2148_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__1));
lean_inc_ref(v___x_2127_);
v___x_2149_ = l_Lean_mkConst(v___x_2148_, v___x_2127_);
lean_inc_ref(v_type_2112_);
v_instType_2150_ = l_Lean_Expr_app___override(v___x_2149_, v_type_2112_);
lean_inc(v___y_2123_);
lean_inc_ref(v___y_2122_);
lean_inc(v___y_2121_);
lean_inc_ref(v___y_2120_);
v___x_2151_ = l_Lean_Meta_Grind_synthInstanceMeta_x3f(v_instType_2150_, v___y_2120_, v___y_2121_, v___y_2122_, v___y_2123_);
if (lean_obj_tag(v___x_2151_) == 0)
{
lean_object* v_a_2152_; 
v_a_2152_ = lean_ctor_get(v___x_2151_, 0);
lean_inc(v_a_2152_);
lean_dec_ref(v___x_2151_);
if (lean_obj_tag(v_a_2152_) == 0)
{
v_inst_2131_ = v_inst_x27_2129_;
v___y_2132_ = v___y_2114_;
v___y_2133_ = v___y_2115_;
v___y_2134_ = v___y_2116_;
v___y_2135_ = v___y_2117_;
v___y_2136_ = v___y_2118_;
v___y_2137_ = v___y_2119_;
v___y_2138_ = v___y_2120_;
v___y_2139_ = v___y_2121_;
v___y_2140_ = v___y_2122_;
v___y_2141_ = v___y_2123_;
goto v___jp_2130_;
}
else
{
lean_object* v_val_2153_; lean_object* v___x_2154_; lean_object* v___x_2155_; 
v_val_2153_ = lean_ctor_get(v_a_2152_, 0);
lean_inc(v_val_2153_);
lean_dec_ref(v_a_2152_);
v___x_2154_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
lean_inc(v___y_2123_);
lean_inc_ref(v___y_2122_);
lean_inc(v___y_2121_);
lean_inc_ref(v___y_2120_);
lean_inc(v_val_2153_);
v___x_2155_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v___x_2154_, v_val_2153_, v_inst_x27_2129_, v___y_2120_, v___y_2121_, v___y_2122_, v___y_2123_);
if (lean_obj_tag(v___x_2155_) == 0)
{
lean_dec_ref(v___x_2155_);
v_inst_2131_ = v_val_2153_;
v___y_2132_ = v___y_2114_;
v___y_2133_ = v___y_2115_;
v___y_2134_ = v___y_2116_;
v___y_2135_ = v___y_2117_;
v___y_2136_ = v___y_2118_;
v___y_2137_ = v___y_2119_;
v___y_2138_ = v___y_2120_;
v___y_2139_ = v___y_2121_;
v___y_2140_ = v___y_2122_;
v___y_2141_ = v___y_2123_;
goto v___jp_2130_;
}
else
{
lean_object* v_a_2156_; lean_object* v___x_2158_; uint8_t v_isShared_2159_; uint8_t v_isSharedCheck_2163_; 
lean_dec(v_val_2153_);
lean_dec_ref(v___x_2127_);
lean_dec(v___y_2123_);
lean_dec_ref(v___y_2122_);
lean_dec(v___y_2121_);
lean_dec_ref(v___y_2120_);
lean_dec(v___y_2119_);
lean_dec_ref(v___y_2118_);
lean_dec(v___y_2117_);
lean_dec_ref(v___y_2116_);
lean_dec(v___y_2115_);
lean_dec(v___y_2114_);
lean_dec_ref(v_type_2112_);
v_a_2156_ = lean_ctor_get(v___x_2155_, 0);
v_isSharedCheck_2163_ = !lean_is_exclusive(v___x_2155_);
if (v_isSharedCheck_2163_ == 0)
{
v___x_2158_ = v___x_2155_;
v_isShared_2159_ = v_isSharedCheck_2163_;
goto v_resetjp_2157_;
}
else
{
lean_inc(v_a_2156_);
lean_dec(v___x_2155_);
v___x_2158_ = lean_box(0);
v_isShared_2159_ = v_isSharedCheck_2163_;
goto v_resetjp_2157_;
}
v_resetjp_2157_:
{
lean_object* v___x_2161_; 
if (v_isShared_2159_ == 0)
{
v___x_2161_ = v___x_2158_;
goto v_reusejp_2160_;
}
else
{
lean_object* v_reuseFailAlloc_2162_; 
v_reuseFailAlloc_2162_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2162_, 0, v_a_2156_);
v___x_2161_ = v_reuseFailAlloc_2162_;
goto v_reusejp_2160_;
}
v_reusejp_2160_:
{
return v___x_2161_;
}
}
}
}
}
else
{
lean_object* v_a_2164_; lean_object* v___x_2166_; uint8_t v_isShared_2167_; uint8_t v_isSharedCheck_2171_; 
lean_dec_ref(v_inst_x27_2129_);
lean_dec_ref(v___x_2127_);
lean_dec(v___y_2123_);
lean_dec_ref(v___y_2122_);
lean_dec(v___y_2121_);
lean_dec_ref(v___y_2120_);
lean_dec(v___y_2119_);
lean_dec_ref(v___y_2118_);
lean_dec(v___y_2117_);
lean_dec_ref(v___y_2116_);
lean_dec(v___y_2115_);
lean_dec(v___y_2114_);
lean_dec_ref(v_type_2112_);
v_a_2164_ = lean_ctor_get(v___x_2151_, 0);
v_isSharedCheck_2171_ = !lean_is_exclusive(v___x_2151_);
if (v_isSharedCheck_2171_ == 0)
{
v___x_2166_ = v___x_2151_;
v_isShared_2167_ = v_isSharedCheck_2171_;
goto v_resetjp_2165_;
}
else
{
lean_inc(v_a_2164_);
lean_dec(v___x_2151_);
v___x_2166_ = lean_box(0);
v_isShared_2167_ = v_isSharedCheck_2171_;
goto v_resetjp_2165_;
}
v_resetjp_2165_:
{
lean_object* v___x_2169_; 
if (v_isShared_2167_ == 0)
{
v___x_2169_ = v___x_2166_;
goto v_reusejp_2168_;
}
else
{
lean_object* v_reuseFailAlloc_2170_; 
v_reuseFailAlloc_2170_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2170_, 0, v_a_2164_);
v___x_2169_ = v_reuseFailAlloc_2170_;
goto v_reusejp_2168_;
}
v_reusejp_2168_:
{
return v___x_2169_;
}
}
}
v___jp_2130_:
{
lean_object* v___x_2142_; lean_object* v___x_2143_; lean_object* v___x_2144_; lean_object* v___x_2145_; 
v___x_2142_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_2143_ = l_Lean_mkConst(v___x_2142_, v___x_2127_);
v___x_2144_ = l_Lean_mkAppB(v___x_2143_, v_type_2112_, v_inst_2131_);
lean_inc(v___y_2137_);
v___x_2145_ = lean_grind_canon(v___x_2144_, v___y_2132_, v___y_2133_, v___y_2134_, v___y_2135_, v___y_2136_, v___y_2137_, v___y_2138_, v___y_2139_, v___y_2140_, v___y_2141_);
if (lean_obj_tag(v___x_2145_) == 0)
{
lean_object* v_a_2146_; lean_object* v___x_2147_; 
v_a_2146_ = lean_ctor_get(v___x_2145_, 0);
lean_inc(v_a_2146_);
lean_dec_ref(v___x_2145_);
v___x_2147_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_2146_, v___y_2137_);
lean_dec(v___y_2137_);
return v___x_2147_;
}
else
{
lean_dec(v___y_2137_);
return v___x_2145_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___boxed(lean_object* v_u_2172_, lean_object* v_type_2173_, lean_object* v_semiringInst_2174_, lean_object* v___y_2175_, lean_object* v___y_2176_, lean_object* v___y_2177_, lean_object* v___y_2178_, lean_object* v___y_2179_, lean_object* v___y_2180_, lean_object* v___y_2181_, lean_object* v___y_2182_, lean_object* v___y_2183_, lean_object* v___y_2184_, lean_object* v___y_2185_){
_start:
{
lean_object* v_res_2186_; 
v_res_2186_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg(v_u_2172_, v_type_2173_, v_semiringInst_2174_, v___y_2175_, v___y_2176_, v___y_2177_, v___y_2178_, v___y_2179_, v___y_2180_, v___y_2181_, v___y_2182_, v___y_2183_, v___y_2184_);
return v_res_2186_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17___lam__0(lean_object* v_a_2187_, lean_object* v_s_2188_){
_start:
{
lean_object* v_toRing_2189_; lean_object* v_invFn_x3f_2190_; lean_object* v_semiringId_x3f_2191_; lean_object* v_commSemiringInst_2192_; lean_object* v_commRingInst_2193_; lean_object* v_noZeroDivInst_x3f_2194_; lean_object* v_fieldInst_x3f_2195_; lean_object* v_denoteEntries_2196_; lean_object* v_nextId_2197_; lean_object* v_steps_2198_; lean_object* v_queue_2199_; lean_object* v_basis_2200_; lean_object* v_diseqs_2201_; uint8_t v_recheck_2202_; lean_object* v_invSet_2203_; lean_object* v_numEq0_x3f_2204_; uint8_t v_numEq0Updated_2205_; lean_object* v___x_2207_; uint8_t v_isShared_2208_; uint8_t v_isSharedCheck_2237_; 
v_toRing_2189_ = lean_ctor_get(v_s_2188_, 0);
v_invFn_x3f_2190_ = lean_ctor_get(v_s_2188_, 1);
v_semiringId_x3f_2191_ = lean_ctor_get(v_s_2188_, 2);
v_commSemiringInst_2192_ = lean_ctor_get(v_s_2188_, 3);
v_commRingInst_2193_ = lean_ctor_get(v_s_2188_, 4);
v_noZeroDivInst_x3f_2194_ = lean_ctor_get(v_s_2188_, 5);
v_fieldInst_x3f_2195_ = lean_ctor_get(v_s_2188_, 6);
v_denoteEntries_2196_ = lean_ctor_get(v_s_2188_, 7);
v_nextId_2197_ = lean_ctor_get(v_s_2188_, 8);
v_steps_2198_ = lean_ctor_get(v_s_2188_, 9);
v_queue_2199_ = lean_ctor_get(v_s_2188_, 10);
v_basis_2200_ = lean_ctor_get(v_s_2188_, 11);
v_diseqs_2201_ = lean_ctor_get(v_s_2188_, 12);
v_recheck_2202_ = lean_ctor_get_uint8(v_s_2188_, sizeof(void*)*15);
v_invSet_2203_ = lean_ctor_get(v_s_2188_, 13);
v_numEq0_x3f_2204_ = lean_ctor_get(v_s_2188_, 14);
v_numEq0Updated_2205_ = lean_ctor_get_uint8(v_s_2188_, sizeof(void*)*15 + 1);
v_isSharedCheck_2237_ = !lean_is_exclusive(v_s_2188_);
if (v_isSharedCheck_2237_ == 0)
{
v___x_2207_ = v_s_2188_;
v_isShared_2208_ = v_isSharedCheck_2237_;
goto v_resetjp_2206_;
}
else
{
lean_inc(v_numEq0_x3f_2204_);
lean_inc(v_invSet_2203_);
lean_inc(v_diseqs_2201_);
lean_inc(v_basis_2200_);
lean_inc(v_queue_2199_);
lean_inc(v_steps_2198_);
lean_inc(v_nextId_2197_);
lean_inc(v_denoteEntries_2196_);
lean_inc(v_fieldInst_x3f_2195_);
lean_inc(v_noZeroDivInst_x3f_2194_);
lean_inc(v_commRingInst_2193_);
lean_inc(v_commSemiringInst_2192_);
lean_inc(v_semiringId_x3f_2191_);
lean_inc(v_invFn_x3f_2190_);
lean_inc(v_toRing_2189_);
lean_dec(v_s_2188_);
v___x_2207_ = lean_box(0);
v_isShared_2208_ = v_isSharedCheck_2237_;
goto v_resetjp_2206_;
}
v_resetjp_2206_:
{
lean_object* v_id_2209_; lean_object* v_type_2210_; lean_object* v_u_2211_; lean_object* v_ringInst_2212_; lean_object* v_semiringInst_2213_; lean_object* v_charInst_x3f_2214_; lean_object* v_addFn_x3f_2215_; lean_object* v_mulFn_x3f_2216_; lean_object* v_subFn_x3f_2217_; lean_object* v_negFn_x3f_2218_; lean_object* v_powFn_x3f_2219_; lean_object* v_intCastFn_x3f_2220_; lean_object* v_one_x3f_2221_; lean_object* v_vars_2222_; lean_object* v_varMap_2223_; lean_object* v_denote_2224_; lean_object* v___x_2226_; uint8_t v_isShared_2227_; uint8_t v_isSharedCheck_2235_; 
v_id_2209_ = lean_ctor_get(v_toRing_2189_, 0);
v_type_2210_ = lean_ctor_get(v_toRing_2189_, 1);
v_u_2211_ = lean_ctor_get(v_toRing_2189_, 2);
v_ringInst_2212_ = lean_ctor_get(v_toRing_2189_, 3);
v_semiringInst_2213_ = lean_ctor_get(v_toRing_2189_, 4);
v_charInst_x3f_2214_ = lean_ctor_get(v_toRing_2189_, 5);
v_addFn_x3f_2215_ = lean_ctor_get(v_toRing_2189_, 6);
v_mulFn_x3f_2216_ = lean_ctor_get(v_toRing_2189_, 7);
v_subFn_x3f_2217_ = lean_ctor_get(v_toRing_2189_, 8);
v_negFn_x3f_2218_ = lean_ctor_get(v_toRing_2189_, 9);
v_powFn_x3f_2219_ = lean_ctor_get(v_toRing_2189_, 10);
v_intCastFn_x3f_2220_ = lean_ctor_get(v_toRing_2189_, 11);
v_one_x3f_2221_ = lean_ctor_get(v_toRing_2189_, 13);
v_vars_2222_ = lean_ctor_get(v_toRing_2189_, 14);
v_varMap_2223_ = lean_ctor_get(v_toRing_2189_, 15);
v_denote_2224_ = lean_ctor_get(v_toRing_2189_, 16);
v_isSharedCheck_2235_ = !lean_is_exclusive(v_toRing_2189_);
if (v_isSharedCheck_2235_ == 0)
{
lean_object* v_unused_2236_; 
v_unused_2236_ = lean_ctor_get(v_toRing_2189_, 12);
lean_dec(v_unused_2236_);
v___x_2226_ = v_toRing_2189_;
v_isShared_2227_ = v_isSharedCheck_2235_;
goto v_resetjp_2225_;
}
else
{
lean_inc(v_denote_2224_);
lean_inc(v_varMap_2223_);
lean_inc(v_vars_2222_);
lean_inc(v_one_x3f_2221_);
lean_inc(v_intCastFn_x3f_2220_);
lean_inc(v_powFn_x3f_2219_);
lean_inc(v_negFn_x3f_2218_);
lean_inc(v_subFn_x3f_2217_);
lean_inc(v_mulFn_x3f_2216_);
lean_inc(v_addFn_x3f_2215_);
lean_inc(v_charInst_x3f_2214_);
lean_inc(v_semiringInst_2213_);
lean_inc(v_ringInst_2212_);
lean_inc(v_u_2211_);
lean_inc(v_type_2210_);
lean_inc(v_id_2209_);
lean_dec(v_toRing_2189_);
v___x_2226_ = lean_box(0);
v_isShared_2227_ = v_isSharedCheck_2235_;
goto v_resetjp_2225_;
}
v_resetjp_2225_:
{
lean_object* v___x_2228_; lean_object* v___x_2230_; 
v___x_2228_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_2228_, 0, v_a_2187_);
if (v_isShared_2227_ == 0)
{
lean_ctor_set(v___x_2226_, 12, v___x_2228_);
v___x_2230_ = v___x_2226_;
goto v_reusejp_2229_;
}
else
{
lean_object* v_reuseFailAlloc_2234_; 
v_reuseFailAlloc_2234_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_2234_, 0, v_id_2209_);
lean_ctor_set(v_reuseFailAlloc_2234_, 1, v_type_2210_);
lean_ctor_set(v_reuseFailAlloc_2234_, 2, v_u_2211_);
lean_ctor_set(v_reuseFailAlloc_2234_, 3, v_ringInst_2212_);
lean_ctor_set(v_reuseFailAlloc_2234_, 4, v_semiringInst_2213_);
lean_ctor_set(v_reuseFailAlloc_2234_, 5, v_charInst_x3f_2214_);
lean_ctor_set(v_reuseFailAlloc_2234_, 6, v_addFn_x3f_2215_);
lean_ctor_set(v_reuseFailAlloc_2234_, 7, v_mulFn_x3f_2216_);
lean_ctor_set(v_reuseFailAlloc_2234_, 8, v_subFn_x3f_2217_);
lean_ctor_set(v_reuseFailAlloc_2234_, 9, v_negFn_x3f_2218_);
lean_ctor_set(v_reuseFailAlloc_2234_, 10, v_powFn_x3f_2219_);
lean_ctor_set(v_reuseFailAlloc_2234_, 11, v_intCastFn_x3f_2220_);
lean_ctor_set(v_reuseFailAlloc_2234_, 12, v___x_2228_);
lean_ctor_set(v_reuseFailAlloc_2234_, 13, v_one_x3f_2221_);
lean_ctor_set(v_reuseFailAlloc_2234_, 14, v_vars_2222_);
lean_ctor_set(v_reuseFailAlloc_2234_, 15, v_varMap_2223_);
lean_ctor_set(v_reuseFailAlloc_2234_, 16, v_denote_2224_);
v___x_2230_ = v_reuseFailAlloc_2234_;
goto v_reusejp_2229_;
}
v_reusejp_2229_:
{
lean_object* v___x_2232_; 
if (v_isShared_2208_ == 0)
{
lean_ctor_set(v___x_2207_, 0, v___x_2230_);
v___x_2232_ = v___x_2207_;
goto v_reusejp_2231_;
}
else
{
lean_object* v_reuseFailAlloc_2233_; 
v_reuseFailAlloc_2233_ = lean_alloc_ctor(0, 15, 2);
lean_ctor_set(v_reuseFailAlloc_2233_, 0, v___x_2230_);
lean_ctor_set(v_reuseFailAlloc_2233_, 1, v_invFn_x3f_2190_);
lean_ctor_set(v_reuseFailAlloc_2233_, 2, v_semiringId_x3f_2191_);
lean_ctor_set(v_reuseFailAlloc_2233_, 3, v_commSemiringInst_2192_);
lean_ctor_set(v_reuseFailAlloc_2233_, 4, v_commRingInst_2193_);
lean_ctor_set(v_reuseFailAlloc_2233_, 5, v_noZeroDivInst_x3f_2194_);
lean_ctor_set(v_reuseFailAlloc_2233_, 6, v_fieldInst_x3f_2195_);
lean_ctor_set(v_reuseFailAlloc_2233_, 7, v_denoteEntries_2196_);
lean_ctor_set(v_reuseFailAlloc_2233_, 8, v_nextId_2197_);
lean_ctor_set(v_reuseFailAlloc_2233_, 9, v_steps_2198_);
lean_ctor_set(v_reuseFailAlloc_2233_, 10, v_queue_2199_);
lean_ctor_set(v_reuseFailAlloc_2233_, 11, v_basis_2200_);
lean_ctor_set(v_reuseFailAlloc_2233_, 12, v_diseqs_2201_);
lean_ctor_set(v_reuseFailAlloc_2233_, 13, v_invSet_2203_);
lean_ctor_set(v_reuseFailAlloc_2233_, 14, v_numEq0_x3f_2204_);
lean_ctor_set_uint8(v_reuseFailAlloc_2233_, sizeof(void*)*15, v_recheck_2202_);
lean_ctor_set_uint8(v_reuseFailAlloc_2233_, sizeof(void*)*15 + 1, v_numEq0Updated_2205_);
v___x_2232_ = v_reuseFailAlloc_2233_;
goto v_reusejp_2231_;
}
v_reusejp_2231_:
{
return v___x_2232_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17(lean_object* v___y_2238_, lean_object* v___y_2239_, lean_object* v___y_2240_, lean_object* v___y_2241_, lean_object* v___y_2242_, lean_object* v___y_2243_, lean_object* v___y_2244_, lean_object* v___y_2245_, lean_object* v___y_2246_, lean_object* v___y_2247_, lean_object* v___y_2248_){
_start:
{
lean_object* v___x_2250_; 
v___x_2250_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_getCommRing(v___y_2238_, v___y_2239_, v___y_2240_, v___y_2241_, v___y_2242_, v___y_2243_, v___y_2244_, v___y_2245_, v___y_2246_, v___y_2247_, v___y_2248_);
if (lean_obj_tag(v___x_2250_) == 0)
{
lean_object* v_a_2251_; lean_object* v___x_2253_; uint8_t v_isShared_2254_; uint8_t v_isSharedCheck_2284_; 
v_a_2251_ = lean_ctor_get(v___x_2250_, 0);
v_isSharedCheck_2284_ = !lean_is_exclusive(v___x_2250_);
if (v_isSharedCheck_2284_ == 0)
{
v___x_2253_ = v___x_2250_;
v_isShared_2254_ = v_isSharedCheck_2284_;
goto v_resetjp_2252_;
}
else
{
lean_inc(v_a_2251_);
lean_dec(v___x_2250_);
v___x_2253_ = lean_box(0);
v_isShared_2254_ = v_isSharedCheck_2284_;
goto v_resetjp_2252_;
}
v_resetjp_2252_:
{
lean_object* v_toRing_2255_; lean_object* v_natCastFn_x3f_2256_; 
v_toRing_2255_ = lean_ctor_get(v_a_2251_, 0);
lean_inc_ref(v_toRing_2255_);
lean_dec(v_a_2251_);
v_natCastFn_x3f_2256_ = lean_ctor_get(v_toRing_2255_, 12);
if (lean_obj_tag(v_natCastFn_x3f_2256_) == 1)
{
lean_object* v_val_2257_; lean_object* v___x_2259_; 
lean_inc_ref(v_natCastFn_x3f_2256_);
lean_dec_ref(v_toRing_2255_);
lean_dec(v___y_2248_);
lean_dec_ref(v___y_2247_);
lean_dec(v___y_2246_);
lean_dec_ref(v___y_2245_);
lean_dec(v___y_2244_);
lean_dec_ref(v___y_2243_);
lean_dec(v___y_2242_);
lean_dec_ref(v___y_2241_);
lean_dec(v___y_2240_);
lean_dec(v___y_2239_);
lean_dec_ref(v___y_2238_);
v_val_2257_ = lean_ctor_get(v_natCastFn_x3f_2256_, 0);
lean_inc(v_val_2257_);
lean_dec_ref(v_natCastFn_x3f_2256_);
if (v_isShared_2254_ == 0)
{
lean_ctor_set(v___x_2253_, 0, v_val_2257_);
v___x_2259_ = v___x_2253_;
goto v_reusejp_2258_;
}
else
{
lean_object* v_reuseFailAlloc_2260_; 
v_reuseFailAlloc_2260_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2260_, 0, v_val_2257_);
v___x_2259_ = v_reuseFailAlloc_2260_;
goto v_reusejp_2258_;
}
v_reusejp_2258_:
{
return v___x_2259_;
}
}
else
{
lean_object* v_type_2261_; lean_object* v_u_2262_; lean_object* v_semiringInst_2263_; lean_object* v___x_2264_; 
lean_del_object(v___x_2253_);
v_type_2261_ = lean_ctor_get(v_toRing_2255_, 1);
lean_inc_ref(v_type_2261_);
v_u_2262_ = lean_ctor_get(v_toRing_2255_, 2);
lean_inc(v_u_2262_);
v_semiringInst_2263_ = lean_ctor_get(v_toRing_2255_, 4);
lean_inc_ref(v_semiringInst_2263_);
lean_dec_ref(v_toRing_2255_);
lean_inc(v___y_2239_);
v___x_2264_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg(v_u_2262_, v_type_2261_, v_semiringInst_2263_, v___y_2239_, v___y_2240_, v___y_2241_, v___y_2242_, v___y_2243_, v___y_2244_, v___y_2245_, v___y_2246_, v___y_2247_, v___y_2248_);
if (lean_obj_tag(v___x_2264_) == 0)
{
lean_object* v_a_2265_; lean_object* v___f_2266_; lean_object* v___x_2267_; 
v_a_2265_ = lean_ctor_get(v___x_2264_, 0);
lean_inc(v_a_2265_);
lean_dec_ref(v___x_2264_);
lean_inc(v_a_2265_);
v___f_2266_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17___lam__0), 2, 1);
lean_closure_set(v___f_2266_, 0, v_a_2265_);
v___x_2267_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_modifyCommRing___redArg(v___f_2266_, v___y_2238_, v___y_2239_);
lean_dec(v___y_2239_);
if (lean_obj_tag(v___x_2267_) == 0)
{
lean_object* v___x_2269_; uint8_t v_isShared_2270_; uint8_t v_isSharedCheck_2274_; 
v_isSharedCheck_2274_ = !lean_is_exclusive(v___x_2267_);
if (v_isSharedCheck_2274_ == 0)
{
lean_object* v_unused_2275_; 
v_unused_2275_ = lean_ctor_get(v___x_2267_, 0);
lean_dec(v_unused_2275_);
v___x_2269_ = v___x_2267_;
v_isShared_2270_ = v_isSharedCheck_2274_;
goto v_resetjp_2268_;
}
else
{
lean_dec(v___x_2267_);
v___x_2269_ = lean_box(0);
v_isShared_2270_ = v_isSharedCheck_2274_;
goto v_resetjp_2268_;
}
v_resetjp_2268_:
{
lean_object* v___x_2272_; 
if (v_isShared_2270_ == 0)
{
lean_ctor_set(v___x_2269_, 0, v_a_2265_);
v___x_2272_ = v___x_2269_;
goto v_reusejp_2271_;
}
else
{
lean_object* v_reuseFailAlloc_2273_; 
v_reuseFailAlloc_2273_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2273_, 0, v_a_2265_);
v___x_2272_ = v_reuseFailAlloc_2273_;
goto v_reusejp_2271_;
}
v_reusejp_2271_:
{
return v___x_2272_;
}
}
}
else
{
lean_object* v_a_2276_; lean_object* v___x_2278_; uint8_t v_isShared_2279_; uint8_t v_isSharedCheck_2283_; 
lean_dec(v_a_2265_);
v_a_2276_ = lean_ctor_get(v___x_2267_, 0);
v_isSharedCheck_2283_ = !lean_is_exclusive(v___x_2267_);
if (v_isSharedCheck_2283_ == 0)
{
v___x_2278_ = v___x_2267_;
v_isShared_2279_ = v_isSharedCheck_2283_;
goto v_resetjp_2277_;
}
else
{
lean_inc(v_a_2276_);
lean_dec(v___x_2267_);
v___x_2278_ = lean_box(0);
v_isShared_2279_ = v_isSharedCheck_2283_;
goto v_resetjp_2277_;
}
v_resetjp_2277_:
{
lean_object* v___x_2281_; 
if (v_isShared_2279_ == 0)
{
v___x_2281_ = v___x_2278_;
goto v_reusejp_2280_;
}
else
{
lean_object* v_reuseFailAlloc_2282_; 
v_reuseFailAlloc_2282_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2282_, 0, v_a_2276_);
v___x_2281_ = v_reuseFailAlloc_2282_;
goto v_reusejp_2280_;
}
v_reusejp_2280_:
{
return v___x_2281_;
}
}
}
}
else
{
lean_dec(v___y_2239_);
lean_dec_ref(v___y_2238_);
return v___x_2264_;
}
}
}
}
else
{
lean_object* v_a_2285_; lean_object* v___x_2287_; uint8_t v_isShared_2288_; uint8_t v_isSharedCheck_2292_; 
lean_dec(v___y_2248_);
lean_dec_ref(v___y_2247_);
lean_dec(v___y_2246_);
lean_dec_ref(v___y_2245_);
lean_dec(v___y_2244_);
lean_dec_ref(v___y_2243_);
lean_dec(v___y_2242_);
lean_dec_ref(v___y_2241_);
lean_dec(v___y_2240_);
lean_dec(v___y_2239_);
lean_dec_ref(v___y_2238_);
v_a_2285_ = lean_ctor_get(v___x_2250_, 0);
v_isSharedCheck_2292_ = !lean_is_exclusive(v___x_2250_);
if (v_isSharedCheck_2292_ == 0)
{
v___x_2287_ = v___x_2250_;
v_isShared_2288_ = v_isSharedCheck_2292_;
goto v_resetjp_2286_;
}
else
{
lean_inc(v_a_2285_);
lean_dec(v___x_2250_);
v___x_2287_ = lean_box(0);
v_isShared_2288_ = v_isSharedCheck_2292_;
goto v_resetjp_2286_;
}
v_resetjp_2286_:
{
lean_object* v___x_2290_; 
if (v_isShared_2288_ == 0)
{
v___x_2290_ = v___x_2287_;
goto v_reusejp_2289_;
}
else
{
lean_object* v_reuseFailAlloc_2291_; 
v_reuseFailAlloc_2291_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2291_, 0, v_a_2285_);
v___x_2290_ = v_reuseFailAlloc_2291_;
goto v_reusejp_2289_;
}
v_reusejp_2289_:
{
return v___x_2290_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17___boxed(lean_object* v___y_2293_, lean_object* v___y_2294_, lean_object* v___y_2295_, lean_object* v___y_2296_, lean_object* v___y_2297_, lean_object* v___y_2298_, lean_object* v___y_2299_, lean_object* v___y_2300_, lean_object* v___y_2301_, lean_object* v___y_2302_, lean_object* v___y_2303_, lean_object* v___y_2304_){
_start:
{
lean_object* v_res_2305_; 
v_res_2305_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17(v___y_2293_, v___y_2294_, v___y_2295_, v___y_2296_, v___y_2297_, v___y_2298_, v___y_2299_, v___y_2300_, v___y_2301_, v___y_2302_, v___y_2303_);
return v_res_2305_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8(lean_object* v_inst_2306_, lean_object* v___y_2307_, lean_object* v___y_2308_, lean_object* v___y_2309_, lean_object* v___y_2310_, lean_object* v___y_2311_, lean_object* v___y_2312_, lean_object* v___y_2313_, lean_object* v___y_2314_, lean_object* v___y_2315_, lean_object* v___y_2316_, lean_object* v___y_2317_){
_start:
{
lean_object* v___x_2319_; 
v___x_2319_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17(v___y_2307_, v___y_2308_, v___y_2309_, v___y_2310_, v___y_2311_, v___y_2312_, v___y_2313_, v___y_2314_, v___y_2315_, v___y_2316_, v___y_2317_);
if (lean_obj_tag(v___x_2319_) == 0)
{
lean_object* v_a_2320_; lean_object* v___x_2322_; uint8_t v_isShared_2323_; uint8_t v_isSharedCheck_2330_; 
v_a_2320_ = lean_ctor_get(v___x_2319_, 0);
v_isSharedCheck_2330_ = !lean_is_exclusive(v___x_2319_);
if (v_isSharedCheck_2330_ == 0)
{
v___x_2322_ = v___x_2319_;
v_isShared_2323_ = v_isSharedCheck_2330_;
goto v_resetjp_2321_;
}
else
{
lean_inc(v_a_2320_);
lean_dec(v___x_2319_);
v___x_2322_ = lean_box(0);
v_isShared_2323_ = v_isSharedCheck_2330_;
goto v_resetjp_2321_;
}
v_resetjp_2321_:
{
lean_object* v___x_2324_; uint8_t v___x_2325_; lean_object* v___x_2326_; lean_object* v___x_2328_; 
v___x_2324_ = l_Lean_Expr_appArg_x21(v_a_2320_);
lean_dec(v_a_2320_);
v___x_2325_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_2324_, v_inst_2306_);
lean_dec_ref(v___x_2324_);
v___x_2326_ = lean_box(v___x_2325_);
if (v_isShared_2323_ == 0)
{
lean_ctor_set(v___x_2322_, 0, v___x_2326_);
v___x_2328_ = v___x_2322_;
goto v_reusejp_2327_;
}
else
{
lean_object* v_reuseFailAlloc_2329_; 
v_reuseFailAlloc_2329_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2329_, 0, v___x_2326_);
v___x_2328_ = v_reuseFailAlloc_2329_;
goto v_reusejp_2327_;
}
v_reusejp_2327_:
{
return v___x_2328_;
}
}
}
else
{
lean_object* v_a_2331_; lean_object* v___x_2333_; uint8_t v_isShared_2334_; uint8_t v_isSharedCheck_2338_; 
v_a_2331_ = lean_ctor_get(v___x_2319_, 0);
v_isSharedCheck_2338_ = !lean_is_exclusive(v___x_2319_);
if (v_isSharedCheck_2338_ == 0)
{
v___x_2333_ = v___x_2319_;
v_isShared_2334_ = v_isSharedCheck_2338_;
goto v_resetjp_2332_;
}
else
{
lean_inc(v_a_2331_);
lean_dec(v___x_2319_);
v___x_2333_ = lean_box(0);
v_isShared_2334_ = v_isSharedCheck_2338_;
goto v_resetjp_2332_;
}
v_resetjp_2332_:
{
lean_object* v___x_2336_; 
if (v_isShared_2334_ == 0)
{
v___x_2336_ = v___x_2333_;
goto v_reusejp_2335_;
}
else
{
lean_object* v_reuseFailAlloc_2337_; 
v_reuseFailAlloc_2337_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2337_, 0, v_a_2331_);
v___x_2336_ = v_reuseFailAlloc_2337_;
goto v_reusejp_2335_;
}
v_reusejp_2335_:
{
return v___x_2336_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8___boxed(lean_object* v_inst_2339_, lean_object* v___y_2340_, lean_object* v___y_2341_, lean_object* v___y_2342_, lean_object* v___y_2343_, lean_object* v___y_2344_, lean_object* v___y_2345_, lean_object* v___y_2346_, lean_object* v___y_2347_, lean_object* v___y_2348_, lean_object* v___y_2349_, lean_object* v___y_2350_, lean_object* v___y_2351_){
_start:
{
lean_object* v_res_2352_; 
v_res_2352_ = l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8(v_inst_2339_, v___y_2340_, v___y_2341_, v___y_2342_, v___y_2343_, v___y_2344_, v___y_2345_, v___y_2346_, v___y_2347_, v___y_2348_, v___y_2349_, v___y_2350_);
lean_dec_ref(v_inst_2339_);
return v_res_2352_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___lam__0(lean_object* v_a_2353_, lean_object* v_s_2354_){
_start:
{
lean_object* v_toRing_2355_; lean_object* v_invFn_x3f_2356_; lean_object* v_semiringId_x3f_2357_; lean_object* v_commSemiringInst_2358_; lean_object* v_commRingInst_2359_; lean_object* v_noZeroDivInst_x3f_2360_; lean_object* v_fieldInst_x3f_2361_; lean_object* v_denoteEntries_2362_; lean_object* v_nextId_2363_; lean_object* v_steps_2364_; lean_object* v_queue_2365_; lean_object* v_basis_2366_; lean_object* v_diseqs_2367_; uint8_t v_recheck_2368_; lean_object* v_invSet_2369_; lean_object* v_numEq0_x3f_2370_; uint8_t v_numEq0Updated_2371_; lean_object* v___x_2373_; uint8_t v_isShared_2374_; uint8_t v_isSharedCheck_2403_; 
v_toRing_2355_ = lean_ctor_get(v_s_2354_, 0);
v_invFn_x3f_2356_ = lean_ctor_get(v_s_2354_, 1);
v_semiringId_x3f_2357_ = lean_ctor_get(v_s_2354_, 2);
v_commSemiringInst_2358_ = lean_ctor_get(v_s_2354_, 3);
v_commRingInst_2359_ = lean_ctor_get(v_s_2354_, 4);
v_noZeroDivInst_x3f_2360_ = lean_ctor_get(v_s_2354_, 5);
v_fieldInst_x3f_2361_ = lean_ctor_get(v_s_2354_, 6);
v_denoteEntries_2362_ = lean_ctor_get(v_s_2354_, 7);
v_nextId_2363_ = lean_ctor_get(v_s_2354_, 8);
v_steps_2364_ = lean_ctor_get(v_s_2354_, 9);
v_queue_2365_ = lean_ctor_get(v_s_2354_, 10);
v_basis_2366_ = lean_ctor_get(v_s_2354_, 11);
v_diseqs_2367_ = lean_ctor_get(v_s_2354_, 12);
v_recheck_2368_ = lean_ctor_get_uint8(v_s_2354_, sizeof(void*)*15);
v_invSet_2369_ = lean_ctor_get(v_s_2354_, 13);
v_numEq0_x3f_2370_ = lean_ctor_get(v_s_2354_, 14);
v_numEq0Updated_2371_ = lean_ctor_get_uint8(v_s_2354_, sizeof(void*)*15 + 1);
v_isSharedCheck_2403_ = !lean_is_exclusive(v_s_2354_);
if (v_isSharedCheck_2403_ == 0)
{
v___x_2373_ = v_s_2354_;
v_isShared_2374_ = v_isSharedCheck_2403_;
goto v_resetjp_2372_;
}
else
{
lean_inc(v_numEq0_x3f_2370_);
lean_inc(v_invSet_2369_);
lean_inc(v_diseqs_2367_);
lean_inc(v_basis_2366_);
lean_inc(v_queue_2365_);
lean_inc(v_steps_2364_);
lean_inc(v_nextId_2363_);
lean_inc(v_denoteEntries_2362_);
lean_inc(v_fieldInst_x3f_2361_);
lean_inc(v_noZeroDivInst_x3f_2360_);
lean_inc(v_commRingInst_2359_);
lean_inc(v_commSemiringInst_2358_);
lean_inc(v_semiringId_x3f_2357_);
lean_inc(v_invFn_x3f_2356_);
lean_inc(v_toRing_2355_);
lean_dec(v_s_2354_);
v___x_2373_ = lean_box(0);
v_isShared_2374_ = v_isSharedCheck_2403_;
goto v_resetjp_2372_;
}
v_resetjp_2372_:
{
lean_object* v_id_2375_; lean_object* v_type_2376_; lean_object* v_u_2377_; lean_object* v_ringInst_2378_; lean_object* v_semiringInst_2379_; lean_object* v_charInst_x3f_2380_; lean_object* v_addFn_x3f_2381_; lean_object* v_mulFn_x3f_2382_; lean_object* v_negFn_x3f_2383_; lean_object* v_powFn_x3f_2384_; lean_object* v_intCastFn_x3f_2385_; lean_object* v_natCastFn_x3f_2386_; lean_object* v_one_x3f_2387_; lean_object* v_vars_2388_; lean_object* v_varMap_2389_; lean_object* v_denote_2390_; lean_object* v___x_2392_; uint8_t v_isShared_2393_; uint8_t v_isSharedCheck_2401_; 
v_id_2375_ = lean_ctor_get(v_toRing_2355_, 0);
v_type_2376_ = lean_ctor_get(v_toRing_2355_, 1);
v_u_2377_ = lean_ctor_get(v_toRing_2355_, 2);
v_ringInst_2378_ = lean_ctor_get(v_toRing_2355_, 3);
v_semiringInst_2379_ = lean_ctor_get(v_toRing_2355_, 4);
v_charInst_x3f_2380_ = lean_ctor_get(v_toRing_2355_, 5);
v_addFn_x3f_2381_ = lean_ctor_get(v_toRing_2355_, 6);
v_mulFn_x3f_2382_ = lean_ctor_get(v_toRing_2355_, 7);
v_negFn_x3f_2383_ = lean_ctor_get(v_toRing_2355_, 9);
v_powFn_x3f_2384_ = lean_ctor_get(v_toRing_2355_, 10);
v_intCastFn_x3f_2385_ = lean_ctor_get(v_toRing_2355_, 11);
v_natCastFn_x3f_2386_ = lean_ctor_get(v_toRing_2355_, 12);
v_one_x3f_2387_ = lean_ctor_get(v_toRing_2355_, 13);
v_vars_2388_ = lean_ctor_get(v_toRing_2355_, 14);
v_varMap_2389_ = lean_ctor_get(v_toRing_2355_, 15);
v_denote_2390_ = lean_ctor_get(v_toRing_2355_, 16);
v_isSharedCheck_2401_ = !lean_is_exclusive(v_toRing_2355_);
if (v_isSharedCheck_2401_ == 0)
{
lean_object* v_unused_2402_; 
v_unused_2402_ = lean_ctor_get(v_toRing_2355_, 8);
lean_dec(v_unused_2402_);
v___x_2392_ = v_toRing_2355_;
v_isShared_2393_ = v_isSharedCheck_2401_;
goto v_resetjp_2391_;
}
else
{
lean_inc(v_denote_2390_);
lean_inc(v_varMap_2389_);
lean_inc(v_vars_2388_);
lean_inc(v_one_x3f_2387_);
lean_inc(v_natCastFn_x3f_2386_);
lean_inc(v_intCastFn_x3f_2385_);
lean_inc(v_powFn_x3f_2384_);
lean_inc(v_negFn_x3f_2383_);
lean_inc(v_mulFn_x3f_2382_);
lean_inc(v_addFn_x3f_2381_);
lean_inc(v_charInst_x3f_2380_);
lean_inc(v_semiringInst_2379_);
lean_inc(v_ringInst_2378_);
lean_inc(v_u_2377_);
lean_inc(v_type_2376_);
lean_inc(v_id_2375_);
lean_dec(v_toRing_2355_);
v___x_2392_ = lean_box(0);
v_isShared_2393_ = v_isSharedCheck_2401_;
goto v_resetjp_2391_;
}
v_resetjp_2391_:
{
lean_object* v___x_2394_; lean_object* v___x_2396_; 
v___x_2394_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_2394_, 0, v_a_2353_);
if (v_isShared_2393_ == 0)
{
lean_ctor_set(v___x_2392_, 8, v___x_2394_);
v___x_2396_ = v___x_2392_;
goto v_reusejp_2395_;
}
else
{
lean_object* v_reuseFailAlloc_2400_; 
v_reuseFailAlloc_2400_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_2400_, 0, v_id_2375_);
lean_ctor_set(v_reuseFailAlloc_2400_, 1, v_type_2376_);
lean_ctor_set(v_reuseFailAlloc_2400_, 2, v_u_2377_);
lean_ctor_set(v_reuseFailAlloc_2400_, 3, v_ringInst_2378_);
lean_ctor_set(v_reuseFailAlloc_2400_, 4, v_semiringInst_2379_);
lean_ctor_set(v_reuseFailAlloc_2400_, 5, v_charInst_x3f_2380_);
lean_ctor_set(v_reuseFailAlloc_2400_, 6, v_addFn_x3f_2381_);
lean_ctor_set(v_reuseFailAlloc_2400_, 7, v_mulFn_x3f_2382_);
lean_ctor_set(v_reuseFailAlloc_2400_, 8, v___x_2394_);
lean_ctor_set(v_reuseFailAlloc_2400_, 9, v_negFn_x3f_2383_);
lean_ctor_set(v_reuseFailAlloc_2400_, 10, v_powFn_x3f_2384_);
lean_ctor_set(v_reuseFailAlloc_2400_, 11, v_intCastFn_x3f_2385_);
lean_ctor_set(v_reuseFailAlloc_2400_, 12, v_natCastFn_x3f_2386_);
lean_ctor_set(v_reuseFailAlloc_2400_, 13, v_one_x3f_2387_);
lean_ctor_set(v_reuseFailAlloc_2400_, 14, v_vars_2388_);
lean_ctor_set(v_reuseFailAlloc_2400_, 15, v_varMap_2389_);
lean_ctor_set(v_reuseFailAlloc_2400_, 16, v_denote_2390_);
v___x_2396_ = v_reuseFailAlloc_2400_;
goto v_reusejp_2395_;
}
v_reusejp_2395_:
{
lean_object* v___x_2398_; 
if (v_isShared_2374_ == 0)
{
lean_ctor_set(v___x_2373_, 0, v___x_2396_);
v___x_2398_ = v___x_2373_;
goto v_reusejp_2397_;
}
else
{
lean_object* v_reuseFailAlloc_2399_; 
v_reuseFailAlloc_2399_ = lean_alloc_ctor(0, 15, 2);
lean_ctor_set(v_reuseFailAlloc_2399_, 0, v___x_2396_);
lean_ctor_set(v_reuseFailAlloc_2399_, 1, v_invFn_x3f_2356_);
lean_ctor_set(v_reuseFailAlloc_2399_, 2, v_semiringId_x3f_2357_);
lean_ctor_set(v_reuseFailAlloc_2399_, 3, v_commSemiringInst_2358_);
lean_ctor_set(v_reuseFailAlloc_2399_, 4, v_commRingInst_2359_);
lean_ctor_set(v_reuseFailAlloc_2399_, 5, v_noZeroDivInst_x3f_2360_);
lean_ctor_set(v_reuseFailAlloc_2399_, 6, v_fieldInst_x3f_2361_);
lean_ctor_set(v_reuseFailAlloc_2399_, 7, v_denoteEntries_2362_);
lean_ctor_set(v_reuseFailAlloc_2399_, 8, v_nextId_2363_);
lean_ctor_set(v_reuseFailAlloc_2399_, 9, v_steps_2364_);
lean_ctor_set(v_reuseFailAlloc_2399_, 10, v_queue_2365_);
lean_ctor_set(v_reuseFailAlloc_2399_, 11, v_basis_2366_);
lean_ctor_set(v_reuseFailAlloc_2399_, 12, v_diseqs_2367_);
lean_ctor_set(v_reuseFailAlloc_2399_, 13, v_invSet_2369_);
lean_ctor_set(v_reuseFailAlloc_2399_, 14, v_numEq0_x3f_2370_);
lean_ctor_set_uint8(v_reuseFailAlloc_2399_, sizeof(void*)*15, v_recheck_2368_);
lean_ctor_set_uint8(v_reuseFailAlloc_2399_, sizeof(void*)*15 + 1, v_numEq0Updated_2371_);
v___x_2398_ = v_reuseFailAlloc_2399_;
goto v_reusejp_2397_;
}
v_reusejp_2397_:
{
return v___x_2398_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9(lean_object* v___y_2415_, lean_object* v___y_2416_, lean_object* v___y_2417_, lean_object* v___y_2418_, lean_object* v___y_2419_, lean_object* v___y_2420_, lean_object* v___y_2421_, lean_object* v___y_2422_, lean_object* v___y_2423_, lean_object* v___y_2424_, lean_object* v___y_2425_){
_start:
{
lean_object* v___x_2427_; 
v___x_2427_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_getCommRing(v___y_2415_, v___y_2416_, v___y_2417_, v___y_2418_, v___y_2419_, v___y_2420_, v___y_2421_, v___y_2422_, v___y_2423_, v___y_2424_, v___y_2425_);
if (lean_obj_tag(v___x_2427_) == 0)
{
lean_object* v_a_2428_; lean_object* v___x_2430_; uint8_t v_isShared_2431_; uint8_t v_isSharedCheck_2471_; 
v_a_2428_ = lean_ctor_get(v___x_2427_, 0);
v_isSharedCheck_2471_ = !lean_is_exclusive(v___x_2427_);
if (v_isSharedCheck_2471_ == 0)
{
v___x_2430_ = v___x_2427_;
v_isShared_2431_ = v_isSharedCheck_2471_;
goto v_resetjp_2429_;
}
else
{
lean_inc(v_a_2428_);
lean_dec(v___x_2427_);
v___x_2430_ = lean_box(0);
v_isShared_2431_ = v_isSharedCheck_2471_;
goto v_resetjp_2429_;
}
v_resetjp_2429_:
{
lean_object* v_toRing_2432_; lean_object* v_subFn_x3f_2433_; 
v_toRing_2432_ = lean_ctor_get(v_a_2428_, 0);
lean_inc_ref(v_toRing_2432_);
lean_dec(v_a_2428_);
v_subFn_x3f_2433_ = lean_ctor_get(v_toRing_2432_, 8);
if (lean_obj_tag(v_subFn_x3f_2433_) == 1)
{
lean_object* v_val_2434_; lean_object* v___x_2436_; 
lean_inc_ref(v_subFn_x3f_2433_);
lean_dec_ref(v_toRing_2432_);
lean_dec(v___y_2425_);
lean_dec_ref(v___y_2424_);
lean_dec(v___y_2423_);
lean_dec_ref(v___y_2422_);
lean_dec(v___y_2421_);
lean_dec_ref(v___y_2420_);
lean_dec(v___y_2419_);
lean_dec_ref(v___y_2418_);
lean_dec(v___y_2417_);
lean_dec(v___y_2416_);
lean_dec_ref(v___y_2415_);
v_val_2434_ = lean_ctor_get(v_subFn_x3f_2433_, 0);
lean_inc(v_val_2434_);
lean_dec_ref(v_subFn_x3f_2433_);
if (v_isShared_2431_ == 0)
{
lean_ctor_set(v___x_2430_, 0, v_val_2434_);
v___x_2436_ = v___x_2430_;
goto v_reusejp_2435_;
}
else
{
lean_object* v_reuseFailAlloc_2437_; 
v_reuseFailAlloc_2437_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2437_, 0, v_val_2434_);
v___x_2436_ = v_reuseFailAlloc_2437_;
goto v_reusejp_2435_;
}
v_reusejp_2435_:
{
return v___x_2436_;
}
}
else
{
lean_object* v_type_2438_; lean_object* v_u_2439_; lean_object* v_ringInst_2440_; lean_object* v___x_2441_; lean_object* v___x_2442_; lean_object* v___x_2443_; lean_object* v___x_2444_; lean_object* v___x_2445_; lean_object* v___x_2446_; lean_object* v___x_2447_; lean_object* v_expectedInst_2448_; lean_object* v___x_2449_; lean_object* v___x_2450_; lean_object* v___x_2451_; 
lean_del_object(v___x_2430_);
v_type_2438_ = lean_ctor_get(v_toRing_2432_, 1);
lean_inc_ref(v_type_2438_);
v_u_2439_ = lean_ctor_get(v_toRing_2432_, 2);
lean_inc(v_u_2439_);
v_ringInst_2440_ = lean_ctor_get(v_toRing_2432_, 3);
lean_inc_ref(v_ringInst_2440_);
lean_dec_ref(v_toRing_2432_);
v___x_2441_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__1));
v___x_2442_ = lean_box(0);
lean_inc(v_u_2439_);
v___x_2443_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_2443_, 0, v_u_2439_);
lean_ctor_set(v___x_2443_, 1, v___x_2442_);
lean_inc_ref(v___x_2443_);
v___x_2444_ = l_Lean_mkConst(v___x_2441_, v___x_2443_);
v___x_2445_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3));
v___x_2446_ = l_Lean_mkConst(v___x_2445_, v___x_2443_);
lean_inc_ref(v_type_2438_);
v___x_2447_ = l_Lean_mkAppB(v___x_2446_, v_type_2438_, v_ringInst_2440_);
lean_inc_ref(v_type_2438_);
v_expectedInst_2448_ = l_Lean_mkAppB(v___x_2444_, v_type_2438_, v___x_2447_);
v___x_2449_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__4));
v___x_2450_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19));
lean_inc(v___y_2416_);
v___x_2451_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8(v_type_2438_, v_u_2439_, v___x_2449_, v___x_2450_, v_expectedInst_2448_, v___y_2415_, v___y_2416_, v___y_2417_, v___y_2418_, v___y_2419_, v___y_2420_, v___y_2421_, v___y_2422_, v___y_2423_, v___y_2424_, v___y_2425_);
if (lean_obj_tag(v___x_2451_) == 0)
{
lean_object* v_a_2452_; lean_object* v___f_2453_; lean_object* v___x_2454_; 
v_a_2452_ = lean_ctor_get(v___x_2451_, 0);
lean_inc(v_a_2452_);
lean_dec_ref(v___x_2451_);
lean_inc(v_a_2452_);
v___f_2453_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___lam__0), 2, 1);
lean_closure_set(v___f_2453_, 0, v_a_2452_);
v___x_2454_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_modifyCommRing___redArg(v___f_2453_, v___y_2415_, v___y_2416_);
lean_dec(v___y_2416_);
if (lean_obj_tag(v___x_2454_) == 0)
{
lean_object* v___x_2456_; uint8_t v_isShared_2457_; uint8_t v_isSharedCheck_2461_; 
v_isSharedCheck_2461_ = !lean_is_exclusive(v___x_2454_);
if (v_isSharedCheck_2461_ == 0)
{
lean_object* v_unused_2462_; 
v_unused_2462_ = lean_ctor_get(v___x_2454_, 0);
lean_dec(v_unused_2462_);
v___x_2456_ = v___x_2454_;
v_isShared_2457_ = v_isSharedCheck_2461_;
goto v_resetjp_2455_;
}
else
{
lean_dec(v___x_2454_);
v___x_2456_ = lean_box(0);
v_isShared_2457_ = v_isSharedCheck_2461_;
goto v_resetjp_2455_;
}
v_resetjp_2455_:
{
lean_object* v___x_2459_; 
if (v_isShared_2457_ == 0)
{
lean_ctor_set(v___x_2456_, 0, v_a_2452_);
v___x_2459_ = v___x_2456_;
goto v_reusejp_2458_;
}
else
{
lean_object* v_reuseFailAlloc_2460_; 
v_reuseFailAlloc_2460_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2460_, 0, v_a_2452_);
v___x_2459_ = v_reuseFailAlloc_2460_;
goto v_reusejp_2458_;
}
v_reusejp_2458_:
{
return v___x_2459_;
}
}
}
else
{
lean_object* v_a_2463_; lean_object* v___x_2465_; uint8_t v_isShared_2466_; uint8_t v_isSharedCheck_2470_; 
lean_dec(v_a_2452_);
v_a_2463_ = lean_ctor_get(v___x_2454_, 0);
v_isSharedCheck_2470_ = !lean_is_exclusive(v___x_2454_);
if (v_isSharedCheck_2470_ == 0)
{
v___x_2465_ = v___x_2454_;
v_isShared_2466_ = v_isSharedCheck_2470_;
goto v_resetjp_2464_;
}
else
{
lean_inc(v_a_2463_);
lean_dec(v___x_2454_);
v___x_2465_ = lean_box(0);
v_isShared_2466_ = v_isSharedCheck_2470_;
goto v_resetjp_2464_;
}
v_resetjp_2464_:
{
lean_object* v___x_2468_; 
if (v_isShared_2466_ == 0)
{
v___x_2468_ = v___x_2465_;
goto v_reusejp_2467_;
}
else
{
lean_object* v_reuseFailAlloc_2469_; 
v_reuseFailAlloc_2469_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2469_, 0, v_a_2463_);
v___x_2468_ = v_reuseFailAlloc_2469_;
goto v_reusejp_2467_;
}
v_reusejp_2467_:
{
return v___x_2468_;
}
}
}
}
else
{
lean_dec(v___y_2416_);
lean_dec_ref(v___y_2415_);
return v___x_2451_;
}
}
}
}
else
{
lean_object* v_a_2472_; lean_object* v___x_2474_; uint8_t v_isShared_2475_; uint8_t v_isSharedCheck_2479_; 
lean_dec(v___y_2425_);
lean_dec_ref(v___y_2424_);
lean_dec(v___y_2423_);
lean_dec_ref(v___y_2422_);
lean_dec(v___y_2421_);
lean_dec_ref(v___y_2420_);
lean_dec(v___y_2419_);
lean_dec_ref(v___y_2418_);
lean_dec(v___y_2417_);
lean_dec(v___y_2416_);
lean_dec_ref(v___y_2415_);
v_a_2472_ = lean_ctor_get(v___x_2427_, 0);
v_isSharedCheck_2479_ = !lean_is_exclusive(v___x_2427_);
if (v_isSharedCheck_2479_ == 0)
{
v___x_2474_ = v___x_2427_;
v_isShared_2475_ = v_isSharedCheck_2479_;
goto v_resetjp_2473_;
}
else
{
lean_inc(v_a_2472_);
lean_dec(v___x_2427_);
v___x_2474_ = lean_box(0);
v_isShared_2475_ = v_isSharedCheck_2479_;
goto v_resetjp_2473_;
}
v_resetjp_2473_:
{
lean_object* v___x_2477_; 
if (v_isShared_2475_ == 0)
{
v___x_2477_ = v___x_2474_;
goto v_reusejp_2476_;
}
else
{
lean_object* v_reuseFailAlloc_2478_; 
v_reuseFailAlloc_2478_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2478_, 0, v_a_2472_);
v___x_2477_ = v_reuseFailAlloc_2478_;
goto v_reusejp_2476_;
}
v_reusejp_2476_:
{
return v___x_2477_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___boxed(lean_object* v___y_2480_, lean_object* v___y_2481_, lean_object* v___y_2482_, lean_object* v___y_2483_, lean_object* v___y_2484_, lean_object* v___y_2485_, lean_object* v___y_2486_, lean_object* v___y_2487_, lean_object* v___y_2488_, lean_object* v___y_2489_, lean_object* v___y_2490_, lean_object* v___y_2491_){
_start:
{
lean_object* v_res_2492_; 
v_res_2492_ = l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9(v___y_2480_, v___y_2481_, v___y_2482_, v___y_2483_, v___y_2484_, v___y_2485_, v___y_2486_, v___y_2487_, v___y_2488_, v___y_2489_, v___y_2490_);
return v_res_2492_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4(lean_object* v_inst_2493_, lean_object* v___y_2494_, lean_object* v___y_2495_, lean_object* v___y_2496_, lean_object* v___y_2497_, lean_object* v___y_2498_, lean_object* v___y_2499_, lean_object* v___y_2500_, lean_object* v___y_2501_, lean_object* v___y_2502_, lean_object* v___y_2503_, lean_object* v___y_2504_){
_start:
{
lean_object* v___x_2506_; 
v___x_2506_ = l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9(v___y_2494_, v___y_2495_, v___y_2496_, v___y_2497_, v___y_2498_, v___y_2499_, v___y_2500_, v___y_2501_, v___y_2502_, v___y_2503_, v___y_2504_);
if (lean_obj_tag(v___x_2506_) == 0)
{
lean_object* v_a_2507_; lean_object* v___x_2509_; uint8_t v_isShared_2510_; uint8_t v_isSharedCheck_2517_; 
v_a_2507_ = lean_ctor_get(v___x_2506_, 0);
v_isSharedCheck_2517_ = !lean_is_exclusive(v___x_2506_);
if (v_isSharedCheck_2517_ == 0)
{
v___x_2509_ = v___x_2506_;
v_isShared_2510_ = v_isSharedCheck_2517_;
goto v_resetjp_2508_;
}
else
{
lean_inc(v_a_2507_);
lean_dec(v___x_2506_);
v___x_2509_ = lean_box(0);
v_isShared_2510_ = v_isSharedCheck_2517_;
goto v_resetjp_2508_;
}
v_resetjp_2508_:
{
lean_object* v___x_2511_; uint8_t v___x_2512_; lean_object* v___x_2513_; lean_object* v___x_2515_; 
v___x_2511_ = l_Lean_Expr_appArg_x21(v_a_2507_);
lean_dec(v_a_2507_);
v___x_2512_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_2511_, v_inst_2493_);
lean_dec_ref(v___x_2511_);
v___x_2513_ = lean_box(v___x_2512_);
if (v_isShared_2510_ == 0)
{
lean_ctor_set(v___x_2509_, 0, v___x_2513_);
v___x_2515_ = v___x_2509_;
goto v_reusejp_2514_;
}
else
{
lean_object* v_reuseFailAlloc_2516_; 
v_reuseFailAlloc_2516_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2516_, 0, v___x_2513_);
v___x_2515_ = v_reuseFailAlloc_2516_;
goto v_reusejp_2514_;
}
v_reusejp_2514_:
{
return v___x_2515_;
}
}
}
else
{
lean_object* v_a_2518_; lean_object* v___x_2520_; uint8_t v_isShared_2521_; uint8_t v_isSharedCheck_2525_; 
v_a_2518_ = lean_ctor_get(v___x_2506_, 0);
v_isSharedCheck_2525_ = !lean_is_exclusive(v___x_2506_);
if (v_isSharedCheck_2525_ == 0)
{
v___x_2520_ = v___x_2506_;
v_isShared_2521_ = v_isSharedCheck_2525_;
goto v_resetjp_2519_;
}
else
{
lean_inc(v_a_2518_);
lean_dec(v___x_2506_);
v___x_2520_ = lean_box(0);
v_isShared_2521_ = v_isSharedCheck_2525_;
goto v_resetjp_2519_;
}
v_resetjp_2519_:
{
lean_object* v___x_2523_; 
if (v_isShared_2521_ == 0)
{
v___x_2523_ = v___x_2520_;
goto v_reusejp_2522_;
}
else
{
lean_object* v_reuseFailAlloc_2524_; 
v_reuseFailAlloc_2524_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2524_, 0, v_a_2518_);
v___x_2523_ = v_reuseFailAlloc_2524_;
goto v_reusejp_2522_;
}
v_reusejp_2522_:
{
return v___x_2523_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4___boxed(lean_object* v_inst_2526_, lean_object* v___y_2527_, lean_object* v___y_2528_, lean_object* v___y_2529_, lean_object* v___y_2530_, lean_object* v___y_2531_, lean_object* v___y_2532_, lean_object* v___y_2533_, lean_object* v___y_2534_, lean_object* v___y_2535_, lean_object* v___y_2536_, lean_object* v___y_2537_, lean_object* v___y_2538_){
_start:
{
lean_object* v_res_2539_; 
v_res_2539_ = l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4(v_inst_2526_, v___y_2527_, v___y_2528_, v___y_2529_, v___y_2530_, v___y_2531_, v___y_2532_, v___y_2533_, v___y_2534_, v___y_2535_, v___y_2536_, v___y_2537_);
lean_dec_ref(v_inst_2526_);
return v_res_2539_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13_spec__19(lean_object* v_type_2540_, lean_object* v_u_2541_, lean_object* v_instDeclName_2542_, lean_object* v_declName_2543_, lean_object* v_expectedInst_2544_, lean_object* v___y_2545_, lean_object* v___y_2546_, lean_object* v___y_2547_, lean_object* v___y_2548_, lean_object* v___y_2549_, lean_object* v___y_2550_, lean_object* v___y_2551_, lean_object* v___y_2552_, lean_object* v___y_2553_, lean_object* v___y_2554_, lean_object* v___y_2555_){
_start:
{
lean_object* v___x_2557_; lean_object* v___x_2558_; lean_object* v___x_2559_; lean_object* v___x_2560_; lean_object* v___x_2561_; 
v___x_2557_ = lean_box(0);
v___x_2558_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_2558_, 0, v_u_2541_);
lean_ctor_set(v___x_2558_, 1, v___x_2557_);
lean_inc_ref(v___x_2558_);
v___x_2559_ = l_Lean_mkConst(v_instDeclName_2542_, v___x_2558_);
lean_inc_ref(v_type_2540_);
v___x_2560_ = l_Lean_Expr_app___override(v___x_2559_, v_type_2540_);
lean_inc(v___y_2555_);
lean_inc_ref(v___y_2554_);
lean_inc(v___y_2553_);
lean_inc_ref(v___y_2552_);
v___x_2561_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20(v___x_2560_, v___y_2545_, v___y_2546_, v___y_2547_, v___y_2548_, v___y_2549_, v___y_2550_, v___y_2551_, v___y_2552_, v___y_2553_, v___y_2554_, v___y_2555_);
if (lean_obj_tag(v___x_2561_) == 0)
{
lean_object* v_a_2562_; lean_object* v___x_2563_; 
v_a_2562_ = lean_ctor_get(v___x_2561_, 0);
lean_inc(v_a_2562_);
lean_dec_ref(v___x_2561_);
lean_inc(v___y_2555_);
lean_inc_ref(v___y_2554_);
lean_inc(v___y_2553_);
lean_inc_ref(v___y_2552_);
lean_inc(v_a_2562_);
lean_inc(v_declName_2543_);
v___x_2563_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v_declName_2543_, v_a_2562_, v_expectedInst_2544_, v___y_2552_, v___y_2553_, v___y_2554_, v___y_2555_);
if (lean_obj_tag(v___x_2563_) == 0)
{
lean_object* v___x_2564_; lean_object* v___x_2565_; lean_object* v___x_2566_; 
lean_dec_ref(v___x_2563_);
v___x_2564_ = l_Lean_mkConst(v_declName_2543_, v___x_2558_);
v___x_2565_ = l_Lean_mkAppB(v___x_2564_, v_type_2540_, v_a_2562_);
lean_inc(v___y_2551_);
v___x_2566_ = lean_grind_canon(v___x_2565_, v___y_2546_, v___y_2547_, v___y_2548_, v___y_2549_, v___y_2550_, v___y_2551_, v___y_2552_, v___y_2553_, v___y_2554_, v___y_2555_);
if (lean_obj_tag(v___x_2566_) == 0)
{
lean_object* v_a_2567_; lean_object* v___x_2568_; 
v_a_2567_ = lean_ctor_get(v___x_2566_, 0);
lean_inc(v_a_2567_);
lean_dec_ref(v___x_2566_);
v___x_2568_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_2567_, v___y_2551_);
lean_dec(v___y_2551_);
return v___x_2568_;
}
else
{
lean_dec(v___y_2551_);
return v___x_2566_;
}
}
else
{
lean_object* v_a_2569_; lean_object* v___x_2571_; uint8_t v_isShared_2572_; uint8_t v_isSharedCheck_2576_; 
lean_dec(v_a_2562_);
lean_dec_ref(v___x_2558_);
lean_dec(v___y_2555_);
lean_dec_ref(v___y_2554_);
lean_dec(v___y_2553_);
lean_dec_ref(v___y_2552_);
lean_dec(v___y_2551_);
lean_dec_ref(v___y_2550_);
lean_dec(v___y_2549_);
lean_dec_ref(v___y_2548_);
lean_dec(v___y_2547_);
lean_dec(v___y_2546_);
lean_dec(v_declName_2543_);
lean_dec_ref(v_type_2540_);
v_a_2569_ = lean_ctor_get(v___x_2563_, 0);
v_isSharedCheck_2576_ = !lean_is_exclusive(v___x_2563_);
if (v_isSharedCheck_2576_ == 0)
{
v___x_2571_ = v___x_2563_;
v_isShared_2572_ = v_isSharedCheck_2576_;
goto v_resetjp_2570_;
}
else
{
lean_inc(v_a_2569_);
lean_dec(v___x_2563_);
v___x_2571_ = lean_box(0);
v_isShared_2572_ = v_isSharedCheck_2576_;
goto v_resetjp_2570_;
}
v_resetjp_2570_:
{
lean_object* v___x_2574_; 
if (v_isShared_2572_ == 0)
{
v___x_2574_ = v___x_2571_;
goto v_reusejp_2573_;
}
else
{
lean_object* v_reuseFailAlloc_2575_; 
v_reuseFailAlloc_2575_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2575_, 0, v_a_2569_);
v___x_2574_ = v_reuseFailAlloc_2575_;
goto v_reusejp_2573_;
}
v_reusejp_2573_:
{
return v___x_2574_;
}
}
}
}
else
{
lean_dec_ref(v___x_2558_);
lean_dec(v___y_2555_);
lean_dec_ref(v___y_2554_);
lean_dec(v___y_2553_);
lean_dec_ref(v___y_2552_);
lean_dec(v___y_2551_);
lean_dec_ref(v___y_2550_);
lean_dec(v___y_2549_);
lean_dec_ref(v___y_2548_);
lean_dec(v___y_2547_);
lean_dec(v___y_2546_);
lean_dec_ref(v_expectedInst_2544_);
lean_dec(v_declName_2543_);
lean_dec_ref(v_type_2540_);
return v___x_2561_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13_spec__19___boxed(lean_object** _args){
lean_object* v_type_2577_ = _args[0];
lean_object* v_u_2578_ = _args[1];
lean_object* v_instDeclName_2579_ = _args[2];
lean_object* v_declName_2580_ = _args[3];
lean_object* v_expectedInst_2581_ = _args[4];
lean_object* v___y_2582_ = _args[5];
lean_object* v___y_2583_ = _args[6];
lean_object* v___y_2584_ = _args[7];
lean_object* v___y_2585_ = _args[8];
lean_object* v___y_2586_ = _args[9];
lean_object* v___y_2587_ = _args[10];
lean_object* v___y_2588_ = _args[11];
lean_object* v___y_2589_ = _args[12];
lean_object* v___y_2590_ = _args[13];
lean_object* v___y_2591_ = _args[14];
lean_object* v___y_2592_ = _args[15];
lean_object* v___y_2593_ = _args[16];
_start:
{
lean_object* v_res_2594_; 
v_res_2594_ = l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13_spec__19(v_type_2577_, v_u_2578_, v_instDeclName_2579_, v_declName_2580_, v_expectedInst_2581_, v___y_2582_, v___y_2583_, v___y_2584_, v___y_2585_, v___y_2586_, v___y_2587_, v___y_2588_, v___y_2589_, v___y_2590_, v___y_2591_, v___y_2592_);
lean_dec_ref(v___y_2582_);
return v_res_2594_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___lam__0(lean_object* v_a_2595_, lean_object* v_s_2596_){
_start:
{
lean_object* v_toRing_2597_; lean_object* v_invFn_x3f_2598_; lean_object* v_semiringId_x3f_2599_; lean_object* v_commSemiringInst_2600_; lean_object* v_commRingInst_2601_; lean_object* v_noZeroDivInst_x3f_2602_; lean_object* v_fieldInst_x3f_2603_; lean_object* v_denoteEntries_2604_; lean_object* v_nextId_2605_; lean_object* v_steps_2606_; lean_object* v_queue_2607_; lean_object* v_basis_2608_; lean_object* v_diseqs_2609_; uint8_t v_recheck_2610_; lean_object* v_invSet_2611_; lean_object* v_numEq0_x3f_2612_; uint8_t v_numEq0Updated_2613_; lean_object* v___x_2615_; uint8_t v_isShared_2616_; uint8_t v_isSharedCheck_2645_; 
v_toRing_2597_ = lean_ctor_get(v_s_2596_, 0);
v_invFn_x3f_2598_ = lean_ctor_get(v_s_2596_, 1);
v_semiringId_x3f_2599_ = lean_ctor_get(v_s_2596_, 2);
v_commSemiringInst_2600_ = lean_ctor_get(v_s_2596_, 3);
v_commRingInst_2601_ = lean_ctor_get(v_s_2596_, 4);
v_noZeroDivInst_x3f_2602_ = lean_ctor_get(v_s_2596_, 5);
v_fieldInst_x3f_2603_ = lean_ctor_get(v_s_2596_, 6);
v_denoteEntries_2604_ = lean_ctor_get(v_s_2596_, 7);
v_nextId_2605_ = lean_ctor_get(v_s_2596_, 8);
v_steps_2606_ = lean_ctor_get(v_s_2596_, 9);
v_queue_2607_ = lean_ctor_get(v_s_2596_, 10);
v_basis_2608_ = lean_ctor_get(v_s_2596_, 11);
v_diseqs_2609_ = lean_ctor_get(v_s_2596_, 12);
v_recheck_2610_ = lean_ctor_get_uint8(v_s_2596_, sizeof(void*)*15);
v_invSet_2611_ = lean_ctor_get(v_s_2596_, 13);
v_numEq0_x3f_2612_ = lean_ctor_get(v_s_2596_, 14);
v_numEq0Updated_2613_ = lean_ctor_get_uint8(v_s_2596_, sizeof(void*)*15 + 1);
v_isSharedCheck_2645_ = !lean_is_exclusive(v_s_2596_);
if (v_isSharedCheck_2645_ == 0)
{
v___x_2615_ = v_s_2596_;
v_isShared_2616_ = v_isSharedCheck_2645_;
goto v_resetjp_2614_;
}
else
{
lean_inc(v_numEq0_x3f_2612_);
lean_inc(v_invSet_2611_);
lean_inc(v_diseqs_2609_);
lean_inc(v_basis_2608_);
lean_inc(v_queue_2607_);
lean_inc(v_steps_2606_);
lean_inc(v_nextId_2605_);
lean_inc(v_denoteEntries_2604_);
lean_inc(v_fieldInst_x3f_2603_);
lean_inc(v_noZeroDivInst_x3f_2602_);
lean_inc(v_commRingInst_2601_);
lean_inc(v_commSemiringInst_2600_);
lean_inc(v_semiringId_x3f_2599_);
lean_inc(v_invFn_x3f_2598_);
lean_inc(v_toRing_2597_);
lean_dec(v_s_2596_);
v___x_2615_ = lean_box(0);
v_isShared_2616_ = v_isSharedCheck_2645_;
goto v_resetjp_2614_;
}
v_resetjp_2614_:
{
lean_object* v_id_2617_; lean_object* v_type_2618_; lean_object* v_u_2619_; lean_object* v_ringInst_2620_; lean_object* v_semiringInst_2621_; lean_object* v_charInst_x3f_2622_; lean_object* v_addFn_x3f_2623_; lean_object* v_mulFn_x3f_2624_; lean_object* v_subFn_x3f_2625_; lean_object* v_powFn_x3f_2626_; lean_object* v_intCastFn_x3f_2627_; lean_object* v_natCastFn_x3f_2628_; lean_object* v_one_x3f_2629_; lean_object* v_vars_2630_; lean_object* v_varMap_2631_; lean_object* v_denote_2632_; lean_object* v___x_2634_; uint8_t v_isShared_2635_; uint8_t v_isSharedCheck_2643_; 
v_id_2617_ = lean_ctor_get(v_toRing_2597_, 0);
v_type_2618_ = lean_ctor_get(v_toRing_2597_, 1);
v_u_2619_ = lean_ctor_get(v_toRing_2597_, 2);
v_ringInst_2620_ = lean_ctor_get(v_toRing_2597_, 3);
v_semiringInst_2621_ = lean_ctor_get(v_toRing_2597_, 4);
v_charInst_x3f_2622_ = lean_ctor_get(v_toRing_2597_, 5);
v_addFn_x3f_2623_ = lean_ctor_get(v_toRing_2597_, 6);
v_mulFn_x3f_2624_ = lean_ctor_get(v_toRing_2597_, 7);
v_subFn_x3f_2625_ = lean_ctor_get(v_toRing_2597_, 8);
v_powFn_x3f_2626_ = lean_ctor_get(v_toRing_2597_, 10);
v_intCastFn_x3f_2627_ = lean_ctor_get(v_toRing_2597_, 11);
v_natCastFn_x3f_2628_ = lean_ctor_get(v_toRing_2597_, 12);
v_one_x3f_2629_ = lean_ctor_get(v_toRing_2597_, 13);
v_vars_2630_ = lean_ctor_get(v_toRing_2597_, 14);
v_varMap_2631_ = lean_ctor_get(v_toRing_2597_, 15);
v_denote_2632_ = lean_ctor_get(v_toRing_2597_, 16);
v_isSharedCheck_2643_ = !lean_is_exclusive(v_toRing_2597_);
if (v_isSharedCheck_2643_ == 0)
{
lean_object* v_unused_2644_; 
v_unused_2644_ = lean_ctor_get(v_toRing_2597_, 9);
lean_dec(v_unused_2644_);
v___x_2634_ = v_toRing_2597_;
v_isShared_2635_ = v_isSharedCheck_2643_;
goto v_resetjp_2633_;
}
else
{
lean_inc(v_denote_2632_);
lean_inc(v_varMap_2631_);
lean_inc(v_vars_2630_);
lean_inc(v_one_x3f_2629_);
lean_inc(v_natCastFn_x3f_2628_);
lean_inc(v_intCastFn_x3f_2627_);
lean_inc(v_powFn_x3f_2626_);
lean_inc(v_subFn_x3f_2625_);
lean_inc(v_mulFn_x3f_2624_);
lean_inc(v_addFn_x3f_2623_);
lean_inc(v_charInst_x3f_2622_);
lean_inc(v_semiringInst_2621_);
lean_inc(v_ringInst_2620_);
lean_inc(v_u_2619_);
lean_inc(v_type_2618_);
lean_inc(v_id_2617_);
lean_dec(v_toRing_2597_);
v___x_2634_ = lean_box(0);
v_isShared_2635_ = v_isSharedCheck_2643_;
goto v_resetjp_2633_;
}
v_resetjp_2633_:
{
lean_object* v___x_2636_; lean_object* v___x_2638_; 
v___x_2636_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_2636_, 0, v_a_2595_);
if (v_isShared_2635_ == 0)
{
lean_ctor_set(v___x_2634_, 9, v___x_2636_);
v___x_2638_ = v___x_2634_;
goto v_reusejp_2637_;
}
else
{
lean_object* v_reuseFailAlloc_2642_; 
v_reuseFailAlloc_2642_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_2642_, 0, v_id_2617_);
lean_ctor_set(v_reuseFailAlloc_2642_, 1, v_type_2618_);
lean_ctor_set(v_reuseFailAlloc_2642_, 2, v_u_2619_);
lean_ctor_set(v_reuseFailAlloc_2642_, 3, v_ringInst_2620_);
lean_ctor_set(v_reuseFailAlloc_2642_, 4, v_semiringInst_2621_);
lean_ctor_set(v_reuseFailAlloc_2642_, 5, v_charInst_x3f_2622_);
lean_ctor_set(v_reuseFailAlloc_2642_, 6, v_addFn_x3f_2623_);
lean_ctor_set(v_reuseFailAlloc_2642_, 7, v_mulFn_x3f_2624_);
lean_ctor_set(v_reuseFailAlloc_2642_, 8, v_subFn_x3f_2625_);
lean_ctor_set(v_reuseFailAlloc_2642_, 9, v___x_2636_);
lean_ctor_set(v_reuseFailAlloc_2642_, 10, v_powFn_x3f_2626_);
lean_ctor_set(v_reuseFailAlloc_2642_, 11, v_intCastFn_x3f_2627_);
lean_ctor_set(v_reuseFailAlloc_2642_, 12, v_natCastFn_x3f_2628_);
lean_ctor_set(v_reuseFailAlloc_2642_, 13, v_one_x3f_2629_);
lean_ctor_set(v_reuseFailAlloc_2642_, 14, v_vars_2630_);
lean_ctor_set(v_reuseFailAlloc_2642_, 15, v_varMap_2631_);
lean_ctor_set(v_reuseFailAlloc_2642_, 16, v_denote_2632_);
v___x_2638_ = v_reuseFailAlloc_2642_;
goto v_reusejp_2637_;
}
v_reusejp_2637_:
{
lean_object* v___x_2640_; 
if (v_isShared_2616_ == 0)
{
lean_ctor_set(v___x_2615_, 0, v___x_2638_);
v___x_2640_ = v___x_2615_;
goto v_reusejp_2639_;
}
else
{
lean_object* v_reuseFailAlloc_2641_; 
v_reuseFailAlloc_2641_ = lean_alloc_ctor(0, 15, 2);
lean_ctor_set(v_reuseFailAlloc_2641_, 0, v___x_2638_);
lean_ctor_set(v_reuseFailAlloc_2641_, 1, v_invFn_x3f_2598_);
lean_ctor_set(v_reuseFailAlloc_2641_, 2, v_semiringId_x3f_2599_);
lean_ctor_set(v_reuseFailAlloc_2641_, 3, v_commSemiringInst_2600_);
lean_ctor_set(v_reuseFailAlloc_2641_, 4, v_commRingInst_2601_);
lean_ctor_set(v_reuseFailAlloc_2641_, 5, v_noZeroDivInst_x3f_2602_);
lean_ctor_set(v_reuseFailAlloc_2641_, 6, v_fieldInst_x3f_2603_);
lean_ctor_set(v_reuseFailAlloc_2641_, 7, v_denoteEntries_2604_);
lean_ctor_set(v_reuseFailAlloc_2641_, 8, v_nextId_2605_);
lean_ctor_set(v_reuseFailAlloc_2641_, 9, v_steps_2606_);
lean_ctor_set(v_reuseFailAlloc_2641_, 10, v_queue_2607_);
lean_ctor_set(v_reuseFailAlloc_2641_, 11, v_basis_2608_);
lean_ctor_set(v_reuseFailAlloc_2641_, 12, v_diseqs_2609_);
lean_ctor_set(v_reuseFailAlloc_2641_, 13, v_invSet_2611_);
lean_ctor_set(v_reuseFailAlloc_2641_, 14, v_numEq0_x3f_2612_);
lean_ctor_set_uint8(v_reuseFailAlloc_2641_, sizeof(void*)*15, v_recheck_2610_);
lean_ctor_set_uint8(v_reuseFailAlloc_2641_, sizeof(void*)*15 + 1, v_numEq0Updated_2613_);
v___x_2640_ = v_reuseFailAlloc_2641_;
goto v_reusejp_2639_;
}
v_reusejp_2639_:
{
return v___x_2640_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13(lean_object* v___y_2654_, lean_object* v___y_2655_, lean_object* v___y_2656_, lean_object* v___y_2657_, lean_object* v___y_2658_, lean_object* v___y_2659_, lean_object* v___y_2660_, lean_object* v___y_2661_, lean_object* v___y_2662_, lean_object* v___y_2663_, lean_object* v___y_2664_){
_start:
{
lean_object* v___x_2666_; 
v___x_2666_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_getCommRing(v___y_2654_, v___y_2655_, v___y_2656_, v___y_2657_, v___y_2658_, v___y_2659_, v___y_2660_, v___y_2661_, v___y_2662_, v___y_2663_, v___y_2664_);
if (lean_obj_tag(v___x_2666_) == 0)
{
lean_object* v_a_2667_; lean_object* v___x_2669_; uint8_t v_isShared_2670_; uint8_t v_isSharedCheck_2707_; 
v_a_2667_ = lean_ctor_get(v___x_2666_, 0);
v_isSharedCheck_2707_ = !lean_is_exclusive(v___x_2666_);
if (v_isSharedCheck_2707_ == 0)
{
v___x_2669_ = v___x_2666_;
v_isShared_2670_ = v_isSharedCheck_2707_;
goto v_resetjp_2668_;
}
else
{
lean_inc(v_a_2667_);
lean_dec(v___x_2666_);
v___x_2669_ = lean_box(0);
v_isShared_2670_ = v_isSharedCheck_2707_;
goto v_resetjp_2668_;
}
v_resetjp_2668_:
{
lean_object* v_toRing_2671_; lean_object* v_negFn_x3f_2672_; 
v_toRing_2671_ = lean_ctor_get(v_a_2667_, 0);
lean_inc_ref(v_toRing_2671_);
lean_dec(v_a_2667_);
v_negFn_x3f_2672_ = lean_ctor_get(v_toRing_2671_, 9);
if (lean_obj_tag(v_negFn_x3f_2672_) == 1)
{
lean_object* v_val_2673_; lean_object* v___x_2675_; 
lean_inc_ref(v_negFn_x3f_2672_);
lean_dec_ref(v_toRing_2671_);
lean_dec(v___y_2664_);
lean_dec_ref(v___y_2663_);
lean_dec(v___y_2662_);
lean_dec_ref(v___y_2661_);
lean_dec(v___y_2660_);
lean_dec_ref(v___y_2659_);
lean_dec(v___y_2658_);
lean_dec_ref(v___y_2657_);
lean_dec(v___y_2656_);
lean_dec(v___y_2655_);
lean_dec_ref(v___y_2654_);
v_val_2673_ = lean_ctor_get(v_negFn_x3f_2672_, 0);
lean_inc(v_val_2673_);
lean_dec_ref(v_negFn_x3f_2672_);
if (v_isShared_2670_ == 0)
{
lean_ctor_set(v___x_2669_, 0, v_val_2673_);
v___x_2675_ = v___x_2669_;
goto v_reusejp_2674_;
}
else
{
lean_object* v_reuseFailAlloc_2676_; 
v_reuseFailAlloc_2676_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2676_, 0, v_val_2673_);
v___x_2675_ = v_reuseFailAlloc_2676_;
goto v_reusejp_2674_;
}
v_reusejp_2674_:
{
return v___x_2675_;
}
}
else
{
lean_object* v_type_2677_; lean_object* v_u_2678_; lean_object* v_ringInst_2679_; lean_object* v___x_2680_; lean_object* v___x_2681_; lean_object* v___x_2682_; lean_object* v___x_2683_; lean_object* v_expectedInst_2684_; lean_object* v___x_2685_; lean_object* v___x_2686_; lean_object* v___x_2687_; 
lean_del_object(v___x_2669_);
v_type_2677_ = lean_ctor_get(v_toRing_2671_, 1);
lean_inc_ref(v_type_2677_);
v_u_2678_ = lean_ctor_get(v_toRing_2671_, 2);
lean_inc(v_u_2678_);
v_ringInst_2679_ = lean_ctor_get(v_toRing_2671_, 3);
lean_inc_ref(v_ringInst_2679_);
lean_dec_ref(v_toRing_2671_);
v___x_2680_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1));
v___x_2681_ = lean_box(0);
lean_inc(v_u_2678_);
v___x_2682_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_2682_, 0, v_u_2678_);
lean_ctor_set(v___x_2682_, 1, v___x_2681_);
v___x_2683_ = l_Lean_mkConst(v___x_2680_, v___x_2682_);
lean_inc_ref(v_type_2677_);
v_expectedInst_2684_ = l_Lean_mkAppB(v___x_2683_, v_type_2677_, v_ringInst_2679_);
v___x_2685_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__2));
v___x_2686_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13));
lean_inc(v___y_2655_);
v___x_2687_ = l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13_spec__19(v_type_2677_, v_u_2678_, v___x_2685_, v___x_2686_, v_expectedInst_2684_, v___y_2654_, v___y_2655_, v___y_2656_, v___y_2657_, v___y_2658_, v___y_2659_, v___y_2660_, v___y_2661_, v___y_2662_, v___y_2663_, v___y_2664_);
if (lean_obj_tag(v___x_2687_) == 0)
{
lean_object* v_a_2688_; lean_object* v___f_2689_; lean_object* v___x_2690_; 
v_a_2688_ = lean_ctor_get(v___x_2687_, 0);
lean_inc(v_a_2688_);
lean_dec_ref(v___x_2687_);
lean_inc(v_a_2688_);
v___f_2689_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___lam__0), 2, 1);
lean_closure_set(v___f_2689_, 0, v_a_2688_);
v___x_2690_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_modifyCommRing___redArg(v___f_2689_, v___y_2654_, v___y_2655_);
lean_dec(v___y_2655_);
if (lean_obj_tag(v___x_2690_) == 0)
{
lean_object* v___x_2692_; uint8_t v_isShared_2693_; uint8_t v_isSharedCheck_2697_; 
v_isSharedCheck_2697_ = !lean_is_exclusive(v___x_2690_);
if (v_isSharedCheck_2697_ == 0)
{
lean_object* v_unused_2698_; 
v_unused_2698_ = lean_ctor_get(v___x_2690_, 0);
lean_dec(v_unused_2698_);
v___x_2692_ = v___x_2690_;
v_isShared_2693_ = v_isSharedCheck_2697_;
goto v_resetjp_2691_;
}
else
{
lean_dec(v___x_2690_);
v___x_2692_ = lean_box(0);
v_isShared_2693_ = v_isSharedCheck_2697_;
goto v_resetjp_2691_;
}
v_resetjp_2691_:
{
lean_object* v___x_2695_; 
if (v_isShared_2693_ == 0)
{
lean_ctor_set(v___x_2692_, 0, v_a_2688_);
v___x_2695_ = v___x_2692_;
goto v_reusejp_2694_;
}
else
{
lean_object* v_reuseFailAlloc_2696_; 
v_reuseFailAlloc_2696_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2696_, 0, v_a_2688_);
v___x_2695_ = v_reuseFailAlloc_2696_;
goto v_reusejp_2694_;
}
v_reusejp_2694_:
{
return v___x_2695_;
}
}
}
else
{
lean_object* v_a_2699_; lean_object* v___x_2701_; uint8_t v_isShared_2702_; uint8_t v_isSharedCheck_2706_; 
lean_dec(v_a_2688_);
v_a_2699_ = lean_ctor_get(v___x_2690_, 0);
v_isSharedCheck_2706_ = !lean_is_exclusive(v___x_2690_);
if (v_isSharedCheck_2706_ == 0)
{
v___x_2701_ = v___x_2690_;
v_isShared_2702_ = v_isSharedCheck_2706_;
goto v_resetjp_2700_;
}
else
{
lean_inc(v_a_2699_);
lean_dec(v___x_2690_);
v___x_2701_ = lean_box(0);
v_isShared_2702_ = v_isSharedCheck_2706_;
goto v_resetjp_2700_;
}
v_resetjp_2700_:
{
lean_object* v___x_2704_; 
if (v_isShared_2702_ == 0)
{
v___x_2704_ = v___x_2701_;
goto v_reusejp_2703_;
}
else
{
lean_object* v_reuseFailAlloc_2705_; 
v_reuseFailAlloc_2705_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2705_, 0, v_a_2699_);
v___x_2704_ = v_reuseFailAlloc_2705_;
goto v_reusejp_2703_;
}
v_reusejp_2703_:
{
return v___x_2704_;
}
}
}
}
else
{
lean_dec(v___y_2655_);
lean_dec_ref(v___y_2654_);
return v___x_2687_;
}
}
}
}
else
{
lean_object* v_a_2708_; lean_object* v___x_2710_; uint8_t v_isShared_2711_; uint8_t v_isSharedCheck_2715_; 
lean_dec(v___y_2664_);
lean_dec_ref(v___y_2663_);
lean_dec(v___y_2662_);
lean_dec_ref(v___y_2661_);
lean_dec(v___y_2660_);
lean_dec_ref(v___y_2659_);
lean_dec(v___y_2658_);
lean_dec_ref(v___y_2657_);
lean_dec(v___y_2656_);
lean_dec(v___y_2655_);
lean_dec_ref(v___y_2654_);
v_a_2708_ = lean_ctor_get(v___x_2666_, 0);
v_isSharedCheck_2715_ = !lean_is_exclusive(v___x_2666_);
if (v_isSharedCheck_2715_ == 0)
{
v___x_2710_ = v___x_2666_;
v_isShared_2711_ = v_isSharedCheck_2715_;
goto v_resetjp_2709_;
}
else
{
lean_inc(v_a_2708_);
lean_dec(v___x_2666_);
v___x_2710_ = lean_box(0);
v_isShared_2711_ = v_isSharedCheck_2715_;
goto v_resetjp_2709_;
}
v_resetjp_2709_:
{
lean_object* v___x_2713_; 
if (v_isShared_2711_ == 0)
{
v___x_2713_ = v___x_2710_;
goto v_reusejp_2712_;
}
else
{
lean_object* v_reuseFailAlloc_2714_; 
v_reuseFailAlloc_2714_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2714_, 0, v_a_2708_);
v___x_2713_ = v_reuseFailAlloc_2714_;
goto v_reusejp_2712_;
}
v_reusejp_2712_:
{
return v___x_2713_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___boxed(lean_object* v___y_2716_, lean_object* v___y_2717_, lean_object* v___y_2718_, lean_object* v___y_2719_, lean_object* v___y_2720_, lean_object* v___y_2721_, lean_object* v___y_2722_, lean_object* v___y_2723_, lean_object* v___y_2724_, lean_object* v___y_2725_, lean_object* v___y_2726_, lean_object* v___y_2727_){
_start:
{
lean_object* v_res_2728_; 
v_res_2728_ = l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13(v___y_2716_, v___y_2717_, v___y_2718_, v___y_2719_, v___y_2720_, v___y_2721_, v___y_2722_, v___y_2723_, v___y_2724_, v___y_2725_, v___y_2726_);
return v_res_2728_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6(lean_object* v_inst_2729_, lean_object* v___y_2730_, lean_object* v___y_2731_, lean_object* v___y_2732_, lean_object* v___y_2733_, lean_object* v___y_2734_, lean_object* v___y_2735_, lean_object* v___y_2736_, lean_object* v___y_2737_, lean_object* v___y_2738_, lean_object* v___y_2739_, lean_object* v___y_2740_){
_start:
{
lean_object* v___x_2742_; 
v___x_2742_ = l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13(v___y_2730_, v___y_2731_, v___y_2732_, v___y_2733_, v___y_2734_, v___y_2735_, v___y_2736_, v___y_2737_, v___y_2738_, v___y_2739_, v___y_2740_);
if (lean_obj_tag(v___x_2742_) == 0)
{
lean_object* v_a_2743_; lean_object* v___x_2745_; uint8_t v_isShared_2746_; uint8_t v_isSharedCheck_2753_; 
v_a_2743_ = lean_ctor_get(v___x_2742_, 0);
v_isSharedCheck_2753_ = !lean_is_exclusive(v___x_2742_);
if (v_isSharedCheck_2753_ == 0)
{
v___x_2745_ = v___x_2742_;
v_isShared_2746_ = v_isSharedCheck_2753_;
goto v_resetjp_2744_;
}
else
{
lean_inc(v_a_2743_);
lean_dec(v___x_2742_);
v___x_2745_ = lean_box(0);
v_isShared_2746_ = v_isSharedCheck_2753_;
goto v_resetjp_2744_;
}
v_resetjp_2744_:
{
lean_object* v___x_2747_; uint8_t v___x_2748_; lean_object* v___x_2749_; lean_object* v___x_2751_; 
v___x_2747_ = l_Lean_Expr_appArg_x21(v_a_2743_);
lean_dec(v_a_2743_);
v___x_2748_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_2747_, v_inst_2729_);
lean_dec_ref(v___x_2747_);
v___x_2749_ = lean_box(v___x_2748_);
if (v_isShared_2746_ == 0)
{
lean_ctor_set(v___x_2745_, 0, v___x_2749_);
v___x_2751_ = v___x_2745_;
goto v_reusejp_2750_;
}
else
{
lean_object* v_reuseFailAlloc_2752_; 
v_reuseFailAlloc_2752_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2752_, 0, v___x_2749_);
v___x_2751_ = v_reuseFailAlloc_2752_;
goto v_reusejp_2750_;
}
v_reusejp_2750_:
{
return v___x_2751_;
}
}
}
else
{
lean_object* v_a_2754_; lean_object* v___x_2756_; uint8_t v_isShared_2757_; uint8_t v_isSharedCheck_2761_; 
v_a_2754_ = lean_ctor_get(v___x_2742_, 0);
v_isSharedCheck_2761_ = !lean_is_exclusive(v___x_2742_);
if (v_isSharedCheck_2761_ == 0)
{
v___x_2756_ = v___x_2742_;
v_isShared_2757_ = v_isSharedCheck_2761_;
goto v_resetjp_2755_;
}
else
{
lean_inc(v_a_2754_);
lean_dec(v___x_2742_);
v___x_2756_ = lean_box(0);
v_isShared_2757_ = v_isSharedCheck_2761_;
goto v_resetjp_2755_;
}
v_resetjp_2755_:
{
lean_object* v___x_2759_; 
if (v_isShared_2757_ == 0)
{
v___x_2759_ = v___x_2756_;
goto v_reusejp_2758_;
}
else
{
lean_object* v_reuseFailAlloc_2760_; 
v_reuseFailAlloc_2760_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2760_, 0, v_a_2754_);
v___x_2759_ = v_reuseFailAlloc_2760_;
goto v_reusejp_2758_;
}
v_reusejp_2758_:
{
return v___x_2759_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6___boxed(lean_object* v_inst_2762_, lean_object* v___y_2763_, lean_object* v___y_2764_, lean_object* v___y_2765_, lean_object* v___y_2766_, lean_object* v___y_2767_, lean_object* v___y_2768_, lean_object* v___y_2769_, lean_object* v___y_2770_, lean_object* v___y_2771_, lean_object* v___y_2772_, lean_object* v___y_2773_, lean_object* v___y_2774_){
_start:
{
lean_object* v_res_2775_; 
v_res_2775_ = l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6(v_inst_2762_, v___y_2763_, v___y_2764_, v___y_2765_, v___y_2766_, v___y_2767_, v___y_2768_, v___y_2769_, v___y_2770_, v___y_2771_, v___y_2772_, v___y_2773_);
lean_dec_ref(v_inst_2762_);
return v_res_2775_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(lean_object* v_toVar_2776_, lean_object* v_asVar_2777_, lean_object* v_e_2778_, lean_object* v___y_2779_, lean_object* v___y_2780_, lean_object* v___y_2781_, lean_object* v___y_2782_, lean_object* v___y_2783_, lean_object* v___y_2784_, lean_object* v___y_2785_, lean_object* v___y_2786_, lean_object* v___y_2787_, lean_object* v___y_2788_, lean_object* v___y_2789_){
_start:
{
lean_object* v___x_2791_; 
lean_inc_ref(v_e_2778_);
v___x_2791_ = l_Lean_Meta_instantiateMVarsIfMVarApp___redArg(v_e_2778_, v___y_2787_);
if (lean_obj_tag(v___x_2791_) == 0)
{
lean_object* v_a_2792_; lean_object* v_n_2794_; lean_object* v___x_2822_; uint8_t v___x_2823_; 
v_a_2792_ = lean_ctor_get(v___x_2791_, 0);
lean_inc(v_a_2792_);
lean_dec_ref(v___x_2791_);
v___x_2822_ = l_Lean_Expr_cleanupAnnotations(v_a_2792_);
v___x_2823_ = l_Lean_Expr_isApp(v___x_2822_);
if (v___x_2823_ == 0)
{
lean_object* v___x_2824_; 
lean_dec_ref(v___x_2822_);
lean_dec_ref(v_asVar_2777_);
v___x_2824_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2824_;
}
else
{
lean_object* v_arg_2825_; lean_object* v___x_2826_; uint8_t v___x_2827_; 
v_arg_2825_ = lean_ctor_get(v___x_2822_, 1);
lean_inc_ref(v_arg_2825_);
v___x_2826_ = l_Lean_Expr_appFnCleanup___redArg(v___x_2822_);
v___x_2827_ = l_Lean_Expr_isApp(v___x_2826_);
if (v___x_2827_ == 0)
{
lean_object* v___x_2828_; 
lean_dec_ref(v___x_2826_);
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_asVar_2777_);
v___x_2828_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2828_;
}
else
{
lean_object* v_arg_2829_; lean_object* v___x_2830_; lean_object* v___x_2831_; uint8_t v___x_2832_; 
v_arg_2829_ = lean_ctor_get(v___x_2826_, 1);
lean_inc_ref(v_arg_2829_);
v___x_2830_ = l_Lean_Expr_appFnCleanup___redArg(v___x_2826_);
v___x_2831_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__2));
v___x_2832_ = l_Lean_Expr_isConstOf(v___x_2830_, v___x_2831_);
if (v___x_2832_ == 0)
{
uint8_t v___x_2833_; 
v___x_2833_ = l_Lean_Expr_isApp(v___x_2830_);
if (v___x_2833_ == 0)
{
lean_object* v___x_2834_; 
lean_dec_ref(v___x_2830_);
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_asVar_2777_);
v___x_2834_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2834_;
}
else
{
lean_object* v_arg_2835_; lean_object* v___x_2836_; lean_object* v___x_2837_; uint8_t v___x_2838_; 
v_arg_2835_ = lean_ctor_get(v___x_2830_, 1);
lean_inc_ref(v_arg_2835_);
v___x_2836_ = l_Lean_Expr_appFnCleanup___redArg(v___x_2830_);
v___x_2837_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_2838_ = l_Lean_Expr_isConstOf(v___x_2836_, v___x_2837_);
if (v___x_2838_ == 0)
{
lean_object* v___x_2839_; uint8_t v___x_2840_; 
v___x_2839_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_2840_ = l_Lean_Expr_isConstOf(v___x_2836_, v___x_2839_);
if (v___x_2840_ == 0)
{
lean_object* v___x_2841_; uint8_t v___x_2842_; 
v___x_2841_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10));
v___x_2842_ = l_Lean_Expr_isConstOf(v___x_2836_, v___x_2841_);
if (v___x_2842_ == 0)
{
lean_object* v___x_2843_; uint8_t v___x_2844_; 
v___x_2843_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13));
v___x_2844_ = l_Lean_Expr_isConstOf(v___x_2836_, v___x_2843_);
if (v___x_2844_ == 0)
{
uint8_t v___x_2845_; 
v___x_2845_ = l_Lean_Expr_isApp(v___x_2836_);
if (v___x_2845_ == 0)
{
lean_object* v___x_2846_; 
lean_dec_ref(v___x_2836_);
lean_dec_ref(v_arg_2835_);
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_asVar_2777_);
v___x_2846_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2846_;
}
else
{
lean_object* v___x_2847_; uint8_t v___x_2848_; 
v___x_2847_ = l_Lean_Expr_appFnCleanup___redArg(v___x_2836_);
v___x_2848_ = l_Lean_Expr_isApp(v___x_2847_);
if (v___x_2848_ == 0)
{
lean_object* v___x_2849_; 
lean_dec_ref(v___x_2847_);
lean_dec_ref(v_arg_2835_);
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_asVar_2777_);
v___x_2849_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2849_;
}
else
{
lean_object* v___x_2850_; uint8_t v___x_2851_; 
v___x_2850_ = l_Lean_Expr_appFnCleanup___redArg(v___x_2847_);
v___x_2851_ = l_Lean_Expr_isApp(v___x_2850_);
if (v___x_2851_ == 0)
{
lean_object* v___x_2852_; 
lean_dec_ref(v___x_2850_);
lean_dec_ref(v_arg_2835_);
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_asVar_2777_);
v___x_2852_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2852_;
}
else
{
lean_object* v___x_2853_; lean_object* v___x_2854_; uint8_t v___x_2855_; 
v___x_2853_ = l_Lean_Expr_appFnCleanup___redArg(v___x_2850_);
v___x_2854_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_2855_ = l_Lean_Expr_isConstOf(v___x_2853_, v___x_2854_);
if (v___x_2855_ == 0)
{
lean_object* v___x_2856_; uint8_t v___x_2857_; 
v___x_2856_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19));
v___x_2857_ = l_Lean_Expr_isConstOf(v___x_2853_, v___x_2856_);
if (v___x_2857_ == 0)
{
lean_object* v___x_2858_; uint8_t v___x_2859_; 
v___x_2858_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_2859_ = l_Lean_Expr_isConstOf(v___x_2853_, v___x_2858_);
if (v___x_2859_ == 0)
{
lean_object* v___x_2860_; uint8_t v___x_2861_; 
v___x_2860_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_2861_ = l_Lean_Expr_isConstOf(v___x_2853_, v___x_2860_);
lean_dec_ref(v___x_2853_);
if (v___x_2861_ == 0)
{
lean_object* v___x_2862_; 
lean_dec_ref(v_arg_2835_);
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_asVar_2777_);
v___x_2862_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2862_;
}
else
{
lean_object* v___x_2863_; 
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
lean_inc(v___y_2785_);
lean_inc_ref(v___y_2784_);
lean_inc(v___y_2783_);
lean_inc_ref(v___y_2782_);
lean_inc(v___y_2781_);
lean_inc(v___y_2780_);
lean_inc_ref(v___y_2779_);
v___x_2863_ = l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1(v_arg_2835_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
lean_dec_ref(v_arg_2835_);
if (lean_obj_tag(v___x_2863_) == 0)
{
lean_object* v_a_2864_; uint8_t v___x_2865_; 
v_a_2864_ = lean_ctor_get(v___x_2863_, 0);
lean_inc(v_a_2864_);
lean_dec_ref(v___x_2863_);
v___x_2865_ = lean_unbox(v_a_2864_);
lean_dec(v_a_2864_);
if (v___x_2865_ == 0)
{
lean_object* v___x_2866_; 
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_toVar_2776_);
v___x_2866_ = lean_apply_13(v_asVar_2777_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2866_;
}
else
{
lean_object* v___x_2867_; 
lean_dec_ref(v_e_2778_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
lean_inc(v___y_2785_);
lean_inc_ref(v___y_2784_);
lean_inc(v___y_2783_);
lean_inc_ref(v___y_2782_);
lean_inc(v___y_2781_);
lean_inc(v___y_2780_);
lean_inc_ref(v___y_2779_);
lean_inc_ref(v_asVar_2777_);
lean_inc_ref(v_toVar_2776_);
v___x_2867_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_2776_, v_asVar_2777_, v_arg_2829_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
if (lean_obj_tag(v___x_2867_) == 0)
{
lean_object* v_a_2868_; lean_object* v___x_2869_; 
v_a_2868_ = lean_ctor_get(v___x_2867_, 0);
lean_inc(v_a_2868_);
lean_dec_ref(v___x_2867_);
v___x_2869_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_2776_, v_asVar_2777_, v_arg_2825_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
if (lean_obj_tag(v___x_2869_) == 0)
{
lean_object* v_a_2870_; lean_object* v___x_2872_; uint8_t v_isShared_2873_; uint8_t v_isSharedCheck_2878_; 
v_a_2870_ = lean_ctor_get(v___x_2869_, 0);
v_isSharedCheck_2878_ = !lean_is_exclusive(v___x_2869_);
if (v_isSharedCheck_2878_ == 0)
{
v___x_2872_ = v___x_2869_;
v_isShared_2873_ = v_isSharedCheck_2878_;
goto v_resetjp_2871_;
}
else
{
lean_inc(v_a_2870_);
lean_dec(v___x_2869_);
v___x_2872_ = lean_box(0);
v_isShared_2873_ = v_isSharedCheck_2878_;
goto v_resetjp_2871_;
}
v_resetjp_2871_:
{
lean_object* v___x_2874_; lean_object* v___x_2876_; 
v___x_2874_ = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(v___x_2874_, 0, v_a_2868_);
lean_ctor_set(v___x_2874_, 1, v_a_2870_);
if (v_isShared_2873_ == 0)
{
lean_ctor_set(v___x_2872_, 0, v___x_2874_);
v___x_2876_ = v___x_2872_;
goto v_reusejp_2875_;
}
else
{
lean_object* v_reuseFailAlloc_2877_; 
v_reuseFailAlloc_2877_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2877_, 0, v___x_2874_);
v___x_2876_ = v_reuseFailAlloc_2877_;
goto v_reusejp_2875_;
}
v_reusejp_2875_:
{
return v___x_2876_;
}
}
}
else
{
lean_dec(v_a_2868_);
return v___x_2869_;
}
}
else
{
lean_dec_ref(v_arg_2825_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
return v___x_2867_;
}
}
}
else
{
lean_object* v_a_2879_; lean_object* v___x_2881_; uint8_t v_isShared_2882_; uint8_t v_isSharedCheck_2886_; 
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
v_a_2879_ = lean_ctor_get(v___x_2863_, 0);
v_isSharedCheck_2886_ = !lean_is_exclusive(v___x_2863_);
if (v_isSharedCheck_2886_ == 0)
{
v___x_2881_ = v___x_2863_;
v_isShared_2882_ = v_isSharedCheck_2886_;
goto v_resetjp_2880_;
}
else
{
lean_inc(v_a_2879_);
lean_dec(v___x_2863_);
v___x_2881_ = lean_box(0);
v_isShared_2882_ = v_isSharedCheck_2886_;
goto v_resetjp_2880_;
}
v_resetjp_2880_:
{
lean_object* v___x_2884_; 
if (v_isShared_2882_ == 0)
{
v___x_2884_ = v___x_2881_;
goto v_reusejp_2883_;
}
else
{
lean_object* v_reuseFailAlloc_2885_; 
v_reuseFailAlloc_2885_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2885_, 0, v_a_2879_);
v___x_2884_ = v_reuseFailAlloc_2885_;
goto v_reusejp_2883_;
}
v_reusejp_2883_:
{
return v___x_2884_;
}
}
}
}
}
else
{
lean_object* v___x_2887_; 
lean_dec_ref(v___x_2853_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
lean_inc(v___y_2785_);
lean_inc_ref(v___y_2784_);
lean_inc(v___y_2783_);
lean_inc_ref(v___y_2782_);
lean_inc(v___y_2781_);
lean_inc(v___y_2780_);
lean_inc_ref(v___y_2779_);
v___x_2887_ = l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3(v_arg_2835_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
lean_dec_ref(v_arg_2835_);
if (lean_obj_tag(v___x_2887_) == 0)
{
lean_object* v_a_2888_; uint8_t v___x_2889_; 
v_a_2888_ = lean_ctor_get(v___x_2887_, 0);
lean_inc(v_a_2888_);
lean_dec_ref(v___x_2887_);
v___x_2889_ = lean_unbox(v_a_2888_);
lean_dec(v_a_2888_);
if (v___x_2889_ == 0)
{
lean_object* v___x_2890_; 
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_toVar_2776_);
v___x_2890_ = lean_apply_13(v_asVar_2777_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2890_;
}
else
{
lean_object* v___x_2891_; 
lean_dec_ref(v_e_2778_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
lean_inc(v___y_2785_);
lean_inc_ref(v___y_2784_);
lean_inc(v___y_2783_);
lean_inc_ref(v___y_2782_);
lean_inc(v___y_2781_);
lean_inc(v___y_2780_);
lean_inc_ref(v___y_2779_);
lean_inc_ref(v_asVar_2777_);
lean_inc_ref(v_toVar_2776_);
v___x_2891_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_2776_, v_asVar_2777_, v_arg_2829_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
if (lean_obj_tag(v___x_2891_) == 0)
{
lean_object* v_a_2892_; lean_object* v___x_2893_; 
v_a_2892_ = lean_ctor_get(v___x_2891_, 0);
lean_inc(v_a_2892_);
lean_dec_ref(v___x_2891_);
v___x_2893_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_2776_, v_asVar_2777_, v_arg_2825_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
if (lean_obj_tag(v___x_2893_) == 0)
{
lean_object* v_a_2894_; lean_object* v___x_2896_; uint8_t v_isShared_2897_; uint8_t v_isSharedCheck_2902_; 
v_a_2894_ = lean_ctor_get(v___x_2893_, 0);
v_isSharedCheck_2902_ = !lean_is_exclusive(v___x_2893_);
if (v_isSharedCheck_2902_ == 0)
{
v___x_2896_ = v___x_2893_;
v_isShared_2897_ = v_isSharedCheck_2902_;
goto v_resetjp_2895_;
}
else
{
lean_inc(v_a_2894_);
lean_dec(v___x_2893_);
v___x_2896_ = lean_box(0);
v_isShared_2897_ = v_isSharedCheck_2902_;
goto v_resetjp_2895_;
}
v_resetjp_2895_:
{
lean_object* v___x_2898_; lean_object* v___x_2900_; 
v___x_2898_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_2898_, 0, v_a_2892_);
lean_ctor_set(v___x_2898_, 1, v_a_2894_);
if (v_isShared_2897_ == 0)
{
lean_ctor_set(v___x_2896_, 0, v___x_2898_);
v___x_2900_ = v___x_2896_;
goto v_reusejp_2899_;
}
else
{
lean_object* v_reuseFailAlloc_2901_; 
v_reuseFailAlloc_2901_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2901_, 0, v___x_2898_);
v___x_2900_ = v_reuseFailAlloc_2901_;
goto v_reusejp_2899_;
}
v_reusejp_2899_:
{
return v___x_2900_;
}
}
}
else
{
lean_dec(v_a_2892_);
return v___x_2893_;
}
}
else
{
lean_dec_ref(v_arg_2825_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
return v___x_2891_;
}
}
}
else
{
lean_object* v_a_2903_; lean_object* v___x_2905_; uint8_t v_isShared_2906_; uint8_t v_isSharedCheck_2910_; 
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
v_a_2903_ = lean_ctor_get(v___x_2887_, 0);
v_isSharedCheck_2910_ = !lean_is_exclusive(v___x_2887_);
if (v_isSharedCheck_2910_ == 0)
{
v___x_2905_ = v___x_2887_;
v_isShared_2906_ = v_isSharedCheck_2910_;
goto v_resetjp_2904_;
}
else
{
lean_inc(v_a_2903_);
lean_dec(v___x_2887_);
v___x_2905_ = lean_box(0);
v_isShared_2906_ = v_isSharedCheck_2910_;
goto v_resetjp_2904_;
}
v_resetjp_2904_:
{
lean_object* v___x_2908_; 
if (v_isShared_2906_ == 0)
{
v___x_2908_ = v___x_2905_;
goto v_reusejp_2907_;
}
else
{
lean_object* v_reuseFailAlloc_2909_; 
v_reuseFailAlloc_2909_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2909_, 0, v_a_2903_);
v___x_2908_ = v_reuseFailAlloc_2909_;
goto v_reusejp_2907_;
}
v_reusejp_2907_:
{
return v___x_2908_;
}
}
}
}
}
else
{
lean_object* v___x_2911_; 
lean_dec_ref(v___x_2853_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
lean_inc(v___y_2785_);
lean_inc_ref(v___y_2784_);
lean_inc(v___y_2783_);
lean_inc_ref(v___y_2782_);
lean_inc(v___y_2781_);
lean_inc(v___y_2780_);
lean_inc_ref(v___y_2779_);
v___x_2911_ = l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4(v_arg_2835_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
lean_dec_ref(v_arg_2835_);
if (lean_obj_tag(v___x_2911_) == 0)
{
lean_object* v_a_2912_; uint8_t v___x_2913_; 
v_a_2912_ = lean_ctor_get(v___x_2911_, 0);
lean_inc(v_a_2912_);
lean_dec_ref(v___x_2911_);
v___x_2913_ = lean_unbox(v_a_2912_);
lean_dec(v_a_2912_);
if (v___x_2913_ == 0)
{
lean_object* v___x_2914_; 
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_toVar_2776_);
v___x_2914_ = lean_apply_13(v_asVar_2777_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2914_;
}
else
{
lean_object* v___x_2915_; 
lean_dec_ref(v_e_2778_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
lean_inc(v___y_2785_);
lean_inc_ref(v___y_2784_);
lean_inc(v___y_2783_);
lean_inc_ref(v___y_2782_);
lean_inc(v___y_2781_);
lean_inc(v___y_2780_);
lean_inc_ref(v___y_2779_);
lean_inc_ref(v_asVar_2777_);
lean_inc_ref(v_toVar_2776_);
v___x_2915_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_2776_, v_asVar_2777_, v_arg_2829_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
if (lean_obj_tag(v___x_2915_) == 0)
{
lean_object* v_a_2916_; lean_object* v___x_2917_; 
v_a_2916_ = lean_ctor_get(v___x_2915_, 0);
lean_inc(v_a_2916_);
lean_dec_ref(v___x_2915_);
v___x_2917_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_2776_, v_asVar_2777_, v_arg_2825_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
if (lean_obj_tag(v___x_2917_) == 0)
{
lean_object* v_a_2918_; lean_object* v___x_2920_; uint8_t v_isShared_2921_; uint8_t v_isSharedCheck_2926_; 
v_a_2918_ = lean_ctor_get(v___x_2917_, 0);
v_isSharedCheck_2926_ = !lean_is_exclusive(v___x_2917_);
if (v_isSharedCheck_2926_ == 0)
{
v___x_2920_ = v___x_2917_;
v_isShared_2921_ = v_isSharedCheck_2926_;
goto v_resetjp_2919_;
}
else
{
lean_inc(v_a_2918_);
lean_dec(v___x_2917_);
v___x_2920_ = lean_box(0);
v_isShared_2921_ = v_isSharedCheck_2926_;
goto v_resetjp_2919_;
}
v_resetjp_2919_:
{
lean_object* v___x_2922_; lean_object* v___x_2924_; 
v___x_2922_ = lean_alloc_ctor(6, 2, 0);
lean_ctor_set(v___x_2922_, 0, v_a_2916_);
lean_ctor_set(v___x_2922_, 1, v_a_2918_);
if (v_isShared_2921_ == 0)
{
lean_ctor_set(v___x_2920_, 0, v___x_2922_);
v___x_2924_ = v___x_2920_;
goto v_reusejp_2923_;
}
else
{
lean_object* v_reuseFailAlloc_2925_; 
v_reuseFailAlloc_2925_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2925_, 0, v___x_2922_);
v___x_2924_ = v_reuseFailAlloc_2925_;
goto v_reusejp_2923_;
}
v_reusejp_2923_:
{
return v___x_2924_;
}
}
}
else
{
lean_dec(v_a_2916_);
return v___x_2917_;
}
}
else
{
lean_dec_ref(v_arg_2825_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
return v___x_2915_;
}
}
}
else
{
lean_object* v_a_2927_; lean_object* v___x_2929_; uint8_t v_isShared_2930_; uint8_t v_isSharedCheck_2934_; 
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_arg_2825_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
v_a_2927_ = lean_ctor_get(v___x_2911_, 0);
v_isSharedCheck_2934_ = !lean_is_exclusive(v___x_2911_);
if (v_isSharedCheck_2934_ == 0)
{
v___x_2929_ = v___x_2911_;
v_isShared_2930_ = v_isSharedCheck_2934_;
goto v_resetjp_2928_;
}
else
{
lean_inc(v_a_2927_);
lean_dec(v___x_2911_);
v___x_2929_ = lean_box(0);
v_isShared_2930_ = v_isSharedCheck_2934_;
goto v_resetjp_2928_;
}
v_resetjp_2928_:
{
lean_object* v___x_2932_; 
if (v_isShared_2930_ == 0)
{
v___x_2932_ = v___x_2929_;
goto v_reusejp_2931_;
}
else
{
lean_object* v_reuseFailAlloc_2933_; 
v_reuseFailAlloc_2933_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2933_, 0, v_a_2927_);
v___x_2932_ = v_reuseFailAlloc_2933_;
goto v_reusejp_2931_;
}
v_reusejp_2931_:
{
return v___x_2932_;
}
}
}
}
}
else
{
lean_object* v___x_2935_; 
lean_dec_ref(v___x_2853_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
v___x_2935_ = l_Lean_Meta_getNatValue_x3f(v_arg_2825_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
lean_dec_ref(v_arg_2825_);
if (lean_obj_tag(v___x_2935_) == 0)
{
lean_object* v_a_2936_; 
v_a_2936_ = lean_ctor_get(v___x_2935_, 0);
lean_inc(v_a_2936_);
lean_dec_ref(v___x_2935_);
if (lean_obj_tag(v_a_2936_) == 1)
{
lean_object* v_val_2937_; lean_object* v___x_2938_; 
v_val_2937_ = lean_ctor_get(v_a_2936_, 0);
lean_inc(v_val_2937_);
lean_dec_ref(v_a_2936_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
lean_inc(v___y_2785_);
lean_inc_ref(v___y_2784_);
lean_inc(v___y_2783_);
lean_inc_ref(v___y_2782_);
lean_inc(v___y_2781_);
lean_inc(v___y_2780_);
lean_inc_ref(v___y_2779_);
v___x_2938_ = l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5(v_arg_2835_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
lean_dec_ref(v_arg_2835_);
if (lean_obj_tag(v___x_2938_) == 0)
{
lean_object* v_a_2939_; uint8_t v___x_2940_; 
v_a_2939_ = lean_ctor_get(v___x_2938_, 0);
lean_inc(v_a_2939_);
lean_dec_ref(v___x_2938_);
v___x_2940_ = lean_unbox(v_a_2939_);
lean_dec(v_a_2939_);
if (v___x_2940_ == 0)
{
lean_object* v___x_2941_; 
lean_dec(v_val_2937_);
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_toVar_2776_);
v___x_2941_ = lean_apply_13(v_asVar_2777_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2941_;
}
else
{
lean_object* v___x_2942_; 
lean_dec_ref(v_e_2778_);
v___x_2942_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_2776_, v_asVar_2777_, v_arg_2829_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
if (lean_obj_tag(v___x_2942_) == 0)
{
lean_object* v_a_2943_; lean_object* v___x_2945_; uint8_t v_isShared_2946_; uint8_t v_isSharedCheck_2951_; 
v_a_2943_ = lean_ctor_get(v___x_2942_, 0);
v_isSharedCheck_2951_ = !lean_is_exclusive(v___x_2942_);
if (v_isSharedCheck_2951_ == 0)
{
v___x_2945_ = v___x_2942_;
v_isShared_2946_ = v_isSharedCheck_2951_;
goto v_resetjp_2944_;
}
else
{
lean_inc(v_a_2943_);
lean_dec(v___x_2942_);
v___x_2945_ = lean_box(0);
v_isShared_2946_ = v_isSharedCheck_2951_;
goto v_resetjp_2944_;
}
v_resetjp_2944_:
{
lean_object* v___x_2947_; lean_object* v___x_2949_; 
v___x_2947_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_2947_, 0, v_a_2943_);
lean_ctor_set(v___x_2947_, 1, v_val_2937_);
if (v_isShared_2946_ == 0)
{
lean_ctor_set(v___x_2945_, 0, v___x_2947_);
v___x_2949_ = v___x_2945_;
goto v_reusejp_2948_;
}
else
{
lean_object* v_reuseFailAlloc_2950_; 
v_reuseFailAlloc_2950_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2950_, 0, v___x_2947_);
v___x_2949_ = v_reuseFailAlloc_2950_;
goto v_reusejp_2948_;
}
v_reusejp_2948_:
{
return v___x_2949_;
}
}
}
else
{
lean_dec(v_val_2937_);
return v___x_2942_;
}
}
}
else
{
lean_object* v_a_2952_; lean_object* v___x_2954_; uint8_t v_isShared_2955_; uint8_t v_isSharedCheck_2959_; 
lean_dec(v_val_2937_);
lean_dec_ref(v_arg_2829_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
v_a_2952_ = lean_ctor_get(v___x_2938_, 0);
v_isSharedCheck_2959_ = !lean_is_exclusive(v___x_2938_);
if (v_isSharedCheck_2959_ == 0)
{
v___x_2954_ = v___x_2938_;
v_isShared_2955_ = v_isSharedCheck_2959_;
goto v_resetjp_2953_;
}
else
{
lean_inc(v_a_2952_);
lean_dec(v___x_2938_);
v___x_2954_ = lean_box(0);
v_isShared_2955_ = v_isSharedCheck_2959_;
goto v_resetjp_2953_;
}
v_resetjp_2953_:
{
lean_object* v___x_2957_; 
if (v_isShared_2955_ == 0)
{
v___x_2957_ = v___x_2954_;
goto v_reusejp_2956_;
}
else
{
lean_object* v_reuseFailAlloc_2958_; 
v_reuseFailAlloc_2958_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2958_, 0, v_a_2952_);
v___x_2957_ = v_reuseFailAlloc_2958_;
goto v_reusejp_2956_;
}
v_reusejp_2956_:
{
return v___x_2957_;
}
}
}
}
else
{
lean_object* v___x_2960_; 
lean_dec(v_a_2936_);
lean_dec_ref(v_arg_2835_);
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_asVar_2777_);
v___x_2960_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2960_;
}
}
else
{
lean_object* v_a_2961_; lean_object* v___x_2963_; uint8_t v_isShared_2964_; uint8_t v_isSharedCheck_2968_; 
lean_dec_ref(v_arg_2835_);
lean_dec_ref(v_arg_2829_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
v_a_2961_ = lean_ctor_get(v___x_2935_, 0);
v_isSharedCheck_2968_ = !lean_is_exclusive(v___x_2935_);
if (v_isSharedCheck_2968_ == 0)
{
v___x_2963_ = v___x_2935_;
v_isShared_2964_ = v_isSharedCheck_2968_;
goto v_resetjp_2962_;
}
else
{
lean_inc(v_a_2961_);
lean_dec(v___x_2935_);
v___x_2963_ = lean_box(0);
v_isShared_2964_ = v_isSharedCheck_2968_;
goto v_resetjp_2962_;
}
v_resetjp_2962_:
{
lean_object* v___x_2966_; 
if (v_isShared_2964_ == 0)
{
v___x_2966_ = v___x_2963_;
goto v_reusejp_2965_;
}
else
{
lean_object* v_reuseFailAlloc_2967_; 
v_reuseFailAlloc_2967_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2967_, 0, v_a_2961_);
v___x_2966_ = v_reuseFailAlloc_2967_;
goto v_reusejp_2965_;
}
v_reusejp_2965_:
{
return v___x_2966_;
}
}
}
}
}
}
}
}
else
{
lean_object* v___x_2969_; 
lean_dec_ref(v___x_2836_);
lean_dec_ref(v_arg_2835_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
lean_inc(v___y_2785_);
lean_inc_ref(v___y_2784_);
lean_inc(v___y_2783_);
lean_inc_ref(v___y_2782_);
lean_inc(v___y_2781_);
lean_inc(v___y_2780_);
lean_inc_ref(v___y_2779_);
v___x_2969_ = l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6(v_arg_2829_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
lean_dec_ref(v_arg_2829_);
if (lean_obj_tag(v___x_2969_) == 0)
{
lean_object* v_a_2970_; uint8_t v___x_2971_; 
v_a_2970_ = lean_ctor_get(v___x_2969_, 0);
lean_inc(v_a_2970_);
lean_dec_ref(v___x_2969_);
v___x_2971_ = lean_unbox(v_a_2970_);
lean_dec(v_a_2970_);
if (v___x_2971_ == 0)
{
lean_object* v___x_2972_; 
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_toVar_2776_);
v___x_2972_ = lean_apply_13(v_asVar_2777_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2972_;
}
else
{
lean_object* v___x_2973_; 
lean_dec_ref(v_e_2778_);
v___x_2973_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_2776_, v_asVar_2777_, v_arg_2825_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
if (lean_obj_tag(v___x_2973_) == 0)
{
lean_object* v_a_2974_; lean_object* v___x_2976_; uint8_t v_isShared_2977_; uint8_t v_isSharedCheck_2982_; 
v_a_2974_ = lean_ctor_get(v___x_2973_, 0);
v_isSharedCheck_2982_ = !lean_is_exclusive(v___x_2973_);
if (v_isSharedCheck_2982_ == 0)
{
v___x_2976_ = v___x_2973_;
v_isShared_2977_ = v_isSharedCheck_2982_;
goto v_resetjp_2975_;
}
else
{
lean_inc(v_a_2974_);
lean_dec(v___x_2973_);
v___x_2976_ = lean_box(0);
v_isShared_2977_ = v_isSharedCheck_2982_;
goto v_resetjp_2975_;
}
v_resetjp_2975_:
{
lean_object* v___x_2978_; lean_object* v___x_2980_; 
v___x_2978_ = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(v___x_2978_, 0, v_a_2974_);
if (v_isShared_2977_ == 0)
{
lean_ctor_set(v___x_2976_, 0, v___x_2978_);
v___x_2980_ = v___x_2976_;
goto v_reusejp_2979_;
}
else
{
lean_object* v_reuseFailAlloc_2981_; 
v_reuseFailAlloc_2981_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2981_, 0, v___x_2978_);
v___x_2980_ = v_reuseFailAlloc_2981_;
goto v_reusejp_2979_;
}
v_reusejp_2979_:
{
return v___x_2980_;
}
}
}
else
{
return v___x_2973_;
}
}
}
else
{
lean_object* v_a_2983_; lean_object* v___x_2985_; uint8_t v_isShared_2986_; uint8_t v_isSharedCheck_2990_; 
lean_dec_ref(v_arg_2825_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
v_a_2983_ = lean_ctor_get(v___x_2969_, 0);
v_isSharedCheck_2990_ = !lean_is_exclusive(v___x_2969_);
if (v_isSharedCheck_2990_ == 0)
{
v___x_2985_ = v___x_2969_;
v_isShared_2986_ = v_isSharedCheck_2990_;
goto v_resetjp_2984_;
}
else
{
lean_inc(v_a_2983_);
lean_dec(v___x_2969_);
v___x_2985_ = lean_box(0);
v_isShared_2986_ = v_isSharedCheck_2990_;
goto v_resetjp_2984_;
}
v_resetjp_2984_:
{
lean_object* v___x_2988_; 
if (v_isShared_2986_ == 0)
{
v___x_2988_ = v___x_2985_;
goto v_reusejp_2987_;
}
else
{
lean_object* v_reuseFailAlloc_2989_; 
v_reuseFailAlloc_2989_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2989_, 0, v_a_2983_);
v___x_2988_ = v_reuseFailAlloc_2989_;
goto v_reusejp_2987_;
}
v_reusejp_2987_:
{
return v___x_2988_;
}
}
}
}
}
else
{
lean_object* v___x_2991_; 
lean_dec_ref(v___x_2836_);
lean_dec_ref(v_arg_2835_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
lean_inc(v___y_2785_);
lean_inc_ref(v___y_2784_);
lean_inc(v___y_2783_);
lean_inc_ref(v___y_2782_);
lean_inc(v___y_2781_);
lean_inc(v___y_2780_);
lean_inc_ref(v___y_2779_);
v___x_2991_ = l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7(v_arg_2829_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
lean_dec_ref(v_arg_2829_);
if (lean_obj_tag(v___x_2991_) == 0)
{
lean_object* v_a_2992_; uint8_t v___x_2993_; 
v_a_2992_ = lean_ctor_get(v___x_2991_, 0);
lean_inc(v_a_2992_);
lean_dec_ref(v___x_2991_);
v___x_2993_ = lean_unbox(v_a_2992_);
lean_dec(v_a_2992_);
if (v___x_2993_ == 0)
{
lean_object* v___x_2994_; 
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_toVar_2776_);
v___x_2994_ = lean_apply_13(v_asVar_2777_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2994_;
}
else
{
lean_object* v___x_2995_; 
lean_dec_ref(v_asVar_2777_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
v___x_2995_ = l_Lean_Meta_getIntValue_x3f(v_arg_2825_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
if (lean_obj_tag(v___x_2995_) == 0)
{
lean_object* v_a_2996_; lean_object* v___x_2998_; uint8_t v_isShared_2999_; uint8_t v_isSharedCheck_3012_; 
v_a_2996_ = lean_ctor_get(v___x_2995_, 0);
v_isSharedCheck_3012_ = !lean_is_exclusive(v___x_2995_);
if (v_isSharedCheck_3012_ == 0)
{
v___x_2998_ = v___x_2995_;
v_isShared_2999_ = v_isSharedCheck_3012_;
goto v_resetjp_2997_;
}
else
{
lean_inc(v_a_2996_);
lean_dec(v___x_2995_);
v___x_2998_ = lean_box(0);
v_isShared_2999_ = v_isSharedCheck_3012_;
goto v_resetjp_2997_;
}
v_resetjp_2997_:
{
if (lean_obj_tag(v_a_2996_) == 1)
{
lean_object* v_val_3000_; lean_object* v___x_3002_; uint8_t v_isShared_3003_; uint8_t v_isSharedCheck_3010_; 
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_toVar_2776_);
v_val_3000_ = lean_ctor_get(v_a_2996_, 0);
v_isSharedCheck_3010_ = !lean_is_exclusive(v_a_2996_);
if (v_isSharedCheck_3010_ == 0)
{
v___x_3002_ = v_a_2996_;
v_isShared_3003_ = v_isSharedCheck_3010_;
goto v_resetjp_3001_;
}
else
{
lean_inc(v_val_3000_);
lean_dec(v_a_2996_);
v___x_3002_ = lean_box(0);
v_isShared_3003_ = v_isSharedCheck_3010_;
goto v_resetjp_3001_;
}
v_resetjp_3001_:
{
lean_object* v___x_3005_; 
if (v_isShared_3003_ == 0)
{
lean_ctor_set_tag(v___x_3002_, 2);
v___x_3005_ = v___x_3002_;
goto v_reusejp_3004_;
}
else
{
lean_object* v_reuseFailAlloc_3009_; 
v_reuseFailAlloc_3009_ = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3009_, 0, v_val_3000_);
v___x_3005_ = v_reuseFailAlloc_3009_;
goto v_reusejp_3004_;
}
v_reusejp_3004_:
{
lean_object* v___x_3007_; 
if (v_isShared_2999_ == 0)
{
lean_ctor_set(v___x_2998_, 0, v___x_3005_);
v___x_3007_ = v___x_2998_;
goto v_reusejp_3006_;
}
else
{
lean_object* v_reuseFailAlloc_3008_; 
v_reuseFailAlloc_3008_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3008_, 0, v___x_3005_);
v___x_3007_ = v_reuseFailAlloc_3008_;
goto v_reusejp_3006_;
}
v_reusejp_3006_:
{
return v___x_3007_;
}
}
}
}
else
{
lean_object* v___x_3011_; 
lean_del_object(v___x_2998_);
lean_dec(v_a_2996_);
v___x_3011_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_3011_;
}
}
}
else
{
lean_object* v_a_3013_; lean_object* v___x_3015_; uint8_t v_isShared_3016_; uint8_t v_isSharedCheck_3020_; 
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_toVar_2776_);
v_a_3013_ = lean_ctor_get(v___x_2995_, 0);
v_isSharedCheck_3020_ = !lean_is_exclusive(v___x_2995_);
if (v_isSharedCheck_3020_ == 0)
{
v___x_3015_ = v___x_2995_;
v_isShared_3016_ = v_isSharedCheck_3020_;
goto v_resetjp_3014_;
}
else
{
lean_inc(v_a_3013_);
lean_dec(v___x_2995_);
v___x_3015_ = lean_box(0);
v_isShared_3016_ = v_isSharedCheck_3020_;
goto v_resetjp_3014_;
}
v_resetjp_3014_:
{
lean_object* v___x_3018_; 
if (v_isShared_3016_ == 0)
{
v___x_3018_ = v___x_3015_;
goto v_reusejp_3017_;
}
else
{
lean_object* v_reuseFailAlloc_3019_; 
v_reuseFailAlloc_3019_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3019_, 0, v_a_3013_);
v___x_3018_ = v_reuseFailAlloc_3019_;
goto v_reusejp_3017_;
}
v_reusejp_3017_:
{
return v___x_3018_;
}
}
}
}
}
else
{
lean_object* v_a_3021_; lean_object* v___x_3023_; uint8_t v_isShared_3024_; uint8_t v_isSharedCheck_3028_; 
lean_dec_ref(v_arg_2825_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
v_a_3021_ = lean_ctor_get(v___x_2991_, 0);
v_isSharedCheck_3028_ = !lean_is_exclusive(v___x_2991_);
if (v_isSharedCheck_3028_ == 0)
{
v___x_3023_ = v___x_2991_;
v_isShared_3024_ = v_isSharedCheck_3028_;
goto v_resetjp_3022_;
}
else
{
lean_inc(v_a_3021_);
lean_dec(v___x_2991_);
v___x_3023_ = lean_box(0);
v_isShared_3024_ = v_isSharedCheck_3028_;
goto v_resetjp_3022_;
}
v_resetjp_3022_:
{
lean_object* v___x_3026_; 
if (v_isShared_3024_ == 0)
{
v___x_3026_ = v___x_3023_;
goto v_reusejp_3025_;
}
else
{
lean_object* v_reuseFailAlloc_3027_; 
v_reuseFailAlloc_3027_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3027_, 0, v_a_3021_);
v___x_3026_ = v_reuseFailAlloc_3027_;
goto v_reusejp_3025_;
}
v_reusejp_3025_:
{
return v___x_3026_;
}
}
}
}
}
else
{
lean_object* v___x_3029_; 
lean_dec_ref(v___x_2836_);
lean_dec_ref(v_arg_2835_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
lean_inc(v___y_2785_);
lean_inc_ref(v___y_2784_);
lean_inc(v___y_2783_);
lean_inc_ref(v___y_2782_);
lean_inc(v___y_2781_);
lean_inc(v___y_2780_);
lean_inc_ref(v___y_2779_);
v___x_3029_ = l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8(v_arg_2829_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
lean_dec_ref(v_arg_2829_);
if (lean_obj_tag(v___x_3029_) == 0)
{
lean_object* v_a_3030_; uint8_t v___x_3031_; 
v_a_3030_ = lean_ctor_get(v___x_3029_, 0);
lean_inc(v_a_3030_);
lean_dec_ref(v___x_3029_);
v___x_3031_ = lean_unbox(v_a_3030_);
lean_dec(v_a_3030_);
if (v___x_3031_ == 0)
{
lean_object* v___x_3032_; 
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_toVar_2776_);
v___x_3032_ = lean_apply_13(v_asVar_2777_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_3032_;
}
else
{
lean_object* v___x_3033_; 
lean_dec_ref(v_asVar_2777_);
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
v___x_3033_ = l_Lean_Meta_getNatValue_x3f(v_arg_2825_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
lean_dec_ref(v_arg_2825_);
if (lean_obj_tag(v___x_3033_) == 0)
{
lean_object* v_a_3034_; lean_object* v___x_3036_; uint8_t v_isShared_3037_; uint8_t v_isSharedCheck_3050_; 
v_a_3034_ = lean_ctor_get(v___x_3033_, 0);
v_isSharedCheck_3050_ = !lean_is_exclusive(v___x_3033_);
if (v_isSharedCheck_3050_ == 0)
{
v___x_3036_ = v___x_3033_;
v_isShared_3037_ = v_isSharedCheck_3050_;
goto v_resetjp_3035_;
}
else
{
lean_inc(v_a_3034_);
lean_dec(v___x_3033_);
v___x_3036_ = lean_box(0);
v_isShared_3037_ = v_isSharedCheck_3050_;
goto v_resetjp_3035_;
}
v_resetjp_3035_:
{
if (lean_obj_tag(v_a_3034_) == 1)
{
lean_object* v_val_3038_; lean_object* v___x_3040_; uint8_t v_isShared_3041_; uint8_t v_isSharedCheck_3048_; 
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_toVar_2776_);
v_val_3038_ = lean_ctor_get(v_a_3034_, 0);
v_isSharedCheck_3048_ = !lean_is_exclusive(v_a_3034_);
if (v_isSharedCheck_3048_ == 0)
{
v___x_3040_ = v_a_3034_;
v_isShared_3041_ = v_isSharedCheck_3048_;
goto v_resetjp_3039_;
}
else
{
lean_inc(v_val_3038_);
lean_dec(v_a_3034_);
v___x_3040_ = lean_box(0);
v_isShared_3041_ = v_isSharedCheck_3048_;
goto v_resetjp_3039_;
}
v_resetjp_3039_:
{
lean_object* v___x_3043_; 
if (v_isShared_3041_ == 0)
{
v___x_3043_ = v___x_3040_;
goto v_reusejp_3042_;
}
else
{
lean_object* v_reuseFailAlloc_3047_; 
v_reuseFailAlloc_3047_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3047_, 0, v_val_3038_);
v___x_3043_ = v_reuseFailAlloc_3047_;
goto v_reusejp_3042_;
}
v_reusejp_3042_:
{
lean_object* v___x_3045_; 
if (v_isShared_3037_ == 0)
{
lean_ctor_set(v___x_3036_, 0, v___x_3043_);
v___x_3045_ = v___x_3036_;
goto v_reusejp_3044_;
}
else
{
lean_object* v_reuseFailAlloc_3046_; 
v_reuseFailAlloc_3046_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3046_, 0, v___x_3043_);
v___x_3045_ = v_reuseFailAlloc_3046_;
goto v_reusejp_3044_;
}
v_reusejp_3044_:
{
return v___x_3045_;
}
}
}
}
else
{
lean_object* v___x_3049_; 
lean_del_object(v___x_3036_);
lean_dec(v_a_3034_);
v___x_3049_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_3049_;
}
}
}
else
{
lean_object* v_a_3051_; lean_object* v___x_3053_; uint8_t v_isShared_3054_; uint8_t v_isSharedCheck_3058_; 
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_toVar_2776_);
v_a_3051_ = lean_ctor_get(v___x_3033_, 0);
v_isSharedCheck_3058_ = !lean_is_exclusive(v___x_3033_);
if (v_isSharedCheck_3058_ == 0)
{
v___x_3053_ = v___x_3033_;
v_isShared_3054_ = v_isSharedCheck_3058_;
goto v_resetjp_3052_;
}
else
{
lean_inc(v_a_3051_);
lean_dec(v___x_3033_);
v___x_3053_ = lean_box(0);
v_isShared_3054_ = v_isSharedCheck_3058_;
goto v_resetjp_3052_;
}
v_resetjp_3052_:
{
lean_object* v___x_3056_; 
if (v_isShared_3054_ == 0)
{
v___x_3056_ = v___x_3053_;
goto v_reusejp_3055_;
}
else
{
lean_object* v_reuseFailAlloc_3057_; 
v_reuseFailAlloc_3057_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3057_, 0, v_a_3051_);
v___x_3056_ = v_reuseFailAlloc_3057_;
goto v_reusejp_3055_;
}
v_reusejp_3055_:
{
return v___x_3056_;
}
}
}
}
}
else
{
lean_object* v_a_3059_; lean_object* v___x_3061_; uint8_t v_isShared_3062_; uint8_t v_isSharedCheck_3066_; 
lean_dec_ref(v_arg_2825_);
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
v_a_3059_ = lean_ctor_get(v___x_3029_, 0);
v_isSharedCheck_3066_ = !lean_is_exclusive(v___x_3029_);
if (v_isSharedCheck_3066_ == 0)
{
v___x_3061_ = v___x_3029_;
v_isShared_3062_ = v_isSharedCheck_3066_;
goto v_resetjp_3060_;
}
else
{
lean_inc(v_a_3059_);
lean_dec(v___x_3029_);
v___x_3061_ = lean_box(0);
v_isShared_3062_ = v_isSharedCheck_3066_;
goto v_resetjp_3060_;
}
v_resetjp_3060_:
{
lean_object* v___x_3064_; 
if (v_isShared_3062_ == 0)
{
v___x_3064_ = v___x_3061_;
goto v_reusejp_3063_;
}
else
{
lean_object* v_reuseFailAlloc_3065_; 
v_reuseFailAlloc_3065_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3065_, 0, v_a_3059_);
v___x_3064_ = v_reuseFailAlloc_3065_;
goto v_reusejp_3063_;
}
v_reusejp_3063_:
{
return v___x_3064_;
}
}
}
}
}
else
{
lean_dec_ref(v___x_2836_);
lean_dec_ref(v_arg_2835_);
lean_dec_ref(v_arg_2825_);
lean_dec_ref(v_asVar_2777_);
v_n_2794_ = v_arg_2829_;
goto v___jp_2793_;
}
}
}
else
{
lean_dec_ref(v___x_2830_);
lean_dec_ref(v_arg_2829_);
lean_dec_ref(v_asVar_2777_);
v_n_2794_ = v_arg_2825_;
goto v___jp_2793_;
}
}
}
v___jp_2793_:
{
lean_object* v___x_2795_; 
lean_inc(v___y_2789_);
lean_inc_ref(v___y_2788_);
lean_inc(v___y_2787_);
lean_inc_ref(v___y_2786_);
v___x_2795_ = l_Lean_Meta_getNatValue_x3f(v_n_2794_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_);
lean_dec_ref(v_n_2794_);
if (lean_obj_tag(v___x_2795_) == 0)
{
lean_object* v_a_2796_; lean_object* v___x_2798_; uint8_t v_isShared_2799_; uint8_t v_isSharedCheck_2813_; 
v_a_2796_ = lean_ctor_get(v___x_2795_, 0);
v_isSharedCheck_2813_ = !lean_is_exclusive(v___x_2795_);
if (v_isSharedCheck_2813_ == 0)
{
v___x_2798_ = v___x_2795_;
v_isShared_2799_ = v_isSharedCheck_2813_;
goto v_resetjp_2797_;
}
else
{
lean_inc(v_a_2796_);
lean_dec(v___x_2795_);
v___x_2798_ = lean_box(0);
v_isShared_2799_ = v_isSharedCheck_2813_;
goto v_resetjp_2797_;
}
v_resetjp_2797_:
{
if (lean_obj_tag(v_a_2796_) == 1)
{
lean_object* v_val_2800_; lean_object* v___x_2802_; uint8_t v_isShared_2803_; uint8_t v_isSharedCheck_2811_; 
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_toVar_2776_);
v_val_2800_ = lean_ctor_get(v_a_2796_, 0);
v_isSharedCheck_2811_ = !lean_is_exclusive(v_a_2796_);
if (v_isSharedCheck_2811_ == 0)
{
v___x_2802_ = v_a_2796_;
v_isShared_2803_ = v_isSharedCheck_2811_;
goto v_resetjp_2801_;
}
else
{
lean_inc(v_val_2800_);
lean_dec(v_a_2796_);
v___x_2802_ = lean_box(0);
v_isShared_2803_ = v_isSharedCheck_2811_;
goto v_resetjp_2801_;
}
v_resetjp_2801_:
{
lean_object* v___x_2804_; lean_object* v___x_2806_; 
v___x_2804_ = lean_nat_to_int(v_val_2800_);
if (v_isShared_2803_ == 0)
{
lean_ctor_set_tag(v___x_2802_, 0);
lean_ctor_set(v___x_2802_, 0, v___x_2804_);
v___x_2806_ = v___x_2802_;
goto v_reusejp_2805_;
}
else
{
lean_object* v_reuseFailAlloc_2810_; 
v_reuseFailAlloc_2810_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2810_, 0, v___x_2804_);
v___x_2806_ = v_reuseFailAlloc_2810_;
goto v_reusejp_2805_;
}
v_reusejp_2805_:
{
lean_object* v___x_2808_; 
if (v_isShared_2799_ == 0)
{
lean_ctor_set(v___x_2798_, 0, v___x_2806_);
v___x_2808_ = v___x_2798_;
goto v_reusejp_2807_;
}
else
{
lean_object* v_reuseFailAlloc_2809_; 
v_reuseFailAlloc_2809_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2809_, 0, v___x_2806_);
v___x_2808_ = v_reuseFailAlloc_2809_;
goto v_reusejp_2807_;
}
v_reusejp_2807_:
{
return v___x_2808_;
}
}
}
}
else
{
lean_object* v___x_2812_; 
lean_del_object(v___x_2798_);
lean_dec(v_a_2796_);
v___x_2812_ = lean_apply_13(v_toVar_2776_, v_e_2778_, v___y_2779_, v___y_2780_, v___y_2781_, v___y_2782_, v___y_2783_, v___y_2784_, v___y_2785_, v___y_2786_, v___y_2787_, v___y_2788_, v___y_2789_, lean_box(0));
return v___x_2812_;
}
}
}
else
{
lean_object* v_a_2814_; lean_object* v___x_2816_; uint8_t v_isShared_2817_; uint8_t v_isSharedCheck_2821_; 
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_toVar_2776_);
v_a_2814_ = lean_ctor_get(v___x_2795_, 0);
v_isSharedCheck_2821_ = !lean_is_exclusive(v___x_2795_);
if (v_isSharedCheck_2821_ == 0)
{
v___x_2816_ = v___x_2795_;
v_isShared_2817_ = v_isSharedCheck_2821_;
goto v_resetjp_2815_;
}
else
{
lean_inc(v_a_2814_);
lean_dec(v___x_2795_);
v___x_2816_ = lean_box(0);
v_isShared_2817_ = v_isSharedCheck_2821_;
goto v_resetjp_2815_;
}
v_resetjp_2815_:
{
lean_object* v___x_2819_; 
if (v_isShared_2817_ == 0)
{
v___x_2819_ = v___x_2816_;
goto v_reusejp_2818_;
}
else
{
lean_object* v_reuseFailAlloc_2820_; 
v_reuseFailAlloc_2820_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2820_, 0, v_a_2814_);
v___x_2819_ = v_reuseFailAlloc_2820_;
goto v_reusejp_2818_;
}
v_reusejp_2818_:
{
return v___x_2819_;
}
}
}
}
}
else
{
lean_object* v_a_3067_; lean_object* v___x_3069_; uint8_t v_isShared_3070_; uint8_t v_isSharedCheck_3074_; 
lean_dec(v___y_2789_);
lean_dec_ref(v___y_2788_);
lean_dec(v___y_2787_);
lean_dec_ref(v___y_2786_);
lean_dec(v___y_2785_);
lean_dec_ref(v___y_2784_);
lean_dec(v___y_2783_);
lean_dec_ref(v___y_2782_);
lean_dec(v___y_2781_);
lean_dec(v___y_2780_);
lean_dec_ref(v___y_2779_);
lean_dec_ref(v_e_2778_);
lean_dec_ref(v_asVar_2777_);
lean_dec_ref(v_toVar_2776_);
v_a_3067_ = lean_ctor_get(v___x_2791_, 0);
v_isSharedCheck_3074_ = !lean_is_exclusive(v___x_2791_);
if (v_isSharedCheck_3074_ == 0)
{
v___x_3069_ = v___x_2791_;
v_isShared_3070_ = v_isSharedCheck_3074_;
goto v_resetjp_3068_;
}
else
{
lean_inc(v_a_3067_);
lean_dec(v___x_2791_);
v___x_3069_ = lean_box(0);
v_isShared_3070_ = v_isSharedCheck_3074_;
goto v_resetjp_3068_;
}
v_resetjp_3068_:
{
lean_object* v___x_3072_; 
if (v_isShared_3070_ == 0)
{
v___x_3072_ = v___x_3069_;
goto v_reusejp_3071_;
}
else
{
lean_object* v_reuseFailAlloc_3073_; 
v_reuseFailAlloc_3073_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3073_, 0, v_a_3067_);
v___x_3072_ = v_reuseFailAlloc_3073_;
goto v_reusejp_3071_;
}
v_reusejp_3071_:
{
return v___x_3072_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2___boxed(lean_object* v_toVar_3075_, lean_object* v_asVar_3076_, lean_object* v_e_3077_, lean_object* v___y_3078_, lean_object* v___y_3079_, lean_object* v___y_3080_, lean_object* v___y_3081_, lean_object* v___y_3082_, lean_object* v___y_3083_, lean_object* v___y_3084_, lean_object* v___y_3085_, lean_object* v___y_3086_, lean_object* v___y_3087_, lean_object* v___y_3088_, lean_object* v___y_3089_){
_start:
{
lean_object* v_res_3090_; 
v_res_3090_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_3075_, v_asVar_3076_, v_e_3077_, v___y_3078_, v___y_3079_, v___y_3080_, v___y_3081_, v___y_3082_, v___y_3083_, v___y_3084_, v___y_3085_, v___y_3086_, v___y_3087_, v___y_3088_);
return v_res_3090_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__2(lean_object* v_mkVar_3091_, lean_object* v_e_3092_, lean_object* v___y_3093_, lean_object* v___y_3094_, lean_object* v___y_3095_, lean_object* v___y_3096_, lean_object* v___y_3097_, lean_object* v___y_3098_, lean_object* v___y_3099_, lean_object* v___y_3100_, lean_object* v___y_3101_, lean_object* v___y_3102_, lean_object* v___y_3103_){
_start:
{
lean_object* v___x_3105_; 
lean_inc_ref(v_e_3092_);
v___x_3105_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg(v_e_3092_, v___y_3095_, v___y_3096_, v___y_3097_, v___y_3098_, v___y_3099_, v___y_3100_, v___y_3101_, v___y_3102_, v___y_3103_);
if (lean_obj_tag(v___x_3105_) == 0)
{
lean_object* v___x_3106_; 
lean_dec_ref(v___x_3105_);
v___x_3106_ = lean_apply_13(v_mkVar_3091_, v_e_3092_, v___y_3093_, v___y_3094_, v___y_3095_, v___y_3096_, v___y_3097_, v___y_3098_, v___y_3099_, v___y_3100_, v___y_3101_, v___y_3102_, v___y_3103_, lean_box(0));
if (lean_obj_tag(v___x_3106_) == 0)
{
lean_object* v_a_3107_; lean_object* v___x_3109_; uint8_t v_isShared_3110_; uint8_t v_isSharedCheck_3115_; 
v_a_3107_ = lean_ctor_get(v___x_3106_, 0);
v_isSharedCheck_3115_ = !lean_is_exclusive(v___x_3106_);
if (v_isSharedCheck_3115_ == 0)
{
v___x_3109_ = v___x_3106_;
v_isShared_3110_ = v_isSharedCheck_3115_;
goto v_resetjp_3108_;
}
else
{
lean_inc(v_a_3107_);
lean_dec(v___x_3106_);
v___x_3109_ = lean_box(0);
v_isShared_3110_ = v_isSharedCheck_3115_;
goto v_resetjp_3108_;
}
v_resetjp_3108_:
{
lean_object* v___x_3111_; lean_object* v___x_3113_; 
v___x_3111_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_3111_, 0, v_a_3107_);
if (v_isShared_3110_ == 0)
{
lean_ctor_set(v___x_3109_, 0, v___x_3111_);
v___x_3113_ = v___x_3109_;
goto v_reusejp_3112_;
}
else
{
lean_object* v_reuseFailAlloc_3114_; 
v_reuseFailAlloc_3114_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3114_, 0, v___x_3111_);
v___x_3113_ = v_reuseFailAlloc_3114_;
goto v_reusejp_3112_;
}
v_reusejp_3112_:
{
return v___x_3113_;
}
}
}
else
{
lean_object* v_a_3116_; lean_object* v___x_3118_; uint8_t v_isShared_3119_; uint8_t v_isSharedCheck_3123_; 
v_a_3116_ = lean_ctor_get(v___x_3106_, 0);
v_isSharedCheck_3123_ = !lean_is_exclusive(v___x_3106_);
if (v_isSharedCheck_3123_ == 0)
{
v___x_3118_ = v___x_3106_;
v_isShared_3119_ = v_isSharedCheck_3123_;
goto v_resetjp_3117_;
}
else
{
lean_inc(v_a_3116_);
lean_dec(v___x_3106_);
v___x_3118_ = lean_box(0);
v_isShared_3119_ = v_isSharedCheck_3123_;
goto v_resetjp_3117_;
}
v_resetjp_3117_:
{
lean_object* v___x_3121_; 
if (v_isShared_3119_ == 0)
{
v___x_3121_ = v___x_3118_;
goto v_reusejp_3120_;
}
else
{
lean_object* v_reuseFailAlloc_3122_; 
v_reuseFailAlloc_3122_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3122_, 0, v_a_3116_);
v___x_3121_ = v_reuseFailAlloc_3122_;
goto v_reusejp_3120_;
}
v_reusejp_3120_:
{
return v___x_3121_;
}
}
}
}
else
{
lean_object* v_a_3124_; lean_object* v___x_3126_; uint8_t v_isShared_3127_; uint8_t v_isSharedCheck_3131_; 
lean_dec(v___y_3103_);
lean_dec_ref(v___y_3102_);
lean_dec(v___y_3101_);
lean_dec_ref(v___y_3100_);
lean_dec(v___y_3099_);
lean_dec_ref(v___y_3098_);
lean_dec(v___y_3097_);
lean_dec_ref(v___y_3096_);
lean_dec(v___y_3095_);
lean_dec(v___y_3094_);
lean_dec_ref(v___y_3093_);
lean_dec_ref(v_e_3092_);
lean_dec_ref(v_mkVar_3091_);
v_a_3124_ = lean_ctor_get(v___x_3105_, 0);
v_isSharedCheck_3131_ = !lean_is_exclusive(v___x_3105_);
if (v_isSharedCheck_3131_ == 0)
{
v___x_3126_ = v___x_3105_;
v_isShared_3127_ = v_isSharedCheck_3131_;
goto v_resetjp_3125_;
}
else
{
lean_inc(v_a_3124_);
lean_dec(v___x_3105_);
v___x_3126_ = lean_box(0);
v_isShared_3127_ = v_isSharedCheck_3131_;
goto v_resetjp_3125_;
}
v_resetjp_3125_:
{
lean_object* v___x_3129_; 
if (v_isShared_3127_ == 0)
{
v___x_3129_ = v___x_3126_;
goto v_reusejp_3128_;
}
else
{
lean_object* v_reuseFailAlloc_3130_; 
v_reuseFailAlloc_3130_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3130_, 0, v_a_3124_);
v___x_3129_ = v_reuseFailAlloc_3130_;
goto v_reusejp_3128_;
}
v_reusejp_3128_:
{
return v___x_3129_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__2___boxed(lean_object* v_mkVar_3132_, lean_object* v_e_3133_, lean_object* v___y_3134_, lean_object* v___y_3135_, lean_object* v___y_3136_, lean_object* v___y_3137_, lean_object* v___y_3138_, lean_object* v___y_3139_, lean_object* v___y_3140_, lean_object* v___y_3141_, lean_object* v___y_3142_, lean_object* v___y_3143_, lean_object* v___y_3144_, lean_object* v___y_3145_){
_start:
{
lean_object* v_res_3146_; 
v_res_3146_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__2(v_mkVar_3132_, v_e_3133_, v___y_3134_, v___y_3135_, v___y_3136_, v___y_3137_, v___y_3138_, v___y_3139_, v___y_3140_, v___y_3141_, v___y_3142_, v___y_3143_, v___y_3144_);
return v_res_3146_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13___redArg(lean_object* v_keys_3147_, lean_object* v_vals_3148_, lean_object* v_i_3149_, lean_object* v_k_3150_){
_start:
{
lean_object* v___x_3151_; uint8_t v___x_3152_; 
v___x_3151_ = lean_array_get_size(v_keys_3147_);
v___x_3152_ = lean_nat_dec_lt(v_i_3149_, v___x_3151_);
if (v___x_3152_ == 0)
{
lean_object* v___x_3153_; 
lean_dec(v_i_3149_);
v___x_3153_ = lean_box(0);
return v___x_3153_;
}
else
{
lean_object* v_k_x27_3154_; uint8_t v___x_3155_; 
v_k_x27_3154_ = lean_array_fget_borrowed(v_keys_3147_, v_i_3149_);
v___x_3155_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v_k_3150_, v_k_x27_3154_);
if (v___x_3155_ == 0)
{
lean_object* v___x_3156_; lean_object* v___x_3157_; 
v___x_3156_ = lean_unsigned_to_nat(1u);
v___x_3157_ = lean_nat_add(v_i_3149_, v___x_3156_);
lean_dec(v_i_3149_);
v_i_3149_ = v___x_3157_;
goto _start;
}
else
{
lean_object* v___x_3159_; lean_object* v___x_3160_; 
v___x_3159_ = lean_array_fget_borrowed(v_vals_3148_, v_i_3149_);
lean_dec(v_i_3149_);
lean_inc(v___x_3159_);
v___x_3160_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_3160_, 0, v___x_3159_);
return v___x_3160_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13___redArg___boxed(lean_object* v_keys_3161_, lean_object* v_vals_3162_, lean_object* v_i_3163_, lean_object* v_k_3164_){
_start:
{
lean_object* v_res_3165_; 
v_res_3165_ = l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13___redArg(v_keys_3161_, v_vals_3162_, v_i_3163_, v_k_3164_);
lean_dec_ref(v_k_3164_);
lean_dec_ref(v_vals_3162_);
lean_dec_ref(v_keys_3161_);
return v_res_3165_;
}
}
static size_t _init_l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__0(void){
_start:
{
size_t v___x_3166_; size_t v___x_3167_; size_t v___x_3168_; 
v___x_3166_ = ((size_t)5ULL);
v___x_3167_ = ((size_t)1ULL);
v___x_3168_ = lean_usize_shift_left(v___x_3167_, v___x_3166_);
return v___x_3168_;
}
}
static size_t _init_l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__1(void){
_start:
{
size_t v___x_3169_; size_t v___x_3170_; size_t v___x_3171_; 
v___x_3169_ = ((size_t)1ULL);
v___x_3170_ = lean_usize_once(&l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__0, &l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__0_once, _init_l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__0);
v___x_3171_ = lean_usize_sub(v___x_3170_, v___x_3169_);
return v___x_3171_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg(lean_object* v_x_3172_, size_t v_x_3173_, lean_object* v_x_3174_){
_start:
{
if (lean_obj_tag(v_x_3172_) == 0)
{
lean_object* v_es_3175_; lean_object* v___x_3177_; uint8_t v_isShared_3178_; uint8_t v_isSharedCheck_3196_; 
v_es_3175_ = lean_ctor_get(v_x_3172_, 0);
v_isSharedCheck_3196_ = !lean_is_exclusive(v_x_3172_);
if (v_isSharedCheck_3196_ == 0)
{
v___x_3177_ = v_x_3172_;
v_isShared_3178_ = v_isSharedCheck_3196_;
goto v_resetjp_3176_;
}
else
{
lean_inc(v_es_3175_);
lean_dec(v_x_3172_);
v___x_3177_ = lean_box(0);
v_isShared_3178_ = v_isSharedCheck_3196_;
goto v_resetjp_3176_;
}
v_resetjp_3176_:
{
lean_object* v___x_3179_; size_t v___x_3180_; size_t v___x_3181_; size_t v___x_3182_; lean_object* v_j_3183_; lean_object* v___x_3184_; 
v___x_3179_ = lean_box(2);
v___x_3180_ = ((size_t)5ULL);
v___x_3181_ = lean_usize_once(&l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__1, &l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__1_once, _init_l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__1);
v___x_3182_ = lean_usize_land(v_x_3173_, v___x_3181_);
v_j_3183_ = lean_usize_to_nat(v___x_3182_);
v___x_3184_ = lean_array_get(v___x_3179_, v_es_3175_, v_j_3183_);
lean_dec(v_j_3183_);
lean_dec_ref(v_es_3175_);
switch(lean_obj_tag(v___x_3184_))
{
case 0:
{
lean_object* v_key_3185_; lean_object* v_val_3186_; uint8_t v___x_3187_; 
v_key_3185_ = lean_ctor_get(v___x_3184_, 0);
lean_inc(v_key_3185_);
v_val_3186_ = lean_ctor_get(v___x_3184_, 1);
lean_inc(v_val_3186_);
lean_dec_ref(v___x_3184_);
v___x_3187_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v_x_3174_, v_key_3185_);
lean_dec(v_key_3185_);
if (v___x_3187_ == 0)
{
lean_object* v___x_3188_; 
lean_dec(v_val_3186_);
lean_del_object(v___x_3177_);
v___x_3188_ = lean_box(0);
return v___x_3188_;
}
else
{
lean_object* v___x_3190_; 
if (v_isShared_3178_ == 0)
{
lean_ctor_set_tag(v___x_3177_, 1);
lean_ctor_set(v___x_3177_, 0, v_val_3186_);
v___x_3190_ = v___x_3177_;
goto v_reusejp_3189_;
}
else
{
lean_object* v_reuseFailAlloc_3191_; 
v_reuseFailAlloc_3191_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3191_, 0, v_val_3186_);
v___x_3190_ = v_reuseFailAlloc_3191_;
goto v_reusejp_3189_;
}
v_reusejp_3189_:
{
return v___x_3190_;
}
}
}
case 1:
{
lean_object* v_node_3192_; size_t v___x_3193_; 
lean_del_object(v___x_3177_);
v_node_3192_ = lean_ctor_get(v___x_3184_, 0);
lean_inc(v_node_3192_);
lean_dec_ref(v___x_3184_);
v___x_3193_ = lean_usize_shift_right(v_x_3173_, v___x_3180_);
v_x_3172_ = v_node_3192_;
v_x_3173_ = v___x_3193_;
goto _start;
}
default: 
{
lean_object* v___x_3195_; 
lean_del_object(v___x_3177_);
v___x_3195_ = lean_box(0);
return v___x_3195_;
}
}
}
}
else
{
lean_object* v_ks_3197_; lean_object* v_vs_3198_; lean_object* v___x_3199_; lean_object* v___x_3200_; 
v_ks_3197_ = lean_ctor_get(v_x_3172_, 0);
lean_inc_ref(v_ks_3197_);
v_vs_3198_ = lean_ctor_get(v_x_3172_, 1);
lean_inc_ref(v_vs_3198_);
lean_dec_ref(v_x_3172_);
v___x_3199_ = lean_unsigned_to_nat(0u);
v___x_3200_ = l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13___redArg(v_ks_3197_, v_vs_3198_, v___x_3199_, v_x_3174_);
lean_dec_ref(v_vs_3198_);
lean_dec_ref(v_ks_3197_);
return v___x_3200_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___boxed(lean_object* v_x_3201_, lean_object* v_x_3202_, lean_object* v_x_3203_){
_start:
{
size_t v_x_134158__boxed_3204_; lean_object* v_res_3205_; 
v_x_134158__boxed_3204_ = lean_unbox_usize(v_x_3202_);
lean_dec(v_x_3202_);
v_res_3205_ = l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg(v_x_3201_, v_x_134158__boxed_3204_, v_x_3203_);
lean_dec_ref(v_x_3203_);
return v_res_3205_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___redArg(lean_object* v_x_3206_, lean_object* v_x_3207_){
_start:
{
uint64_t v___x_3208_; size_t v___x_3209_; lean_object* v___x_3210_; 
v___x_3208_ = l_Lean_Meta_Sym_hashPtrExpr_unsafe__1(v_x_3207_);
v___x_3209_ = lean_uint64_to_usize(v___x_3208_);
v___x_3210_ = l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg(v_x_3206_, v___x_3209_, v_x_3207_);
return v___x_3210_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___redArg___boxed(lean_object* v_x_3211_, lean_object* v_x_3212_){
_start:
{
lean_object* v_res_3213_; 
v_res_3213_ = l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___redArg(v_x_3211_, v_x_3212_);
lean_dec_ref(v_x_3212_);
return v_res_3213_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16_spec__24___redArg(lean_object* v_x_3214_, lean_object* v_x_3215_, lean_object* v_x_3216_, lean_object* v_x_3217_){
_start:
{
lean_object* v_ks_3218_; lean_object* v_vs_3219_; lean_object* v___x_3221_; uint8_t v_isShared_3222_; uint8_t v_isSharedCheck_3243_; 
v_ks_3218_ = lean_ctor_get(v_x_3214_, 0);
v_vs_3219_ = lean_ctor_get(v_x_3214_, 1);
v_isSharedCheck_3243_ = !lean_is_exclusive(v_x_3214_);
if (v_isSharedCheck_3243_ == 0)
{
v___x_3221_ = v_x_3214_;
v_isShared_3222_ = v_isSharedCheck_3243_;
goto v_resetjp_3220_;
}
else
{
lean_inc(v_vs_3219_);
lean_inc(v_ks_3218_);
lean_dec(v_x_3214_);
v___x_3221_ = lean_box(0);
v_isShared_3222_ = v_isSharedCheck_3243_;
goto v_resetjp_3220_;
}
v_resetjp_3220_:
{
lean_object* v___x_3223_; uint8_t v___x_3224_; 
v___x_3223_ = lean_array_get_size(v_ks_3218_);
v___x_3224_ = lean_nat_dec_lt(v_x_3215_, v___x_3223_);
if (v___x_3224_ == 0)
{
lean_object* v___x_3225_; lean_object* v___x_3226_; lean_object* v___x_3228_; 
lean_dec(v_x_3215_);
v___x_3225_ = lean_array_push(v_ks_3218_, v_x_3216_);
v___x_3226_ = lean_array_push(v_vs_3219_, v_x_3217_);
if (v_isShared_3222_ == 0)
{
lean_ctor_set(v___x_3221_, 1, v___x_3226_);
lean_ctor_set(v___x_3221_, 0, v___x_3225_);
v___x_3228_ = v___x_3221_;
goto v_reusejp_3227_;
}
else
{
lean_object* v_reuseFailAlloc_3229_; 
v_reuseFailAlloc_3229_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_3229_, 0, v___x_3225_);
lean_ctor_set(v_reuseFailAlloc_3229_, 1, v___x_3226_);
v___x_3228_ = v_reuseFailAlloc_3229_;
goto v_reusejp_3227_;
}
v_reusejp_3227_:
{
return v___x_3228_;
}
}
else
{
lean_object* v_k_x27_3230_; uint8_t v___x_3231_; 
v_k_x27_3230_ = lean_array_fget_borrowed(v_ks_3218_, v_x_3215_);
v___x_3231_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v_x_3216_, v_k_x27_3230_);
if (v___x_3231_ == 0)
{
lean_object* v___x_3233_; 
if (v_isShared_3222_ == 0)
{
v___x_3233_ = v___x_3221_;
goto v_reusejp_3232_;
}
else
{
lean_object* v_reuseFailAlloc_3237_; 
v_reuseFailAlloc_3237_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_3237_, 0, v_ks_3218_);
lean_ctor_set(v_reuseFailAlloc_3237_, 1, v_vs_3219_);
v___x_3233_ = v_reuseFailAlloc_3237_;
goto v_reusejp_3232_;
}
v_reusejp_3232_:
{
lean_object* v___x_3234_; lean_object* v___x_3235_; 
v___x_3234_ = lean_unsigned_to_nat(1u);
v___x_3235_ = lean_nat_add(v_x_3215_, v___x_3234_);
lean_dec(v_x_3215_);
v_x_3214_ = v___x_3233_;
v_x_3215_ = v___x_3235_;
goto _start;
}
}
else
{
lean_object* v___x_3238_; lean_object* v___x_3239_; lean_object* v___x_3241_; 
v___x_3238_ = lean_array_fset(v_ks_3218_, v_x_3215_, v_x_3216_);
v___x_3239_ = lean_array_fset(v_vs_3219_, v_x_3215_, v_x_3217_);
lean_dec(v_x_3215_);
if (v_isShared_3222_ == 0)
{
lean_ctor_set(v___x_3221_, 1, v___x_3239_);
lean_ctor_set(v___x_3221_, 0, v___x_3238_);
v___x_3241_ = v___x_3221_;
goto v_reusejp_3240_;
}
else
{
lean_object* v_reuseFailAlloc_3242_; 
v_reuseFailAlloc_3242_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_3242_, 0, v___x_3238_);
lean_ctor_set(v_reuseFailAlloc_3242_, 1, v___x_3239_);
v___x_3241_ = v_reuseFailAlloc_3242_;
goto v_reusejp_3240_;
}
v_reusejp_3240_:
{
return v___x_3241_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16___redArg(lean_object* v_n_3244_, lean_object* v_k_3245_, lean_object* v_v_3246_){
_start:
{
lean_object* v___x_3247_; lean_object* v___x_3248_; 
v___x_3247_ = lean_unsigned_to_nat(0u);
v___x_3248_ = l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16_spec__24___redArg(v_n_3244_, v___x_3247_, v_k_3245_, v_v_3246_);
return v___x_3248_;
}
}
static lean_object* _init_l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg___closed__0(void){
_start:
{
lean_object* v___x_3249_; 
v___x_3249_ = l_Lean_PersistentHashMap_mkEmptyEntries(lean_box(0), lean_box(0));
return v___x_3249_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg(lean_object* v_x_3250_, size_t v_x_3251_, size_t v_x_3252_, lean_object* v_x_3253_, lean_object* v_x_3254_){
_start:
{
if (lean_obj_tag(v_x_3250_) == 0)
{
lean_object* v_es_3255_; size_t v___x_3256_; size_t v___x_3257_; size_t v___x_3258_; size_t v___x_3259_; lean_object* v_j_3260_; lean_object* v___x_3261_; uint8_t v___x_3262_; 
v_es_3255_ = lean_ctor_get(v_x_3250_, 0);
v___x_3256_ = ((size_t)5ULL);
v___x_3257_ = ((size_t)1ULL);
v___x_3258_ = lean_usize_once(&l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__1, &l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__1_once, _init_l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg___closed__1);
v___x_3259_ = lean_usize_land(v_x_3251_, v___x_3258_);
v_j_3260_ = lean_usize_to_nat(v___x_3259_);
v___x_3261_ = lean_array_get_size(v_es_3255_);
v___x_3262_ = lean_nat_dec_lt(v_j_3260_, v___x_3261_);
if (v___x_3262_ == 0)
{
lean_dec(v_j_3260_);
lean_dec(v_x_3254_);
lean_dec_ref(v_x_3253_);
return v_x_3250_;
}
else
{
lean_object* v___x_3264_; uint8_t v_isShared_3265_; uint8_t v_isSharedCheck_3299_; 
lean_inc_ref(v_es_3255_);
v_isSharedCheck_3299_ = !lean_is_exclusive(v_x_3250_);
if (v_isSharedCheck_3299_ == 0)
{
lean_object* v_unused_3300_; 
v_unused_3300_ = lean_ctor_get(v_x_3250_, 0);
lean_dec(v_unused_3300_);
v___x_3264_ = v_x_3250_;
v_isShared_3265_ = v_isSharedCheck_3299_;
goto v_resetjp_3263_;
}
else
{
lean_dec(v_x_3250_);
v___x_3264_ = lean_box(0);
v_isShared_3265_ = v_isSharedCheck_3299_;
goto v_resetjp_3263_;
}
v_resetjp_3263_:
{
lean_object* v_v_3266_; lean_object* v___x_3267_; lean_object* v_xs_x27_3268_; lean_object* v___y_3270_; 
v_v_3266_ = lean_array_fget(v_es_3255_, v_j_3260_);
v___x_3267_ = lean_box(0);
v_xs_x27_3268_ = lean_array_fset(v_es_3255_, v_j_3260_, v___x_3267_);
switch(lean_obj_tag(v_v_3266_))
{
case 0:
{
lean_object* v_key_3275_; lean_object* v_val_3276_; lean_object* v___x_3278_; uint8_t v_isShared_3279_; uint8_t v_isSharedCheck_3286_; 
v_key_3275_ = lean_ctor_get(v_v_3266_, 0);
v_val_3276_ = lean_ctor_get(v_v_3266_, 1);
v_isSharedCheck_3286_ = !lean_is_exclusive(v_v_3266_);
if (v_isSharedCheck_3286_ == 0)
{
v___x_3278_ = v_v_3266_;
v_isShared_3279_ = v_isSharedCheck_3286_;
goto v_resetjp_3277_;
}
else
{
lean_inc(v_val_3276_);
lean_inc(v_key_3275_);
lean_dec(v_v_3266_);
v___x_3278_ = lean_box(0);
v_isShared_3279_ = v_isSharedCheck_3286_;
goto v_resetjp_3277_;
}
v_resetjp_3277_:
{
uint8_t v___x_3280_; 
v___x_3280_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v_x_3253_, v_key_3275_);
if (v___x_3280_ == 0)
{
lean_object* v___x_3281_; lean_object* v___x_3282_; 
lean_del_object(v___x_3278_);
v___x_3281_ = l_Lean_PersistentHashMap_mkCollisionNode___redArg(v_key_3275_, v_val_3276_, v_x_3253_, v_x_3254_);
v___x_3282_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_3282_, 0, v___x_3281_);
v___y_3270_ = v___x_3282_;
goto v___jp_3269_;
}
else
{
lean_object* v___x_3284_; 
lean_dec(v_val_3276_);
lean_dec(v_key_3275_);
if (v_isShared_3279_ == 0)
{
lean_ctor_set(v___x_3278_, 1, v_x_3254_);
lean_ctor_set(v___x_3278_, 0, v_x_3253_);
v___x_3284_ = v___x_3278_;
goto v_reusejp_3283_;
}
else
{
lean_object* v_reuseFailAlloc_3285_; 
v_reuseFailAlloc_3285_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_3285_, 0, v_x_3253_);
lean_ctor_set(v_reuseFailAlloc_3285_, 1, v_x_3254_);
v___x_3284_ = v_reuseFailAlloc_3285_;
goto v_reusejp_3283_;
}
v_reusejp_3283_:
{
v___y_3270_ = v___x_3284_;
goto v___jp_3269_;
}
}
}
}
case 1:
{
lean_object* v_node_3287_; lean_object* v___x_3289_; uint8_t v_isShared_3290_; uint8_t v_isSharedCheck_3297_; 
v_node_3287_ = lean_ctor_get(v_v_3266_, 0);
v_isSharedCheck_3297_ = !lean_is_exclusive(v_v_3266_);
if (v_isSharedCheck_3297_ == 0)
{
v___x_3289_ = v_v_3266_;
v_isShared_3290_ = v_isSharedCheck_3297_;
goto v_resetjp_3288_;
}
else
{
lean_inc(v_node_3287_);
lean_dec(v_v_3266_);
v___x_3289_ = lean_box(0);
v_isShared_3290_ = v_isSharedCheck_3297_;
goto v_resetjp_3288_;
}
v_resetjp_3288_:
{
size_t v___x_3291_; size_t v___x_3292_; lean_object* v___x_3293_; lean_object* v___x_3295_; 
v___x_3291_ = lean_usize_shift_right(v_x_3251_, v___x_3256_);
v___x_3292_ = lean_usize_add(v_x_3252_, v___x_3257_);
v___x_3293_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg(v_node_3287_, v___x_3291_, v___x_3292_, v_x_3253_, v_x_3254_);
if (v_isShared_3290_ == 0)
{
lean_ctor_set(v___x_3289_, 0, v___x_3293_);
v___x_3295_ = v___x_3289_;
goto v_reusejp_3294_;
}
else
{
lean_object* v_reuseFailAlloc_3296_; 
v_reuseFailAlloc_3296_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3296_, 0, v___x_3293_);
v___x_3295_ = v_reuseFailAlloc_3296_;
goto v_reusejp_3294_;
}
v_reusejp_3294_:
{
v___y_3270_ = v___x_3295_;
goto v___jp_3269_;
}
}
}
default: 
{
lean_object* v___x_3298_; 
v___x_3298_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_3298_, 0, v_x_3253_);
lean_ctor_set(v___x_3298_, 1, v_x_3254_);
v___y_3270_ = v___x_3298_;
goto v___jp_3269_;
}
}
v___jp_3269_:
{
lean_object* v___x_3271_; lean_object* v___x_3273_; 
v___x_3271_ = lean_array_fset(v_xs_x27_3268_, v_j_3260_, v___y_3270_);
lean_dec(v_j_3260_);
if (v_isShared_3265_ == 0)
{
lean_ctor_set(v___x_3264_, 0, v___x_3271_);
v___x_3273_ = v___x_3264_;
goto v_reusejp_3272_;
}
else
{
lean_object* v_reuseFailAlloc_3274_; 
v_reuseFailAlloc_3274_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3274_, 0, v___x_3271_);
v___x_3273_ = v_reuseFailAlloc_3274_;
goto v_reusejp_3272_;
}
v_reusejp_3272_:
{
return v___x_3273_;
}
}
}
}
}
else
{
lean_object* v_ks_3301_; lean_object* v_vs_3302_; lean_object* v___x_3304_; uint8_t v_isShared_3305_; uint8_t v_isSharedCheck_3322_; 
v_ks_3301_ = lean_ctor_get(v_x_3250_, 0);
v_vs_3302_ = lean_ctor_get(v_x_3250_, 1);
v_isSharedCheck_3322_ = !lean_is_exclusive(v_x_3250_);
if (v_isSharedCheck_3322_ == 0)
{
v___x_3304_ = v_x_3250_;
v_isShared_3305_ = v_isSharedCheck_3322_;
goto v_resetjp_3303_;
}
else
{
lean_inc(v_vs_3302_);
lean_inc(v_ks_3301_);
lean_dec(v_x_3250_);
v___x_3304_ = lean_box(0);
v_isShared_3305_ = v_isSharedCheck_3322_;
goto v_resetjp_3303_;
}
v_resetjp_3303_:
{
lean_object* v___x_3307_; 
if (v_isShared_3305_ == 0)
{
v___x_3307_ = v___x_3304_;
goto v_reusejp_3306_;
}
else
{
lean_object* v_reuseFailAlloc_3321_; 
v_reuseFailAlloc_3321_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_3321_, 0, v_ks_3301_);
lean_ctor_set(v_reuseFailAlloc_3321_, 1, v_vs_3302_);
v___x_3307_ = v_reuseFailAlloc_3321_;
goto v_reusejp_3306_;
}
v_reusejp_3306_:
{
lean_object* v_newNode_3308_; uint8_t v___y_3310_; size_t v___x_3316_; uint8_t v___x_3317_; 
v_newNode_3308_ = l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16___redArg(v___x_3307_, v_x_3253_, v_x_3254_);
v___x_3316_ = ((size_t)7ULL);
v___x_3317_ = lean_usize_dec_le(v___x_3316_, v_x_3252_);
if (v___x_3317_ == 0)
{
lean_object* v___x_3318_; lean_object* v___x_3319_; uint8_t v___x_3320_; 
v___x_3318_ = l_Lean_PersistentHashMap_getCollisionNodeSize___redArg(v_newNode_3308_);
v___x_3319_ = lean_unsigned_to_nat(4u);
v___x_3320_ = lean_nat_dec_lt(v___x_3318_, v___x_3319_);
lean_dec(v___x_3318_);
v___y_3310_ = v___x_3320_;
goto v___jp_3309_;
}
else
{
v___y_3310_ = v___x_3317_;
goto v___jp_3309_;
}
v___jp_3309_:
{
if (v___y_3310_ == 0)
{
lean_object* v_ks_3311_; lean_object* v_vs_3312_; lean_object* v___x_3313_; lean_object* v___x_3314_; lean_object* v___x_3315_; 
v_ks_3311_ = lean_ctor_get(v_newNode_3308_, 0);
lean_inc_ref(v_ks_3311_);
v_vs_3312_ = lean_ctor_get(v_newNode_3308_, 1);
lean_inc_ref(v_vs_3312_);
lean_dec_ref(v_newNode_3308_);
v___x_3313_ = lean_unsigned_to_nat(0u);
v___x_3314_ = lean_obj_once(&l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg___closed__0, &l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg___closed__0_once, _init_l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg___closed__0);
v___x_3315_ = l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17___redArg(v_x_3252_, v_ks_3311_, v_vs_3312_, v___x_3313_, v___x_3314_);
lean_dec_ref(v_vs_3312_);
lean_dec_ref(v_ks_3311_);
return v___x_3315_;
}
else
{
return v_newNode_3308_;
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17___redArg(size_t v_depth_3323_, lean_object* v_keys_3324_, lean_object* v_vals_3325_, lean_object* v_i_3326_, lean_object* v_entries_3327_){
_start:
{
lean_object* v___x_3328_; uint8_t v___x_3329_; 
v___x_3328_ = lean_array_get_size(v_keys_3324_);
v___x_3329_ = lean_nat_dec_lt(v_i_3326_, v___x_3328_);
if (v___x_3329_ == 0)
{
lean_dec(v_i_3326_);
return v_entries_3327_;
}
else
{
lean_object* v_k_3330_; lean_object* v_v_3331_; uint64_t v___x_3332_; size_t v_h_3333_; size_t v___x_3334_; lean_object* v___x_3335_; size_t v___x_3336_; size_t v___x_3337_; size_t v___x_3338_; size_t v_h_3339_; lean_object* v___x_3340_; lean_object* v___x_3341_; 
v_k_3330_ = lean_array_fget_borrowed(v_keys_3324_, v_i_3326_);
v_v_3331_ = lean_array_fget_borrowed(v_vals_3325_, v_i_3326_);
v___x_3332_ = l_Lean_Meta_Sym_hashPtrExpr_unsafe__1(v_k_3330_);
v_h_3333_ = lean_uint64_to_usize(v___x_3332_);
v___x_3334_ = ((size_t)5ULL);
v___x_3335_ = lean_unsigned_to_nat(1u);
v___x_3336_ = ((size_t)1ULL);
v___x_3337_ = lean_usize_sub(v_depth_3323_, v___x_3336_);
v___x_3338_ = lean_usize_mul(v___x_3334_, v___x_3337_);
v_h_3339_ = lean_usize_shift_right(v_h_3333_, v___x_3338_);
v___x_3340_ = lean_nat_add(v_i_3326_, v___x_3335_);
lean_dec(v_i_3326_);
lean_inc(v_v_3331_);
lean_inc(v_k_3330_);
v___x_3341_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg(v_entries_3327_, v_h_3339_, v_depth_3323_, v_k_3330_, v_v_3331_);
v_i_3326_ = v___x_3340_;
v_entries_3327_ = v___x_3341_;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17___redArg___boxed(lean_object* v_depth_3343_, lean_object* v_keys_3344_, lean_object* v_vals_3345_, lean_object* v_i_3346_, lean_object* v_entries_3347_){
_start:
{
size_t v_depth_boxed_3348_; lean_object* v_res_3349_; 
v_depth_boxed_3348_ = lean_unbox_usize(v_depth_3343_);
lean_dec(v_depth_3343_);
v_res_3349_ = l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17___redArg(v_depth_boxed_3348_, v_keys_3344_, v_vals_3345_, v_i_3346_, v_entries_3347_);
lean_dec_ref(v_vals_3345_);
lean_dec_ref(v_keys_3344_);
return v_res_3349_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg___boxed(lean_object* v_x_3350_, lean_object* v_x_3351_, lean_object* v_x_3352_, lean_object* v_x_3353_, lean_object* v_x_3354_){
_start:
{
size_t v_x_134317__boxed_3355_; size_t v_x_134318__boxed_3356_; lean_object* v_res_3357_; 
v_x_134317__boxed_3355_ = lean_unbox_usize(v_x_3351_);
lean_dec(v_x_3351_);
v_x_134318__boxed_3356_ = lean_unbox_usize(v_x_3352_);
lean_dec(v_x_3352_);
v_res_3357_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg(v_x_3350_, v_x_134317__boxed_3355_, v_x_134318__boxed_3356_, v_x_3353_, v_x_3354_);
return v_res_3357_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2___redArg(lean_object* v_x_3358_, lean_object* v_x_3359_, lean_object* v_x_3360_){
_start:
{
uint64_t v___x_3361_; size_t v___x_3362_; size_t v___x_3363_; lean_object* v___x_3364_; 
v___x_3361_ = l_Lean_Meta_Sym_hashPtrExpr_unsafe__1(v_x_3359_);
v___x_3362_ = lean_uint64_to_usize(v___x_3361_);
v___x_3363_ = ((size_t)1ULL);
v___x_3364_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg(v_x_3358_, v___x_3362_, v___x_3363_, v_x_3359_, v_x_3360_);
return v___x_3364_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0___lam__0(lean_object* v_e_3365_, lean_object* v_size_3366_, lean_object* v_s_3367_){
_start:
{
lean_object* v_toRing_3368_; lean_object* v_invFn_x3f_3369_; lean_object* v_semiringId_x3f_3370_; lean_object* v_commSemiringInst_3371_; lean_object* v_commRingInst_3372_; lean_object* v_noZeroDivInst_x3f_3373_; lean_object* v_fieldInst_x3f_3374_; lean_object* v_denoteEntries_3375_; lean_object* v_nextId_3376_; lean_object* v_steps_3377_; lean_object* v_queue_3378_; lean_object* v_basis_3379_; lean_object* v_diseqs_3380_; uint8_t v_recheck_3381_; lean_object* v_invSet_3382_; lean_object* v_numEq0_x3f_3383_; uint8_t v_numEq0Updated_3384_; lean_object* v___x_3386_; uint8_t v_isShared_3387_; uint8_t v_isSharedCheck_3417_; 
v_toRing_3368_ = lean_ctor_get(v_s_3367_, 0);
v_invFn_x3f_3369_ = lean_ctor_get(v_s_3367_, 1);
v_semiringId_x3f_3370_ = lean_ctor_get(v_s_3367_, 2);
v_commSemiringInst_3371_ = lean_ctor_get(v_s_3367_, 3);
v_commRingInst_3372_ = lean_ctor_get(v_s_3367_, 4);
v_noZeroDivInst_x3f_3373_ = lean_ctor_get(v_s_3367_, 5);
v_fieldInst_x3f_3374_ = lean_ctor_get(v_s_3367_, 6);
v_denoteEntries_3375_ = lean_ctor_get(v_s_3367_, 7);
v_nextId_3376_ = lean_ctor_get(v_s_3367_, 8);
v_steps_3377_ = lean_ctor_get(v_s_3367_, 9);
v_queue_3378_ = lean_ctor_get(v_s_3367_, 10);
v_basis_3379_ = lean_ctor_get(v_s_3367_, 11);
v_diseqs_3380_ = lean_ctor_get(v_s_3367_, 12);
v_recheck_3381_ = lean_ctor_get_uint8(v_s_3367_, sizeof(void*)*15);
v_invSet_3382_ = lean_ctor_get(v_s_3367_, 13);
v_numEq0_x3f_3383_ = lean_ctor_get(v_s_3367_, 14);
v_numEq0Updated_3384_ = lean_ctor_get_uint8(v_s_3367_, sizeof(void*)*15 + 1);
v_isSharedCheck_3417_ = !lean_is_exclusive(v_s_3367_);
if (v_isSharedCheck_3417_ == 0)
{
v___x_3386_ = v_s_3367_;
v_isShared_3387_ = v_isSharedCheck_3417_;
goto v_resetjp_3385_;
}
else
{
lean_inc(v_numEq0_x3f_3383_);
lean_inc(v_invSet_3382_);
lean_inc(v_diseqs_3380_);
lean_inc(v_basis_3379_);
lean_inc(v_queue_3378_);
lean_inc(v_steps_3377_);
lean_inc(v_nextId_3376_);
lean_inc(v_denoteEntries_3375_);
lean_inc(v_fieldInst_x3f_3374_);
lean_inc(v_noZeroDivInst_x3f_3373_);
lean_inc(v_commRingInst_3372_);
lean_inc(v_commSemiringInst_3371_);
lean_inc(v_semiringId_x3f_3370_);
lean_inc(v_invFn_x3f_3369_);
lean_inc(v_toRing_3368_);
lean_dec(v_s_3367_);
v___x_3386_ = lean_box(0);
v_isShared_3387_ = v_isSharedCheck_3417_;
goto v_resetjp_3385_;
}
v_resetjp_3385_:
{
lean_object* v_id_3388_; lean_object* v_type_3389_; lean_object* v_u_3390_; lean_object* v_ringInst_3391_; lean_object* v_semiringInst_3392_; lean_object* v_charInst_x3f_3393_; lean_object* v_addFn_x3f_3394_; lean_object* v_mulFn_x3f_3395_; lean_object* v_subFn_x3f_3396_; lean_object* v_negFn_x3f_3397_; lean_object* v_powFn_x3f_3398_; lean_object* v_intCastFn_x3f_3399_; lean_object* v_natCastFn_x3f_3400_; lean_object* v_one_x3f_3401_; lean_object* v_vars_3402_; lean_object* v_varMap_3403_; lean_object* v_denote_3404_; lean_object* v___x_3406_; uint8_t v_isShared_3407_; uint8_t v_isSharedCheck_3416_; 
v_id_3388_ = lean_ctor_get(v_toRing_3368_, 0);
v_type_3389_ = lean_ctor_get(v_toRing_3368_, 1);
v_u_3390_ = lean_ctor_get(v_toRing_3368_, 2);
v_ringInst_3391_ = lean_ctor_get(v_toRing_3368_, 3);
v_semiringInst_3392_ = lean_ctor_get(v_toRing_3368_, 4);
v_charInst_x3f_3393_ = lean_ctor_get(v_toRing_3368_, 5);
v_addFn_x3f_3394_ = lean_ctor_get(v_toRing_3368_, 6);
v_mulFn_x3f_3395_ = lean_ctor_get(v_toRing_3368_, 7);
v_subFn_x3f_3396_ = lean_ctor_get(v_toRing_3368_, 8);
v_negFn_x3f_3397_ = lean_ctor_get(v_toRing_3368_, 9);
v_powFn_x3f_3398_ = lean_ctor_get(v_toRing_3368_, 10);
v_intCastFn_x3f_3399_ = lean_ctor_get(v_toRing_3368_, 11);
v_natCastFn_x3f_3400_ = lean_ctor_get(v_toRing_3368_, 12);
v_one_x3f_3401_ = lean_ctor_get(v_toRing_3368_, 13);
v_vars_3402_ = lean_ctor_get(v_toRing_3368_, 14);
v_varMap_3403_ = lean_ctor_get(v_toRing_3368_, 15);
v_denote_3404_ = lean_ctor_get(v_toRing_3368_, 16);
v_isSharedCheck_3416_ = !lean_is_exclusive(v_toRing_3368_);
if (v_isSharedCheck_3416_ == 0)
{
v___x_3406_ = v_toRing_3368_;
v_isShared_3407_ = v_isSharedCheck_3416_;
goto v_resetjp_3405_;
}
else
{
lean_inc(v_denote_3404_);
lean_inc(v_varMap_3403_);
lean_inc(v_vars_3402_);
lean_inc(v_one_x3f_3401_);
lean_inc(v_natCastFn_x3f_3400_);
lean_inc(v_intCastFn_x3f_3399_);
lean_inc(v_powFn_x3f_3398_);
lean_inc(v_negFn_x3f_3397_);
lean_inc(v_subFn_x3f_3396_);
lean_inc(v_mulFn_x3f_3395_);
lean_inc(v_addFn_x3f_3394_);
lean_inc(v_charInst_x3f_3393_);
lean_inc(v_semiringInst_3392_);
lean_inc(v_ringInst_3391_);
lean_inc(v_u_3390_);
lean_inc(v_type_3389_);
lean_inc(v_id_3388_);
lean_dec(v_toRing_3368_);
v___x_3406_ = lean_box(0);
v_isShared_3407_ = v_isSharedCheck_3416_;
goto v_resetjp_3405_;
}
v_resetjp_3405_:
{
lean_object* v___x_3408_; lean_object* v___x_3409_; lean_object* v___x_3411_; 
lean_inc_ref(v_e_3365_);
v___x_3408_ = l_Lean_PersistentArray_push___redArg(v_vars_3402_, v_e_3365_);
v___x_3409_ = l_Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2___redArg(v_varMap_3403_, v_e_3365_, v_size_3366_);
if (v_isShared_3407_ == 0)
{
lean_ctor_set(v___x_3406_, 15, v___x_3409_);
lean_ctor_set(v___x_3406_, 14, v___x_3408_);
v___x_3411_ = v___x_3406_;
goto v_reusejp_3410_;
}
else
{
lean_object* v_reuseFailAlloc_3415_; 
v_reuseFailAlloc_3415_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_3415_, 0, v_id_3388_);
lean_ctor_set(v_reuseFailAlloc_3415_, 1, v_type_3389_);
lean_ctor_set(v_reuseFailAlloc_3415_, 2, v_u_3390_);
lean_ctor_set(v_reuseFailAlloc_3415_, 3, v_ringInst_3391_);
lean_ctor_set(v_reuseFailAlloc_3415_, 4, v_semiringInst_3392_);
lean_ctor_set(v_reuseFailAlloc_3415_, 5, v_charInst_x3f_3393_);
lean_ctor_set(v_reuseFailAlloc_3415_, 6, v_addFn_x3f_3394_);
lean_ctor_set(v_reuseFailAlloc_3415_, 7, v_mulFn_x3f_3395_);
lean_ctor_set(v_reuseFailAlloc_3415_, 8, v_subFn_x3f_3396_);
lean_ctor_set(v_reuseFailAlloc_3415_, 9, v_negFn_x3f_3397_);
lean_ctor_set(v_reuseFailAlloc_3415_, 10, v_powFn_x3f_3398_);
lean_ctor_set(v_reuseFailAlloc_3415_, 11, v_intCastFn_x3f_3399_);
lean_ctor_set(v_reuseFailAlloc_3415_, 12, v_natCastFn_x3f_3400_);
lean_ctor_set(v_reuseFailAlloc_3415_, 13, v_one_x3f_3401_);
lean_ctor_set(v_reuseFailAlloc_3415_, 14, v___x_3408_);
lean_ctor_set(v_reuseFailAlloc_3415_, 15, v___x_3409_);
lean_ctor_set(v_reuseFailAlloc_3415_, 16, v_denote_3404_);
v___x_3411_ = v_reuseFailAlloc_3415_;
goto v_reusejp_3410_;
}
v_reusejp_3410_:
{
lean_object* v___x_3413_; 
if (v_isShared_3387_ == 0)
{
lean_ctor_set(v___x_3386_, 0, v___x_3411_);
v___x_3413_ = v___x_3386_;
goto v_reusejp_3412_;
}
else
{
lean_object* v_reuseFailAlloc_3414_; 
v_reuseFailAlloc_3414_ = lean_alloc_ctor(0, 15, 2);
lean_ctor_set(v_reuseFailAlloc_3414_, 0, v___x_3411_);
lean_ctor_set(v_reuseFailAlloc_3414_, 1, v_invFn_x3f_3369_);
lean_ctor_set(v_reuseFailAlloc_3414_, 2, v_semiringId_x3f_3370_);
lean_ctor_set(v_reuseFailAlloc_3414_, 3, v_commSemiringInst_3371_);
lean_ctor_set(v_reuseFailAlloc_3414_, 4, v_commRingInst_3372_);
lean_ctor_set(v_reuseFailAlloc_3414_, 5, v_noZeroDivInst_x3f_3373_);
lean_ctor_set(v_reuseFailAlloc_3414_, 6, v_fieldInst_x3f_3374_);
lean_ctor_set(v_reuseFailAlloc_3414_, 7, v_denoteEntries_3375_);
lean_ctor_set(v_reuseFailAlloc_3414_, 8, v_nextId_3376_);
lean_ctor_set(v_reuseFailAlloc_3414_, 9, v_steps_3377_);
lean_ctor_set(v_reuseFailAlloc_3414_, 10, v_queue_3378_);
lean_ctor_set(v_reuseFailAlloc_3414_, 11, v_basis_3379_);
lean_ctor_set(v_reuseFailAlloc_3414_, 12, v_diseqs_3380_);
lean_ctor_set(v_reuseFailAlloc_3414_, 13, v_invSet_3382_);
lean_ctor_set(v_reuseFailAlloc_3414_, 14, v_numEq0_x3f_3383_);
lean_ctor_set_uint8(v_reuseFailAlloc_3414_, sizeof(void*)*15, v_recheck_3381_);
lean_ctor_set_uint8(v_reuseFailAlloc_3414_, sizeof(void*)*15 + 1, v_numEq0Updated_3384_);
v___x_3413_ = v_reuseFailAlloc_3414_;
goto v_reusejp_3412_;
}
v_reusejp_3412_:
{
return v___x_3413_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0(lean_object* v_e_3418_, lean_object* v___y_3419_, lean_object* v___y_3420_, lean_object* v___y_3421_, lean_object* v___y_3422_, lean_object* v___y_3423_, lean_object* v___y_3424_, lean_object* v___y_3425_, lean_object* v___y_3426_, lean_object* v___y_3427_, lean_object* v___y_3428_, lean_object* v___y_3429_){
_start:
{
lean_object* v___x_3431_; 
v___x_3431_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_getCommRing(v___y_3419_, v___y_3420_, v___y_3421_, v___y_3422_, v___y_3423_, v___y_3424_, v___y_3425_, v___y_3426_, v___y_3427_, v___y_3428_, v___y_3429_);
if (lean_obj_tag(v___x_3431_) == 0)
{
lean_object* v_a_3432_; lean_object* v___x_3434_; uint8_t v_isShared_3435_; uint8_t v_isSharedCheck_3482_; 
v_a_3432_ = lean_ctor_get(v___x_3431_, 0);
v_isSharedCheck_3482_ = !lean_is_exclusive(v___x_3431_);
if (v_isSharedCheck_3482_ == 0)
{
v___x_3434_ = v___x_3431_;
v_isShared_3435_ = v_isSharedCheck_3482_;
goto v_resetjp_3433_;
}
else
{
lean_inc(v_a_3432_);
lean_dec(v___x_3431_);
v___x_3434_ = lean_box(0);
v_isShared_3435_ = v_isSharedCheck_3482_;
goto v_resetjp_3433_;
}
v_resetjp_3433_:
{
lean_object* v_toRing_3436_; lean_object* v_vars_3437_; lean_object* v_varMap_3438_; lean_object* v___x_3439_; 
v_toRing_3436_ = lean_ctor_get(v_a_3432_, 0);
lean_inc_ref(v_toRing_3436_);
lean_dec(v_a_3432_);
v_vars_3437_ = lean_ctor_get(v_toRing_3436_, 14);
lean_inc_ref(v_vars_3437_);
v_varMap_3438_ = lean_ctor_get(v_toRing_3436_, 15);
lean_inc_ref(v_varMap_3438_);
lean_dec_ref(v_toRing_3436_);
v___x_3439_ = l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___redArg(v_varMap_3438_, v_e_3418_);
if (lean_obj_tag(v___x_3439_) == 1)
{
lean_object* v_val_3440_; lean_object* v___x_3442_; 
lean_dec_ref(v_vars_3437_);
lean_dec(v___y_3429_);
lean_dec_ref(v___y_3428_);
lean_dec(v___y_3427_);
lean_dec_ref(v___y_3426_);
lean_dec(v___y_3425_);
lean_dec_ref(v___y_3424_);
lean_dec(v___y_3423_);
lean_dec_ref(v___y_3422_);
lean_dec(v___y_3421_);
lean_dec(v___y_3420_);
lean_dec_ref(v___y_3419_);
lean_dec_ref(v_e_3418_);
v_val_3440_ = lean_ctor_get(v___x_3439_, 0);
lean_inc(v_val_3440_);
lean_dec_ref(v___x_3439_);
if (v_isShared_3435_ == 0)
{
lean_ctor_set(v___x_3434_, 0, v_val_3440_);
v___x_3442_ = v___x_3434_;
goto v_reusejp_3441_;
}
else
{
lean_object* v_reuseFailAlloc_3443_; 
v_reuseFailAlloc_3443_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3443_, 0, v_val_3440_);
v___x_3442_ = v_reuseFailAlloc_3443_;
goto v_reusejp_3441_;
}
v_reusejp_3441_:
{
return v___x_3442_;
}
}
else
{
lean_object* v_size_3444_; lean_object* v___f_3445_; lean_object* v___x_3446_; 
lean_dec(v___x_3439_);
lean_del_object(v___x_3434_);
v_size_3444_ = lean_ctor_get(v_vars_3437_, 2);
lean_inc(v_size_3444_);
lean_dec_ref(v_vars_3437_);
lean_inc(v_size_3444_);
lean_inc_ref(v_e_3418_);
v___f_3445_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0___lam__0), 3, 2);
lean_closure_set(v___f_3445_, 0, v_e_3418_);
lean_closure_set(v___f_3445_, 1, v_size_3444_);
lean_inc_ref(v___y_3419_);
v___x_3446_ = l_Lean_Meta_Grind_Arith_CommRing_RingM_modifyCommRing___redArg(v___f_3445_, v___y_3419_, v___y_3420_);
if (lean_obj_tag(v___x_3446_) == 0)
{
lean_object* v___x_3447_; 
lean_dec_ref(v___x_3446_);
lean_inc_ref(v_e_3418_);
v___x_3447_ = l_Lean_Meta_Grind_Arith_CommRing_setTermRingId(v_e_3418_, v___y_3419_, v___y_3420_, v___y_3421_, v___y_3422_, v___y_3423_, v___y_3424_, v___y_3425_, v___y_3426_, v___y_3427_, v___y_3428_, v___y_3429_);
if (lean_obj_tag(v___x_3447_) == 0)
{
lean_object* v___x_3448_; lean_object* v___x_3449_; 
lean_dec_ref(v___x_3447_);
v___x_3448_ = l_Lean_Meta_Grind_Arith_CommRing_ringExt;
v___x_3449_ = l_Lean_Meta_Grind_SolverExtension_markTerm___redArg(v___x_3448_, v_e_3418_, v___y_3420_, v___y_3421_, v___y_3422_, v___y_3423_, v___y_3424_, v___y_3425_, v___y_3426_, v___y_3427_, v___y_3428_, v___y_3429_);
if (lean_obj_tag(v___x_3449_) == 0)
{
lean_object* v___x_3451_; uint8_t v_isShared_3452_; uint8_t v_isSharedCheck_3456_; 
v_isSharedCheck_3456_ = !lean_is_exclusive(v___x_3449_);
if (v_isSharedCheck_3456_ == 0)
{
lean_object* v_unused_3457_; 
v_unused_3457_ = lean_ctor_get(v___x_3449_, 0);
lean_dec(v_unused_3457_);
v___x_3451_ = v___x_3449_;
v_isShared_3452_ = v_isSharedCheck_3456_;
goto v_resetjp_3450_;
}
else
{
lean_dec(v___x_3449_);
v___x_3451_ = lean_box(0);
v_isShared_3452_ = v_isSharedCheck_3456_;
goto v_resetjp_3450_;
}
v_resetjp_3450_:
{
lean_object* v___x_3454_; 
if (v_isShared_3452_ == 0)
{
lean_ctor_set(v___x_3451_, 0, v_size_3444_);
v___x_3454_ = v___x_3451_;
goto v_reusejp_3453_;
}
else
{
lean_object* v_reuseFailAlloc_3455_; 
v_reuseFailAlloc_3455_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3455_, 0, v_size_3444_);
v___x_3454_ = v_reuseFailAlloc_3455_;
goto v_reusejp_3453_;
}
v_reusejp_3453_:
{
return v___x_3454_;
}
}
}
else
{
lean_object* v_a_3458_; lean_object* v___x_3460_; uint8_t v_isShared_3461_; uint8_t v_isSharedCheck_3465_; 
lean_dec(v_size_3444_);
v_a_3458_ = lean_ctor_get(v___x_3449_, 0);
v_isSharedCheck_3465_ = !lean_is_exclusive(v___x_3449_);
if (v_isSharedCheck_3465_ == 0)
{
v___x_3460_ = v___x_3449_;
v_isShared_3461_ = v_isSharedCheck_3465_;
goto v_resetjp_3459_;
}
else
{
lean_inc(v_a_3458_);
lean_dec(v___x_3449_);
v___x_3460_ = lean_box(0);
v_isShared_3461_ = v_isSharedCheck_3465_;
goto v_resetjp_3459_;
}
v_resetjp_3459_:
{
lean_object* v___x_3463_; 
if (v_isShared_3461_ == 0)
{
v___x_3463_ = v___x_3460_;
goto v_reusejp_3462_;
}
else
{
lean_object* v_reuseFailAlloc_3464_; 
v_reuseFailAlloc_3464_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3464_, 0, v_a_3458_);
v___x_3463_ = v_reuseFailAlloc_3464_;
goto v_reusejp_3462_;
}
v_reusejp_3462_:
{
return v___x_3463_;
}
}
}
}
else
{
lean_object* v_a_3466_; lean_object* v___x_3468_; uint8_t v_isShared_3469_; uint8_t v_isSharedCheck_3473_; 
lean_dec(v_size_3444_);
lean_dec(v___y_3429_);
lean_dec_ref(v___y_3428_);
lean_dec(v___y_3427_);
lean_dec_ref(v___y_3426_);
lean_dec(v___y_3425_);
lean_dec_ref(v___y_3424_);
lean_dec(v___y_3423_);
lean_dec_ref(v___y_3422_);
lean_dec(v___y_3421_);
lean_dec(v___y_3420_);
lean_dec_ref(v_e_3418_);
v_a_3466_ = lean_ctor_get(v___x_3447_, 0);
v_isSharedCheck_3473_ = !lean_is_exclusive(v___x_3447_);
if (v_isSharedCheck_3473_ == 0)
{
v___x_3468_ = v___x_3447_;
v_isShared_3469_ = v_isSharedCheck_3473_;
goto v_resetjp_3467_;
}
else
{
lean_inc(v_a_3466_);
lean_dec(v___x_3447_);
v___x_3468_ = lean_box(0);
v_isShared_3469_ = v_isSharedCheck_3473_;
goto v_resetjp_3467_;
}
v_resetjp_3467_:
{
lean_object* v___x_3471_; 
if (v_isShared_3469_ == 0)
{
v___x_3471_ = v___x_3468_;
goto v_reusejp_3470_;
}
else
{
lean_object* v_reuseFailAlloc_3472_; 
v_reuseFailAlloc_3472_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3472_, 0, v_a_3466_);
v___x_3471_ = v_reuseFailAlloc_3472_;
goto v_reusejp_3470_;
}
v_reusejp_3470_:
{
return v___x_3471_;
}
}
}
}
else
{
lean_object* v_a_3474_; lean_object* v___x_3476_; uint8_t v_isShared_3477_; uint8_t v_isSharedCheck_3481_; 
lean_dec(v_size_3444_);
lean_dec(v___y_3429_);
lean_dec_ref(v___y_3428_);
lean_dec(v___y_3427_);
lean_dec_ref(v___y_3426_);
lean_dec(v___y_3425_);
lean_dec_ref(v___y_3424_);
lean_dec(v___y_3423_);
lean_dec_ref(v___y_3422_);
lean_dec(v___y_3421_);
lean_dec(v___y_3420_);
lean_dec_ref(v___y_3419_);
lean_dec_ref(v_e_3418_);
v_a_3474_ = lean_ctor_get(v___x_3446_, 0);
v_isSharedCheck_3481_ = !lean_is_exclusive(v___x_3446_);
if (v_isSharedCheck_3481_ == 0)
{
v___x_3476_ = v___x_3446_;
v_isShared_3477_ = v_isSharedCheck_3481_;
goto v_resetjp_3475_;
}
else
{
lean_inc(v_a_3474_);
lean_dec(v___x_3446_);
v___x_3476_ = lean_box(0);
v_isShared_3477_ = v_isSharedCheck_3481_;
goto v_resetjp_3475_;
}
v_resetjp_3475_:
{
lean_object* v___x_3479_; 
if (v_isShared_3477_ == 0)
{
v___x_3479_ = v___x_3476_;
goto v_reusejp_3478_;
}
else
{
lean_object* v_reuseFailAlloc_3480_; 
v_reuseFailAlloc_3480_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3480_, 0, v_a_3474_);
v___x_3479_ = v_reuseFailAlloc_3480_;
goto v_reusejp_3478_;
}
v_reusejp_3478_:
{
return v___x_3479_;
}
}
}
}
}
}
else
{
lean_object* v_a_3483_; lean_object* v___x_3485_; uint8_t v_isShared_3486_; uint8_t v_isSharedCheck_3490_; 
lean_dec(v___y_3429_);
lean_dec_ref(v___y_3428_);
lean_dec(v___y_3427_);
lean_dec_ref(v___y_3426_);
lean_dec(v___y_3425_);
lean_dec_ref(v___y_3424_);
lean_dec(v___y_3423_);
lean_dec_ref(v___y_3422_);
lean_dec(v___y_3421_);
lean_dec(v___y_3420_);
lean_dec_ref(v___y_3419_);
lean_dec_ref(v_e_3418_);
v_a_3483_ = lean_ctor_get(v___x_3431_, 0);
v_isSharedCheck_3490_ = !lean_is_exclusive(v___x_3431_);
if (v_isSharedCheck_3490_ == 0)
{
v___x_3485_ = v___x_3431_;
v_isShared_3486_ = v_isSharedCheck_3490_;
goto v_resetjp_3484_;
}
else
{
lean_inc(v_a_3483_);
lean_dec(v___x_3431_);
v___x_3485_ = lean_box(0);
v_isShared_3486_ = v_isSharedCheck_3490_;
goto v_resetjp_3484_;
}
v_resetjp_3484_:
{
lean_object* v___x_3488_; 
if (v_isShared_3486_ == 0)
{
v___x_3488_ = v___x_3485_;
goto v_reusejp_3487_;
}
else
{
lean_object* v_reuseFailAlloc_3489_; 
v_reuseFailAlloc_3489_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3489_, 0, v_a_3483_);
v___x_3488_ = v_reuseFailAlloc_3489_;
goto v_reusejp_3487_;
}
v_reusejp_3487_:
{
return v___x_3488_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0___boxed(lean_object* v_e_3491_, lean_object* v___y_3492_, lean_object* v___y_3493_, lean_object* v___y_3494_, lean_object* v___y_3495_, lean_object* v___y_3496_, lean_object* v___y_3497_, lean_object* v___y_3498_, lean_object* v___y_3499_, lean_object* v___y_3500_, lean_object* v___y_3501_, lean_object* v___y_3502_, lean_object* v___y_3503_){
_start:
{
lean_object* v_res_3504_; 
v_res_3504_ = l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0(v_e_3491_, v___y_3492_, v___y_3493_, v___y_3494_, v___y_3495_, v___y_3496_, v___y_3497_, v___y_3498_, v___y_3499_, v___y_3500_, v___y_3501_, v___y_3502_);
return v_res_3504_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__0(lean_object* v_gen_3505_, lean_object* v_e_3506_, lean_object* v___y_3507_, lean_object* v___y_3508_, lean_object* v___y_3509_, lean_object* v___y_3510_, lean_object* v___y_3511_, lean_object* v___y_3512_, lean_object* v___y_3513_, lean_object* v___y_3514_, lean_object* v___y_3515_, lean_object* v___y_3516_, lean_object* v___y_3517_){
_start:
{
lean_object* v___x_3519_; 
v___x_3519_ = l_Lean_Meta_Grind_alreadyInternalized___redArg(v_e_3506_, v___y_3508_);
if (lean_obj_tag(v___x_3519_) == 0)
{
lean_object* v_a_3520_; uint8_t v___x_3521_; 
v_a_3520_ = lean_ctor_get(v___x_3519_, 0);
lean_inc(v_a_3520_);
lean_dec_ref(v___x_3519_);
v___x_3521_ = lean_unbox(v_a_3520_);
lean_dec(v_a_3520_);
if (v___x_3521_ == 0)
{
lean_object* v___x_3522_; lean_object* v___x_3523_; 
v___x_3522_ = lean_box(0);
lean_inc(v___y_3517_);
lean_inc_ref(v___y_3516_);
lean_inc(v___y_3515_);
lean_inc_ref(v___y_3514_);
lean_inc(v___y_3513_);
lean_inc_ref(v___y_3512_);
lean_inc(v___y_3511_);
lean_inc_ref(v___y_3510_);
lean_inc(v___y_3509_);
lean_inc(v___y_3508_);
lean_inc_ref(v_e_3506_);
v___x_3523_ = lean_grind_internalize(v_e_3506_, v_gen_3505_, v___x_3522_, v___y_3508_, v___y_3509_, v___y_3510_, v___y_3511_, v___y_3512_, v___y_3513_, v___y_3514_, v___y_3515_, v___y_3516_, v___y_3517_);
if (lean_obj_tag(v___x_3523_) == 0)
{
lean_object* v___x_3524_; 
lean_dec_ref(v___x_3523_);
v___x_3524_ = l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0(v_e_3506_, v___y_3507_, v___y_3508_, v___y_3509_, v___y_3510_, v___y_3511_, v___y_3512_, v___y_3513_, v___y_3514_, v___y_3515_, v___y_3516_, v___y_3517_);
return v___x_3524_;
}
else
{
lean_object* v_a_3525_; lean_object* v___x_3527_; uint8_t v_isShared_3528_; uint8_t v_isSharedCheck_3532_; 
lean_dec(v___y_3517_);
lean_dec_ref(v___y_3516_);
lean_dec(v___y_3515_);
lean_dec_ref(v___y_3514_);
lean_dec(v___y_3513_);
lean_dec_ref(v___y_3512_);
lean_dec(v___y_3511_);
lean_dec_ref(v___y_3510_);
lean_dec(v___y_3509_);
lean_dec(v___y_3508_);
lean_dec_ref(v___y_3507_);
lean_dec_ref(v_e_3506_);
v_a_3525_ = lean_ctor_get(v___x_3523_, 0);
v_isSharedCheck_3532_ = !lean_is_exclusive(v___x_3523_);
if (v_isSharedCheck_3532_ == 0)
{
v___x_3527_ = v___x_3523_;
v_isShared_3528_ = v_isSharedCheck_3532_;
goto v_resetjp_3526_;
}
else
{
lean_inc(v_a_3525_);
lean_dec(v___x_3523_);
v___x_3527_ = lean_box(0);
v_isShared_3528_ = v_isSharedCheck_3532_;
goto v_resetjp_3526_;
}
v_resetjp_3526_:
{
lean_object* v___x_3530_; 
if (v_isShared_3528_ == 0)
{
v___x_3530_ = v___x_3527_;
goto v_reusejp_3529_;
}
else
{
lean_object* v_reuseFailAlloc_3531_; 
v_reuseFailAlloc_3531_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3531_, 0, v_a_3525_);
v___x_3530_ = v_reuseFailAlloc_3531_;
goto v_reusejp_3529_;
}
v_reusejp_3529_:
{
return v___x_3530_;
}
}
}
}
else
{
lean_object* v___x_3533_; 
lean_dec(v_gen_3505_);
v___x_3533_ = l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0(v_e_3506_, v___y_3507_, v___y_3508_, v___y_3509_, v___y_3510_, v___y_3511_, v___y_3512_, v___y_3513_, v___y_3514_, v___y_3515_, v___y_3516_, v___y_3517_);
return v___x_3533_;
}
}
else
{
lean_object* v_a_3534_; lean_object* v___x_3536_; uint8_t v_isShared_3537_; uint8_t v_isSharedCheck_3541_; 
lean_dec(v___y_3517_);
lean_dec_ref(v___y_3516_);
lean_dec(v___y_3515_);
lean_dec_ref(v___y_3514_);
lean_dec(v___y_3513_);
lean_dec_ref(v___y_3512_);
lean_dec(v___y_3511_);
lean_dec_ref(v___y_3510_);
lean_dec(v___y_3509_);
lean_dec(v___y_3508_);
lean_dec_ref(v___y_3507_);
lean_dec_ref(v_e_3506_);
lean_dec(v_gen_3505_);
v_a_3534_ = lean_ctor_get(v___x_3519_, 0);
v_isSharedCheck_3541_ = !lean_is_exclusive(v___x_3519_);
if (v_isSharedCheck_3541_ == 0)
{
v___x_3536_ = v___x_3519_;
v_isShared_3537_ = v_isSharedCheck_3541_;
goto v_resetjp_3535_;
}
else
{
lean_inc(v_a_3534_);
lean_dec(v___x_3519_);
v___x_3536_ = lean_box(0);
v_isShared_3537_ = v_isSharedCheck_3541_;
goto v_resetjp_3535_;
}
v_resetjp_3535_:
{
lean_object* v___x_3539_; 
if (v_isShared_3537_ == 0)
{
v___x_3539_ = v___x_3536_;
goto v_reusejp_3538_;
}
else
{
lean_object* v_reuseFailAlloc_3540_; 
v_reuseFailAlloc_3540_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3540_, 0, v_a_3534_);
v___x_3539_ = v_reuseFailAlloc_3540_;
goto v_reusejp_3538_;
}
v_reusejp_3538_:
{
return v___x_3539_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__0___boxed(lean_object* v_gen_3542_, lean_object* v_e_3543_, lean_object* v___y_3544_, lean_object* v___y_3545_, lean_object* v___y_3546_, lean_object* v___y_3547_, lean_object* v___y_3548_, lean_object* v___y_3549_, lean_object* v___y_3550_, lean_object* v___y_3551_, lean_object* v___y_3552_, lean_object* v___y_3553_, lean_object* v___y_3554_, lean_object* v___y_3555_){
_start:
{
lean_object* v_res_3556_; 
v_res_3556_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__0(v_gen_3542_, v_e_3543_, v___y_3544_, v___y_3545_, v___y_3546_, v___y_3547_, v___y_3548_, v___y_3549_, v___y_3550_, v___y_3551_, v___y_3552_, v___y_3553_, v___y_3554_);
return v_res_3556_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0(lean_object* v_e_3557_, uint8_t v_skipVar_3558_, lean_object* v_gen_3559_, lean_object* v___y_3560_, lean_object* v___y_3561_, lean_object* v___y_3562_, lean_object* v___y_3563_, lean_object* v___y_3564_, lean_object* v___y_3565_, lean_object* v___y_3566_, lean_object* v___y_3567_, lean_object* v___y_3568_, lean_object* v___y_3569_, lean_object* v___y_3570_){
_start:
{
lean_object* v___x_3572_; 
lean_inc_ref(v_e_3557_);
v___x_3572_ = l_Lean_Meta_instantiateMVarsIfMVarApp___redArg(v_e_3557_, v___y_3568_);
if (lean_obj_tag(v___x_3572_) == 0)
{
lean_object* v_a_3573_; lean_object* v___x_3575_; uint8_t v_isShared_3576_; uint8_t v_isSharedCheck_3967_; 
v_a_3573_ = lean_ctor_get(v___x_3572_, 0);
v_isSharedCheck_3967_ = !lean_is_exclusive(v___x_3572_);
if (v_isSharedCheck_3967_ == 0)
{
v___x_3575_ = v___x_3572_;
v_isShared_3576_ = v_isSharedCheck_3967_;
goto v_resetjp_3574_;
}
else
{
lean_inc(v_a_3573_);
lean_dec(v___x_3572_);
v___x_3575_ = lean_box(0);
v_isShared_3576_ = v_isSharedCheck_3967_;
goto v_resetjp_3574_;
}
v_resetjp_3574_:
{
lean_object* v_mkVar_3577_; lean_object* v_toVar_3578_; lean_object* v_e_3580_; lean_object* v___y_3581_; lean_object* v___y_3582_; lean_object* v___y_3583_; lean_object* v___y_3584_; lean_object* v___y_3585_; lean_object* v___y_3586_; lean_object* v___y_3587_; lean_object* v___y_3588_; lean_object* v___y_3589_; lean_object* v___y_3590_; lean_object* v___y_3591_; lean_object* v_e_3615_; lean_object* v___y_3616_; lean_object* v___y_3617_; lean_object* v___y_3618_; lean_object* v___y_3619_; lean_object* v___y_3620_; lean_object* v___y_3621_; lean_object* v___y_3622_; lean_object* v___y_3623_; lean_object* v___y_3624_; lean_object* v___y_3625_; lean_object* v___y_3626_; lean_object* v___x_3636_; uint8_t v___x_3637_; 
v_mkVar_3577_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__0___boxed), 14, 1);
lean_closure_set(v_mkVar_3577_, 0, v_gen_3559_);
lean_inc_ref(v_mkVar_3577_);
v_toVar_3578_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__1___boxed), 14, 1);
lean_closure_set(v_toVar_3578_, 0, v_mkVar_3577_);
v___x_3636_ = l_Lean_Expr_cleanupAnnotations(v_a_3573_);
v___x_3637_ = l_Lean_Expr_isApp(v___x_3636_);
if (v___x_3637_ == 0)
{
lean_dec_ref(v___x_3636_);
lean_dec_ref(v_toVar_3578_);
v_e_3580_ = v_e_3557_;
v___y_3581_ = v___y_3560_;
v___y_3582_ = v___y_3561_;
v___y_3583_ = v___y_3562_;
v___y_3584_ = v___y_3563_;
v___y_3585_ = v___y_3564_;
v___y_3586_ = v___y_3565_;
v___y_3587_ = v___y_3566_;
v___y_3588_ = v___y_3567_;
v___y_3589_ = v___y_3568_;
v___y_3590_ = v___y_3569_;
v___y_3591_ = v___y_3570_;
goto v___jp_3579_;
}
else
{
lean_object* v_arg_3638_; lean_object* v___x_3639_; uint8_t v___x_3640_; 
v_arg_3638_ = lean_ctor_get(v___x_3636_, 1);
lean_inc_ref(v_arg_3638_);
v___x_3639_ = l_Lean_Expr_appFnCleanup___redArg(v___x_3636_);
v___x_3640_ = l_Lean_Expr_isApp(v___x_3639_);
if (v___x_3640_ == 0)
{
lean_dec_ref(v___x_3639_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
v_e_3580_ = v_e_3557_;
v___y_3581_ = v___y_3560_;
v___y_3582_ = v___y_3561_;
v___y_3583_ = v___y_3562_;
v___y_3584_ = v___y_3563_;
v___y_3585_ = v___y_3564_;
v___y_3586_ = v___y_3565_;
v___y_3587_ = v___y_3566_;
v___y_3588_ = v___y_3567_;
v___y_3589_ = v___y_3568_;
v___y_3590_ = v___y_3569_;
v___y_3591_ = v___y_3570_;
goto v___jp_3579_;
}
else
{
lean_object* v_arg_3641_; lean_object* v___x_3642_; uint8_t v___x_3643_; 
v_arg_3641_ = lean_ctor_get(v___x_3639_, 1);
lean_inc_ref(v_arg_3641_);
v___x_3642_ = l_Lean_Expr_appFnCleanup___redArg(v___x_3639_);
v___x_3643_ = l_Lean_Expr_isApp(v___x_3642_);
if (v___x_3643_ == 0)
{
lean_dec_ref(v___x_3642_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
v_e_3580_ = v_e_3557_;
v___y_3581_ = v___y_3560_;
v___y_3582_ = v___y_3561_;
v___y_3583_ = v___y_3562_;
v___y_3584_ = v___y_3563_;
v___y_3585_ = v___y_3564_;
v___y_3586_ = v___y_3565_;
v___y_3587_ = v___y_3566_;
v___y_3588_ = v___y_3567_;
v___y_3589_ = v___y_3568_;
v___y_3590_ = v___y_3569_;
v___y_3591_ = v___y_3570_;
goto v___jp_3579_;
}
else
{
lean_object* v_arg_3644_; lean_object* v___x_3645_; lean_object* v___x_3646_; uint8_t v___x_3647_; 
v_arg_3644_ = lean_ctor_get(v___x_3642_, 1);
lean_inc_ref(v_arg_3644_);
v___x_3645_ = l_Lean_Expr_appFnCleanup___redArg(v___x_3642_);
v___x_3646_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_3647_ = l_Lean_Expr_isConstOf(v___x_3645_, v___x_3646_);
if (v___x_3647_ == 0)
{
lean_object* v___x_3648_; uint8_t v___x_3649_; 
v___x_3648_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_3649_ = l_Lean_Expr_isConstOf(v___x_3645_, v___x_3648_);
if (v___x_3649_ == 0)
{
lean_object* v___x_3650_; uint8_t v___x_3651_; 
v___x_3650_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10));
v___x_3651_ = l_Lean_Expr_isConstOf(v___x_3645_, v___x_3650_);
if (v___x_3651_ == 0)
{
lean_object* v_asVar_3652_; lean_object* v___x_3653_; uint8_t v___x_3654_; 
lean_inc_ref(v_mkVar_3577_);
v_asVar_3652_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__2___boxed), 14, 1);
lean_closure_set(v_asVar_3652_, 0, v_mkVar_3577_);
v___x_3653_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13));
v___x_3654_ = l_Lean_Expr_isConstOf(v___x_3645_, v___x_3653_);
if (v___x_3654_ == 0)
{
uint8_t v___x_3655_; 
v___x_3655_ = l_Lean_Expr_isApp(v___x_3645_);
if (v___x_3655_ == 0)
{
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v___x_3645_);
lean_dec_ref(v_arg_3644_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
v_e_3580_ = v_e_3557_;
v___y_3581_ = v___y_3560_;
v___y_3582_ = v___y_3561_;
v___y_3583_ = v___y_3562_;
v___y_3584_ = v___y_3563_;
v___y_3585_ = v___y_3564_;
v___y_3586_ = v___y_3565_;
v___y_3587_ = v___y_3566_;
v___y_3588_ = v___y_3567_;
v___y_3589_ = v___y_3568_;
v___y_3590_ = v___y_3569_;
v___y_3591_ = v___y_3570_;
goto v___jp_3579_;
}
else
{
lean_object* v___x_3656_; uint8_t v___x_3657_; 
v___x_3656_ = l_Lean_Expr_appFnCleanup___redArg(v___x_3645_);
v___x_3657_ = l_Lean_Expr_isApp(v___x_3656_);
if (v___x_3657_ == 0)
{
lean_dec_ref(v___x_3656_);
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3644_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
v_e_3580_ = v_e_3557_;
v___y_3581_ = v___y_3560_;
v___y_3582_ = v___y_3561_;
v___y_3583_ = v___y_3562_;
v___y_3584_ = v___y_3563_;
v___y_3585_ = v___y_3564_;
v___y_3586_ = v___y_3565_;
v___y_3587_ = v___y_3566_;
v___y_3588_ = v___y_3567_;
v___y_3589_ = v___y_3568_;
v___y_3590_ = v___y_3569_;
v___y_3591_ = v___y_3570_;
goto v___jp_3579_;
}
else
{
lean_object* v___x_3658_; uint8_t v___x_3659_; 
v___x_3658_ = l_Lean_Expr_appFnCleanup___redArg(v___x_3656_);
v___x_3659_ = l_Lean_Expr_isApp(v___x_3658_);
if (v___x_3659_ == 0)
{
lean_dec_ref(v___x_3658_);
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3644_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
v_e_3580_ = v_e_3557_;
v___y_3581_ = v___y_3560_;
v___y_3582_ = v___y_3561_;
v___y_3583_ = v___y_3562_;
v___y_3584_ = v___y_3563_;
v___y_3585_ = v___y_3564_;
v___y_3586_ = v___y_3565_;
v___y_3587_ = v___y_3566_;
v___y_3588_ = v___y_3567_;
v___y_3589_ = v___y_3568_;
v___y_3590_ = v___y_3569_;
v___y_3591_ = v___y_3570_;
goto v___jp_3579_;
}
else
{
lean_object* v___x_3660_; lean_object* v___x_3661_; uint8_t v___x_3662_; 
v___x_3660_ = l_Lean_Expr_appFnCleanup___redArg(v___x_3658_);
v___x_3661_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_3662_ = l_Lean_Expr_isConstOf(v___x_3660_, v___x_3661_);
if (v___x_3662_ == 0)
{
lean_object* v___x_3663_; uint8_t v___x_3664_; 
v___x_3663_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19));
v___x_3664_ = l_Lean_Expr_isConstOf(v___x_3660_, v___x_3663_);
if (v___x_3664_ == 0)
{
lean_object* v___x_3665_; uint8_t v___x_3666_; 
v___x_3665_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_3666_ = l_Lean_Expr_isConstOf(v___x_3660_, v___x_3665_);
if (v___x_3666_ == 0)
{
lean_object* v___x_3667_; uint8_t v___x_3668_; 
v___x_3667_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_3668_ = l_Lean_Expr_isConstOf(v___x_3660_, v___x_3667_);
lean_dec_ref(v___x_3660_);
if (v___x_3668_ == 0)
{
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3644_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
v_e_3580_ = v_e_3557_;
v___y_3581_ = v___y_3560_;
v___y_3582_ = v___y_3561_;
v___y_3583_ = v___y_3562_;
v___y_3584_ = v___y_3563_;
v___y_3585_ = v___y_3564_;
v___y_3586_ = v___y_3565_;
v___y_3587_ = v___y_3566_;
v___y_3588_ = v___y_3567_;
v___y_3589_ = v___y_3568_;
v___y_3590_ = v___y_3569_;
v___y_3591_ = v___y_3570_;
goto v___jp_3579_;
}
else
{
lean_object* v___x_3669_; 
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
lean_inc(v___y_3562_);
lean_inc(v___y_3561_);
lean_inc_ref(v___y_3560_);
v___x_3669_ = l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1(v_arg_3644_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
lean_dec_ref(v_arg_3644_);
if (lean_obj_tag(v___x_3669_) == 0)
{
lean_object* v_a_3670_; uint8_t v___x_3671_; 
v_a_3670_ = lean_ctor_get(v___x_3669_, 0);
lean_inc(v_a_3670_);
lean_dec_ref(v___x_3669_);
v___x_3671_ = lean_unbox(v_a_3670_);
lean_dec(v_a_3670_);
if (v___x_3671_ == 0)
{
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
v_e_3615_ = v_e_3557_;
v___y_3616_ = v___y_3560_;
v___y_3617_ = v___y_3561_;
v___y_3618_ = v___y_3562_;
v___y_3619_ = v___y_3563_;
v___y_3620_ = v___y_3564_;
v___y_3621_ = v___y_3565_;
v___y_3622_ = v___y_3566_;
v___y_3623_ = v___y_3567_;
v___y_3624_ = v___y_3568_;
v___y_3625_ = v___y_3569_;
v___y_3626_ = v___y_3570_;
goto v___jp_3614_;
}
else
{
lean_object* v___x_3672_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec_ref(v_e_3557_);
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
lean_inc(v___y_3562_);
lean_inc(v___y_3561_);
lean_inc_ref(v___y_3560_);
lean_inc_ref(v_asVar_3652_);
lean_inc_ref(v_toVar_3578_);
v___x_3672_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_3578_, v_asVar_3652_, v_arg_3641_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
if (lean_obj_tag(v___x_3672_) == 0)
{
lean_object* v_a_3673_; lean_object* v___x_3674_; 
v_a_3673_ = lean_ctor_get(v___x_3672_, 0);
lean_inc(v_a_3673_);
lean_dec_ref(v___x_3672_);
v___x_3674_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_3578_, v_asVar_3652_, v_arg_3638_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
if (lean_obj_tag(v___x_3674_) == 0)
{
lean_object* v_a_3675_; lean_object* v___x_3677_; uint8_t v_isShared_3678_; uint8_t v_isSharedCheck_3684_; 
v_a_3675_ = lean_ctor_get(v___x_3674_, 0);
v_isSharedCheck_3684_ = !lean_is_exclusive(v___x_3674_);
if (v_isSharedCheck_3684_ == 0)
{
v___x_3677_ = v___x_3674_;
v_isShared_3678_ = v_isSharedCheck_3684_;
goto v_resetjp_3676_;
}
else
{
lean_inc(v_a_3675_);
lean_dec(v___x_3674_);
v___x_3677_ = lean_box(0);
v_isShared_3678_ = v_isSharedCheck_3684_;
goto v_resetjp_3676_;
}
v_resetjp_3676_:
{
lean_object* v___x_3679_; lean_object* v___x_3680_; lean_object* v___x_3682_; 
v___x_3679_ = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(v___x_3679_, 0, v_a_3673_);
lean_ctor_set(v___x_3679_, 1, v_a_3675_);
v___x_3680_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_3680_, 0, v___x_3679_);
if (v_isShared_3678_ == 0)
{
lean_ctor_set(v___x_3677_, 0, v___x_3680_);
v___x_3682_ = v___x_3677_;
goto v_reusejp_3681_;
}
else
{
lean_object* v_reuseFailAlloc_3683_; 
v_reuseFailAlloc_3683_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3683_, 0, v___x_3680_);
v___x_3682_ = v_reuseFailAlloc_3683_;
goto v_reusejp_3681_;
}
v_reusejp_3681_:
{
return v___x_3682_;
}
}
}
else
{
lean_object* v_a_3685_; lean_object* v___x_3687_; uint8_t v_isShared_3688_; uint8_t v_isSharedCheck_3692_; 
lean_dec(v_a_3673_);
v_a_3685_ = lean_ctor_get(v___x_3674_, 0);
v_isSharedCheck_3692_ = !lean_is_exclusive(v___x_3674_);
if (v_isSharedCheck_3692_ == 0)
{
v___x_3687_ = v___x_3674_;
v_isShared_3688_ = v_isSharedCheck_3692_;
goto v_resetjp_3686_;
}
else
{
lean_inc(v_a_3685_);
lean_dec(v___x_3674_);
v___x_3687_ = lean_box(0);
v_isShared_3688_ = v_isSharedCheck_3692_;
goto v_resetjp_3686_;
}
v_resetjp_3686_:
{
lean_object* v___x_3690_; 
if (v_isShared_3688_ == 0)
{
v___x_3690_ = v___x_3687_;
goto v_reusejp_3689_;
}
else
{
lean_object* v_reuseFailAlloc_3691_; 
v_reuseFailAlloc_3691_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3691_, 0, v_a_3685_);
v___x_3690_ = v_reuseFailAlloc_3691_;
goto v_reusejp_3689_;
}
v_reusejp_3689_:
{
return v___x_3690_;
}
}
}
}
else
{
lean_object* v_a_3693_; lean_object* v___x_3695_; uint8_t v_isShared_3696_; uint8_t v_isSharedCheck_3700_; 
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
v_a_3693_ = lean_ctor_get(v___x_3672_, 0);
v_isSharedCheck_3700_ = !lean_is_exclusive(v___x_3672_);
if (v_isSharedCheck_3700_ == 0)
{
v___x_3695_ = v___x_3672_;
v_isShared_3696_ = v_isSharedCheck_3700_;
goto v_resetjp_3694_;
}
else
{
lean_inc(v_a_3693_);
lean_dec(v___x_3672_);
v___x_3695_ = lean_box(0);
v_isShared_3696_ = v_isSharedCheck_3700_;
goto v_resetjp_3694_;
}
v_resetjp_3694_:
{
lean_object* v___x_3698_; 
if (v_isShared_3696_ == 0)
{
v___x_3698_ = v___x_3695_;
goto v_reusejp_3697_;
}
else
{
lean_object* v_reuseFailAlloc_3699_; 
v_reuseFailAlloc_3699_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3699_, 0, v_a_3693_);
v___x_3698_ = v_reuseFailAlloc_3699_;
goto v_reusejp_3697_;
}
v_reusejp_3697_:
{
return v___x_3698_;
}
}
}
}
}
else
{
lean_object* v_a_3701_; lean_object* v___x_3703_; uint8_t v_isShared_3704_; uint8_t v_isSharedCheck_3708_; 
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3701_ = lean_ctor_get(v___x_3669_, 0);
v_isSharedCheck_3708_ = !lean_is_exclusive(v___x_3669_);
if (v_isSharedCheck_3708_ == 0)
{
v___x_3703_ = v___x_3669_;
v_isShared_3704_ = v_isSharedCheck_3708_;
goto v_resetjp_3702_;
}
else
{
lean_inc(v_a_3701_);
lean_dec(v___x_3669_);
v___x_3703_ = lean_box(0);
v_isShared_3704_ = v_isSharedCheck_3708_;
goto v_resetjp_3702_;
}
v_resetjp_3702_:
{
lean_object* v___x_3706_; 
if (v_isShared_3704_ == 0)
{
v___x_3706_ = v___x_3703_;
goto v_reusejp_3705_;
}
else
{
lean_object* v_reuseFailAlloc_3707_; 
v_reuseFailAlloc_3707_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3707_, 0, v_a_3701_);
v___x_3706_ = v_reuseFailAlloc_3707_;
goto v_reusejp_3705_;
}
v_reusejp_3705_:
{
return v___x_3706_;
}
}
}
}
}
else
{
lean_object* v___x_3709_; 
lean_dec_ref(v___x_3660_);
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
lean_inc(v___y_3562_);
lean_inc(v___y_3561_);
lean_inc_ref(v___y_3560_);
v___x_3709_ = l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3(v_arg_3644_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
lean_dec_ref(v_arg_3644_);
if (lean_obj_tag(v___x_3709_) == 0)
{
lean_object* v_a_3710_; uint8_t v___x_3711_; 
v_a_3710_ = lean_ctor_get(v___x_3709_, 0);
lean_inc(v_a_3710_);
lean_dec_ref(v___x_3709_);
v___x_3711_ = lean_unbox(v_a_3710_);
lean_dec(v_a_3710_);
if (v___x_3711_ == 0)
{
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
v_e_3615_ = v_e_3557_;
v___y_3616_ = v___y_3560_;
v___y_3617_ = v___y_3561_;
v___y_3618_ = v___y_3562_;
v___y_3619_ = v___y_3563_;
v___y_3620_ = v___y_3564_;
v___y_3621_ = v___y_3565_;
v___y_3622_ = v___y_3566_;
v___y_3623_ = v___y_3567_;
v___y_3624_ = v___y_3568_;
v___y_3625_ = v___y_3569_;
v___y_3626_ = v___y_3570_;
goto v___jp_3614_;
}
else
{
lean_object* v___x_3712_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec_ref(v_e_3557_);
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
lean_inc(v___y_3562_);
lean_inc(v___y_3561_);
lean_inc_ref(v___y_3560_);
lean_inc_ref(v_asVar_3652_);
lean_inc_ref(v_toVar_3578_);
v___x_3712_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_3578_, v_asVar_3652_, v_arg_3641_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
if (lean_obj_tag(v___x_3712_) == 0)
{
lean_object* v_a_3713_; lean_object* v___x_3714_; 
v_a_3713_ = lean_ctor_get(v___x_3712_, 0);
lean_inc(v_a_3713_);
lean_dec_ref(v___x_3712_);
v___x_3714_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_3578_, v_asVar_3652_, v_arg_3638_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
if (lean_obj_tag(v___x_3714_) == 0)
{
lean_object* v_a_3715_; lean_object* v___x_3717_; uint8_t v_isShared_3718_; uint8_t v_isSharedCheck_3724_; 
v_a_3715_ = lean_ctor_get(v___x_3714_, 0);
v_isSharedCheck_3724_ = !lean_is_exclusive(v___x_3714_);
if (v_isSharedCheck_3724_ == 0)
{
v___x_3717_ = v___x_3714_;
v_isShared_3718_ = v_isSharedCheck_3724_;
goto v_resetjp_3716_;
}
else
{
lean_inc(v_a_3715_);
lean_dec(v___x_3714_);
v___x_3717_ = lean_box(0);
v_isShared_3718_ = v_isSharedCheck_3724_;
goto v_resetjp_3716_;
}
v_resetjp_3716_:
{
lean_object* v___x_3719_; lean_object* v___x_3720_; lean_object* v___x_3722_; 
v___x_3719_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_3719_, 0, v_a_3713_);
lean_ctor_set(v___x_3719_, 1, v_a_3715_);
v___x_3720_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_3720_, 0, v___x_3719_);
if (v_isShared_3718_ == 0)
{
lean_ctor_set(v___x_3717_, 0, v___x_3720_);
v___x_3722_ = v___x_3717_;
goto v_reusejp_3721_;
}
else
{
lean_object* v_reuseFailAlloc_3723_; 
v_reuseFailAlloc_3723_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3723_, 0, v___x_3720_);
v___x_3722_ = v_reuseFailAlloc_3723_;
goto v_reusejp_3721_;
}
v_reusejp_3721_:
{
return v___x_3722_;
}
}
}
else
{
lean_object* v_a_3725_; lean_object* v___x_3727_; uint8_t v_isShared_3728_; uint8_t v_isSharedCheck_3732_; 
lean_dec(v_a_3713_);
v_a_3725_ = lean_ctor_get(v___x_3714_, 0);
v_isSharedCheck_3732_ = !lean_is_exclusive(v___x_3714_);
if (v_isSharedCheck_3732_ == 0)
{
v___x_3727_ = v___x_3714_;
v_isShared_3728_ = v_isSharedCheck_3732_;
goto v_resetjp_3726_;
}
else
{
lean_inc(v_a_3725_);
lean_dec(v___x_3714_);
v___x_3727_ = lean_box(0);
v_isShared_3728_ = v_isSharedCheck_3732_;
goto v_resetjp_3726_;
}
v_resetjp_3726_:
{
lean_object* v___x_3730_; 
if (v_isShared_3728_ == 0)
{
v___x_3730_ = v___x_3727_;
goto v_reusejp_3729_;
}
else
{
lean_object* v_reuseFailAlloc_3731_; 
v_reuseFailAlloc_3731_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3731_, 0, v_a_3725_);
v___x_3730_ = v_reuseFailAlloc_3731_;
goto v_reusejp_3729_;
}
v_reusejp_3729_:
{
return v___x_3730_;
}
}
}
}
else
{
lean_object* v_a_3733_; lean_object* v___x_3735_; uint8_t v_isShared_3736_; uint8_t v_isSharedCheck_3740_; 
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
v_a_3733_ = lean_ctor_get(v___x_3712_, 0);
v_isSharedCheck_3740_ = !lean_is_exclusive(v___x_3712_);
if (v_isSharedCheck_3740_ == 0)
{
v___x_3735_ = v___x_3712_;
v_isShared_3736_ = v_isSharedCheck_3740_;
goto v_resetjp_3734_;
}
else
{
lean_inc(v_a_3733_);
lean_dec(v___x_3712_);
v___x_3735_ = lean_box(0);
v_isShared_3736_ = v_isSharedCheck_3740_;
goto v_resetjp_3734_;
}
v_resetjp_3734_:
{
lean_object* v___x_3738_; 
if (v_isShared_3736_ == 0)
{
v___x_3738_ = v___x_3735_;
goto v_reusejp_3737_;
}
else
{
lean_object* v_reuseFailAlloc_3739_; 
v_reuseFailAlloc_3739_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3739_, 0, v_a_3733_);
v___x_3738_ = v_reuseFailAlloc_3739_;
goto v_reusejp_3737_;
}
v_reusejp_3737_:
{
return v___x_3738_;
}
}
}
}
}
else
{
lean_object* v_a_3741_; lean_object* v___x_3743_; uint8_t v_isShared_3744_; uint8_t v_isSharedCheck_3748_; 
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3741_ = lean_ctor_get(v___x_3709_, 0);
v_isSharedCheck_3748_ = !lean_is_exclusive(v___x_3709_);
if (v_isSharedCheck_3748_ == 0)
{
v___x_3743_ = v___x_3709_;
v_isShared_3744_ = v_isSharedCheck_3748_;
goto v_resetjp_3742_;
}
else
{
lean_inc(v_a_3741_);
lean_dec(v___x_3709_);
v___x_3743_ = lean_box(0);
v_isShared_3744_ = v_isSharedCheck_3748_;
goto v_resetjp_3742_;
}
v_resetjp_3742_:
{
lean_object* v___x_3746_; 
if (v_isShared_3744_ == 0)
{
v___x_3746_ = v___x_3743_;
goto v_reusejp_3745_;
}
else
{
lean_object* v_reuseFailAlloc_3747_; 
v_reuseFailAlloc_3747_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3747_, 0, v_a_3741_);
v___x_3746_ = v_reuseFailAlloc_3747_;
goto v_reusejp_3745_;
}
v_reusejp_3745_:
{
return v___x_3746_;
}
}
}
}
}
else
{
lean_object* v___x_3749_; 
lean_dec_ref(v___x_3660_);
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
lean_inc(v___y_3562_);
lean_inc(v___y_3561_);
lean_inc_ref(v___y_3560_);
v___x_3749_ = l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4(v_arg_3644_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
lean_dec_ref(v_arg_3644_);
if (lean_obj_tag(v___x_3749_) == 0)
{
lean_object* v_a_3750_; uint8_t v___x_3751_; 
v_a_3750_ = lean_ctor_get(v___x_3749_, 0);
lean_inc(v_a_3750_);
lean_dec_ref(v___x_3749_);
v___x_3751_ = lean_unbox(v_a_3750_);
lean_dec(v_a_3750_);
if (v___x_3751_ == 0)
{
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
v_e_3615_ = v_e_3557_;
v___y_3616_ = v___y_3560_;
v___y_3617_ = v___y_3561_;
v___y_3618_ = v___y_3562_;
v___y_3619_ = v___y_3563_;
v___y_3620_ = v___y_3564_;
v___y_3621_ = v___y_3565_;
v___y_3622_ = v___y_3566_;
v___y_3623_ = v___y_3567_;
v___y_3624_ = v___y_3568_;
v___y_3625_ = v___y_3569_;
v___y_3626_ = v___y_3570_;
goto v___jp_3614_;
}
else
{
lean_object* v___x_3752_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec_ref(v_e_3557_);
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
lean_inc(v___y_3562_);
lean_inc(v___y_3561_);
lean_inc_ref(v___y_3560_);
lean_inc_ref(v_asVar_3652_);
lean_inc_ref(v_toVar_3578_);
v___x_3752_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_3578_, v_asVar_3652_, v_arg_3641_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
if (lean_obj_tag(v___x_3752_) == 0)
{
lean_object* v_a_3753_; lean_object* v___x_3754_; 
v_a_3753_ = lean_ctor_get(v___x_3752_, 0);
lean_inc(v_a_3753_);
lean_dec_ref(v___x_3752_);
v___x_3754_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_3578_, v_asVar_3652_, v_arg_3638_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
if (lean_obj_tag(v___x_3754_) == 0)
{
lean_object* v_a_3755_; lean_object* v___x_3757_; uint8_t v_isShared_3758_; uint8_t v_isSharedCheck_3764_; 
v_a_3755_ = lean_ctor_get(v___x_3754_, 0);
v_isSharedCheck_3764_ = !lean_is_exclusive(v___x_3754_);
if (v_isSharedCheck_3764_ == 0)
{
v___x_3757_ = v___x_3754_;
v_isShared_3758_ = v_isSharedCheck_3764_;
goto v_resetjp_3756_;
}
else
{
lean_inc(v_a_3755_);
lean_dec(v___x_3754_);
v___x_3757_ = lean_box(0);
v_isShared_3758_ = v_isSharedCheck_3764_;
goto v_resetjp_3756_;
}
v_resetjp_3756_:
{
lean_object* v___x_3759_; lean_object* v___x_3760_; lean_object* v___x_3762_; 
v___x_3759_ = lean_alloc_ctor(6, 2, 0);
lean_ctor_set(v___x_3759_, 0, v_a_3753_);
lean_ctor_set(v___x_3759_, 1, v_a_3755_);
v___x_3760_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_3760_, 0, v___x_3759_);
if (v_isShared_3758_ == 0)
{
lean_ctor_set(v___x_3757_, 0, v___x_3760_);
v___x_3762_ = v___x_3757_;
goto v_reusejp_3761_;
}
else
{
lean_object* v_reuseFailAlloc_3763_; 
v_reuseFailAlloc_3763_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3763_, 0, v___x_3760_);
v___x_3762_ = v_reuseFailAlloc_3763_;
goto v_reusejp_3761_;
}
v_reusejp_3761_:
{
return v___x_3762_;
}
}
}
else
{
lean_object* v_a_3765_; lean_object* v___x_3767_; uint8_t v_isShared_3768_; uint8_t v_isSharedCheck_3772_; 
lean_dec(v_a_3753_);
v_a_3765_ = lean_ctor_get(v___x_3754_, 0);
v_isSharedCheck_3772_ = !lean_is_exclusive(v___x_3754_);
if (v_isSharedCheck_3772_ == 0)
{
v___x_3767_ = v___x_3754_;
v_isShared_3768_ = v_isSharedCheck_3772_;
goto v_resetjp_3766_;
}
else
{
lean_inc(v_a_3765_);
lean_dec(v___x_3754_);
v___x_3767_ = lean_box(0);
v_isShared_3768_ = v_isSharedCheck_3772_;
goto v_resetjp_3766_;
}
v_resetjp_3766_:
{
lean_object* v___x_3770_; 
if (v_isShared_3768_ == 0)
{
v___x_3770_ = v___x_3767_;
goto v_reusejp_3769_;
}
else
{
lean_object* v_reuseFailAlloc_3771_; 
v_reuseFailAlloc_3771_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3771_, 0, v_a_3765_);
v___x_3770_ = v_reuseFailAlloc_3771_;
goto v_reusejp_3769_;
}
v_reusejp_3769_:
{
return v___x_3770_;
}
}
}
}
else
{
lean_object* v_a_3773_; lean_object* v___x_3775_; uint8_t v_isShared_3776_; uint8_t v_isSharedCheck_3780_; 
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
v_a_3773_ = lean_ctor_get(v___x_3752_, 0);
v_isSharedCheck_3780_ = !lean_is_exclusive(v___x_3752_);
if (v_isSharedCheck_3780_ == 0)
{
v___x_3775_ = v___x_3752_;
v_isShared_3776_ = v_isSharedCheck_3780_;
goto v_resetjp_3774_;
}
else
{
lean_inc(v_a_3773_);
lean_dec(v___x_3752_);
v___x_3775_ = lean_box(0);
v_isShared_3776_ = v_isSharedCheck_3780_;
goto v_resetjp_3774_;
}
v_resetjp_3774_:
{
lean_object* v___x_3778_; 
if (v_isShared_3776_ == 0)
{
v___x_3778_ = v___x_3775_;
goto v_reusejp_3777_;
}
else
{
lean_object* v_reuseFailAlloc_3779_; 
v_reuseFailAlloc_3779_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3779_, 0, v_a_3773_);
v___x_3778_ = v_reuseFailAlloc_3779_;
goto v_reusejp_3777_;
}
v_reusejp_3777_:
{
return v___x_3778_;
}
}
}
}
}
else
{
lean_object* v_a_3781_; lean_object* v___x_3783_; uint8_t v_isShared_3784_; uint8_t v_isSharedCheck_3788_; 
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3781_ = lean_ctor_get(v___x_3749_, 0);
v_isSharedCheck_3788_ = !lean_is_exclusive(v___x_3749_);
if (v_isSharedCheck_3788_ == 0)
{
v___x_3783_ = v___x_3749_;
v_isShared_3784_ = v_isSharedCheck_3788_;
goto v_resetjp_3782_;
}
else
{
lean_inc(v_a_3781_);
lean_dec(v___x_3749_);
v___x_3783_ = lean_box(0);
v_isShared_3784_ = v_isSharedCheck_3788_;
goto v_resetjp_3782_;
}
v_resetjp_3782_:
{
lean_object* v___x_3786_; 
if (v_isShared_3784_ == 0)
{
v___x_3786_ = v___x_3783_;
goto v_reusejp_3785_;
}
else
{
lean_object* v_reuseFailAlloc_3787_; 
v_reuseFailAlloc_3787_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3787_, 0, v_a_3781_);
v___x_3786_ = v_reuseFailAlloc_3787_;
goto v_reusejp_3785_;
}
v_reusejp_3785_:
{
return v___x_3786_;
}
}
}
}
}
else
{
lean_object* v___x_3789_; 
lean_dec_ref(v___x_3660_);
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
v___x_3789_ = l_Lean_Meta_getNatValue_x3f(v_arg_3638_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
lean_dec_ref(v_arg_3638_);
if (lean_obj_tag(v___x_3789_) == 0)
{
lean_object* v_a_3790_; 
v_a_3790_ = lean_ctor_get(v___x_3789_, 0);
lean_inc(v_a_3790_);
lean_dec_ref(v___x_3789_);
if (lean_obj_tag(v_a_3790_) == 1)
{
lean_object* v_val_3791_; lean_object* v___x_3793_; uint8_t v_isShared_3794_; uint8_t v_isSharedCheck_3827_; 
v_val_3791_ = lean_ctor_get(v_a_3790_, 0);
v_isSharedCheck_3827_ = !lean_is_exclusive(v_a_3790_);
if (v_isSharedCheck_3827_ == 0)
{
v___x_3793_ = v_a_3790_;
v_isShared_3794_ = v_isSharedCheck_3827_;
goto v_resetjp_3792_;
}
else
{
lean_inc(v_val_3791_);
lean_dec(v_a_3790_);
v___x_3793_ = lean_box(0);
v_isShared_3794_ = v_isSharedCheck_3827_;
goto v_resetjp_3792_;
}
v_resetjp_3792_:
{
lean_object* v___x_3795_; 
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
lean_inc(v___y_3562_);
lean_inc(v___y_3561_);
lean_inc_ref(v___y_3560_);
v___x_3795_ = l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5(v_arg_3644_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
lean_dec_ref(v_arg_3644_);
if (lean_obj_tag(v___x_3795_) == 0)
{
lean_object* v_a_3796_; uint8_t v___x_3797_; 
v_a_3796_ = lean_ctor_get(v___x_3795_, 0);
lean_inc(v_a_3796_);
lean_dec_ref(v___x_3795_);
v___x_3797_ = lean_unbox(v_a_3796_);
lean_dec(v_a_3796_);
if (v___x_3797_ == 0)
{
lean_del_object(v___x_3793_);
lean_dec(v_val_3791_);
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_toVar_3578_);
v_e_3615_ = v_e_3557_;
v___y_3616_ = v___y_3560_;
v___y_3617_ = v___y_3561_;
v___y_3618_ = v___y_3562_;
v___y_3619_ = v___y_3563_;
v___y_3620_ = v___y_3564_;
v___y_3621_ = v___y_3565_;
v___y_3622_ = v___y_3566_;
v___y_3623_ = v___y_3567_;
v___y_3624_ = v___y_3568_;
v___y_3625_ = v___y_3569_;
v___y_3626_ = v___y_3570_;
goto v___jp_3614_;
}
else
{
lean_object* v___x_3798_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec_ref(v_e_3557_);
v___x_3798_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_3578_, v_asVar_3652_, v_arg_3641_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
if (lean_obj_tag(v___x_3798_) == 0)
{
lean_object* v_a_3799_; lean_object* v___x_3801_; uint8_t v_isShared_3802_; uint8_t v_isSharedCheck_3810_; 
v_a_3799_ = lean_ctor_get(v___x_3798_, 0);
v_isSharedCheck_3810_ = !lean_is_exclusive(v___x_3798_);
if (v_isSharedCheck_3810_ == 0)
{
v___x_3801_ = v___x_3798_;
v_isShared_3802_ = v_isSharedCheck_3810_;
goto v_resetjp_3800_;
}
else
{
lean_inc(v_a_3799_);
lean_dec(v___x_3798_);
v___x_3801_ = lean_box(0);
v_isShared_3802_ = v_isSharedCheck_3810_;
goto v_resetjp_3800_;
}
v_resetjp_3800_:
{
lean_object* v___x_3803_; lean_object* v___x_3805_; 
v___x_3803_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_3803_, 0, v_a_3799_);
lean_ctor_set(v___x_3803_, 1, v_val_3791_);
if (v_isShared_3794_ == 0)
{
lean_ctor_set(v___x_3793_, 0, v___x_3803_);
v___x_3805_ = v___x_3793_;
goto v_reusejp_3804_;
}
else
{
lean_object* v_reuseFailAlloc_3809_; 
v_reuseFailAlloc_3809_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3809_, 0, v___x_3803_);
v___x_3805_ = v_reuseFailAlloc_3809_;
goto v_reusejp_3804_;
}
v_reusejp_3804_:
{
lean_object* v___x_3807_; 
if (v_isShared_3802_ == 0)
{
lean_ctor_set(v___x_3801_, 0, v___x_3805_);
v___x_3807_ = v___x_3801_;
goto v_reusejp_3806_;
}
else
{
lean_object* v_reuseFailAlloc_3808_; 
v_reuseFailAlloc_3808_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3808_, 0, v___x_3805_);
v___x_3807_ = v_reuseFailAlloc_3808_;
goto v_reusejp_3806_;
}
v_reusejp_3806_:
{
return v___x_3807_;
}
}
}
}
else
{
lean_object* v_a_3811_; lean_object* v___x_3813_; uint8_t v_isShared_3814_; uint8_t v_isSharedCheck_3818_; 
lean_del_object(v___x_3793_);
lean_dec(v_val_3791_);
v_a_3811_ = lean_ctor_get(v___x_3798_, 0);
v_isSharedCheck_3818_ = !lean_is_exclusive(v___x_3798_);
if (v_isSharedCheck_3818_ == 0)
{
v___x_3813_ = v___x_3798_;
v_isShared_3814_ = v_isSharedCheck_3818_;
goto v_resetjp_3812_;
}
else
{
lean_inc(v_a_3811_);
lean_dec(v___x_3798_);
v___x_3813_ = lean_box(0);
v_isShared_3814_ = v_isSharedCheck_3818_;
goto v_resetjp_3812_;
}
v_resetjp_3812_:
{
lean_object* v___x_3816_; 
if (v_isShared_3814_ == 0)
{
v___x_3816_ = v___x_3813_;
goto v_reusejp_3815_;
}
else
{
lean_object* v_reuseFailAlloc_3817_; 
v_reuseFailAlloc_3817_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3817_, 0, v_a_3811_);
v___x_3816_ = v_reuseFailAlloc_3817_;
goto v_reusejp_3815_;
}
v_reusejp_3815_:
{
return v___x_3816_;
}
}
}
}
}
else
{
lean_object* v_a_3819_; lean_object* v___x_3821_; uint8_t v_isShared_3822_; uint8_t v_isSharedCheck_3826_; 
lean_del_object(v___x_3793_);
lean_dec(v_val_3791_);
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_toVar_3578_);
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3819_ = lean_ctor_get(v___x_3795_, 0);
v_isSharedCheck_3826_ = !lean_is_exclusive(v___x_3795_);
if (v_isSharedCheck_3826_ == 0)
{
v___x_3821_ = v___x_3795_;
v_isShared_3822_ = v_isSharedCheck_3826_;
goto v_resetjp_3820_;
}
else
{
lean_inc(v_a_3819_);
lean_dec(v___x_3795_);
v___x_3821_ = lean_box(0);
v_isShared_3822_ = v_isSharedCheck_3826_;
goto v_resetjp_3820_;
}
v_resetjp_3820_:
{
lean_object* v___x_3824_; 
if (v_isShared_3822_ == 0)
{
v___x_3824_ = v___x_3821_;
goto v_reusejp_3823_;
}
else
{
lean_object* v_reuseFailAlloc_3825_; 
v_reuseFailAlloc_3825_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3825_, 0, v_a_3819_);
v___x_3824_ = v_reuseFailAlloc_3825_;
goto v_reusejp_3823_;
}
v_reusejp_3823_:
{
return v___x_3824_;
}
}
}
}
}
else
{
lean_dec(v_a_3790_);
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3644_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_toVar_3578_);
v_e_3615_ = v_e_3557_;
v___y_3616_ = v___y_3560_;
v___y_3617_ = v___y_3561_;
v___y_3618_ = v___y_3562_;
v___y_3619_ = v___y_3563_;
v___y_3620_ = v___y_3564_;
v___y_3621_ = v___y_3565_;
v___y_3622_ = v___y_3566_;
v___y_3623_ = v___y_3567_;
v___y_3624_ = v___y_3568_;
v___y_3625_ = v___y_3569_;
v___y_3626_ = v___y_3570_;
goto v___jp_3614_;
}
}
else
{
lean_object* v_a_3828_; lean_object* v___x_3830_; uint8_t v_isShared_3831_; uint8_t v_isSharedCheck_3835_; 
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3644_);
lean_dec_ref(v_arg_3641_);
lean_dec_ref(v_toVar_3578_);
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3828_ = lean_ctor_get(v___x_3789_, 0);
v_isSharedCheck_3835_ = !lean_is_exclusive(v___x_3789_);
if (v_isSharedCheck_3835_ == 0)
{
v___x_3830_ = v___x_3789_;
v_isShared_3831_ = v_isSharedCheck_3835_;
goto v_resetjp_3829_;
}
else
{
lean_inc(v_a_3828_);
lean_dec(v___x_3789_);
v___x_3830_ = lean_box(0);
v_isShared_3831_ = v_isSharedCheck_3835_;
goto v_resetjp_3829_;
}
v_resetjp_3829_:
{
lean_object* v___x_3833_; 
if (v_isShared_3831_ == 0)
{
v___x_3833_ = v___x_3830_;
goto v_reusejp_3832_;
}
else
{
lean_object* v_reuseFailAlloc_3834_; 
v_reuseFailAlloc_3834_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3834_, 0, v_a_3828_);
v___x_3833_ = v_reuseFailAlloc_3834_;
goto v_reusejp_3832_;
}
v_reusejp_3832_:
{
return v___x_3833_;
}
}
}
}
}
}
}
}
else
{
lean_object* v___x_3836_; 
lean_dec_ref(v___x_3645_);
lean_dec_ref(v_arg_3644_);
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
lean_inc(v___y_3562_);
lean_inc(v___y_3561_);
lean_inc_ref(v___y_3560_);
v___x_3836_ = l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6(v_arg_3641_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
lean_dec_ref(v_arg_3641_);
if (lean_obj_tag(v___x_3836_) == 0)
{
lean_object* v_a_3837_; uint8_t v___x_3838_; 
v_a_3837_ = lean_ctor_get(v___x_3836_, 0);
lean_inc(v_a_3837_);
lean_dec_ref(v___x_3836_);
v___x_3838_ = lean_unbox(v_a_3837_);
lean_dec(v_a_3837_);
if (v___x_3838_ == 0)
{
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
v_e_3615_ = v_e_3557_;
v___y_3616_ = v___y_3560_;
v___y_3617_ = v___y_3561_;
v___y_3618_ = v___y_3562_;
v___y_3619_ = v___y_3563_;
v___y_3620_ = v___y_3564_;
v___y_3621_ = v___y_3565_;
v___y_3622_ = v___y_3566_;
v___y_3623_ = v___y_3567_;
v___y_3624_ = v___y_3568_;
v___y_3625_ = v___y_3569_;
v___y_3626_ = v___y_3570_;
goto v___jp_3614_;
}
else
{
lean_object* v___x_3839_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec_ref(v_e_3557_);
v___x_3839_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__2(v_toVar_3578_, v_asVar_3652_, v_arg_3638_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
if (lean_obj_tag(v___x_3839_) == 0)
{
lean_object* v_a_3840_; lean_object* v___x_3842_; uint8_t v_isShared_3843_; uint8_t v_isSharedCheck_3849_; 
v_a_3840_ = lean_ctor_get(v___x_3839_, 0);
v_isSharedCheck_3849_ = !lean_is_exclusive(v___x_3839_);
if (v_isSharedCheck_3849_ == 0)
{
v___x_3842_ = v___x_3839_;
v_isShared_3843_ = v_isSharedCheck_3849_;
goto v_resetjp_3841_;
}
else
{
lean_inc(v_a_3840_);
lean_dec(v___x_3839_);
v___x_3842_ = lean_box(0);
v_isShared_3843_ = v_isSharedCheck_3849_;
goto v_resetjp_3841_;
}
v_resetjp_3841_:
{
lean_object* v___x_3844_; lean_object* v___x_3845_; lean_object* v___x_3847_; 
v___x_3844_ = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(v___x_3844_, 0, v_a_3840_);
v___x_3845_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_3845_, 0, v___x_3844_);
if (v_isShared_3843_ == 0)
{
lean_ctor_set(v___x_3842_, 0, v___x_3845_);
v___x_3847_ = v___x_3842_;
goto v_reusejp_3846_;
}
else
{
lean_object* v_reuseFailAlloc_3848_; 
v_reuseFailAlloc_3848_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3848_, 0, v___x_3845_);
v___x_3847_ = v_reuseFailAlloc_3848_;
goto v_reusejp_3846_;
}
v_reusejp_3846_:
{
return v___x_3847_;
}
}
}
else
{
lean_object* v_a_3850_; lean_object* v___x_3852_; uint8_t v_isShared_3853_; uint8_t v_isSharedCheck_3857_; 
v_a_3850_ = lean_ctor_get(v___x_3839_, 0);
v_isSharedCheck_3857_ = !lean_is_exclusive(v___x_3839_);
if (v_isSharedCheck_3857_ == 0)
{
v___x_3852_ = v___x_3839_;
v_isShared_3853_ = v_isSharedCheck_3857_;
goto v_resetjp_3851_;
}
else
{
lean_inc(v_a_3850_);
lean_dec(v___x_3839_);
v___x_3852_ = lean_box(0);
v_isShared_3853_ = v_isSharedCheck_3857_;
goto v_resetjp_3851_;
}
v_resetjp_3851_:
{
lean_object* v___x_3855_; 
if (v_isShared_3853_ == 0)
{
v___x_3855_ = v___x_3852_;
goto v_reusejp_3854_;
}
else
{
lean_object* v_reuseFailAlloc_3856_; 
v_reuseFailAlloc_3856_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3856_, 0, v_a_3850_);
v___x_3855_ = v_reuseFailAlloc_3856_;
goto v_reusejp_3854_;
}
v_reusejp_3854_:
{
return v___x_3855_;
}
}
}
}
}
else
{
lean_object* v_a_3858_; lean_object* v___x_3860_; uint8_t v_isShared_3861_; uint8_t v_isSharedCheck_3865_; 
lean_dec_ref(v_asVar_3652_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3858_ = lean_ctor_get(v___x_3836_, 0);
v_isSharedCheck_3865_ = !lean_is_exclusive(v___x_3836_);
if (v_isSharedCheck_3865_ == 0)
{
v___x_3860_ = v___x_3836_;
v_isShared_3861_ = v_isSharedCheck_3865_;
goto v_resetjp_3859_;
}
else
{
lean_inc(v_a_3858_);
lean_dec(v___x_3836_);
v___x_3860_ = lean_box(0);
v_isShared_3861_ = v_isSharedCheck_3865_;
goto v_resetjp_3859_;
}
v_resetjp_3859_:
{
lean_object* v___x_3863_; 
if (v_isShared_3861_ == 0)
{
v___x_3863_ = v___x_3860_;
goto v_reusejp_3862_;
}
else
{
lean_object* v_reuseFailAlloc_3864_; 
v_reuseFailAlloc_3864_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3864_, 0, v_a_3858_);
v___x_3863_ = v_reuseFailAlloc_3864_;
goto v_reusejp_3862_;
}
v_reusejp_3862_:
{
return v___x_3863_;
}
}
}
}
}
else
{
lean_object* v___x_3866_; 
lean_dec_ref(v___x_3645_);
lean_dec_ref(v_arg_3644_);
lean_dec_ref(v_toVar_3578_);
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
lean_inc(v___y_3562_);
lean_inc(v___y_3561_);
lean_inc_ref(v___y_3560_);
v___x_3866_ = l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7(v_arg_3641_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
lean_dec_ref(v_arg_3641_);
if (lean_obj_tag(v___x_3866_) == 0)
{
lean_object* v_a_3867_; uint8_t v___x_3868_; 
v_a_3867_ = lean_ctor_get(v___x_3866_, 0);
lean_inc(v_a_3867_);
lean_dec_ref(v___x_3866_);
v___x_3868_ = lean_unbox(v_a_3867_);
lean_dec(v_a_3867_);
if (v___x_3868_ == 0)
{
lean_dec_ref(v_arg_3638_);
v_e_3615_ = v_e_3557_;
v___y_3616_ = v___y_3560_;
v___y_3617_ = v___y_3561_;
v___y_3618_ = v___y_3562_;
v___y_3619_ = v___y_3563_;
v___y_3620_ = v___y_3564_;
v___y_3621_ = v___y_3565_;
v___y_3622_ = v___y_3566_;
v___y_3623_ = v___y_3567_;
v___y_3624_ = v___y_3568_;
v___y_3625_ = v___y_3569_;
v___y_3626_ = v___y_3570_;
goto v___jp_3614_;
}
else
{
lean_object* v___x_3869_; 
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
v___x_3869_ = l_Lean_Meta_getIntValue_x3f(v_arg_3638_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
if (lean_obj_tag(v___x_3869_) == 0)
{
lean_object* v_a_3870_; lean_object* v___x_3872_; uint8_t v_isShared_3873_; uint8_t v_isSharedCheck_3886_; 
v_a_3870_ = lean_ctor_get(v___x_3869_, 0);
v_isSharedCheck_3886_ = !lean_is_exclusive(v___x_3869_);
if (v_isSharedCheck_3886_ == 0)
{
v___x_3872_ = v___x_3869_;
v_isShared_3873_ = v_isSharedCheck_3886_;
goto v_resetjp_3871_;
}
else
{
lean_inc(v_a_3870_);
lean_dec(v___x_3869_);
v___x_3872_ = lean_box(0);
v_isShared_3873_ = v_isSharedCheck_3886_;
goto v_resetjp_3871_;
}
v_resetjp_3871_:
{
if (lean_obj_tag(v_a_3870_) == 1)
{
lean_object* v_val_3874_; lean_object* v___x_3876_; uint8_t v_isShared_3877_; uint8_t v_isSharedCheck_3885_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_val_3874_ = lean_ctor_get(v_a_3870_, 0);
v_isSharedCheck_3885_ = !lean_is_exclusive(v_a_3870_);
if (v_isSharedCheck_3885_ == 0)
{
v___x_3876_ = v_a_3870_;
v_isShared_3877_ = v_isSharedCheck_3885_;
goto v_resetjp_3875_;
}
else
{
lean_inc(v_val_3874_);
lean_dec(v_a_3870_);
v___x_3876_ = lean_box(0);
v_isShared_3877_ = v_isSharedCheck_3885_;
goto v_resetjp_3875_;
}
v_resetjp_3875_:
{
lean_object* v___x_3878_; lean_object* v___x_3880_; 
v___x_3878_ = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(v___x_3878_, 0, v_val_3874_);
if (v_isShared_3877_ == 0)
{
lean_ctor_set(v___x_3876_, 0, v___x_3878_);
v___x_3880_ = v___x_3876_;
goto v_reusejp_3879_;
}
else
{
lean_object* v_reuseFailAlloc_3884_; 
v_reuseFailAlloc_3884_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3884_, 0, v___x_3878_);
v___x_3880_ = v_reuseFailAlloc_3884_;
goto v_reusejp_3879_;
}
v_reusejp_3879_:
{
lean_object* v___x_3882_; 
if (v_isShared_3873_ == 0)
{
lean_ctor_set(v___x_3872_, 0, v___x_3880_);
v___x_3882_ = v___x_3872_;
goto v_reusejp_3881_;
}
else
{
lean_object* v_reuseFailAlloc_3883_; 
v_reuseFailAlloc_3883_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3883_, 0, v___x_3880_);
v___x_3882_ = v_reuseFailAlloc_3883_;
goto v_reusejp_3881_;
}
v_reusejp_3881_:
{
return v___x_3882_;
}
}
}
}
else
{
lean_del_object(v___x_3872_);
lean_dec(v_a_3870_);
v_e_3580_ = v_e_3557_;
v___y_3581_ = v___y_3560_;
v___y_3582_ = v___y_3561_;
v___y_3583_ = v___y_3562_;
v___y_3584_ = v___y_3563_;
v___y_3585_ = v___y_3564_;
v___y_3586_ = v___y_3565_;
v___y_3587_ = v___y_3566_;
v___y_3588_ = v___y_3567_;
v___y_3589_ = v___y_3568_;
v___y_3590_ = v___y_3569_;
v___y_3591_ = v___y_3570_;
goto v___jp_3579_;
}
}
}
else
{
lean_object* v_a_3887_; lean_object* v___x_3889_; uint8_t v_isShared_3890_; uint8_t v_isSharedCheck_3894_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3887_ = lean_ctor_get(v___x_3869_, 0);
v_isSharedCheck_3894_ = !lean_is_exclusive(v___x_3869_);
if (v_isSharedCheck_3894_ == 0)
{
v___x_3889_ = v___x_3869_;
v_isShared_3890_ = v_isSharedCheck_3894_;
goto v_resetjp_3888_;
}
else
{
lean_inc(v_a_3887_);
lean_dec(v___x_3869_);
v___x_3889_ = lean_box(0);
v_isShared_3890_ = v_isSharedCheck_3894_;
goto v_resetjp_3888_;
}
v_resetjp_3888_:
{
lean_object* v___x_3892_; 
if (v_isShared_3890_ == 0)
{
v___x_3892_ = v___x_3889_;
goto v_reusejp_3891_;
}
else
{
lean_object* v_reuseFailAlloc_3893_; 
v_reuseFailAlloc_3893_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3893_, 0, v_a_3887_);
v___x_3892_ = v_reuseFailAlloc_3893_;
goto v_reusejp_3891_;
}
v_reusejp_3891_:
{
return v___x_3892_;
}
}
}
}
}
else
{
lean_object* v_a_3895_; lean_object* v___x_3897_; uint8_t v_isShared_3898_; uint8_t v_isSharedCheck_3902_; 
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3895_ = lean_ctor_get(v___x_3866_, 0);
v_isSharedCheck_3902_ = !lean_is_exclusive(v___x_3866_);
if (v_isSharedCheck_3902_ == 0)
{
v___x_3897_ = v___x_3866_;
v_isShared_3898_ = v_isSharedCheck_3902_;
goto v_resetjp_3896_;
}
else
{
lean_inc(v_a_3895_);
lean_dec(v___x_3866_);
v___x_3897_ = lean_box(0);
v_isShared_3898_ = v_isSharedCheck_3902_;
goto v_resetjp_3896_;
}
v_resetjp_3896_:
{
lean_object* v___x_3900_; 
if (v_isShared_3898_ == 0)
{
v___x_3900_ = v___x_3897_;
goto v_reusejp_3899_;
}
else
{
lean_object* v_reuseFailAlloc_3901_; 
v_reuseFailAlloc_3901_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3901_, 0, v_a_3895_);
v___x_3900_ = v_reuseFailAlloc_3901_;
goto v_reusejp_3899_;
}
v_reusejp_3899_:
{
return v___x_3900_;
}
}
}
}
}
else
{
lean_object* v___x_3903_; 
lean_dec_ref(v___x_3645_);
lean_dec_ref(v_arg_3644_);
lean_dec_ref(v_toVar_3578_);
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
lean_inc(v___y_3562_);
lean_inc(v___y_3561_);
lean_inc_ref(v___y_3560_);
v___x_3903_ = l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8(v_arg_3641_, v___y_3560_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
lean_dec_ref(v_arg_3641_);
if (lean_obj_tag(v___x_3903_) == 0)
{
lean_object* v_a_3904_; uint8_t v___x_3905_; 
v_a_3904_ = lean_ctor_get(v___x_3903_, 0);
lean_inc(v_a_3904_);
lean_dec_ref(v___x_3903_);
v___x_3905_ = lean_unbox(v_a_3904_);
lean_dec(v_a_3904_);
if (v___x_3905_ == 0)
{
lean_dec_ref(v_arg_3638_);
v_e_3615_ = v_e_3557_;
v___y_3616_ = v___y_3560_;
v___y_3617_ = v___y_3561_;
v___y_3618_ = v___y_3562_;
v___y_3619_ = v___y_3563_;
v___y_3620_ = v___y_3564_;
v___y_3621_ = v___y_3565_;
v___y_3622_ = v___y_3566_;
v___y_3623_ = v___y_3567_;
v___y_3624_ = v___y_3568_;
v___y_3625_ = v___y_3569_;
v___y_3626_ = v___y_3570_;
goto v___jp_3614_;
}
else
{
lean_object* v___x_3906_; 
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
v___x_3906_ = l_Lean_Meta_getNatValue_x3f(v_arg_3638_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
lean_dec_ref(v_arg_3638_);
if (lean_obj_tag(v___x_3906_) == 0)
{
lean_object* v_a_3907_; lean_object* v___x_3909_; uint8_t v_isShared_3910_; uint8_t v_isSharedCheck_3923_; 
v_a_3907_ = lean_ctor_get(v___x_3906_, 0);
v_isSharedCheck_3923_ = !lean_is_exclusive(v___x_3906_);
if (v_isSharedCheck_3923_ == 0)
{
v___x_3909_ = v___x_3906_;
v_isShared_3910_ = v_isSharedCheck_3923_;
goto v_resetjp_3908_;
}
else
{
lean_inc(v_a_3907_);
lean_dec(v___x_3906_);
v___x_3909_ = lean_box(0);
v_isShared_3910_ = v_isSharedCheck_3923_;
goto v_resetjp_3908_;
}
v_resetjp_3908_:
{
if (lean_obj_tag(v_a_3907_) == 1)
{
lean_object* v_val_3911_; lean_object* v___x_3913_; uint8_t v_isShared_3914_; uint8_t v_isSharedCheck_3922_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_val_3911_ = lean_ctor_get(v_a_3907_, 0);
v_isSharedCheck_3922_ = !lean_is_exclusive(v_a_3907_);
if (v_isSharedCheck_3922_ == 0)
{
v___x_3913_ = v_a_3907_;
v_isShared_3914_ = v_isSharedCheck_3922_;
goto v_resetjp_3912_;
}
else
{
lean_inc(v_val_3911_);
lean_dec(v_a_3907_);
v___x_3913_ = lean_box(0);
v_isShared_3914_ = v_isSharedCheck_3922_;
goto v_resetjp_3912_;
}
v_resetjp_3912_:
{
lean_object* v___x_3915_; lean_object* v___x_3917_; 
v___x_3915_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_3915_, 0, v_val_3911_);
if (v_isShared_3914_ == 0)
{
lean_ctor_set(v___x_3913_, 0, v___x_3915_);
v___x_3917_ = v___x_3913_;
goto v_reusejp_3916_;
}
else
{
lean_object* v_reuseFailAlloc_3921_; 
v_reuseFailAlloc_3921_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3921_, 0, v___x_3915_);
v___x_3917_ = v_reuseFailAlloc_3921_;
goto v_reusejp_3916_;
}
v_reusejp_3916_:
{
lean_object* v___x_3919_; 
if (v_isShared_3910_ == 0)
{
lean_ctor_set(v___x_3909_, 0, v___x_3917_);
v___x_3919_ = v___x_3909_;
goto v_reusejp_3918_;
}
else
{
lean_object* v_reuseFailAlloc_3920_; 
v_reuseFailAlloc_3920_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3920_, 0, v___x_3917_);
v___x_3919_ = v_reuseFailAlloc_3920_;
goto v_reusejp_3918_;
}
v_reusejp_3918_:
{
return v___x_3919_;
}
}
}
}
else
{
lean_del_object(v___x_3909_);
lean_dec(v_a_3907_);
v_e_3580_ = v_e_3557_;
v___y_3581_ = v___y_3560_;
v___y_3582_ = v___y_3561_;
v___y_3583_ = v___y_3562_;
v___y_3584_ = v___y_3563_;
v___y_3585_ = v___y_3564_;
v___y_3586_ = v___y_3565_;
v___y_3587_ = v___y_3566_;
v___y_3588_ = v___y_3567_;
v___y_3589_ = v___y_3568_;
v___y_3590_ = v___y_3569_;
v___y_3591_ = v___y_3570_;
goto v___jp_3579_;
}
}
}
else
{
lean_object* v_a_3924_; lean_object* v___x_3926_; uint8_t v_isShared_3927_; uint8_t v_isSharedCheck_3931_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3924_ = lean_ctor_get(v___x_3906_, 0);
v_isSharedCheck_3931_ = !lean_is_exclusive(v___x_3906_);
if (v_isSharedCheck_3931_ == 0)
{
v___x_3926_ = v___x_3906_;
v_isShared_3927_ = v_isSharedCheck_3931_;
goto v_resetjp_3925_;
}
else
{
lean_inc(v_a_3924_);
lean_dec(v___x_3906_);
v___x_3926_ = lean_box(0);
v_isShared_3927_ = v_isSharedCheck_3931_;
goto v_resetjp_3925_;
}
v_resetjp_3925_:
{
lean_object* v___x_3929_; 
if (v_isShared_3927_ == 0)
{
v___x_3929_ = v___x_3926_;
goto v_reusejp_3928_;
}
else
{
lean_object* v_reuseFailAlloc_3930_; 
v_reuseFailAlloc_3930_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3930_, 0, v_a_3924_);
v___x_3929_ = v_reuseFailAlloc_3930_;
goto v_reusejp_3928_;
}
v_reusejp_3928_:
{
return v___x_3929_;
}
}
}
}
}
else
{
lean_object* v_a_3932_; lean_object* v___x_3934_; uint8_t v_isShared_3935_; uint8_t v_isSharedCheck_3939_; 
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3932_ = lean_ctor_get(v___x_3903_, 0);
v_isSharedCheck_3939_ = !lean_is_exclusive(v___x_3903_);
if (v_isSharedCheck_3939_ == 0)
{
v___x_3934_ = v___x_3903_;
v_isShared_3935_ = v_isSharedCheck_3939_;
goto v_resetjp_3933_;
}
else
{
lean_inc(v_a_3932_);
lean_dec(v___x_3903_);
v___x_3934_ = lean_box(0);
v_isShared_3935_ = v_isSharedCheck_3939_;
goto v_resetjp_3933_;
}
v_resetjp_3933_:
{
lean_object* v___x_3937_; 
if (v_isShared_3935_ == 0)
{
v___x_3937_ = v___x_3934_;
goto v_reusejp_3936_;
}
else
{
lean_object* v_reuseFailAlloc_3938_; 
v_reuseFailAlloc_3938_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3938_, 0, v_a_3932_);
v___x_3937_ = v_reuseFailAlloc_3938_;
goto v_reusejp_3936_;
}
v_reusejp_3936_:
{
return v___x_3937_;
}
}
}
}
}
else
{
lean_object* v___x_3940_; 
lean_dec_ref(v___x_3645_);
lean_dec_ref(v_arg_3644_);
lean_dec_ref(v_arg_3638_);
lean_dec_ref(v_toVar_3578_);
lean_inc(v___y_3570_);
lean_inc_ref(v___y_3569_);
lean_inc(v___y_3568_);
lean_inc_ref(v___y_3567_);
v___x_3940_ = l_Lean_Meta_getNatValue_x3f(v_arg_3641_, v___y_3567_, v___y_3568_, v___y_3569_, v___y_3570_);
lean_dec_ref(v_arg_3641_);
if (lean_obj_tag(v___x_3940_) == 0)
{
lean_object* v_a_3941_; lean_object* v___x_3943_; uint8_t v_isShared_3944_; uint8_t v_isSharedCheck_3958_; 
v_a_3941_ = lean_ctor_get(v___x_3940_, 0);
v_isSharedCheck_3958_ = !lean_is_exclusive(v___x_3940_);
if (v_isSharedCheck_3958_ == 0)
{
v___x_3943_ = v___x_3940_;
v_isShared_3944_ = v_isSharedCheck_3958_;
goto v_resetjp_3942_;
}
else
{
lean_inc(v_a_3941_);
lean_dec(v___x_3940_);
v___x_3943_ = lean_box(0);
v_isShared_3944_ = v_isSharedCheck_3958_;
goto v_resetjp_3942_;
}
v_resetjp_3942_:
{
if (lean_obj_tag(v_a_3941_) == 1)
{
lean_object* v_val_3945_; lean_object* v___x_3947_; uint8_t v_isShared_3948_; uint8_t v_isSharedCheck_3957_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_val_3945_ = lean_ctor_get(v_a_3941_, 0);
v_isSharedCheck_3957_ = !lean_is_exclusive(v_a_3941_);
if (v_isSharedCheck_3957_ == 0)
{
v___x_3947_ = v_a_3941_;
v_isShared_3948_ = v_isSharedCheck_3957_;
goto v_resetjp_3946_;
}
else
{
lean_inc(v_val_3945_);
lean_dec(v_a_3941_);
v___x_3947_ = lean_box(0);
v_isShared_3948_ = v_isSharedCheck_3957_;
goto v_resetjp_3946_;
}
v_resetjp_3946_:
{
lean_object* v___x_3949_; lean_object* v___x_3950_; lean_object* v___x_3952_; 
v___x_3949_ = lean_nat_to_int(v_val_3945_);
v___x_3950_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_3950_, 0, v___x_3949_);
if (v_isShared_3948_ == 0)
{
lean_ctor_set(v___x_3947_, 0, v___x_3950_);
v___x_3952_ = v___x_3947_;
goto v_reusejp_3951_;
}
else
{
lean_object* v_reuseFailAlloc_3956_; 
v_reuseFailAlloc_3956_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3956_, 0, v___x_3950_);
v___x_3952_ = v_reuseFailAlloc_3956_;
goto v_reusejp_3951_;
}
v_reusejp_3951_:
{
lean_object* v___x_3954_; 
if (v_isShared_3944_ == 0)
{
lean_ctor_set(v___x_3943_, 0, v___x_3952_);
v___x_3954_ = v___x_3943_;
goto v_reusejp_3953_;
}
else
{
lean_object* v_reuseFailAlloc_3955_; 
v_reuseFailAlloc_3955_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3955_, 0, v___x_3952_);
v___x_3954_ = v_reuseFailAlloc_3955_;
goto v_reusejp_3953_;
}
v_reusejp_3953_:
{
return v___x_3954_;
}
}
}
}
else
{
lean_del_object(v___x_3943_);
lean_dec(v_a_3941_);
v_e_3615_ = v_e_3557_;
v___y_3616_ = v___y_3560_;
v___y_3617_ = v___y_3561_;
v___y_3618_ = v___y_3562_;
v___y_3619_ = v___y_3563_;
v___y_3620_ = v___y_3564_;
v___y_3621_ = v___y_3565_;
v___y_3622_ = v___y_3566_;
v___y_3623_ = v___y_3567_;
v___y_3624_ = v___y_3568_;
v___y_3625_ = v___y_3569_;
v___y_3626_ = v___y_3570_;
goto v___jp_3614_;
}
}
}
else
{
lean_object* v_a_3959_; lean_object* v___x_3961_; uint8_t v_isShared_3962_; uint8_t v_isSharedCheck_3966_; 
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec_ref(v_e_3557_);
v_a_3959_ = lean_ctor_get(v___x_3940_, 0);
v_isSharedCheck_3966_ = !lean_is_exclusive(v___x_3940_);
if (v_isSharedCheck_3966_ == 0)
{
v___x_3961_ = v___x_3940_;
v_isShared_3962_ = v_isSharedCheck_3966_;
goto v_resetjp_3960_;
}
else
{
lean_inc(v_a_3959_);
lean_dec(v___x_3940_);
v___x_3961_ = lean_box(0);
v_isShared_3962_ = v_isSharedCheck_3966_;
goto v_resetjp_3960_;
}
v_resetjp_3960_:
{
lean_object* v___x_3964_; 
if (v_isShared_3962_ == 0)
{
v___x_3964_ = v___x_3961_;
goto v_reusejp_3963_;
}
else
{
lean_object* v_reuseFailAlloc_3965_; 
v_reuseFailAlloc_3965_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3965_, 0, v_a_3959_);
v___x_3964_ = v_reuseFailAlloc_3965_;
goto v_reusejp_3963_;
}
v_reusejp_3963_:
{
return v___x_3964_;
}
}
}
}
}
}
}
v___jp_3579_:
{
if (v_skipVar_3558_ == 0)
{
lean_object* v___x_3592_; 
lean_del_object(v___x_3575_);
v___x_3592_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___lam__1(v_mkVar_3577_, v_e_3580_, v___y_3581_, v___y_3582_, v___y_3583_, v___y_3584_, v___y_3585_, v___y_3586_, v___y_3587_, v___y_3588_, v___y_3589_, v___y_3590_, v___y_3591_);
if (lean_obj_tag(v___x_3592_) == 0)
{
lean_object* v_a_3593_; lean_object* v___x_3595_; uint8_t v_isShared_3596_; uint8_t v_isSharedCheck_3601_; 
v_a_3593_ = lean_ctor_get(v___x_3592_, 0);
v_isSharedCheck_3601_ = !lean_is_exclusive(v___x_3592_);
if (v_isSharedCheck_3601_ == 0)
{
v___x_3595_ = v___x_3592_;
v_isShared_3596_ = v_isSharedCheck_3601_;
goto v_resetjp_3594_;
}
else
{
lean_inc(v_a_3593_);
lean_dec(v___x_3592_);
v___x_3595_ = lean_box(0);
v_isShared_3596_ = v_isSharedCheck_3601_;
goto v_resetjp_3594_;
}
v_resetjp_3594_:
{
lean_object* v___x_3597_; lean_object* v___x_3599_; 
v___x_3597_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_3597_, 0, v_a_3593_);
if (v_isShared_3596_ == 0)
{
lean_ctor_set(v___x_3595_, 0, v___x_3597_);
v___x_3599_ = v___x_3595_;
goto v_reusejp_3598_;
}
else
{
lean_object* v_reuseFailAlloc_3600_; 
v_reuseFailAlloc_3600_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3600_, 0, v___x_3597_);
v___x_3599_ = v_reuseFailAlloc_3600_;
goto v_reusejp_3598_;
}
v_reusejp_3598_:
{
return v___x_3599_;
}
}
}
else
{
lean_object* v_a_3602_; lean_object* v___x_3604_; uint8_t v_isShared_3605_; uint8_t v_isSharedCheck_3609_; 
v_a_3602_ = lean_ctor_get(v___x_3592_, 0);
v_isSharedCheck_3609_ = !lean_is_exclusive(v___x_3592_);
if (v_isSharedCheck_3609_ == 0)
{
v___x_3604_ = v___x_3592_;
v_isShared_3605_ = v_isSharedCheck_3609_;
goto v_resetjp_3603_;
}
else
{
lean_inc(v_a_3602_);
lean_dec(v___x_3592_);
v___x_3604_ = lean_box(0);
v_isShared_3605_ = v_isSharedCheck_3609_;
goto v_resetjp_3603_;
}
v_resetjp_3603_:
{
lean_object* v___x_3607_; 
if (v_isShared_3605_ == 0)
{
v___x_3607_ = v___x_3604_;
goto v_reusejp_3606_;
}
else
{
lean_object* v_reuseFailAlloc_3608_; 
v_reuseFailAlloc_3608_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3608_, 0, v_a_3602_);
v___x_3607_ = v_reuseFailAlloc_3608_;
goto v_reusejp_3606_;
}
v_reusejp_3606_:
{
return v___x_3607_;
}
}
}
}
else
{
lean_object* v___x_3610_; lean_object* v___x_3612_; 
lean_dec(v___y_3591_);
lean_dec_ref(v___y_3590_);
lean_dec(v___y_3589_);
lean_dec_ref(v___y_3588_);
lean_dec(v___y_3587_);
lean_dec_ref(v___y_3586_);
lean_dec(v___y_3585_);
lean_dec_ref(v___y_3584_);
lean_dec(v___y_3583_);
lean_dec(v___y_3582_);
lean_dec_ref(v___y_3581_);
lean_dec_ref(v_e_3580_);
lean_dec_ref(v_mkVar_3577_);
v___x_3610_ = lean_box(0);
if (v_isShared_3576_ == 0)
{
lean_ctor_set(v___x_3575_, 0, v___x_3610_);
v___x_3612_ = v___x_3575_;
goto v_reusejp_3611_;
}
else
{
lean_object* v_reuseFailAlloc_3613_; 
v_reuseFailAlloc_3613_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3613_, 0, v___x_3610_);
v___x_3612_ = v_reuseFailAlloc_3613_;
goto v_reusejp_3611_;
}
v_reusejp_3611_:
{
return v___x_3612_;
}
}
}
v___jp_3614_:
{
lean_object* v___x_3627_; 
lean_inc_ref(v_e_3615_);
v___x_3627_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg(v_e_3615_, v___y_3618_, v___y_3619_, v___y_3620_, v___y_3621_, v___y_3622_, v___y_3623_, v___y_3624_, v___y_3625_, v___y_3626_);
if (lean_obj_tag(v___x_3627_) == 0)
{
lean_dec_ref(v___x_3627_);
v_e_3580_ = v_e_3615_;
v___y_3581_ = v___y_3616_;
v___y_3582_ = v___y_3617_;
v___y_3583_ = v___y_3618_;
v___y_3584_ = v___y_3619_;
v___y_3585_ = v___y_3620_;
v___y_3586_ = v___y_3621_;
v___y_3587_ = v___y_3622_;
v___y_3588_ = v___y_3623_;
v___y_3589_ = v___y_3624_;
v___y_3590_ = v___y_3625_;
v___y_3591_ = v___y_3626_;
goto v___jp_3579_;
}
else
{
lean_object* v_a_3628_; lean_object* v___x_3630_; uint8_t v_isShared_3631_; uint8_t v_isSharedCheck_3635_; 
lean_dec(v___y_3626_);
lean_dec_ref(v___y_3625_);
lean_dec(v___y_3624_);
lean_dec_ref(v___y_3623_);
lean_dec(v___y_3622_);
lean_dec_ref(v___y_3621_);
lean_dec(v___y_3620_);
lean_dec_ref(v___y_3619_);
lean_dec(v___y_3618_);
lean_dec(v___y_3617_);
lean_dec_ref(v___y_3616_);
lean_dec_ref(v_e_3615_);
lean_dec_ref(v_mkVar_3577_);
lean_del_object(v___x_3575_);
v_a_3628_ = lean_ctor_get(v___x_3627_, 0);
v_isSharedCheck_3635_ = !lean_is_exclusive(v___x_3627_);
if (v_isSharedCheck_3635_ == 0)
{
v___x_3630_ = v___x_3627_;
v_isShared_3631_ = v_isSharedCheck_3635_;
goto v_resetjp_3629_;
}
else
{
lean_inc(v_a_3628_);
lean_dec(v___x_3627_);
v___x_3630_ = lean_box(0);
v_isShared_3631_ = v_isSharedCheck_3635_;
goto v_resetjp_3629_;
}
v_resetjp_3629_:
{
lean_object* v___x_3633_; 
if (v_isShared_3631_ == 0)
{
v___x_3633_ = v___x_3630_;
goto v_reusejp_3632_;
}
else
{
lean_object* v_reuseFailAlloc_3634_; 
v_reuseFailAlloc_3634_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3634_, 0, v_a_3628_);
v___x_3633_ = v_reuseFailAlloc_3634_;
goto v_reusejp_3632_;
}
v_reusejp_3632_:
{
return v___x_3633_;
}
}
}
}
}
}
else
{
lean_object* v_a_3968_; lean_object* v___x_3970_; uint8_t v_isShared_3971_; uint8_t v_isSharedCheck_3975_; 
lean_dec(v___y_3570_);
lean_dec_ref(v___y_3569_);
lean_dec(v___y_3568_);
lean_dec_ref(v___y_3567_);
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
lean_dec(v___y_3562_);
lean_dec(v___y_3561_);
lean_dec_ref(v___y_3560_);
lean_dec(v_gen_3559_);
lean_dec_ref(v_e_3557_);
v_a_3968_ = lean_ctor_get(v___x_3572_, 0);
v_isSharedCheck_3975_ = !lean_is_exclusive(v___x_3572_);
if (v_isSharedCheck_3975_ == 0)
{
v___x_3970_ = v___x_3572_;
v_isShared_3971_ = v_isSharedCheck_3975_;
goto v_resetjp_3969_;
}
else
{
lean_inc(v_a_3968_);
lean_dec(v___x_3572_);
v___x_3970_ = lean_box(0);
v_isShared_3971_ = v_isSharedCheck_3975_;
goto v_resetjp_3969_;
}
v_resetjp_3969_:
{
lean_object* v___x_3973_; 
if (v_isShared_3971_ == 0)
{
v___x_3973_ = v___x_3970_;
goto v_reusejp_3972_;
}
else
{
lean_object* v_reuseFailAlloc_3974_; 
v_reuseFailAlloc_3974_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3974_, 0, v_a_3968_);
v___x_3973_ = v_reuseFailAlloc_3974_;
goto v_reusejp_3972_;
}
v_reusejp_3972_:
{
return v___x_3973_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0___boxed(lean_object* v_e_3976_, lean_object* v_skipVar_3977_, lean_object* v_gen_3978_, lean_object* v___y_3979_, lean_object* v___y_3980_, lean_object* v___y_3981_, lean_object* v___y_3982_, lean_object* v___y_3983_, lean_object* v___y_3984_, lean_object* v___y_3985_, lean_object* v___y_3986_, lean_object* v___y_3987_, lean_object* v___y_3988_, lean_object* v___y_3989_, lean_object* v___y_3990_){
_start:
{
uint8_t v_skipVar_boxed_3991_; lean_object* v_res_3992_; 
v_skipVar_boxed_3991_ = lean_unbox(v_skipVar_3977_);
v_res_3992_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0(v_e_3976_, v_skipVar_boxed_3991_, v_gen_3978_, v___y_3979_, v___y_3980_, v___y_3981_, v___y_3982_, v___y_3983_, v___y_3984_, v___y_3985_, v___y_3986_, v___y_3987_, v___y_3988_, v___y_3989_);
return v_res_3992_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reify_x3f(lean_object* v_e_3993_, uint8_t v_skipVar_3994_, lean_object* v_gen_3995_, lean_object* v_a_3996_, lean_object* v_a_3997_, lean_object* v_a_3998_, lean_object* v_a_3999_, lean_object* v_a_4000_, lean_object* v_a_4001_, lean_object* v_a_4002_, lean_object* v_a_4003_, lean_object* v_a_4004_, lean_object* v_a_4005_, lean_object* v_a_4006_){
_start:
{
lean_object* v___x_4008_; 
v___x_4008_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0(v_e_3993_, v_skipVar_3994_, v_gen_3995_, v_a_3996_, v_a_3997_, v_a_3998_, v_a_3999_, v_a_4000_, v_a_4001_, v_a_4002_, v_a_4003_, v_a_4004_, v_a_4005_, v_a_4006_);
return v___x_4008_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reify_x3f___boxed(lean_object* v_e_4009_, lean_object* v_skipVar_4010_, lean_object* v_gen_4011_, lean_object* v_a_4012_, lean_object* v_a_4013_, lean_object* v_a_4014_, lean_object* v_a_4015_, lean_object* v_a_4016_, lean_object* v_a_4017_, lean_object* v_a_4018_, lean_object* v_a_4019_, lean_object* v_a_4020_, lean_object* v_a_4021_, lean_object* v_a_4022_, lean_object* v_a_4023_){
_start:
{
uint8_t v_skipVar_boxed_4024_; lean_object* v_res_4025_; 
v_skipVar_boxed_4024_ = lean_unbox(v_skipVar_4010_);
v_res_4025_ = l_Lean_Meta_Grind_Arith_CommRing_reify_x3f(v_e_4009_, v_skipVar_boxed_4024_, v_gen_4011_, v_a_4012_, v_a_4013_, v_a_4014_, v_a_4015_, v_a_4016_, v_a_4017_, v_a_4018_, v_a_4019_, v_a_4020_, v_a_4021_, v_a_4022_);
return v_res_4025_;
}
}
LEAN_EXPORT lean_object* l_Nat_cast___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__9(lean_object* v_a_4026_){
_start:
{
lean_object* v___x_4027_; 
v___x_4027_ = lean_nat_to_int(v_a_4026_);
return v___x_4027_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1(lean_object* v_00_u03b2_4028_, lean_object* v_x_4029_, lean_object* v_x_4030_){
_start:
{
lean_object* v___x_4031_; 
v___x_4031_ = l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___redArg(v_x_4029_, v_x_4030_);
return v___x_4031_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___boxed(lean_object* v_00_u03b2_4032_, lean_object* v_x_4033_, lean_object* v_x_4034_){
_start:
{
lean_object* v_res_4035_; 
v_res_4035_ = l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1(v_00_u03b2_4032_, v_x_4033_, v_x_4034_);
lean_dec_ref(v_x_4034_);
return v_res_4035_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2(lean_object* v_00_u03b2_4036_, lean_object* v_x_4037_, lean_object* v_x_4038_, lean_object* v_x_4039_){
_start:
{
lean_object* v___x_4040_; 
v___x_4040_ = l_Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2___redArg(v_x_4037_, v_x_4038_, v_x_4039_);
return v___x_4040_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24(lean_object* v_u_4041_, lean_object* v_type_4042_, lean_object* v_semiringInst_4043_, lean_object* v___y_4044_, lean_object* v___y_4045_, lean_object* v___y_4046_, lean_object* v___y_4047_, lean_object* v___y_4048_, lean_object* v___y_4049_, lean_object* v___y_4050_, lean_object* v___y_4051_, lean_object* v___y_4052_, lean_object* v___y_4053_, lean_object* v___y_4054_){
_start:
{
lean_object* v___x_4056_; 
v___x_4056_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg(v_u_4041_, v_type_4042_, v_semiringInst_4043_, v___y_4045_, v___y_4046_, v___y_4047_, v___y_4048_, v___y_4049_, v___y_4050_, v___y_4051_, v___y_4052_, v___y_4053_, v___y_4054_);
return v___x_4056_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___boxed(lean_object* v_u_4057_, lean_object* v_type_4058_, lean_object* v_semiringInst_4059_, lean_object* v___y_4060_, lean_object* v___y_4061_, lean_object* v___y_4062_, lean_object* v___y_4063_, lean_object* v___y_4064_, lean_object* v___y_4065_, lean_object* v___y_4066_, lean_object* v___y_4067_, lean_object* v___y_4068_, lean_object* v___y_4069_, lean_object* v___y_4070_, lean_object* v___y_4071_){
_start:
{
lean_object* v_res_4072_; 
v_res_4072_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24(v_u_4057_, v_type_4058_, v_semiringInst_4059_, v___y_4060_, v___y_4061_, v___y_4062_, v___y_4063_, v___y_4064_, v___y_4065_, v___y_4066_, v___y_4067_, v___y_4068_, v___y_4069_, v___y_4070_);
lean_dec_ref(v___y_4060_);
return v_res_4072_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3(lean_object* v_00_u03b2_4073_, lean_object* v_x_4074_, size_t v_x_4075_, lean_object* v_x_4076_){
_start:
{
lean_object* v___x_4077_; 
v___x_4077_ = l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___redArg(v_x_4074_, v_x_4075_, v_x_4076_);
return v___x_4077_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3___boxed(lean_object* v_00_u03b2_4078_, lean_object* v_x_4079_, lean_object* v_x_4080_, lean_object* v_x_4081_){
_start:
{
size_t v_x_135743__boxed_4082_; lean_object* v_res_4083_; 
v_x_135743__boxed_4082_ = lean_unbox_usize(v_x_4080_);
lean_dec(v_x_4080_);
v_res_4083_ = l_Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3(v_00_u03b2_4078_, v_x_4079_, v_x_135743__boxed_4082_, v_x_4081_);
lean_dec_ref(v_x_4081_);
return v_res_4083_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5(lean_object* v_00_u03b2_4084_, lean_object* v_x_4085_, size_t v_x_4086_, size_t v_x_4087_, lean_object* v_x_4088_, lean_object* v_x_4089_){
_start:
{
lean_object* v___x_4090_; 
v___x_4090_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___redArg(v_x_4085_, v_x_4086_, v_x_4087_, v_x_4088_, v_x_4089_);
return v___x_4090_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5___boxed(lean_object* v_00_u03b2_4091_, lean_object* v_x_4092_, lean_object* v_x_4093_, lean_object* v_x_4094_, lean_object* v_x_4095_, lean_object* v_x_4096_){
_start:
{
size_t v_x_135754__boxed_4097_; size_t v_x_135755__boxed_4098_; lean_object* v_res_4099_; 
v_x_135754__boxed_4097_ = lean_unbox_usize(v_x_4093_);
lean_dec(v_x_4093_);
v_x_135755__boxed_4098_ = lean_unbox_usize(v_x_4094_);
lean_dec(v_x_4094_);
v_res_4099_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5(v_00_u03b2_4091_, v_x_4092_, v_x_135754__boxed_4097_, v_x_135755__boxed_4098_, v_x_4095_, v_x_4096_);
return v_res_4099_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13(lean_object* v_00_u03b2_4100_, lean_object* v_keys_4101_, lean_object* v_vals_4102_, lean_object* v_heq_4103_, lean_object* v_i_4104_, lean_object* v_k_4105_){
_start:
{
lean_object* v___x_4106_; 
v___x_4106_ = l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13___redArg(v_keys_4101_, v_vals_4102_, v_i_4104_, v_k_4105_);
return v___x_4106_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13___boxed(lean_object* v_00_u03b2_4107_, lean_object* v_keys_4108_, lean_object* v_vals_4109_, lean_object* v_heq_4110_, lean_object* v_i_4111_, lean_object* v_k_4112_){
_start:
{
lean_object* v_res_4113_; 
v_res_4113_ = l_Lean_PersistentHashMap_findAtAux___at___00Lean_PersistentHashMap_findAux___at___00Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1_spec__3_spec__13(v_00_u03b2_4107_, v_keys_4108_, v_vals_4109_, v_heq_4110_, v_i_4111_, v_k_4112_);
lean_dec_ref(v_k_4112_);
lean_dec_ref(v_vals_4109_);
lean_dec_ref(v_keys_4108_);
return v_res_4113_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16(lean_object* v_00_u03b2_4114_, lean_object* v_n_4115_, lean_object* v_k_4116_, lean_object* v_v_4117_){
_start:
{
lean_object* v___x_4118_; 
v___x_4118_ = l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16___redArg(v_n_4115_, v_k_4116_, v_v_4117_);
return v___x_4118_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17(lean_object* v_00_u03b2_4119_, size_t v_depth_4120_, lean_object* v_keys_4121_, lean_object* v_vals_4122_, lean_object* v_heq_4123_, lean_object* v_i_4124_, lean_object* v_entries_4125_){
_start:
{
lean_object* v___x_4126_; 
v___x_4126_ = l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17___redArg(v_depth_4120_, v_keys_4121_, v_vals_4122_, v_i_4124_, v_entries_4125_);
return v___x_4126_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17___boxed(lean_object* v_00_u03b2_4127_, lean_object* v_depth_4128_, lean_object* v_keys_4129_, lean_object* v_vals_4130_, lean_object* v_heq_4131_, lean_object* v_i_4132_, lean_object* v_entries_4133_){
_start:
{
size_t v_depth_boxed_4134_; lean_object* v_res_4135_; 
v_depth_boxed_4134_ = lean_unbox_usize(v_depth_4128_);
lean_dec(v_depth_4128_);
v_res_4135_ = l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__17(v_00_u03b2_4127_, v_depth_boxed_4134_, v_keys_4129_, v_vals_4130_, v_heq_4131_, v_i_4132_, v_entries_4133_);
lean_dec_ref(v_vals_4130_);
lean_dec_ref(v_keys_4129_);
return v_res_4135_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16_spec__24(lean_object* v_00_u03b2_4136_, lean_object* v_x_4137_, lean_object* v_x_4138_, lean_object* v_x_4139_, lean_object* v_x_4140_){
_start:
{
lean_object* v___x_4141_; 
v___x_4141_ = l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2_spec__5_spec__16_spec__24___redArg(v_x_4137_, v_x_4138_, v_x_4139_, v_x_4140_);
return v___x_4141_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28(lean_object* v_00_u03b1_4142_, lean_object* v_msg_4143_, lean_object* v___y_4144_, lean_object* v___y_4145_, lean_object* v___y_4146_, lean_object* v___y_4147_, lean_object* v___y_4148_, lean_object* v___y_4149_, lean_object* v___y_4150_, lean_object* v___y_4151_, lean_object* v___y_4152_, lean_object* v___y_4153_, lean_object* v___y_4154_){
_start:
{
lean_object* v___x_4156_; 
v___x_4156_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28___redArg(v_msg_4143_, v___y_4151_, v___y_4152_, v___y_4153_, v___y_4154_);
return v___x_4156_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28___boxed(lean_object* v_00_u03b1_4157_, lean_object* v_msg_4158_, lean_object* v___y_4159_, lean_object* v___y_4160_, lean_object* v___y_4161_, lean_object* v___y_4162_, lean_object* v___y_4163_, lean_object* v___y_4164_, lean_object* v___y_4165_, lean_object* v___y_4166_, lean_object* v___y_4167_, lean_object* v___y_4168_, lean_object* v___y_4169_, lean_object* v___y_4170_){
_start:
{
lean_object* v_res_4171_; 
v_res_4171_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28(v_00_u03b1_4157_, v_msg_4158_, v___y_4159_, v___y_4160_, v___y_4161_, v___y_4162_, v___y_4163_, v___y_4164_, v___y_4165_, v___y_4166_, v___y_4167_, v___y_4168_, v___y_4169_);
lean_dec(v___y_4169_);
lean_dec_ref(v___y_4168_);
lean_dec(v___y_4167_);
lean_dec_ref(v___y_4166_);
lean_dec(v___y_4165_);
lean_dec_ref(v___y_4164_);
lean_dec(v___y_4163_);
lean_dec_ref(v___y_4162_);
lean_dec(v___y_4161_);
lean_dec(v___y_4160_);
lean_dec_ref(v___y_4159_);
return v_res_4171_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19___redArg(lean_object* v_msg_4172_, lean_object* v___y_4173_, lean_object* v___y_4174_, lean_object* v___y_4175_, lean_object* v___y_4176_){
_start:
{
lean_object* v_ref_4178_; lean_object* v___x_4179_; lean_object* v_a_4180_; lean_object* v___x_4182_; uint8_t v_isShared_4183_; uint8_t v_isSharedCheck_4188_; 
v_ref_4178_ = lean_ctor_get(v___y_4175_, 5);
v___x_4179_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28_spec__31(v_msg_4172_, v___y_4173_, v___y_4174_, v___y_4175_, v___y_4176_);
v_a_4180_ = lean_ctor_get(v___x_4179_, 0);
v_isSharedCheck_4188_ = !lean_is_exclusive(v___x_4179_);
if (v_isSharedCheck_4188_ == 0)
{
v___x_4182_ = v___x_4179_;
v_isShared_4183_ = v_isSharedCheck_4188_;
goto v_resetjp_4181_;
}
else
{
lean_inc(v_a_4180_);
lean_dec(v___x_4179_);
v___x_4182_ = lean_box(0);
v_isShared_4183_ = v_isSharedCheck_4188_;
goto v_resetjp_4181_;
}
v_resetjp_4181_:
{
lean_object* v___x_4184_; lean_object* v___x_4186_; 
lean_inc(v_ref_4178_);
v___x_4184_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_4184_, 0, v_ref_4178_);
lean_ctor_set(v___x_4184_, 1, v_a_4180_);
if (v_isShared_4183_ == 0)
{
lean_ctor_set_tag(v___x_4182_, 1);
lean_ctor_set(v___x_4182_, 0, v___x_4184_);
v___x_4186_ = v___x_4182_;
goto v_reusejp_4185_;
}
else
{
lean_object* v_reuseFailAlloc_4187_; 
v_reuseFailAlloc_4187_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4187_, 0, v___x_4184_);
v___x_4186_ = v_reuseFailAlloc_4187_;
goto v_reusejp_4185_;
}
v_reusejp_4185_:
{
return v___x_4186_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19___redArg___boxed(lean_object* v_msg_4189_, lean_object* v___y_4190_, lean_object* v___y_4191_, lean_object* v___y_4192_, lean_object* v___y_4193_, lean_object* v___y_4194_){
_start:
{
lean_object* v_res_4195_; 
v_res_4195_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19___redArg(v_msg_4189_, v___y_4190_, v___y_4191_, v___y_4192_, v___y_4193_);
lean_dec(v___y_4193_);
lean_dec_ref(v___y_4192_);
lean_dec(v___y_4191_);
lean_dec_ref(v___y_4190_);
return v_res_4195_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12(lean_object* v_type_4196_, lean_object* v___y_4197_, lean_object* v___y_4198_, lean_object* v___y_4199_, lean_object* v___y_4200_, lean_object* v___y_4201_, lean_object* v___y_4202_, lean_object* v___y_4203_, lean_object* v___y_4204_, lean_object* v___y_4205_, lean_object* v___y_4206_, lean_object* v___y_4207_){
_start:
{
lean_object* v___x_4209_; 
lean_inc(v___y_4207_);
lean_inc_ref(v___y_4206_);
lean_inc(v___y_4205_);
lean_inc_ref(v___y_4204_);
lean_inc_ref(v_type_4196_);
v___x_4209_ = l_Lean_Meta_Grind_synthInstanceMeta_x3f(v_type_4196_, v___y_4204_, v___y_4205_, v___y_4206_, v___y_4207_);
if (lean_obj_tag(v___x_4209_) == 0)
{
lean_object* v_a_4210_; lean_object* v___x_4212_; uint8_t v_isShared_4213_; uint8_t v_isSharedCheck_4222_; 
v_a_4210_ = lean_ctor_get(v___x_4209_, 0);
v_isSharedCheck_4222_ = !lean_is_exclusive(v___x_4209_);
if (v_isSharedCheck_4222_ == 0)
{
v___x_4212_ = v___x_4209_;
v_isShared_4213_ = v_isSharedCheck_4222_;
goto v_resetjp_4211_;
}
else
{
lean_inc(v_a_4210_);
lean_dec(v___x_4209_);
v___x_4212_ = lean_box(0);
v_isShared_4213_ = v_isSharedCheck_4222_;
goto v_resetjp_4211_;
}
v_resetjp_4211_:
{
if (lean_obj_tag(v_a_4210_) == 1)
{
lean_object* v_val_4214_; lean_object* v___x_4216_; 
lean_dec(v___y_4207_);
lean_dec_ref(v___y_4206_);
lean_dec(v___y_4205_);
lean_dec_ref(v___y_4204_);
lean_dec_ref(v_type_4196_);
v_val_4214_ = lean_ctor_get(v_a_4210_, 0);
lean_inc(v_val_4214_);
lean_dec_ref(v_a_4210_);
if (v_isShared_4213_ == 0)
{
lean_ctor_set(v___x_4212_, 0, v_val_4214_);
v___x_4216_ = v___x_4212_;
goto v_reusejp_4215_;
}
else
{
lean_object* v_reuseFailAlloc_4217_; 
v_reuseFailAlloc_4217_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4217_, 0, v_val_4214_);
v___x_4216_ = v_reuseFailAlloc_4217_;
goto v_reusejp_4215_;
}
v_reusejp_4215_:
{
return v___x_4216_;
}
}
else
{
lean_object* v___x_4218_; lean_object* v___x_4219_; lean_object* v___x_4220_; lean_object* v___x_4221_; 
lean_del_object(v___x_4212_);
lean_dec(v_a_4210_);
v___x_4218_ = lean_obj_once(&l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1, &l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1_once, _init_l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1);
v___x_4219_ = l_Lean_indentExpr(v_type_4196_);
v___x_4220_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4220_, 0, v___x_4218_);
lean_ctor_set(v___x_4220_, 1, v___x_4219_);
v___x_4221_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19___redArg(v___x_4220_, v___y_4204_, v___y_4205_, v___y_4206_, v___y_4207_);
lean_dec(v___y_4207_);
lean_dec_ref(v___y_4206_);
lean_dec(v___y_4205_);
lean_dec_ref(v___y_4204_);
return v___x_4221_;
}
}
}
else
{
lean_object* v_a_4223_; lean_object* v___x_4225_; uint8_t v_isShared_4226_; uint8_t v_isSharedCheck_4230_; 
lean_dec(v___y_4207_);
lean_dec_ref(v___y_4206_);
lean_dec(v___y_4205_);
lean_dec_ref(v___y_4204_);
lean_dec_ref(v_type_4196_);
v_a_4223_ = lean_ctor_get(v___x_4209_, 0);
v_isSharedCheck_4230_ = !lean_is_exclusive(v___x_4209_);
if (v_isSharedCheck_4230_ == 0)
{
v___x_4225_ = v___x_4209_;
v_isShared_4226_ = v_isSharedCheck_4230_;
goto v_resetjp_4224_;
}
else
{
lean_inc(v_a_4223_);
lean_dec(v___x_4209_);
v___x_4225_ = lean_box(0);
v_isShared_4226_ = v_isSharedCheck_4230_;
goto v_resetjp_4224_;
}
v_resetjp_4224_:
{
lean_object* v___x_4228_; 
if (v_isShared_4226_ == 0)
{
v___x_4228_ = v___x_4225_;
goto v_reusejp_4227_;
}
else
{
lean_object* v_reuseFailAlloc_4229_; 
v_reuseFailAlloc_4229_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4229_, 0, v_a_4223_);
v___x_4228_ = v_reuseFailAlloc_4229_;
goto v_reusejp_4227_;
}
v_reusejp_4227_:
{
return v___x_4228_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12___boxed(lean_object* v_type_4231_, lean_object* v___y_4232_, lean_object* v___y_4233_, lean_object* v___y_4234_, lean_object* v___y_4235_, lean_object* v___y_4236_, lean_object* v___y_4237_, lean_object* v___y_4238_, lean_object* v___y_4239_, lean_object* v___y_4240_, lean_object* v___y_4241_, lean_object* v___y_4242_, lean_object* v___y_4243_){
_start:
{
lean_object* v_res_4244_; 
v_res_4244_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12(v_type_4231_, v___y_4232_, v___y_4233_, v___y_4234_, v___y_4235_, v___y_4236_, v___y_4237_, v___y_4238_, v___y_4239_, v___y_4240_, v___y_4241_, v___y_4242_);
lean_dec(v___y_4238_);
lean_dec_ref(v___y_4237_);
lean_dec(v___y_4236_);
lean_dec_ref(v___y_4235_);
lean_dec(v___y_4234_);
lean_dec(v___y_4233_);
lean_dec(v___y_4232_);
return v_res_4244_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3(lean_object* v_type_4245_, lean_object* v_u_4246_, lean_object* v_instDeclName_4247_, lean_object* v_declName_4248_, lean_object* v_expectedInst_4249_, lean_object* v___y_4250_, lean_object* v___y_4251_, lean_object* v___y_4252_, lean_object* v___y_4253_, lean_object* v___y_4254_, lean_object* v___y_4255_, lean_object* v___y_4256_, lean_object* v___y_4257_, lean_object* v___y_4258_, lean_object* v___y_4259_, lean_object* v___y_4260_){
_start:
{
lean_object* v___x_4262_; lean_object* v___x_4263_; lean_object* v___x_4264_; lean_object* v___x_4265_; lean_object* v___x_4266_; lean_object* v___x_4267_; lean_object* v___x_4268_; 
v___x_4262_ = lean_box(0);
lean_inc(v_u_4246_);
v___x_4263_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_4263_, 0, v_u_4246_);
lean_ctor_set(v___x_4263_, 1, v___x_4262_);
lean_inc(v_u_4246_);
v___x_4264_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_4264_, 0, v_u_4246_);
lean_ctor_set(v___x_4264_, 1, v___x_4263_);
v___x_4265_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_4265_, 0, v_u_4246_);
lean_ctor_set(v___x_4265_, 1, v___x_4264_);
lean_inc_ref(v___x_4265_);
v___x_4266_ = l_Lean_mkConst(v_instDeclName_4247_, v___x_4265_);
lean_inc_ref_n(v_type_4245_, 3);
v___x_4267_ = l_Lean_mkApp3(v___x_4266_, v_type_4245_, v_type_4245_, v_type_4245_);
lean_inc(v___y_4260_);
lean_inc_ref(v___y_4259_);
lean_inc(v___y_4258_);
lean_inc_ref(v___y_4257_);
v___x_4268_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12(v___x_4267_, v___y_4250_, v___y_4251_, v___y_4252_, v___y_4253_, v___y_4254_, v___y_4255_, v___y_4256_, v___y_4257_, v___y_4258_, v___y_4259_, v___y_4260_);
if (lean_obj_tag(v___x_4268_) == 0)
{
lean_object* v_a_4269_; lean_object* v___x_4270_; 
v_a_4269_ = lean_ctor_get(v___x_4268_, 0);
lean_inc(v_a_4269_);
lean_dec_ref(v___x_4268_);
lean_inc(v___y_4260_);
lean_inc_ref(v___y_4259_);
lean_inc(v___y_4258_);
lean_inc_ref(v___y_4257_);
lean_inc(v_a_4269_);
lean_inc(v_declName_4248_);
v___x_4270_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v_declName_4248_, v_a_4269_, v_expectedInst_4249_, v___y_4257_, v___y_4258_, v___y_4259_, v___y_4260_);
if (lean_obj_tag(v___x_4270_) == 0)
{
lean_object* v___x_4271_; lean_object* v___x_4272_; lean_object* v___x_4273_; 
lean_dec_ref(v___x_4270_);
v___x_4271_ = l_Lean_mkConst(v_declName_4248_, v___x_4265_);
lean_inc_ref_n(v_type_4245_, 2);
v___x_4272_ = l_Lean_mkApp4(v___x_4271_, v_type_4245_, v_type_4245_, v_type_4245_, v_a_4269_);
lean_inc(v___y_4256_);
v___x_4273_ = lean_grind_canon(v___x_4272_, v___y_4251_, v___y_4252_, v___y_4253_, v___y_4254_, v___y_4255_, v___y_4256_, v___y_4257_, v___y_4258_, v___y_4259_, v___y_4260_);
if (lean_obj_tag(v___x_4273_) == 0)
{
lean_object* v_a_4274_; lean_object* v___x_4275_; 
v_a_4274_ = lean_ctor_get(v___x_4273_, 0);
lean_inc(v_a_4274_);
lean_dec_ref(v___x_4273_);
v___x_4275_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_4274_, v___y_4256_);
lean_dec(v___y_4256_);
return v___x_4275_;
}
else
{
lean_dec(v___y_4256_);
return v___x_4273_;
}
}
else
{
lean_object* v_a_4276_; lean_object* v___x_4278_; uint8_t v_isShared_4279_; uint8_t v_isSharedCheck_4283_; 
lean_dec(v_a_4269_);
lean_dec_ref(v___x_4265_);
lean_dec(v___y_4260_);
lean_dec_ref(v___y_4259_);
lean_dec(v___y_4258_);
lean_dec_ref(v___y_4257_);
lean_dec(v___y_4256_);
lean_dec_ref(v___y_4255_);
lean_dec(v___y_4254_);
lean_dec_ref(v___y_4253_);
lean_dec(v___y_4252_);
lean_dec(v___y_4251_);
lean_dec(v_declName_4248_);
lean_dec_ref(v_type_4245_);
v_a_4276_ = lean_ctor_get(v___x_4270_, 0);
v_isSharedCheck_4283_ = !lean_is_exclusive(v___x_4270_);
if (v_isSharedCheck_4283_ == 0)
{
v___x_4278_ = v___x_4270_;
v_isShared_4279_ = v_isSharedCheck_4283_;
goto v_resetjp_4277_;
}
else
{
lean_inc(v_a_4276_);
lean_dec(v___x_4270_);
v___x_4278_ = lean_box(0);
v_isShared_4279_ = v_isSharedCheck_4283_;
goto v_resetjp_4277_;
}
v_resetjp_4277_:
{
lean_object* v___x_4281_; 
if (v_isShared_4279_ == 0)
{
v___x_4281_ = v___x_4278_;
goto v_reusejp_4280_;
}
else
{
lean_object* v_reuseFailAlloc_4282_; 
v_reuseFailAlloc_4282_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4282_, 0, v_a_4276_);
v___x_4281_ = v_reuseFailAlloc_4282_;
goto v_reusejp_4280_;
}
v_reusejp_4280_:
{
return v___x_4281_;
}
}
}
}
else
{
lean_dec_ref(v___x_4265_);
lean_dec(v___y_4260_);
lean_dec_ref(v___y_4259_);
lean_dec(v___y_4258_);
lean_dec_ref(v___y_4257_);
lean_dec(v___y_4256_);
lean_dec_ref(v___y_4255_);
lean_dec(v___y_4254_);
lean_dec_ref(v___y_4253_);
lean_dec(v___y_4252_);
lean_dec(v___y_4251_);
lean_dec_ref(v_expectedInst_4249_);
lean_dec(v_declName_4248_);
lean_dec_ref(v_type_4245_);
return v___x_4268_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3___boxed(lean_object** _args){
lean_object* v_type_4284_ = _args[0];
lean_object* v_u_4285_ = _args[1];
lean_object* v_instDeclName_4286_ = _args[2];
lean_object* v_declName_4287_ = _args[3];
lean_object* v_expectedInst_4288_ = _args[4];
lean_object* v___y_4289_ = _args[5];
lean_object* v___y_4290_ = _args[6];
lean_object* v___y_4291_ = _args[7];
lean_object* v___y_4292_ = _args[8];
lean_object* v___y_4293_ = _args[9];
lean_object* v___y_4294_ = _args[10];
lean_object* v___y_4295_ = _args[11];
lean_object* v___y_4296_ = _args[12];
lean_object* v___y_4297_ = _args[13];
lean_object* v___y_4298_ = _args[14];
lean_object* v___y_4299_ = _args[15];
lean_object* v___y_4300_ = _args[16];
_start:
{
lean_object* v_res_4301_; 
v_res_4301_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3(v_type_4284_, v_u_4285_, v_instDeclName_4286_, v_declName_4287_, v_expectedInst_4288_, v___y_4289_, v___y_4290_, v___y_4291_, v___y_4292_, v___y_4293_, v___y_4294_, v___y_4295_, v___y_4296_, v___y_4297_, v___y_4298_, v___y_4299_);
lean_dec(v___y_4289_);
return v_res_4301_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3_spec__5___lam__0(lean_object* v_a_4302_, lean_object* v_s_4303_){
_start:
{
lean_object* v_id_4304_; lean_object* v_type_4305_; lean_object* v_u_4306_; lean_object* v_ringInst_4307_; lean_object* v_semiringInst_4308_; lean_object* v_charInst_x3f_4309_; lean_object* v_addFn_x3f_4310_; lean_object* v_subFn_x3f_4311_; lean_object* v_negFn_x3f_4312_; lean_object* v_powFn_x3f_4313_; lean_object* v_intCastFn_x3f_4314_; lean_object* v_natCastFn_x3f_4315_; lean_object* v_one_x3f_4316_; lean_object* v_vars_4317_; lean_object* v_varMap_4318_; lean_object* v_denote_4319_; lean_object* v___x_4321_; uint8_t v_isShared_4322_; uint8_t v_isSharedCheck_4327_; 
v_id_4304_ = lean_ctor_get(v_s_4303_, 0);
v_type_4305_ = lean_ctor_get(v_s_4303_, 1);
v_u_4306_ = lean_ctor_get(v_s_4303_, 2);
v_ringInst_4307_ = lean_ctor_get(v_s_4303_, 3);
v_semiringInst_4308_ = lean_ctor_get(v_s_4303_, 4);
v_charInst_x3f_4309_ = lean_ctor_get(v_s_4303_, 5);
v_addFn_x3f_4310_ = lean_ctor_get(v_s_4303_, 6);
v_subFn_x3f_4311_ = lean_ctor_get(v_s_4303_, 8);
v_negFn_x3f_4312_ = lean_ctor_get(v_s_4303_, 9);
v_powFn_x3f_4313_ = lean_ctor_get(v_s_4303_, 10);
v_intCastFn_x3f_4314_ = lean_ctor_get(v_s_4303_, 11);
v_natCastFn_x3f_4315_ = lean_ctor_get(v_s_4303_, 12);
v_one_x3f_4316_ = lean_ctor_get(v_s_4303_, 13);
v_vars_4317_ = lean_ctor_get(v_s_4303_, 14);
v_varMap_4318_ = lean_ctor_get(v_s_4303_, 15);
v_denote_4319_ = lean_ctor_get(v_s_4303_, 16);
v_isSharedCheck_4327_ = !lean_is_exclusive(v_s_4303_);
if (v_isSharedCheck_4327_ == 0)
{
lean_object* v_unused_4328_; 
v_unused_4328_ = lean_ctor_get(v_s_4303_, 7);
lean_dec(v_unused_4328_);
v___x_4321_ = v_s_4303_;
v_isShared_4322_ = v_isSharedCheck_4327_;
goto v_resetjp_4320_;
}
else
{
lean_inc(v_denote_4319_);
lean_inc(v_varMap_4318_);
lean_inc(v_vars_4317_);
lean_inc(v_one_x3f_4316_);
lean_inc(v_natCastFn_x3f_4315_);
lean_inc(v_intCastFn_x3f_4314_);
lean_inc(v_powFn_x3f_4313_);
lean_inc(v_negFn_x3f_4312_);
lean_inc(v_subFn_x3f_4311_);
lean_inc(v_addFn_x3f_4310_);
lean_inc(v_charInst_x3f_4309_);
lean_inc(v_semiringInst_4308_);
lean_inc(v_ringInst_4307_);
lean_inc(v_u_4306_);
lean_inc(v_type_4305_);
lean_inc(v_id_4304_);
lean_dec(v_s_4303_);
v___x_4321_ = lean_box(0);
v_isShared_4322_ = v_isSharedCheck_4327_;
goto v_resetjp_4320_;
}
v_resetjp_4320_:
{
lean_object* v___x_4323_; lean_object* v___x_4325_; 
v___x_4323_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_4323_, 0, v_a_4302_);
if (v_isShared_4322_ == 0)
{
lean_ctor_set(v___x_4321_, 7, v___x_4323_);
v___x_4325_ = v___x_4321_;
goto v_reusejp_4324_;
}
else
{
lean_object* v_reuseFailAlloc_4326_; 
v_reuseFailAlloc_4326_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_4326_, 0, v_id_4304_);
lean_ctor_set(v_reuseFailAlloc_4326_, 1, v_type_4305_);
lean_ctor_set(v_reuseFailAlloc_4326_, 2, v_u_4306_);
lean_ctor_set(v_reuseFailAlloc_4326_, 3, v_ringInst_4307_);
lean_ctor_set(v_reuseFailAlloc_4326_, 4, v_semiringInst_4308_);
lean_ctor_set(v_reuseFailAlloc_4326_, 5, v_charInst_x3f_4309_);
lean_ctor_set(v_reuseFailAlloc_4326_, 6, v_addFn_x3f_4310_);
lean_ctor_set(v_reuseFailAlloc_4326_, 7, v___x_4323_);
lean_ctor_set(v_reuseFailAlloc_4326_, 8, v_subFn_x3f_4311_);
lean_ctor_set(v_reuseFailAlloc_4326_, 9, v_negFn_x3f_4312_);
lean_ctor_set(v_reuseFailAlloc_4326_, 10, v_powFn_x3f_4313_);
lean_ctor_set(v_reuseFailAlloc_4326_, 11, v_intCastFn_x3f_4314_);
lean_ctor_set(v_reuseFailAlloc_4326_, 12, v_natCastFn_x3f_4315_);
lean_ctor_set(v_reuseFailAlloc_4326_, 13, v_one_x3f_4316_);
lean_ctor_set(v_reuseFailAlloc_4326_, 14, v_vars_4317_);
lean_ctor_set(v_reuseFailAlloc_4326_, 15, v_varMap_4318_);
lean_ctor_set(v_reuseFailAlloc_4326_, 16, v_denote_4319_);
v___x_4325_ = v_reuseFailAlloc_4326_;
goto v_reusejp_4324_;
}
v_reusejp_4324_:
{
return v___x_4325_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3_spec__5(lean_object* v___y_4329_, lean_object* v___y_4330_, lean_object* v___y_4331_, lean_object* v___y_4332_, lean_object* v___y_4333_, lean_object* v___y_4334_, lean_object* v___y_4335_, lean_object* v___y_4336_, lean_object* v___y_4337_, lean_object* v___y_4338_, lean_object* v___y_4339_){
_start:
{
lean_object* v___x_4341_; 
v___x_4341_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_getRing(v___y_4329_, v___y_4330_, v___y_4331_, v___y_4332_, v___y_4333_, v___y_4334_, v___y_4335_, v___y_4336_, v___y_4337_, v___y_4338_, v___y_4339_);
if (lean_obj_tag(v___x_4341_) == 0)
{
lean_object* v_a_4342_; lean_object* v___x_4344_; uint8_t v_isShared_4345_; uint8_t v_isSharedCheck_4384_; 
v_a_4342_ = lean_ctor_get(v___x_4341_, 0);
v_isSharedCheck_4384_ = !lean_is_exclusive(v___x_4341_);
if (v_isSharedCheck_4384_ == 0)
{
v___x_4344_ = v___x_4341_;
v_isShared_4345_ = v_isSharedCheck_4384_;
goto v_resetjp_4343_;
}
else
{
lean_inc(v_a_4342_);
lean_dec(v___x_4341_);
v___x_4344_ = lean_box(0);
v_isShared_4345_ = v_isSharedCheck_4384_;
goto v_resetjp_4343_;
}
v_resetjp_4343_:
{
lean_object* v_mulFn_x3f_4346_; 
v_mulFn_x3f_4346_ = lean_ctor_get(v_a_4342_, 7);
if (lean_obj_tag(v_mulFn_x3f_4346_) == 1)
{
lean_object* v_val_4347_; lean_object* v___x_4349_; 
lean_inc_ref(v_mulFn_x3f_4346_);
lean_dec(v_a_4342_);
lean_dec(v___y_4339_);
lean_dec_ref(v___y_4338_);
lean_dec(v___y_4337_);
lean_dec_ref(v___y_4336_);
lean_dec(v___y_4335_);
lean_dec_ref(v___y_4334_);
lean_dec(v___y_4333_);
lean_dec_ref(v___y_4332_);
lean_dec(v___y_4331_);
lean_dec(v___y_4330_);
lean_dec(v___y_4329_);
v_val_4347_ = lean_ctor_get(v_mulFn_x3f_4346_, 0);
lean_inc(v_val_4347_);
lean_dec_ref(v_mulFn_x3f_4346_);
if (v_isShared_4345_ == 0)
{
lean_ctor_set(v___x_4344_, 0, v_val_4347_);
v___x_4349_ = v___x_4344_;
goto v_reusejp_4348_;
}
else
{
lean_object* v_reuseFailAlloc_4350_; 
v_reuseFailAlloc_4350_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4350_, 0, v_val_4347_);
v___x_4349_ = v_reuseFailAlloc_4350_;
goto v_reusejp_4348_;
}
v_reusejp_4348_:
{
return v___x_4349_;
}
}
else
{
lean_object* v_type_4351_; lean_object* v_u_4352_; lean_object* v_semiringInst_4353_; lean_object* v___x_4354_; lean_object* v___x_4355_; lean_object* v___x_4356_; lean_object* v___x_4357_; lean_object* v___x_4358_; lean_object* v___x_4359_; lean_object* v___x_4360_; lean_object* v_expectedInst_4361_; lean_object* v___x_4362_; lean_object* v___x_4363_; lean_object* v___x_4364_; 
lean_del_object(v___x_4344_);
v_type_4351_ = lean_ctor_get(v_a_4342_, 1);
lean_inc_ref(v_type_4351_);
v_u_4352_ = lean_ctor_get(v_a_4342_, 2);
lean_inc(v_u_4352_);
v_semiringInst_4353_ = lean_ctor_get(v_a_4342_, 4);
lean_inc_ref(v_semiringInst_4353_);
lean_dec(v_a_4342_);
v___x_4354_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__1));
v___x_4355_ = lean_box(0);
lean_inc(v_u_4352_);
v___x_4356_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_4356_, 0, v_u_4352_);
lean_ctor_set(v___x_4356_, 1, v___x_4355_);
lean_inc_ref(v___x_4356_);
v___x_4357_ = l_Lean_mkConst(v___x_4354_, v___x_4356_);
v___x_4358_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6));
v___x_4359_ = l_Lean_mkConst(v___x_4358_, v___x_4356_);
lean_inc_ref(v_type_4351_);
v___x_4360_ = l_Lean_mkAppB(v___x_4359_, v_type_4351_, v_semiringInst_4353_);
lean_inc_ref(v_type_4351_);
v_expectedInst_4361_ = l_Lean_mkAppB(v___x_4357_, v_type_4351_, v___x_4360_);
v___x_4362_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__7));
v___x_4363_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
lean_inc(v___y_4330_);
v___x_4364_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3(v_type_4351_, v_u_4352_, v___x_4362_, v___x_4363_, v_expectedInst_4361_, v___y_4329_, v___y_4330_, v___y_4331_, v___y_4332_, v___y_4333_, v___y_4334_, v___y_4335_, v___y_4336_, v___y_4337_, v___y_4338_, v___y_4339_);
if (lean_obj_tag(v___x_4364_) == 0)
{
lean_object* v_a_4365_; lean_object* v___f_4366_; lean_object* v___x_4367_; 
v_a_4365_ = lean_ctor_get(v___x_4364_, 0);
lean_inc(v_a_4365_);
lean_dec_ref(v___x_4364_);
lean_inc(v_a_4365_);
v___f_4366_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3_spec__5___lam__0), 2, 1);
lean_closure_set(v___f_4366_, 0, v_a_4365_);
v___x_4367_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_modifyRing___redArg(v___f_4366_, v___y_4329_, v___y_4330_);
lean_dec(v___y_4330_);
if (lean_obj_tag(v___x_4367_) == 0)
{
lean_object* v___x_4369_; uint8_t v_isShared_4370_; uint8_t v_isSharedCheck_4374_; 
v_isSharedCheck_4374_ = !lean_is_exclusive(v___x_4367_);
if (v_isSharedCheck_4374_ == 0)
{
lean_object* v_unused_4375_; 
v_unused_4375_ = lean_ctor_get(v___x_4367_, 0);
lean_dec(v_unused_4375_);
v___x_4369_ = v___x_4367_;
v_isShared_4370_ = v_isSharedCheck_4374_;
goto v_resetjp_4368_;
}
else
{
lean_dec(v___x_4367_);
v___x_4369_ = lean_box(0);
v_isShared_4370_ = v_isSharedCheck_4374_;
goto v_resetjp_4368_;
}
v_resetjp_4368_:
{
lean_object* v___x_4372_; 
if (v_isShared_4370_ == 0)
{
lean_ctor_set(v___x_4369_, 0, v_a_4365_);
v___x_4372_ = v___x_4369_;
goto v_reusejp_4371_;
}
else
{
lean_object* v_reuseFailAlloc_4373_; 
v_reuseFailAlloc_4373_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4373_, 0, v_a_4365_);
v___x_4372_ = v_reuseFailAlloc_4373_;
goto v_reusejp_4371_;
}
v_reusejp_4371_:
{
return v___x_4372_;
}
}
}
else
{
lean_object* v_a_4376_; lean_object* v___x_4378_; uint8_t v_isShared_4379_; uint8_t v_isSharedCheck_4383_; 
lean_dec(v_a_4365_);
v_a_4376_ = lean_ctor_get(v___x_4367_, 0);
v_isSharedCheck_4383_ = !lean_is_exclusive(v___x_4367_);
if (v_isSharedCheck_4383_ == 0)
{
v___x_4378_ = v___x_4367_;
v_isShared_4379_ = v_isSharedCheck_4383_;
goto v_resetjp_4377_;
}
else
{
lean_inc(v_a_4376_);
lean_dec(v___x_4367_);
v___x_4378_ = lean_box(0);
v_isShared_4379_ = v_isSharedCheck_4383_;
goto v_resetjp_4377_;
}
v_resetjp_4377_:
{
lean_object* v___x_4381_; 
if (v_isShared_4379_ == 0)
{
v___x_4381_ = v___x_4378_;
goto v_reusejp_4380_;
}
else
{
lean_object* v_reuseFailAlloc_4382_; 
v_reuseFailAlloc_4382_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4382_, 0, v_a_4376_);
v___x_4381_ = v_reuseFailAlloc_4382_;
goto v_reusejp_4380_;
}
v_reusejp_4380_:
{
return v___x_4381_;
}
}
}
}
else
{
lean_dec(v___y_4330_);
lean_dec(v___y_4329_);
return v___x_4364_;
}
}
}
}
else
{
lean_object* v_a_4385_; lean_object* v___x_4387_; uint8_t v_isShared_4388_; uint8_t v_isSharedCheck_4392_; 
lean_dec(v___y_4339_);
lean_dec_ref(v___y_4338_);
lean_dec(v___y_4337_);
lean_dec_ref(v___y_4336_);
lean_dec(v___y_4335_);
lean_dec_ref(v___y_4334_);
lean_dec(v___y_4333_);
lean_dec_ref(v___y_4332_);
lean_dec(v___y_4331_);
lean_dec(v___y_4330_);
lean_dec(v___y_4329_);
v_a_4385_ = lean_ctor_get(v___x_4341_, 0);
v_isSharedCheck_4392_ = !lean_is_exclusive(v___x_4341_);
if (v_isSharedCheck_4392_ == 0)
{
v___x_4387_ = v___x_4341_;
v_isShared_4388_ = v_isSharedCheck_4392_;
goto v_resetjp_4386_;
}
else
{
lean_inc(v_a_4385_);
lean_dec(v___x_4341_);
v___x_4387_ = lean_box(0);
v_isShared_4388_ = v_isSharedCheck_4392_;
goto v_resetjp_4386_;
}
v_resetjp_4386_:
{
lean_object* v___x_4390_; 
if (v_isShared_4388_ == 0)
{
v___x_4390_ = v___x_4387_;
goto v_reusejp_4389_;
}
else
{
lean_object* v_reuseFailAlloc_4391_; 
v_reuseFailAlloc_4391_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4391_, 0, v_a_4385_);
v___x_4390_ = v_reuseFailAlloc_4391_;
goto v_reusejp_4389_;
}
v_reusejp_4389_:
{
return v___x_4390_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3_spec__5___boxed(lean_object* v___y_4393_, lean_object* v___y_4394_, lean_object* v___y_4395_, lean_object* v___y_4396_, lean_object* v___y_4397_, lean_object* v___y_4398_, lean_object* v___y_4399_, lean_object* v___y_4400_, lean_object* v___y_4401_, lean_object* v___y_4402_, lean_object* v___y_4403_, lean_object* v___y_4404_){
_start:
{
lean_object* v_res_4405_; 
v_res_4405_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3_spec__5(v___y_4393_, v___y_4394_, v___y_4395_, v___y_4396_, v___y_4397_, v___y_4398_, v___y_4399_, v___y_4400_, v___y_4401_, v___y_4402_, v___y_4403_);
return v_res_4405_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3(lean_object* v_inst_4406_, lean_object* v___y_4407_, lean_object* v___y_4408_, lean_object* v___y_4409_, lean_object* v___y_4410_, lean_object* v___y_4411_, lean_object* v___y_4412_, lean_object* v___y_4413_, lean_object* v___y_4414_, lean_object* v___y_4415_, lean_object* v___y_4416_, lean_object* v___y_4417_){
_start:
{
lean_object* v___x_4419_; 
v___x_4419_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3_spec__5(v___y_4407_, v___y_4408_, v___y_4409_, v___y_4410_, v___y_4411_, v___y_4412_, v___y_4413_, v___y_4414_, v___y_4415_, v___y_4416_, v___y_4417_);
if (lean_obj_tag(v___x_4419_) == 0)
{
lean_object* v_a_4420_; lean_object* v___x_4422_; uint8_t v_isShared_4423_; uint8_t v_isSharedCheck_4430_; 
v_a_4420_ = lean_ctor_get(v___x_4419_, 0);
v_isSharedCheck_4430_ = !lean_is_exclusive(v___x_4419_);
if (v_isSharedCheck_4430_ == 0)
{
v___x_4422_ = v___x_4419_;
v_isShared_4423_ = v_isSharedCheck_4430_;
goto v_resetjp_4421_;
}
else
{
lean_inc(v_a_4420_);
lean_dec(v___x_4419_);
v___x_4422_ = lean_box(0);
v_isShared_4423_ = v_isSharedCheck_4430_;
goto v_resetjp_4421_;
}
v_resetjp_4421_:
{
lean_object* v___x_4424_; uint8_t v___x_4425_; lean_object* v___x_4426_; lean_object* v___x_4428_; 
v___x_4424_ = l_Lean_Expr_appArg_x21(v_a_4420_);
lean_dec(v_a_4420_);
v___x_4425_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_4424_, v_inst_4406_);
lean_dec_ref(v___x_4424_);
v___x_4426_ = lean_box(v___x_4425_);
if (v_isShared_4423_ == 0)
{
lean_ctor_set(v___x_4422_, 0, v___x_4426_);
v___x_4428_ = v___x_4422_;
goto v_reusejp_4427_;
}
else
{
lean_object* v_reuseFailAlloc_4429_; 
v_reuseFailAlloc_4429_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4429_, 0, v___x_4426_);
v___x_4428_ = v_reuseFailAlloc_4429_;
goto v_reusejp_4427_;
}
v_reusejp_4427_:
{
return v___x_4428_;
}
}
}
else
{
lean_object* v_a_4431_; lean_object* v___x_4433_; uint8_t v_isShared_4434_; uint8_t v_isSharedCheck_4438_; 
v_a_4431_ = lean_ctor_get(v___x_4419_, 0);
v_isSharedCheck_4438_ = !lean_is_exclusive(v___x_4419_);
if (v_isSharedCheck_4438_ == 0)
{
v___x_4433_ = v___x_4419_;
v_isShared_4434_ = v_isSharedCheck_4438_;
goto v_resetjp_4432_;
}
else
{
lean_inc(v_a_4431_);
lean_dec(v___x_4419_);
v___x_4433_ = lean_box(0);
v_isShared_4434_ = v_isSharedCheck_4438_;
goto v_resetjp_4432_;
}
v_resetjp_4432_:
{
lean_object* v___x_4436_; 
if (v_isShared_4434_ == 0)
{
v___x_4436_ = v___x_4433_;
goto v_reusejp_4435_;
}
else
{
lean_object* v_reuseFailAlloc_4437_; 
v_reuseFailAlloc_4437_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4437_, 0, v_a_4431_);
v___x_4436_ = v_reuseFailAlloc_4437_;
goto v_reusejp_4435_;
}
v_reusejp_4435_:
{
return v___x_4436_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3___boxed(lean_object* v_inst_4439_, lean_object* v___y_4440_, lean_object* v___y_4441_, lean_object* v___y_4442_, lean_object* v___y_4443_, lean_object* v___y_4444_, lean_object* v___y_4445_, lean_object* v___y_4446_, lean_object* v___y_4447_, lean_object* v___y_4448_, lean_object* v___y_4449_, lean_object* v___y_4450_, lean_object* v___y_4451_){
_start:
{
lean_object* v_res_4452_; 
v_res_4452_ = l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3(v_inst_4439_, v___y_4440_, v___y_4441_, v___y_4442_, v___y_4443_, v___y_4444_, v___y_4445_, v___y_4446_, v___y_4447_, v___y_4448_, v___y_4449_, v___y_4450_);
lean_dec_ref(v_inst_4439_);
return v_res_4452_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__0___lam__0(lean_object* v_e_4453_, lean_object* v_size_4454_, lean_object* v_s_4455_){
_start:
{
lean_object* v_id_4456_; lean_object* v_type_4457_; lean_object* v_u_4458_; lean_object* v_ringInst_4459_; lean_object* v_semiringInst_4460_; lean_object* v_charInst_x3f_4461_; lean_object* v_addFn_x3f_4462_; lean_object* v_mulFn_x3f_4463_; lean_object* v_subFn_x3f_4464_; lean_object* v_negFn_x3f_4465_; lean_object* v_powFn_x3f_4466_; lean_object* v_intCastFn_x3f_4467_; lean_object* v_natCastFn_x3f_4468_; lean_object* v_one_x3f_4469_; lean_object* v_vars_4470_; lean_object* v_varMap_4471_; lean_object* v_denote_4472_; lean_object* v___x_4474_; uint8_t v_isShared_4475_; uint8_t v_isSharedCheck_4481_; 
v_id_4456_ = lean_ctor_get(v_s_4455_, 0);
v_type_4457_ = lean_ctor_get(v_s_4455_, 1);
v_u_4458_ = lean_ctor_get(v_s_4455_, 2);
v_ringInst_4459_ = lean_ctor_get(v_s_4455_, 3);
v_semiringInst_4460_ = lean_ctor_get(v_s_4455_, 4);
v_charInst_x3f_4461_ = lean_ctor_get(v_s_4455_, 5);
v_addFn_x3f_4462_ = lean_ctor_get(v_s_4455_, 6);
v_mulFn_x3f_4463_ = lean_ctor_get(v_s_4455_, 7);
v_subFn_x3f_4464_ = lean_ctor_get(v_s_4455_, 8);
v_negFn_x3f_4465_ = lean_ctor_get(v_s_4455_, 9);
v_powFn_x3f_4466_ = lean_ctor_get(v_s_4455_, 10);
v_intCastFn_x3f_4467_ = lean_ctor_get(v_s_4455_, 11);
v_natCastFn_x3f_4468_ = lean_ctor_get(v_s_4455_, 12);
v_one_x3f_4469_ = lean_ctor_get(v_s_4455_, 13);
v_vars_4470_ = lean_ctor_get(v_s_4455_, 14);
v_varMap_4471_ = lean_ctor_get(v_s_4455_, 15);
v_denote_4472_ = lean_ctor_get(v_s_4455_, 16);
v_isSharedCheck_4481_ = !lean_is_exclusive(v_s_4455_);
if (v_isSharedCheck_4481_ == 0)
{
v___x_4474_ = v_s_4455_;
v_isShared_4475_ = v_isSharedCheck_4481_;
goto v_resetjp_4473_;
}
else
{
lean_inc(v_denote_4472_);
lean_inc(v_varMap_4471_);
lean_inc(v_vars_4470_);
lean_inc(v_one_x3f_4469_);
lean_inc(v_natCastFn_x3f_4468_);
lean_inc(v_intCastFn_x3f_4467_);
lean_inc(v_powFn_x3f_4466_);
lean_inc(v_negFn_x3f_4465_);
lean_inc(v_subFn_x3f_4464_);
lean_inc(v_mulFn_x3f_4463_);
lean_inc(v_addFn_x3f_4462_);
lean_inc(v_charInst_x3f_4461_);
lean_inc(v_semiringInst_4460_);
lean_inc(v_ringInst_4459_);
lean_inc(v_u_4458_);
lean_inc(v_type_4457_);
lean_inc(v_id_4456_);
lean_dec(v_s_4455_);
v___x_4474_ = lean_box(0);
v_isShared_4475_ = v_isSharedCheck_4481_;
goto v_resetjp_4473_;
}
v_resetjp_4473_:
{
lean_object* v___x_4476_; lean_object* v___x_4477_; lean_object* v___x_4479_; 
lean_inc_ref(v_e_4453_);
v___x_4476_ = l_Lean_PersistentArray_push___redArg(v_vars_4470_, v_e_4453_);
v___x_4477_ = l_Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2___redArg(v_varMap_4471_, v_e_4453_, v_size_4454_);
if (v_isShared_4475_ == 0)
{
lean_ctor_set(v___x_4474_, 15, v___x_4477_);
lean_ctor_set(v___x_4474_, 14, v___x_4476_);
v___x_4479_ = v___x_4474_;
goto v_reusejp_4478_;
}
else
{
lean_object* v_reuseFailAlloc_4480_; 
v_reuseFailAlloc_4480_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_4480_, 0, v_id_4456_);
lean_ctor_set(v_reuseFailAlloc_4480_, 1, v_type_4457_);
lean_ctor_set(v_reuseFailAlloc_4480_, 2, v_u_4458_);
lean_ctor_set(v_reuseFailAlloc_4480_, 3, v_ringInst_4459_);
lean_ctor_set(v_reuseFailAlloc_4480_, 4, v_semiringInst_4460_);
lean_ctor_set(v_reuseFailAlloc_4480_, 5, v_charInst_x3f_4461_);
lean_ctor_set(v_reuseFailAlloc_4480_, 6, v_addFn_x3f_4462_);
lean_ctor_set(v_reuseFailAlloc_4480_, 7, v_mulFn_x3f_4463_);
lean_ctor_set(v_reuseFailAlloc_4480_, 8, v_subFn_x3f_4464_);
lean_ctor_set(v_reuseFailAlloc_4480_, 9, v_negFn_x3f_4465_);
lean_ctor_set(v_reuseFailAlloc_4480_, 10, v_powFn_x3f_4466_);
lean_ctor_set(v_reuseFailAlloc_4480_, 11, v_intCastFn_x3f_4467_);
lean_ctor_set(v_reuseFailAlloc_4480_, 12, v_natCastFn_x3f_4468_);
lean_ctor_set(v_reuseFailAlloc_4480_, 13, v_one_x3f_4469_);
lean_ctor_set(v_reuseFailAlloc_4480_, 14, v___x_4476_);
lean_ctor_set(v_reuseFailAlloc_4480_, 15, v___x_4477_);
lean_ctor_set(v_reuseFailAlloc_4480_, 16, v_denote_4472_);
v___x_4479_ = v_reuseFailAlloc_4480_;
goto v_reusejp_4478_;
}
v_reusejp_4478_:
{
return v___x_4479_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__0(lean_object* v_e_4482_, lean_object* v___y_4483_, lean_object* v___y_4484_, lean_object* v___y_4485_, lean_object* v___y_4486_, lean_object* v___y_4487_, lean_object* v___y_4488_, lean_object* v___y_4489_, lean_object* v___y_4490_, lean_object* v___y_4491_, lean_object* v___y_4492_, lean_object* v___y_4493_){
_start:
{
lean_object* v___x_4495_; 
v___x_4495_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_getRing(v___y_4483_, v___y_4484_, v___y_4485_, v___y_4486_, v___y_4487_, v___y_4488_, v___y_4489_, v___y_4490_, v___y_4491_, v___y_4492_, v___y_4493_);
if (lean_obj_tag(v___x_4495_) == 0)
{
lean_object* v_a_4496_; lean_object* v___x_4498_; uint8_t v_isShared_4499_; uint8_t v_isSharedCheck_4545_; 
v_a_4496_ = lean_ctor_get(v___x_4495_, 0);
v_isSharedCheck_4545_ = !lean_is_exclusive(v___x_4495_);
if (v_isSharedCheck_4545_ == 0)
{
v___x_4498_ = v___x_4495_;
v_isShared_4499_ = v_isSharedCheck_4545_;
goto v_resetjp_4497_;
}
else
{
lean_inc(v_a_4496_);
lean_dec(v___x_4495_);
v___x_4498_ = lean_box(0);
v_isShared_4499_ = v_isSharedCheck_4545_;
goto v_resetjp_4497_;
}
v_resetjp_4497_:
{
lean_object* v_vars_4500_; lean_object* v_varMap_4501_; lean_object* v___x_4502_; 
v_vars_4500_ = lean_ctor_get(v_a_4496_, 14);
lean_inc_ref(v_vars_4500_);
v_varMap_4501_ = lean_ctor_get(v_a_4496_, 15);
lean_inc_ref(v_varMap_4501_);
lean_dec(v_a_4496_);
v___x_4502_ = l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___redArg(v_varMap_4501_, v_e_4482_);
if (lean_obj_tag(v___x_4502_) == 1)
{
lean_object* v_val_4503_; lean_object* v___x_4505_; 
lean_dec_ref(v_vars_4500_);
lean_dec(v___y_4493_);
lean_dec_ref(v___y_4492_);
lean_dec(v___y_4491_);
lean_dec_ref(v___y_4490_);
lean_dec(v___y_4489_);
lean_dec_ref(v___y_4488_);
lean_dec(v___y_4487_);
lean_dec_ref(v___y_4486_);
lean_dec(v___y_4485_);
lean_dec(v___y_4484_);
lean_dec(v___y_4483_);
lean_dec_ref(v_e_4482_);
v_val_4503_ = lean_ctor_get(v___x_4502_, 0);
lean_inc(v_val_4503_);
lean_dec_ref(v___x_4502_);
if (v_isShared_4499_ == 0)
{
lean_ctor_set(v___x_4498_, 0, v_val_4503_);
v___x_4505_ = v___x_4498_;
goto v_reusejp_4504_;
}
else
{
lean_object* v_reuseFailAlloc_4506_; 
v_reuseFailAlloc_4506_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4506_, 0, v_val_4503_);
v___x_4505_ = v_reuseFailAlloc_4506_;
goto v_reusejp_4504_;
}
v_reusejp_4504_:
{
return v___x_4505_;
}
}
else
{
lean_object* v_size_4507_; lean_object* v___f_4508_; lean_object* v___x_4509_; 
lean_dec(v___x_4502_);
lean_del_object(v___x_4498_);
v_size_4507_ = lean_ctor_get(v_vars_4500_, 2);
lean_inc(v_size_4507_);
lean_dec_ref(v_vars_4500_);
lean_inc(v_size_4507_);
lean_inc_ref(v_e_4482_);
v___f_4508_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__0___lam__0), 3, 2);
lean_closure_set(v___f_4508_, 0, v_e_4482_);
lean_closure_set(v___f_4508_, 1, v_size_4507_);
lean_inc(v___y_4483_);
v___x_4509_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_modifyRing___redArg(v___f_4508_, v___y_4483_, v___y_4484_);
if (lean_obj_tag(v___x_4509_) == 0)
{
lean_object* v___x_4510_; 
lean_dec_ref(v___x_4509_);
lean_inc_ref(v_e_4482_);
v___x_4510_ = l_Lean_Meta_Grind_Arith_CommRing_setTermNonCommRingId(v_e_4482_, v___y_4483_, v___y_4484_, v___y_4485_, v___y_4486_, v___y_4487_, v___y_4488_, v___y_4489_, v___y_4490_, v___y_4491_, v___y_4492_, v___y_4493_);
if (lean_obj_tag(v___x_4510_) == 0)
{
lean_object* v___x_4511_; lean_object* v___x_4512_; 
lean_dec_ref(v___x_4510_);
v___x_4511_ = l_Lean_Meta_Grind_Arith_CommRing_ringExt;
v___x_4512_ = l_Lean_Meta_Grind_SolverExtension_markTerm___redArg(v___x_4511_, v_e_4482_, v___y_4484_, v___y_4485_, v___y_4486_, v___y_4487_, v___y_4488_, v___y_4489_, v___y_4490_, v___y_4491_, v___y_4492_, v___y_4493_);
if (lean_obj_tag(v___x_4512_) == 0)
{
lean_object* v___x_4514_; uint8_t v_isShared_4515_; uint8_t v_isSharedCheck_4519_; 
v_isSharedCheck_4519_ = !lean_is_exclusive(v___x_4512_);
if (v_isSharedCheck_4519_ == 0)
{
lean_object* v_unused_4520_; 
v_unused_4520_ = lean_ctor_get(v___x_4512_, 0);
lean_dec(v_unused_4520_);
v___x_4514_ = v___x_4512_;
v_isShared_4515_ = v_isSharedCheck_4519_;
goto v_resetjp_4513_;
}
else
{
lean_dec(v___x_4512_);
v___x_4514_ = lean_box(0);
v_isShared_4515_ = v_isSharedCheck_4519_;
goto v_resetjp_4513_;
}
v_resetjp_4513_:
{
lean_object* v___x_4517_; 
if (v_isShared_4515_ == 0)
{
lean_ctor_set(v___x_4514_, 0, v_size_4507_);
v___x_4517_ = v___x_4514_;
goto v_reusejp_4516_;
}
else
{
lean_object* v_reuseFailAlloc_4518_; 
v_reuseFailAlloc_4518_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4518_, 0, v_size_4507_);
v___x_4517_ = v_reuseFailAlloc_4518_;
goto v_reusejp_4516_;
}
v_reusejp_4516_:
{
return v___x_4517_;
}
}
}
else
{
lean_object* v_a_4521_; lean_object* v___x_4523_; uint8_t v_isShared_4524_; uint8_t v_isSharedCheck_4528_; 
lean_dec(v_size_4507_);
v_a_4521_ = lean_ctor_get(v___x_4512_, 0);
v_isSharedCheck_4528_ = !lean_is_exclusive(v___x_4512_);
if (v_isSharedCheck_4528_ == 0)
{
v___x_4523_ = v___x_4512_;
v_isShared_4524_ = v_isSharedCheck_4528_;
goto v_resetjp_4522_;
}
else
{
lean_inc(v_a_4521_);
lean_dec(v___x_4512_);
v___x_4523_ = lean_box(0);
v_isShared_4524_ = v_isSharedCheck_4528_;
goto v_resetjp_4522_;
}
v_resetjp_4522_:
{
lean_object* v___x_4526_; 
if (v_isShared_4524_ == 0)
{
v___x_4526_ = v___x_4523_;
goto v_reusejp_4525_;
}
else
{
lean_object* v_reuseFailAlloc_4527_; 
v_reuseFailAlloc_4527_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4527_, 0, v_a_4521_);
v___x_4526_ = v_reuseFailAlloc_4527_;
goto v_reusejp_4525_;
}
v_reusejp_4525_:
{
return v___x_4526_;
}
}
}
}
else
{
lean_object* v_a_4529_; lean_object* v___x_4531_; uint8_t v_isShared_4532_; uint8_t v_isSharedCheck_4536_; 
lean_dec(v_size_4507_);
lean_dec(v___y_4493_);
lean_dec_ref(v___y_4492_);
lean_dec(v___y_4491_);
lean_dec_ref(v___y_4490_);
lean_dec(v___y_4489_);
lean_dec_ref(v___y_4488_);
lean_dec(v___y_4487_);
lean_dec_ref(v___y_4486_);
lean_dec(v___y_4485_);
lean_dec(v___y_4484_);
lean_dec_ref(v_e_4482_);
v_a_4529_ = lean_ctor_get(v___x_4510_, 0);
v_isSharedCheck_4536_ = !lean_is_exclusive(v___x_4510_);
if (v_isSharedCheck_4536_ == 0)
{
v___x_4531_ = v___x_4510_;
v_isShared_4532_ = v_isSharedCheck_4536_;
goto v_resetjp_4530_;
}
else
{
lean_inc(v_a_4529_);
lean_dec(v___x_4510_);
v___x_4531_ = lean_box(0);
v_isShared_4532_ = v_isSharedCheck_4536_;
goto v_resetjp_4530_;
}
v_resetjp_4530_:
{
lean_object* v___x_4534_; 
if (v_isShared_4532_ == 0)
{
v___x_4534_ = v___x_4531_;
goto v_reusejp_4533_;
}
else
{
lean_object* v_reuseFailAlloc_4535_; 
v_reuseFailAlloc_4535_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4535_, 0, v_a_4529_);
v___x_4534_ = v_reuseFailAlloc_4535_;
goto v_reusejp_4533_;
}
v_reusejp_4533_:
{
return v___x_4534_;
}
}
}
}
else
{
lean_object* v_a_4537_; lean_object* v___x_4539_; uint8_t v_isShared_4540_; uint8_t v_isSharedCheck_4544_; 
lean_dec(v_size_4507_);
lean_dec(v___y_4493_);
lean_dec_ref(v___y_4492_);
lean_dec(v___y_4491_);
lean_dec_ref(v___y_4490_);
lean_dec(v___y_4489_);
lean_dec_ref(v___y_4488_);
lean_dec(v___y_4487_);
lean_dec_ref(v___y_4486_);
lean_dec(v___y_4485_);
lean_dec(v___y_4484_);
lean_dec(v___y_4483_);
lean_dec_ref(v_e_4482_);
v_a_4537_ = lean_ctor_get(v___x_4509_, 0);
v_isSharedCheck_4544_ = !lean_is_exclusive(v___x_4509_);
if (v_isSharedCheck_4544_ == 0)
{
v___x_4539_ = v___x_4509_;
v_isShared_4540_ = v_isSharedCheck_4544_;
goto v_resetjp_4538_;
}
else
{
lean_inc(v_a_4537_);
lean_dec(v___x_4509_);
v___x_4539_ = lean_box(0);
v_isShared_4540_ = v_isSharedCheck_4544_;
goto v_resetjp_4538_;
}
v_resetjp_4538_:
{
lean_object* v___x_4542_; 
if (v_isShared_4540_ == 0)
{
v___x_4542_ = v___x_4539_;
goto v_reusejp_4541_;
}
else
{
lean_object* v_reuseFailAlloc_4543_; 
v_reuseFailAlloc_4543_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4543_, 0, v_a_4537_);
v___x_4542_ = v_reuseFailAlloc_4543_;
goto v_reusejp_4541_;
}
v_reusejp_4541_:
{
return v___x_4542_;
}
}
}
}
}
}
else
{
lean_object* v_a_4546_; lean_object* v___x_4548_; uint8_t v_isShared_4549_; uint8_t v_isSharedCheck_4553_; 
lean_dec(v___y_4493_);
lean_dec_ref(v___y_4492_);
lean_dec(v___y_4491_);
lean_dec_ref(v___y_4490_);
lean_dec(v___y_4489_);
lean_dec_ref(v___y_4488_);
lean_dec(v___y_4487_);
lean_dec_ref(v___y_4486_);
lean_dec(v___y_4485_);
lean_dec(v___y_4484_);
lean_dec(v___y_4483_);
lean_dec_ref(v_e_4482_);
v_a_4546_ = lean_ctor_get(v___x_4495_, 0);
v_isSharedCheck_4553_ = !lean_is_exclusive(v___x_4495_);
if (v_isSharedCheck_4553_ == 0)
{
v___x_4548_ = v___x_4495_;
v_isShared_4549_ = v_isSharedCheck_4553_;
goto v_resetjp_4547_;
}
else
{
lean_inc(v_a_4546_);
lean_dec(v___x_4495_);
v___x_4548_ = lean_box(0);
v_isShared_4549_ = v_isSharedCheck_4553_;
goto v_resetjp_4547_;
}
v_resetjp_4547_:
{
lean_object* v___x_4551_; 
if (v_isShared_4549_ == 0)
{
v___x_4551_ = v___x_4548_;
goto v_reusejp_4550_;
}
else
{
lean_object* v_reuseFailAlloc_4552_; 
v_reuseFailAlloc_4552_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4552_, 0, v_a_4546_);
v___x_4551_ = v_reuseFailAlloc_4552_;
goto v_reusejp_4550_;
}
v_reusejp_4550_:
{
return v___x_4551_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__0___boxed(lean_object* v_e_4554_, lean_object* v___y_4555_, lean_object* v___y_4556_, lean_object* v___y_4557_, lean_object* v___y_4558_, lean_object* v___y_4559_, lean_object* v___y_4560_, lean_object* v___y_4561_, lean_object* v___y_4562_, lean_object* v___y_4563_, lean_object* v___y_4564_, lean_object* v___y_4565_, lean_object* v___y_4566_){
_start:
{
lean_object* v_res_4567_; 
v_res_4567_ = l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__0(v_e_4554_, v___y_4555_, v___y_4556_, v___y_4557_, v___y_4558_, v___y_4559_, v___y_4560_, v___y_4561_, v___y_4562_, v___y_4563_, v___y_4564_, v___y_4565_);
return v_res_4567_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__0(lean_object* v_gen_4568_, lean_object* v_e_4569_, lean_object* v___y_4570_, lean_object* v___y_4571_, lean_object* v___y_4572_, lean_object* v___y_4573_, lean_object* v___y_4574_, lean_object* v___y_4575_, lean_object* v___y_4576_, lean_object* v___y_4577_, lean_object* v___y_4578_, lean_object* v___y_4579_, lean_object* v___y_4580_){
_start:
{
lean_object* v___x_4582_; 
v___x_4582_ = l_Lean_Meta_Grind_alreadyInternalized___redArg(v_e_4569_, v___y_4571_);
if (lean_obj_tag(v___x_4582_) == 0)
{
lean_object* v_a_4583_; uint8_t v___x_4584_; 
v_a_4583_ = lean_ctor_get(v___x_4582_, 0);
lean_inc(v_a_4583_);
lean_dec_ref(v___x_4582_);
v___x_4584_ = lean_unbox(v_a_4583_);
lean_dec(v_a_4583_);
if (v___x_4584_ == 0)
{
lean_object* v___x_4585_; lean_object* v___x_4586_; 
v___x_4585_ = lean_box(0);
lean_inc(v___y_4580_);
lean_inc_ref(v___y_4579_);
lean_inc(v___y_4578_);
lean_inc_ref(v___y_4577_);
lean_inc(v___y_4576_);
lean_inc_ref(v___y_4575_);
lean_inc(v___y_4574_);
lean_inc_ref(v___y_4573_);
lean_inc(v___y_4572_);
lean_inc(v___y_4571_);
lean_inc_ref(v_e_4569_);
v___x_4586_ = lean_grind_internalize(v_e_4569_, v_gen_4568_, v___x_4585_, v___y_4571_, v___y_4572_, v___y_4573_, v___y_4574_, v___y_4575_, v___y_4576_, v___y_4577_, v___y_4578_, v___y_4579_, v___y_4580_);
if (lean_obj_tag(v___x_4586_) == 0)
{
lean_object* v___x_4587_; 
lean_dec_ref(v___x_4586_);
v___x_4587_ = l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__0(v_e_4569_, v___y_4570_, v___y_4571_, v___y_4572_, v___y_4573_, v___y_4574_, v___y_4575_, v___y_4576_, v___y_4577_, v___y_4578_, v___y_4579_, v___y_4580_);
return v___x_4587_;
}
else
{
lean_object* v_a_4588_; lean_object* v___x_4590_; uint8_t v_isShared_4591_; uint8_t v_isSharedCheck_4595_; 
lean_dec(v___y_4580_);
lean_dec_ref(v___y_4579_);
lean_dec(v___y_4578_);
lean_dec_ref(v___y_4577_);
lean_dec(v___y_4576_);
lean_dec_ref(v___y_4575_);
lean_dec(v___y_4574_);
lean_dec_ref(v___y_4573_);
lean_dec(v___y_4572_);
lean_dec(v___y_4571_);
lean_dec(v___y_4570_);
lean_dec_ref(v_e_4569_);
v_a_4588_ = lean_ctor_get(v___x_4586_, 0);
v_isSharedCheck_4595_ = !lean_is_exclusive(v___x_4586_);
if (v_isSharedCheck_4595_ == 0)
{
v___x_4590_ = v___x_4586_;
v_isShared_4591_ = v_isSharedCheck_4595_;
goto v_resetjp_4589_;
}
else
{
lean_inc(v_a_4588_);
lean_dec(v___x_4586_);
v___x_4590_ = lean_box(0);
v_isShared_4591_ = v_isSharedCheck_4595_;
goto v_resetjp_4589_;
}
v_resetjp_4589_:
{
lean_object* v___x_4593_; 
if (v_isShared_4591_ == 0)
{
v___x_4593_ = v___x_4590_;
goto v_reusejp_4592_;
}
else
{
lean_object* v_reuseFailAlloc_4594_; 
v_reuseFailAlloc_4594_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4594_, 0, v_a_4588_);
v___x_4593_ = v_reuseFailAlloc_4594_;
goto v_reusejp_4592_;
}
v_reusejp_4592_:
{
return v___x_4593_;
}
}
}
}
else
{
lean_object* v___x_4596_; 
lean_dec(v_gen_4568_);
v___x_4596_ = l_Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__0(v_e_4569_, v___y_4570_, v___y_4571_, v___y_4572_, v___y_4573_, v___y_4574_, v___y_4575_, v___y_4576_, v___y_4577_, v___y_4578_, v___y_4579_, v___y_4580_);
return v___x_4596_;
}
}
else
{
lean_object* v_a_4597_; lean_object* v___x_4599_; uint8_t v_isShared_4600_; uint8_t v_isSharedCheck_4604_; 
lean_dec(v___y_4580_);
lean_dec_ref(v___y_4579_);
lean_dec(v___y_4578_);
lean_dec_ref(v___y_4577_);
lean_dec(v___y_4576_);
lean_dec_ref(v___y_4575_);
lean_dec(v___y_4574_);
lean_dec_ref(v___y_4573_);
lean_dec(v___y_4572_);
lean_dec(v___y_4571_);
lean_dec(v___y_4570_);
lean_dec_ref(v_e_4569_);
lean_dec(v_gen_4568_);
v_a_4597_ = lean_ctor_get(v___x_4582_, 0);
v_isSharedCheck_4604_ = !lean_is_exclusive(v___x_4582_);
if (v_isSharedCheck_4604_ == 0)
{
v___x_4599_ = v___x_4582_;
v_isShared_4600_ = v_isSharedCheck_4604_;
goto v_resetjp_4598_;
}
else
{
lean_inc(v_a_4597_);
lean_dec(v___x_4582_);
v___x_4599_ = lean_box(0);
v_isShared_4600_ = v_isSharedCheck_4604_;
goto v_resetjp_4598_;
}
v_resetjp_4598_:
{
lean_object* v___x_4602_; 
if (v_isShared_4600_ == 0)
{
v___x_4602_ = v___x_4599_;
goto v_reusejp_4601_;
}
else
{
lean_object* v_reuseFailAlloc_4603_; 
v_reuseFailAlloc_4603_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4603_, 0, v_a_4597_);
v___x_4602_ = v_reuseFailAlloc_4603_;
goto v_reusejp_4601_;
}
v_reusejp_4601_:
{
return v___x_4602_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__0___boxed(lean_object* v_gen_4605_, lean_object* v_e_4606_, lean_object* v___y_4607_, lean_object* v___y_4608_, lean_object* v___y_4609_, lean_object* v___y_4610_, lean_object* v___y_4611_, lean_object* v___y_4612_, lean_object* v___y_4613_, lean_object* v___y_4614_, lean_object* v___y_4615_, lean_object* v___y_4616_, lean_object* v___y_4617_, lean_object* v___y_4618_){
_start:
{
lean_object* v_res_4619_; 
v_res_4619_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__0(v_gen_4605_, v_e_4606_, v___y_4607_, v___y_4608_, v___y_4609_, v___y_4610_, v___y_4611_, v___y_4612_, v___y_4613_, v___y_4614_, v___y_4615_, v___y_4616_, v___y_4617_);
return v_res_4619_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__2(lean_object* v_mkVar_4620_, lean_object* v_e_4621_, lean_object* v___y_4622_, lean_object* v___y_4623_, lean_object* v___y_4624_, lean_object* v___y_4625_, lean_object* v___y_4626_, lean_object* v___y_4627_, lean_object* v___y_4628_, lean_object* v___y_4629_, lean_object* v___y_4630_, lean_object* v___y_4631_, lean_object* v___y_4632_){
_start:
{
lean_object* v___x_4634_; 
lean_inc_ref(v_e_4621_);
v___x_4634_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg(v_e_4621_, v___y_4624_, v___y_4625_, v___y_4626_, v___y_4627_, v___y_4628_, v___y_4629_, v___y_4630_, v___y_4631_, v___y_4632_);
if (lean_obj_tag(v___x_4634_) == 0)
{
lean_object* v___x_4635_; 
lean_dec_ref(v___x_4634_);
v___x_4635_ = lean_apply_13(v_mkVar_4620_, v_e_4621_, v___y_4622_, v___y_4623_, v___y_4624_, v___y_4625_, v___y_4626_, v___y_4627_, v___y_4628_, v___y_4629_, v___y_4630_, v___y_4631_, v___y_4632_, lean_box(0));
if (lean_obj_tag(v___x_4635_) == 0)
{
lean_object* v_a_4636_; lean_object* v___x_4638_; uint8_t v_isShared_4639_; uint8_t v_isSharedCheck_4644_; 
v_a_4636_ = lean_ctor_get(v___x_4635_, 0);
v_isSharedCheck_4644_ = !lean_is_exclusive(v___x_4635_);
if (v_isSharedCheck_4644_ == 0)
{
v___x_4638_ = v___x_4635_;
v_isShared_4639_ = v_isSharedCheck_4644_;
goto v_resetjp_4637_;
}
else
{
lean_inc(v_a_4636_);
lean_dec(v___x_4635_);
v___x_4638_ = lean_box(0);
v_isShared_4639_ = v_isSharedCheck_4644_;
goto v_resetjp_4637_;
}
v_resetjp_4637_:
{
lean_object* v___x_4640_; lean_object* v___x_4642_; 
v___x_4640_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_4640_, 0, v_a_4636_);
if (v_isShared_4639_ == 0)
{
lean_ctor_set(v___x_4638_, 0, v___x_4640_);
v___x_4642_ = v___x_4638_;
goto v_reusejp_4641_;
}
else
{
lean_object* v_reuseFailAlloc_4643_; 
v_reuseFailAlloc_4643_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4643_, 0, v___x_4640_);
v___x_4642_ = v_reuseFailAlloc_4643_;
goto v_reusejp_4641_;
}
v_reusejp_4641_:
{
return v___x_4642_;
}
}
}
else
{
lean_object* v_a_4645_; lean_object* v___x_4647_; uint8_t v_isShared_4648_; uint8_t v_isSharedCheck_4652_; 
v_a_4645_ = lean_ctor_get(v___x_4635_, 0);
v_isSharedCheck_4652_ = !lean_is_exclusive(v___x_4635_);
if (v_isSharedCheck_4652_ == 0)
{
v___x_4647_ = v___x_4635_;
v_isShared_4648_ = v_isSharedCheck_4652_;
goto v_resetjp_4646_;
}
else
{
lean_inc(v_a_4645_);
lean_dec(v___x_4635_);
v___x_4647_ = lean_box(0);
v_isShared_4648_ = v_isSharedCheck_4652_;
goto v_resetjp_4646_;
}
v_resetjp_4646_:
{
lean_object* v___x_4650_; 
if (v_isShared_4648_ == 0)
{
v___x_4650_ = v___x_4647_;
goto v_reusejp_4649_;
}
else
{
lean_object* v_reuseFailAlloc_4651_; 
v_reuseFailAlloc_4651_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4651_, 0, v_a_4645_);
v___x_4650_ = v_reuseFailAlloc_4651_;
goto v_reusejp_4649_;
}
v_reusejp_4649_:
{
return v___x_4650_;
}
}
}
}
else
{
lean_object* v_a_4653_; lean_object* v___x_4655_; uint8_t v_isShared_4656_; uint8_t v_isSharedCheck_4660_; 
lean_dec(v___y_4632_);
lean_dec_ref(v___y_4631_);
lean_dec(v___y_4630_);
lean_dec_ref(v___y_4629_);
lean_dec(v___y_4628_);
lean_dec_ref(v___y_4627_);
lean_dec(v___y_4626_);
lean_dec_ref(v___y_4625_);
lean_dec(v___y_4624_);
lean_dec(v___y_4623_);
lean_dec(v___y_4622_);
lean_dec_ref(v_e_4621_);
lean_dec_ref(v_mkVar_4620_);
v_a_4653_ = lean_ctor_get(v___x_4634_, 0);
v_isSharedCheck_4660_ = !lean_is_exclusive(v___x_4634_);
if (v_isSharedCheck_4660_ == 0)
{
v___x_4655_ = v___x_4634_;
v_isShared_4656_ = v_isSharedCheck_4660_;
goto v_resetjp_4654_;
}
else
{
lean_inc(v_a_4653_);
lean_dec(v___x_4634_);
v___x_4655_ = lean_box(0);
v_isShared_4656_ = v_isSharedCheck_4660_;
goto v_resetjp_4654_;
}
v_resetjp_4654_:
{
lean_object* v___x_4658_; 
if (v_isShared_4656_ == 0)
{
v___x_4658_ = v___x_4655_;
goto v_reusejp_4657_;
}
else
{
lean_object* v_reuseFailAlloc_4659_; 
v_reuseFailAlloc_4659_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4659_, 0, v_a_4653_);
v___x_4658_ = v_reuseFailAlloc_4659_;
goto v_reusejp_4657_;
}
v_reusejp_4657_:
{
return v___x_4658_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__2___boxed(lean_object* v_mkVar_4661_, lean_object* v_e_4662_, lean_object* v___y_4663_, lean_object* v___y_4664_, lean_object* v___y_4665_, lean_object* v___y_4666_, lean_object* v___y_4667_, lean_object* v___y_4668_, lean_object* v___y_4669_, lean_object* v___y_4670_, lean_object* v___y_4671_, lean_object* v___y_4672_, lean_object* v___y_4673_, lean_object* v___y_4674_){
_start:
{
lean_object* v_res_4675_; 
v_res_4675_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__2(v_mkVar_4661_, v_e_4662_, v___y_4663_, v___y_4664_, v___y_4665_, v___y_4666_, v___y_4667_, v___y_4668_, v___y_4669_, v___y_4670_, v___y_4671_, v___y_4672_, v___y_4673_);
return v_res_4675_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7_spec__13___lam__0(lean_object* v_a_4676_, lean_object* v_s_4677_){
_start:
{
lean_object* v_id_4678_; lean_object* v_type_4679_; lean_object* v_u_4680_; lean_object* v_ringInst_4681_; lean_object* v_semiringInst_4682_; lean_object* v_charInst_x3f_4683_; lean_object* v_addFn_x3f_4684_; lean_object* v_mulFn_x3f_4685_; lean_object* v_subFn_x3f_4686_; lean_object* v_negFn_x3f_4687_; lean_object* v_powFn_x3f_4688_; lean_object* v_natCastFn_x3f_4689_; lean_object* v_one_x3f_4690_; lean_object* v_vars_4691_; lean_object* v_varMap_4692_; lean_object* v_denote_4693_; lean_object* v___x_4695_; uint8_t v_isShared_4696_; uint8_t v_isSharedCheck_4701_; 
v_id_4678_ = lean_ctor_get(v_s_4677_, 0);
v_type_4679_ = lean_ctor_get(v_s_4677_, 1);
v_u_4680_ = lean_ctor_get(v_s_4677_, 2);
v_ringInst_4681_ = lean_ctor_get(v_s_4677_, 3);
v_semiringInst_4682_ = lean_ctor_get(v_s_4677_, 4);
v_charInst_x3f_4683_ = lean_ctor_get(v_s_4677_, 5);
v_addFn_x3f_4684_ = lean_ctor_get(v_s_4677_, 6);
v_mulFn_x3f_4685_ = lean_ctor_get(v_s_4677_, 7);
v_subFn_x3f_4686_ = lean_ctor_get(v_s_4677_, 8);
v_negFn_x3f_4687_ = lean_ctor_get(v_s_4677_, 9);
v_powFn_x3f_4688_ = lean_ctor_get(v_s_4677_, 10);
v_natCastFn_x3f_4689_ = lean_ctor_get(v_s_4677_, 12);
v_one_x3f_4690_ = lean_ctor_get(v_s_4677_, 13);
v_vars_4691_ = lean_ctor_get(v_s_4677_, 14);
v_varMap_4692_ = lean_ctor_get(v_s_4677_, 15);
v_denote_4693_ = lean_ctor_get(v_s_4677_, 16);
v_isSharedCheck_4701_ = !lean_is_exclusive(v_s_4677_);
if (v_isSharedCheck_4701_ == 0)
{
lean_object* v_unused_4702_; 
v_unused_4702_ = lean_ctor_get(v_s_4677_, 11);
lean_dec(v_unused_4702_);
v___x_4695_ = v_s_4677_;
v_isShared_4696_ = v_isSharedCheck_4701_;
goto v_resetjp_4694_;
}
else
{
lean_inc(v_denote_4693_);
lean_inc(v_varMap_4692_);
lean_inc(v_vars_4691_);
lean_inc(v_one_x3f_4690_);
lean_inc(v_natCastFn_x3f_4689_);
lean_inc(v_powFn_x3f_4688_);
lean_inc(v_negFn_x3f_4687_);
lean_inc(v_subFn_x3f_4686_);
lean_inc(v_mulFn_x3f_4685_);
lean_inc(v_addFn_x3f_4684_);
lean_inc(v_charInst_x3f_4683_);
lean_inc(v_semiringInst_4682_);
lean_inc(v_ringInst_4681_);
lean_inc(v_u_4680_);
lean_inc(v_type_4679_);
lean_inc(v_id_4678_);
lean_dec(v_s_4677_);
v___x_4695_ = lean_box(0);
v_isShared_4696_ = v_isSharedCheck_4701_;
goto v_resetjp_4694_;
}
v_resetjp_4694_:
{
lean_object* v___x_4697_; lean_object* v___x_4699_; 
v___x_4697_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_4697_, 0, v_a_4676_);
if (v_isShared_4696_ == 0)
{
lean_ctor_set(v___x_4695_, 11, v___x_4697_);
v___x_4699_ = v___x_4695_;
goto v_reusejp_4698_;
}
else
{
lean_object* v_reuseFailAlloc_4700_; 
v_reuseFailAlloc_4700_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_4700_, 0, v_id_4678_);
lean_ctor_set(v_reuseFailAlloc_4700_, 1, v_type_4679_);
lean_ctor_set(v_reuseFailAlloc_4700_, 2, v_u_4680_);
lean_ctor_set(v_reuseFailAlloc_4700_, 3, v_ringInst_4681_);
lean_ctor_set(v_reuseFailAlloc_4700_, 4, v_semiringInst_4682_);
lean_ctor_set(v_reuseFailAlloc_4700_, 5, v_charInst_x3f_4683_);
lean_ctor_set(v_reuseFailAlloc_4700_, 6, v_addFn_x3f_4684_);
lean_ctor_set(v_reuseFailAlloc_4700_, 7, v_mulFn_x3f_4685_);
lean_ctor_set(v_reuseFailAlloc_4700_, 8, v_subFn_x3f_4686_);
lean_ctor_set(v_reuseFailAlloc_4700_, 9, v_negFn_x3f_4687_);
lean_ctor_set(v_reuseFailAlloc_4700_, 10, v_powFn_x3f_4688_);
lean_ctor_set(v_reuseFailAlloc_4700_, 11, v___x_4697_);
lean_ctor_set(v_reuseFailAlloc_4700_, 12, v_natCastFn_x3f_4689_);
lean_ctor_set(v_reuseFailAlloc_4700_, 13, v_one_x3f_4690_);
lean_ctor_set(v_reuseFailAlloc_4700_, 14, v_vars_4691_);
lean_ctor_set(v_reuseFailAlloc_4700_, 15, v_varMap_4692_);
lean_ctor_set(v_reuseFailAlloc_4700_, 16, v_denote_4693_);
v___x_4699_ = v_reuseFailAlloc_4700_;
goto v_reusejp_4698_;
}
v_reusejp_4698_:
{
return v___x_4699_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7_spec__13(lean_object* v___y_4703_, lean_object* v___y_4704_, lean_object* v___y_4705_, lean_object* v___y_4706_, lean_object* v___y_4707_, lean_object* v___y_4708_, lean_object* v___y_4709_, lean_object* v___y_4710_, lean_object* v___y_4711_, lean_object* v___y_4712_, lean_object* v___y_4713_){
_start:
{
lean_object* v___y_4716_; lean_object* v___y_4717_; lean_object* v___y_4718_; lean_object* v___x_4738_; 
v___x_4738_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_getRing(v___y_4703_, v___y_4704_, v___y_4705_, v___y_4706_, v___y_4707_, v___y_4708_, v___y_4709_, v___y_4710_, v___y_4711_, v___y_4712_, v___y_4713_);
if (lean_obj_tag(v___x_4738_) == 0)
{
lean_object* v_a_4739_; lean_object* v___x_4741_; uint8_t v_isShared_4742_; uint8_t v_isSharedCheck_4799_; 
v_a_4739_ = lean_ctor_get(v___x_4738_, 0);
v_isSharedCheck_4799_ = !lean_is_exclusive(v___x_4738_);
if (v_isSharedCheck_4799_ == 0)
{
v___x_4741_ = v___x_4738_;
v_isShared_4742_ = v_isSharedCheck_4799_;
goto v_resetjp_4740_;
}
else
{
lean_inc(v_a_4739_);
lean_dec(v___x_4738_);
v___x_4741_ = lean_box(0);
v_isShared_4742_ = v_isSharedCheck_4799_;
goto v_resetjp_4740_;
}
v_resetjp_4740_:
{
lean_object* v_intCastFn_x3f_4743_; 
v_intCastFn_x3f_4743_ = lean_ctor_get(v_a_4739_, 11);
if (lean_obj_tag(v_intCastFn_x3f_4743_) == 1)
{
lean_object* v_val_4744_; lean_object* v___x_4746_; 
lean_inc_ref(v_intCastFn_x3f_4743_);
lean_dec(v_a_4739_);
lean_dec(v___y_4713_);
lean_dec_ref(v___y_4712_);
lean_dec(v___y_4711_);
lean_dec_ref(v___y_4710_);
lean_dec(v___y_4709_);
lean_dec_ref(v___y_4708_);
lean_dec(v___y_4707_);
lean_dec_ref(v___y_4706_);
lean_dec(v___y_4705_);
lean_dec(v___y_4704_);
lean_dec(v___y_4703_);
v_val_4744_ = lean_ctor_get(v_intCastFn_x3f_4743_, 0);
lean_inc(v_val_4744_);
lean_dec_ref(v_intCastFn_x3f_4743_);
if (v_isShared_4742_ == 0)
{
lean_ctor_set(v___x_4741_, 0, v_val_4744_);
v___x_4746_ = v___x_4741_;
goto v_reusejp_4745_;
}
else
{
lean_object* v_reuseFailAlloc_4747_; 
v_reuseFailAlloc_4747_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4747_, 0, v_val_4744_);
v___x_4746_ = v_reuseFailAlloc_4747_;
goto v_reusejp_4745_;
}
v_reusejp_4745_:
{
return v___x_4746_;
}
}
else
{
lean_object* v_type_4748_; lean_object* v_u_4749_; lean_object* v_ringInst_4750_; lean_object* v___x_4751_; lean_object* v___x_4752_; lean_object* v___x_4753_; lean_object* v___x_4754_; lean_object* v_inst_x27_4755_; lean_object* v_inst_4757_; lean_object* v___y_4758_; lean_object* v___y_4759_; lean_object* v___y_4760_; lean_object* v___y_4761_; lean_object* v___y_4762_; lean_object* v___y_4763_; lean_object* v___y_4764_; lean_object* v___y_4765_; lean_object* v___y_4766_; lean_object* v___y_4767_; lean_object* v___y_4768_; lean_object* v___x_4775_; lean_object* v___x_4776_; lean_object* v_instType_4777_; lean_object* v___x_4778_; 
lean_del_object(v___x_4741_);
v_type_4748_ = lean_ctor_get(v_a_4739_, 1);
lean_inc_ref(v_type_4748_);
v_u_4749_ = lean_ctor_get(v_a_4739_, 2);
lean_inc(v_u_4749_);
v_ringInst_4750_ = lean_ctor_get(v_a_4739_, 3);
lean_inc_ref(v_ringInst_4750_);
lean_dec(v_a_4739_);
v___x_4751_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__1));
v___x_4752_ = lean_box(0);
v___x_4753_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_4753_, 0, v_u_4749_);
lean_ctor_set(v___x_4753_, 1, v___x_4752_);
lean_inc_ref(v___x_4753_);
v___x_4754_ = l_Lean_mkConst(v___x_4751_, v___x_4753_);
lean_inc_ref(v_type_4748_);
v_inst_x27_4755_ = l_Lean_mkAppB(v___x_4754_, v_type_4748_, v_ringInst_4750_);
v___x_4775_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__2));
lean_inc_ref(v___x_4753_);
v___x_4776_ = l_Lean_mkConst(v___x_4775_, v___x_4753_);
lean_inc_ref(v_type_4748_);
v_instType_4777_ = l_Lean_Expr_app___override(v___x_4776_, v_type_4748_);
lean_inc(v___y_4713_);
lean_inc_ref(v___y_4712_);
lean_inc(v___y_4711_);
lean_inc_ref(v___y_4710_);
v___x_4778_ = l_Lean_Meta_Grind_synthInstanceMeta_x3f(v_instType_4777_, v___y_4710_, v___y_4711_, v___y_4712_, v___y_4713_);
if (lean_obj_tag(v___x_4778_) == 0)
{
lean_object* v_a_4779_; 
v_a_4779_ = lean_ctor_get(v___x_4778_, 0);
lean_inc(v_a_4779_);
lean_dec_ref(v___x_4778_);
if (lean_obj_tag(v_a_4779_) == 0)
{
v_inst_4757_ = v_inst_x27_4755_;
v___y_4758_ = v___y_4703_;
v___y_4759_ = v___y_4704_;
v___y_4760_ = v___y_4705_;
v___y_4761_ = v___y_4706_;
v___y_4762_ = v___y_4707_;
v___y_4763_ = v___y_4708_;
v___y_4764_ = v___y_4709_;
v___y_4765_ = v___y_4710_;
v___y_4766_ = v___y_4711_;
v___y_4767_ = v___y_4712_;
v___y_4768_ = v___y_4713_;
goto v___jp_4756_;
}
else
{
lean_object* v_val_4780_; lean_object* v___x_4781_; lean_object* v___x_4782_; 
v_val_4780_ = lean_ctor_get(v_a_4779_, 0);
lean_inc(v_val_4780_);
lean_dec_ref(v_a_4779_);
v___x_4781_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__7_spec__15___closed__5));
lean_inc(v___y_4713_);
lean_inc_ref(v___y_4712_);
lean_inc(v___y_4711_);
lean_inc_ref(v___y_4710_);
lean_inc(v_val_4780_);
v___x_4782_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v___x_4781_, v_val_4780_, v_inst_x27_4755_, v___y_4710_, v___y_4711_, v___y_4712_, v___y_4713_);
if (lean_obj_tag(v___x_4782_) == 0)
{
lean_dec_ref(v___x_4782_);
v_inst_4757_ = v_val_4780_;
v___y_4758_ = v___y_4703_;
v___y_4759_ = v___y_4704_;
v___y_4760_ = v___y_4705_;
v___y_4761_ = v___y_4706_;
v___y_4762_ = v___y_4707_;
v___y_4763_ = v___y_4708_;
v___y_4764_ = v___y_4709_;
v___y_4765_ = v___y_4710_;
v___y_4766_ = v___y_4711_;
v___y_4767_ = v___y_4712_;
v___y_4768_ = v___y_4713_;
goto v___jp_4756_;
}
else
{
lean_object* v_a_4783_; lean_object* v___x_4785_; uint8_t v_isShared_4786_; uint8_t v_isSharedCheck_4790_; 
lean_dec(v_val_4780_);
lean_dec_ref(v___x_4753_);
lean_dec_ref(v_type_4748_);
lean_dec(v___y_4713_);
lean_dec_ref(v___y_4712_);
lean_dec(v___y_4711_);
lean_dec_ref(v___y_4710_);
lean_dec(v___y_4709_);
lean_dec_ref(v___y_4708_);
lean_dec(v___y_4707_);
lean_dec_ref(v___y_4706_);
lean_dec(v___y_4705_);
lean_dec(v___y_4704_);
lean_dec(v___y_4703_);
v_a_4783_ = lean_ctor_get(v___x_4782_, 0);
v_isSharedCheck_4790_ = !lean_is_exclusive(v___x_4782_);
if (v_isSharedCheck_4790_ == 0)
{
v___x_4785_ = v___x_4782_;
v_isShared_4786_ = v_isSharedCheck_4790_;
goto v_resetjp_4784_;
}
else
{
lean_inc(v_a_4783_);
lean_dec(v___x_4782_);
v___x_4785_ = lean_box(0);
v_isShared_4786_ = v_isSharedCheck_4790_;
goto v_resetjp_4784_;
}
v_resetjp_4784_:
{
lean_object* v___x_4788_; 
if (v_isShared_4786_ == 0)
{
v___x_4788_ = v___x_4785_;
goto v_reusejp_4787_;
}
else
{
lean_object* v_reuseFailAlloc_4789_; 
v_reuseFailAlloc_4789_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4789_, 0, v_a_4783_);
v___x_4788_ = v_reuseFailAlloc_4789_;
goto v_reusejp_4787_;
}
v_reusejp_4787_:
{
return v___x_4788_;
}
}
}
}
}
else
{
lean_object* v_a_4791_; lean_object* v___x_4793_; uint8_t v_isShared_4794_; uint8_t v_isSharedCheck_4798_; 
lean_dec_ref(v_inst_x27_4755_);
lean_dec_ref(v___x_4753_);
lean_dec_ref(v_type_4748_);
lean_dec(v___y_4713_);
lean_dec_ref(v___y_4712_);
lean_dec(v___y_4711_);
lean_dec_ref(v___y_4710_);
lean_dec(v___y_4709_);
lean_dec_ref(v___y_4708_);
lean_dec(v___y_4707_);
lean_dec_ref(v___y_4706_);
lean_dec(v___y_4705_);
lean_dec(v___y_4704_);
lean_dec(v___y_4703_);
v_a_4791_ = lean_ctor_get(v___x_4778_, 0);
v_isSharedCheck_4798_ = !lean_is_exclusive(v___x_4778_);
if (v_isSharedCheck_4798_ == 0)
{
v___x_4793_ = v___x_4778_;
v_isShared_4794_ = v_isSharedCheck_4798_;
goto v_resetjp_4792_;
}
else
{
lean_inc(v_a_4791_);
lean_dec(v___x_4778_);
v___x_4793_ = lean_box(0);
v_isShared_4794_ = v_isSharedCheck_4798_;
goto v_resetjp_4792_;
}
v_resetjp_4792_:
{
lean_object* v___x_4796_; 
if (v_isShared_4794_ == 0)
{
v___x_4796_ = v___x_4793_;
goto v_reusejp_4795_;
}
else
{
lean_object* v_reuseFailAlloc_4797_; 
v_reuseFailAlloc_4797_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4797_, 0, v_a_4791_);
v___x_4796_ = v_reuseFailAlloc_4797_;
goto v_reusejp_4795_;
}
v_reusejp_4795_:
{
return v___x_4796_;
}
}
}
v___jp_4756_:
{
lean_object* v___x_4769_; lean_object* v___x_4770_; lean_object* v___x_4771_; lean_object* v___x_4772_; 
v___x_4769_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10));
v___x_4770_ = l_Lean_mkConst(v___x_4769_, v___x_4753_);
v___x_4771_ = l_Lean_mkAppB(v___x_4770_, v_type_4748_, v_inst_4757_);
lean_inc(v___y_4764_);
lean_inc(v___y_4759_);
v___x_4772_ = lean_grind_canon(v___x_4771_, v___y_4759_, v___y_4760_, v___y_4761_, v___y_4762_, v___y_4763_, v___y_4764_, v___y_4765_, v___y_4766_, v___y_4767_, v___y_4768_);
if (lean_obj_tag(v___x_4772_) == 0)
{
lean_object* v_a_4773_; lean_object* v___x_4774_; 
v_a_4773_ = lean_ctor_get(v___x_4772_, 0);
lean_inc(v_a_4773_);
lean_dec_ref(v___x_4772_);
v___x_4774_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_4773_, v___y_4764_);
lean_dec(v___y_4764_);
v___y_4716_ = v___y_4759_;
v___y_4717_ = v___y_4758_;
v___y_4718_ = v___x_4774_;
goto v___jp_4715_;
}
else
{
lean_dec(v___y_4764_);
v___y_4716_ = v___y_4759_;
v___y_4717_ = v___y_4758_;
v___y_4718_ = v___x_4772_;
goto v___jp_4715_;
}
}
}
}
}
else
{
lean_object* v_a_4800_; lean_object* v___x_4802_; uint8_t v_isShared_4803_; uint8_t v_isSharedCheck_4807_; 
lean_dec(v___y_4713_);
lean_dec_ref(v___y_4712_);
lean_dec(v___y_4711_);
lean_dec_ref(v___y_4710_);
lean_dec(v___y_4709_);
lean_dec_ref(v___y_4708_);
lean_dec(v___y_4707_);
lean_dec_ref(v___y_4706_);
lean_dec(v___y_4705_);
lean_dec(v___y_4704_);
lean_dec(v___y_4703_);
v_a_4800_ = lean_ctor_get(v___x_4738_, 0);
v_isSharedCheck_4807_ = !lean_is_exclusive(v___x_4738_);
if (v_isSharedCheck_4807_ == 0)
{
v___x_4802_ = v___x_4738_;
v_isShared_4803_ = v_isSharedCheck_4807_;
goto v_resetjp_4801_;
}
else
{
lean_inc(v_a_4800_);
lean_dec(v___x_4738_);
v___x_4802_ = lean_box(0);
v_isShared_4803_ = v_isSharedCheck_4807_;
goto v_resetjp_4801_;
}
v_resetjp_4801_:
{
lean_object* v___x_4805_; 
if (v_isShared_4803_ == 0)
{
v___x_4805_ = v___x_4802_;
goto v_reusejp_4804_;
}
else
{
lean_object* v_reuseFailAlloc_4806_; 
v_reuseFailAlloc_4806_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4806_, 0, v_a_4800_);
v___x_4805_ = v_reuseFailAlloc_4806_;
goto v_reusejp_4804_;
}
v_reusejp_4804_:
{
return v___x_4805_;
}
}
}
v___jp_4715_:
{
if (lean_obj_tag(v___y_4718_) == 0)
{
lean_object* v_a_4719_; lean_object* v___f_4720_; lean_object* v___x_4721_; 
v_a_4719_ = lean_ctor_get(v___y_4718_, 0);
lean_inc(v_a_4719_);
lean_dec_ref(v___y_4718_);
lean_inc(v_a_4719_);
v___f_4720_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7_spec__13___lam__0), 2, 1);
lean_closure_set(v___f_4720_, 0, v_a_4719_);
v___x_4721_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_modifyRing___redArg(v___f_4720_, v___y_4717_, v___y_4716_);
lean_dec(v___y_4716_);
if (lean_obj_tag(v___x_4721_) == 0)
{
lean_object* v___x_4723_; uint8_t v_isShared_4724_; uint8_t v_isSharedCheck_4728_; 
v_isSharedCheck_4728_ = !lean_is_exclusive(v___x_4721_);
if (v_isSharedCheck_4728_ == 0)
{
lean_object* v_unused_4729_; 
v_unused_4729_ = lean_ctor_get(v___x_4721_, 0);
lean_dec(v_unused_4729_);
v___x_4723_ = v___x_4721_;
v_isShared_4724_ = v_isSharedCheck_4728_;
goto v_resetjp_4722_;
}
else
{
lean_dec(v___x_4721_);
v___x_4723_ = lean_box(0);
v_isShared_4724_ = v_isSharedCheck_4728_;
goto v_resetjp_4722_;
}
v_resetjp_4722_:
{
lean_object* v___x_4726_; 
if (v_isShared_4724_ == 0)
{
lean_ctor_set(v___x_4723_, 0, v_a_4719_);
v___x_4726_ = v___x_4723_;
goto v_reusejp_4725_;
}
else
{
lean_object* v_reuseFailAlloc_4727_; 
v_reuseFailAlloc_4727_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4727_, 0, v_a_4719_);
v___x_4726_ = v_reuseFailAlloc_4727_;
goto v_reusejp_4725_;
}
v_reusejp_4725_:
{
return v___x_4726_;
}
}
}
else
{
lean_object* v_a_4730_; lean_object* v___x_4732_; uint8_t v_isShared_4733_; uint8_t v_isSharedCheck_4737_; 
lean_dec(v_a_4719_);
v_a_4730_ = lean_ctor_get(v___x_4721_, 0);
v_isSharedCheck_4737_ = !lean_is_exclusive(v___x_4721_);
if (v_isSharedCheck_4737_ == 0)
{
v___x_4732_ = v___x_4721_;
v_isShared_4733_ = v_isSharedCheck_4737_;
goto v_resetjp_4731_;
}
else
{
lean_inc(v_a_4730_);
lean_dec(v___x_4721_);
v___x_4732_ = lean_box(0);
v_isShared_4733_ = v_isSharedCheck_4737_;
goto v_resetjp_4731_;
}
v_resetjp_4731_:
{
lean_object* v___x_4735_; 
if (v_isShared_4733_ == 0)
{
v___x_4735_ = v___x_4732_;
goto v_reusejp_4734_;
}
else
{
lean_object* v_reuseFailAlloc_4736_; 
v_reuseFailAlloc_4736_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4736_, 0, v_a_4730_);
v___x_4735_ = v_reuseFailAlloc_4736_;
goto v_reusejp_4734_;
}
v_reusejp_4734_:
{
return v___x_4735_;
}
}
}
}
else
{
lean_dec(v___y_4717_);
lean_dec(v___y_4716_);
return v___y_4718_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7_spec__13___boxed(lean_object* v___y_4808_, lean_object* v___y_4809_, lean_object* v___y_4810_, lean_object* v___y_4811_, lean_object* v___y_4812_, lean_object* v___y_4813_, lean_object* v___y_4814_, lean_object* v___y_4815_, lean_object* v___y_4816_, lean_object* v___y_4817_, lean_object* v___y_4818_, lean_object* v___y_4819_){
_start:
{
lean_object* v_res_4820_; 
v_res_4820_ = l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7_spec__13(v___y_4808_, v___y_4809_, v___y_4810_, v___y_4811_, v___y_4812_, v___y_4813_, v___y_4814_, v___y_4815_, v___y_4816_, v___y_4817_, v___y_4818_);
return v_res_4820_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7(lean_object* v_inst_4821_, lean_object* v___y_4822_, lean_object* v___y_4823_, lean_object* v___y_4824_, lean_object* v___y_4825_, lean_object* v___y_4826_, lean_object* v___y_4827_, lean_object* v___y_4828_, lean_object* v___y_4829_, lean_object* v___y_4830_, lean_object* v___y_4831_, lean_object* v___y_4832_){
_start:
{
lean_object* v___x_4834_; 
v___x_4834_ = l_Lean_Meta_Grind_Arith_CommRing_getIntCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7_spec__13(v___y_4822_, v___y_4823_, v___y_4824_, v___y_4825_, v___y_4826_, v___y_4827_, v___y_4828_, v___y_4829_, v___y_4830_, v___y_4831_, v___y_4832_);
if (lean_obj_tag(v___x_4834_) == 0)
{
lean_object* v_a_4835_; lean_object* v___x_4837_; uint8_t v_isShared_4838_; uint8_t v_isSharedCheck_4845_; 
v_a_4835_ = lean_ctor_get(v___x_4834_, 0);
v_isSharedCheck_4845_ = !lean_is_exclusive(v___x_4834_);
if (v_isSharedCheck_4845_ == 0)
{
v___x_4837_ = v___x_4834_;
v_isShared_4838_ = v_isSharedCheck_4845_;
goto v_resetjp_4836_;
}
else
{
lean_inc(v_a_4835_);
lean_dec(v___x_4834_);
v___x_4837_ = lean_box(0);
v_isShared_4838_ = v_isSharedCheck_4845_;
goto v_resetjp_4836_;
}
v_resetjp_4836_:
{
lean_object* v___x_4839_; uint8_t v___x_4840_; lean_object* v___x_4841_; lean_object* v___x_4843_; 
v___x_4839_ = l_Lean_Expr_appArg_x21(v_a_4835_);
lean_dec(v_a_4835_);
v___x_4840_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_4839_, v_inst_4821_);
lean_dec_ref(v___x_4839_);
v___x_4841_ = lean_box(v___x_4840_);
if (v_isShared_4838_ == 0)
{
lean_ctor_set(v___x_4837_, 0, v___x_4841_);
v___x_4843_ = v___x_4837_;
goto v_reusejp_4842_;
}
else
{
lean_object* v_reuseFailAlloc_4844_; 
v_reuseFailAlloc_4844_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4844_, 0, v___x_4841_);
v___x_4843_ = v_reuseFailAlloc_4844_;
goto v_reusejp_4842_;
}
v_reusejp_4842_:
{
return v___x_4843_;
}
}
}
else
{
lean_object* v_a_4846_; lean_object* v___x_4848_; uint8_t v_isShared_4849_; uint8_t v_isSharedCheck_4853_; 
v_a_4846_ = lean_ctor_get(v___x_4834_, 0);
v_isSharedCheck_4853_ = !lean_is_exclusive(v___x_4834_);
if (v_isSharedCheck_4853_ == 0)
{
v___x_4848_ = v___x_4834_;
v_isShared_4849_ = v_isSharedCheck_4853_;
goto v_resetjp_4847_;
}
else
{
lean_inc(v_a_4846_);
lean_dec(v___x_4834_);
v___x_4848_ = lean_box(0);
v_isShared_4849_ = v_isSharedCheck_4853_;
goto v_resetjp_4847_;
}
v_resetjp_4847_:
{
lean_object* v___x_4851_; 
if (v_isShared_4849_ == 0)
{
v___x_4851_ = v___x_4848_;
goto v_reusejp_4850_;
}
else
{
lean_object* v_reuseFailAlloc_4852_; 
v_reuseFailAlloc_4852_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4852_, 0, v_a_4846_);
v___x_4851_ = v_reuseFailAlloc_4852_;
goto v_reusejp_4850_;
}
v_reusejp_4850_:
{
return v___x_4851_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7___boxed(lean_object* v_inst_4854_, lean_object* v___y_4855_, lean_object* v___y_4856_, lean_object* v___y_4857_, lean_object* v___y_4858_, lean_object* v___y_4859_, lean_object* v___y_4860_, lean_object* v___y_4861_, lean_object* v___y_4862_, lean_object* v___y_4863_, lean_object* v___y_4864_, lean_object* v___y_4865_, lean_object* v___y_4866_){
_start:
{
lean_object* v_res_4867_; 
v_res_4867_ = l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7(v_inst_4854_, v___y_4855_, v___y_4856_, v___y_4857_, v___y_4858_, v___y_4859_, v___y_4860_, v___y_4861_, v___y_4862_, v___y_4863_, v___y_4864_, v___y_4865_);
lean_dec_ref(v_inst_4854_);
return v_res_4867_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11_spec__14(lean_object* v_type_4868_, lean_object* v_u_4869_, lean_object* v_instDeclName_4870_, lean_object* v_declName_4871_, lean_object* v_expectedInst_4872_, lean_object* v___y_4873_, lean_object* v___y_4874_, lean_object* v___y_4875_, lean_object* v___y_4876_, lean_object* v___y_4877_, lean_object* v___y_4878_, lean_object* v___y_4879_, lean_object* v___y_4880_, lean_object* v___y_4881_, lean_object* v___y_4882_, lean_object* v___y_4883_){
_start:
{
lean_object* v___x_4885_; lean_object* v___x_4886_; lean_object* v___x_4887_; lean_object* v___x_4888_; lean_object* v___x_4889_; 
v___x_4885_ = lean_box(0);
v___x_4886_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_4886_, 0, v_u_4869_);
lean_ctor_set(v___x_4886_, 1, v___x_4885_);
lean_inc_ref(v___x_4886_);
v___x_4887_ = l_Lean_mkConst(v_instDeclName_4870_, v___x_4886_);
lean_inc_ref(v_type_4868_);
v___x_4888_ = l_Lean_Expr_app___override(v___x_4887_, v_type_4868_);
lean_inc(v___y_4883_);
lean_inc_ref(v___y_4882_);
lean_inc(v___y_4881_);
lean_inc_ref(v___y_4880_);
v___x_4889_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12(v___x_4888_, v___y_4873_, v___y_4874_, v___y_4875_, v___y_4876_, v___y_4877_, v___y_4878_, v___y_4879_, v___y_4880_, v___y_4881_, v___y_4882_, v___y_4883_);
if (lean_obj_tag(v___x_4889_) == 0)
{
lean_object* v_a_4890_; lean_object* v___x_4891_; 
v_a_4890_ = lean_ctor_get(v___x_4889_, 0);
lean_inc(v_a_4890_);
lean_dec_ref(v___x_4889_);
lean_inc(v___y_4883_);
lean_inc_ref(v___y_4882_);
lean_inc(v___y_4881_);
lean_inc_ref(v___y_4880_);
lean_inc(v_a_4890_);
lean_inc(v_declName_4871_);
v___x_4891_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v_declName_4871_, v_a_4890_, v_expectedInst_4872_, v___y_4880_, v___y_4881_, v___y_4882_, v___y_4883_);
if (lean_obj_tag(v___x_4891_) == 0)
{
lean_object* v___x_4892_; lean_object* v___x_4893_; lean_object* v___x_4894_; 
lean_dec_ref(v___x_4891_);
v___x_4892_ = l_Lean_mkConst(v_declName_4871_, v___x_4886_);
v___x_4893_ = l_Lean_mkAppB(v___x_4892_, v_type_4868_, v_a_4890_);
lean_inc(v___y_4879_);
v___x_4894_ = lean_grind_canon(v___x_4893_, v___y_4874_, v___y_4875_, v___y_4876_, v___y_4877_, v___y_4878_, v___y_4879_, v___y_4880_, v___y_4881_, v___y_4882_, v___y_4883_);
if (lean_obj_tag(v___x_4894_) == 0)
{
lean_object* v_a_4895_; lean_object* v___x_4896_; 
v_a_4895_ = lean_ctor_get(v___x_4894_, 0);
lean_inc(v_a_4895_);
lean_dec_ref(v___x_4894_);
v___x_4896_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_4895_, v___y_4879_);
lean_dec(v___y_4879_);
return v___x_4896_;
}
else
{
lean_dec(v___y_4879_);
return v___x_4894_;
}
}
else
{
lean_object* v_a_4897_; lean_object* v___x_4899_; uint8_t v_isShared_4900_; uint8_t v_isSharedCheck_4904_; 
lean_dec(v_a_4890_);
lean_dec_ref(v___x_4886_);
lean_dec(v___y_4883_);
lean_dec_ref(v___y_4882_);
lean_dec(v___y_4881_);
lean_dec_ref(v___y_4880_);
lean_dec(v___y_4879_);
lean_dec_ref(v___y_4878_);
lean_dec(v___y_4877_);
lean_dec_ref(v___y_4876_);
lean_dec(v___y_4875_);
lean_dec(v___y_4874_);
lean_dec(v_declName_4871_);
lean_dec_ref(v_type_4868_);
v_a_4897_ = lean_ctor_get(v___x_4891_, 0);
v_isSharedCheck_4904_ = !lean_is_exclusive(v___x_4891_);
if (v_isSharedCheck_4904_ == 0)
{
v___x_4899_ = v___x_4891_;
v_isShared_4900_ = v_isSharedCheck_4904_;
goto v_resetjp_4898_;
}
else
{
lean_inc(v_a_4897_);
lean_dec(v___x_4891_);
v___x_4899_ = lean_box(0);
v_isShared_4900_ = v_isSharedCheck_4904_;
goto v_resetjp_4898_;
}
v_resetjp_4898_:
{
lean_object* v___x_4902_; 
if (v_isShared_4900_ == 0)
{
v___x_4902_ = v___x_4899_;
goto v_reusejp_4901_;
}
else
{
lean_object* v_reuseFailAlloc_4903_; 
v_reuseFailAlloc_4903_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4903_, 0, v_a_4897_);
v___x_4902_ = v_reuseFailAlloc_4903_;
goto v_reusejp_4901_;
}
v_reusejp_4901_:
{
return v___x_4902_;
}
}
}
}
else
{
lean_dec_ref(v___x_4886_);
lean_dec(v___y_4883_);
lean_dec_ref(v___y_4882_);
lean_dec(v___y_4881_);
lean_dec_ref(v___y_4880_);
lean_dec(v___y_4879_);
lean_dec_ref(v___y_4878_);
lean_dec(v___y_4877_);
lean_dec_ref(v___y_4876_);
lean_dec(v___y_4875_);
lean_dec(v___y_4874_);
lean_dec_ref(v_expectedInst_4872_);
lean_dec(v_declName_4871_);
lean_dec_ref(v_type_4868_);
return v___x_4889_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11_spec__14___boxed(lean_object** _args){
lean_object* v_type_4905_ = _args[0];
lean_object* v_u_4906_ = _args[1];
lean_object* v_instDeclName_4907_ = _args[2];
lean_object* v_declName_4908_ = _args[3];
lean_object* v_expectedInst_4909_ = _args[4];
lean_object* v___y_4910_ = _args[5];
lean_object* v___y_4911_ = _args[6];
lean_object* v___y_4912_ = _args[7];
lean_object* v___y_4913_ = _args[8];
lean_object* v___y_4914_ = _args[9];
lean_object* v___y_4915_ = _args[10];
lean_object* v___y_4916_ = _args[11];
lean_object* v___y_4917_ = _args[12];
lean_object* v___y_4918_ = _args[13];
lean_object* v___y_4919_ = _args[14];
lean_object* v___y_4920_ = _args[15];
lean_object* v___y_4921_ = _args[16];
_start:
{
lean_object* v_res_4922_; 
v_res_4922_ = l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11_spec__14(v_type_4905_, v_u_4906_, v_instDeclName_4907_, v_declName_4908_, v_expectedInst_4909_, v___y_4910_, v___y_4911_, v___y_4912_, v___y_4913_, v___y_4914_, v___y_4915_, v___y_4916_, v___y_4917_, v___y_4918_, v___y_4919_, v___y_4920_);
lean_dec(v___y_4910_);
return v_res_4922_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11___lam__0(lean_object* v_a_4923_, lean_object* v_s_4924_){
_start:
{
lean_object* v_id_4925_; lean_object* v_type_4926_; lean_object* v_u_4927_; lean_object* v_ringInst_4928_; lean_object* v_semiringInst_4929_; lean_object* v_charInst_x3f_4930_; lean_object* v_addFn_x3f_4931_; lean_object* v_mulFn_x3f_4932_; lean_object* v_subFn_x3f_4933_; lean_object* v_powFn_x3f_4934_; lean_object* v_intCastFn_x3f_4935_; lean_object* v_natCastFn_x3f_4936_; lean_object* v_one_x3f_4937_; lean_object* v_vars_4938_; lean_object* v_varMap_4939_; lean_object* v_denote_4940_; lean_object* v___x_4942_; uint8_t v_isShared_4943_; uint8_t v_isSharedCheck_4948_; 
v_id_4925_ = lean_ctor_get(v_s_4924_, 0);
v_type_4926_ = lean_ctor_get(v_s_4924_, 1);
v_u_4927_ = lean_ctor_get(v_s_4924_, 2);
v_ringInst_4928_ = lean_ctor_get(v_s_4924_, 3);
v_semiringInst_4929_ = lean_ctor_get(v_s_4924_, 4);
v_charInst_x3f_4930_ = lean_ctor_get(v_s_4924_, 5);
v_addFn_x3f_4931_ = lean_ctor_get(v_s_4924_, 6);
v_mulFn_x3f_4932_ = lean_ctor_get(v_s_4924_, 7);
v_subFn_x3f_4933_ = lean_ctor_get(v_s_4924_, 8);
v_powFn_x3f_4934_ = lean_ctor_get(v_s_4924_, 10);
v_intCastFn_x3f_4935_ = lean_ctor_get(v_s_4924_, 11);
v_natCastFn_x3f_4936_ = lean_ctor_get(v_s_4924_, 12);
v_one_x3f_4937_ = lean_ctor_get(v_s_4924_, 13);
v_vars_4938_ = lean_ctor_get(v_s_4924_, 14);
v_varMap_4939_ = lean_ctor_get(v_s_4924_, 15);
v_denote_4940_ = lean_ctor_get(v_s_4924_, 16);
v_isSharedCheck_4948_ = !lean_is_exclusive(v_s_4924_);
if (v_isSharedCheck_4948_ == 0)
{
lean_object* v_unused_4949_; 
v_unused_4949_ = lean_ctor_get(v_s_4924_, 9);
lean_dec(v_unused_4949_);
v___x_4942_ = v_s_4924_;
v_isShared_4943_ = v_isSharedCheck_4948_;
goto v_resetjp_4941_;
}
else
{
lean_inc(v_denote_4940_);
lean_inc(v_varMap_4939_);
lean_inc(v_vars_4938_);
lean_inc(v_one_x3f_4937_);
lean_inc(v_natCastFn_x3f_4936_);
lean_inc(v_intCastFn_x3f_4935_);
lean_inc(v_powFn_x3f_4934_);
lean_inc(v_subFn_x3f_4933_);
lean_inc(v_mulFn_x3f_4932_);
lean_inc(v_addFn_x3f_4931_);
lean_inc(v_charInst_x3f_4930_);
lean_inc(v_semiringInst_4929_);
lean_inc(v_ringInst_4928_);
lean_inc(v_u_4927_);
lean_inc(v_type_4926_);
lean_inc(v_id_4925_);
lean_dec(v_s_4924_);
v___x_4942_ = lean_box(0);
v_isShared_4943_ = v_isSharedCheck_4948_;
goto v_resetjp_4941_;
}
v_resetjp_4941_:
{
lean_object* v___x_4944_; lean_object* v___x_4946_; 
v___x_4944_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_4944_, 0, v_a_4923_);
if (v_isShared_4943_ == 0)
{
lean_ctor_set(v___x_4942_, 9, v___x_4944_);
v___x_4946_ = v___x_4942_;
goto v_reusejp_4945_;
}
else
{
lean_object* v_reuseFailAlloc_4947_; 
v_reuseFailAlloc_4947_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_4947_, 0, v_id_4925_);
lean_ctor_set(v_reuseFailAlloc_4947_, 1, v_type_4926_);
lean_ctor_set(v_reuseFailAlloc_4947_, 2, v_u_4927_);
lean_ctor_set(v_reuseFailAlloc_4947_, 3, v_ringInst_4928_);
lean_ctor_set(v_reuseFailAlloc_4947_, 4, v_semiringInst_4929_);
lean_ctor_set(v_reuseFailAlloc_4947_, 5, v_charInst_x3f_4930_);
lean_ctor_set(v_reuseFailAlloc_4947_, 6, v_addFn_x3f_4931_);
lean_ctor_set(v_reuseFailAlloc_4947_, 7, v_mulFn_x3f_4932_);
lean_ctor_set(v_reuseFailAlloc_4947_, 8, v_subFn_x3f_4933_);
lean_ctor_set(v_reuseFailAlloc_4947_, 9, v___x_4944_);
lean_ctor_set(v_reuseFailAlloc_4947_, 10, v_powFn_x3f_4934_);
lean_ctor_set(v_reuseFailAlloc_4947_, 11, v_intCastFn_x3f_4935_);
lean_ctor_set(v_reuseFailAlloc_4947_, 12, v_natCastFn_x3f_4936_);
lean_ctor_set(v_reuseFailAlloc_4947_, 13, v_one_x3f_4937_);
lean_ctor_set(v_reuseFailAlloc_4947_, 14, v_vars_4938_);
lean_ctor_set(v_reuseFailAlloc_4947_, 15, v_varMap_4939_);
lean_ctor_set(v_reuseFailAlloc_4947_, 16, v_denote_4940_);
v___x_4946_ = v_reuseFailAlloc_4947_;
goto v_reusejp_4945_;
}
v_reusejp_4945_:
{
return v___x_4946_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11(lean_object* v___y_4950_, lean_object* v___y_4951_, lean_object* v___y_4952_, lean_object* v___y_4953_, lean_object* v___y_4954_, lean_object* v___y_4955_, lean_object* v___y_4956_, lean_object* v___y_4957_, lean_object* v___y_4958_, lean_object* v___y_4959_, lean_object* v___y_4960_){
_start:
{
lean_object* v___x_4962_; 
v___x_4962_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_getRing(v___y_4950_, v___y_4951_, v___y_4952_, v___y_4953_, v___y_4954_, v___y_4955_, v___y_4956_, v___y_4957_, v___y_4958_, v___y_4959_, v___y_4960_);
if (lean_obj_tag(v___x_4962_) == 0)
{
lean_object* v_a_4963_; lean_object* v___x_4965_; uint8_t v_isShared_4966_; uint8_t v_isSharedCheck_5002_; 
v_a_4963_ = lean_ctor_get(v___x_4962_, 0);
v_isSharedCheck_5002_ = !lean_is_exclusive(v___x_4962_);
if (v_isSharedCheck_5002_ == 0)
{
v___x_4965_ = v___x_4962_;
v_isShared_4966_ = v_isSharedCheck_5002_;
goto v_resetjp_4964_;
}
else
{
lean_inc(v_a_4963_);
lean_dec(v___x_4962_);
v___x_4965_ = lean_box(0);
v_isShared_4966_ = v_isSharedCheck_5002_;
goto v_resetjp_4964_;
}
v_resetjp_4964_:
{
lean_object* v_negFn_x3f_4967_; 
v_negFn_x3f_4967_ = lean_ctor_get(v_a_4963_, 9);
if (lean_obj_tag(v_negFn_x3f_4967_) == 1)
{
lean_object* v_val_4968_; lean_object* v___x_4970_; 
lean_inc_ref(v_negFn_x3f_4967_);
lean_dec(v_a_4963_);
lean_dec(v___y_4960_);
lean_dec_ref(v___y_4959_);
lean_dec(v___y_4958_);
lean_dec_ref(v___y_4957_);
lean_dec(v___y_4956_);
lean_dec_ref(v___y_4955_);
lean_dec(v___y_4954_);
lean_dec_ref(v___y_4953_);
lean_dec(v___y_4952_);
lean_dec(v___y_4951_);
lean_dec(v___y_4950_);
v_val_4968_ = lean_ctor_get(v_negFn_x3f_4967_, 0);
lean_inc(v_val_4968_);
lean_dec_ref(v_negFn_x3f_4967_);
if (v_isShared_4966_ == 0)
{
lean_ctor_set(v___x_4965_, 0, v_val_4968_);
v___x_4970_ = v___x_4965_;
goto v_reusejp_4969_;
}
else
{
lean_object* v_reuseFailAlloc_4971_; 
v_reuseFailAlloc_4971_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4971_, 0, v_val_4968_);
v___x_4970_ = v_reuseFailAlloc_4971_;
goto v_reusejp_4969_;
}
v_reusejp_4969_:
{
return v___x_4970_;
}
}
else
{
lean_object* v_type_4972_; lean_object* v_u_4973_; lean_object* v_ringInst_4974_; lean_object* v___x_4975_; lean_object* v___x_4976_; lean_object* v___x_4977_; lean_object* v___x_4978_; lean_object* v_expectedInst_4979_; lean_object* v___x_4980_; lean_object* v___x_4981_; lean_object* v___x_4982_; 
lean_del_object(v___x_4965_);
v_type_4972_ = lean_ctor_get(v_a_4963_, 1);
lean_inc_ref(v_type_4972_);
v_u_4973_ = lean_ctor_get(v_a_4963_, 2);
lean_inc(v_u_4973_);
v_ringInst_4974_ = lean_ctor_get(v_a_4963_, 3);
lean_inc_ref(v_ringInst_4974_);
lean_dec(v_a_4963_);
v___x_4975_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__1));
v___x_4976_ = lean_box(0);
lean_inc(v_u_4973_);
v___x_4977_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_4977_, 0, v_u_4973_);
lean_ctor_set(v___x_4977_, 1, v___x_4976_);
v___x_4978_ = l_Lean_mkConst(v___x_4975_, v___x_4977_);
lean_inc_ref(v_type_4972_);
v_expectedInst_4979_ = l_Lean_mkAppB(v___x_4978_, v_type_4972_, v_ringInst_4974_);
v___x_4980_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__6_spec__13___closed__2));
v___x_4981_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13));
lean_inc(v___y_4951_);
v___x_4982_ = l_Lean_Meta_Grind_Arith_CommRing_mkUnaryFn___at___00Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11_spec__14(v_type_4972_, v_u_4973_, v___x_4980_, v___x_4981_, v_expectedInst_4979_, v___y_4950_, v___y_4951_, v___y_4952_, v___y_4953_, v___y_4954_, v___y_4955_, v___y_4956_, v___y_4957_, v___y_4958_, v___y_4959_, v___y_4960_);
if (lean_obj_tag(v___x_4982_) == 0)
{
lean_object* v_a_4983_; lean_object* v___f_4984_; lean_object* v___x_4985_; 
v_a_4983_ = lean_ctor_get(v___x_4982_, 0);
lean_inc(v_a_4983_);
lean_dec_ref(v___x_4982_);
lean_inc(v_a_4983_);
v___f_4984_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11___lam__0), 2, 1);
lean_closure_set(v___f_4984_, 0, v_a_4983_);
v___x_4985_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_modifyRing___redArg(v___f_4984_, v___y_4950_, v___y_4951_);
lean_dec(v___y_4951_);
if (lean_obj_tag(v___x_4985_) == 0)
{
lean_object* v___x_4987_; uint8_t v_isShared_4988_; uint8_t v_isSharedCheck_4992_; 
v_isSharedCheck_4992_ = !lean_is_exclusive(v___x_4985_);
if (v_isSharedCheck_4992_ == 0)
{
lean_object* v_unused_4993_; 
v_unused_4993_ = lean_ctor_get(v___x_4985_, 0);
lean_dec(v_unused_4993_);
v___x_4987_ = v___x_4985_;
v_isShared_4988_ = v_isSharedCheck_4992_;
goto v_resetjp_4986_;
}
else
{
lean_dec(v___x_4985_);
v___x_4987_ = lean_box(0);
v_isShared_4988_ = v_isSharedCheck_4992_;
goto v_resetjp_4986_;
}
v_resetjp_4986_:
{
lean_object* v___x_4990_; 
if (v_isShared_4988_ == 0)
{
lean_ctor_set(v___x_4987_, 0, v_a_4983_);
v___x_4990_ = v___x_4987_;
goto v_reusejp_4989_;
}
else
{
lean_object* v_reuseFailAlloc_4991_; 
v_reuseFailAlloc_4991_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4991_, 0, v_a_4983_);
v___x_4990_ = v_reuseFailAlloc_4991_;
goto v_reusejp_4989_;
}
v_reusejp_4989_:
{
return v___x_4990_;
}
}
}
else
{
lean_object* v_a_4994_; lean_object* v___x_4996_; uint8_t v_isShared_4997_; uint8_t v_isSharedCheck_5001_; 
lean_dec(v_a_4983_);
v_a_4994_ = lean_ctor_get(v___x_4985_, 0);
v_isSharedCheck_5001_ = !lean_is_exclusive(v___x_4985_);
if (v_isSharedCheck_5001_ == 0)
{
v___x_4996_ = v___x_4985_;
v_isShared_4997_ = v_isSharedCheck_5001_;
goto v_resetjp_4995_;
}
else
{
lean_inc(v_a_4994_);
lean_dec(v___x_4985_);
v___x_4996_ = lean_box(0);
v_isShared_4997_ = v_isSharedCheck_5001_;
goto v_resetjp_4995_;
}
v_resetjp_4995_:
{
lean_object* v___x_4999_; 
if (v_isShared_4997_ == 0)
{
v___x_4999_ = v___x_4996_;
goto v_reusejp_4998_;
}
else
{
lean_object* v_reuseFailAlloc_5000_; 
v_reuseFailAlloc_5000_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5000_, 0, v_a_4994_);
v___x_4999_ = v_reuseFailAlloc_5000_;
goto v_reusejp_4998_;
}
v_reusejp_4998_:
{
return v___x_4999_;
}
}
}
}
else
{
lean_dec(v___y_4951_);
lean_dec(v___y_4950_);
return v___x_4982_;
}
}
}
}
else
{
lean_object* v_a_5003_; lean_object* v___x_5005_; uint8_t v_isShared_5006_; uint8_t v_isSharedCheck_5010_; 
lean_dec(v___y_4960_);
lean_dec_ref(v___y_4959_);
lean_dec(v___y_4958_);
lean_dec_ref(v___y_4957_);
lean_dec(v___y_4956_);
lean_dec_ref(v___y_4955_);
lean_dec(v___y_4954_);
lean_dec_ref(v___y_4953_);
lean_dec(v___y_4952_);
lean_dec(v___y_4951_);
lean_dec(v___y_4950_);
v_a_5003_ = lean_ctor_get(v___x_4962_, 0);
v_isSharedCheck_5010_ = !lean_is_exclusive(v___x_4962_);
if (v_isSharedCheck_5010_ == 0)
{
v___x_5005_ = v___x_4962_;
v_isShared_5006_ = v_isSharedCheck_5010_;
goto v_resetjp_5004_;
}
else
{
lean_inc(v_a_5003_);
lean_dec(v___x_4962_);
v___x_5005_ = lean_box(0);
v_isShared_5006_ = v_isSharedCheck_5010_;
goto v_resetjp_5004_;
}
v_resetjp_5004_:
{
lean_object* v___x_5008_; 
if (v_isShared_5006_ == 0)
{
v___x_5008_ = v___x_5005_;
goto v_reusejp_5007_;
}
else
{
lean_object* v_reuseFailAlloc_5009_; 
v_reuseFailAlloc_5009_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5009_, 0, v_a_5003_);
v___x_5008_ = v_reuseFailAlloc_5009_;
goto v_reusejp_5007_;
}
v_reusejp_5007_:
{
return v___x_5008_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11___boxed(lean_object* v___y_5011_, lean_object* v___y_5012_, lean_object* v___y_5013_, lean_object* v___y_5014_, lean_object* v___y_5015_, lean_object* v___y_5016_, lean_object* v___y_5017_, lean_object* v___y_5018_, lean_object* v___y_5019_, lean_object* v___y_5020_, lean_object* v___y_5021_, lean_object* v___y_5022_){
_start:
{
lean_object* v_res_5023_; 
v_res_5023_ = l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11(v___y_5011_, v___y_5012_, v___y_5013_, v___y_5014_, v___y_5015_, v___y_5016_, v___y_5017_, v___y_5018_, v___y_5019_, v___y_5020_, v___y_5021_);
return v_res_5023_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6(lean_object* v_inst_5024_, lean_object* v___y_5025_, lean_object* v___y_5026_, lean_object* v___y_5027_, lean_object* v___y_5028_, lean_object* v___y_5029_, lean_object* v___y_5030_, lean_object* v___y_5031_, lean_object* v___y_5032_, lean_object* v___y_5033_, lean_object* v___y_5034_, lean_object* v___y_5035_){
_start:
{
lean_object* v___x_5037_; 
v___x_5037_ = l_Lean_Meta_Grind_Arith_CommRing_getNegFn___at___00Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6_spec__11(v___y_5025_, v___y_5026_, v___y_5027_, v___y_5028_, v___y_5029_, v___y_5030_, v___y_5031_, v___y_5032_, v___y_5033_, v___y_5034_, v___y_5035_);
if (lean_obj_tag(v___x_5037_) == 0)
{
lean_object* v_a_5038_; lean_object* v___x_5040_; uint8_t v_isShared_5041_; uint8_t v_isSharedCheck_5048_; 
v_a_5038_ = lean_ctor_get(v___x_5037_, 0);
v_isSharedCheck_5048_ = !lean_is_exclusive(v___x_5037_);
if (v_isSharedCheck_5048_ == 0)
{
v___x_5040_ = v___x_5037_;
v_isShared_5041_ = v_isSharedCheck_5048_;
goto v_resetjp_5039_;
}
else
{
lean_inc(v_a_5038_);
lean_dec(v___x_5037_);
v___x_5040_ = lean_box(0);
v_isShared_5041_ = v_isSharedCheck_5048_;
goto v_resetjp_5039_;
}
v_resetjp_5039_:
{
lean_object* v___x_5042_; uint8_t v___x_5043_; lean_object* v___x_5044_; lean_object* v___x_5046_; 
v___x_5042_ = l_Lean_Expr_appArg_x21(v_a_5038_);
lean_dec(v_a_5038_);
v___x_5043_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_5042_, v_inst_5024_);
lean_dec_ref(v___x_5042_);
v___x_5044_ = lean_box(v___x_5043_);
if (v_isShared_5041_ == 0)
{
lean_ctor_set(v___x_5040_, 0, v___x_5044_);
v___x_5046_ = v___x_5040_;
goto v_reusejp_5045_;
}
else
{
lean_object* v_reuseFailAlloc_5047_; 
v_reuseFailAlloc_5047_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5047_, 0, v___x_5044_);
v___x_5046_ = v_reuseFailAlloc_5047_;
goto v_reusejp_5045_;
}
v_reusejp_5045_:
{
return v___x_5046_;
}
}
}
else
{
lean_object* v_a_5049_; lean_object* v___x_5051_; uint8_t v_isShared_5052_; uint8_t v_isSharedCheck_5056_; 
v_a_5049_ = lean_ctor_get(v___x_5037_, 0);
v_isSharedCheck_5056_ = !lean_is_exclusive(v___x_5037_);
if (v_isSharedCheck_5056_ == 0)
{
v___x_5051_ = v___x_5037_;
v_isShared_5052_ = v_isSharedCheck_5056_;
goto v_resetjp_5050_;
}
else
{
lean_inc(v_a_5049_);
lean_dec(v___x_5037_);
v___x_5051_ = lean_box(0);
v_isShared_5052_ = v_isSharedCheck_5056_;
goto v_resetjp_5050_;
}
v_resetjp_5050_:
{
lean_object* v___x_5054_; 
if (v_isShared_5052_ == 0)
{
v___x_5054_ = v___x_5051_;
goto v_reusejp_5053_;
}
else
{
lean_object* v_reuseFailAlloc_5055_; 
v_reuseFailAlloc_5055_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5055_, 0, v_a_5049_);
v___x_5054_ = v_reuseFailAlloc_5055_;
goto v_reusejp_5053_;
}
v_reusejp_5053_:
{
return v___x_5054_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6___boxed(lean_object* v_inst_5057_, lean_object* v___y_5058_, lean_object* v___y_5059_, lean_object* v___y_5060_, lean_object* v___y_5061_, lean_object* v___y_5062_, lean_object* v___y_5063_, lean_object* v___y_5064_, lean_object* v___y_5065_, lean_object* v___y_5066_, lean_object* v___y_5067_, lean_object* v___y_5068_, lean_object* v___y_5069_){
_start:
{
lean_object* v_res_5070_; 
v_res_5070_ = l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6(v_inst_5057_, v___y_5058_, v___y_5059_, v___y_5060_, v___y_5061_, v___y_5062_, v___y_5063_, v___y_5064_, v___y_5065_, v___y_5066_, v___y_5067_, v___y_5068_);
lean_dec_ref(v_inst_5057_);
return v_res_5070_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1(lean_object* v_mkVar_5071_, lean_object* v_e_5072_, lean_object* v___y_5073_, lean_object* v___y_5074_, lean_object* v___y_5075_, lean_object* v___y_5076_, lean_object* v___y_5077_, lean_object* v___y_5078_, lean_object* v___y_5079_, lean_object* v___y_5080_, lean_object* v___y_5081_, lean_object* v___y_5082_, lean_object* v___y_5083_){
_start:
{
lean_object* v___x_5085_; 
v___x_5085_ = lean_apply_13(v_mkVar_5071_, v_e_5072_, v___y_5073_, v___y_5074_, v___y_5075_, v___y_5076_, v___y_5077_, v___y_5078_, v___y_5079_, v___y_5080_, v___y_5081_, v___y_5082_, v___y_5083_, lean_box(0));
if (lean_obj_tag(v___x_5085_) == 0)
{
lean_object* v_a_5086_; lean_object* v___x_5088_; uint8_t v_isShared_5089_; uint8_t v_isSharedCheck_5094_; 
v_a_5086_ = lean_ctor_get(v___x_5085_, 0);
v_isSharedCheck_5094_ = !lean_is_exclusive(v___x_5085_);
if (v_isSharedCheck_5094_ == 0)
{
v___x_5088_ = v___x_5085_;
v_isShared_5089_ = v_isSharedCheck_5094_;
goto v_resetjp_5087_;
}
else
{
lean_inc(v_a_5086_);
lean_dec(v___x_5085_);
v___x_5088_ = lean_box(0);
v_isShared_5089_ = v_isSharedCheck_5094_;
goto v_resetjp_5087_;
}
v_resetjp_5087_:
{
lean_object* v___x_5090_; lean_object* v___x_5092_; 
v___x_5090_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_5090_, 0, v_a_5086_);
if (v_isShared_5089_ == 0)
{
lean_ctor_set(v___x_5088_, 0, v___x_5090_);
v___x_5092_ = v___x_5088_;
goto v_reusejp_5091_;
}
else
{
lean_object* v_reuseFailAlloc_5093_; 
v_reuseFailAlloc_5093_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5093_, 0, v___x_5090_);
v___x_5092_ = v_reuseFailAlloc_5093_;
goto v_reusejp_5091_;
}
v_reusejp_5091_:
{
return v___x_5092_;
}
}
}
else
{
lean_object* v_a_5095_; lean_object* v___x_5097_; uint8_t v_isShared_5098_; uint8_t v_isSharedCheck_5102_; 
v_a_5095_ = lean_ctor_get(v___x_5085_, 0);
v_isSharedCheck_5102_ = !lean_is_exclusive(v___x_5085_);
if (v_isSharedCheck_5102_ == 0)
{
v___x_5097_ = v___x_5085_;
v_isShared_5098_ = v_isSharedCheck_5102_;
goto v_resetjp_5096_;
}
else
{
lean_inc(v_a_5095_);
lean_dec(v___x_5085_);
v___x_5097_ = lean_box(0);
v_isShared_5098_ = v_isSharedCheck_5102_;
goto v_resetjp_5096_;
}
v_resetjp_5096_:
{
lean_object* v___x_5100_; 
if (v_isShared_5098_ == 0)
{
v___x_5100_ = v___x_5097_;
goto v_reusejp_5099_;
}
else
{
lean_object* v_reuseFailAlloc_5101_; 
v_reuseFailAlloc_5101_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5101_, 0, v_a_5095_);
v___x_5100_ = v_reuseFailAlloc_5101_;
goto v_reusejp_5099_;
}
v_reusejp_5099_:
{
return v___x_5100_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1___boxed(lean_object* v_mkVar_5103_, lean_object* v_e_5104_, lean_object* v___y_5105_, lean_object* v___y_5106_, lean_object* v___y_5107_, lean_object* v___y_5108_, lean_object* v___y_5109_, lean_object* v___y_5110_, lean_object* v___y_5111_, lean_object* v___y_5112_, lean_object* v___y_5113_, lean_object* v___y_5114_, lean_object* v___y_5115_, lean_object* v___y_5116_){
_start:
{
lean_object* v_res_5117_; 
v_res_5117_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1(v_mkVar_5103_, v_e_5104_, v___y_5105_, v___y_5106_, v___y_5107_, v___y_5108_, v___y_5109_, v___y_5110_, v___y_5111_, v___y_5112_, v___y_5113_, v___y_5114_, v___y_5115_);
return v_res_5117_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15___lam__0(lean_object* v_a_5118_, lean_object* v_s_5119_){
_start:
{
lean_object* v_id_5120_; lean_object* v_type_5121_; lean_object* v_u_5122_; lean_object* v_ringInst_5123_; lean_object* v_semiringInst_5124_; lean_object* v_charInst_x3f_5125_; lean_object* v_addFn_x3f_5126_; lean_object* v_mulFn_x3f_5127_; lean_object* v_subFn_x3f_5128_; lean_object* v_negFn_x3f_5129_; lean_object* v_powFn_x3f_5130_; lean_object* v_intCastFn_x3f_5131_; lean_object* v_one_x3f_5132_; lean_object* v_vars_5133_; lean_object* v_varMap_5134_; lean_object* v_denote_5135_; lean_object* v___x_5137_; uint8_t v_isShared_5138_; uint8_t v_isSharedCheck_5143_; 
v_id_5120_ = lean_ctor_get(v_s_5119_, 0);
v_type_5121_ = lean_ctor_get(v_s_5119_, 1);
v_u_5122_ = lean_ctor_get(v_s_5119_, 2);
v_ringInst_5123_ = lean_ctor_get(v_s_5119_, 3);
v_semiringInst_5124_ = lean_ctor_get(v_s_5119_, 4);
v_charInst_x3f_5125_ = lean_ctor_get(v_s_5119_, 5);
v_addFn_x3f_5126_ = lean_ctor_get(v_s_5119_, 6);
v_mulFn_x3f_5127_ = lean_ctor_get(v_s_5119_, 7);
v_subFn_x3f_5128_ = lean_ctor_get(v_s_5119_, 8);
v_negFn_x3f_5129_ = lean_ctor_get(v_s_5119_, 9);
v_powFn_x3f_5130_ = lean_ctor_get(v_s_5119_, 10);
v_intCastFn_x3f_5131_ = lean_ctor_get(v_s_5119_, 11);
v_one_x3f_5132_ = lean_ctor_get(v_s_5119_, 13);
v_vars_5133_ = lean_ctor_get(v_s_5119_, 14);
v_varMap_5134_ = lean_ctor_get(v_s_5119_, 15);
v_denote_5135_ = lean_ctor_get(v_s_5119_, 16);
v_isSharedCheck_5143_ = !lean_is_exclusive(v_s_5119_);
if (v_isSharedCheck_5143_ == 0)
{
lean_object* v_unused_5144_; 
v_unused_5144_ = lean_ctor_get(v_s_5119_, 12);
lean_dec(v_unused_5144_);
v___x_5137_ = v_s_5119_;
v_isShared_5138_ = v_isSharedCheck_5143_;
goto v_resetjp_5136_;
}
else
{
lean_inc(v_denote_5135_);
lean_inc(v_varMap_5134_);
lean_inc(v_vars_5133_);
lean_inc(v_one_x3f_5132_);
lean_inc(v_intCastFn_x3f_5131_);
lean_inc(v_powFn_x3f_5130_);
lean_inc(v_negFn_x3f_5129_);
lean_inc(v_subFn_x3f_5128_);
lean_inc(v_mulFn_x3f_5127_);
lean_inc(v_addFn_x3f_5126_);
lean_inc(v_charInst_x3f_5125_);
lean_inc(v_semiringInst_5124_);
lean_inc(v_ringInst_5123_);
lean_inc(v_u_5122_);
lean_inc(v_type_5121_);
lean_inc(v_id_5120_);
lean_dec(v_s_5119_);
v___x_5137_ = lean_box(0);
v_isShared_5138_ = v_isSharedCheck_5143_;
goto v_resetjp_5136_;
}
v_resetjp_5136_:
{
lean_object* v___x_5139_; lean_object* v___x_5141_; 
v___x_5139_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_5139_, 0, v_a_5118_);
if (v_isShared_5138_ == 0)
{
lean_ctor_set(v___x_5137_, 12, v___x_5139_);
v___x_5141_ = v___x_5137_;
goto v_reusejp_5140_;
}
else
{
lean_object* v_reuseFailAlloc_5142_; 
v_reuseFailAlloc_5142_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_5142_, 0, v_id_5120_);
lean_ctor_set(v_reuseFailAlloc_5142_, 1, v_type_5121_);
lean_ctor_set(v_reuseFailAlloc_5142_, 2, v_u_5122_);
lean_ctor_set(v_reuseFailAlloc_5142_, 3, v_ringInst_5123_);
lean_ctor_set(v_reuseFailAlloc_5142_, 4, v_semiringInst_5124_);
lean_ctor_set(v_reuseFailAlloc_5142_, 5, v_charInst_x3f_5125_);
lean_ctor_set(v_reuseFailAlloc_5142_, 6, v_addFn_x3f_5126_);
lean_ctor_set(v_reuseFailAlloc_5142_, 7, v_mulFn_x3f_5127_);
lean_ctor_set(v_reuseFailAlloc_5142_, 8, v_subFn_x3f_5128_);
lean_ctor_set(v_reuseFailAlloc_5142_, 9, v_negFn_x3f_5129_);
lean_ctor_set(v_reuseFailAlloc_5142_, 10, v_powFn_x3f_5130_);
lean_ctor_set(v_reuseFailAlloc_5142_, 11, v_intCastFn_x3f_5131_);
lean_ctor_set(v_reuseFailAlloc_5142_, 12, v___x_5139_);
lean_ctor_set(v_reuseFailAlloc_5142_, 13, v_one_x3f_5132_);
lean_ctor_set(v_reuseFailAlloc_5142_, 14, v_vars_5133_);
lean_ctor_set(v_reuseFailAlloc_5142_, 15, v_varMap_5134_);
lean_ctor_set(v_reuseFailAlloc_5142_, 16, v_denote_5135_);
v___x_5141_ = v_reuseFailAlloc_5142_;
goto v_reusejp_5140_;
}
v_reusejp_5140_:
{
return v___x_5141_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19___redArg(lean_object* v_u_5145_, lean_object* v_type_5146_, lean_object* v_semiringInst_5147_, lean_object* v___y_5148_, lean_object* v___y_5149_, lean_object* v___y_5150_, lean_object* v___y_5151_, lean_object* v___y_5152_, lean_object* v___y_5153_, lean_object* v___y_5154_, lean_object* v___y_5155_, lean_object* v___y_5156_, lean_object* v___y_5157_){
_start:
{
lean_object* v___x_5159_; lean_object* v___x_5160_; lean_object* v___x_5161_; lean_object* v___x_5162_; lean_object* v_inst_x27_5163_; lean_object* v_inst_5165_; lean_object* v___y_5166_; lean_object* v___y_5167_; lean_object* v___y_5168_; lean_object* v___y_5169_; lean_object* v___y_5170_; lean_object* v___y_5171_; lean_object* v___y_5172_; lean_object* v___y_5173_; lean_object* v___y_5174_; lean_object* v___y_5175_; lean_object* v___x_5182_; lean_object* v___x_5183_; lean_object* v_instType_5184_; lean_object* v___x_5185_; 
v___x_5159_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0));
v___x_5160_ = lean_box(0);
v___x_5161_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_5161_, 0, v_u_5145_);
lean_ctor_set(v___x_5161_, 1, v___x_5160_);
lean_inc_ref(v___x_5161_);
v___x_5162_ = l_Lean_mkConst(v___x_5159_, v___x_5161_);
lean_inc_ref(v_type_5146_);
v_inst_x27_5163_ = l_Lean_mkAppB(v___x_5162_, v_type_5146_, v_semiringInst_5147_);
v___x_5182_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__1));
lean_inc_ref(v___x_5161_);
v___x_5183_ = l_Lean_mkConst(v___x_5182_, v___x_5161_);
lean_inc_ref(v_type_5146_);
v_instType_5184_ = l_Lean_Expr_app___override(v___x_5183_, v_type_5146_);
lean_inc(v___y_5157_);
lean_inc_ref(v___y_5156_);
lean_inc(v___y_5155_);
lean_inc_ref(v___y_5154_);
v___x_5185_ = l_Lean_Meta_Grind_synthInstanceMeta_x3f(v_instType_5184_, v___y_5154_, v___y_5155_, v___y_5156_, v___y_5157_);
if (lean_obj_tag(v___x_5185_) == 0)
{
lean_object* v_a_5186_; 
v_a_5186_ = lean_ctor_get(v___x_5185_, 0);
lean_inc(v_a_5186_);
lean_dec_ref(v___x_5185_);
if (lean_obj_tag(v_a_5186_) == 0)
{
v_inst_5165_ = v_inst_x27_5163_;
v___y_5166_ = v___y_5148_;
v___y_5167_ = v___y_5149_;
v___y_5168_ = v___y_5150_;
v___y_5169_ = v___y_5151_;
v___y_5170_ = v___y_5152_;
v___y_5171_ = v___y_5153_;
v___y_5172_ = v___y_5154_;
v___y_5173_ = v___y_5155_;
v___y_5174_ = v___y_5156_;
v___y_5175_ = v___y_5157_;
goto v___jp_5164_;
}
else
{
lean_object* v_val_5187_; lean_object* v___x_5188_; lean_object* v___x_5189_; 
v_val_5187_ = lean_ctor_get(v_a_5186_, 0);
lean_inc(v_val_5187_);
lean_dec_ref(v_a_5186_);
v___x_5188_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
lean_inc(v___y_5157_);
lean_inc_ref(v___y_5156_);
lean_inc(v___y_5155_);
lean_inc_ref(v___y_5154_);
lean_inc(v_val_5187_);
v___x_5189_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v___x_5188_, v_val_5187_, v_inst_x27_5163_, v___y_5154_, v___y_5155_, v___y_5156_, v___y_5157_);
if (lean_obj_tag(v___x_5189_) == 0)
{
lean_dec_ref(v___x_5189_);
v_inst_5165_ = v_val_5187_;
v___y_5166_ = v___y_5148_;
v___y_5167_ = v___y_5149_;
v___y_5168_ = v___y_5150_;
v___y_5169_ = v___y_5151_;
v___y_5170_ = v___y_5152_;
v___y_5171_ = v___y_5153_;
v___y_5172_ = v___y_5154_;
v___y_5173_ = v___y_5155_;
v___y_5174_ = v___y_5156_;
v___y_5175_ = v___y_5157_;
goto v___jp_5164_;
}
else
{
lean_object* v_a_5190_; lean_object* v___x_5192_; uint8_t v_isShared_5193_; uint8_t v_isSharedCheck_5197_; 
lean_dec(v_val_5187_);
lean_dec_ref(v___x_5161_);
lean_dec(v___y_5157_);
lean_dec_ref(v___y_5156_);
lean_dec(v___y_5155_);
lean_dec_ref(v___y_5154_);
lean_dec(v___y_5153_);
lean_dec_ref(v___y_5152_);
lean_dec(v___y_5151_);
lean_dec_ref(v___y_5150_);
lean_dec(v___y_5149_);
lean_dec(v___y_5148_);
lean_dec_ref(v_type_5146_);
v_a_5190_ = lean_ctor_get(v___x_5189_, 0);
v_isSharedCheck_5197_ = !lean_is_exclusive(v___x_5189_);
if (v_isSharedCheck_5197_ == 0)
{
v___x_5192_ = v___x_5189_;
v_isShared_5193_ = v_isSharedCheck_5197_;
goto v_resetjp_5191_;
}
else
{
lean_inc(v_a_5190_);
lean_dec(v___x_5189_);
v___x_5192_ = lean_box(0);
v_isShared_5193_ = v_isSharedCheck_5197_;
goto v_resetjp_5191_;
}
v_resetjp_5191_:
{
lean_object* v___x_5195_; 
if (v_isShared_5193_ == 0)
{
v___x_5195_ = v___x_5192_;
goto v_reusejp_5194_;
}
else
{
lean_object* v_reuseFailAlloc_5196_; 
v_reuseFailAlloc_5196_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5196_, 0, v_a_5190_);
v___x_5195_ = v_reuseFailAlloc_5196_;
goto v_reusejp_5194_;
}
v_reusejp_5194_:
{
return v___x_5195_;
}
}
}
}
}
else
{
lean_object* v_a_5198_; lean_object* v___x_5200_; uint8_t v_isShared_5201_; uint8_t v_isSharedCheck_5205_; 
lean_dec_ref(v_inst_x27_5163_);
lean_dec_ref(v___x_5161_);
lean_dec(v___y_5157_);
lean_dec_ref(v___y_5156_);
lean_dec(v___y_5155_);
lean_dec_ref(v___y_5154_);
lean_dec(v___y_5153_);
lean_dec_ref(v___y_5152_);
lean_dec(v___y_5151_);
lean_dec_ref(v___y_5150_);
lean_dec(v___y_5149_);
lean_dec(v___y_5148_);
lean_dec_ref(v_type_5146_);
v_a_5198_ = lean_ctor_get(v___x_5185_, 0);
v_isSharedCheck_5205_ = !lean_is_exclusive(v___x_5185_);
if (v_isSharedCheck_5205_ == 0)
{
v___x_5200_ = v___x_5185_;
v_isShared_5201_ = v_isSharedCheck_5205_;
goto v_resetjp_5199_;
}
else
{
lean_inc(v_a_5198_);
lean_dec(v___x_5185_);
v___x_5200_ = lean_box(0);
v_isShared_5201_ = v_isSharedCheck_5205_;
goto v_resetjp_5199_;
}
v_resetjp_5199_:
{
lean_object* v___x_5203_; 
if (v_isShared_5201_ == 0)
{
v___x_5203_ = v___x_5200_;
goto v_reusejp_5202_;
}
else
{
lean_object* v_reuseFailAlloc_5204_; 
v_reuseFailAlloc_5204_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5204_, 0, v_a_5198_);
v___x_5203_ = v_reuseFailAlloc_5204_;
goto v_reusejp_5202_;
}
v_reusejp_5202_:
{
return v___x_5203_;
}
}
}
v___jp_5164_:
{
lean_object* v___x_5176_; lean_object* v___x_5177_; lean_object* v___x_5178_; lean_object* v___x_5179_; 
v___x_5176_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_5177_ = l_Lean_mkConst(v___x_5176_, v___x_5161_);
v___x_5178_ = l_Lean_mkAppB(v___x_5177_, v_type_5146_, v_inst_5165_);
lean_inc(v___y_5171_);
v___x_5179_ = lean_grind_canon(v___x_5178_, v___y_5166_, v___y_5167_, v___y_5168_, v___y_5169_, v___y_5170_, v___y_5171_, v___y_5172_, v___y_5173_, v___y_5174_, v___y_5175_);
if (lean_obj_tag(v___x_5179_) == 0)
{
lean_object* v_a_5180_; lean_object* v___x_5181_; 
v_a_5180_ = lean_ctor_get(v___x_5179_, 0);
lean_inc(v_a_5180_);
lean_dec_ref(v___x_5179_);
v___x_5181_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_5180_, v___y_5171_);
lean_dec(v___y_5171_);
return v___x_5181_;
}
else
{
lean_dec(v___y_5171_);
return v___x_5179_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19___redArg___boxed(lean_object* v_u_5206_, lean_object* v_type_5207_, lean_object* v_semiringInst_5208_, lean_object* v___y_5209_, lean_object* v___y_5210_, lean_object* v___y_5211_, lean_object* v___y_5212_, lean_object* v___y_5213_, lean_object* v___y_5214_, lean_object* v___y_5215_, lean_object* v___y_5216_, lean_object* v___y_5217_, lean_object* v___y_5218_, lean_object* v___y_5219_){
_start:
{
lean_object* v_res_5220_; 
v_res_5220_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19___redArg(v_u_5206_, v_type_5207_, v_semiringInst_5208_, v___y_5209_, v___y_5210_, v___y_5211_, v___y_5212_, v___y_5213_, v___y_5214_, v___y_5215_, v___y_5216_, v___y_5217_, v___y_5218_);
return v_res_5220_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15(lean_object* v___y_5221_, lean_object* v___y_5222_, lean_object* v___y_5223_, lean_object* v___y_5224_, lean_object* v___y_5225_, lean_object* v___y_5226_, lean_object* v___y_5227_, lean_object* v___y_5228_, lean_object* v___y_5229_, lean_object* v___y_5230_, lean_object* v___y_5231_){
_start:
{
lean_object* v___x_5233_; 
v___x_5233_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_getRing(v___y_5221_, v___y_5222_, v___y_5223_, v___y_5224_, v___y_5225_, v___y_5226_, v___y_5227_, v___y_5228_, v___y_5229_, v___y_5230_, v___y_5231_);
if (lean_obj_tag(v___x_5233_) == 0)
{
lean_object* v_a_5234_; lean_object* v___x_5236_; uint8_t v_isShared_5237_; uint8_t v_isSharedCheck_5266_; 
v_a_5234_ = lean_ctor_get(v___x_5233_, 0);
v_isSharedCheck_5266_ = !lean_is_exclusive(v___x_5233_);
if (v_isSharedCheck_5266_ == 0)
{
v___x_5236_ = v___x_5233_;
v_isShared_5237_ = v_isSharedCheck_5266_;
goto v_resetjp_5235_;
}
else
{
lean_inc(v_a_5234_);
lean_dec(v___x_5233_);
v___x_5236_ = lean_box(0);
v_isShared_5237_ = v_isSharedCheck_5266_;
goto v_resetjp_5235_;
}
v_resetjp_5235_:
{
lean_object* v_natCastFn_x3f_5238_; 
v_natCastFn_x3f_5238_ = lean_ctor_get(v_a_5234_, 12);
if (lean_obj_tag(v_natCastFn_x3f_5238_) == 1)
{
lean_object* v_val_5239_; lean_object* v___x_5241_; 
lean_inc_ref(v_natCastFn_x3f_5238_);
lean_dec(v_a_5234_);
lean_dec(v___y_5231_);
lean_dec_ref(v___y_5230_);
lean_dec(v___y_5229_);
lean_dec_ref(v___y_5228_);
lean_dec(v___y_5227_);
lean_dec_ref(v___y_5226_);
lean_dec(v___y_5225_);
lean_dec_ref(v___y_5224_);
lean_dec(v___y_5223_);
lean_dec(v___y_5222_);
lean_dec(v___y_5221_);
v_val_5239_ = lean_ctor_get(v_natCastFn_x3f_5238_, 0);
lean_inc(v_val_5239_);
lean_dec_ref(v_natCastFn_x3f_5238_);
if (v_isShared_5237_ == 0)
{
lean_ctor_set(v___x_5236_, 0, v_val_5239_);
v___x_5241_ = v___x_5236_;
goto v_reusejp_5240_;
}
else
{
lean_object* v_reuseFailAlloc_5242_; 
v_reuseFailAlloc_5242_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5242_, 0, v_val_5239_);
v___x_5241_ = v_reuseFailAlloc_5242_;
goto v_reusejp_5240_;
}
v_reusejp_5240_:
{
return v___x_5241_;
}
}
else
{
lean_object* v_type_5243_; lean_object* v_u_5244_; lean_object* v_semiringInst_5245_; lean_object* v___x_5246_; 
lean_del_object(v___x_5236_);
v_type_5243_ = lean_ctor_get(v_a_5234_, 1);
lean_inc_ref(v_type_5243_);
v_u_5244_ = lean_ctor_get(v_a_5234_, 2);
lean_inc(v_u_5244_);
v_semiringInst_5245_ = lean_ctor_get(v_a_5234_, 4);
lean_inc_ref(v_semiringInst_5245_);
lean_dec(v_a_5234_);
lean_inc(v___y_5222_);
v___x_5246_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19___redArg(v_u_5244_, v_type_5243_, v_semiringInst_5245_, v___y_5222_, v___y_5223_, v___y_5224_, v___y_5225_, v___y_5226_, v___y_5227_, v___y_5228_, v___y_5229_, v___y_5230_, v___y_5231_);
if (lean_obj_tag(v___x_5246_) == 0)
{
lean_object* v_a_5247_; lean_object* v___f_5248_; lean_object* v___x_5249_; 
v_a_5247_ = lean_ctor_get(v___x_5246_, 0);
lean_inc(v_a_5247_);
lean_dec_ref(v___x_5246_);
lean_inc(v_a_5247_);
v___f_5248_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15___lam__0), 2, 1);
lean_closure_set(v___f_5248_, 0, v_a_5247_);
v___x_5249_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_modifyRing___redArg(v___f_5248_, v___y_5221_, v___y_5222_);
lean_dec(v___y_5222_);
if (lean_obj_tag(v___x_5249_) == 0)
{
lean_object* v___x_5251_; uint8_t v_isShared_5252_; uint8_t v_isSharedCheck_5256_; 
v_isSharedCheck_5256_ = !lean_is_exclusive(v___x_5249_);
if (v_isSharedCheck_5256_ == 0)
{
lean_object* v_unused_5257_; 
v_unused_5257_ = lean_ctor_get(v___x_5249_, 0);
lean_dec(v_unused_5257_);
v___x_5251_ = v___x_5249_;
v_isShared_5252_ = v_isSharedCheck_5256_;
goto v_resetjp_5250_;
}
else
{
lean_dec(v___x_5249_);
v___x_5251_ = lean_box(0);
v_isShared_5252_ = v_isSharedCheck_5256_;
goto v_resetjp_5250_;
}
v_resetjp_5250_:
{
lean_object* v___x_5254_; 
if (v_isShared_5252_ == 0)
{
lean_ctor_set(v___x_5251_, 0, v_a_5247_);
v___x_5254_ = v___x_5251_;
goto v_reusejp_5253_;
}
else
{
lean_object* v_reuseFailAlloc_5255_; 
v_reuseFailAlloc_5255_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5255_, 0, v_a_5247_);
v___x_5254_ = v_reuseFailAlloc_5255_;
goto v_reusejp_5253_;
}
v_reusejp_5253_:
{
return v___x_5254_;
}
}
}
else
{
lean_object* v_a_5258_; lean_object* v___x_5260_; uint8_t v_isShared_5261_; uint8_t v_isSharedCheck_5265_; 
lean_dec(v_a_5247_);
v_a_5258_ = lean_ctor_get(v___x_5249_, 0);
v_isSharedCheck_5265_ = !lean_is_exclusive(v___x_5249_);
if (v_isSharedCheck_5265_ == 0)
{
v___x_5260_ = v___x_5249_;
v_isShared_5261_ = v_isSharedCheck_5265_;
goto v_resetjp_5259_;
}
else
{
lean_inc(v_a_5258_);
lean_dec(v___x_5249_);
v___x_5260_ = lean_box(0);
v_isShared_5261_ = v_isSharedCheck_5265_;
goto v_resetjp_5259_;
}
v_resetjp_5259_:
{
lean_object* v___x_5263_; 
if (v_isShared_5261_ == 0)
{
v___x_5263_ = v___x_5260_;
goto v_reusejp_5262_;
}
else
{
lean_object* v_reuseFailAlloc_5264_; 
v_reuseFailAlloc_5264_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5264_, 0, v_a_5258_);
v___x_5263_ = v_reuseFailAlloc_5264_;
goto v_reusejp_5262_;
}
v_reusejp_5262_:
{
return v___x_5263_;
}
}
}
}
else
{
lean_dec(v___y_5222_);
lean_dec(v___y_5221_);
return v___x_5246_;
}
}
}
}
else
{
lean_object* v_a_5267_; lean_object* v___x_5269_; uint8_t v_isShared_5270_; uint8_t v_isSharedCheck_5274_; 
lean_dec(v___y_5231_);
lean_dec_ref(v___y_5230_);
lean_dec(v___y_5229_);
lean_dec_ref(v___y_5228_);
lean_dec(v___y_5227_);
lean_dec_ref(v___y_5226_);
lean_dec(v___y_5225_);
lean_dec_ref(v___y_5224_);
lean_dec(v___y_5223_);
lean_dec(v___y_5222_);
lean_dec(v___y_5221_);
v_a_5267_ = lean_ctor_get(v___x_5233_, 0);
v_isSharedCheck_5274_ = !lean_is_exclusive(v___x_5233_);
if (v_isSharedCheck_5274_ == 0)
{
v___x_5269_ = v___x_5233_;
v_isShared_5270_ = v_isSharedCheck_5274_;
goto v_resetjp_5268_;
}
else
{
lean_inc(v_a_5267_);
lean_dec(v___x_5233_);
v___x_5269_ = lean_box(0);
v_isShared_5270_ = v_isSharedCheck_5274_;
goto v_resetjp_5268_;
}
v_resetjp_5268_:
{
lean_object* v___x_5272_; 
if (v_isShared_5270_ == 0)
{
v___x_5272_ = v___x_5269_;
goto v_reusejp_5271_;
}
else
{
lean_object* v_reuseFailAlloc_5273_; 
v_reuseFailAlloc_5273_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5273_, 0, v_a_5267_);
v___x_5272_ = v_reuseFailAlloc_5273_;
goto v_reusejp_5271_;
}
v_reusejp_5271_:
{
return v___x_5272_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15___boxed(lean_object* v___y_5275_, lean_object* v___y_5276_, lean_object* v___y_5277_, lean_object* v___y_5278_, lean_object* v___y_5279_, lean_object* v___y_5280_, lean_object* v___y_5281_, lean_object* v___y_5282_, lean_object* v___y_5283_, lean_object* v___y_5284_, lean_object* v___y_5285_, lean_object* v___y_5286_){
_start:
{
lean_object* v_res_5287_; 
v_res_5287_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15(v___y_5275_, v___y_5276_, v___y_5277_, v___y_5278_, v___y_5279_, v___y_5280_, v___y_5281_, v___y_5282_, v___y_5283_, v___y_5284_, v___y_5285_);
return v_res_5287_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8(lean_object* v_inst_5288_, lean_object* v___y_5289_, lean_object* v___y_5290_, lean_object* v___y_5291_, lean_object* v___y_5292_, lean_object* v___y_5293_, lean_object* v___y_5294_, lean_object* v___y_5295_, lean_object* v___y_5296_, lean_object* v___y_5297_, lean_object* v___y_5298_, lean_object* v___y_5299_){
_start:
{
lean_object* v___x_5301_; 
v___x_5301_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15(v___y_5289_, v___y_5290_, v___y_5291_, v___y_5292_, v___y_5293_, v___y_5294_, v___y_5295_, v___y_5296_, v___y_5297_, v___y_5298_, v___y_5299_);
if (lean_obj_tag(v___x_5301_) == 0)
{
lean_object* v_a_5302_; lean_object* v___x_5304_; uint8_t v_isShared_5305_; uint8_t v_isSharedCheck_5312_; 
v_a_5302_ = lean_ctor_get(v___x_5301_, 0);
v_isSharedCheck_5312_ = !lean_is_exclusive(v___x_5301_);
if (v_isSharedCheck_5312_ == 0)
{
v___x_5304_ = v___x_5301_;
v_isShared_5305_ = v_isSharedCheck_5312_;
goto v_resetjp_5303_;
}
else
{
lean_inc(v_a_5302_);
lean_dec(v___x_5301_);
v___x_5304_ = lean_box(0);
v_isShared_5305_ = v_isSharedCheck_5312_;
goto v_resetjp_5303_;
}
v_resetjp_5303_:
{
lean_object* v___x_5306_; uint8_t v___x_5307_; lean_object* v___x_5308_; lean_object* v___x_5310_; 
v___x_5306_ = l_Lean_Expr_appArg_x21(v_a_5302_);
lean_dec(v_a_5302_);
v___x_5307_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_5306_, v_inst_5288_);
lean_dec_ref(v___x_5306_);
v___x_5308_ = lean_box(v___x_5307_);
if (v_isShared_5305_ == 0)
{
lean_ctor_set(v___x_5304_, 0, v___x_5308_);
v___x_5310_ = v___x_5304_;
goto v_reusejp_5309_;
}
else
{
lean_object* v_reuseFailAlloc_5311_; 
v_reuseFailAlloc_5311_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5311_, 0, v___x_5308_);
v___x_5310_ = v_reuseFailAlloc_5311_;
goto v_reusejp_5309_;
}
v_reusejp_5309_:
{
return v___x_5310_;
}
}
}
else
{
lean_object* v_a_5313_; lean_object* v___x_5315_; uint8_t v_isShared_5316_; uint8_t v_isSharedCheck_5320_; 
v_a_5313_ = lean_ctor_get(v___x_5301_, 0);
v_isSharedCheck_5320_ = !lean_is_exclusive(v___x_5301_);
if (v_isSharedCheck_5320_ == 0)
{
v___x_5315_ = v___x_5301_;
v_isShared_5316_ = v_isSharedCheck_5320_;
goto v_resetjp_5314_;
}
else
{
lean_inc(v_a_5313_);
lean_dec(v___x_5301_);
v___x_5315_ = lean_box(0);
v_isShared_5316_ = v_isSharedCheck_5320_;
goto v_resetjp_5314_;
}
v_resetjp_5314_:
{
lean_object* v___x_5318_; 
if (v_isShared_5316_ == 0)
{
v___x_5318_ = v___x_5315_;
goto v_reusejp_5317_;
}
else
{
lean_object* v_reuseFailAlloc_5319_; 
v_reuseFailAlloc_5319_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5319_, 0, v_a_5313_);
v___x_5318_ = v_reuseFailAlloc_5319_;
goto v_reusejp_5317_;
}
v_reusejp_5317_:
{
return v___x_5318_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8___boxed(lean_object* v_inst_5321_, lean_object* v___y_5322_, lean_object* v___y_5323_, lean_object* v___y_5324_, lean_object* v___y_5325_, lean_object* v___y_5326_, lean_object* v___y_5327_, lean_object* v___y_5328_, lean_object* v___y_5329_, lean_object* v___y_5330_, lean_object* v___y_5331_, lean_object* v___y_5332_, lean_object* v___y_5333_){
_start:
{
lean_object* v_res_5334_; 
v_res_5334_ = l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8(v_inst_5321_, v___y_5322_, v___y_5323_, v___y_5324_, v___y_5325_, v___y_5326_, v___y_5327_, v___y_5328_, v___y_5329_, v___y_5330_, v___y_5331_, v___y_5332_);
lean_dec_ref(v_inst_5321_);
return v_res_5334_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9___lam__0(lean_object* v_a_5335_, lean_object* v_s_5336_){
_start:
{
lean_object* v_id_5337_; lean_object* v_type_5338_; lean_object* v_u_5339_; lean_object* v_ringInst_5340_; lean_object* v_semiringInst_5341_; lean_object* v_charInst_x3f_5342_; lean_object* v_addFn_x3f_5343_; lean_object* v_mulFn_x3f_5344_; lean_object* v_subFn_x3f_5345_; lean_object* v_negFn_x3f_5346_; lean_object* v_intCastFn_x3f_5347_; lean_object* v_natCastFn_x3f_5348_; lean_object* v_one_x3f_5349_; lean_object* v_vars_5350_; lean_object* v_varMap_5351_; lean_object* v_denote_5352_; lean_object* v___x_5354_; uint8_t v_isShared_5355_; uint8_t v_isSharedCheck_5360_; 
v_id_5337_ = lean_ctor_get(v_s_5336_, 0);
v_type_5338_ = lean_ctor_get(v_s_5336_, 1);
v_u_5339_ = lean_ctor_get(v_s_5336_, 2);
v_ringInst_5340_ = lean_ctor_get(v_s_5336_, 3);
v_semiringInst_5341_ = lean_ctor_get(v_s_5336_, 4);
v_charInst_x3f_5342_ = lean_ctor_get(v_s_5336_, 5);
v_addFn_x3f_5343_ = lean_ctor_get(v_s_5336_, 6);
v_mulFn_x3f_5344_ = lean_ctor_get(v_s_5336_, 7);
v_subFn_x3f_5345_ = lean_ctor_get(v_s_5336_, 8);
v_negFn_x3f_5346_ = lean_ctor_get(v_s_5336_, 9);
v_intCastFn_x3f_5347_ = lean_ctor_get(v_s_5336_, 11);
v_natCastFn_x3f_5348_ = lean_ctor_get(v_s_5336_, 12);
v_one_x3f_5349_ = lean_ctor_get(v_s_5336_, 13);
v_vars_5350_ = lean_ctor_get(v_s_5336_, 14);
v_varMap_5351_ = lean_ctor_get(v_s_5336_, 15);
v_denote_5352_ = lean_ctor_get(v_s_5336_, 16);
v_isSharedCheck_5360_ = !lean_is_exclusive(v_s_5336_);
if (v_isSharedCheck_5360_ == 0)
{
lean_object* v_unused_5361_; 
v_unused_5361_ = lean_ctor_get(v_s_5336_, 10);
lean_dec(v_unused_5361_);
v___x_5354_ = v_s_5336_;
v_isShared_5355_ = v_isSharedCheck_5360_;
goto v_resetjp_5353_;
}
else
{
lean_inc(v_denote_5352_);
lean_inc(v_varMap_5351_);
lean_inc(v_vars_5350_);
lean_inc(v_one_x3f_5349_);
lean_inc(v_natCastFn_x3f_5348_);
lean_inc(v_intCastFn_x3f_5347_);
lean_inc(v_negFn_x3f_5346_);
lean_inc(v_subFn_x3f_5345_);
lean_inc(v_mulFn_x3f_5344_);
lean_inc(v_addFn_x3f_5343_);
lean_inc(v_charInst_x3f_5342_);
lean_inc(v_semiringInst_5341_);
lean_inc(v_ringInst_5340_);
lean_inc(v_u_5339_);
lean_inc(v_type_5338_);
lean_inc(v_id_5337_);
lean_dec(v_s_5336_);
v___x_5354_ = lean_box(0);
v_isShared_5355_ = v_isSharedCheck_5360_;
goto v_resetjp_5353_;
}
v_resetjp_5353_:
{
lean_object* v___x_5356_; lean_object* v___x_5358_; 
v___x_5356_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_5356_, 0, v_a_5335_);
if (v_isShared_5355_ == 0)
{
lean_ctor_set(v___x_5354_, 10, v___x_5356_);
v___x_5358_ = v___x_5354_;
goto v_reusejp_5357_;
}
else
{
lean_object* v_reuseFailAlloc_5359_; 
v_reuseFailAlloc_5359_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_5359_, 0, v_id_5337_);
lean_ctor_set(v_reuseFailAlloc_5359_, 1, v_type_5338_);
lean_ctor_set(v_reuseFailAlloc_5359_, 2, v_u_5339_);
lean_ctor_set(v_reuseFailAlloc_5359_, 3, v_ringInst_5340_);
lean_ctor_set(v_reuseFailAlloc_5359_, 4, v_semiringInst_5341_);
lean_ctor_set(v_reuseFailAlloc_5359_, 5, v_charInst_x3f_5342_);
lean_ctor_set(v_reuseFailAlloc_5359_, 6, v_addFn_x3f_5343_);
lean_ctor_set(v_reuseFailAlloc_5359_, 7, v_mulFn_x3f_5344_);
lean_ctor_set(v_reuseFailAlloc_5359_, 8, v_subFn_x3f_5345_);
lean_ctor_set(v_reuseFailAlloc_5359_, 9, v_negFn_x3f_5346_);
lean_ctor_set(v_reuseFailAlloc_5359_, 10, v___x_5356_);
lean_ctor_set(v_reuseFailAlloc_5359_, 11, v_intCastFn_x3f_5347_);
lean_ctor_set(v_reuseFailAlloc_5359_, 12, v_natCastFn_x3f_5348_);
lean_ctor_set(v_reuseFailAlloc_5359_, 13, v_one_x3f_5349_);
lean_ctor_set(v_reuseFailAlloc_5359_, 14, v_vars_5350_);
lean_ctor_set(v_reuseFailAlloc_5359_, 15, v_varMap_5351_);
lean_ctor_set(v_reuseFailAlloc_5359_, 16, v_denote_5352_);
v___x_5358_ = v_reuseFailAlloc_5359_;
goto v_reusejp_5357_;
}
v_reusejp_5357_:
{
return v___x_5358_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9_spec__11(lean_object* v_u_5362_, lean_object* v_type_5363_, lean_object* v_semiringInst_5364_, lean_object* v___y_5365_, lean_object* v___y_5366_, lean_object* v___y_5367_, lean_object* v___y_5368_, lean_object* v___y_5369_, lean_object* v___y_5370_, lean_object* v___y_5371_, lean_object* v___y_5372_, lean_object* v___y_5373_, lean_object* v___y_5374_, lean_object* v___y_5375_){
_start:
{
lean_object* v___x_5377_; lean_object* v___x_5378_; lean_object* v___x_5379_; lean_object* v___x_5380_; lean_object* v___x_5381_; lean_object* v___x_5382_; lean_object* v___x_5383_; lean_object* v___x_5384_; lean_object* v___x_5385_; lean_object* v___x_5386_; 
v___x_5377_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__0));
v___x_5378_ = lean_obj_once(&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1, &l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1_once, _init_l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1);
v___x_5379_ = lean_box(0);
lean_inc(v_u_5362_);
v___x_5380_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_5380_, 0, v_u_5362_);
lean_ctor_set(v___x_5380_, 1, v___x_5379_);
lean_inc_ref(v___x_5380_);
v___x_5381_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_5381_, 0, v___x_5378_);
lean_ctor_set(v___x_5381_, 1, v___x_5380_);
v___x_5382_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_5382_, 0, v_u_5362_);
lean_ctor_set(v___x_5382_, 1, v___x_5381_);
lean_inc_ref(v___x_5382_);
v___x_5383_ = l_Lean_mkConst(v___x_5377_, v___x_5382_);
v___x_5384_ = l_Lean_Nat_mkType;
lean_inc_ref_n(v_type_5363_, 2);
v___x_5385_ = l_Lean_mkApp3(v___x_5383_, v_type_5363_, v___x_5384_, v_type_5363_);
lean_inc(v___y_5375_);
lean_inc_ref(v___y_5374_);
lean_inc(v___y_5373_);
lean_inc_ref(v___y_5372_);
v___x_5386_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12(v___x_5385_, v___y_5365_, v___y_5366_, v___y_5367_, v___y_5368_, v___y_5369_, v___y_5370_, v___y_5371_, v___y_5372_, v___y_5373_, v___y_5374_, v___y_5375_);
if (lean_obj_tag(v___x_5386_) == 0)
{
lean_object* v_a_5387_; lean_object* v___x_5388_; lean_object* v___x_5389_; lean_object* v_inst_x27_5390_; lean_object* v___x_5391_; lean_object* v___x_5392_; 
v_a_5387_ = lean_ctor_get(v___x_5386_, 0);
lean_inc(v_a_5387_);
lean_dec_ref(v___x_5386_);
v___x_5388_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3));
v___x_5389_ = l_Lean_mkConst(v___x_5388_, v___x_5380_);
lean_inc_ref(v_type_5363_);
v_inst_x27_5390_ = l_Lean_mkAppB(v___x_5389_, v_type_5363_, v_semiringInst_5364_);
v___x_5391_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
lean_inc(v___y_5375_);
lean_inc_ref(v___y_5374_);
lean_inc(v___y_5373_);
lean_inc_ref(v___y_5372_);
lean_inc(v_a_5387_);
v___x_5392_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v___x_5391_, v_a_5387_, v_inst_x27_5390_, v___y_5372_, v___y_5373_, v___y_5374_, v___y_5375_);
if (lean_obj_tag(v___x_5392_) == 0)
{
lean_object* v___x_5393_; lean_object* v___x_5394_; lean_object* v___x_5395_; 
lean_dec_ref(v___x_5392_);
v___x_5393_ = l_Lean_mkConst(v___x_5391_, v___x_5382_);
lean_inc_ref(v_type_5363_);
v___x_5394_ = l_Lean_mkApp4(v___x_5393_, v_type_5363_, v___x_5384_, v_type_5363_, v_a_5387_);
lean_inc(v___y_5371_);
v___x_5395_ = lean_grind_canon(v___x_5394_, v___y_5366_, v___y_5367_, v___y_5368_, v___y_5369_, v___y_5370_, v___y_5371_, v___y_5372_, v___y_5373_, v___y_5374_, v___y_5375_);
if (lean_obj_tag(v___x_5395_) == 0)
{
lean_object* v_a_5396_; lean_object* v___x_5397_; 
v_a_5396_ = lean_ctor_get(v___x_5395_, 0);
lean_inc(v_a_5396_);
lean_dec_ref(v___x_5395_);
v___x_5397_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_5396_, v___y_5371_);
lean_dec(v___y_5371_);
return v___x_5397_;
}
else
{
lean_dec(v___y_5371_);
return v___x_5395_;
}
}
else
{
lean_object* v_a_5398_; lean_object* v___x_5400_; uint8_t v_isShared_5401_; uint8_t v_isSharedCheck_5405_; 
lean_dec(v_a_5387_);
lean_dec_ref(v___x_5382_);
lean_dec(v___y_5375_);
lean_dec_ref(v___y_5374_);
lean_dec(v___y_5373_);
lean_dec_ref(v___y_5372_);
lean_dec(v___y_5371_);
lean_dec_ref(v___y_5370_);
lean_dec(v___y_5369_);
lean_dec_ref(v___y_5368_);
lean_dec(v___y_5367_);
lean_dec(v___y_5366_);
lean_dec_ref(v_type_5363_);
v_a_5398_ = lean_ctor_get(v___x_5392_, 0);
v_isSharedCheck_5405_ = !lean_is_exclusive(v___x_5392_);
if (v_isSharedCheck_5405_ == 0)
{
v___x_5400_ = v___x_5392_;
v_isShared_5401_ = v_isSharedCheck_5405_;
goto v_resetjp_5399_;
}
else
{
lean_inc(v_a_5398_);
lean_dec(v___x_5392_);
v___x_5400_ = lean_box(0);
v_isShared_5401_ = v_isSharedCheck_5405_;
goto v_resetjp_5399_;
}
v_resetjp_5399_:
{
lean_object* v___x_5403_; 
if (v_isShared_5401_ == 0)
{
v___x_5403_ = v___x_5400_;
goto v_reusejp_5402_;
}
else
{
lean_object* v_reuseFailAlloc_5404_; 
v_reuseFailAlloc_5404_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5404_, 0, v_a_5398_);
v___x_5403_ = v_reuseFailAlloc_5404_;
goto v_reusejp_5402_;
}
v_reusejp_5402_:
{
return v___x_5403_;
}
}
}
}
else
{
lean_dec_ref(v___x_5382_);
lean_dec_ref(v___x_5380_);
lean_dec(v___y_5375_);
lean_dec_ref(v___y_5374_);
lean_dec(v___y_5373_);
lean_dec_ref(v___y_5372_);
lean_dec(v___y_5371_);
lean_dec_ref(v___y_5370_);
lean_dec(v___y_5369_);
lean_dec_ref(v___y_5368_);
lean_dec(v___y_5367_);
lean_dec(v___y_5366_);
lean_dec_ref(v_semiringInst_5364_);
lean_dec_ref(v_type_5363_);
return v___x_5386_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9_spec__11___boxed(lean_object* v_u_5406_, lean_object* v_type_5407_, lean_object* v_semiringInst_5408_, lean_object* v___y_5409_, lean_object* v___y_5410_, lean_object* v___y_5411_, lean_object* v___y_5412_, lean_object* v___y_5413_, lean_object* v___y_5414_, lean_object* v___y_5415_, lean_object* v___y_5416_, lean_object* v___y_5417_, lean_object* v___y_5418_, lean_object* v___y_5419_, lean_object* v___y_5420_){
_start:
{
lean_object* v_res_5421_; 
v_res_5421_ = l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9_spec__11(v_u_5406_, v_type_5407_, v_semiringInst_5408_, v___y_5409_, v___y_5410_, v___y_5411_, v___y_5412_, v___y_5413_, v___y_5414_, v___y_5415_, v___y_5416_, v___y_5417_, v___y_5418_, v___y_5419_);
lean_dec(v___y_5409_);
return v_res_5421_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9(lean_object* v___y_5422_, lean_object* v___y_5423_, lean_object* v___y_5424_, lean_object* v___y_5425_, lean_object* v___y_5426_, lean_object* v___y_5427_, lean_object* v___y_5428_, lean_object* v___y_5429_, lean_object* v___y_5430_, lean_object* v___y_5431_, lean_object* v___y_5432_){
_start:
{
lean_object* v___x_5434_; 
v___x_5434_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_getRing(v___y_5422_, v___y_5423_, v___y_5424_, v___y_5425_, v___y_5426_, v___y_5427_, v___y_5428_, v___y_5429_, v___y_5430_, v___y_5431_, v___y_5432_);
if (lean_obj_tag(v___x_5434_) == 0)
{
lean_object* v_a_5435_; lean_object* v___x_5437_; uint8_t v_isShared_5438_; uint8_t v_isSharedCheck_5467_; 
v_a_5435_ = lean_ctor_get(v___x_5434_, 0);
v_isSharedCheck_5467_ = !lean_is_exclusive(v___x_5434_);
if (v_isSharedCheck_5467_ == 0)
{
v___x_5437_ = v___x_5434_;
v_isShared_5438_ = v_isSharedCheck_5467_;
goto v_resetjp_5436_;
}
else
{
lean_inc(v_a_5435_);
lean_dec(v___x_5434_);
v___x_5437_ = lean_box(0);
v_isShared_5438_ = v_isSharedCheck_5467_;
goto v_resetjp_5436_;
}
v_resetjp_5436_:
{
lean_object* v_powFn_x3f_5439_; 
v_powFn_x3f_5439_ = lean_ctor_get(v_a_5435_, 10);
if (lean_obj_tag(v_powFn_x3f_5439_) == 1)
{
lean_object* v_val_5440_; lean_object* v___x_5442_; 
lean_inc_ref(v_powFn_x3f_5439_);
lean_dec(v_a_5435_);
lean_dec(v___y_5432_);
lean_dec_ref(v___y_5431_);
lean_dec(v___y_5430_);
lean_dec_ref(v___y_5429_);
lean_dec(v___y_5428_);
lean_dec_ref(v___y_5427_);
lean_dec(v___y_5426_);
lean_dec_ref(v___y_5425_);
lean_dec(v___y_5424_);
lean_dec(v___y_5423_);
lean_dec(v___y_5422_);
v_val_5440_ = lean_ctor_get(v_powFn_x3f_5439_, 0);
lean_inc(v_val_5440_);
lean_dec_ref(v_powFn_x3f_5439_);
if (v_isShared_5438_ == 0)
{
lean_ctor_set(v___x_5437_, 0, v_val_5440_);
v___x_5442_ = v___x_5437_;
goto v_reusejp_5441_;
}
else
{
lean_object* v_reuseFailAlloc_5443_; 
v_reuseFailAlloc_5443_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5443_, 0, v_val_5440_);
v___x_5442_ = v_reuseFailAlloc_5443_;
goto v_reusejp_5441_;
}
v_reusejp_5441_:
{
return v___x_5442_;
}
}
else
{
lean_object* v_type_5444_; lean_object* v_u_5445_; lean_object* v_semiringInst_5446_; lean_object* v___x_5447_; 
lean_del_object(v___x_5437_);
v_type_5444_ = lean_ctor_get(v_a_5435_, 1);
lean_inc_ref(v_type_5444_);
v_u_5445_ = lean_ctor_get(v_a_5435_, 2);
lean_inc(v_u_5445_);
v_semiringInst_5446_ = lean_ctor_get(v_a_5435_, 4);
lean_inc_ref(v_semiringInst_5446_);
lean_dec(v_a_5435_);
lean_inc(v___y_5423_);
v___x_5447_ = l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9_spec__11(v_u_5445_, v_type_5444_, v_semiringInst_5446_, v___y_5422_, v___y_5423_, v___y_5424_, v___y_5425_, v___y_5426_, v___y_5427_, v___y_5428_, v___y_5429_, v___y_5430_, v___y_5431_, v___y_5432_);
if (lean_obj_tag(v___x_5447_) == 0)
{
lean_object* v_a_5448_; lean_object* v___f_5449_; lean_object* v___x_5450_; 
v_a_5448_ = lean_ctor_get(v___x_5447_, 0);
lean_inc(v_a_5448_);
lean_dec_ref(v___x_5447_);
lean_inc(v_a_5448_);
v___f_5449_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9___lam__0), 2, 1);
lean_closure_set(v___f_5449_, 0, v_a_5448_);
v___x_5450_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_modifyRing___redArg(v___f_5449_, v___y_5422_, v___y_5423_);
lean_dec(v___y_5423_);
if (lean_obj_tag(v___x_5450_) == 0)
{
lean_object* v___x_5452_; uint8_t v_isShared_5453_; uint8_t v_isSharedCheck_5457_; 
v_isSharedCheck_5457_ = !lean_is_exclusive(v___x_5450_);
if (v_isSharedCheck_5457_ == 0)
{
lean_object* v_unused_5458_; 
v_unused_5458_ = lean_ctor_get(v___x_5450_, 0);
lean_dec(v_unused_5458_);
v___x_5452_ = v___x_5450_;
v_isShared_5453_ = v_isSharedCheck_5457_;
goto v_resetjp_5451_;
}
else
{
lean_dec(v___x_5450_);
v___x_5452_ = lean_box(0);
v_isShared_5453_ = v_isSharedCheck_5457_;
goto v_resetjp_5451_;
}
v_resetjp_5451_:
{
lean_object* v___x_5455_; 
if (v_isShared_5453_ == 0)
{
lean_ctor_set(v___x_5452_, 0, v_a_5448_);
v___x_5455_ = v___x_5452_;
goto v_reusejp_5454_;
}
else
{
lean_object* v_reuseFailAlloc_5456_; 
v_reuseFailAlloc_5456_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5456_, 0, v_a_5448_);
v___x_5455_ = v_reuseFailAlloc_5456_;
goto v_reusejp_5454_;
}
v_reusejp_5454_:
{
return v___x_5455_;
}
}
}
else
{
lean_object* v_a_5459_; lean_object* v___x_5461_; uint8_t v_isShared_5462_; uint8_t v_isSharedCheck_5466_; 
lean_dec(v_a_5448_);
v_a_5459_ = lean_ctor_get(v___x_5450_, 0);
v_isSharedCheck_5466_ = !lean_is_exclusive(v___x_5450_);
if (v_isSharedCheck_5466_ == 0)
{
v___x_5461_ = v___x_5450_;
v_isShared_5462_ = v_isSharedCheck_5466_;
goto v_resetjp_5460_;
}
else
{
lean_inc(v_a_5459_);
lean_dec(v___x_5450_);
v___x_5461_ = lean_box(0);
v_isShared_5462_ = v_isSharedCheck_5466_;
goto v_resetjp_5460_;
}
v_resetjp_5460_:
{
lean_object* v___x_5464_; 
if (v_isShared_5462_ == 0)
{
v___x_5464_ = v___x_5461_;
goto v_reusejp_5463_;
}
else
{
lean_object* v_reuseFailAlloc_5465_; 
v_reuseFailAlloc_5465_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5465_, 0, v_a_5459_);
v___x_5464_ = v_reuseFailAlloc_5465_;
goto v_reusejp_5463_;
}
v_reusejp_5463_:
{
return v___x_5464_;
}
}
}
}
else
{
lean_dec(v___y_5423_);
lean_dec(v___y_5422_);
return v___x_5447_;
}
}
}
}
else
{
lean_object* v_a_5468_; lean_object* v___x_5470_; uint8_t v_isShared_5471_; uint8_t v_isSharedCheck_5475_; 
lean_dec(v___y_5432_);
lean_dec_ref(v___y_5431_);
lean_dec(v___y_5430_);
lean_dec_ref(v___y_5429_);
lean_dec(v___y_5428_);
lean_dec_ref(v___y_5427_);
lean_dec(v___y_5426_);
lean_dec_ref(v___y_5425_);
lean_dec(v___y_5424_);
lean_dec(v___y_5423_);
lean_dec(v___y_5422_);
v_a_5468_ = lean_ctor_get(v___x_5434_, 0);
v_isSharedCheck_5475_ = !lean_is_exclusive(v___x_5434_);
if (v_isSharedCheck_5475_ == 0)
{
v___x_5470_ = v___x_5434_;
v_isShared_5471_ = v_isSharedCheck_5475_;
goto v_resetjp_5469_;
}
else
{
lean_inc(v_a_5468_);
lean_dec(v___x_5434_);
v___x_5470_ = lean_box(0);
v_isShared_5471_ = v_isSharedCheck_5475_;
goto v_resetjp_5469_;
}
v_resetjp_5469_:
{
lean_object* v___x_5473_; 
if (v_isShared_5471_ == 0)
{
v___x_5473_ = v___x_5470_;
goto v_reusejp_5472_;
}
else
{
lean_object* v_reuseFailAlloc_5474_; 
v_reuseFailAlloc_5474_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5474_, 0, v_a_5468_);
v___x_5473_ = v_reuseFailAlloc_5474_;
goto v_reusejp_5472_;
}
v_reusejp_5472_:
{
return v___x_5473_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9___boxed(lean_object* v___y_5476_, lean_object* v___y_5477_, lean_object* v___y_5478_, lean_object* v___y_5479_, lean_object* v___y_5480_, lean_object* v___y_5481_, lean_object* v___y_5482_, lean_object* v___y_5483_, lean_object* v___y_5484_, lean_object* v___y_5485_, lean_object* v___y_5486_, lean_object* v___y_5487_){
_start:
{
lean_object* v_res_5488_; 
v_res_5488_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9(v___y_5476_, v___y_5477_, v___y_5478_, v___y_5479_, v___y_5480_, v___y_5481_, v___y_5482_, v___y_5483_, v___y_5484_, v___y_5485_, v___y_5486_);
return v_res_5488_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5(lean_object* v_inst_5489_, lean_object* v___y_5490_, lean_object* v___y_5491_, lean_object* v___y_5492_, lean_object* v___y_5493_, lean_object* v___y_5494_, lean_object* v___y_5495_, lean_object* v___y_5496_, lean_object* v___y_5497_, lean_object* v___y_5498_, lean_object* v___y_5499_, lean_object* v___y_5500_){
_start:
{
lean_object* v___x_5502_; 
v___x_5502_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5_spec__9(v___y_5490_, v___y_5491_, v___y_5492_, v___y_5493_, v___y_5494_, v___y_5495_, v___y_5496_, v___y_5497_, v___y_5498_, v___y_5499_, v___y_5500_);
if (lean_obj_tag(v___x_5502_) == 0)
{
lean_object* v_a_5503_; lean_object* v___x_5505_; uint8_t v_isShared_5506_; uint8_t v_isSharedCheck_5513_; 
v_a_5503_ = lean_ctor_get(v___x_5502_, 0);
v_isSharedCheck_5513_ = !lean_is_exclusive(v___x_5502_);
if (v_isSharedCheck_5513_ == 0)
{
v___x_5505_ = v___x_5502_;
v_isShared_5506_ = v_isSharedCheck_5513_;
goto v_resetjp_5504_;
}
else
{
lean_inc(v_a_5503_);
lean_dec(v___x_5502_);
v___x_5505_ = lean_box(0);
v_isShared_5506_ = v_isSharedCheck_5513_;
goto v_resetjp_5504_;
}
v_resetjp_5504_:
{
lean_object* v___x_5507_; uint8_t v___x_5508_; lean_object* v___x_5509_; lean_object* v___x_5511_; 
v___x_5507_ = l_Lean_Expr_appArg_x21(v_a_5503_);
lean_dec(v_a_5503_);
v___x_5508_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_5507_, v_inst_5489_);
lean_dec_ref(v___x_5507_);
v___x_5509_ = lean_box(v___x_5508_);
if (v_isShared_5506_ == 0)
{
lean_ctor_set(v___x_5505_, 0, v___x_5509_);
v___x_5511_ = v___x_5505_;
goto v_reusejp_5510_;
}
else
{
lean_object* v_reuseFailAlloc_5512_; 
v_reuseFailAlloc_5512_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5512_, 0, v___x_5509_);
v___x_5511_ = v_reuseFailAlloc_5512_;
goto v_reusejp_5510_;
}
v_reusejp_5510_:
{
return v___x_5511_;
}
}
}
else
{
lean_object* v_a_5514_; lean_object* v___x_5516_; uint8_t v_isShared_5517_; uint8_t v_isSharedCheck_5521_; 
v_a_5514_ = lean_ctor_get(v___x_5502_, 0);
v_isSharedCheck_5521_ = !lean_is_exclusive(v___x_5502_);
if (v_isSharedCheck_5521_ == 0)
{
v___x_5516_ = v___x_5502_;
v_isShared_5517_ = v_isSharedCheck_5521_;
goto v_resetjp_5515_;
}
else
{
lean_inc(v_a_5514_);
lean_dec(v___x_5502_);
v___x_5516_ = lean_box(0);
v_isShared_5517_ = v_isSharedCheck_5521_;
goto v_resetjp_5515_;
}
v_resetjp_5515_:
{
lean_object* v___x_5519_; 
if (v_isShared_5517_ == 0)
{
v___x_5519_ = v___x_5516_;
goto v_reusejp_5518_;
}
else
{
lean_object* v_reuseFailAlloc_5520_; 
v_reuseFailAlloc_5520_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5520_, 0, v_a_5514_);
v___x_5519_ = v_reuseFailAlloc_5520_;
goto v_reusejp_5518_;
}
v_reusejp_5518_:
{
return v___x_5519_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5___boxed(lean_object* v_inst_5522_, lean_object* v___y_5523_, lean_object* v___y_5524_, lean_object* v___y_5525_, lean_object* v___y_5526_, lean_object* v___y_5527_, lean_object* v___y_5528_, lean_object* v___y_5529_, lean_object* v___y_5530_, lean_object* v___y_5531_, lean_object* v___y_5532_, lean_object* v___y_5533_, lean_object* v___y_5534_){
_start:
{
lean_object* v_res_5535_; 
v_res_5535_ = l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5(v_inst_5522_, v___y_5523_, v___y_5524_, v___y_5525_, v___y_5526_, v___y_5527_, v___y_5528_, v___y_5529_, v___y_5530_, v___y_5531_, v___y_5532_, v___y_5533_);
lean_dec_ref(v_inst_5522_);
return v_res_5535_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4_spec__7___lam__0(lean_object* v_a_5536_, lean_object* v_s_5537_){
_start:
{
lean_object* v_id_5538_; lean_object* v_type_5539_; lean_object* v_u_5540_; lean_object* v_ringInst_5541_; lean_object* v_semiringInst_5542_; lean_object* v_charInst_x3f_5543_; lean_object* v_addFn_x3f_5544_; lean_object* v_mulFn_x3f_5545_; lean_object* v_negFn_x3f_5546_; lean_object* v_powFn_x3f_5547_; lean_object* v_intCastFn_x3f_5548_; lean_object* v_natCastFn_x3f_5549_; lean_object* v_one_x3f_5550_; lean_object* v_vars_5551_; lean_object* v_varMap_5552_; lean_object* v_denote_5553_; lean_object* v___x_5555_; uint8_t v_isShared_5556_; uint8_t v_isSharedCheck_5561_; 
v_id_5538_ = lean_ctor_get(v_s_5537_, 0);
v_type_5539_ = lean_ctor_get(v_s_5537_, 1);
v_u_5540_ = lean_ctor_get(v_s_5537_, 2);
v_ringInst_5541_ = lean_ctor_get(v_s_5537_, 3);
v_semiringInst_5542_ = lean_ctor_get(v_s_5537_, 4);
v_charInst_x3f_5543_ = lean_ctor_get(v_s_5537_, 5);
v_addFn_x3f_5544_ = lean_ctor_get(v_s_5537_, 6);
v_mulFn_x3f_5545_ = lean_ctor_get(v_s_5537_, 7);
v_negFn_x3f_5546_ = lean_ctor_get(v_s_5537_, 9);
v_powFn_x3f_5547_ = lean_ctor_get(v_s_5537_, 10);
v_intCastFn_x3f_5548_ = lean_ctor_get(v_s_5537_, 11);
v_natCastFn_x3f_5549_ = lean_ctor_get(v_s_5537_, 12);
v_one_x3f_5550_ = lean_ctor_get(v_s_5537_, 13);
v_vars_5551_ = lean_ctor_get(v_s_5537_, 14);
v_varMap_5552_ = lean_ctor_get(v_s_5537_, 15);
v_denote_5553_ = lean_ctor_get(v_s_5537_, 16);
v_isSharedCheck_5561_ = !lean_is_exclusive(v_s_5537_);
if (v_isSharedCheck_5561_ == 0)
{
lean_object* v_unused_5562_; 
v_unused_5562_ = lean_ctor_get(v_s_5537_, 8);
lean_dec(v_unused_5562_);
v___x_5555_ = v_s_5537_;
v_isShared_5556_ = v_isSharedCheck_5561_;
goto v_resetjp_5554_;
}
else
{
lean_inc(v_denote_5553_);
lean_inc(v_varMap_5552_);
lean_inc(v_vars_5551_);
lean_inc(v_one_x3f_5550_);
lean_inc(v_natCastFn_x3f_5549_);
lean_inc(v_intCastFn_x3f_5548_);
lean_inc(v_powFn_x3f_5547_);
lean_inc(v_negFn_x3f_5546_);
lean_inc(v_mulFn_x3f_5545_);
lean_inc(v_addFn_x3f_5544_);
lean_inc(v_charInst_x3f_5543_);
lean_inc(v_semiringInst_5542_);
lean_inc(v_ringInst_5541_);
lean_inc(v_u_5540_);
lean_inc(v_type_5539_);
lean_inc(v_id_5538_);
lean_dec(v_s_5537_);
v___x_5555_ = lean_box(0);
v_isShared_5556_ = v_isSharedCheck_5561_;
goto v_resetjp_5554_;
}
v_resetjp_5554_:
{
lean_object* v___x_5557_; lean_object* v___x_5559_; 
v___x_5557_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_5557_, 0, v_a_5536_);
if (v_isShared_5556_ == 0)
{
lean_ctor_set(v___x_5555_, 8, v___x_5557_);
v___x_5559_ = v___x_5555_;
goto v_reusejp_5558_;
}
else
{
lean_object* v_reuseFailAlloc_5560_; 
v_reuseFailAlloc_5560_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_5560_, 0, v_id_5538_);
lean_ctor_set(v_reuseFailAlloc_5560_, 1, v_type_5539_);
lean_ctor_set(v_reuseFailAlloc_5560_, 2, v_u_5540_);
lean_ctor_set(v_reuseFailAlloc_5560_, 3, v_ringInst_5541_);
lean_ctor_set(v_reuseFailAlloc_5560_, 4, v_semiringInst_5542_);
lean_ctor_set(v_reuseFailAlloc_5560_, 5, v_charInst_x3f_5543_);
lean_ctor_set(v_reuseFailAlloc_5560_, 6, v_addFn_x3f_5544_);
lean_ctor_set(v_reuseFailAlloc_5560_, 7, v_mulFn_x3f_5545_);
lean_ctor_set(v_reuseFailAlloc_5560_, 8, v___x_5557_);
lean_ctor_set(v_reuseFailAlloc_5560_, 9, v_negFn_x3f_5546_);
lean_ctor_set(v_reuseFailAlloc_5560_, 10, v_powFn_x3f_5547_);
lean_ctor_set(v_reuseFailAlloc_5560_, 11, v_intCastFn_x3f_5548_);
lean_ctor_set(v_reuseFailAlloc_5560_, 12, v_natCastFn_x3f_5549_);
lean_ctor_set(v_reuseFailAlloc_5560_, 13, v_one_x3f_5550_);
lean_ctor_set(v_reuseFailAlloc_5560_, 14, v_vars_5551_);
lean_ctor_set(v_reuseFailAlloc_5560_, 15, v_varMap_5552_);
lean_ctor_set(v_reuseFailAlloc_5560_, 16, v_denote_5553_);
v___x_5559_ = v_reuseFailAlloc_5560_;
goto v_reusejp_5558_;
}
v_reusejp_5558_:
{
return v___x_5559_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4_spec__7(lean_object* v___y_5563_, lean_object* v___y_5564_, lean_object* v___y_5565_, lean_object* v___y_5566_, lean_object* v___y_5567_, lean_object* v___y_5568_, lean_object* v___y_5569_, lean_object* v___y_5570_, lean_object* v___y_5571_, lean_object* v___y_5572_, lean_object* v___y_5573_){
_start:
{
lean_object* v___x_5575_; 
v___x_5575_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_getRing(v___y_5563_, v___y_5564_, v___y_5565_, v___y_5566_, v___y_5567_, v___y_5568_, v___y_5569_, v___y_5570_, v___y_5571_, v___y_5572_, v___y_5573_);
if (lean_obj_tag(v___x_5575_) == 0)
{
lean_object* v_a_5576_; lean_object* v___x_5578_; uint8_t v_isShared_5579_; uint8_t v_isSharedCheck_5618_; 
v_a_5576_ = lean_ctor_get(v___x_5575_, 0);
v_isSharedCheck_5618_ = !lean_is_exclusive(v___x_5575_);
if (v_isSharedCheck_5618_ == 0)
{
v___x_5578_ = v___x_5575_;
v_isShared_5579_ = v_isSharedCheck_5618_;
goto v_resetjp_5577_;
}
else
{
lean_inc(v_a_5576_);
lean_dec(v___x_5575_);
v___x_5578_ = lean_box(0);
v_isShared_5579_ = v_isSharedCheck_5618_;
goto v_resetjp_5577_;
}
v_resetjp_5577_:
{
lean_object* v_subFn_x3f_5580_; 
v_subFn_x3f_5580_ = lean_ctor_get(v_a_5576_, 8);
if (lean_obj_tag(v_subFn_x3f_5580_) == 1)
{
lean_object* v_val_5581_; lean_object* v___x_5583_; 
lean_inc_ref(v_subFn_x3f_5580_);
lean_dec(v_a_5576_);
lean_dec(v___y_5573_);
lean_dec_ref(v___y_5572_);
lean_dec(v___y_5571_);
lean_dec_ref(v___y_5570_);
lean_dec(v___y_5569_);
lean_dec_ref(v___y_5568_);
lean_dec(v___y_5567_);
lean_dec_ref(v___y_5566_);
lean_dec(v___y_5565_);
lean_dec(v___y_5564_);
lean_dec(v___y_5563_);
v_val_5581_ = lean_ctor_get(v_subFn_x3f_5580_, 0);
lean_inc(v_val_5581_);
lean_dec_ref(v_subFn_x3f_5580_);
if (v_isShared_5579_ == 0)
{
lean_ctor_set(v___x_5578_, 0, v_val_5581_);
v___x_5583_ = v___x_5578_;
goto v_reusejp_5582_;
}
else
{
lean_object* v_reuseFailAlloc_5584_; 
v_reuseFailAlloc_5584_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5584_, 0, v_val_5581_);
v___x_5583_ = v_reuseFailAlloc_5584_;
goto v_reusejp_5582_;
}
v_reusejp_5582_:
{
return v___x_5583_;
}
}
else
{
lean_object* v_type_5585_; lean_object* v_u_5586_; lean_object* v_ringInst_5587_; lean_object* v___x_5588_; lean_object* v___x_5589_; lean_object* v___x_5590_; lean_object* v___x_5591_; lean_object* v___x_5592_; lean_object* v___x_5593_; lean_object* v___x_5594_; lean_object* v_expectedInst_5595_; lean_object* v___x_5596_; lean_object* v___x_5597_; lean_object* v___x_5598_; 
lean_del_object(v___x_5578_);
v_type_5585_ = lean_ctor_get(v_a_5576_, 1);
lean_inc_ref(v_type_5585_);
v_u_5586_ = lean_ctor_get(v_a_5576_, 2);
lean_inc(v_u_5586_);
v_ringInst_5587_ = lean_ctor_get(v_a_5576_, 3);
lean_inc_ref(v_ringInst_5587_);
lean_dec(v_a_5576_);
v___x_5588_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__1));
v___x_5589_ = lean_box(0);
lean_inc(v_u_5586_);
v___x_5590_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_5590_, 0, v_u_5586_);
lean_ctor_set(v___x_5590_, 1, v___x_5589_);
lean_inc_ref(v___x_5590_);
v___x_5591_ = l_Lean_mkConst(v___x_5588_, v___x_5590_);
v___x_5592_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__3));
v___x_5593_ = l_Lean_mkConst(v___x_5592_, v___x_5590_);
lean_inc_ref(v_type_5585_);
v___x_5594_ = l_Lean_mkAppB(v___x_5593_, v_type_5585_, v_ringInst_5587_);
lean_inc_ref(v_type_5585_);
v_expectedInst_5595_ = l_Lean_mkAppB(v___x_5591_, v_type_5585_, v___x_5594_);
v___x_5596_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__4_spec__9___closed__4));
v___x_5597_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19));
lean_inc(v___y_5564_);
v___x_5598_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3(v_type_5585_, v_u_5586_, v___x_5596_, v___x_5597_, v_expectedInst_5595_, v___y_5563_, v___y_5564_, v___y_5565_, v___y_5566_, v___y_5567_, v___y_5568_, v___y_5569_, v___y_5570_, v___y_5571_, v___y_5572_, v___y_5573_);
if (lean_obj_tag(v___x_5598_) == 0)
{
lean_object* v_a_5599_; lean_object* v___f_5600_; lean_object* v___x_5601_; 
v_a_5599_ = lean_ctor_get(v___x_5598_, 0);
lean_inc(v_a_5599_);
lean_dec_ref(v___x_5598_);
lean_inc(v_a_5599_);
v___f_5600_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4_spec__7___lam__0), 2, 1);
lean_closure_set(v___f_5600_, 0, v_a_5599_);
v___x_5601_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_modifyRing___redArg(v___f_5600_, v___y_5563_, v___y_5564_);
lean_dec(v___y_5564_);
if (lean_obj_tag(v___x_5601_) == 0)
{
lean_object* v___x_5603_; uint8_t v_isShared_5604_; uint8_t v_isSharedCheck_5608_; 
v_isSharedCheck_5608_ = !lean_is_exclusive(v___x_5601_);
if (v_isSharedCheck_5608_ == 0)
{
lean_object* v_unused_5609_; 
v_unused_5609_ = lean_ctor_get(v___x_5601_, 0);
lean_dec(v_unused_5609_);
v___x_5603_ = v___x_5601_;
v_isShared_5604_ = v_isSharedCheck_5608_;
goto v_resetjp_5602_;
}
else
{
lean_dec(v___x_5601_);
v___x_5603_ = lean_box(0);
v_isShared_5604_ = v_isSharedCheck_5608_;
goto v_resetjp_5602_;
}
v_resetjp_5602_:
{
lean_object* v___x_5606_; 
if (v_isShared_5604_ == 0)
{
lean_ctor_set(v___x_5603_, 0, v_a_5599_);
v___x_5606_ = v___x_5603_;
goto v_reusejp_5605_;
}
else
{
lean_object* v_reuseFailAlloc_5607_; 
v_reuseFailAlloc_5607_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5607_, 0, v_a_5599_);
v___x_5606_ = v_reuseFailAlloc_5607_;
goto v_reusejp_5605_;
}
v_reusejp_5605_:
{
return v___x_5606_;
}
}
}
else
{
lean_object* v_a_5610_; lean_object* v___x_5612_; uint8_t v_isShared_5613_; uint8_t v_isSharedCheck_5617_; 
lean_dec(v_a_5599_);
v_a_5610_ = lean_ctor_get(v___x_5601_, 0);
v_isSharedCheck_5617_ = !lean_is_exclusive(v___x_5601_);
if (v_isSharedCheck_5617_ == 0)
{
v___x_5612_ = v___x_5601_;
v_isShared_5613_ = v_isSharedCheck_5617_;
goto v_resetjp_5611_;
}
else
{
lean_inc(v_a_5610_);
lean_dec(v___x_5601_);
v___x_5612_ = lean_box(0);
v_isShared_5613_ = v_isSharedCheck_5617_;
goto v_resetjp_5611_;
}
v_resetjp_5611_:
{
lean_object* v___x_5615_; 
if (v_isShared_5613_ == 0)
{
v___x_5615_ = v___x_5612_;
goto v_reusejp_5614_;
}
else
{
lean_object* v_reuseFailAlloc_5616_; 
v_reuseFailAlloc_5616_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5616_, 0, v_a_5610_);
v___x_5615_ = v_reuseFailAlloc_5616_;
goto v_reusejp_5614_;
}
v_reusejp_5614_:
{
return v___x_5615_;
}
}
}
}
else
{
lean_dec(v___y_5564_);
lean_dec(v___y_5563_);
return v___x_5598_;
}
}
}
}
else
{
lean_object* v_a_5619_; lean_object* v___x_5621_; uint8_t v_isShared_5622_; uint8_t v_isSharedCheck_5626_; 
lean_dec(v___y_5573_);
lean_dec_ref(v___y_5572_);
lean_dec(v___y_5571_);
lean_dec_ref(v___y_5570_);
lean_dec(v___y_5569_);
lean_dec_ref(v___y_5568_);
lean_dec(v___y_5567_);
lean_dec_ref(v___y_5566_);
lean_dec(v___y_5565_);
lean_dec(v___y_5564_);
lean_dec(v___y_5563_);
v_a_5619_ = lean_ctor_get(v___x_5575_, 0);
v_isSharedCheck_5626_ = !lean_is_exclusive(v___x_5575_);
if (v_isSharedCheck_5626_ == 0)
{
v___x_5621_ = v___x_5575_;
v_isShared_5622_ = v_isSharedCheck_5626_;
goto v_resetjp_5620_;
}
else
{
lean_inc(v_a_5619_);
lean_dec(v___x_5575_);
v___x_5621_ = lean_box(0);
v_isShared_5622_ = v_isSharedCheck_5626_;
goto v_resetjp_5620_;
}
v_resetjp_5620_:
{
lean_object* v___x_5624_; 
if (v_isShared_5622_ == 0)
{
v___x_5624_ = v___x_5621_;
goto v_reusejp_5623_;
}
else
{
lean_object* v_reuseFailAlloc_5625_; 
v_reuseFailAlloc_5625_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5625_, 0, v_a_5619_);
v___x_5624_ = v_reuseFailAlloc_5625_;
goto v_reusejp_5623_;
}
v_reusejp_5623_:
{
return v___x_5624_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4_spec__7___boxed(lean_object* v___y_5627_, lean_object* v___y_5628_, lean_object* v___y_5629_, lean_object* v___y_5630_, lean_object* v___y_5631_, lean_object* v___y_5632_, lean_object* v___y_5633_, lean_object* v___y_5634_, lean_object* v___y_5635_, lean_object* v___y_5636_, lean_object* v___y_5637_, lean_object* v___y_5638_){
_start:
{
lean_object* v_res_5639_; 
v_res_5639_ = l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4_spec__7(v___y_5627_, v___y_5628_, v___y_5629_, v___y_5630_, v___y_5631_, v___y_5632_, v___y_5633_, v___y_5634_, v___y_5635_, v___y_5636_, v___y_5637_);
return v_res_5639_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4(lean_object* v_inst_5640_, lean_object* v___y_5641_, lean_object* v___y_5642_, lean_object* v___y_5643_, lean_object* v___y_5644_, lean_object* v___y_5645_, lean_object* v___y_5646_, lean_object* v___y_5647_, lean_object* v___y_5648_, lean_object* v___y_5649_, lean_object* v___y_5650_, lean_object* v___y_5651_){
_start:
{
lean_object* v___x_5653_; 
v___x_5653_ = l_Lean_Meta_Grind_Arith_CommRing_getSubFn___at___00Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4_spec__7(v___y_5641_, v___y_5642_, v___y_5643_, v___y_5644_, v___y_5645_, v___y_5646_, v___y_5647_, v___y_5648_, v___y_5649_, v___y_5650_, v___y_5651_);
if (lean_obj_tag(v___x_5653_) == 0)
{
lean_object* v_a_5654_; lean_object* v___x_5656_; uint8_t v_isShared_5657_; uint8_t v_isSharedCheck_5664_; 
v_a_5654_ = lean_ctor_get(v___x_5653_, 0);
v_isSharedCheck_5664_ = !lean_is_exclusive(v___x_5653_);
if (v_isSharedCheck_5664_ == 0)
{
v___x_5656_ = v___x_5653_;
v_isShared_5657_ = v_isSharedCheck_5664_;
goto v_resetjp_5655_;
}
else
{
lean_inc(v_a_5654_);
lean_dec(v___x_5653_);
v___x_5656_ = lean_box(0);
v_isShared_5657_ = v_isSharedCheck_5664_;
goto v_resetjp_5655_;
}
v_resetjp_5655_:
{
lean_object* v___x_5658_; uint8_t v___x_5659_; lean_object* v___x_5660_; lean_object* v___x_5662_; 
v___x_5658_ = l_Lean_Expr_appArg_x21(v_a_5654_);
lean_dec(v_a_5654_);
v___x_5659_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_5658_, v_inst_5640_);
lean_dec_ref(v___x_5658_);
v___x_5660_ = lean_box(v___x_5659_);
if (v_isShared_5657_ == 0)
{
lean_ctor_set(v___x_5656_, 0, v___x_5660_);
v___x_5662_ = v___x_5656_;
goto v_reusejp_5661_;
}
else
{
lean_object* v_reuseFailAlloc_5663_; 
v_reuseFailAlloc_5663_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5663_, 0, v___x_5660_);
v___x_5662_ = v_reuseFailAlloc_5663_;
goto v_reusejp_5661_;
}
v_reusejp_5661_:
{
return v___x_5662_;
}
}
}
else
{
lean_object* v_a_5665_; lean_object* v___x_5667_; uint8_t v_isShared_5668_; uint8_t v_isSharedCheck_5672_; 
v_a_5665_ = lean_ctor_get(v___x_5653_, 0);
v_isSharedCheck_5672_ = !lean_is_exclusive(v___x_5653_);
if (v_isSharedCheck_5672_ == 0)
{
v___x_5667_ = v___x_5653_;
v_isShared_5668_ = v_isSharedCheck_5672_;
goto v_resetjp_5666_;
}
else
{
lean_inc(v_a_5665_);
lean_dec(v___x_5653_);
v___x_5667_ = lean_box(0);
v_isShared_5668_ = v_isSharedCheck_5672_;
goto v_resetjp_5666_;
}
v_resetjp_5666_:
{
lean_object* v___x_5670_; 
if (v_isShared_5668_ == 0)
{
v___x_5670_ = v___x_5667_;
goto v_reusejp_5669_;
}
else
{
lean_object* v_reuseFailAlloc_5671_; 
v_reuseFailAlloc_5671_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5671_, 0, v_a_5665_);
v___x_5670_ = v_reuseFailAlloc_5671_;
goto v_reusejp_5669_;
}
v_reusejp_5669_:
{
return v___x_5670_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4___boxed(lean_object* v_inst_5673_, lean_object* v___y_5674_, lean_object* v___y_5675_, lean_object* v___y_5676_, lean_object* v___y_5677_, lean_object* v___y_5678_, lean_object* v___y_5679_, lean_object* v___y_5680_, lean_object* v___y_5681_, lean_object* v___y_5682_, lean_object* v___y_5683_, lean_object* v___y_5684_, lean_object* v___y_5685_){
_start:
{
lean_object* v_res_5686_; 
v_res_5686_ = l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4(v_inst_5673_, v___y_5674_, v___y_5675_, v___y_5676_, v___y_5677_, v___y_5678_, v___y_5679_, v___y_5680_, v___y_5681_, v___y_5682_, v___y_5683_, v___y_5684_);
lean_dec_ref(v_inst_5673_);
return v_res_5686_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2___lam__0(lean_object* v_a_5687_, lean_object* v_s_5688_){
_start:
{
lean_object* v_id_5689_; lean_object* v_type_5690_; lean_object* v_u_5691_; lean_object* v_ringInst_5692_; lean_object* v_semiringInst_5693_; lean_object* v_charInst_x3f_5694_; lean_object* v_mulFn_x3f_5695_; lean_object* v_subFn_x3f_5696_; lean_object* v_negFn_x3f_5697_; lean_object* v_powFn_x3f_5698_; lean_object* v_intCastFn_x3f_5699_; lean_object* v_natCastFn_x3f_5700_; lean_object* v_one_x3f_5701_; lean_object* v_vars_5702_; lean_object* v_varMap_5703_; lean_object* v_denote_5704_; lean_object* v___x_5706_; uint8_t v_isShared_5707_; uint8_t v_isSharedCheck_5712_; 
v_id_5689_ = lean_ctor_get(v_s_5688_, 0);
v_type_5690_ = lean_ctor_get(v_s_5688_, 1);
v_u_5691_ = lean_ctor_get(v_s_5688_, 2);
v_ringInst_5692_ = lean_ctor_get(v_s_5688_, 3);
v_semiringInst_5693_ = lean_ctor_get(v_s_5688_, 4);
v_charInst_x3f_5694_ = lean_ctor_get(v_s_5688_, 5);
v_mulFn_x3f_5695_ = lean_ctor_get(v_s_5688_, 7);
v_subFn_x3f_5696_ = lean_ctor_get(v_s_5688_, 8);
v_negFn_x3f_5697_ = lean_ctor_get(v_s_5688_, 9);
v_powFn_x3f_5698_ = lean_ctor_get(v_s_5688_, 10);
v_intCastFn_x3f_5699_ = lean_ctor_get(v_s_5688_, 11);
v_natCastFn_x3f_5700_ = lean_ctor_get(v_s_5688_, 12);
v_one_x3f_5701_ = lean_ctor_get(v_s_5688_, 13);
v_vars_5702_ = lean_ctor_get(v_s_5688_, 14);
v_varMap_5703_ = lean_ctor_get(v_s_5688_, 15);
v_denote_5704_ = lean_ctor_get(v_s_5688_, 16);
v_isSharedCheck_5712_ = !lean_is_exclusive(v_s_5688_);
if (v_isSharedCheck_5712_ == 0)
{
lean_object* v_unused_5713_; 
v_unused_5713_ = lean_ctor_get(v_s_5688_, 6);
lean_dec(v_unused_5713_);
v___x_5706_ = v_s_5688_;
v_isShared_5707_ = v_isSharedCheck_5712_;
goto v_resetjp_5705_;
}
else
{
lean_inc(v_denote_5704_);
lean_inc(v_varMap_5703_);
lean_inc(v_vars_5702_);
lean_inc(v_one_x3f_5701_);
lean_inc(v_natCastFn_x3f_5700_);
lean_inc(v_intCastFn_x3f_5699_);
lean_inc(v_powFn_x3f_5698_);
lean_inc(v_negFn_x3f_5697_);
lean_inc(v_subFn_x3f_5696_);
lean_inc(v_mulFn_x3f_5695_);
lean_inc(v_charInst_x3f_5694_);
lean_inc(v_semiringInst_5693_);
lean_inc(v_ringInst_5692_);
lean_inc(v_u_5691_);
lean_inc(v_type_5690_);
lean_inc(v_id_5689_);
lean_dec(v_s_5688_);
v___x_5706_ = lean_box(0);
v_isShared_5707_ = v_isSharedCheck_5712_;
goto v_resetjp_5705_;
}
v_resetjp_5705_:
{
lean_object* v___x_5708_; lean_object* v___x_5710_; 
v___x_5708_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_5708_, 0, v_a_5687_);
if (v_isShared_5707_ == 0)
{
lean_ctor_set(v___x_5706_, 6, v___x_5708_);
v___x_5710_ = v___x_5706_;
goto v_reusejp_5709_;
}
else
{
lean_object* v_reuseFailAlloc_5711_; 
v_reuseFailAlloc_5711_ = lean_alloc_ctor(0, 17, 0);
lean_ctor_set(v_reuseFailAlloc_5711_, 0, v_id_5689_);
lean_ctor_set(v_reuseFailAlloc_5711_, 1, v_type_5690_);
lean_ctor_set(v_reuseFailAlloc_5711_, 2, v_u_5691_);
lean_ctor_set(v_reuseFailAlloc_5711_, 3, v_ringInst_5692_);
lean_ctor_set(v_reuseFailAlloc_5711_, 4, v_semiringInst_5693_);
lean_ctor_set(v_reuseFailAlloc_5711_, 5, v_charInst_x3f_5694_);
lean_ctor_set(v_reuseFailAlloc_5711_, 6, v___x_5708_);
lean_ctor_set(v_reuseFailAlloc_5711_, 7, v_mulFn_x3f_5695_);
lean_ctor_set(v_reuseFailAlloc_5711_, 8, v_subFn_x3f_5696_);
lean_ctor_set(v_reuseFailAlloc_5711_, 9, v_negFn_x3f_5697_);
lean_ctor_set(v_reuseFailAlloc_5711_, 10, v_powFn_x3f_5698_);
lean_ctor_set(v_reuseFailAlloc_5711_, 11, v_intCastFn_x3f_5699_);
lean_ctor_set(v_reuseFailAlloc_5711_, 12, v_natCastFn_x3f_5700_);
lean_ctor_set(v_reuseFailAlloc_5711_, 13, v_one_x3f_5701_);
lean_ctor_set(v_reuseFailAlloc_5711_, 14, v_vars_5702_);
lean_ctor_set(v_reuseFailAlloc_5711_, 15, v_varMap_5703_);
lean_ctor_set(v_reuseFailAlloc_5711_, 16, v_denote_5704_);
v___x_5710_ = v_reuseFailAlloc_5711_;
goto v_reusejp_5709_;
}
v_reusejp_5709_:
{
return v___x_5710_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2(lean_object* v___y_5714_, lean_object* v___y_5715_, lean_object* v___y_5716_, lean_object* v___y_5717_, lean_object* v___y_5718_, lean_object* v___y_5719_, lean_object* v___y_5720_, lean_object* v___y_5721_, lean_object* v___y_5722_, lean_object* v___y_5723_, lean_object* v___y_5724_){
_start:
{
lean_object* v___x_5726_; 
v___x_5726_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_getRing(v___y_5714_, v___y_5715_, v___y_5716_, v___y_5717_, v___y_5718_, v___y_5719_, v___y_5720_, v___y_5721_, v___y_5722_, v___y_5723_, v___y_5724_);
if (lean_obj_tag(v___x_5726_) == 0)
{
lean_object* v_a_5727_; lean_object* v___x_5729_; uint8_t v_isShared_5730_; uint8_t v_isSharedCheck_5769_; 
v_a_5727_ = lean_ctor_get(v___x_5726_, 0);
v_isSharedCheck_5769_ = !lean_is_exclusive(v___x_5726_);
if (v_isSharedCheck_5769_ == 0)
{
v___x_5729_ = v___x_5726_;
v_isShared_5730_ = v_isSharedCheck_5769_;
goto v_resetjp_5728_;
}
else
{
lean_inc(v_a_5727_);
lean_dec(v___x_5726_);
v___x_5729_ = lean_box(0);
v_isShared_5730_ = v_isSharedCheck_5769_;
goto v_resetjp_5728_;
}
v_resetjp_5728_:
{
lean_object* v_addFn_x3f_5731_; 
v_addFn_x3f_5731_ = lean_ctor_get(v_a_5727_, 6);
if (lean_obj_tag(v_addFn_x3f_5731_) == 1)
{
lean_object* v_val_5732_; lean_object* v___x_5734_; 
lean_inc_ref(v_addFn_x3f_5731_);
lean_dec(v_a_5727_);
lean_dec(v___y_5724_);
lean_dec_ref(v___y_5723_);
lean_dec(v___y_5722_);
lean_dec_ref(v___y_5721_);
lean_dec(v___y_5720_);
lean_dec_ref(v___y_5719_);
lean_dec(v___y_5718_);
lean_dec_ref(v___y_5717_);
lean_dec(v___y_5716_);
lean_dec(v___y_5715_);
lean_dec(v___y_5714_);
v_val_5732_ = lean_ctor_get(v_addFn_x3f_5731_, 0);
lean_inc(v_val_5732_);
lean_dec_ref(v_addFn_x3f_5731_);
if (v_isShared_5730_ == 0)
{
lean_ctor_set(v___x_5729_, 0, v_val_5732_);
v___x_5734_ = v___x_5729_;
goto v_reusejp_5733_;
}
else
{
lean_object* v_reuseFailAlloc_5735_; 
v_reuseFailAlloc_5735_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5735_, 0, v_val_5732_);
v___x_5734_ = v_reuseFailAlloc_5735_;
goto v_reusejp_5733_;
}
v_reusejp_5733_:
{
return v___x_5734_;
}
}
else
{
lean_object* v_type_5736_; lean_object* v_u_5737_; lean_object* v_semiringInst_5738_; lean_object* v___x_5739_; lean_object* v___x_5740_; lean_object* v___x_5741_; lean_object* v___x_5742_; lean_object* v___x_5743_; lean_object* v___x_5744_; lean_object* v___x_5745_; lean_object* v_expectedInst_5746_; lean_object* v___x_5747_; lean_object* v___x_5748_; lean_object* v___x_5749_; 
lean_del_object(v___x_5729_);
v_type_5736_ = lean_ctor_get(v_a_5727_, 1);
lean_inc_ref(v_type_5736_);
v_u_5737_ = lean_ctor_get(v_a_5727_, 2);
lean_inc(v_u_5737_);
v_semiringInst_5738_ = lean_ctor_get(v_a_5727_, 4);
lean_inc_ref(v_semiringInst_5738_);
lean_dec(v_a_5727_);
v___x_5739_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__1));
v___x_5740_ = lean_box(0);
lean_inc(v_u_5737_);
v___x_5741_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_5741_, 0, v_u_5737_);
lean_ctor_set(v___x_5741_, 1, v___x_5740_);
lean_inc_ref(v___x_5741_);
v___x_5742_ = l_Lean_mkConst(v___x_5739_, v___x_5741_);
v___x_5743_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3));
v___x_5744_ = l_Lean_mkConst(v___x_5743_, v___x_5741_);
lean_inc_ref(v_type_5736_);
v___x_5745_ = l_Lean_mkAppB(v___x_5744_, v_type_5736_, v_semiringInst_5738_);
lean_inc_ref(v_type_5736_);
v_expectedInst_5746_ = l_Lean_mkAppB(v___x_5742_, v_type_5736_, v___x_5745_);
v___x_5747_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__4));
v___x_5748_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
lean_inc(v___y_5715_);
v___x_5749_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3(v_type_5736_, v_u_5737_, v___x_5747_, v___x_5748_, v_expectedInst_5746_, v___y_5714_, v___y_5715_, v___y_5716_, v___y_5717_, v___y_5718_, v___y_5719_, v___y_5720_, v___y_5721_, v___y_5722_, v___y_5723_, v___y_5724_);
if (lean_obj_tag(v___x_5749_) == 0)
{
lean_object* v_a_5750_; lean_object* v___f_5751_; lean_object* v___x_5752_; 
v_a_5750_ = lean_ctor_get(v___x_5749_, 0);
lean_inc(v_a_5750_);
lean_dec_ref(v___x_5749_);
lean_inc(v_a_5750_);
v___f_5751_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2___lam__0), 2, 1);
lean_closure_set(v___f_5751_, 0, v_a_5750_);
v___x_5752_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommRingM_modifyRing___redArg(v___f_5751_, v___y_5714_, v___y_5715_);
lean_dec(v___y_5715_);
if (lean_obj_tag(v___x_5752_) == 0)
{
lean_object* v___x_5754_; uint8_t v_isShared_5755_; uint8_t v_isSharedCheck_5759_; 
v_isSharedCheck_5759_ = !lean_is_exclusive(v___x_5752_);
if (v_isSharedCheck_5759_ == 0)
{
lean_object* v_unused_5760_; 
v_unused_5760_ = lean_ctor_get(v___x_5752_, 0);
lean_dec(v_unused_5760_);
v___x_5754_ = v___x_5752_;
v_isShared_5755_ = v_isSharedCheck_5759_;
goto v_resetjp_5753_;
}
else
{
lean_dec(v___x_5752_);
v___x_5754_ = lean_box(0);
v_isShared_5755_ = v_isSharedCheck_5759_;
goto v_resetjp_5753_;
}
v_resetjp_5753_:
{
lean_object* v___x_5757_; 
if (v_isShared_5755_ == 0)
{
lean_ctor_set(v___x_5754_, 0, v_a_5750_);
v___x_5757_ = v___x_5754_;
goto v_reusejp_5756_;
}
else
{
lean_object* v_reuseFailAlloc_5758_; 
v_reuseFailAlloc_5758_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5758_, 0, v_a_5750_);
v___x_5757_ = v_reuseFailAlloc_5758_;
goto v_reusejp_5756_;
}
v_reusejp_5756_:
{
return v___x_5757_;
}
}
}
else
{
lean_object* v_a_5761_; lean_object* v___x_5763_; uint8_t v_isShared_5764_; uint8_t v_isSharedCheck_5768_; 
lean_dec(v_a_5750_);
v_a_5761_ = lean_ctor_get(v___x_5752_, 0);
v_isSharedCheck_5768_ = !lean_is_exclusive(v___x_5752_);
if (v_isSharedCheck_5768_ == 0)
{
v___x_5763_ = v___x_5752_;
v_isShared_5764_ = v_isSharedCheck_5768_;
goto v_resetjp_5762_;
}
else
{
lean_inc(v_a_5761_);
lean_dec(v___x_5752_);
v___x_5763_ = lean_box(0);
v_isShared_5764_ = v_isSharedCheck_5768_;
goto v_resetjp_5762_;
}
v_resetjp_5762_:
{
lean_object* v___x_5766_; 
if (v_isShared_5764_ == 0)
{
v___x_5766_ = v___x_5763_;
goto v_reusejp_5765_;
}
else
{
lean_object* v_reuseFailAlloc_5767_; 
v_reuseFailAlloc_5767_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5767_, 0, v_a_5761_);
v___x_5766_ = v_reuseFailAlloc_5767_;
goto v_reusejp_5765_;
}
v_reusejp_5765_:
{
return v___x_5766_;
}
}
}
}
else
{
lean_dec(v___y_5715_);
lean_dec(v___y_5714_);
return v___x_5749_;
}
}
}
}
else
{
lean_object* v_a_5770_; lean_object* v___x_5772_; uint8_t v_isShared_5773_; uint8_t v_isSharedCheck_5777_; 
lean_dec(v___y_5724_);
lean_dec_ref(v___y_5723_);
lean_dec(v___y_5722_);
lean_dec_ref(v___y_5721_);
lean_dec(v___y_5720_);
lean_dec_ref(v___y_5719_);
lean_dec(v___y_5718_);
lean_dec_ref(v___y_5717_);
lean_dec(v___y_5716_);
lean_dec(v___y_5715_);
lean_dec(v___y_5714_);
v_a_5770_ = lean_ctor_get(v___x_5726_, 0);
v_isSharedCheck_5777_ = !lean_is_exclusive(v___x_5726_);
if (v_isSharedCheck_5777_ == 0)
{
v___x_5772_ = v___x_5726_;
v_isShared_5773_ = v_isSharedCheck_5777_;
goto v_resetjp_5771_;
}
else
{
lean_inc(v_a_5770_);
lean_dec(v___x_5726_);
v___x_5772_ = lean_box(0);
v_isShared_5773_ = v_isSharedCheck_5777_;
goto v_resetjp_5771_;
}
v_resetjp_5771_:
{
lean_object* v___x_5775_; 
if (v_isShared_5773_ == 0)
{
v___x_5775_ = v___x_5772_;
goto v_reusejp_5774_;
}
else
{
lean_object* v_reuseFailAlloc_5776_; 
v_reuseFailAlloc_5776_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5776_, 0, v_a_5770_);
v___x_5775_ = v_reuseFailAlloc_5776_;
goto v_reusejp_5774_;
}
v_reusejp_5774_:
{
return v___x_5775_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2___boxed(lean_object* v___y_5778_, lean_object* v___y_5779_, lean_object* v___y_5780_, lean_object* v___y_5781_, lean_object* v___y_5782_, lean_object* v___y_5783_, lean_object* v___y_5784_, lean_object* v___y_5785_, lean_object* v___y_5786_, lean_object* v___y_5787_, lean_object* v___y_5788_, lean_object* v___y_5789_){
_start:
{
lean_object* v_res_5790_; 
v_res_5790_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2(v___y_5778_, v___y_5779_, v___y_5780_, v___y_5781_, v___y_5782_, v___y_5783_, v___y_5784_, v___y_5785_, v___y_5786_, v___y_5787_, v___y_5788_);
return v_res_5790_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1(lean_object* v_inst_5791_, lean_object* v___y_5792_, lean_object* v___y_5793_, lean_object* v___y_5794_, lean_object* v___y_5795_, lean_object* v___y_5796_, lean_object* v___y_5797_, lean_object* v___y_5798_, lean_object* v___y_5799_, lean_object* v___y_5800_, lean_object* v___y_5801_, lean_object* v___y_5802_){
_start:
{
lean_object* v___x_5804_; 
v___x_5804_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2(v___y_5792_, v___y_5793_, v___y_5794_, v___y_5795_, v___y_5796_, v___y_5797_, v___y_5798_, v___y_5799_, v___y_5800_, v___y_5801_, v___y_5802_);
if (lean_obj_tag(v___x_5804_) == 0)
{
lean_object* v_a_5805_; lean_object* v___x_5807_; uint8_t v_isShared_5808_; uint8_t v_isSharedCheck_5815_; 
v_a_5805_ = lean_ctor_get(v___x_5804_, 0);
v_isSharedCheck_5815_ = !lean_is_exclusive(v___x_5804_);
if (v_isSharedCheck_5815_ == 0)
{
v___x_5807_ = v___x_5804_;
v_isShared_5808_ = v_isSharedCheck_5815_;
goto v_resetjp_5806_;
}
else
{
lean_inc(v_a_5805_);
lean_dec(v___x_5804_);
v___x_5807_ = lean_box(0);
v_isShared_5808_ = v_isSharedCheck_5815_;
goto v_resetjp_5806_;
}
v_resetjp_5806_:
{
lean_object* v___x_5809_; uint8_t v___x_5810_; lean_object* v___x_5811_; lean_object* v___x_5813_; 
v___x_5809_ = l_Lean_Expr_appArg_x21(v_a_5805_);
lean_dec(v_a_5805_);
v___x_5810_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_5809_, v_inst_5791_);
lean_dec_ref(v___x_5809_);
v___x_5811_ = lean_box(v___x_5810_);
if (v_isShared_5808_ == 0)
{
lean_ctor_set(v___x_5807_, 0, v___x_5811_);
v___x_5813_ = v___x_5807_;
goto v_reusejp_5812_;
}
else
{
lean_object* v_reuseFailAlloc_5814_; 
v_reuseFailAlloc_5814_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5814_, 0, v___x_5811_);
v___x_5813_ = v_reuseFailAlloc_5814_;
goto v_reusejp_5812_;
}
v_reusejp_5812_:
{
return v___x_5813_;
}
}
}
else
{
lean_object* v_a_5816_; lean_object* v___x_5818_; uint8_t v_isShared_5819_; uint8_t v_isSharedCheck_5823_; 
v_a_5816_ = lean_ctor_get(v___x_5804_, 0);
v_isSharedCheck_5823_ = !lean_is_exclusive(v___x_5804_);
if (v_isSharedCheck_5823_ == 0)
{
v___x_5818_ = v___x_5804_;
v_isShared_5819_ = v_isSharedCheck_5823_;
goto v_resetjp_5817_;
}
else
{
lean_inc(v_a_5816_);
lean_dec(v___x_5804_);
v___x_5818_ = lean_box(0);
v_isShared_5819_ = v_isSharedCheck_5823_;
goto v_resetjp_5817_;
}
v_resetjp_5817_:
{
lean_object* v___x_5821_; 
if (v_isShared_5819_ == 0)
{
v___x_5821_ = v___x_5818_;
goto v_reusejp_5820_;
}
else
{
lean_object* v_reuseFailAlloc_5822_; 
v_reuseFailAlloc_5822_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5822_, 0, v_a_5816_);
v___x_5821_ = v_reuseFailAlloc_5822_;
goto v_reusejp_5820_;
}
v_reusejp_5820_:
{
return v___x_5821_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1___boxed(lean_object* v_inst_5824_, lean_object* v___y_5825_, lean_object* v___y_5826_, lean_object* v___y_5827_, lean_object* v___y_5828_, lean_object* v___y_5829_, lean_object* v___y_5830_, lean_object* v___y_5831_, lean_object* v___y_5832_, lean_object* v___y_5833_, lean_object* v___y_5834_, lean_object* v___y_5835_, lean_object* v___y_5836_){
_start:
{
lean_object* v_res_5837_; 
v_res_5837_ = l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1(v_inst_5824_, v___y_5825_, v___y_5826_, v___y_5827_, v___y_5828_, v___y_5829_, v___y_5830_, v___y_5831_, v___y_5832_, v___y_5833_, v___y_5834_, v___y_5835_);
lean_dec_ref(v_inst_5824_);
return v_res_5837_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(lean_object* v_toVar_5838_, lean_object* v_asVar_5839_, lean_object* v_e_5840_, lean_object* v___y_5841_, lean_object* v___y_5842_, lean_object* v___y_5843_, lean_object* v___y_5844_, lean_object* v___y_5845_, lean_object* v___y_5846_, lean_object* v___y_5847_, lean_object* v___y_5848_, lean_object* v___y_5849_, lean_object* v___y_5850_, lean_object* v___y_5851_){
_start:
{
lean_object* v___x_5853_; 
lean_inc_ref(v_e_5840_);
v___x_5853_ = l_Lean_Meta_instantiateMVarsIfMVarApp___redArg(v_e_5840_, v___y_5849_);
if (lean_obj_tag(v___x_5853_) == 0)
{
lean_object* v_a_5854_; lean_object* v_n_5856_; lean_object* v___x_5884_; uint8_t v___x_5885_; 
v_a_5854_ = lean_ctor_get(v___x_5853_, 0);
lean_inc(v_a_5854_);
lean_dec_ref(v___x_5853_);
v___x_5884_ = l_Lean_Expr_cleanupAnnotations(v_a_5854_);
v___x_5885_ = l_Lean_Expr_isApp(v___x_5884_);
if (v___x_5885_ == 0)
{
lean_object* v___x_5886_; 
lean_dec_ref(v___x_5884_);
lean_dec_ref(v_asVar_5839_);
v___x_5886_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5886_;
}
else
{
lean_object* v_arg_5887_; lean_object* v___x_5888_; uint8_t v___x_5889_; 
v_arg_5887_ = lean_ctor_get(v___x_5884_, 1);
lean_inc_ref(v_arg_5887_);
v___x_5888_ = l_Lean_Expr_appFnCleanup___redArg(v___x_5884_);
v___x_5889_ = l_Lean_Expr_isApp(v___x_5888_);
if (v___x_5889_ == 0)
{
lean_object* v___x_5890_; 
lean_dec_ref(v___x_5888_);
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_asVar_5839_);
v___x_5890_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5890_;
}
else
{
lean_object* v_arg_5891_; lean_object* v___x_5892_; lean_object* v___x_5893_; uint8_t v___x_5894_; 
v_arg_5891_ = lean_ctor_get(v___x_5888_, 1);
lean_inc_ref(v_arg_5891_);
v___x_5892_ = l_Lean_Expr_appFnCleanup___redArg(v___x_5888_);
v___x_5893_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__2));
v___x_5894_ = l_Lean_Expr_isConstOf(v___x_5892_, v___x_5893_);
if (v___x_5894_ == 0)
{
uint8_t v___x_5895_; 
v___x_5895_ = l_Lean_Expr_isApp(v___x_5892_);
if (v___x_5895_ == 0)
{
lean_object* v___x_5896_; 
lean_dec_ref(v___x_5892_);
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_asVar_5839_);
v___x_5896_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5896_;
}
else
{
lean_object* v_arg_5897_; lean_object* v___x_5898_; lean_object* v___x_5899_; uint8_t v___x_5900_; 
v_arg_5897_ = lean_ctor_get(v___x_5892_, 1);
lean_inc_ref(v_arg_5897_);
v___x_5898_ = l_Lean_Expr_appFnCleanup___redArg(v___x_5892_);
v___x_5899_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_5900_ = l_Lean_Expr_isConstOf(v___x_5898_, v___x_5899_);
if (v___x_5900_ == 0)
{
lean_object* v___x_5901_; uint8_t v___x_5902_; 
v___x_5901_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_5902_ = l_Lean_Expr_isConstOf(v___x_5898_, v___x_5901_);
if (v___x_5902_ == 0)
{
lean_object* v___x_5903_; uint8_t v___x_5904_; 
v___x_5903_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10));
v___x_5904_ = l_Lean_Expr_isConstOf(v___x_5898_, v___x_5903_);
if (v___x_5904_ == 0)
{
lean_object* v___x_5905_; uint8_t v___x_5906_; 
v___x_5905_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13));
v___x_5906_ = l_Lean_Expr_isConstOf(v___x_5898_, v___x_5905_);
if (v___x_5906_ == 0)
{
uint8_t v___x_5907_; 
v___x_5907_ = l_Lean_Expr_isApp(v___x_5898_);
if (v___x_5907_ == 0)
{
lean_object* v___x_5908_; 
lean_dec_ref(v___x_5898_);
lean_dec_ref(v_arg_5897_);
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_asVar_5839_);
v___x_5908_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5908_;
}
else
{
lean_object* v___x_5909_; uint8_t v___x_5910_; 
v___x_5909_ = l_Lean_Expr_appFnCleanup___redArg(v___x_5898_);
v___x_5910_ = l_Lean_Expr_isApp(v___x_5909_);
if (v___x_5910_ == 0)
{
lean_object* v___x_5911_; 
lean_dec_ref(v___x_5909_);
lean_dec_ref(v_arg_5897_);
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_asVar_5839_);
v___x_5911_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5911_;
}
else
{
lean_object* v___x_5912_; uint8_t v___x_5913_; 
v___x_5912_ = l_Lean_Expr_appFnCleanup___redArg(v___x_5909_);
v___x_5913_ = l_Lean_Expr_isApp(v___x_5912_);
if (v___x_5913_ == 0)
{
lean_object* v___x_5914_; 
lean_dec_ref(v___x_5912_);
lean_dec_ref(v_arg_5897_);
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_asVar_5839_);
v___x_5914_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5914_;
}
else
{
lean_object* v___x_5915_; lean_object* v___x_5916_; uint8_t v___x_5917_; 
v___x_5915_ = l_Lean_Expr_appFnCleanup___redArg(v___x_5912_);
v___x_5916_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_5917_ = l_Lean_Expr_isConstOf(v___x_5915_, v___x_5916_);
if (v___x_5917_ == 0)
{
lean_object* v___x_5918_; uint8_t v___x_5919_; 
v___x_5918_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19));
v___x_5919_ = l_Lean_Expr_isConstOf(v___x_5915_, v___x_5918_);
if (v___x_5919_ == 0)
{
lean_object* v___x_5920_; uint8_t v___x_5921_; 
v___x_5920_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_5921_ = l_Lean_Expr_isConstOf(v___x_5915_, v___x_5920_);
if (v___x_5921_ == 0)
{
lean_object* v___x_5922_; uint8_t v___x_5923_; 
v___x_5922_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_5923_ = l_Lean_Expr_isConstOf(v___x_5915_, v___x_5922_);
lean_dec_ref(v___x_5915_);
if (v___x_5923_ == 0)
{
lean_object* v___x_5924_; 
lean_dec_ref(v_arg_5897_);
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_asVar_5839_);
v___x_5924_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5924_;
}
else
{
lean_object* v___x_5925_; 
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
lean_inc(v___y_5847_);
lean_inc_ref(v___y_5846_);
lean_inc(v___y_5845_);
lean_inc_ref(v___y_5844_);
lean_inc(v___y_5843_);
lean_inc(v___y_5842_);
lean_inc(v___y_5841_);
v___x_5925_ = l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1(v_arg_5897_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
lean_dec_ref(v_arg_5897_);
if (lean_obj_tag(v___x_5925_) == 0)
{
lean_object* v_a_5926_; uint8_t v___x_5927_; 
v_a_5926_ = lean_ctor_get(v___x_5925_, 0);
lean_inc(v_a_5926_);
lean_dec_ref(v___x_5925_);
v___x_5927_ = lean_unbox(v_a_5926_);
lean_dec(v_a_5926_);
if (v___x_5927_ == 0)
{
lean_object* v___x_5928_; 
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_toVar_5838_);
v___x_5928_ = lean_apply_13(v_asVar_5839_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5928_;
}
else
{
lean_object* v___x_5929_; 
lean_dec_ref(v_e_5840_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
lean_inc(v___y_5847_);
lean_inc_ref(v___y_5846_);
lean_inc(v___y_5845_);
lean_inc_ref(v___y_5844_);
lean_inc(v___y_5843_);
lean_inc(v___y_5842_);
lean_inc(v___y_5841_);
lean_inc_ref(v_asVar_5839_);
lean_inc_ref(v_toVar_5838_);
v___x_5929_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_5838_, v_asVar_5839_, v_arg_5891_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
if (lean_obj_tag(v___x_5929_) == 0)
{
lean_object* v_a_5930_; lean_object* v___x_5931_; 
v_a_5930_ = lean_ctor_get(v___x_5929_, 0);
lean_inc(v_a_5930_);
lean_dec_ref(v___x_5929_);
v___x_5931_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_5838_, v_asVar_5839_, v_arg_5887_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
if (lean_obj_tag(v___x_5931_) == 0)
{
lean_object* v_a_5932_; lean_object* v___x_5934_; uint8_t v_isShared_5935_; uint8_t v_isSharedCheck_5940_; 
v_a_5932_ = lean_ctor_get(v___x_5931_, 0);
v_isSharedCheck_5940_ = !lean_is_exclusive(v___x_5931_);
if (v_isSharedCheck_5940_ == 0)
{
v___x_5934_ = v___x_5931_;
v_isShared_5935_ = v_isSharedCheck_5940_;
goto v_resetjp_5933_;
}
else
{
lean_inc(v_a_5932_);
lean_dec(v___x_5931_);
v___x_5934_ = lean_box(0);
v_isShared_5935_ = v_isSharedCheck_5940_;
goto v_resetjp_5933_;
}
v_resetjp_5933_:
{
lean_object* v___x_5936_; lean_object* v___x_5938_; 
v___x_5936_ = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(v___x_5936_, 0, v_a_5930_);
lean_ctor_set(v___x_5936_, 1, v_a_5932_);
if (v_isShared_5935_ == 0)
{
lean_ctor_set(v___x_5934_, 0, v___x_5936_);
v___x_5938_ = v___x_5934_;
goto v_reusejp_5937_;
}
else
{
lean_object* v_reuseFailAlloc_5939_; 
v_reuseFailAlloc_5939_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5939_, 0, v___x_5936_);
v___x_5938_ = v_reuseFailAlloc_5939_;
goto v_reusejp_5937_;
}
v_reusejp_5937_:
{
return v___x_5938_;
}
}
}
else
{
lean_dec(v_a_5930_);
return v___x_5931_;
}
}
else
{
lean_dec_ref(v_arg_5887_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
return v___x_5929_;
}
}
}
else
{
lean_object* v_a_5941_; lean_object* v___x_5943_; uint8_t v_isShared_5944_; uint8_t v_isSharedCheck_5948_; 
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
v_a_5941_ = lean_ctor_get(v___x_5925_, 0);
v_isSharedCheck_5948_ = !lean_is_exclusive(v___x_5925_);
if (v_isSharedCheck_5948_ == 0)
{
v___x_5943_ = v___x_5925_;
v_isShared_5944_ = v_isSharedCheck_5948_;
goto v_resetjp_5942_;
}
else
{
lean_inc(v_a_5941_);
lean_dec(v___x_5925_);
v___x_5943_ = lean_box(0);
v_isShared_5944_ = v_isSharedCheck_5948_;
goto v_resetjp_5942_;
}
v_resetjp_5942_:
{
lean_object* v___x_5946_; 
if (v_isShared_5944_ == 0)
{
v___x_5946_ = v___x_5943_;
goto v_reusejp_5945_;
}
else
{
lean_object* v_reuseFailAlloc_5947_; 
v_reuseFailAlloc_5947_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5947_, 0, v_a_5941_);
v___x_5946_ = v_reuseFailAlloc_5947_;
goto v_reusejp_5945_;
}
v_reusejp_5945_:
{
return v___x_5946_;
}
}
}
}
}
else
{
lean_object* v___x_5949_; 
lean_dec_ref(v___x_5915_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
lean_inc(v___y_5847_);
lean_inc_ref(v___y_5846_);
lean_inc(v___y_5845_);
lean_inc_ref(v___y_5844_);
lean_inc(v___y_5843_);
lean_inc(v___y_5842_);
lean_inc(v___y_5841_);
v___x_5949_ = l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3(v_arg_5897_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
lean_dec_ref(v_arg_5897_);
if (lean_obj_tag(v___x_5949_) == 0)
{
lean_object* v_a_5950_; uint8_t v___x_5951_; 
v_a_5950_ = lean_ctor_get(v___x_5949_, 0);
lean_inc(v_a_5950_);
lean_dec_ref(v___x_5949_);
v___x_5951_ = lean_unbox(v_a_5950_);
lean_dec(v_a_5950_);
if (v___x_5951_ == 0)
{
lean_object* v___x_5952_; 
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_toVar_5838_);
v___x_5952_ = lean_apply_13(v_asVar_5839_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5952_;
}
else
{
lean_object* v___x_5953_; 
lean_dec_ref(v_e_5840_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
lean_inc(v___y_5847_);
lean_inc_ref(v___y_5846_);
lean_inc(v___y_5845_);
lean_inc_ref(v___y_5844_);
lean_inc(v___y_5843_);
lean_inc(v___y_5842_);
lean_inc(v___y_5841_);
lean_inc_ref(v_asVar_5839_);
lean_inc_ref(v_toVar_5838_);
v___x_5953_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_5838_, v_asVar_5839_, v_arg_5891_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
if (lean_obj_tag(v___x_5953_) == 0)
{
lean_object* v_a_5954_; lean_object* v___x_5955_; 
v_a_5954_ = lean_ctor_get(v___x_5953_, 0);
lean_inc(v_a_5954_);
lean_dec_ref(v___x_5953_);
v___x_5955_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_5838_, v_asVar_5839_, v_arg_5887_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
if (lean_obj_tag(v___x_5955_) == 0)
{
lean_object* v_a_5956_; lean_object* v___x_5958_; uint8_t v_isShared_5959_; uint8_t v_isSharedCheck_5964_; 
v_a_5956_ = lean_ctor_get(v___x_5955_, 0);
v_isSharedCheck_5964_ = !lean_is_exclusive(v___x_5955_);
if (v_isSharedCheck_5964_ == 0)
{
v___x_5958_ = v___x_5955_;
v_isShared_5959_ = v_isSharedCheck_5964_;
goto v_resetjp_5957_;
}
else
{
lean_inc(v_a_5956_);
lean_dec(v___x_5955_);
v___x_5958_ = lean_box(0);
v_isShared_5959_ = v_isSharedCheck_5964_;
goto v_resetjp_5957_;
}
v_resetjp_5957_:
{
lean_object* v___x_5960_; lean_object* v___x_5962_; 
v___x_5960_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_5960_, 0, v_a_5954_);
lean_ctor_set(v___x_5960_, 1, v_a_5956_);
if (v_isShared_5959_ == 0)
{
lean_ctor_set(v___x_5958_, 0, v___x_5960_);
v___x_5962_ = v___x_5958_;
goto v_reusejp_5961_;
}
else
{
lean_object* v_reuseFailAlloc_5963_; 
v_reuseFailAlloc_5963_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5963_, 0, v___x_5960_);
v___x_5962_ = v_reuseFailAlloc_5963_;
goto v_reusejp_5961_;
}
v_reusejp_5961_:
{
return v___x_5962_;
}
}
}
else
{
lean_dec(v_a_5954_);
return v___x_5955_;
}
}
else
{
lean_dec_ref(v_arg_5887_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
return v___x_5953_;
}
}
}
else
{
lean_object* v_a_5965_; lean_object* v___x_5967_; uint8_t v_isShared_5968_; uint8_t v_isSharedCheck_5972_; 
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
v_a_5965_ = lean_ctor_get(v___x_5949_, 0);
v_isSharedCheck_5972_ = !lean_is_exclusive(v___x_5949_);
if (v_isSharedCheck_5972_ == 0)
{
v___x_5967_ = v___x_5949_;
v_isShared_5968_ = v_isSharedCheck_5972_;
goto v_resetjp_5966_;
}
else
{
lean_inc(v_a_5965_);
lean_dec(v___x_5949_);
v___x_5967_ = lean_box(0);
v_isShared_5968_ = v_isSharedCheck_5972_;
goto v_resetjp_5966_;
}
v_resetjp_5966_:
{
lean_object* v___x_5970_; 
if (v_isShared_5968_ == 0)
{
v___x_5970_ = v___x_5967_;
goto v_reusejp_5969_;
}
else
{
lean_object* v_reuseFailAlloc_5971_; 
v_reuseFailAlloc_5971_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5971_, 0, v_a_5965_);
v___x_5970_ = v_reuseFailAlloc_5971_;
goto v_reusejp_5969_;
}
v_reusejp_5969_:
{
return v___x_5970_;
}
}
}
}
}
else
{
lean_object* v___x_5973_; 
lean_dec_ref(v___x_5915_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
lean_inc(v___y_5847_);
lean_inc_ref(v___y_5846_);
lean_inc(v___y_5845_);
lean_inc_ref(v___y_5844_);
lean_inc(v___y_5843_);
lean_inc(v___y_5842_);
lean_inc(v___y_5841_);
v___x_5973_ = l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4(v_arg_5897_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
lean_dec_ref(v_arg_5897_);
if (lean_obj_tag(v___x_5973_) == 0)
{
lean_object* v_a_5974_; uint8_t v___x_5975_; 
v_a_5974_ = lean_ctor_get(v___x_5973_, 0);
lean_inc(v_a_5974_);
lean_dec_ref(v___x_5973_);
v___x_5975_ = lean_unbox(v_a_5974_);
lean_dec(v_a_5974_);
if (v___x_5975_ == 0)
{
lean_object* v___x_5976_; 
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_toVar_5838_);
v___x_5976_ = lean_apply_13(v_asVar_5839_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5976_;
}
else
{
lean_object* v___x_5977_; 
lean_dec_ref(v_e_5840_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
lean_inc(v___y_5847_);
lean_inc_ref(v___y_5846_);
lean_inc(v___y_5845_);
lean_inc_ref(v___y_5844_);
lean_inc(v___y_5843_);
lean_inc(v___y_5842_);
lean_inc(v___y_5841_);
lean_inc_ref(v_asVar_5839_);
lean_inc_ref(v_toVar_5838_);
v___x_5977_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_5838_, v_asVar_5839_, v_arg_5891_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
if (lean_obj_tag(v___x_5977_) == 0)
{
lean_object* v_a_5978_; lean_object* v___x_5979_; 
v_a_5978_ = lean_ctor_get(v___x_5977_, 0);
lean_inc(v_a_5978_);
lean_dec_ref(v___x_5977_);
v___x_5979_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_5838_, v_asVar_5839_, v_arg_5887_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
if (lean_obj_tag(v___x_5979_) == 0)
{
lean_object* v_a_5980_; lean_object* v___x_5982_; uint8_t v_isShared_5983_; uint8_t v_isSharedCheck_5988_; 
v_a_5980_ = lean_ctor_get(v___x_5979_, 0);
v_isSharedCheck_5988_ = !lean_is_exclusive(v___x_5979_);
if (v_isSharedCheck_5988_ == 0)
{
v___x_5982_ = v___x_5979_;
v_isShared_5983_ = v_isSharedCheck_5988_;
goto v_resetjp_5981_;
}
else
{
lean_inc(v_a_5980_);
lean_dec(v___x_5979_);
v___x_5982_ = lean_box(0);
v_isShared_5983_ = v_isSharedCheck_5988_;
goto v_resetjp_5981_;
}
v_resetjp_5981_:
{
lean_object* v___x_5984_; lean_object* v___x_5986_; 
v___x_5984_ = lean_alloc_ctor(6, 2, 0);
lean_ctor_set(v___x_5984_, 0, v_a_5978_);
lean_ctor_set(v___x_5984_, 1, v_a_5980_);
if (v_isShared_5983_ == 0)
{
lean_ctor_set(v___x_5982_, 0, v___x_5984_);
v___x_5986_ = v___x_5982_;
goto v_reusejp_5985_;
}
else
{
lean_object* v_reuseFailAlloc_5987_; 
v_reuseFailAlloc_5987_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5987_, 0, v___x_5984_);
v___x_5986_ = v_reuseFailAlloc_5987_;
goto v_reusejp_5985_;
}
v_reusejp_5985_:
{
return v___x_5986_;
}
}
}
else
{
lean_dec(v_a_5978_);
return v___x_5979_;
}
}
else
{
lean_dec_ref(v_arg_5887_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
return v___x_5977_;
}
}
}
else
{
lean_object* v_a_5989_; lean_object* v___x_5991_; uint8_t v_isShared_5992_; uint8_t v_isSharedCheck_5996_; 
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_arg_5887_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
v_a_5989_ = lean_ctor_get(v___x_5973_, 0);
v_isSharedCheck_5996_ = !lean_is_exclusive(v___x_5973_);
if (v_isSharedCheck_5996_ == 0)
{
v___x_5991_ = v___x_5973_;
v_isShared_5992_ = v_isSharedCheck_5996_;
goto v_resetjp_5990_;
}
else
{
lean_inc(v_a_5989_);
lean_dec(v___x_5973_);
v___x_5991_ = lean_box(0);
v_isShared_5992_ = v_isSharedCheck_5996_;
goto v_resetjp_5990_;
}
v_resetjp_5990_:
{
lean_object* v___x_5994_; 
if (v_isShared_5992_ == 0)
{
v___x_5994_ = v___x_5991_;
goto v_reusejp_5993_;
}
else
{
lean_object* v_reuseFailAlloc_5995_; 
v_reuseFailAlloc_5995_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5995_, 0, v_a_5989_);
v___x_5994_ = v_reuseFailAlloc_5995_;
goto v_reusejp_5993_;
}
v_reusejp_5993_:
{
return v___x_5994_;
}
}
}
}
}
else
{
lean_object* v___x_5997_; 
lean_dec_ref(v___x_5915_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
v___x_5997_ = l_Lean_Meta_getNatValue_x3f(v_arg_5887_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
lean_dec_ref(v_arg_5887_);
if (lean_obj_tag(v___x_5997_) == 0)
{
lean_object* v_a_5998_; 
v_a_5998_ = lean_ctor_get(v___x_5997_, 0);
lean_inc(v_a_5998_);
lean_dec_ref(v___x_5997_);
if (lean_obj_tag(v_a_5998_) == 1)
{
lean_object* v_val_5999_; lean_object* v___x_6000_; 
v_val_5999_ = lean_ctor_get(v_a_5998_, 0);
lean_inc(v_val_5999_);
lean_dec_ref(v_a_5998_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
lean_inc(v___y_5847_);
lean_inc_ref(v___y_5846_);
lean_inc(v___y_5845_);
lean_inc_ref(v___y_5844_);
lean_inc(v___y_5843_);
lean_inc(v___y_5842_);
lean_inc(v___y_5841_);
v___x_6000_ = l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5(v_arg_5897_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
lean_dec_ref(v_arg_5897_);
if (lean_obj_tag(v___x_6000_) == 0)
{
lean_object* v_a_6001_; uint8_t v___x_6002_; 
v_a_6001_ = lean_ctor_get(v___x_6000_, 0);
lean_inc(v_a_6001_);
lean_dec_ref(v___x_6000_);
v___x_6002_ = lean_unbox(v_a_6001_);
lean_dec(v_a_6001_);
if (v___x_6002_ == 0)
{
lean_object* v___x_6003_; 
lean_dec(v_val_5999_);
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_toVar_5838_);
v___x_6003_ = lean_apply_13(v_asVar_5839_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_6003_;
}
else
{
lean_object* v___x_6004_; 
lean_dec_ref(v_e_5840_);
v___x_6004_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_5838_, v_asVar_5839_, v_arg_5891_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
if (lean_obj_tag(v___x_6004_) == 0)
{
lean_object* v_a_6005_; lean_object* v___x_6007_; uint8_t v_isShared_6008_; uint8_t v_isSharedCheck_6013_; 
v_a_6005_ = lean_ctor_get(v___x_6004_, 0);
v_isSharedCheck_6013_ = !lean_is_exclusive(v___x_6004_);
if (v_isSharedCheck_6013_ == 0)
{
v___x_6007_ = v___x_6004_;
v_isShared_6008_ = v_isSharedCheck_6013_;
goto v_resetjp_6006_;
}
else
{
lean_inc(v_a_6005_);
lean_dec(v___x_6004_);
v___x_6007_ = lean_box(0);
v_isShared_6008_ = v_isSharedCheck_6013_;
goto v_resetjp_6006_;
}
v_resetjp_6006_:
{
lean_object* v___x_6009_; lean_object* v___x_6011_; 
v___x_6009_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_6009_, 0, v_a_6005_);
lean_ctor_set(v___x_6009_, 1, v_val_5999_);
if (v_isShared_6008_ == 0)
{
lean_ctor_set(v___x_6007_, 0, v___x_6009_);
v___x_6011_ = v___x_6007_;
goto v_reusejp_6010_;
}
else
{
lean_object* v_reuseFailAlloc_6012_; 
v_reuseFailAlloc_6012_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6012_, 0, v___x_6009_);
v___x_6011_ = v_reuseFailAlloc_6012_;
goto v_reusejp_6010_;
}
v_reusejp_6010_:
{
return v___x_6011_;
}
}
}
else
{
lean_dec(v_val_5999_);
return v___x_6004_;
}
}
}
else
{
lean_object* v_a_6014_; lean_object* v___x_6016_; uint8_t v_isShared_6017_; uint8_t v_isSharedCheck_6021_; 
lean_dec(v_val_5999_);
lean_dec_ref(v_arg_5891_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
v_a_6014_ = lean_ctor_get(v___x_6000_, 0);
v_isSharedCheck_6021_ = !lean_is_exclusive(v___x_6000_);
if (v_isSharedCheck_6021_ == 0)
{
v___x_6016_ = v___x_6000_;
v_isShared_6017_ = v_isSharedCheck_6021_;
goto v_resetjp_6015_;
}
else
{
lean_inc(v_a_6014_);
lean_dec(v___x_6000_);
v___x_6016_ = lean_box(0);
v_isShared_6017_ = v_isSharedCheck_6021_;
goto v_resetjp_6015_;
}
v_resetjp_6015_:
{
lean_object* v___x_6019_; 
if (v_isShared_6017_ == 0)
{
v___x_6019_ = v___x_6016_;
goto v_reusejp_6018_;
}
else
{
lean_object* v_reuseFailAlloc_6020_; 
v_reuseFailAlloc_6020_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6020_, 0, v_a_6014_);
v___x_6019_ = v_reuseFailAlloc_6020_;
goto v_reusejp_6018_;
}
v_reusejp_6018_:
{
return v___x_6019_;
}
}
}
}
else
{
lean_object* v___x_6022_; 
lean_dec(v_a_5998_);
lean_dec_ref(v_arg_5897_);
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_asVar_5839_);
v___x_6022_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_6022_;
}
}
else
{
lean_object* v_a_6023_; lean_object* v___x_6025_; uint8_t v_isShared_6026_; uint8_t v_isSharedCheck_6030_; 
lean_dec_ref(v_arg_5897_);
lean_dec_ref(v_arg_5891_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
v_a_6023_ = lean_ctor_get(v___x_5997_, 0);
v_isSharedCheck_6030_ = !lean_is_exclusive(v___x_5997_);
if (v_isSharedCheck_6030_ == 0)
{
v___x_6025_ = v___x_5997_;
v_isShared_6026_ = v_isSharedCheck_6030_;
goto v_resetjp_6024_;
}
else
{
lean_inc(v_a_6023_);
lean_dec(v___x_5997_);
v___x_6025_ = lean_box(0);
v_isShared_6026_ = v_isSharedCheck_6030_;
goto v_resetjp_6024_;
}
v_resetjp_6024_:
{
lean_object* v___x_6028_; 
if (v_isShared_6026_ == 0)
{
v___x_6028_ = v___x_6025_;
goto v_reusejp_6027_;
}
else
{
lean_object* v_reuseFailAlloc_6029_; 
v_reuseFailAlloc_6029_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6029_, 0, v_a_6023_);
v___x_6028_ = v_reuseFailAlloc_6029_;
goto v_reusejp_6027_;
}
v_reusejp_6027_:
{
return v___x_6028_;
}
}
}
}
}
}
}
}
else
{
lean_object* v___x_6031_; 
lean_dec_ref(v___x_5898_);
lean_dec_ref(v_arg_5897_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
lean_inc(v___y_5847_);
lean_inc_ref(v___y_5846_);
lean_inc(v___y_5845_);
lean_inc_ref(v___y_5844_);
lean_inc(v___y_5843_);
lean_inc(v___y_5842_);
lean_inc(v___y_5841_);
v___x_6031_ = l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6(v_arg_5891_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
lean_dec_ref(v_arg_5891_);
if (lean_obj_tag(v___x_6031_) == 0)
{
lean_object* v_a_6032_; uint8_t v___x_6033_; 
v_a_6032_ = lean_ctor_get(v___x_6031_, 0);
lean_inc(v_a_6032_);
lean_dec_ref(v___x_6031_);
v___x_6033_ = lean_unbox(v_a_6032_);
lean_dec(v_a_6032_);
if (v___x_6033_ == 0)
{
lean_object* v___x_6034_; 
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_toVar_5838_);
v___x_6034_ = lean_apply_13(v_asVar_5839_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_6034_;
}
else
{
lean_object* v___x_6035_; 
lean_dec_ref(v_e_5840_);
v___x_6035_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_5838_, v_asVar_5839_, v_arg_5887_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
if (lean_obj_tag(v___x_6035_) == 0)
{
lean_object* v_a_6036_; lean_object* v___x_6038_; uint8_t v_isShared_6039_; uint8_t v_isSharedCheck_6044_; 
v_a_6036_ = lean_ctor_get(v___x_6035_, 0);
v_isSharedCheck_6044_ = !lean_is_exclusive(v___x_6035_);
if (v_isSharedCheck_6044_ == 0)
{
v___x_6038_ = v___x_6035_;
v_isShared_6039_ = v_isSharedCheck_6044_;
goto v_resetjp_6037_;
}
else
{
lean_inc(v_a_6036_);
lean_dec(v___x_6035_);
v___x_6038_ = lean_box(0);
v_isShared_6039_ = v_isSharedCheck_6044_;
goto v_resetjp_6037_;
}
v_resetjp_6037_:
{
lean_object* v___x_6040_; lean_object* v___x_6042_; 
v___x_6040_ = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(v___x_6040_, 0, v_a_6036_);
if (v_isShared_6039_ == 0)
{
lean_ctor_set(v___x_6038_, 0, v___x_6040_);
v___x_6042_ = v___x_6038_;
goto v_reusejp_6041_;
}
else
{
lean_object* v_reuseFailAlloc_6043_; 
v_reuseFailAlloc_6043_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6043_, 0, v___x_6040_);
v___x_6042_ = v_reuseFailAlloc_6043_;
goto v_reusejp_6041_;
}
v_reusejp_6041_:
{
return v___x_6042_;
}
}
}
else
{
return v___x_6035_;
}
}
}
else
{
lean_object* v_a_6045_; lean_object* v___x_6047_; uint8_t v_isShared_6048_; uint8_t v_isSharedCheck_6052_; 
lean_dec_ref(v_arg_5887_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
v_a_6045_ = lean_ctor_get(v___x_6031_, 0);
v_isSharedCheck_6052_ = !lean_is_exclusive(v___x_6031_);
if (v_isSharedCheck_6052_ == 0)
{
v___x_6047_ = v___x_6031_;
v_isShared_6048_ = v_isSharedCheck_6052_;
goto v_resetjp_6046_;
}
else
{
lean_inc(v_a_6045_);
lean_dec(v___x_6031_);
v___x_6047_ = lean_box(0);
v_isShared_6048_ = v_isSharedCheck_6052_;
goto v_resetjp_6046_;
}
v_resetjp_6046_:
{
lean_object* v___x_6050_; 
if (v_isShared_6048_ == 0)
{
v___x_6050_ = v___x_6047_;
goto v_reusejp_6049_;
}
else
{
lean_object* v_reuseFailAlloc_6051_; 
v_reuseFailAlloc_6051_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6051_, 0, v_a_6045_);
v___x_6050_ = v_reuseFailAlloc_6051_;
goto v_reusejp_6049_;
}
v_reusejp_6049_:
{
return v___x_6050_;
}
}
}
}
}
else
{
lean_object* v___x_6053_; 
lean_dec_ref(v___x_5898_);
lean_dec_ref(v_arg_5897_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
lean_inc(v___y_5847_);
lean_inc_ref(v___y_5846_);
lean_inc(v___y_5845_);
lean_inc_ref(v___y_5844_);
lean_inc(v___y_5843_);
lean_inc(v___y_5842_);
lean_inc(v___y_5841_);
v___x_6053_ = l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7(v_arg_5891_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
lean_dec_ref(v_arg_5891_);
if (lean_obj_tag(v___x_6053_) == 0)
{
lean_object* v_a_6054_; uint8_t v___x_6055_; 
v_a_6054_ = lean_ctor_get(v___x_6053_, 0);
lean_inc(v_a_6054_);
lean_dec_ref(v___x_6053_);
v___x_6055_ = lean_unbox(v_a_6054_);
lean_dec(v_a_6054_);
if (v___x_6055_ == 0)
{
lean_object* v___x_6056_; 
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_toVar_5838_);
v___x_6056_ = lean_apply_13(v_asVar_5839_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_6056_;
}
else
{
lean_object* v___x_6057_; 
lean_dec_ref(v_asVar_5839_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
v___x_6057_ = l_Lean_Meta_getIntValue_x3f(v_arg_5887_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
if (lean_obj_tag(v___x_6057_) == 0)
{
lean_object* v_a_6058_; lean_object* v___x_6060_; uint8_t v_isShared_6061_; uint8_t v_isSharedCheck_6074_; 
v_a_6058_ = lean_ctor_get(v___x_6057_, 0);
v_isSharedCheck_6074_ = !lean_is_exclusive(v___x_6057_);
if (v_isSharedCheck_6074_ == 0)
{
v___x_6060_ = v___x_6057_;
v_isShared_6061_ = v_isSharedCheck_6074_;
goto v_resetjp_6059_;
}
else
{
lean_inc(v_a_6058_);
lean_dec(v___x_6057_);
v___x_6060_ = lean_box(0);
v_isShared_6061_ = v_isSharedCheck_6074_;
goto v_resetjp_6059_;
}
v_resetjp_6059_:
{
if (lean_obj_tag(v_a_6058_) == 1)
{
lean_object* v_val_6062_; lean_object* v___x_6064_; uint8_t v_isShared_6065_; uint8_t v_isSharedCheck_6072_; 
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_toVar_5838_);
v_val_6062_ = lean_ctor_get(v_a_6058_, 0);
v_isSharedCheck_6072_ = !lean_is_exclusive(v_a_6058_);
if (v_isSharedCheck_6072_ == 0)
{
v___x_6064_ = v_a_6058_;
v_isShared_6065_ = v_isSharedCheck_6072_;
goto v_resetjp_6063_;
}
else
{
lean_inc(v_val_6062_);
lean_dec(v_a_6058_);
v___x_6064_ = lean_box(0);
v_isShared_6065_ = v_isSharedCheck_6072_;
goto v_resetjp_6063_;
}
v_resetjp_6063_:
{
lean_object* v___x_6067_; 
if (v_isShared_6065_ == 0)
{
lean_ctor_set_tag(v___x_6064_, 2);
v___x_6067_ = v___x_6064_;
goto v_reusejp_6066_;
}
else
{
lean_object* v_reuseFailAlloc_6071_; 
v_reuseFailAlloc_6071_ = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6071_, 0, v_val_6062_);
v___x_6067_ = v_reuseFailAlloc_6071_;
goto v_reusejp_6066_;
}
v_reusejp_6066_:
{
lean_object* v___x_6069_; 
if (v_isShared_6061_ == 0)
{
lean_ctor_set(v___x_6060_, 0, v___x_6067_);
v___x_6069_ = v___x_6060_;
goto v_reusejp_6068_;
}
else
{
lean_object* v_reuseFailAlloc_6070_; 
v_reuseFailAlloc_6070_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6070_, 0, v___x_6067_);
v___x_6069_ = v_reuseFailAlloc_6070_;
goto v_reusejp_6068_;
}
v_reusejp_6068_:
{
return v___x_6069_;
}
}
}
}
else
{
lean_object* v___x_6073_; 
lean_del_object(v___x_6060_);
lean_dec(v_a_6058_);
v___x_6073_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_6073_;
}
}
}
else
{
lean_object* v_a_6075_; lean_object* v___x_6077_; uint8_t v_isShared_6078_; uint8_t v_isSharedCheck_6082_; 
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_toVar_5838_);
v_a_6075_ = lean_ctor_get(v___x_6057_, 0);
v_isSharedCheck_6082_ = !lean_is_exclusive(v___x_6057_);
if (v_isSharedCheck_6082_ == 0)
{
v___x_6077_ = v___x_6057_;
v_isShared_6078_ = v_isSharedCheck_6082_;
goto v_resetjp_6076_;
}
else
{
lean_inc(v_a_6075_);
lean_dec(v___x_6057_);
v___x_6077_ = lean_box(0);
v_isShared_6078_ = v_isSharedCheck_6082_;
goto v_resetjp_6076_;
}
v_resetjp_6076_:
{
lean_object* v___x_6080_; 
if (v_isShared_6078_ == 0)
{
v___x_6080_ = v___x_6077_;
goto v_reusejp_6079_;
}
else
{
lean_object* v_reuseFailAlloc_6081_; 
v_reuseFailAlloc_6081_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6081_, 0, v_a_6075_);
v___x_6080_ = v_reuseFailAlloc_6081_;
goto v_reusejp_6079_;
}
v_reusejp_6079_:
{
return v___x_6080_;
}
}
}
}
}
else
{
lean_object* v_a_6083_; lean_object* v___x_6085_; uint8_t v_isShared_6086_; uint8_t v_isSharedCheck_6090_; 
lean_dec_ref(v_arg_5887_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
v_a_6083_ = lean_ctor_get(v___x_6053_, 0);
v_isSharedCheck_6090_ = !lean_is_exclusive(v___x_6053_);
if (v_isSharedCheck_6090_ == 0)
{
v___x_6085_ = v___x_6053_;
v_isShared_6086_ = v_isSharedCheck_6090_;
goto v_resetjp_6084_;
}
else
{
lean_inc(v_a_6083_);
lean_dec(v___x_6053_);
v___x_6085_ = lean_box(0);
v_isShared_6086_ = v_isSharedCheck_6090_;
goto v_resetjp_6084_;
}
v_resetjp_6084_:
{
lean_object* v___x_6088_; 
if (v_isShared_6086_ == 0)
{
v___x_6088_ = v___x_6085_;
goto v_reusejp_6087_;
}
else
{
lean_object* v_reuseFailAlloc_6089_; 
v_reuseFailAlloc_6089_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6089_, 0, v_a_6083_);
v___x_6088_ = v_reuseFailAlloc_6089_;
goto v_reusejp_6087_;
}
v_reusejp_6087_:
{
return v___x_6088_;
}
}
}
}
}
else
{
lean_object* v___x_6091_; 
lean_dec_ref(v___x_5898_);
lean_dec_ref(v_arg_5897_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
lean_inc(v___y_5847_);
lean_inc_ref(v___y_5846_);
lean_inc(v___y_5845_);
lean_inc_ref(v___y_5844_);
lean_inc(v___y_5843_);
lean_inc(v___y_5842_);
lean_inc(v___y_5841_);
v___x_6091_ = l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8(v_arg_5891_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
lean_dec_ref(v_arg_5891_);
if (lean_obj_tag(v___x_6091_) == 0)
{
lean_object* v_a_6092_; uint8_t v___x_6093_; 
v_a_6092_ = lean_ctor_get(v___x_6091_, 0);
lean_inc(v_a_6092_);
lean_dec_ref(v___x_6091_);
v___x_6093_ = lean_unbox(v_a_6092_);
lean_dec(v_a_6092_);
if (v___x_6093_ == 0)
{
lean_object* v___x_6094_; 
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_toVar_5838_);
v___x_6094_ = lean_apply_13(v_asVar_5839_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_6094_;
}
else
{
lean_object* v___x_6095_; 
lean_dec_ref(v_asVar_5839_);
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
v___x_6095_ = l_Lean_Meta_getNatValue_x3f(v_arg_5887_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
lean_dec_ref(v_arg_5887_);
if (lean_obj_tag(v___x_6095_) == 0)
{
lean_object* v_a_6096_; lean_object* v___x_6098_; uint8_t v_isShared_6099_; uint8_t v_isSharedCheck_6112_; 
v_a_6096_ = lean_ctor_get(v___x_6095_, 0);
v_isSharedCheck_6112_ = !lean_is_exclusive(v___x_6095_);
if (v_isSharedCheck_6112_ == 0)
{
v___x_6098_ = v___x_6095_;
v_isShared_6099_ = v_isSharedCheck_6112_;
goto v_resetjp_6097_;
}
else
{
lean_inc(v_a_6096_);
lean_dec(v___x_6095_);
v___x_6098_ = lean_box(0);
v_isShared_6099_ = v_isSharedCheck_6112_;
goto v_resetjp_6097_;
}
v_resetjp_6097_:
{
if (lean_obj_tag(v_a_6096_) == 1)
{
lean_object* v_val_6100_; lean_object* v___x_6102_; uint8_t v_isShared_6103_; uint8_t v_isSharedCheck_6110_; 
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_toVar_5838_);
v_val_6100_ = lean_ctor_get(v_a_6096_, 0);
v_isSharedCheck_6110_ = !lean_is_exclusive(v_a_6096_);
if (v_isSharedCheck_6110_ == 0)
{
v___x_6102_ = v_a_6096_;
v_isShared_6103_ = v_isSharedCheck_6110_;
goto v_resetjp_6101_;
}
else
{
lean_inc(v_val_6100_);
lean_dec(v_a_6096_);
v___x_6102_ = lean_box(0);
v_isShared_6103_ = v_isSharedCheck_6110_;
goto v_resetjp_6101_;
}
v_resetjp_6101_:
{
lean_object* v___x_6105_; 
if (v_isShared_6103_ == 0)
{
v___x_6105_ = v___x_6102_;
goto v_reusejp_6104_;
}
else
{
lean_object* v_reuseFailAlloc_6109_; 
v_reuseFailAlloc_6109_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6109_, 0, v_val_6100_);
v___x_6105_ = v_reuseFailAlloc_6109_;
goto v_reusejp_6104_;
}
v_reusejp_6104_:
{
lean_object* v___x_6107_; 
if (v_isShared_6099_ == 0)
{
lean_ctor_set(v___x_6098_, 0, v___x_6105_);
v___x_6107_ = v___x_6098_;
goto v_reusejp_6106_;
}
else
{
lean_object* v_reuseFailAlloc_6108_; 
v_reuseFailAlloc_6108_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6108_, 0, v___x_6105_);
v___x_6107_ = v_reuseFailAlloc_6108_;
goto v_reusejp_6106_;
}
v_reusejp_6106_:
{
return v___x_6107_;
}
}
}
}
else
{
lean_object* v___x_6111_; 
lean_del_object(v___x_6098_);
lean_dec(v_a_6096_);
v___x_6111_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_6111_;
}
}
}
else
{
lean_object* v_a_6113_; lean_object* v___x_6115_; uint8_t v_isShared_6116_; uint8_t v_isSharedCheck_6120_; 
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_toVar_5838_);
v_a_6113_ = lean_ctor_get(v___x_6095_, 0);
v_isSharedCheck_6120_ = !lean_is_exclusive(v___x_6095_);
if (v_isSharedCheck_6120_ == 0)
{
v___x_6115_ = v___x_6095_;
v_isShared_6116_ = v_isSharedCheck_6120_;
goto v_resetjp_6114_;
}
else
{
lean_inc(v_a_6113_);
lean_dec(v___x_6095_);
v___x_6115_ = lean_box(0);
v_isShared_6116_ = v_isSharedCheck_6120_;
goto v_resetjp_6114_;
}
v_resetjp_6114_:
{
lean_object* v___x_6118_; 
if (v_isShared_6116_ == 0)
{
v___x_6118_ = v___x_6115_;
goto v_reusejp_6117_;
}
else
{
lean_object* v_reuseFailAlloc_6119_; 
v_reuseFailAlloc_6119_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6119_, 0, v_a_6113_);
v___x_6118_ = v_reuseFailAlloc_6119_;
goto v_reusejp_6117_;
}
v_reusejp_6117_:
{
return v___x_6118_;
}
}
}
}
}
else
{
lean_object* v_a_6121_; lean_object* v___x_6123_; uint8_t v_isShared_6124_; uint8_t v_isSharedCheck_6128_; 
lean_dec_ref(v_arg_5887_);
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
v_a_6121_ = lean_ctor_get(v___x_6091_, 0);
v_isSharedCheck_6128_ = !lean_is_exclusive(v___x_6091_);
if (v_isSharedCheck_6128_ == 0)
{
v___x_6123_ = v___x_6091_;
v_isShared_6124_ = v_isSharedCheck_6128_;
goto v_resetjp_6122_;
}
else
{
lean_inc(v_a_6121_);
lean_dec(v___x_6091_);
v___x_6123_ = lean_box(0);
v_isShared_6124_ = v_isSharedCheck_6128_;
goto v_resetjp_6122_;
}
v_resetjp_6122_:
{
lean_object* v___x_6126_; 
if (v_isShared_6124_ == 0)
{
v___x_6126_ = v___x_6123_;
goto v_reusejp_6125_;
}
else
{
lean_object* v_reuseFailAlloc_6127_; 
v_reuseFailAlloc_6127_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6127_, 0, v_a_6121_);
v___x_6126_ = v_reuseFailAlloc_6127_;
goto v_reusejp_6125_;
}
v_reusejp_6125_:
{
return v___x_6126_;
}
}
}
}
}
else
{
lean_dec_ref(v___x_5898_);
lean_dec_ref(v_arg_5897_);
lean_dec_ref(v_arg_5887_);
lean_dec_ref(v_asVar_5839_);
v_n_5856_ = v_arg_5891_;
goto v___jp_5855_;
}
}
}
else
{
lean_dec_ref(v___x_5892_);
lean_dec_ref(v_arg_5891_);
lean_dec_ref(v_asVar_5839_);
v_n_5856_ = v_arg_5887_;
goto v___jp_5855_;
}
}
}
v___jp_5855_:
{
lean_object* v___x_5857_; 
lean_inc(v___y_5851_);
lean_inc_ref(v___y_5850_);
lean_inc(v___y_5849_);
lean_inc_ref(v___y_5848_);
v___x_5857_ = l_Lean_Meta_getNatValue_x3f(v_n_5856_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_);
lean_dec_ref(v_n_5856_);
if (lean_obj_tag(v___x_5857_) == 0)
{
lean_object* v_a_5858_; lean_object* v___x_5860_; uint8_t v_isShared_5861_; uint8_t v_isSharedCheck_5875_; 
v_a_5858_ = lean_ctor_get(v___x_5857_, 0);
v_isSharedCheck_5875_ = !lean_is_exclusive(v___x_5857_);
if (v_isSharedCheck_5875_ == 0)
{
v___x_5860_ = v___x_5857_;
v_isShared_5861_ = v_isSharedCheck_5875_;
goto v_resetjp_5859_;
}
else
{
lean_inc(v_a_5858_);
lean_dec(v___x_5857_);
v___x_5860_ = lean_box(0);
v_isShared_5861_ = v_isSharedCheck_5875_;
goto v_resetjp_5859_;
}
v_resetjp_5859_:
{
if (lean_obj_tag(v_a_5858_) == 1)
{
lean_object* v_val_5862_; lean_object* v___x_5864_; uint8_t v_isShared_5865_; uint8_t v_isSharedCheck_5873_; 
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_toVar_5838_);
v_val_5862_ = lean_ctor_get(v_a_5858_, 0);
v_isSharedCheck_5873_ = !lean_is_exclusive(v_a_5858_);
if (v_isSharedCheck_5873_ == 0)
{
v___x_5864_ = v_a_5858_;
v_isShared_5865_ = v_isSharedCheck_5873_;
goto v_resetjp_5863_;
}
else
{
lean_inc(v_val_5862_);
lean_dec(v_a_5858_);
v___x_5864_ = lean_box(0);
v_isShared_5865_ = v_isSharedCheck_5873_;
goto v_resetjp_5863_;
}
v_resetjp_5863_:
{
lean_object* v___x_5866_; lean_object* v___x_5868_; 
v___x_5866_ = lean_nat_to_int(v_val_5862_);
if (v_isShared_5865_ == 0)
{
lean_ctor_set_tag(v___x_5864_, 0);
lean_ctor_set(v___x_5864_, 0, v___x_5866_);
v___x_5868_ = v___x_5864_;
goto v_reusejp_5867_;
}
else
{
lean_object* v_reuseFailAlloc_5872_; 
v_reuseFailAlloc_5872_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5872_, 0, v___x_5866_);
v___x_5868_ = v_reuseFailAlloc_5872_;
goto v_reusejp_5867_;
}
v_reusejp_5867_:
{
lean_object* v___x_5870_; 
if (v_isShared_5861_ == 0)
{
lean_ctor_set(v___x_5860_, 0, v___x_5868_);
v___x_5870_ = v___x_5860_;
goto v_reusejp_5869_;
}
else
{
lean_object* v_reuseFailAlloc_5871_; 
v_reuseFailAlloc_5871_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5871_, 0, v___x_5868_);
v___x_5870_ = v_reuseFailAlloc_5871_;
goto v_reusejp_5869_;
}
v_reusejp_5869_:
{
return v___x_5870_;
}
}
}
}
else
{
lean_object* v___x_5874_; 
lean_del_object(v___x_5860_);
lean_dec(v_a_5858_);
v___x_5874_ = lean_apply_13(v_toVar_5838_, v_e_5840_, v___y_5841_, v___y_5842_, v___y_5843_, v___y_5844_, v___y_5845_, v___y_5846_, v___y_5847_, v___y_5848_, v___y_5849_, v___y_5850_, v___y_5851_, lean_box(0));
return v___x_5874_;
}
}
}
else
{
lean_object* v_a_5876_; lean_object* v___x_5878_; uint8_t v_isShared_5879_; uint8_t v_isSharedCheck_5883_; 
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_toVar_5838_);
v_a_5876_ = lean_ctor_get(v___x_5857_, 0);
v_isSharedCheck_5883_ = !lean_is_exclusive(v___x_5857_);
if (v_isSharedCheck_5883_ == 0)
{
v___x_5878_ = v___x_5857_;
v_isShared_5879_ = v_isSharedCheck_5883_;
goto v_resetjp_5877_;
}
else
{
lean_inc(v_a_5876_);
lean_dec(v___x_5857_);
v___x_5878_ = lean_box(0);
v_isShared_5879_ = v_isSharedCheck_5883_;
goto v_resetjp_5877_;
}
v_resetjp_5877_:
{
lean_object* v___x_5881_; 
if (v_isShared_5879_ == 0)
{
v___x_5881_ = v___x_5878_;
goto v_reusejp_5880_;
}
else
{
lean_object* v_reuseFailAlloc_5882_; 
v_reuseFailAlloc_5882_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5882_, 0, v_a_5876_);
v___x_5881_ = v_reuseFailAlloc_5882_;
goto v_reusejp_5880_;
}
v_reusejp_5880_:
{
return v___x_5881_;
}
}
}
}
}
else
{
lean_object* v_a_6129_; lean_object* v___x_6131_; uint8_t v_isShared_6132_; uint8_t v_isSharedCheck_6136_; 
lean_dec(v___y_5851_);
lean_dec_ref(v___y_5850_);
lean_dec(v___y_5849_);
lean_dec_ref(v___y_5848_);
lean_dec(v___y_5847_);
lean_dec_ref(v___y_5846_);
lean_dec(v___y_5845_);
lean_dec_ref(v___y_5844_);
lean_dec(v___y_5843_);
lean_dec(v___y_5842_);
lean_dec(v___y_5841_);
lean_dec_ref(v_e_5840_);
lean_dec_ref(v_asVar_5839_);
lean_dec_ref(v_toVar_5838_);
v_a_6129_ = lean_ctor_get(v___x_5853_, 0);
v_isSharedCheck_6136_ = !lean_is_exclusive(v___x_5853_);
if (v_isSharedCheck_6136_ == 0)
{
v___x_6131_ = v___x_5853_;
v_isShared_6132_ = v_isSharedCheck_6136_;
goto v_resetjp_6130_;
}
else
{
lean_inc(v_a_6129_);
lean_dec(v___x_5853_);
v___x_6131_ = lean_box(0);
v_isShared_6132_ = v_isSharedCheck_6136_;
goto v_resetjp_6130_;
}
v_resetjp_6130_:
{
lean_object* v___x_6134_; 
if (v_isShared_6132_ == 0)
{
v___x_6134_ = v___x_6131_;
goto v_reusejp_6133_;
}
else
{
lean_object* v_reuseFailAlloc_6135_; 
v_reuseFailAlloc_6135_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6135_, 0, v_a_6129_);
v___x_6134_ = v_reuseFailAlloc_6135_;
goto v_reusejp_6133_;
}
v_reusejp_6133_:
{
return v___x_6134_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2___boxed(lean_object* v_toVar_6137_, lean_object* v_asVar_6138_, lean_object* v_e_6139_, lean_object* v___y_6140_, lean_object* v___y_6141_, lean_object* v___y_6142_, lean_object* v___y_6143_, lean_object* v___y_6144_, lean_object* v___y_6145_, lean_object* v___y_6146_, lean_object* v___y_6147_, lean_object* v___y_6148_, lean_object* v___y_6149_, lean_object* v___y_6150_, lean_object* v___y_6151_){
_start:
{
lean_object* v_res_6152_; 
v_res_6152_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_6137_, v_asVar_6138_, v_e_6139_, v___y_6140_, v___y_6141_, v___y_6142_, v___y_6143_, v___y_6144_, v___y_6145_, v___y_6146_, v___y_6147_, v___y_6148_, v___y_6149_, v___y_6150_);
return v_res_6152_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0(lean_object* v_e_6153_, uint8_t v_skipVar_6154_, lean_object* v_gen_6155_, lean_object* v___y_6156_, lean_object* v___y_6157_, lean_object* v___y_6158_, lean_object* v___y_6159_, lean_object* v___y_6160_, lean_object* v___y_6161_, lean_object* v___y_6162_, lean_object* v___y_6163_, lean_object* v___y_6164_, lean_object* v___y_6165_, lean_object* v___y_6166_){
_start:
{
lean_object* v___x_6168_; 
lean_inc_ref(v_e_6153_);
v___x_6168_ = l_Lean_Meta_instantiateMVarsIfMVarApp___redArg(v_e_6153_, v___y_6164_);
if (lean_obj_tag(v___x_6168_) == 0)
{
lean_object* v_a_6169_; lean_object* v___x_6171_; uint8_t v_isShared_6172_; uint8_t v_isSharedCheck_6563_; 
v_a_6169_ = lean_ctor_get(v___x_6168_, 0);
v_isSharedCheck_6563_ = !lean_is_exclusive(v___x_6168_);
if (v_isSharedCheck_6563_ == 0)
{
v___x_6171_ = v___x_6168_;
v_isShared_6172_ = v_isSharedCheck_6563_;
goto v_resetjp_6170_;
}
else
{
lean_inc(v_a_6169_);
lean_dec(v___x_6168_);
v___x_6171_ = lean_box(0);
v_isShared_6172_ = v_isSharedCheck_6563_;
goto v_resetjp_6170_;
}
v_resetjp_6170_:
{
lean_object* v_mkVar_6173_; lean_object* v_toVar_6174_; lean_object* v_e_6176_; lean_object* v___y_6177_; lean_object* v___y_6178_; lean_object* v___y_6179_; lean_object* v___y_6180_; lean_object* v___y_6181_; lean_object* v___y_6182_; lean_object* v___y_6183_; lean_object* v___y_6184_; lean_object* v___y_6185_; lean_object* v___y_6186_; lean_object* v___y_6187_; lean_object* v_e_6211_; lean_object* v___y_6212_; lean_object* v___y_6213_; lean_object* v___y_6214_; lean_object* v___y_6215_; lean_object* v___y_6216_; lean_object* v___y_6217_; lean_object* v___y_6218_; lean_object* v___y_6219_; lean_object* v___y_6220_; lean_object* v___y_6221_; lean_object* v___y_6222_; lean_object* v___x_6232_; uint8_t v___x_6233_; 
v_mkVar_6173_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__0___boxed), 14, 1);
lean_closure_set(v_mkVar_6173_, 0, v_gen_6155_);
lean_inc_ref(v_mkVar_6173_);
v_toVar_6174_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1___boxed), 14, 1);
lean_closure_set(v_toVar_6174_, 0, v_mkVar_6173_);
v___x_6232_ = l_Lean_Expr_cleanupAnnotations(v_a_6169_);
v___x_6233_ = l_Lean_Expr_isApp(v___x_6232_);
if (v___x_6233_ == 0)
{
lean_dec_ref(v___x_6232_);
lean_dec_ref(v_toVar_6174_);
v_e_6176_ = v_e_6153_;
v___y_6177_ = v___y_6156_;
v___y_6178_ = v___y_6157_;
v___y_6179_ = v___y_6158_;
v___y_6180_ = v___y_6159_;
v___y_6181_ = v___y_6160_;
v___y_6182_ = v___y_6161_;
v___y_6183_ = v___y_6162_;
v___y_6184_ = v___y_6163_;
v___y_6185_ = v___y_6164_;
v___y_6186_ = v___y_6165_;
v___y_6187_ = v___y_6166_;
goto v___jp_6175_;
}
else
{
lean_object* v_arg_6234_; lean_object* v___x_6235_; uint8_t v___x_6236_; 
v_arg_6234_ = lean_ctor_get(v___x_6232_, 1);
lean_inc_ref(v_arg_6234_);
v___x_6235_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6232_);
v___x_6236_ = l_Lean_Expr_isApp(v___x_6235_);
if (v___x_6236_ == 0)
{
lean_dec_ref(v___x_6235_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
v_e_6176_ = v_e_6153_;
v___y_6177_ = v___y_6156_;
v___y_6178_ = v___y_6157_;
v___y_6179_ = v___y_6158_;
v___y_6180_ = v___y_6159_;
v___y_6181_ = v___y_6160_;
v___y_6182_ = v___y_6161_;
v___y_6183_ = v___y_6162_;
v___y_6184_ = v___y_6163_;
v___y_6185_ = v___y_6164_;
v___y_6186_ = v___y_6165_;
v___y_6187_ = v___y_6166_;
goto v___jp_6175_;
}
else
{
lean_object* v_arg_6237_; lean_object* v___x_6238_; uint8_t v___x_6239_; 
v_arg_6237_ = lean_ctor_get(v___x_6235_, 1);
lean_inc_ref(v_arg_6237_);
v___x_6238_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6235_);
v___x_6239_ = l_Lean_Expr_isApp(v___x_6238_);
if (v___x_6239_ == 0)
{
lean_dec_ref(v___x_6238_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
v_e_6176_ = v_e_6153_;
v___y_6177_ = v___y_6156_;
v___y_6178_ = v___y_6157_;
v___y_6179_ = v___y_6158_;
v___y_6180_ = v___y_6159_;
v___y_6181_ = v___y_6160_;
v___y_6182_ = v___y_6161_;
v___y_6183_ = v___y_6162_;
v___y_6184_ = v___y_6163_;
v___y_6185_ = v___y_6164_;
v___y_6186_ = v___y_6165_;
v___y_6187_ = v___y_6166_;
goto v___jp_6175_;
}
else
{
lean_object* v_arg_6240_; lean_object* v___x_6241_; lean_object* v___x_6242_; uint8_t v___x_6243_; 
v_arg_6240_ = lean_ctor_get(v___x_6238_, 1);
lean_inc_ref(v_arg_6240_);
v___x_6241_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6238_);
v___x_6242_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_6243_ = l_Lean_Expr_isConstOf(v___x_6241_, v___x_6242_);
if (v___x_6243_ == 0)
{
lean_object* v___x_6244_; uint8_t v___x_6245_; 
v___x_6244_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_6245_ = l_Lean_Expr_isConstOf(v___x_6241_, v___x_6244_);
if (v___x_6245_ == 0)
{
lean_object* v___x_6246_; uint8_t v___x_6247_; 
v___x_6246_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__10));
v___x_6247_ = l_Lean_Expr_isConstOf(v___x_6241_, v___x_6246_);
if (v___x_6247_ == 0)
{
lean_object* v_asVar_6248_; lean_object* v___x_6249_; uint8_t v___x_6250_; 
lean_inc_ref(v_mkVar_6173_);
v_asVar_6248_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__2___boxed), 14, 1);
lean_closure_set(v_asVar_6248_, 0, v_mkVar_6173_);
v___x_6249_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__13));
v___x_6250_ = l_Lean_Expr_isConstOf(v___x_6241_, v___x_6249_);
if (v___x_6250_ == 0)
{
uint8_t v___x_6251_; 
v___x_6251_ = l_Lean_Expr_isApp(v___x_6241_);
if (v___x_6251_ == 0)
{
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v___x_6241_);
lean_dec_ref(v_arg_6240_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
v_e_6176_ = v_e_6153_;
v___y_6177_ = v___y_6156_;
v___y_6178_ = v___y_6157_;
v___y_6179_ = v___y_6158_;
v___y_6180_ = v___y_6159_;
v___y_6181_ = v___y_6160_;
v___y_6182_ = v___y_6161_;
v___y_6183_ = v___y_6162_;
v___y_6184_ = v___y_6163_;
v___y_6185_ = v___y_6164_;
v___y_6186_ = v___y_6165_;
v___y_6187_ = v___y_6166_;
goto v___jp_6175_;
}
else
{
lean_object* v___x_6252_; uint8_t v___x_6253_; 
v___x_6252_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6241_);
v___x_6253_ = l_Lean_Expr_isApp(v___x_6252_);
if (v___x_6253_ == 0)
{
lean_dec_ref(v___x_6252_);
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6240_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
v_e_6176_ = v_e_6153_;
v___y_6177_ = v___y_6156_;
v___y_6178_ = v___y_6157_;
v___y_6179_ = v___y_6158_;
v___y_6180_ = v___y_6159_;
v___y_6181_ = v___y_6160_;
v___y_6182_ = v___y_6161_;
v___y_6183_ = v___y_6162_;
v___y_6184_ = v___y_6163_;
v___y_6185_ = v___y_6164_;
v___y_6186_ = v___y_6165_;
v___y_6187_ = v___y_6166_;
goto v___jp_6175_;
}
else
{
lean_object* v___x_6254_; uint8_t v___x_6255_; 
v___x_6254_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6252_);
v___x_6255_ = l_Lean_Expr_isApp(v___x_6254_);
if (v___x_6255_ == 0)
{
lean_dec_ref(v___x_6254_);
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6240_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
v_e_6176_ = v_e_6153_;
v___y_6177_ = v___y_6156_;
v___y_6178_ = v___y_6157_;
v___y_6179_ = v___y_6158_;
v___y_6180_ = v___y_6159_;
v___y_6181_ = v___y_6160_;
v___y_6182_ = v___y_6161_;
v___y_6183_ = v___y_6162_;
v___y_6184_ = v___y_6163_;
v___y_6185_ = v___y_6164_;
v___y_6186_ = v___y_6165_;
v___y_6187_ = v___y_6166_;
goto v___jp_6175_;
}
else
{
lean_object* v___x_6256_; lean_object* v___x_6257_; uint8_t v___x_6258_; 
v___x_6256_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6254_);
v___x_6257_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_6258_ = l_Lean_Expr_isConstOf(v___x_6256_, v___x_6257_);
if (v___x_6258_ == 0)
{
lean_object* v___x_6259_; uint8_t v___x_6260_; 
v___x_6259_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__19));
v___x_6260_ = l_Lean_Expr_isConstOf(v___x_6256_, v___x_6259_);
if (v___x_6260_ == 0)
{
lean_object* v___x_6261_; uint8_t v___x_6262_; 
v___x_6261_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_6262_ = l_Lean_Expr_isConstOf(v___x_6256_, v___x_6261_);
if (v___x_6262_ == 0)
{
lean_object* v___x_6263_; uint8_t v___x_6264_; 
v___x_6263_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_6264_ = l_Lean_Expr_isConstOf(v___x_6256_, v___x_6263_);
lean_dec_ref(v___x_6256_);
if (v___x_6264_ == 0)
{
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6240_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
v_e_6176_ = v_e_6153_;
v___y_6177_ = v___y_6156_;
v___y_6178_ = v___y_6157_;
v___y_6179_ = v___y_6158_;
v___y_6180_ = v___y_6159_;
v___y_6181_ = v___y_6160_;
v___y_6182_ = v___y_6161_;
v___y_6183_ = v___y_6162_;
v___y_6184_ = v___y_6163_;
v___y_6185_ = v___y_6164_;
v___y_6186_ = v___y_6165_;
v___y_6187_ = v___y_6166_;
goto v___jp_6175_;
}
else
{
lean_object* v___x_6265_; 
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
lean_inc(v___y_6162_);
lean_inc_ref(v___y_6161_);
lean_inc(v___y_6160_);
lean_inc_ref(v___y_6159_);
lean_inc(v___y_6158_);
lean_inc(v___y_6157_);
lean_inc(v___y_6156_);
v___x_6265_ = l_Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1(v_arg_6240_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
lean_dec_ref(v_arg_6240_);
if (lean_obj_tag(v___x_6265_) == 0)
{
lean_object* v_a_6266_; uint8_t v___x_6267_; 
v_a_6266_ = lean_ctor_get(v___x_6265_, 0);
lean_inc(v_a_6266_);
lean_dec_ref(v___x_6265_);
v___x_6267_ = lean_unbox(v_a_6266_);
lean_dec(v_a_6266_);
if (v___x_6267_ == 0)
{
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
v_e_6211_ = v_e_6153_;
v___y_6212_ = v___y_6156_;
v___y_6213_ = v___y_6157_;
v___y_6214_ = v___y_6158_;
v___y_6215_ = v___y_6159_;
v___y_6216_ = v___y_6160_;
v___y_6217_ = v___y_6161_;
v___y_6218_ = v___y_6162_;
v___y_6219_ = v___y_6163_;
v___y_6220_ = v___y_6164_;
v___y_6221_ = v___y_6165_;
v___y_6222_ = v___y_6166_;
goto v___jp_6210_;
}
else
{
lean_object* v___x_6268_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec_ref(v_e_6153_);
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
lean_inc(v___y_6162_);
lean_inc_ref(v___y_6161_);
lean_inc(v___y_6160_);
lean_inc_ref(v___y_6159_);
lean_inc(v___y_6158_);
lean_inc(v___y_6157_);
lean_inc(v___y_6156_);
lean_inc_ref(v_asVar_6248_);
lean_inc_ref(v_toVar_6174_);
v___x_6268_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_6174_, v_asVar_6248_, v_arg_6237_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
if (lean_obj_tag(v___x_6268_) == 0)
{
lean_object* v_a_6269_; lean_object* v___x_6270_; 
v_a_6269_ = lean_ctor_get(v___x_6268_, 0);
lean_inc(v_a_6269_);
lean_dec_ref(v___x_6268_);
v___x_6270_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_6174_, v_asVar_6248_, v_arg_6234_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
if (lean_obj_tag(v___x_6270_) == 0)
{
lean_object* v_a_6271_; lean_object* v___x_6273_; uint8_t v_isShared_6274_; uint8_t v_isSharedCheck_6280_; 
v_a_6271_ = lean_ctor_get(v___x_6270_, 0);
v_isSharedCheck_6280_ = !lean_is_exclusive(v___x_6270_);
if (v_isSharedCheck_6280_ == 0)
{
v___x_6273_ = v___x_6270_;
v_isShared_6274_ = v_isSharedCheck_6280_;
goto v_resetjp_6272_;
}
else
{
lean_inc(v_a_6271_);
lean_dec(v___x_6270_);
v___x_6273_ = lean_box(0);
v_isShared_6274_ = v_isSharedCheck_6280_;
goto v_resetjp_6272_;
}
v_resetjp_6272_:
{
lean_object* v___x_6275_; lean_object* v___x_6276_; lean_object* v___x_6278_; 
v___x_6275_ = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(v___x_6275_, 0, v_a_6269_);
lean_ctor_set(v___x_6275_, 1, v_a_6271_);
v___x_6276_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6276_, 0, v___x_6275_);
if (v_isShared_6274_ == 0)
{
lean_ctor_set(v___x_6273_, 0, v___x_6276_);
v___x_6278_ = v___x_6273_;
goto v_reusejp_6277_;
}
else
{
lean_object* v_reuseFailAlloc_6279_; 
v_reuseFailAlloc_6279_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6279_, 0, v___x_6276_);
v___x_6278_ = v_reuseFailAlloc_6279_;
goto v_reusejp_6277_;
}
v_reusejp_6277_:
{
return v___x_6278_;
}
}
}
else
{
lean_object* v_a_6281_; lean_object* v___x_6283_; uint8_t v_isShared_6284_; uint8_t v_isSharedCheck_6288_; 
lean_dec(v_a_6269_);
v_a_6281_ = lean_ctor_get(v___x_6270_, 0);
v_isSharedCheck_6288_ = !lean_is_exclusive(v___x_6270_);
if (v_isSharedCheck_6288_ == 0)
{
v___x_6283_ = v___x_6270_;
v_isShared_6284_ = v_isSharedCheck_6288_;
goto v_resetjp_6282_;
}
else
{
lean_inc(v_a_6281_);
lean_dec(v___x_6270_);
v___x_6283_ = lean_box(0);
v_isShared_6284_ = v_isSharedCheck_6288_;
goto v_resetjp_6282_;
}
v_resetjp_6282_:
{
lean_object* v___x_6286_; 
if (v_isShared_6284_ == 0)
{
v___x_6286_ = v___x_6283_;
goto v_reusejp_6285_;
}
else
{
lean_object* v_reuseFailAlloc_6287_; 
v_reuseFailAlloc_6287_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6287_, 0, v_a_6281_);
v___x_6286_ = v_reuseFailAlloc_6287_;
goto v_reusejp_6285_;
}
v_reusejp_6285_:
{
return v___x_6286_;
}
}
}
}
else
{
lean_object* v_a_6289_; lean_object* v___x_6291_; uint8_t v_isShared_6292_; uint8_t v_isSharedCheck_6296_; 
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
v_a_6289_ = lean_ctor_get(v___x_6268_, 0);
v_isSharedCheck_6296_ = !lean_is_exclusive(v___x_6268_);
if (v_isSharedCheck_6296_ == 0)
{
v___x_6291_ = v___x_6268_;
v_isShared_6292_ = v_isSharedCheck_6296_;
goto v_resetjp_6290_;
}
else
{
lean_inc(v_a_6289_);
lean_dec(v___x_6268_);
v___x_6291_ = lean_box(0);
v_isShared_6292_ = v_isSharedCheck_6296_;
goto v_resetjp_6290_;
}
v_resetjp_6290_:
{
lean_object* v___x_6294_; 
if (v_isShared_6292_ == 0)
{
v___x_6294_ = v___x_6291_;
goto v_reusejp_6293_;
}
else
{
lean_object* v_reuseFailAlloc_6295_; 
v_reuseFailAlloc_6295_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6295_, 0, v_a_6289_);
v___x_6294_ = v_reuseFailAlloc_6295_;
goto v_reusejp_6293_;
}
v_reusejp_6293_:
{
return v___x_6294_;
}
}
}
}
}
else
{
lean_object* v_a_6297_; lean_object* v___x_6299_; uint8_t v_isShared_6300_; uint8_t v_isSharedCheck_6304_; 
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6297_ = lean_ctor_get(v___x_6265_, 0);
v_isSharedCheck_6304_ = !lean_is_exclusive(v___x_6265_);
if (v_isSharedCheck_6304_ == 0)
{
v___x_6299_ = v___x_6265_;
v_isShared_6300_ = v_isSharedCheck_6304_;
goto v_resetjp_6298_;
}
else
{
lean_inc(v_a_6297_);
lean_dec(v___x_6265_);
v___x_6299_ = lean_box(0);
v_isShared_6300_ = v_isSharedCheck_6304_;
goto v_resetjp_6298_;
}
v_resetjp_6298_:
{
lean_object* v___x_6302_; 
if (v_isShared_6300_ == 0)
{
v___x_6302_ = v___x_6299_;
goto v_reusejp_6301_;
}
else
{
lean_object* v_reuseFailAlloc_6303_; 
v_reuseFailAlloc_6303_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6303_, 0, v_a_6297_);
v___x_6302_ = v_reuseFailAlloc_6303_;
goto v_reusejp_6301_;
}
v_reusejp_6301_:
{
return v___x_6302_;
}
}
}
}
}
else
{
lean_object* v___x_6305_; 
lean_dec_ref(v___x_6256_);
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
lean_inc(v___y_6162_);
lean_inc_ref(v___y_6161_);
lean_inc(v___y_6160_);
lean_inc_ref(v___y_6159_);
lean_inc(v___y_6158_);
lean_inc(v___y_6157_);
lean_inc(v___y_6156_);
v___x_6305_ = l_Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__3(v_arg_6240_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
lean_dec_ref(v_arg_6240_);
if (lean_obj_tag(v___x_6305_) == 0)
{
lean_object* v_a_6306_; uint8_t v___x_6307_; 
v_a_6306_ = lean_ctor_get(v___x_6305_, 0);
lean_inc(v_a_6306_);
lean_dec_ref(v___x_6305_);
v___x_6307_ = lean_unbox(v_a_6306_);
lean_dec(v_a_6306_);
if (v___x_6307_ == 0)
{
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
v_e_6211_ = v_e_6153_;
v___y_6212_ = v___y_6156_;
v___y_6213_ = v___y_6157_;
v___y_6214_ = v___y_6158_;
v___y_6215_ = v___y_6159_;
v___y_6216_ = v___y_6160_;
v___y_6217_ = v___y_6161_;
v___y_6218_ = v___y_6162_;
v___y_6219_ = v___y_6163_;
v___y_6220_ = v___y_6164_;
v___y_6221_ = v___y_6165_;
v___y_6222_ = v___y_6166_;
goto v___jp_6210_;
}
else
{
lean_object* v___x_6308_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec_ref(v_e_6153_);
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
lean_inc(v___y_6162_);
lean_inc_ref(v___y_6161_);
lean_inc(v___y_6160_);
lean_inc_ref(v___y_6159_);
lean_inc(v___y_6158_);
lean_inc(v___y_6157_);
lean_inc(v___y_6156_);
lean_inc_ref(v_asVar_6248_);
lean_inc_ref(v_toVar_6174_);
v___x_6308_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_6174_, v_asVar_6248_, v_arg_6237_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
if (lean_obj_tag(v___x_6308_) == 0)
{
lean_object* v_a_6309_; lean_object* v___x_6310_; 
v_a_6309_ = lean_ctor_get(v___x_6308_, 0);
lean_inc(v_a_6309_);
lean_dec_ref(v___x_6308_);
v___x_6310_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_6174_, v_asVar_6248_, v_arg_6234_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
if (lean_obj_tag(v___x_6310_) == 0)
{
lean_object* v_a_6311_; lean_object* v___x_6313_; uint8_t v_isShared_6314_; uint8_t v_isSharedCheck_6320_; 
v_a_6311_ = lean_ctor_get(v___x_6310_, 0);
v_isSharedCheck_6320_ = !lean_is_exclusive(v___x_6310_);
if (v_isSharedCheck_6320_ == 0)
{
v___x_6313_ = v___x_6310_;
v_isShared_6314_ = v_isSharedCheck_6320_;
goto v_resetjp_6312_;
}
else
{
lean_inc(v_a_6311_);
lean_dec(v___x_6310_);
v___x_6313_ = lean_box(0);
v_isShared_6314_ = v_isSharedCheck_6320_;
goto v_resetjp_6312_;
}
v_resetjp_6312_:
{
lean_object* v___x_6315_; lean_object* v___x_6316_; lean_object* v___x_6318_; 
v___x_6315_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6315_, 0, v_a_6309_);
lean_ctor_set(v___x_6315_, 1, v_a_6311_);
v___x_6316_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6316_, 0, v___x_6315_);
if (v_isShared_6314_ == 0)
{
lean_ctor_set(v___x_6313_, 0, v___x_6316_);
v___x_6318_ = v___x_6313_;
goto v_reusejp_6317_;
}
else
{
lean_object* v_reuseFailAlloc_6319_; 
v_reuseFailAlloc_6319_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6319_, 0, v___x_6316_);
v___x_6318_ = v_reuseFailAlloc_6319_;
goto v_reusejp_6317_;
}
v_reusejp_6317_:
{
return v___x_6318_;
}
}
}
else
{
lean_object* v_a_6321_; lean_object* v___x_6323_; uint8_t v_isShared_6324_; uint8_t v_isSharedCheck_6328_; 
lean_dec(v_a_6309_);
v_a_6321_ = lean_ctor_get(v___x_6310_, 0);
v_isSharedCheck_6328_ = !lean_is_exclusive(v___x_6310_);
if (v_isSharedCheck_6328_ == 0)
{
v___x_6323_ = v___x_6310_;
v_isShared_6324_ = v_isSharedCheck_6328_;
goto v_resetjp_6322_;
}
else
{
lean_inc(v_a_6321_);
lean_dec(v___x_6310_);
v___x_6323_ = lean_box(0);
v_isShared_6324_ = v_isSharedCheck_6328_;
goto v_resetjp_6322_;
}
v_resetjp_6322_:
{
lean_object* v___x_6326_; 
if (v_isShared_6324_ == 0)
{
v___x_6326_ = v___x_6323_;
goto v_reusejp_6325_;
}
else
{
lean_object* v_reuseFailAlloc_6327_; 
v_reuseFailAlloc_6327_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6327_, 0, v_a_6321_);
v___x_6326_ = v_reuseFailAlloc_6327_;
goto v_reusejp_6325_;
}
v_reusejp_6325_:
{
return v___x_6326_;
}
}
}
}
else
{
lean_object* v_a_6329_; lean_object* v___x_6331_; uint8_t v_isShared_6332_; uint8_t v_isSharedCheck_6336_; 
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
v_a_6329_ = lean_ctor_get(v___x_6308_, 0);
v_isSharedCheck_6336_ = !lean_is_exclusive(v___x_6308_);
if (v_isSharedCheck_6336_ == 0)
{
v___x_6331_ = v___x_6308_;
v_isShared_6332_ = v_isSharedCheck_6336_;
goto v_resetjp_6330_;
}
else
{
lean_inc(v_a_6329_);
lean_dec(v___x_6308_);
v___x_6331_ = lean_box(0);
v_isShared_6332_ = v_isSharedCheck_6336_;
goto v_resetjp_6330_;
}
v_resetjp_6330_:
{
lean_object* v___x_6334_; 
if (v_isShared_6332_ == 0)
{
v___x_6334_ = v___x_6331_;
goto v_reusejp_6333_;
}
else
{
lean_object* v_reuseFailAlloc_6335_; 
v_reuseFailAlloc_6335_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6335_, 0, v_a_6329_);
v___x_6334_ = v_reuseFailAlloc_6335_;
goto v_reusejp_6333_;
}
v_reusejp_6333_:
{
return v___x_6334_;
}
}
}
}
}
else
{
lean_object* v_a_6337_; lean_object* v___x_6339_; uint8_t v_isShared_6340_; uint8_t v_isSharedCheck_6344_; 
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6337_ = lean_ctor_get(v___x_6305_, 0);
v_isSharedCheck_6344_ = !lean_is_exclusive(v___x_6305_);
if (v_isSharedCheck_6344_ == 0)
{
v___x_6339_ = v___x_6305_;
v_isShared_6340_ = v_isSharedCheck_6344_;
goto v_resetjp_6338_;
}
else
{
lean_inc(v_a_6337_);
lean_dec(v___x_6305_);
v___x_6339_ = lean_box(0);
v_isShared_6340_ = v_isSharedCheck_6344_;
goto v_resetjp_6338_;
}
v_resetjp_6338_:
{
lean_object* v___x_6342_; 
if (v_isShared_6340_ == 0)
{
v___x_6342_ = v___x_6339_;
goto v_reusejp_6341_;
}
else
{
lean_object* v_reuseFailAlloc_6343_; 
v_reuseFailAlloc_6343_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6343_, 0, v_a_6337_);
v___x_6342_ = v_reuseFailAlloc_6343_;
goto v_reusejp_6341_;
}
v_reusejp_6341_:
{
return v___x_6342_;
}
}
}
}
}
else
{
lean_object* v___x_6345_; 
lean_dec_ref(v___x_6256_);
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
lean_inc(v___y_6162_);
lean_inc_ref(v___y_6161_);
lean_inc(v___y_6160_);
lean_inc_ref(v___y_6159_);
lean_inc(v___y_6158_);
lean_inc(v___y_6157_);
lean_inc(v___y_6156_);
v___x_6345_ = l_Lean_Meta_Grind_Arith_CommRing_isSubInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__4(v_arg_6240_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
lean_dec_ref(v_arg_6240_);
if (lean_obj_tag(v___x_6345_) == 0)
{
lean_object* v_a_6346_; uint8_t v___x_6347_; 
v_a_6346_ = lean_ctor_get(v___x_6345_, 0);
lean_inc(v_a_6346_);
lean_dec_ref(v___x_6345_);
v___x_6347_ = lean_unbox(v_a_6346_);
lean_dec(v_a_6346_);
if (v___x_6347_ == 0)
{
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
v_e_6211_ = v_e_6153_;
v___y_6212_ = v___y_6156_;
v___y_6213_ = v___y_6157_;
v___y_6214_ = v___y_6158_;
v___y_6215_ = v___y_6159_;
v___y_6216_ = v___y_6160_;
v___y_6217_ = v___y_6161_;
v___y_6218_ = v___y_6162_;
v___y_6219_ = v___y_6163_;
v___y_6220_ = v___y_6164_;
v___y_6221_ = v___y_6165_;
v___y_6222_ = v___y_6166_;
goto v___jp_6210_;
}
else
{
lean_object* v___x_6348_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec_ref(v_e_6153_);
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
lean_inc(v___y_6162_);
lean_inc_ref(v___y_6161_);
lean_inc(v___y_6160_);
lean_inc_ref(v___y_6159_);
lean_inc(v___y_6158_);
lean_inc(v___y_6157_);
lean_inc(v___y_6156_);
lean_inc_ref(v_asVar_6248_);
lean_inc_ref(v_toVar_6174_);
v___x_6348_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_6174_, v_asVar_6248_, v_arg_6237_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
if (lean_obj_tag(v___x_6348_) == 0)
{
lean_object* v_a_6349_; lean_object* v___x_6350_; 
v_a_6349_ = lean_ctor_get(v___x_6348_, 0);
lean_inc(v_a_6349_);
lean_dec_ref(v___x_6348_);
v___x_6350_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_6174_, v_asVar_6248_, v_arg_6234_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
if (lean_obj_tag(v___x_6350_) == 0)
{
lean_object* v_a_6351_; lean_object* v___x_6353_; uint8_t v_isShared_6354_; uint8_t v_isSharedCheck_6360_; 
v_a_6351_ = lean_ctor_get(v___x_6350_, 0);
v_isSharedCheck_6360_ = !lean_is_exclusive(v___x_6350_);
if (v_isSharedCheck_6360_ == 0)
{
v___x_6353_ = v___x_6350_;
v_isShared_6354_ = v_isSharedCheck_6360_;
goto v_resetjp_6352_;
}
else
{
lean_inc(v_a_6351_);
lean_dec(v___x_6350_);
v___x_6353_ = lean_box(0);
v_isShared_6354_ = v_isSharedCheck_6360_;
goto v_resetjp_6352_;
}
v_resetjp_6352_:
{
lean_object* v___x_6355_; lean_object* v___x_6356_; lean_object* v___x_6358_; 
v___x_6355_ = lean_alloc_ctor(6, 2, 0);
lean_ctor_set(v___x_6355_, 0, v_a_6349_);
lean_ctor_set(v___x_6355_, 1, v_a_6351_);
v___x_6356_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6356_, 0, v___x_6355_);
if (v_isShared_6354_ == 0)
{
lean_ctor_set(v___x_6353_, 0, v___x_6356_);
v___x_6358_ = v___x_6353_;
goto v_reusejp_6357_;
}
else
{
lean_object* v_reuseFailAlloc_6359_; 
v_reuseFailAlloc_6359_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6359_, 0, v___x_6356_);
v___x_6358_ = v_reuseFailAlloc_6359_;
goto v_reusejp_6357_;
}
v_reusejp_6357_:
{
return v___x_6358_;
}
}
}
else
{
lean_object* v_a_6361_; lean_object* v___x_6363_; uint8_t v_isShared_6364_; uint8_t v_isSharedCheck_6368_; 
lean_dec(v_a_6349_);
v_a_6361_ = lean_ctor_get(v___x_6350_, 0);
v_isSharedCheck_6368_ = !lean_is_exclusive(v___x_6350_);
if (v_isSharedCheck_6368_ == 0)
{
v___x_6363_ = v___x_6350_;
v_isShared_6364_ = v_isSharedCheck_6368_;
goto v_resetjp_6362_;
}
else
{
lean_inc(v_a_6361_);
lean_dec(v___x_6350_);
v___x_6363_ = lean_box(0);
v_isShared_6364_ = v_isSharedCheck_6368_;
goto v_resetjp_6362_;
}
v_resetjp_6362_:
{
lean_object* v___x_6366_; 
if (v_isShared_6364_ == 0)
{
v___x_6366_ = v___x_6363_;
goto v_reusejp_6365_;
}
else
{
lean_object* v_reuseFailAlloc_6367_; 
v_reuseFailAlloc_6367_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6367_, 0, v_a_6361_);
v___x_6366_ = v_reuseFailAlloc_6367_;
goto v_reusejp_6365_;
}
v_reusejp_6365_:
{
return v___x_6366_;
}
}
}
}
else
{
lean_object* v_a_6369_; lean_object* v___x_6371_; uint8_t v_isShared_6372_; uint8_t v_isSharedCheck_6376_; 
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
v_a_6369_ = lean_ctor_get(v___x_6348_, 0);
v_isSharedCheck_6376_ = !lean_is_exclusive(v___x_6348_);
if (v_isSharedCheck_6376_ == 0)
{
v___x_6371_ = v___x_6348_;
v_isShared_6372_ = v_isSharedCheck_6376_;
goto v_resetjp_6370_;
}
else
{
lean_inc(v_a_6369_);
lean_dec(v___x_6348_);
v___x_6371_ = lean_box(0);
v_isShared_6372_ = v_isSharedCheck_6376_;
goto v_resetjp_6370_;
}
v_resetjp_6370_:
{
lean_object* v___x_6374_; 
if (v_isShared_6372_ == 0)
{
v___x_6374_ = v___x_6371_;
goto v_reusejp_6373_;
}
else
{
lean_object* v_reuseFailAlloc_6375_; 
v_reuseFailAlloc_6375_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6375_, 0, v_a_6369_);
v___x_6374_ = v_reuseFailAlloc_6375_;
goto v_reusejp_6373_;
}
v_reusejp_6373_:
{
return v___x_6374_;
}
}
}
}
}
else
{
lean_object* v_a_6377_; lean_object* v___x_6379_; uint8_t v_isShared_6380_; uint8_t v_isSharedCheck_6384_; 
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6377_ = lean_ctor_get(v___x_6345_, 0);
v_isSharedCheck_6384_ = !lean_is_exclusive(v___x_6345_);
if (v_isSharedCheck_6384_ == 0)
{
v___x_6379_ = v___x_6345_;
v_isShared_6380_ = v_isSharedCheck_6384_;
goto v_resetjp_6378_;
}
else
{
lean_inc(v_a_6377_);
lean_dec(v___x_6345_);
v___x_6379_ = lean_box(0);
v_isShared_6380_ = v_isSharedCheck_6384_;
goto v_resetjp_6378_;
}
v_resetjp_6378_:
{
lean_object* v___x_6382_; 
if (v_isShared_6380_ == 0)
{
v___x_6382_ = v___x_6379_;
goto v_reusejp_6381_;
}
else
{
lean_object* v_reuseFailAlloc_6383_; 
v_reuseFailAlloc_6383_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6383_, 0, v_a_6377_);
v___x_6382_ = v_reuseFailAlloc_6383_;
goto v_reusejp_6381_;
}
v_reusejp_6381_:
{
return v___x_6382_;
}
}
}
}
}
else
{
lean_object* v___x_6385_; 
lean_dec_ref(v___x_6256_);
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
v___x_6385_ = l_Lean_Meta_getNatValue_x3f(v_arg_6234_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
lean_dec_ref(v_arg_6234_);
if (lean_obj_tag(v___x_6385_) == 0)
{
lean_object* v_a_6386_; 
v_a_6386_ = lean_ctor_get(v___x_6385_, 0);
lean_inc(v_a_6386_);
lean_dec_ref(v___x_6385_);
if (lean_obj_tag(v_a_6386_) == 1)
{
lean_object* v_val_6387_; lean_object* v___x_6389_; uint8_t v_isShared_6390_; uint8_t v_isSharedCheck_6423_; 
v_val_6387_ = lean_ctor_get(v_a_6386_, 0);
v_isSharedCheck_6423_ = !lean_is_exclusive(v_a_6386_);
if (v_isSharedCheck_6423_ == 0)
{
v___x_6389_ = v_a_6386_;
v_isShared_6390_ = v_isSharedCheck_6423_;
goto v_resetjp_6388_;
}
else
{
lean_inc(v_val_6387_);
lean_dec(v_a_6386_);
v___x_6389_ = lean_box(0);
v_isShared_6390_ = v_isSharedCheck_6423_;
goto v_resetjp_6388_;
}
v_resetjp_6388_:
{
lean_object* v___x_6391_; 
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
lean_inc(v___y_6162_);
lean_inc_ref(v___y_6161_);
lean_inc(v___y_6160_);
lean_inc_ref(v___y_6159_);
lean_inc(v___y_6158_);
lean_inc(v___y_6157_);
lean_inc(v___y_6156_);
v___x_6391_ = l_Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__5(v_arg_6240_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
lean_dec_ref(v_arg_6240_);
if (lean_obj_tag(v___x_6391_) == 0)
{
lean_object* v_a_6392_; uint8_t v___x_6393_; 
v_a_6392_ = lean_ctor_get(v___x_6391_, 0);
lean_inc(v_a_6392_);
lean_dec_ref(v___x_6391_);
v___x_6393_ = lean_unbox(v_a_6392_);
lean_dec(v_a_6392_);
if (v___x_6393_ == 0)
{
lean_del_object(v___x_6389_);
lean_dec(v_val_6387_);
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_toVar_6174_);
v_e_6211_ = v_e_6153_;
v___y_6212_ = v___y_6156_;
v___y_6213_ = v___y_6157_;
v___y_6214_ = v___y_6158_;
v___y_6215_ = v___y_6159_;
v___y_6216_ = v___y_6160_;
v___y_6217_ = v___y_6161_;
v___y_6218_ = v___y_6162_;
v___y_6219_ = v___y_6163_;
v___y_6220_ = v___y_6164_;
v___y_6221_ = v___y_6165_;
v___y_6222_ = v___y_6166_;
goto v___jp_6210_;
}
else
{
lean_object* v___x_6394_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec_ref(v_e_6153_);
v___x_6394_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_6174_, v_asVar_6248_, v_arg_6237_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
if (lean_obj_tag(v___x_6394_) == 0)
{
lean_object* v_a_6395_; lean_object* v___x_6397_; uint8_t v_isShared_6398_; uint8_t v_isSharedCheck_6406_; 
v_a_6395_ = lean_ctor_get(v___x_6394_, 0);
v_isSharedCheck_6406_ = !lean_is_exclusive(v___x_6394_);
if (v_isSharedCheck_6406_ == 0)
{
v___x_6397_ = v___x_6394_;
v_isShared_6398_ = v_isSharedCheck_6406_;
goto v_resetjp_6396_;
}
else
{
lean_inc(v_a_6395_);
lean_dec(v___x_6394_);
v___x_6397_ = lean_box(0);
v_isShared_6398_ = v_isSharedCheck_6406_;
goto v_resetjp_6396_;
}
v_resetjp_6396_:
{
lean_object* v___x_6399_; lean_object* v___x_6401_; 
v___x_6399_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_6399_, 0, v_a_6395_);
lean_ctor_set(v___x_6399_, 1, v_val_6387_);
if (v_isShared_6390_ == 0)
{
lean_ctor_set(v___x_6389_, 0, v___x_6399_);
v___x_6401_ = v___x_6389_;
goto v_reusejp_6400_;
}
else
{
lean_object* v_reuseFailAlloc_6405_; 
v_reuseFailAlloc_6405_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6405_, 0, v___x_6399_);
v___x_6401_ = v_reuseFailAlloc_6405_;
goto v_reusejp_6400_;
}
v_reusejp_6400_:
{
lean_object* v___x_6403_; 
if (v_isShared_6398_ == 0)
{
lean_ctor_set(v___x_6397_, 0, v___x_6401_);
v___x_6403_ = v___x_6397_;
goto v_reusejp_6402_;
}
else
{
lean_object* v_reuseFailAlloc_6404_; 
v_reuseFailAlloc_6404_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6404_, 0, v___x_6401_);
v___x_6403_ = v_reuseFailAlloc_6404_;
goto v_reusejp_6402_;
}
v_reusejp_6402_:
{
return v___x_6403_;
}
}
}
}
else
{
lean_object* v_a_6407_; lean_object* v___x_6409_; uint8_t v_isShared_6410_; uint8_t v_isSharedCheck_6414_; 
lean_del_object(v___x_6389_);
lean_dec(v_val_6387_);
v_a_6407_ = lean_ctor_get(v___x_6394_, 0);
v_isSharedCheck_6414_ = !lean_is_exclusive(v___x_6394_);
if (v_isSharedCheck_6414_ == 0)
{
v___x_6409_ = v___x_6394_;
v_isShared_6410_ = v_isSharedCheck_6414_;
goto v_resetjp_6408_;
}
else
{
lean_inc(v_a_6407_);
lean_dec(v___x_6394_);
v___x_6409_ = lean_box(0);
v_isShared_6410_ = v_isSharedCheck_6414_;
goto v_resetjp_6408_;
}
v_resetjp_6408_:
{
lean_object* v___x_6412_; 
if (v_isShared_6410_ == 0)
{
v___x_6412_ = v___x_6409_;
goto v_reusejp_6411_;
}
else
{
lean_object* v_reuseFailAlloc_6413_; 
v_reuseFailAlloc_6413_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6413_, 0, v_a_6407_);
v___x_6412_ = v_reuseFailAlloc_6413_;
goto v_reusejp_6411_;
}
v_reusejp_6411_:
{
return v___x_6412_;
}
}
}
}
}
else
{
lean_object* v_a_6415_; lean_object* v___x_6417_; uint8_t v_isShared_6418_; uint8_t v_isSharedCheck_6422_; 
lean_del_object(v___x_6389_);
lean_dec(v_val_6387_);
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_toVar_6174_);
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6415_ = lean_ctor_get(v___x_6391_, 0);
v_isSharedCheck_6422_ = !lean_is_exclusive(v___x_6391_);
if (v_isSharedCheck_6422_ == 0)
{
v___x_6417_ = v___x_6391_;
v_isShared_6418_ = v_isSharedCheck_6422_;
goto v_resetjp_6416_;
}
else
{
lean_inc(v_a_6415_);
lean_dec(v___x_6391_);
v___x_6417_ = lean_box(0);
v_isShared_6418_ = v_isSharedCheck_6422_;
goto v_resetjp_6416_;
}
v_resetjp_6416_:
{
lean_object* v___x_6420_; 
if (v_isShared_6418_ == 0)
{
v___x_6420_ = v___x_6417_;
goto v_reusejp_6419_;
}
else
{
lean_object* v_reuseFailAlloc_6421_; 
v_reuseFailAlloc_6421_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6421_, 0, v_a_6415_);
v___x_6420_ = v_reuseFailAlloc_6421_;
goto v_reusejp_6419_;
}
v_reusejp_6419_:
{
return v___x_6420_;
}
}
}
}
}
else
{
lean_dec(v_a_6386_);
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6240_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_toVar_6174_);
v_e_6211_ = v_e_6153_;
v___y_6212_ = v___y_6156_;
v___y_6213_ = v___y_6157_;
v___y_6214_ = v___y_6158_;
v___y_6215_ = v___y_6159_;
v___y_6216_ = v___y_6160_;
v___y_6217_ = v___y_6161_;
v___y_6218_ = v___y_6162_;
v___y_6219_ = v___y_6163_;
v___y_6220_ = v___y_6164_;
v___y_6221_ = v___y_6165_;
v___y_6222_ = v___y_6166_;
goto v___jp_6210_;
}
}
else
{
lean_object* v_a_6424_; lean_object* v___x_6426_; uint8_t v_isShared_6427_; uint8_t v_isSharedCheck_6431_; 
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6240_);
lean_dec_ref(v_arg_6237_);
lean_dec_ref(v_toVar_6174_);
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6424_ = lean_ctor_get(v___x_6385_, 0);
v_isSharedCheck_6431_ = !lean_is_exclusive(v___x_6385_);
if (v_isSharedCheck_6431_ == 0)
{
v___x_6426_ = v___x_6385_;
v_isShared_6427_ = v_isSharedCheck_6431_;
goto v_resetjp_6425_;
}
else
{
lean_inc(v_a_6424_);
lean_dec(v___x_6385_);
v___x_6426_ = lean_box(0);
v_isShared_6427_ = v_isSharedCheck_6431_;
goto v_resetjp_6425_;
}
v_resetjp_6425_:
{
lean_object* v___x_6429_; 
if (v_isShared_6427_ == 0)
{
v___x_6429_ = v___x_6426_;
goto v_reusejp_6428_;
}
else
{
lean_object* v_reuseFailAlloc_6430_; 
v_reuseFailAlloc_6430_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6430_, 0, v_a_6424_);
v___x_6429_ = v_reuseFailAlloc_6430_;
goto v_reusejp_6428_;
}
v_reusejp_6428_:
{
return v___x_6429_;
}
}
}
}
}
}
}
}
else
{
lean_object* v___x_6432_; 
lean_dec_ref(v___x_6241_);
lean_dec_ref(v_arg_6240_);
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
lean_inc(v___y_6162_);
lean_inc_ref(v___y_6161_);
lean_inc(v___y_6160_);
lean_inc_ref(v___y_6159_);
lean_inc(v___y_6158_);
lean_inc(v___y_6157_);
lean_inc(v___y_6156_);
v___x_6432_ = l_Lean_Meta_Grind_Arith_CommRing_isNegInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__6(v_arg_6237_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
lean_dec_ref(v_arg_6237_);
if (lean_obj_tag(v___x_6432_) == 0)
{
lean_object* v_a_6433_; uint8_t v___x_6434_; 
v_a_6433_ = lean_ctor_get(v___x_6432_, 0);
lean_inc(v_a_6433_);
lean_dec_ref(v___x_6432_);
v___x_6434_ = lean_unbox(v_a_6433_);
lean_dec(v_a_6433_);
if (v___x_6434_ == 0)
{
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
v_e_6211_ = v_e_6153_;
v___y_6212_ = v___y_6156_;
v___y_6213_ = v___y_6157_;
v___y_6214_ = v___y_6158_;
v___y_6215_ = v___y_6159_;
v___y_6216_ = v___y_6160_;
v___y_6217_ = v___y_6161_;
v___y_6218_ = v___y_6162_;
v___y_6219_ = v___y_6163_;
v___y_6220_ = v___y_6164_;
v___y_6221_ = v___y_6165_;
v___y_6222_ = v___y_6166_;
goto v___jp_6210_;
}
else
{
lean_object* v___x_6435_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec_ref(v_e_6153_);
v___x_6435_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__2(v_toVar_6174_, v_asVar_6248_, v_arg_6234_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
if (lean_obj_tag(v___x_6435_) == 0)
{
lean_object* v_a_6436_; lean_object* v___x_6438_; uint8_t v_isShared_6439_; uint8_t v_isSharedCheck_6445_; 
v_a_6436_ = lean_ctor_get(v___x_6435_, 0);
v_isSharedCheck_6445_ = !lean_is_exclusive(v___x_6435_);
if (v_isSharedCheck_6445_ == 0)
{
v___x_6438_ = v___x_6435_;
v_isShared_6439_ = v_isSharedCheck_6445_;
goto v_resetjp_6437_;
}
else
{
lean_inc(v_a_6436_);
lean_dec(v___x_6435_);
v___x_6438_ = lean_box(0);
v_isShared_6439_ = v_isSharedCheck_6445_;
goto v_resetjp_6437_;
}
v_resetjp_6437_:
{
lean_object* v___x_6440_; lean_object* v___x_6441_; lean_object* v___x_6443_; 
v___x_6440_ = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(v___x_6440_, 0, v_a_6436_);
v___x_6441_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6441_, 0, v___x_6440_);
if (v_isShared_6439_ == 0)
{
lean_ctor_set(v___x_6438_, 0, v___x_6441_);
v___x_6443_ = v___x_6438_;
goto v_reusejp_6442_;
}
else
{
lean_object* v_reuseFailAlloc_6444_; 
v_reuseFailAlloc_6444_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6444_, 0, v___x_6441_);
v___x_6443_ = v_reuseFailAlloc_6444_;
goto v_reusejp_6442_;
}
v_reusejp_6442_:
{
return v___x_6443_;
}
}
}
else
{
lean_object* v_a_6446_; lean_object* v___x_6448_; uint8_t v_isShared_6449_; uint8_t v_isSharedCheck_6453_; 
v_a_6446_ = lean_ctor_get(v___x_6435_, 0);
v_isSharedCheck_6453_ = !lean_is_exclusive(v___x_6435_);
if (v_isSharedCheck_6453_ == 0)
{
v___x_6448_ = v___x_6435_;
v_isShared_6449_ = v_isSharedCheck_6453_;
goto v_resetjp_6447_;
}
else
{
lean_inc(v_a_6446_);
lean_dec(v___x_6435_);
v___x_6448_ = lean_box(0);
v_isShared_6449_ = v_isSharedCheck_6453_;
goto v_resetjp_6447_;
}
v_resetjp_6447_:
{
lean_object* v___x_6451_; 
if (v_isShared_6449_ == 0)
{
v___x_6451_ = v___x_6448_;
goto v_reusejp_6450_;
}
else
{
lean_object* v_reuseFailAlloc_6452_; 
v_reuseFailAlloc_6452_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6452_, 0, v_a_6446_);
v___x_6451_ = v_reuseFailAlloc_6452_;
goto v_reusejp_6450_;
}
v_reusejp_6450_:
{
return v___x_6451_;
}
}
}
}
}
else
{
lean_object* v_a_6454_; lean_object* v___x_6456_; uint8_t v_isShared_6457_; uint8_t v_isSharedCheck_6461_; 
lean_dec_ref(v_asVar_6248_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6454_ = lean_ctor_get(v___x_6432_, 0);
v_isSharedCheck_6461_ = !lean_is_exclusive(v___x_6432_);
if (v_isSharedCheck_6461_ == 0)
{
v___x_6456_ = v___x_6432_;
v_isShared_6457_ = v_isSharedCheck_6461_;
goto v_resetjp_6455_;
}
else
{
lean_inc(v_a_6454_);
lean_dec(v___x_6432_);
v___x_6456_ = lean_box(0);
v_isShared_6457_ = v_isSharedCheck_6461_;
goto v_resetjp_6455_;
}
v_resetjp_6455_:
{
lean_object* v___x_6459_; 
if (v_isShared_6457_ == 0)
{
v___x_6459_ = v___x_6456_;
goto v_reusejp_6458_;
}
else
{
lean_object* v_reuseFailAlloc_6460_; 
v_reuseFailAlloc_6460_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6460_, 0, v_a_6454_);
v___x_6459_ = v_reuseFailAlloc_6460_;
goto v_reusejp_6458_;
}
v_reusejp_6458_:
{
return v___x_6459_;
}
}
}
}
}
else
{
lean_object* v___x_6462_; 
lean_dec_ref(v___x_6241_);
lean_dec_ref(v_arg_6240_);
lean_dec_ref(v_toVar_6174_);
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
lean_inc(v___y_6162_);
lean_inc_ref(v___y_6161_);
lean_inc(v___y_6160_);
lean_inc_ref(v___y_6159_);
lean_inc(v___y_6158_);
lean_inc(v___y_6157_);
lean_inc(v___y_6156_);
v___x_6462_ = l_Lean_Meta_Grind_Arith_CommRing_isIntCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__7(v_arg_6237_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
lean_dec_ref(v_arg_6237_);
if (lean_obj_tag(v___x_6462_) == 0)
{
lean_object* v_a_6463_; uint8_t v___x_6464_; 
v_a_6463_ = lean_ctor_get(v___x_6462_, 0);
lean_inc(v_a_6463_);
lean_dec_ref(v___x_6462_);
v___x_6464_ = lean_unbox(v_a_6463_);
lean_dec(v_a_6463_);
if (v___x_6464_ == 0)
{
lean_dec_ref(v_arg_6234_);
v_e_6211_ = v_e_6153_;
v___y_6212_ = v___y_6156_;
v___y_6213_ = v___y_6157_;
v___y_6214_ = v___y_6158_;
v___y_6215_ = v___y_6159_;
v___y_6216_ = v___y_6160_;
v___y_6217_ = v___y_6161_;
v___y_6218_ = v___y_6162_;
v___y_6219_ = v___y_6163_;
v___y_6220_ = v___y_6164_;
v___y_6221_ = v___y_6165_;
v___y_6222_ = v___y_6166_;
goto v___jp_6210_;
}
else
{
lean_object* v___x_6465_; 
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
v___x_6465_ = l_Lean_Meta_getIntValue_x3f(v_arg_6234_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
if (lean_obj_tag(v___x_6465_) == 0)
{
lean_object* v_a_6466_; lean_object* v___x_6468_; uint8_t v_isShared_6469_; uint8_t v_isSharedCheck_6482_; 
v_a_6466_ = lean_ctor_get(v___x_6465_, 0);
v_isSharedCheck_6482_ = !lean_is_exclusive(v___x_6465_);
if (v_isSharedCheck_6482_ == 0)
{
v___x_6468_ = v___x_6465_;
v_isShared_6469_ = v_isSharedCheck_6482_;
goto v_resetjp_6467_;
}
else
{
lean_inc(v_a_6466_);
lean_dec(v___x_6465_);
v___x_6468_ = lean_box(0);
v_isShared_6469_ = v_isSharedCheck_6482_;
goto v_resetjp_6467_;
}
v_resetjp_6467_:
{
if (lean_obj_tag(v_a_6466_) == 1)
{
lean_object* v_val_6470_; lean_object* v___x_6472_; uint8_t v_isShared_6473_; uint8_t v_isSharedCheck_6481_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_val_6470_ = lean_ctor_get(v_a_6466_, 0);
v_isSharedCheck_6481_ = !lean_is_exclusive(v_a_6466_);
if (v_isSharedCheck_6481_ == 0)
{
v___x_6472_ = v_a_6466_;
v_isShared_6473_ = v_isSharedCheck_6481_;
goto v_resetjp_6471_;
}
else
{
lean_inc(v_val_6470_);
lean_dec(v_a_6466_);
v___x_6472_ = lean_box(0);
v_isShared_6473_ = v_isSharedCheck_6481_;
goto v_resetjp_6471_;
}
v_resetjp_6471_:
{
lean_object* v___x_6474_; lean_object* v___x_6476_; 
v___x_6474_ = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(v___x_6474_, 0, v_val_6470_);
if (v_isShared_6473_ == 0)
{
lean_ctor_set(v___x_6472_, 0, v___x_6474_);
v___x_6476_ = v___x_6472_;
goto v_reusejp_6475_;
}
else
{
lean_object* v_reuseFailAlloc_6480_; 
v_reuseFailAlloc_6480_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6480_, 0, v___x_6474_);
v___x_6476_ = v_reuseFailAlloc_6480_;
goto v_reusejp_6475_;
}
v_reusejp_6475_:
{
lean_object* v___x_6478_; 
if (v_isShared_6469_ == 0)
{
lean_ctor_set(v___x_6468_, 0, v___x_6476_);
v___x_6478_ = v___x_6468_;
goto v_reusejp_6477_;
}
else
{
lean_object* v_reuseFailAlloc_6479_; 
v_reuseFailAlloc_6479_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6479_, 0, v___x_6476_);
v___x_6478_ = v_reuseFailAlloc_6479_;
goto v_reusejp_6477_;
}
v_reusejp_6477_:
{
return v___x_6478_;
}
}
}
}
else
{
lean_del_object(v___x_6468_);
lean_dec(v_a_6466_);
v_e_6176_ = v_e_6153_;
v___y_6177_ = v___y_6156_;
v___y_6178_ = v___y_6157_;
v___y_6179_ = v___y_6158_;
v___y_6180_ = v___y_6159_;
v___y_6181_ = v___y_6160_;
v___y_6182_ = v___y_6161_;
v___y_6183_ = v___y_6162_;
v___y_6184_ = v___y_6163_;
v___y_6185_ = v___y_6164_;
v___y_6186_ = v___y_6165_;
v___y_6187_ = v___y_6166_;
goto v___jp_6175_;
}
}
}
else
{
lean_object* v_a_6483_; lean_object* v___x_6485_; uint8_t v_isShared_6486_; uint8_t v_isSharedCheck_6490_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6483_ = lean_ctor_get(v___x_6465_, 0);
v_isSharedCheck_6490_ = !lean_is_exclusive(v___x_6465_);
if (v_isSharedCheck_6490_ == 0)
{
v___x_6485_ = v___x_6465_;
v_isShared_6486_ = v_isSharedCheck_6490_;
goto v_resetjp_6484_;
}
else
{
lean_inc(v_a_6483_);
lean_dec(v___x_6465_);
v___x_6485_ = lean_box(0);
v_isShared_6486_ = v_isSharedCheck_6490_;
goto v_resetjp_6484_;
}
v_resetjp_6484_:
{
lean_object* v___x_6488_; 
if (v_isShared_6486_ == 0)
{
v___x_6488_ = v___x_6485_;
goto v_reusejp_6487_;
}
else
{
lean_object* v_reuseFailAlloc_6489_; 
v_reuseFailAlloc_6489_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6489_, 0, v_a_6483_);
v___x_6488_ = v_reuseFailAlloc_6489_;
goto v_reusejp_6487_;
}
v_reusejp_6487_:
{
return v___x_6488_;
}
}
}
}
}
else
{
lean_object* v_a_6491_; lean_object* v___x_6493_; uint8_t v_isShared_6494_; uint8_t v_isSharedCheck_6498_; 
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6491_ = lean_ctor_get(v___x_6462_, 0);
v_isSharedCheck_6498_ = !lean_is_exclusive(v___x_6462_);
if (v_isSharedCheck_6498_ == 0)
{
v___x_6493_ = v___x_6462_;
v_isShared_6494_ = v_isSharedCheck_6498_;
goto v_resetjp_6492_;
}
else
{
lean_inc(v_a_6491_);
lean_dec(v___x_6462_);
v___x_6493_ = lean_box(0);
v_isShared_6494_ = v_isSharedCheck_6498_;
goto v_resetjp_6492_;
}
v_resetjp_6492_:
{
lean_object* v___x_6496_; 
if (v_isShared_6494_ == 0)
{
v___x_6496_ = v___x_6493_;
goto v_reusejp_6495_;
}
else
{
lean_object* v_reuseFailAlloc_6497_; 
v_reuseFailAlloc_6497_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6497_, 0, v_a_6491_);
v___x_6496_ = v_reuseFailAlloc_6497_;
goto v_reusejp_6495_;
}
v_reusejp_6495_:
{
return v___x_6496_;
}
}
}
}
}
else
{
lean_object* v___x_6499_; 
lean_dec_ref(v___x_6241_);
lean_dec_ref(v_arg_6240_);
lean_dec_ref(v_toVar_6174_);
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
lean_inc(v___y_6162_);
lean_inc_ref(v___y_6161_);
lean_inc(v___y_6160_);
lean_inc_ref(v___y_6159_);
lean_inc(v___y_6158_);
lean_inc(v___y_6157_);
lean_inc(v___y_6156_);
v___x_6499_ = l_Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8(v_arg_6237_, v___y_6156_, v___y_6157_, v___y_6158_, v___y_6159_, v___y_6160_, v___y_6161_, v___y_6162_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
lean_dec_ref(v_arg_6237_);
if (lean_obj_tag(v___x_6499_) == 0)
{
lean_object* v_a_6500_; uint8_t v___x_6501_; 
v_a_6500_ = lean_ctor_get(v___x_6499_, 0);
lean_inc(v_a_6500_);
lean_dec_ref(v___x_6499_);
v___x_6501_ = lean_unbox(v_a_6500_);
lean_dec(v_a_6500_);
if (v___x_6501_ == 0)
{
lean_dec_ref(v_arg_6234_);
v_e_6211_ = v_e_6153_;
v___y_6212_ = v___y_6156_;
v___y_6213_ = v___y_6157_;
v___y_6214_ = v___y_6158_;
v___y_6215_ = v___y_6159_;
v___y_6216_ = v___y_6160_;
v___y_6217_ = v___y_6161_;
v___y_6218_ = v___y_6162_;
v___y_6219_ = v___y_6163_;
v___y_6220_ = v___y_6164_;
v___y_6221_ = v___y_6165_;
v___y_6222_ = v___y_6166_;
goto v___jp_6210_;
}
else
{
lean_object* v___x_6502_; 
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
v___x_6502_ = l_Lean_Meta_getNatValue_x3f(v_arg_6234_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
lean_dec_ref(v_arg_6234_);
if (lean_obj_tag(v___x_6502_) == 0)
{
lean_object* v_a_6503_; lean_object* v___x_6505_; uint8_t v_isShared_6506_; uint8_t v_isSharedCheck_6519_; 
v_a_6503_ = lean_ctor_get(v___x_6502_, 0);
v_isSharedCheck_6519_ = !lean_is_exclusive(v___x_6502_);
if (v_isSharedCheck_6519_ == 0)
{
v___x_6505_ = v___x_6502_;
v_isShared_6506_ = v_isSharedCheck_6519_;
goto v_resetjp_6504_;
}
else
{
lean_inc(v_a_6503_);
lean_dec(v___x_6502_);
v___x_6505_ = lean_box(0);
v_isShared_6506_ = v_isSharedCheck_6519_;
goto v_resetjp_6504_;
}
v_resetjp_6504_:
{
if (lean_obj_tag(v_a_6503_) == 1)
{
lean_object* v_val_6507_; lean_object* v___x_6509_; uint8_t v_isShared_6510_; uint8_t v_isSharedCheck_6518_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_val_6507_ = lean_ctor_get(v_a_6503_, 0);
v_isSharedCheck_6518_ = !lean_is_exclusive(v_a_6503_);
if (v_isSharedCheck_6518_ == 0)
{
v___x_6509_ = v_a_6503_;
v_isShared_6510_ = v_isSharedCheck_6518_;
goto v_resetjp_6508_;
}
else
{
lean_inc(v_val_6507_);
lean_dec(v_a_6503_);
v___x_6509_ = lean_box(0);
v_isShared_6510_ = v_isSharedCheck_6518_;
goto v_resetjp_6508_;
}
v_resetjp_6508_:
{
lean_object* v___x_6511_; lean_object* v___x_6513_; 
v___x_6511_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6511_, 0, v_val_6507_);
if (v_isShared_6510_ == 0)
{
lean_ctor_set(v___x_6509_, 0, v___x_6511_);
v___x_6513_ = v___x_6509_;
goto v_reusejp_6512_;
}
else
{
lean_object* v_reuseFailAlloc_6517_; 
v_reuseFailAlloc_6517_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6517_, 0, v___x_6511_);
v___x_6513_ = v_reuseFailAlloc_6517_;
goto v_reusejp_6512_;
}
v_reusejp_6512_:
{
lean_object* v___x_6515_; 
if (v_isShared_6506_ == 0)
{
lean_ctor_set(v___x_6505_, 0, v___x_6513_);
v___x_6515_ = v___x_6505_;
goto v_reusejp_6514_;
}
else
{
lean_object* v_reuseFailAlloc_6516_; 
v_reuseFailAlloc_6516_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6516_, 0, v___x_6513_);
v___x_6515_ = v_reuseFailAlloc_6516_;
goto v_reusejp_6514_;
}
v_reusejp_6514_:
{
return v___x_6515_;
}
}
}
}
else
{
lean_del_object(v___x_6505_);
lean_dec(v_a_6503_);
v_e_6176_ = v_e_6153_;
v___y_6177_ = v___y_6156_;
v___y_6178_ = v___y_6157_;
v___y_6179_ = v___y_6158_;
v___y_6180_ = v___y_6159_;
v___y_6181_ = v___y_6160_;
v___y_6182_ = v___y_6161_;
v___y_6183_ = v___y_6162_;
v___y_6184_ = v___y_6163_;
v___y_6185_ = v___y_6164_;
v___y_6186_ = v___y_6165_;
v___y_6187_ = v___y_6166_;
goto v___jp_6175_;
}
}
}
else
{
lean_object* v_a_6520_; lean_object* v___x_6522_; uint8_t v_isShared_6523_; uint8_t v_isSharedCheck_6527_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6520_ = lean_ctor_get(v___x_6502_, 0);
v_isSharedCheck_6527_ = !lean_is_exclusive(v___x_6502_);
if (v_isSharedCheck_6527_ == 0)
{
v___x_6522_ = v___x_6502_;
v_isShared_6523_ = v_isSharedCheck_6527_;
goto v_resetjp_6521_;
}
else
{
lean_inc(v_a_6520_);
lean_dec(v___x_6502_);
v___x_6522_ = lean_box(0);
v_isShared_6523_ = v_isSharedCheck_6527_;
goto v_resetjp_6521_;
}
v_resetjp_6521_:
{
lean_object* v___x_6525_; 
if (v_isShared_6523_ == 0)
{
v___x_6525_ = v___x_6522_;
goto v_reusejp_6524_;
}
else
{
lean_object* v_reuseFailAlloc_6526_; 
v_reuseFailAlloc_6526_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6526_, 0, v_a_6520_);
v___x_6525_ = v_reuseFailAlloc_6526_;
goto v_reusejp_6524_;
}
v_reusejp_6524_:
{
return v___x_6525_;
}
}
}
}
}
else
{
lean_object* v_a_6528_; lean_object* v___x_6530_; uint8_t v_isShared_6531_; uint8_t v_isSharedCheck_6535_; 
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6528_ = lean_ctor_get(v___x_6499_, 0);
v_isSharedCheck_6535_ = !lean_is_exclusive(v___x_6499_);
if (v_isSharedCheck_6535_ == 0)
{
v___x_6530_ = v___x_6499_;
v_isShared_6531_ = v_isSharedCheck_6535_;
goto v_resetjp_6529_;
}
else
{
lean_inc(v_a_6528_);
lean_dec(v___x_6499_);
v___x_6530_ = lean_box(0);
v_isShared_6531_ = v_isSharedCheck_6535_;
goto v_resetjp_6529_;
}
v_resetjp_6529_:
{
lean_object* v___x_6533_; 
if (v_isShared_6531_ == 0)
{
v___x_6533_ = v___x_6530_;
goto v_reusejp_6532_;
}
else
{
lean_object* v_reuseFailAlloc_6534_; 
v_reuseFailAlloc_6534_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6534_, 0, v_a_6528_);
v___x_6533_ = v_reuseFailAlloc_6534_;
goto v_reusejp_6532_;
}
v_reusejp_6532_:
{
return v___x_6533_;
}
}
}
}
}
else
{
lean_object* v___x_6536_; 
lean_dec_ref(v___x_6241_);
lean_dec_ref(v_arg_6240_);
lean_dec_ref(v_arg_6234_);
lean_dec_ref(v_toVar_6174_);
lean_inc(v___y_6166_);
lean_inc_ref(v___y_6165_);
lean_inc(v___y_6164_);
lean_inc_ref(v___y_6163_);
v___x_6536_ = l_Lean_Meta_getNatValue_x3f(v_arg_6237_, v___y_6163_, v___y_6164_, v___y_6165_, v___y_6166_);
lean_dec_ref(v_arg_6237_);
if (lean_obj_tag(v___x_6536_) == 0)
{
lean_object* v_a_6537_; lean_object* v___x_6539_; uint8_t v_isShared_6540_; uint8_t v_isSharedCheck_6554_; 
v_a_6537_ = lean_ctor_get(v___x_6536_, 0);
v_isSharedCheck_6554_ = !lean_is_exclusive(v___x_6536_);
if (v_isSharedCheck_6554_ == 0)
{
v___x_6539_ = v___x_6536_;
v_isShared_6540_ = v_isSharedCheck_6554_;
goto v_resetjp_6538_;
}
else
{
lean_inc(v_a_6537_);
lean_dec(v___x_6536_);
v___x_6539_ = lean_box(0);
v_isShared_6540_ = v_isSharedCheck_6554_;
goto v_resetjp_6538_;
}
v_resetjp_6538_:
{
if (lean_obj_tag(v_a_6537_) == 1)
{
lean_object* v_val_6541_; lean_object* v___x_6543_; uint8_t v_isShared_6544_; uint8_t v_isSharedCheck_6553_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_val_6541_ = lean_ctor_get(v_a_6537_, 0);
v_isSharedCheck_6553_ = !lean_is_exclusive(v_a_6537_);
if (v_isSharedCheck_6553_ == 0)
{
v___x_6543_ = v_a_6537_;
v_isShared_6544_ = v_isSharedCheck_6553_;
goto v_resetjp_6542_;
}
else
{
lean_inc(v_val_6541_);
lean_dec(v_a_6537_);
v___x_6543_ = lean_box(0);
v_isShared_6544_ = v_isSharedCheck_6553_;
goto v_resetjp_6542_;
}
v_resetjp_6542_:
{
lean_object* v___x_6545_; lean_object* v___x_6546_; lean_object* v___x_6548_; 
v___x_6545_ = lean_nat_to_int(v_val_6541_);
v___x_6546_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_6546_, 0, v___x_6545_);
if (v_isShared_6544_ == 0)
{
lean_ctor_set(v___x_6543_, 0, v___x_6546_);
v___x_6548_ = v___x_6543_;
goto v_reusejp_6547_;
}
else
{
lean_object* v_reuseFailAlloc_6552_; 
v_reuseFailAlloc_6552_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6552_, 0, v___x_6546_);
v___x_6548_ = v_reuseFailAlloc_6552_;
goto v_reusejp_6547_;
}
v_reusejp_6547_:
{
lean_object* v___x_6550_; 
if (v_isShared_6540_ == 0)
{
lean_ctor_set(v___x_6539_, 0, v___x_6548_);
v___x_6550_ = v___x_6539_;
goto v_reusejp_6549_;
}
else
{
lean_object* v_reuseFailAlloc_6551_; 
v_reuseFailAlloc_6551_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6551_, 0, v___x_6548_);
v___x_6550_ = v_reuseFailAlloc_6551_;
goto v_reusejp_6549_;
}
v_reusejp_6549_:
{
return v___x_6550_;
}
}
}
}
else
{
lean_del_object(v___x_6539_);
lean_dec(v_a_6537_);
v_e_6211_ = v_e_6153_;
v___y_6212_ = v___y_6156_;
v___y_6213_ = v___y_6157_;
v___y_6214_ = v___y_6158_;
v___y_6215_ = v___y_6159_;
v___y_6216_ = v___y_6160_;
v___y_6217_ = v___y_6161_;
v___y_6218_ = v___y_6162_;
v___y_6219_ = v___y_6163_;
v___y_6220_ = v___y_6164_;
v___y_6221_ = v___y_6165_;
v___y_6222_ = v___y_6166_;
goto v___jp_6210_;
}
}
}
else
{
lean_object* v_a_6555_; lean_object* v___x_6557_; uint8_t v_isShared_6558_; uint8_t v_isSharedCheck_6562_; 
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec_ref(v_e_6153_);
v_a_6555_ = lean_ctor_get(v___x_6536_, 0);
v_isSharedCheck_6562_ = !lean_is_exclusive(v___x_6536_);
if (v_isSharedCheck_6562_ == 0)
{
v___x_6557_ = v___x_6536_;
v_isShared_6558_ = v_isSharedCheck_6562_;
goto v_resetjp_6556_;
}
else
{
lean_inc(v_a_6555_);
lean_dec(v___x_6536_);
v___x_6557_ = lean_box(0);
v_isShared_6558_ = v_isSharedCheck_6562_;
goto v_resetjp_6556_;
}
v_resetjp_6556_:
{
lean_object* v___x_6560_; 
if (v_isShared_6558_ == 0)
{
v___x_6560_ = v___x_6557_;
goto v_reusejp_6559_;
}
else
{
lean_object* v_reuseFailAlloc_6561_; 
v_reuseFailAlloc_6561_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6561_, 0, v_a_6555_);
v___x_6560_ = v_reuseFailAlloc_6561_;
goto v_reusejp_6559_;
}
v_reusejp_6559_:
{
return v___x_6560_;
}
}
}
}
}
}
}
v___jp_6175_:
{
if (v_skipVar_6154_ == 0)
{
lean_object* v___x_6188_; 
lean_del_object(v___x_6171_);
v___x_6188_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1(v_mkVar_6173_, v_e_6176_, v___y_6177_, v___y_6178_, v___y_6179_, v___y_6180_, v___y_6181_, v___y_6182_, v___y_6183_, v___y_6184_, v___y_6185_, v___y_6186_, v___y_6187_);
if (lean_obj_tag(v___x_6188_) == 0)
{
lean_object* v_a_6189_; lean_object* v___x_6191_; uint8_t v_isShared_6192_; uint8_t v_isSharedCheck_6197_; 
v_a_6189_ = lean_ctor_get(v___x_6188_, 0);
v_isSharedCheck_6197_ = !lean_is_exclusive(v___x_6188_);
if (v_isSharedCheck_6197_ == 0)
{
v___x_6191_ = v___x_6188_;
v_isShared_6192_ = v_isSharedCheck_6197_;
goto v_resetjp_6190_;
}
else
{
lean_inc(v_a_6189_);
lean_dec(v___x_6188_);
v___x_6191_ = lean_box(0);
v_isShared_6192_ = v_isSharedCheck_6197_;
goto v_resetjp_6190_;
}
v_resetjp_6190_:
{
lean_object* v___x_6193_; lean_object* v___x_6195_; 
v___x_6193_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6193_, 0, v_a_6189_);
if (v_isShared_6192_ == 0)
{
lean_ctor_set(v___x_6191_, 0, v___x_6193_);
v___x_6195_ = v___x_6191_;
goto v_reusejp_6194_;
}
else
{
lean_object* v_reuseFailAlloc_6196_; 
v_reuseFailAlloc_6196_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6196_, 0, v___x_6193_);
v___x_6195_ = v_reuseFailAlloc_6196_;
goto v_reusejp_6194_;
}
v_reusejp_6194_:
{
return v___x_6195_;
}
}
}
else
{
lean_object* v_a_6198_; lean_object* v___x_6200_; uint8_t v_isShared_6201_; uint8_t v_isSharedCheck_6205_; 
v_a_6198_ = lean_ctor_get(v___x_6188_, 0);
v_isSharedCheck_6205_ = !lean_is_exclusive(v___x_6188_);
if (v_isSharedCheck_6205_ == 0)
{
v___x_6200_ = v___x_6188_;
v_isShared_6201_ = v_isSharedCheck_6205_;
goto v_resetjp_6199_;
}
else
{
lean_inc(v_a_6198_);
lean_dec(v___x_6188_);
v___x_6200_ = lean_box(0);
v_isShared_6201_ = v_isSharedCheck_6205_;
goto v_resetjp_6199_;
}
v_resetjp_6199_:
{
lean_object* v___x_6203_; 
if (v_isShared_6201_ == 0)
{
v___x_6203_ = v___x_6200_;
goto v_reusejp_6202_;
}
else
{
lean_object* v_reuseFailAlloc_6204_; 
v_reuseFailAlloc_6204_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6204_, 0, v_a_6198_);
v___x_6203_ = v_reuseFailAlloc_6204_;
goto v_reusejp_6202_;
}
v_reusejp_6202_:
{
return v___x_6203_;
}
}
}
}
else
{
lean_object* v___x_6206_; lean_object* v___x_6208_; 
lean_dec(v___y_6187_);
lean_dec_ref(v___y_6186_);
lean_dec(v___y_6185_);
lean_dec_ref(v___y_6184_);
lean_dec(v___y_6183_);
lean_dec_ref(v___y_6182_);
lean_dec(v___y_6181_);
lean_dec_ref(v___y_6180_);
lean_dec(v___y_6179_);
lean_dec(v___y_6178_);
lean_dec(v___y_6177_);
lean_dec_ref(v_e_6176_);
lean_dec_ref(v_mkVar_6173_);
v___x_6206_ = lean_box(0);
if (v_isShared_6172_ == 0)
{
lean_ctor_set(v___x_6171_, 0, v___x_6206_);
v___x_6208_ = v___x_6171_;
goto v_reusejp_6207_;
}
else
{
lean_object* v_reuseFailAlloc_6209_; 
v_reuseFailAlloc_6209_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6209_, 0, v___x_6206_);
v___x_6208_ = v_reuseFailAlloc_6209_;
goto v_reusejp_6207_;
}
v_reusejp_6207_:
{
return v___x_6208_;
}
}
}
v___jp_6210_:
{
lean_object* v___x_6223_; 
lean_inc_ref(v_e_6211_);
v___x_6223_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportAppIssue___redArg(v_e_6211_, v___y_6214_, v___y_6215_, v___y_6216_, v___y_6217_, v___y_6218_, v___y_6219_, v___y_6220_, v___y_6221_, v___y_6222_);
if (lean_obj_tag(v___x_6223_) == 0)
{
lean_dec_ref(v___x_6223_);
v_e_6176_ = v_e_6211_;
v___y_6177_ = v___y_6212_;
v___y_6178_ = v___y_6213_;
v___y_6179_ = v___y_6214_;
v___y_6180_ = v___y_6215_;
v___y_6181_ = v___y_6216_;
v___y_6182_ = v___y_6217_;
v___y_6183_ = v___y_6218_;
v___y_6184_ = v___y_6219_;
v___y_6185_ = v___y_6220_;
v___y_6186_ = v___y_6221_;
v___y_6187_ = v___y_6222_;
goto v___jp_6175_;
}
else
{
lean_object* v_a_6224_; lean_object* v___x_6226_; uint8_t v_isShared_6227_; uint8_t v_isSharedCheck_6231_; 
lean_dec(v___y_6222_);
lean_dec_ref(v___y_6221_);
lean_dec(v___y_6220_);
lean_dec_ref(v___y_6219_);
lean_dec(v___y_6218_);
lean_dec_ref(v___y_6217_);
lean_dec(v___y_6216_);
lean_dec_ref(v___y_6215_);
lean_dec(v___y_6214_);
lean_dec(v___y_6213_);
lean_dec(v___y_6212_);
lean_dec_ref(v_e_6211_);
lean_dec_ref(v_mkVar_6173_);
lean_del_object(v___x_6171_);
v_a_6224_ = lean_ctor_get(v___x_6223_, 0);
v_isSharedCheck_6231_ = !lean_is_exclusive(v___x_6223_);
if (v_isSharedCheck_6231_ == 0)
{
v___x_6226_ = v___x_6223_;
v_isShared_6227_ = v_isSharedCheck_6231_;
goto v_resetjp_6225_;
}
else
{
lean_inc(v_a_6224_);
lean_dec(v___x_6223_);
v___x_6226_ = lean_box(0);
v_isShared_6227_ = v_isSharedCheck_6231_;
goto v_resetjp_6225_;
}
v_resetjp_6225_:
{
lean_object* v___x_6229_; 
if (v_isShared_6227_ == 0)
{
v___x_6229_ = v___x_6226_;
goto v_reusejp_6228_;
}
else
{
lean_object* v_reuseFailAlloc_6230_; 
v_reuseFailAlloc_6230_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6230_, 0, v_a_6224_);
v___x_6229_ = v_reuseFailAlloc_6230_;
goto v_reusejp_6228_;
}
v_reusejp_6228_:
{
return v___x_6229_;
}
}
}
}
}
}
else
{
lean_object* v_a_6564_; lean_object* v___x_6566_; uint8_t v_isShared_6567_; uint8_t v_isSharedCheck_6571_; 
lean_dec(v___y_6166_);
lean_dec_ref(v___y_6165_);
lean_dec(v___y_6164_);
lean_dec_ref(v___y_6163_);
lean_dec(v___y_6162_);
lean_dec_ref(v___y_6161_);
lean_dec(v___y_6160_);
lean_dec_ref(v___y_6159_);
lean_dec(v___y_6158_);
lean_dec(v___y_6157_);
lean_dec(v___y_6156_);
lean_dec(v_gen_6155_);
lean_dec_ref(v_e_6153_);
v_a_6564_ = lean_ctor_get(v___x_6168_, 0);
v_isSharedCheck_6571_ = !lean_is_exclusive(v___x_6168_);
if (v_isSharedCheck_6571_ == 0)
{
v___x_6566_ = v___x_6168_;
v_isShared_6567_ = v_isSharedCheck_6571_;
goto v_resetjp_6565_;
}
else
{
lean_inc(v_a_6564_);
lean_dec(v___x_6168_);
v___x_6566_ = lean_box(0);
v_isShared_6567_ = v_isSharedCheck_6571_;
goto v_resetjp_6565_;
}
v_resetjp_6565_:
{
lean_object* v___x_6569_; 
if (v_isShared_6567_ == 0)
{
v___x_6569_ = v___x_6566_;
goto v_reusejp_6568_;
}
else
{
lean_object* v_reuseFailAlloc_6570_; 
v_reuseFailAlloc_6570_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6570_, 0, v_a_6564_);
v___x_6569_ = v_reuseFailAlloc_6570_;
goto v_reusejp_6568_;
}
v_reusejp_6568_:
{
return v___x_6569_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___boxed(lean_object* v_e_6572_, lean_object* v_skipVar_6573_, lean_object* v_gen_6574_, lean_object* v___y_6575_, lean_object* v___y_6576_, lean_object* v___y_6577_, lean_object* v___y_6578_, lean_object* v___y_6579_, lean_object* v___y_6580_, lean_object* v___y_6581_, lean_object* v___y_6582_, lean_object* v___y_6583_, lean_object* v___y_6584_, lean_object* v___y_6585_, lean_object* v___y_6586_){
_start:
{
uint8_t v_skipVar_boxed_6587_; lean_object* v_res_6588_; 
v_skipVar_boxed_6587_ = lean_unbox(v_skipVar_6573_);
v_res_6588_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0(v_e_6572_, v_skipVar_boxed_6587_, v_gen_6574_, v___y_6575_, v___y_6576_, v___y_6577_, v___y_6578_, v___y_6579_, v___y_6580_, v___y_6581_, v___y_6582_, v___y_6583_, v___y_6584_, v___y_6585_);
return v_res_6588_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_ncreify_x3f(lean_object* v_e_6589_, uint8_t v_skipVar_6590_, lean_object* v_gen_6591_, lean_object* v_a_6592_, lean_object* v_a_6593_, lean_object* v_a_6594_, lean_object* v_a_6595_, lean_object* v_a_6596_, lean_object* v_a_6597_, lean_object* v_a_6598_, lean_object* v_a_6599_, lean_object* v_a_6600_, lean_object* v_a_6601_, lean_object* v_a_6602_){
_start:
{
lean_object* v___x_6604_; 
v___x_6604_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0(v_e_6589_, v_skipVar_6590_, v_gen_6591_, v_a_6592_, v_a_6593_, v_a_6594_, v_a_6595_, v_a_6596_, v_a_6597_, v_a_6598_, v_a_6599_, v_a_6600_, v_a_6601_, v_a_6602_);
return v___x_6604_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_ncreify_x3f___boxed(lean_object* v_e_6605_, lean_object* v_skipVar_6606_, lean_object* v_gen_6607_, lean_object* v_a_6608_, lean_object* v_a_6609_, lean_object* v_a_6610_, lean_object* v_a_6611_, lean_object* v_a_6612_, lean_object* v_a_6613_, lean_object* v_a_6614_, lean_object* v_a_6615_, lean_object* v_a_6616_, lean_object* v_a_6617_, lean_object* v_a_6618_, lean_object* v_a_6619_){
_start:
{
uint8_t v_skipVar_boxed_6620_; lean_object* v_res_6621_; 
v_skipVar_boxed_6620_ = lean_unbox(v_skipVar_6606_);
v_res_6621_ = l_Lean_Meta_Grind_Arith_CommRing_ncreify_x3f(v_e_6605_, v_skipVar_boxed_6620_, v_gen_6607_, v_a_6608_, v_a_6609_, v_a_6610_, v_a_6611_, v_a_6612_, v_a_6613_, v_a_6614_, v_a_6615_, v_a_6616_, v_a_6617_, v_a_6618_);
return v_res_6621_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19(lean_object* v_u_6622_, lean_object* v_type_6623_, lean_object* v_semiringInst_6624_, lean_object* v___y_6625_, lean_object* v___y_6626_, lean_object* v___y_6627_, lean_object* v___y_6628_, lean_object* v___y_6629_, lean_object* v___y_6630_, lean_object* v___y_6631_, lean_object* v___y_6632_, lean_object* v___y_6633_, lean_object* v___y_6634_, lean_object* v___y_6635_){
_start:
{
lean_object* v___x_6637_; 
v___x_6637_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19___redArg(v_u_6622_, v_type_6623_, v_semiringInst_6624_, v___y_6626_, v___y_6627_, v___y_6628_, v___y_6629_, v___y_6630_, v___y_6631_, v___y_6632_, v___y_6633_, v___y_6634_, v___y_6635_);
return v___x_6637_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19___boxed(lean_object* v_u_6638_, lean_object* v_type_6639_, lean_object* v_semiringInst_6640_, lean_object* v___y_6641_, lean_object* v___y_6642_, lean_object* v___y_6643_, lean_object* v___y_6644_, lean_object* v___y_6645_, lean_object* v___y_6646_, lean_object* v___y_6647_, lean_object* v___y_6648_, lean_object* v___y_6649_, lean_object* v___y_6650_, lean_object* v___y_6651_, lean_object* v___y_6652_){
_start:
{
lean_object* v_res_6653_; 
v_res_6653_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__8_spec__15_spec__19(v_u_6638_, v_type_6639_, v_semiringInst_6640_, v___y_6641_, v___y_6642_, v___y_6643_, v___y_6644_, v___y_6645_, v___y_6646_, v___y_6647_, v___y_6648_, v___y_6649_, v___y_6650_, v___y_6651_);
lean_dec(v___y_6641_);
return v_res_6653_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19(lean_object* v_00_u03b1_6654_, lean_object* v_msg_6655_, lean_object* v___y_6656_, lean_object* v___y_6657_, lean_object* v___y_6658_, lean_object* v___y_6659_, lean_object* v___y_6660_, lean_object* v___y_6661_, lean_object* v___y_6662_, lean_object* v___y_6663_, lean_object* v___y_6664_, lean_object* v___y_6665_, lean_object* v___y_6666_){
_start:
{
lean_object* v___x_6668_; 
v___x_6668_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19___redArg(v_msg_6655_, v___y_6663_, v___y_6664_, v___y_6665_, v___y_6666_);
return v___x_6668_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19___boxed(lean_object* v_00_u03b1_6669_, lean_object* v_msg_6670_, lean_object* v___y_6671_, lean_object* v___y_6672_, lean_object* v___y_6673_, lean_object* v___y_6674_, lean_object* v___y_6675_, lean_object* v___y_6676_, lean_object* v___y_6677_, lean_object* v___y_6678_, lean_object* v___y_6679_, lean_object* v___y_6680_, lean_object* v___y_6681_, lean_object* v___y_6682_){
_start:
{
lean_object* v_res_6683_; 
v_res_6683_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__12_spec__19(v_00_u03b1_6669_, v_msg_6670_, v___y_6671_, v___y_6672_, v___y_6673_, v___y_6674_, v___y_6675_, v___y_6676_, v___y_6677_, v___y_6678_, v___y_6679_, v___y_6680_, v___y_6681_);
lean_dec(v___y_6681_);
lean_dec_ref(v___y_6680_);
lean_dec(v___y_6679_);
lean_dec_ref(v___y_6678_);
lean_dec(v___y_6677_);
lean_dec_ref(v___y_6676_);
lean_dec(v___y_6675_);
lean_dec_ref(v___y_6674_);
lean_dec(v___y_6673_);
lean_dec(v___y_6672_);
lean_dec(v___y_6671_);
return v_res_6683_;
}
}
static lean_object* _init_l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___closed__1(void){
_start:
{
lean_object* v___x_6685_; lean_object* v___x_6686_; 
v___x_6685_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___closed__0));
v___x_6686_ = l_Lean_stringToMessageData(v___x_6685_);
return v___x_6686_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg(lean_object* v_e_6687_, lean_object* v_a_6688_, lean_object* v_a_6689_, lean_object* v_a_6690_, lean_object* v_a_6691_, lean_object* v_a_6692_, lean_object* v_a_6693_, lean_object* v_a_6694_, lean_object* v_a_6695_, lean_object* v_a_6696_){
_start:
{
lean_object* v___x_6698_; 
v___x_6698_ = l_Lean_Meta_Grind_getConfig___redArg(v_a_6689_);
if (lean_obj_tag(v___x_6698_) == 0)
{
lean_object* v_a_6699_; lean_object* v___x_6701_; uint8_t v_isShared_6702_; uint8_t v_isSharedCheck_6712_; 
v_a_6699_ = lean_ctor_get(v___x_6698_, 0);
v_isSharedCheck_6712_ = !lean_is_exclusive(v___x_6698_);
if (v_isSharedCheck_6712_ == 0)
{
v___x_6701_ = v___x_6698_;
v_isShared_6702_ = v_isSharedCheck_6712_;
goto v_resetjp_6700_;
}
else
{
lean_inc(v_a_6699_);
lean_dec(v___x_6698_);
v___x_6701_ = lean_box(0);
v_isShared_6702_ = v_isSharedCheck_6712_;
goto v_resetjp_6700_;
}
v_resetjp_6700_:
{
uint8_t v_verbose_6703_; 
v_verbose_6703_ = lean_ctor_get_uint8(v_a_6699_, sizeof(void*)*11 + 15);
lean_dec(v_a_6699_);
if (v_verbose_6703_ == 0)
{
lean_object* v___x_6704_; lean_object* v___x_6706_; 
lean_dec_ref(v_e_6687_);
v___x_6704_ = lean_box(0);
if (v_isShared_6702_ == 0)
{
lean_ctor_set(v___x_6701_, 0, v___x_6704_);
v___x_6706_ = v___x_6701_;
goto v_reusejp_6705_;
}
else
{
lean_object* v_reuseFailAlloc_6707_; 
v_reuseFailAlloc_6707_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6707_, 0, v___x_6704_);
v___x_6706_ = v_reuseFailAlloc_6707_;
goto v_reusejp_6705_;
}
v_reusejp_6705_:
{
return v___x_6706_;
}
}
else
{
lean_object* v___x_6708_; lean_object* v___x_6709_; lean_object* v___x_6710_; lean_object* v___x_6711_; 
lean_del_object(v___x_6701_);
v___x_6708_ = lean_obj_once(&l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___closed__1, &l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___closed__1_once, _init_l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___closed__1);
v___x_6709_ = l_Lean_indentExpr(v_e_6687_);
v___x_6710_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6710_, 0, v___x_6708_);
lean_ctor_set(v___x_6710_, 1, v___x_6709_);
v___x_6711_ = l_Lean_Meta_Grind_reportIssue(v___x_6710_, v_a_6688_, v_a_6689_, v_a_6690_, v_a_6691_, v_a_6692_, v_a_6693_, v_a_6694_, v_a_6695_, v_a_6696_);
return v___x_6711_;
}
}
}
else
{
lean_object* v_a_6713_; lean_object* v___x_6715_; uint8_t v_isShared_6716_; uint8_t v_isSharedCheck_6720_; 
lean_dec_ref(v_e_6687_);
v_a_6713_ = lean_ctor_get(v___x_6698_, 0);
v_isSharedCheck_6720_ = !lean_is_exclusive(v___x_6698_);
if (v_isSharedCheck_6720_ == 0)
{
v___x_6715_ = v___x_6698_;
v_isShared_6716_ = v_isSharedCheck_6720_;
goto v_resetjp_6714_;
}
else
{
lean_inc(v_a_6713_);
lean_dec(v___x_6698_);
v___x_6715_ = lean_box(0);
v_isShared_6716_ = v_isSharedCheck_6720_;
goto v_resetjp_6714_;
}
v_resetjp_6714_:
{
lean_object* v___x_6718_; 
if (v_isShared_6716_ == 0)
{
v___x_6718_ = v___x_6715_;
goto v_reusejp_6717_;
}
else
{
lean_object* v_reuseFailAlloc_6719_; 
v_reuseFailAlloc_6719_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6719_, 0, v_a_6713_);
v___x_6718_ = v_reuseFailAlloc_6719_;
goto v_reusejp_6717_;
}
v_reusejp_6717_:
{
return v___x_6718_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg___boxed(lean_object* v_e_6721_, lean_object* v_a_6722_, lean_object* v_a_6723_, lean_object* v_a_6724_, lean_object* v_a_6725_, lean_object* v_a_6726_, lean_object* v_a_6727_, lean_object* v_a_6728_, lean_object* v_a_6729_, lean_object* v_a_6730_, lean_object* v_a_6731_){
_start:
{
lean_object* v_res_6732_; 
v_res_6732_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg(v_e_6721_, v_a_6722_, v_a_6723_, v_a_6724_, v_a_6725_, v_a_6726_, v_a_6727_, v_a_6728_, v_a_6729_, v_a_6730_);
lean_dec(v_a_6730_);
lean_dec_ref(v_a_6729_);
lean_dec(v_a_6728_);
lean_dec_ref(v_a_6727_);
lean_dec(v_a_6726_);
lean_dec_ref(v_a_6725_);
lean_dec(v_a_6724_);
lean_dec_ref(v_a_6723_);
lean_dec(v_a_6722_);
return v_res_6732_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue(lean_object* v_e_6733_, lean_object* v_a_6734_, lean_object* v_a_6735_, lean_object* v_a_6736_, lean_object* v_a_6737_, lean_object* v_a_6738_, lean_object* v_a_6739_, lean_object* v_a_6740_, lean_object* v_a_6741_, lean_object* v_a_6742_, lean_object* v_a_6743_){
_start:
{
lean_object* v___x_6745_; 
v___x_6745_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg(v_e_6733_, v_a_6735_, v_a_6736_, v_a_6737_, v_a_6738_, v_a_6739_, v_a_6740_, v_a_6741_, v_a_6742_, v_a_6743_);
return v___x_6745_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___boxed(lean_object* v_e_6746_, lean_object* v_a_6747_, lean_object* v_a_6748_, lean_object* v_a_6749_, lean_object* v_a_6750_, lean_object* v_a_6751_, lean_object* v_a_6752_, lean_object* v_a_6753_, lean_object* v_a_6754_, lean_object* v_a_6755_, lean_object* v_a_6756_, lean_object* v_a_6757_){
_start:
{
lean_object* v_res_6758_; 
v_res_6758_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue(v_e_6746_, v_a_6747_, v_a_6748_, v_a_6749_, v_a_6750_, v_a_6751_, v_a_6752_, v_a_6753_, v_a_6754_, v_a_6755_, v_a_6756_);
lean_dec(v_a_6756_);
lean_dec_ref(v_a_6755_);
lean_dec(v_a_6754_);
lean_dec_ref(v_a_6753_);
lean_dec(v_a_6752_);
lean_dec_ref(v_a_6751_);
lean_dec(v_a_6750_);
lean_dec_ref(v_a_6749_);
lean_dec(v_a_6748_);
lean_dec(v_a_6747_);
return v_res_6758_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__1(lean_object* v_arg_6759_, lean_object* v_asVar_6760_, lean_object* v_e_6761_, lean_object* v_arg_6762_, lean_object* v_inst_6763_, lean_object* v_toBind_6764_, lean_object* v___f_6765_, lean_object* v_____do__lift_6766_){
_start:
{
lean_object* v___x_6767_; uint8_t v___x_6768_; 
v___x_6767_ = l_Lean_Expr_appArg_x21(v_____do__lift_6766_);
v___x_6768_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_6767_, v_arg_6759_);
lean_dec_ref(v___x_6767_);
if (v___x_6768_ == 0)
{
lean_object* v___x_6769_; 
lean_dec(v___f_6765_);
lean_dec(v_toBind_6764_);
lean_dec(v_inst_6763_);
lean_dec_ref(v_arg_6762_);
v___x_6769_ = lean_apply_1(v_asVar_6760_, v_e_6761_);
return v___x_6769_;
}
else
{
lean_object* v___x_6770_; lean_object* v___x_6771_; lean_object* v___x_6772_; 
lean_dec_ref(v_e_6761_);
lean_dec(v_asVar_6760_);
v___x_6770_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_6770_, 0, v_arg_6762_);
v___x_6771_ = lean_apply_2(v_inst_6763_, lean_box(0), v___x_6770_);
v___x_6772_ = lean_apply_4(v_toBind_6764_, lean_box(0), lean_box(0), v___x_6771_, v___f_6765_);
return v___x_6772_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__1___boxed(lean_object* v_arg_6773_, lean_object* v_asVar_6774_, lean_object* v_e_6775_, lean_object* v_arg_6776_, lean_object* v_inst_6777_, lean_object* v_toBind_6778_, lean_object* v___f_6779_, lean_object* v_____do__lift_6780_){
_start:
{
lean_object* v_res_6781_; 
v_res_6781_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__1(v_arg_6773_, v_asVar_6774_, v_e_6775_, v_arg_6776_, v_inst_6777_, v_toBind_6778_, v___f_6779_, v_____do__lift_6780_);
lean_dec_ref(v_____do__lift_6780_);
lean_dec_ref(v_arg_6773_);
return v_res_6781_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__3(lean_object* v_toPure_6782_, lean_object* v_inst_6783_, lean_object* v_inst_6784_, lean_object* v_inst_6785_, lean_object* v_inst_6786_, lean_object* v_inst_6787_, lean_object* v_toVar_6788_, lean_object* v_asVar_6789_, lean_object* v_arg_6790_, lean_object* v_toBind_6791_, lean_object* v_____do__lift_6792_){
_start:
{
lean_object* v___f_6793_; lean_object* v___x_6794_; lean_object* v___x_6795_; 
v___f_6793_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__4), 3, 2);
lean_closure_set(v___f_6793_, 0, v_____do__lift_6792_);
lean_closure_set(v___f_6793_, 1, v_toPure_6782_);
v___x_6794_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg(v_inst_6783_, v_inst_6784_, v_inst_6785_, v_inst_6786_, v_inst_6787_, v_toVar_6788_, v_asVar_6789_, v_arg_6790_);
v___x_6795_ = lean_apply_4(v_toBind_6791_, lean_box(0), lean_box(0), v___x_6794_, v___f_6793_);
return v___x_6795_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__0(lean_object* v_arg_6796_, lean_object* v_asVar_6797_, lean_object* v_e_6798_, lean_object* v_inst_6799_, lean_object* v_inst_6800_, lean_object* v_inst_6801_, lean_object* v_inst_6802_, lean_object* v_inst_6803_, lean_object* v_toVar_6804_, lean_object* v_arg_6805_, lean_object* v_toBind_6806_, lean_object* v___f_6807_, lean_object* v_____do__lift_6808_){
_start:
{
lean_object* v___x_6809_; uint8_t v___x_6810_; 
v___x_6809_ = l_Lean_Expr_appArg_x21(v_____do__lift_6808_);
v___x_6810_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_6809_, v_arg_6796_);
lean_dec_ref(v___x_6809_);
if (v___x_6810_ == 0)
{
lean_object* v___x_6811_; 
lean_dec(v___f_6807_);
lean_dec(v_toBind_6806_);
lean_dec_ref(v_arg_6805_);
lean_dec(v_toVar_6804_);
lean_dec_ref(v_inst_6803_);
lean_dec_ref(v_inst_6802_);
lean_dec_ref(v_inst_6801_);
lean_dec_ref(v_inst_6800_);
lean_dec(v_inst_6799_);
v___x_6811_ = lean_apply_1(v_asVar_6797_, v_e_6798_);
return v___x_6811_;
}
else
{
lean_object* v___x_6812_; lean_object* v___x_6813_; 
lean_dec_ref(v_e_6798_);
v___x_6812_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg(v_inst_6799_, v_inst_6800_, v_inst_6801_, v_inst_6802_, v_inst_6803_, v_toVar_6804_, v_asVar_6797_, v_arg_6805_);
v___x_6813_ = lean_apply_4(v_toBind_6806_, lean_box(0), lean_box(0), v___x_6812_, v___f_6807_);
return v___x_6813_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__0___boxed(lean_object* v_arg_6814_, lean_object* v_asVar_6815_, lean_object* v_e_6816_, lean_object* v_inst_6817_, lean_object* v_inst_6818_, lean_object* v_inst_6819_, lean_object* v_inst_6820_, lean_object* v_inst_6821_, lean_object* v_toVar_6822_, lean_object* v_arg_6823_, lean_object* v_toBind_6824_, lean_object* v___f_6825_, lean_object* v_____do__lift_6826_){
_start:
{
lean_object* v_res_6827_; 
v_res_6827_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__0(v_arg_6814_, v_asVar_6815_, v_e_6816_, v_inst_6817_, v_inst_6818_, v_inst_6819_, v_inst_6820_, v_inst_6821_, v_toVar_6822_, v_arg_6823_, v_toBind_6824_, v___f_6825_, v_____do__lift_6826_);
lean_dec_ref(v_____do__lift_6826_);
lean_dec_ref(v_arg_6814_);
return v_res_6827_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__6(lean_object* v_toPure_6828_, lean_object* v_arg_6829_, lean_object* v_asVar_6830_, lean_object* v_e_6831_, lean_object* v_inst_6832_, lean_object* v_inst_6833_, lean_object* v_inst_6834_, lean_object* v_inst_6835_, lean_object* v_inst_6836_, lean_object* v_toVar_6837_, lean_object* v_arg_6838_, lean_object* v_toBind_6839_, lean_object* v_____x_6840_){
_start:
{
if (lean_obj_tag(v_____x_6840_) == 1)
{
lean_object* v_val_6841_; lean_object* v___f_6842_; lean_object* v___f_6843_; lean_object* v___x_6844_; lean_object* v___x_6845_; 
v_val_6841_ = lean_ctor_get(v_____x_6840_, 0);
lean_inc(v_val_6841_);
lean_dec_ref(v_____x_6840_);
v___f_6842_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__12), 3, 2);
lean_closure_set(v___f_6842_, 0, v_val_6841_);
lean_closure_set(v___f_6842_, 1, v_toPure_6828_);
lean_inc(v_toBind_6839_);
lean_inc_ref(v_inst_6836_);
lean_inc_ref(v_inst_6835_);
lean_inc_ref(v_inst_6834_);
lean_inc_ref(v_inst_6833_);
lean_inc(v_inst_6832_);
v___f_6843_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__0___boxed), 13, 12);
lean_closure_set(v___f_6843_, 0, v_arg_6829_);
lean_closure_set(v___f_6843_, 1, v_asVar_6830_);
lean_closure_set(v___f_6843_, 2, v_e_6831_);
lean_closure_set(v___f_6843_, 3, v_inst_6832_);
lean_closure_set(v___f_6843_, 4, v_inst_6833_);
lean_closure_set(v___f_6843_, 5, v_inst_6834_);
lean_closure_set(v___f_6843_, 6, v_inst_6835_);
lean_closure_set(v___f_6843_, 7, v_inst_6836_);
lean_closure_set(v___f_6843_, 8, v_toVar_6837_);
lean_closure_set(v___f_6843_, 9, v_arg_6838_);
lean_closure_set(v___f_6843_, 10, v_toBind_6839_);
lean_closure_set(v___f_6843_, 11, v___f_6842_);
v___x_6844_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___redArg(v_inst_6832_, v_inst_6833_, v_inst_6834_, v_inst_6835_, v_inst_6836_);
v___x_6845_ = lean_apply_4(v_toBind_6839_, lean_box(0), lean_box(0), v___x_6844_, v___f_6843_);
return v___x_6845_;
}
else
{
lean_object* v___x_6846_; 
lean_dec(v_____x_6840_);
lean_dec(v_toBind_6839_);
lean_dec_ref(v_arg_6838_);
lean_dec_ref(v_inst_6836_);
lean_dec_ref(v_inst_6835_);
lean_dec_ref(v_inst_6834_);
lean_dec_ref(v_inst_6833_);
lean_dec(v_inst_6832_);
lean_dec(v_asVar_6830_);
lean_dec_ref(v_arg_6829_);
lean_dec(v_toPure_6828_);
v___x_6846_ = lean_apply_1(v_toVar_6837_, v_e_6831_);
return v___x_6846_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__4(lean_object* v_toVar_6847_, lean_object* v_e_6848_, lean_object* v_toPure_6849_, lean_object* v_inst_6850_, lean_object* v_inst_6851_, lean_object* v_inst_6852_, lean_object* v_inst_6853_, lean_object* v_inst_6854_, lean_object* v_asVar_6855_, lean_object* v_toBind_6856_, lean_object* v___f_6857_, lean_object* v___f_6858_, lean_object* v_____x_6859_){
_start:
{
lean_object* v___x_6860_; uint8_t v___x_6861_; 
v___x_6860_ = l_Lean_Expr_cleanupAnnotations(v_____x_6859_);
v___x_6861_ = l_Lean_Expr_isApp(v___x_6860_);
if (v___x_6861_ == 0)
{
lean_object* v___x_6862_; 
lean_dec_ref(v___x_6860_);
lean_dec(v___f_6858_);
lean_dec(v___f_6857_);
lean_dec(v_toBind_6856_);
lean_dec(v_asVar_6855_);
lean_dec_ref(v_inst_6854_);
lean_dec_ref(v_inst_6853_);
lean_dec_ref(v_inst_6852_);
lean_dec_ref(v_inst_6851_);
lean_dec(v_inst_6850_);
lean_dec(v_toPure_6849_);
v___x_6862_ = lean_apply_1(v_toVar_6847_, v_e_6848_);
return v___x_6862_;
}
else
{
lean_object* v_arg_6863_; lean_object* v___x_6864_; uint8_t v___x_6865_; 
v_arg_6863_ = lean_ctor_get(v___x_6860_, 1);
lean_inc_ref(v_arg_6863_);
v___x_6864_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6860_);
v___x_6865_ = l_Lean_Expr_isApp(v___x_6864_);
if (v___x_6865_ == 0)
{
lean_object* v___x_6866_; 
lean_dec_ref(v___x_6864_);
lean_dec_ref(v_arg_6863_);
lean_dec(v___f_6858_);
lean_dec(v___f_6857_);
lean_dec(v_toBind_6856_);
lean_dec(v_asVar_6855_);
lean_dec_ref(v_inst_6854_);
lean_dec_ref(v_inst_6853_);
lean_dec_ref(v_inst_6852_);
lean_dec_ref(v_inst_6851_);
lean_dec(v_inst_6850_);
lean_dec(v_toPure_6849_);
v___x_6866_ = lean_apply_1(v_toVar_6847_, v_e_6848_);
return v___x_6866_;
}
else
{
lean_object* v_arg_6867_; lean_object* v___x_6868_; uint8_t v___x_6869_; 
v_arg_6867_ = lean_ctor_get(v___x_6864_, 1);
lean_inc_ref(v_arg_6867_);
v___x_6868_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6864_);
v___x_6869_ = l_Lean_Expr_isApp(v___x_6868_);
if (v___x_6869_ == 0)
{
lean_object* v___x_6870_; 
lean_dec_ref(v___x_6868_);
lean_dec_ref(v_arg_6867_);
lean_dec_ref(v_arg_6863_);
lean_dec(v___f_6858_);
lean_dec(v___f_6857_);
lean_dec(v_toBind_6856_);
lean_dec(v_asVar_6855_);
lean_dec_ref(v_inst_6854_);
lean_dec_ref(v_inst_6853_);
lean_dec_ref(v_inst_6852_);
lean_dec_ref(v_inst_6851_);
lean_dec(v_inst_6850_);
lean_dec(v_toPure_6849_);
v___x_6870_ = lean_apply_1(v_toVar_6847_, v_e_6848_);
return v___x_6870_;
}
else
{
lean_object* v_arg_6871_; lean_object* v___x_6872_; lean_object* v___x_6873_; uint8_t v___x_6874_; 
v_arg_6871_ = lean_ctor_get(v___x_6868_, 1);
lean_inc_ref(v_arg_6871_);
v___x_6872_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6868_);
v___x_6873_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_6874_ = l_Lean_Expr_isConstOf(v___x_6872_, v___x_6873_);
if (v___x_6874_ == 0)
{
lean_object* v___x_6875_; uint8_t v___x_6876_; 
lean_dec(v___f_6858_);
v___x_6875_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_6876_ = l_Lean_Expr_isConstOf(v___x_6872_, v___x_6875_);
if (v___x_6876_ == 0)
{
uint8_t v___x_6877_; 
lean_dec(v___f_6857_);
v___x_6877_ = l_Lean_Expr_isApp(v___x_6872_);
if (v___x_6877_ == 0)
{
lean_object* v___x_6878_; 
lean_dec_ref(v___x_6872_);
lean_dec_ref(v_arg_6871_);
lean_dec_ref(v_arg_6867_);
lean_dec_ref(v_arg_6863_);
lean_dec(v_toBind_6856_);
lean_dec(v_asVar_6855_);
lean_dec_ref(v_inst_6854_);
lean_dec_ref(v_inst_6853_);
lean_dec_ref(v_inst_6852_);
lean_dec_ref(v_inst_6851_);
lean_dec(v_inst_6850_);
lean_dec(v_toPure_6849_);
v___x_6878_ = lean_apply_1(v_toVar_6847_, v_e_6848_);
return v___x_6878_;
}
else
{
lean_object* v___x_6879_; uint8_t v___x_6880_; 
v___x_6879_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6872_);
v___x_6880_ = l_Lean_Expr_isApp(v___x_6879_);
if (v___x_6880_ == 0)
{
lean_object* v___x_6881_; 
lean_dec_ref(v___x_6879_);
lean_dec_ref(v_arg_6871_);
lean_dec_ref(v_arg_6867_);
lean_dec_ref(v_arg_6863_);
lean_dec(v_toBind_6856_);
lean_dec(v_asVar_6855_);
lean_dec_ref(v_inst_6854_);
lean_dec_ref(v_inst_6853_);
lean_dec_ref(v_inst_6852_);
lean_dec_ref(v_inst_6851_);
lean_dec(v_inst_6850_);
lean_dec(v_toPure_6849_);
v___x_6881_ = lean_apply_1(v_toVar_6847_, v_e_6848_);
return v___x_6881_;
}
else
{
lean_object* v___x_6882_; uint8_t v___x_6883_; 
v___x_6882_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6879_);
v___x_6883_ = l_Lean_Expr_isApp(v___x_6882_);
if (v___x_6883_ == 0)
{
lean_object* v___x_6884_; 
lean_dec_ref(v___x_6882_);
lean_dec_ref(v_arg_6871_);
lean_dec_ref(v_arg_6867_);
lean_dec_ref(v_arg_6863_);
lean_dec(v_toBind_6856_);
lean_dec(v_asVar_6855_);
lean_dec_ref(v_inst_6854_);
lean_dec_ref(v_inst_6853_);
lean_dec_ref(v_inst_6852_);
lean_dec_ref(v_inst_6851_);
lean_dec(v_inst_6850_);
lean_dec(v_toPure_6849_);
v___x_6884_ = lean_apply_1(v_toVar_6847_, v_e_6848_);
return v___x_6884_;
}
else
{
lean_object* v___x_6885_; lean_object* v___x_6886_; uint8_t v___x_6887_; 
v___x_6885_ = l_Lean_Expr_appFnCleanup___redArg(v___x_6882_);
v___x_6886_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_6887_ = l_Lean_Expr_isConstOf(v___x_6885_, v___x_6886_);
if (v___x_6887_ == 0)
{
lean_object* v___x_6888_; uint8_t v___x_6889_; 
v___x_6888_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_6889_ = l_Lean_Expr_isConstOf(v___x_6885_, v___x_6888_);
if (v___x_6889_ == 0)
{
lean_object* v___x_6890_; uint8_t v___x_6891_; 
v___x_6890_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_6891_ = l_Lean_Expr_isConstOf(v___x_6885_, v___x_6890_);
lean_dec_ref(v___x_6885_);
if (v___x_6891_ == 0)
{
lean_object* v___x_6892_; 
lean_dec_ref(v_arg_6871_);
lean_dec_ref(v_arg_6867_);
lean_dec_ref(v_arg_6863_);
lean_dec(v_toBind_6856_);
lean_dec(v_asVar_6855_);
lean_dec_ref(v_inst_6854_);
lean_dec_ref(v_inst_6853_);
lean_dec_ref(v_inst_6852_);
lean_dec_ref(v_inst_6851_);
lean_dec(v_inst_6850_);
lean_dec(v_toPure_6849_);
v___x_6892_ = lean_apply_1(v_toVar_6847_, v_e_6848_);
return v___x_6892_;
}
else
{
lean_object* v___f_6893_; lean_object* v___f_6894_; lean_object* v___x_6895_; lean_object* v___x_6896_; 
lean_inc(v_toBind_6856_);
lean_inc(v_asVar_6855_);
lean_inc(v_toVar_6847_);
lean_inc_ref(v_inst_6854_);
lean_inc_ref(v_inst_6853_);
lean_inc_ref(v_inst_6852_);
lean_inc_ref(v_inst_6851_);
lean_inc(v_inst_6850_);
v___f_6893_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__3), 11, 10);
lean_closure_set(v___f_6893_, 0, v_toPure_6849_);
lean_closure_set(v___f_6893_, 1, v_inst_6850_);
lean_closure_set(v___f_6893_, 2, v_inst_6851_);
lean_closure_set(v___f_6893_, 3, v_inst_6852_);
lean_closure_set(v___f_6893_, 4, v_inst_6853_);
lean_closure_set(v___f_6893_, 5, v_inst_6854_);
lean_closure_set(v___f_6893_, 6, v_toVar_6847_);
lean_closure_set(v___f_6893_, 7, v_asVar_6855_);
lean_closure_set(v___f_6893_, 8, v_arg_6863_);
lean_closure_set(v___f_6893_, 9, v_toBind_6856_);
lean_inc(v_toBind_6856_);
lean_inc_ref(v_inst_6854_);
lean_inc_ref(v_inst_6853_);
lean_inc_ref(v_inst_6852_);
lean_inc_ref(v_inst_6851_);
lean_inc(v_inst_6850_);
v___f_6894_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__0___boxed), 13, 12);
lean_closure_set(v___f_6894_, 0, v_arg_6871_);
lean_closure_set(v___f_6894_, 1, v_asVar_6855_);
lean_closure_set(v___f_6894_, 2, v_e_6848_);
lean_closure_set(v___f_6894_, 3, v_inst_6850_);
lean_closure_set(v___f_6894_, 4, v_inst_6851_);
lean_closure_set(v___f_6894_, 5, v_inst_6852_);
lean_closure_set(v___f_6894_, 6, v_inst_6853_);
lean_closure_set(v___f_6894_, 7, v_inst_6854_);
lean_closure_set(v___f_6894_, 8, v_toVar_6847_);
lean_closure_set(v___f_6894_, 9, v_arg_6867_);
lean_closure_set(v___f_6894_, 10, v_toBind_6856_);
lean_closure_set(v___f_6894_, 11, v___f_6893_);
v___x_6895_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___redArg(v_inst_6850_, v_inst_6851_, v_inst_6852_, v_inst_6853_, v_inst_6854_);
v___x_6896_ = lean_apply_4(v_toBind_6856_, lean_box(0), lean_box(0), v___x_6895_, v___f_6894_);
return v___x_6896_;
}
}
else
{
lean_object* v___f_6897_; lean_object* v___f_6898_; lean_object* v___x_6899_; lean_object* v___x_6900_; 
lean_dec_ref(v___x_6885_);
lean_inc(v_toBind_6856_);
lean_inc(v_asVar_6855_);
lean_inc(v_toVar_6847_);
lean_inc_ref(v_inst_6854_);
lean_inc_ref(v_inst_6853_);
lean_inc_ref(v_inst_6852_);
lean_inc_ref(v_inst_6851_);
lean_inc(v_inst_6850_);
v___f_6897_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__2), 11, 10);
lean_closure_set(v___f_6897_, 0, v_toPure_6849_);
lean_closure_set(v___f_6897_, 1, v_inst_6850_);
lean_closure_set(v___f_6897_, 2, v_inst_6851_);
lean_closure_set(v___f_6897_, 3, v_inst_6852_);
lean_closure_set(v___f_6897_, 4, v_inst_6853_);
lean_closure_set(v___f_6897_, 5, v_inst_6854_);
lean_closure_set(v___f_6897_, 6, v_toVar_6847_);
lean_closure_set(v___f_6897_, 7, v_asVar_6855_);
lean_closure_set(v___f_6897_, 8, v_arg_6863_);
lean_closure_set(v___f_6897_, 9, v_toBind_6856_);
lean_inc(v_toBind_6856_);
lean_inc_ref(v_inst_6854_);
lean_inc_ref(v_inst_6853_);
lean_inc_ref(v_inst_6852_);
lean_inc_ref(v_inst_6851_);
lean_inc(v_inst_6850_);
v___f_6898_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__0___boxed), 13, 12);
lean_closure_set(v___f_6898_, 0, v_arg_6871_);
lean_closure_set(v___f_6898_, 1, v_asVar_6855_);
lean_closure_set(v___f_6898_, 2, v_e_6848_);
lean_closure_set(v___f_6898_, 3, v_inst_6850_);
lean_closure_set(v___f_6898_, 4, v_inst_6851_);
lean_closure_set(v___f_6898_, 5, v_inst_6852_);
lean_closure_set(v___f_6898_, 6, v_inst_6853_);
lean_closure_set(v___f_6898_, 7, v_inst_6854_);
lean_closure_set(v___f_6898_, 8, v_toVar_6847_);
lean_closure_set(v___f_6898_, 9, v_arg_6867_);
lean_closure_set(v___f_6898_, 10, v_toBind_6856_);
lean_closure_set(v___f_6898_, 11, v___f_6897_);
v___x_6899_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___redArg(v_inst_6850_, v_inst_6851_, v_inst_6852_, v_inst_6853_, v_inst_6854_);
v___x_6900_ = lean_apply_4(v_toBind_6856_, lean_box(0), lean_box(0), v___x_6899_, v___f_6898_);
return v___x_6900_;
}
}
else
{
lean_object* v___f_6901_; lean_object* v___x_6902_; lean_object* v___x_6903_; lean_object* v___x_6904_; 
lean_dec_ref(v___x_6885_);
lean_inc(v_toBind_6856_);
lean_inc(v_inst_6850_);
v___f_6901_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__6), 13, 12);
lean_closure_set(v___f_6901_, 0, v_toPure_6849_);
lean_closure_set(v___f_6901_, 1, v_arg_6871_);
lean_closure_set(v___f_6901_, 2, v_asVar_6855_);
lean_closure_set(v___f_6901_, 3, v_e_6848_);
lean_closure_set(v___f_6901_, 4, v_inst_6850_);
lean_closure_set(v___f_6901_, 5, v_inst_6851_);
lean_closure_set(v___f_6901_, 6, v_inst_6852_);
lean_closure_set(v___f_6901_, 7, v_inst_6853_);
lean_closure_set(v___f_6901_, 8, v_inst_6854_);
lean_closure_set(v___f_6901_, 9, v_toVar_6847_);
lean_closure_set(v___f_6901_, 10, v_arg_6867_);
lean_closure_set(v___f_6901_, 11, v_toBind_6856_);
v___x_6902_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_6902_, 0, v_arg_6863_);
v___x_6903_ = lean_apply_2(v_inst_6850_, lean_box(0), v___x_6902_);
v___x_6904_ = lean_apply_4(v_toBind_6856_, lean_box(0), lean_box(0), v___x_6903_, v___f_6901_);
return v___x_6904_;
}
}
}
}
}
else
{
lean_object* v___f_6905_; lean_object* v___x_6906_; lean_object* v___x_6907_; 
lean_dec_ref(v___x_6872_);
lean_dec_ref(v_arg_6871_);
lean_dec_ref(v_inst_6851_);
lean_dec(v_toPure_6849_);
lean_dec(v_toVar_6847_);
lean_inc(v_toBind_6856_);
lean_inc(v_inst_6850_);
v___f_6905_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__1___boxed), 8, 7);
lean_closure_set(v___f_6905_, 0, v_arg_6867_);
lean_closure_set(v___f_6905_, 1, v_asVar_6855_);
lean_closure_set(v___f_6905_, 2, v_e_6848_);
lean_closure_set(v___f_6905_, 3, v_arg_6863_);
lean_closure_set(v___f_6905_, 4, v_inst_6850_);
lean_closure_set(v___f_6905_, 5, v_toBind_6856_);
lean_closure_set(v___f_6905_, 6, v___f_6857_);
v___x_6906_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___redArg(v_inst_6850_, v_inst_6852_, v_inst_6853_, v_inst_6854_);
v___x_6907_ = lean_apply_4(v_toBind_6856_, lean_box(0), lean_box(0), v___x_6906_, v___f_6905_);
return v___x_6907_;
}
}
else
{
lean_object* v___x_6908_; lean_object* v___x_6909_; lean_object* v___x_6910_; 
lean_dec_ref(v___x_6872_);
lean_dec_ref(v_arg_6871_);
lean_dec_ref(v_arg_6863_);
lean_dec(v___f_6857_);
lean_dec(v_asVar_6855_);
lean_dec_ref(v_inst_6854_);
lean_dec_ref(v_inst_6853_);
lean_dec_ref(v_inst_6852_);
lean_dec_ref(v_inst_6851_);
lean_dec(v_toPure_6849_);
lean_dec_ref(v_e_6848_);
lean_dec(v_toVar_6847_);
v___x_6908_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_6908_, 0, v_arg_6867_);
v___x_6909_ = lean_apply_2(v_inst_6850_, lean_box(0), v___x_6908_);
v___x_6910_ = lean_apply_4(v_toBind_6856_, lean_box(0), lean_box(0), v___x_6909_, v___f_6858_);
return v___x_6910_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg(lean_object* v_inst_6911_, lean_object* v_inst_6912_, lean_object* v_inst_6913_, lean_object* v_inst_6914_, lean_object* v_inst_6915_, lean_object* v_toVar_6916_, lean_object* v_asVar_6917_, lean_object* v_e_6918_){
_start:
{
lean_object* v_toApplicative_6919_; lean_object* v_toBind_6920_; lean_object* v_toPure_6921_; lean_object* v___x_6922_; lean_object* v___x_6923_; lean_object* v___f_6924_; lean_object* v___f_6925_; lean_object* v___x_6926_; 
v_toApplicative_6919_ = lean_ctor_get(v_inst_6913_, 0);
v_toBind_6920_ = lean_ctor_get(v_inst_6913_, 1);
lean_inc(v_toBind_6920_);
v_toPure_6921_ = lean_ctor_get(v_toApplicative_6919_, 1);
lean_inc(v_toPure_6921_);
lean_inc_ref(v_e_6918_);
v___x_6922_ = lean_alloc_closure((void*)(l_Lean_Meta_instantiateMVarsIfMVarApp___boxed), 6, 1);
lean_closure_set(v___x_6922_, 0, v_e_6918_);
lean_inc(v_inst_6911_);
v___x_6923_ = lean_apply_2(v_inst_6911_, lean_box(0), v___x_6922_);
lean_inc_ref(v_e_6918_);
lean_inc(v_toVar_6916_);
lean_inc(v_toPure_6921_);
v___f_6924_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__3), 4, 3);
lean_closure_set(v___f_6924_, 0, v_toPure_6921_);
lean_closure_set(v___f_6924_, 1, v_toVar_6916_);
lean_closure_set(v___f_6924_, 2, v_e_6918_);
lean_inc_ref(v___f_6924_);
lean_inc(v_toBind_6920_);
v___f_6925_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__4), 13, 12);
lean_closure_set(v___f_6925_, 0, v_toVar_6916_);
lean_closure_set(v___f_6925_, 1, v_e_6918_);
lean_closure_set(v___f_6925_, 2, v_toPure_6921_);
lean_closure_set(v___f_6925_, 3, v_inst_6911_);
lean_closure_set(v___f_6925_, 4, v_inst_6912_);
lean_closure_set(v___f_6925_, 5, v_inst_6913_);
lean_closure_set(v___f_6925_, 6, v_inst_6914_);
lean_closure_set(v___f_6925_, 7, v_inst_6915_);
lean_closure_set(v___f_6925_, 8, v_asVar_6917_);
lean_closure_set(v___f_6925_, 9, v_toBind_6920_);
lean_closure_set(v___f_6925_, 10, v___f_6924_);
lean_closure_set(v___f_6925_, 11, v___f_6924_);
v___x_6926_ = lean_apply_4(v_toBind_6920_, lean_box(0), lean_box(0), v___x_6923_, v___f_6925_);
return v___x_6926_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg___lam__2(lean_object* v_toPure_6927_, lean_object* v_inst_6928_, lean_object* v_inst_6929_, lean_object* v_inst_6930_, lean_object* v_inst_6931_, lean_object* v_inst_6932_, lean_object* v_toVar_6933_, lean_object* v_asVar_6934_, lean_object* v_arg_6935_, lean_object* v_toBind_6936_, lean_object* v_____do__lift_6937_){
_start:
{
lean_object* v___f_6938_; lean_object* v___x_6939_; lean_object* v___x_6940_; 
v___f_6938_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__7), 3, 2);
lean_closure_set(v___f_6938_, 0, v_____do__lift_6937_);
lean_closure_set(v___f_6938_, 1, v_toPure_6927_);
v___x_6939_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg(v_inst_6928_, v_inst_6929_, v_inst_6930_, v_inst_6931_, v_inst_6932_, v_toVar_6933_, v_asVar_6934_, v_arg_6935_);
v___x_6940_ = lean_apply_4(v_toBind_6936_, lean_box(0), lean_box(0), v___x_6939_, v___f_6938_);
return v___x_6940_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go(lean_object* v_m_6941_, lean_object* v_inst_6942_, lean_object* v_inst_6943_, lean_object* v_inst_6944_, lean_object* v_inst_6945_, lean_object* v_inst_6946_, lean_object* v_toVar_6947_, lean_object* v_asVar_6948_, lean_object* v_e_6949_){
_start:
{
lean_object* v___x_6950_; 
v___x_6950_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg(v_inst_6942_, v_inst_6943_, v_inst_6944_, v_inst_6945_, v_inst_6946_, v_toVar_6947_, v_asVar_6948_, v_e_6949_);
return v___x_6950_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__0(lean_object* v_inst_6951_, lean_object* v_inst_6952_, lean_object* v_inst_6953_, lean_object* v_inst_6954_, lean_object* v_e_6955_, lean_object* v_____r_6956_){
_start:
{
lean_object* v___x_6957_; 
v___x_6957_ = l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___redArg(v_inst_6951_, v_inst_6952_, v_inst_6953_, v_inst_6954_, v_e_6955_);
return v___x_6957_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__1(lean_object* v_e_6958_, lean_object* v_inst_6959_, lean_object* v_toBind_6960_, lean_object* v___f_6961_, lean_object* v_inst_6962_, lean_object* v_inst_6963_, lean_object* v_inst_6964_, uint8_t v_____do__lift_6965_){
_start:
{
if (v_____do__lift_6965_ == 0)
{
lean_object* v___x_6966_; lean_object* v___x_6967_; lean_object* v___x_6968_; lean_object* v___x_6969_; lean_object* v___x_6970_; 
lean_dec(v_inst_6964_);
lean_dec_ref(v_inst_6963_);
lean_dec_ref(v_inst_6962_);
v___x_6966_ = lean_unsigned_to_nat(0u);
v___x_6967_ = lean_box(0);
v___x_6968_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_internalize___boxed), 14, 3);
lean_closure_set(v___x_6968_, 0, v_e_6958_);
lean_closure_set(v___x_6968_, 1, v___x_6966_);
lean_closure_set(v___x_6968_, 2, v___x_6967_);
v___x_6969_ = lean_apply_2(v_inst_6959_, lean_box(0), v___x_6968_);
v___x_6970_ = lean_apply_4(v_toBind_6960_, lean_box(0), lean_box(0), v___x_6969_, v___f_6961_);
return v___x_6970_;
}
else
{
lean_object* v___x_6971_; 
lean_dec(v___f_6961_);
lean_dec(v_toBind_6960_);
v___x_6971_ = l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___redArg(v_inst_6959_, v_inst_6962_, v_inst_6963_, v_inst_6964_, v_e_6958_);
return v___x_6971_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__1___boxed(lean_object* v_e_6972_, lean_object* v_inst_6973_, lean_object* v_toBind_6974_, lean_object* v___f_6975_, lean_object* v_inst_6976_, lean_object* v_inst_6977_, lean_object* v_inst_6978_, lean_object* v_____do__lift_6979_){
_start:
{
uint8_t v_____do__lift_3433__boxed_6980_; lean_object* v_res_6981_; 
v_____do__lift_3433__boxed_6980_ = lean_unbox(v_____do__lift_6979_);
v_res_6981_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__1(v_e_6972_, v_inst_6973_, v_toBind_6974_, v___f_6975_, v_inst_6976_, v_inst_6977_, v_inst_6978_, v_____do__lift_3433__boxed_6980_);
return v_res_6981_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__2(lean_object* v_inst_6982_, lean_object* v_inst_6983_, lean_object* v_inst_6984_, lean_object* v_inst_6985_, lean_object* v_toBind_6986_, lean_object* v_e_6987_){
_start:
{
lean_object* v___f_6988_; lean_object* v___f_6989_; lean_object* v___x_6990_; lean_object* v___x_6991_; lean_object* v___x_6992_; 
lean_inc_ref(v_e_6987_);
lean_inc(v_inst_6985_);
lean_inc_ref(v_inst_6984_);
lean_inc_ref(v_inst_6983_);
lean_inc(v_inst_6982_);
v___f_6988_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__0), 6, 5);
lean_closure_set(v___f_6988_, 0, v_inst_6982_);
lean_closure_set(v___f_6988_, 1, v_inst_6983_);
lean_closure_set(v___f_6988_, 2, v_inst_6984_);
lean_closure_set(v___f_6988_, 3, v_inst_6985_);
lean_closure_set(v___f_6988_, 4, v_e_6987_);
lean_inc(v_toBind_6986_);
lean_inc(v_inst_6982_);
lean_inc_ref(v_e_6987_);
v___f_6989_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__1___boxed), 8, 7);
lean_closure_set(v___f_6989_, 0, v_e_6987_);
lean_closure_set(v___f_6989_, 1, v_inst_6982_);
lean_closure_set(v___f_6989_, 2, v_toBind_6986_);
lean_closure_set(v___f_6989_, 3, v___f_6988_);
lean_closure_set(v___f_6989_, 4, v_inst_6983_);
lean_closure_set(v___f_6989_, 5, v_inst_6984_);
lean_closure_set(v___f_6989_, 6, v_inst_6985_);
v___x_6990_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_alreadyInternalized___boxed), 12, 1);
lean_closure_set(v___x_6990_, 0, v_e_6987_);
v___x_6991_ = lean_apply_2(v_inst_6982_, lean_box(0), v___x_6990_);
v___x_6992_ = lean_apply_4(v_toBind_6986_, lean_box(0), lean_box(0), v___x_6991_, v___f_6989_);
return v___x_6992_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__6(lean_object* v_mkVar_6993_, lean_object* v_toBind_6994_, lean_object* v___f_6995_, lean_object* v_inst_6996_, lean_object* v_e_6997_){
_start:
{
lean_object* v___f_6998_; lean_object* v___x_6999_; lean_object* v___x_7000_; lean_object* v___x_7001_; 
lean_inc(v_toBind_6994_);
lean_inc_ref(v_e_6997_);
v___f_6998_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__6), 5, 4);
lean_closure_set(v___f_6998_, 0, v_mkVar_6993_);
lean_closure_set(v___f_6998_, 1, v_e_6997_);
lean_closure_set(v___f_6998_, 2, v_toBind_6994_);
lean_closure_set(v___f_6998_, 3, v___f_6995_);
v___x_6999_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___boxed), 12, 1);
lean_closure_set(v___x_6999_, 0, v_e_6997_);
v___x_7000_ = lean_apply_2(v_inst_6996_, lean_box(0), v___x_6999_);
v___x_7001_ = lean_apply_4(v_toBind_6994_, lean_box(0), lean_box(0), v___x_7000_, v___f_6998_);
return v___x_7001_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__5(lean_object* v_toVar_7002_, lean_object* v_toBind_7003_, lean_object* v___f_7004_, lean_object* v_e_7005_){
_start:
{
lean_object* v___x_7006_; lean_object* v___x_7007_; 
v___x_7006_ = lean_apply_1(v_toVar_7002_, v_e_7005_);
v___x_7007_ = lean_apply_4(v_toBind_7003_, lean_box(0), lean_box(0), v___x_7006_, v___f_7004_);
return v___x_7007_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__3(lean_object* v_toPure_7008_, lean_object* v_toTopVar_7009_, lean_object* v_e_7010_, lean_object* v_____x_7011_){
_start:
{
if (lean_obj_tag(v_____x_7011_) == 1)
{
lean_object* v_val_7012_; lean_object* v___x_7014_; uint8_t v_isShared_7015_; uint8_t v_isSharedCheck_7022_; 
lean_dec_ref(v_e_7010_);
lean_dec(v_toTopVar_7009_);
v_val_7012_ = lean_ctor_get(v_____x_7011_, 0);
v_isSharedCheck_7022_ = !lean_is_exclusive(v_____x_7011_);
if (v_isSharedCheck_7022_ == 0)
{
v___x_7014_ = v_____x_7011_;
v_isShared_7015_ = v_isSharedCheck_7022_;
goto v_resetjp_7013_;
}
else
{
lean_inc(v_val_7012_);
lean_dec(v_____x_7011_);
v___x_7014_ = lean_box(0);
v_isShared_7015_ = v_isSharedCheck_7022_;
goto v_resetjp_7013_;
}
v_resetjp_7013_:
{
lean_object* v___x_7016_; lean_object* v___x_7017_; lean_object* v___x_7019_; 
v___x_7016_ = lean_nat_to_int(v_val_7012_);
v___x_7017_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_7017_, 0, v___x_7016_);
if (v_isShared_7015_ == 0)
{
lean_ctor_set(v___x_7014_, 0, v___x_7017_);
v___x_7019_ = v___x_7014_;
goto v_reusejp_7018_;
}
else
{
lean_object* v_reuseFailAlloc_7021_; 
v_reuseFailAlloc_7021_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7021_, 0, v___x_7017_);
v___x_7019_ = v_reuseFailAlloc_7021_;
goto v_reusejp_7018_;
}
v_reusejp_7018_:
{
lean_object* v___x_7020_; 
v___x_7020_ = lean_apply_2(v_toPure_7008_, lean_box(0), v___x_7019_);
return v___x_7020_;
}
}
}
else
{
lean_object* v___x_7023_; 
lean_dec(v_____x_7011_);
lean_dec(v_toPure_7008_);
v___x_7023_ = lean_apply_1(v_toTopVar_7009_, v_e_7010_);
return v___x_7023_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__7(lean_object* v_toTopVar_7024_, lean_object* v_inst_7025_, lean_object* v_toBind_7026_, lean_object* v_e_7027_){
_start:
{
lean_object* v___f_7028_; lean_object* v___x_7029_; lean_object* v___x_7030_; lean_object* v___x_7031_; 
lean_inc_ref(v_e_7027_);
v___f_7028_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__12), 3, 2);
lean_closure_set(v___f_7028_, 0, v_toTopVar_7024_);
lean_closure_set(v___f_7028_, 1, v_e_7027_);
v___x_7029_ = lean_alloc_closure((void*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___boxed), 12, 1);
lean_closure_set(v___x_7029_, 0, v_e_7027_);
v___x_7030_ = lean_apply_2(v_inst_7025_, lean_box(0), v___x_7029_);
v___x_7031_ = lean_apply_4(v_toBind_7026_, lean_box(0), lean_box(0), v___x_7030_, v___f_7028_);
return v___x_7031_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__9(lean_object* v_toPure_7032_, lean_object* v_inst_7033_, lean_object* v_inst_7034_, lean_object* v_inst_7035_, lean_object* v_inst_7036_, lean_object* v_inst_7037_, lean_object* v_toVar_7038_, lean_object* v_asVar_7039_, lean_object* v_arg_7040_, lean_object* v_toBind_7041_, lean_object* v_____do__lift_7042_){
_start:
{
lean_object* v___f_7043_; lean_object* v___x_7044_; lean_object* v___x_7045_; 
v___f_7043_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__15), 3, 2);
lean_closure_set(v___f_7043_, 0, v_____do__lift_7042_);
lean_closure_set(v___f_7043_, 1, v_toPure_7032_);
v___x_7044_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg(v_inst_7033_, v_inst_7034_, v_inst_7035_, v_inst_7036_, v_inst_7037_, v_toVar_7038_, v_asVar_7039_, v_arg_7040_);
v___x_7045_ = lean_apply_4(v_toBind_7041_, lean_box(0), lean_box(0), v___x_7044_, v___f_7043_);
return v___x_7045_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__4(lean_object* v_arg_7046_, lean_object* v_asTopVar_7047_, lean_object* v_e_7048_, lean_object* v_inst_7049_, lean_object* v_inst_7050_, lean_object* v_inst_7051_, lean_object* v_inst_7052_, lean_object* v_inst_7053_, lean_object* v_toVar_7054_, lean_object* v_asVar_7055_, lean_object* v_arg_7056_, lean_object* v_toBind_7057_, lean_object* v___f_7058_, lean_object* v_____do__lift_7059_){
_start:
{
lean_object* v___x_7060_; uint8_t v___x_7061_; 
v___x_7060_ = l_Lean_Expr_appArg_x21(v_____do__lift_7059_);
v___x_7061_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_7060_, v_arg_7046_);
lean_dec_ref(v___x_7060_);
if (v___x_7061_ == 0)
{
lean_object* v___x_7062_; 
lean_dec(v___f_7058_);
lean_dec(v_toBind_7057_);
lean_dec_ref(v_arg_7056_);
lean_dec(v_asVar_7055_);
lean_dec(v_toVar_7054_);
lean_dec_ref(v_inst_7053_);
lean_dec_ref(v_inst_7052_);
lean_dec_ref(v_inst_7051_);
lean_dec_ref(v_inst_7050_);
lean_dec(v_inst_7049_);
v___x_7062_ = lean_apply_1(v_asTopVar_7047_, v_e_7048_);
return v___x_7062_;
}
else
{
lean_object* v___x_7063_; lean_object* v___x_7064_; 
lean_dec_ref(v_e_7048_);
lean_dec(v_asTopVar_7047_);
v___x_7063_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg(v_inst_7049_, v_inst_7050_, v_inst_7051_, v_inst_7052_, v_inst_7053_, v_toVar_7054_, v_asVar_7055_, v_arg_7056_);
v___x_7064_ = lean_apply_4(v_toBind_7057_, lean_box(0), lean_box(0), v___x_7063_, v___f_7058_);
return v___x_7064_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__4___boxed(lean_object* v_arg_7065_, lean_object* v_asTopVar_7066_, lean_object* v_e_7067_, lean_object* v_inst_7068_, lean_object* v_inst_7069_, lean_object* v_inst_7070_, lean_object* v_inst_7071_, lean_object* v_inst_7072_, lean_object* v_toVar_7073_, lean_object* v_asVar_7074_, lean_object* v_arg_7075_, lean_object* v_toBind_7076_, lean_object* v___f_7077_, lean_object* v_____do__lift_7078_){
_start:
{
lean_object* v_res_7079_; 
v_res_7079_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__4(v_arg_7065_, v_asTopVar_7066_, v_e_7067_, v_inst_7068_, v_inst_7069_, v_inst_7070_, v_inst_7071_, v_inst_7072_, v_toVar_7073_, v_asVar_7074_, v_arg_7075_, v_toBind_7076_, v___f_7077_, v_____do__lift_7078_);
lean_dec_ref(v_____do__lift_7078_);
lean_dec_ref(v_arg_7065_);
return v_res_7079_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__10(lean_object* v_toPure_7080_, lean_object* v_inst_7081_, lean_object* v_inst_7082_, lean_object* v_inst_7083_, lean_object* v_inst_7084_, lean_object* v_inst_7085_, lean_object* v_toVar_7086_, lean_object* v_asVar_7087_, lean_object* v_arg_7088_, lean_object* v_toBind_7089_, lean_object* v_____do__lift_7090_){
_start:
{
lean_object* v___f_7091_; lean_object* v___x_7092_; lean_object* v___x_7093_; 
v___f_7091_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__18), 3, 2);
lean_closure_set(v___f_7091_, 0, v_____do__lift_7090_);
lean_closure_set(v___f_7091_, 1, v_toPure_7080_);
v___x_7092_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___redArg(v_inst_7081_, v_inst_7082_, v_inst_7083_, v_inst_7084_, v_inst_7085_, v_toVar_7086_, v_asVar_7087_, v_arg_7088_);
v___x_7093_ = lean_apply_4(v_toBind_7089_, lean_box(0), lean_box(0), v___x_7092_, v___f_7091_);
return v___x_7093_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__13(lean_object* v_toPure_7094_, lean_object* v_arg_7095_, lean_object* v_asTopVar_7096_, lean_object* v_e_7097_, lean_object* v_inst_7098_, lean_object* v_inst_7099_, lean_object* v_inst_7100_, lean_object* v_inst_7101_, lean_object* v_inst_7102_, lean_object* v_toVar_7103_, lean_object* v_asVar_7104_, lean_object* v_arg_7105_, lean_object* v_toBind_7106_, lean_object* v_____x_7107_){
_start:
{
if (lean_obj_tag(v_____x_7107_) == 1)
{
lean_object* v_val_7108_; lean_object* v___f_7109_; lean_object* v___f_7110_; lean_object* v___x_7111_; lean_object* v___x_7112_; 
v_val_7108_ = lean_ctor_get(v_____x_7107_, 0);
lean_inc(v_val_7108_);
lean_dec_ref(v_____x_7107_);
v___f_7109_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__23), 3, 2);
lean_closure_set(v___f_7109_, 0, v_val_7108_);
lean_closure_set(v___f_7109_, 1, v_toPure_7094_);
lean_inc(v_toBind_7106_);
lean_inc_ref(v_inst_7102_);
lean_inc_ref(v_inst_7101_);
lean_inc_ref(v_inst_7100_);
lean_inc_ref(v_inst_7099_);
lean_inc(v_inst_7098_);
v___f_7110_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__4___boxed), 14, 13);
lean_closure_set(v___f_7110_, 0, v_arg_7095_);
lean_closure_set(v___f_7110_, 1, v_asTopVar_7096_);
lean_closure_set(v___f_7110_, 2, v_e_7097_);
lean_closure_set(v___f_7110_, 3, v_inst_7098_);
lean_closure_set(v___f_7110_, 4, v_inst_7099_);
lean_closure_set(v___f_7110_, 5, v_inst_7100_);
lean_closure_set(v___f_7110_, 6, v_inst_7101_);
lean_closure_set(v___f_7110_, 7, v_inst_7102_);
lean_closure_set(v___f_7110_, 8, v_toVar_7103_);
lean_closure_set(v___f_7110_, 9, v_asVar_7104_);
lean_closure_set(v___f_7110_, 10, v_arg_7105_);
lean_closure_set(v___f_7110_, 11, v_toBind_7106_);
lean_closure_set(v___f_7110_, 12, v___f_7109_);
v___x_7111_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___redArg(v_inst_7098_, v_inst_7099_, v_inst_7100_, v_inst_7101_, v_inst_7102_);
v___x_7112_ = lean_apply_4(v_toBind_7106_, lean_box(0), lean_box(0), v___x_7111_, v___f_7110_);
return v___x_7112_;
}
else
{
lean_object* v___x_7113_; lean_object* v___x_7114_; 
lean_dec(v_____x_7107_);
lean_dec(v_toBind_7106_);
lean_dec_ref(v_arg_7105_);
lean_dec(v_asVar_7104_);
lean_dec(v_toVar_7103_);
lean_dec_ref(v_inst_7102_);
lean_dec_ref(v_inst_7101_);
lean_dec_ref(v_inst_7100_);
lean_dec_ref(v_inst_7099_);
lean_dec(v_inst_7098_);
lean_dec_ref(v_e_7097_);
lean_dec(v_asTopVar_7096_);
lean_dec_ref(v_arg_7095_);
v___x_7113_ = lean_box(0);
v___x_7114_ = lean_apply_2(v_toPure_7094_, lean_box(0), v___x_7113_);
return v___x_7114_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__8(lean_object* v_arg_7115_, lean_object* v_asTopVar_7116_, lean_object* v_e_7117_, lean_object* v_arg_7118_, lean_object* v_inst_7119_, lean_object* v_toBind_7120_, lean_object* v___f_7121_, lean_object* v_____do__lift_7122_){
_start:
{
lean_object* v___x_7123_; uint8_t v___x_7124_; 
v___x_7123_ = l_Lean_Expr_appArg_x21(v_____do__lift_7122_);
v___x_7124_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_7123_, v_arg_7115_);
lean_dec_ref(v___x_7123_);
if (v___x_7124_ == 0)
{
lean_object* v___x_7125_; 
lean_dec(v___f_7121_);
lean_dec(v_toBind_7120_);
lean_dec(v_inst_7119_);
lean_dec_ref(v_arg_7118_);
v___x_7125_ = lean_apply_1(v_asTopVar_7116_, v_e_7117_);
return v___x_7125_;
}
else
{
lean_object* v___x_7126_; lean_object* v___x_7127_; lean_object* v___x_7128_; 
lean_dec_ref(v_e_7117_);
lean_dec(v_asTopVar_7116_);
v___x_7126_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_7126_, 0, v_arg_7118_);
v___x_7127_ = lean_apply_2(v_inst_7119_, lean_box(0), v___x_7126_);
v___x_7128_ = lean_apply_4(v_toBind_7120_, lean_box(0), lean_box(0), v___x_7127_, v___f_7121_);
return v___x_7128_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__8___boxed(lean_object* v_arg_7129_, lean_object* v_asTopVar_7130_, lean_object* v_e_7131_, lean_object* v_arg_7132_, lean_object* v_inst_7133_, lean_object* v_toBind_7134_, lean_object* v___f_7135_, lean_object* v_____do__lift_7136_){
_start:
{
lean_object* v_res_7137_; 
v_res_7137_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__8(v_arg_7129_, v_asTopVar_7130_, v_e_7131_, v_arg_7132_, v_inst_7133_, v_toBind_7134_, v___f_7135_, v_____do__lift_7136_);
lean_dec_ref(v_____do__lift_7136_);
lean_dec_ref(v_arg_7129_);
return v_res_7137_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__11(lean_object* v_toTopVar_7138_, lean_object* v_e_7139_, lean_object* v_toPure_7140_, lean_object* v_inst_7141_, lean_object* v_inst_7142_, lean_object* v_inst_7143_, lean_object* v_inst_7144_, lean_object* v_inst_7145_, lean_object* v_toVar_7146_, lean_object* v_asVar_7147_, lean_object* v_toBind_7148_, lean_object* v_asTopVar_7149_, lean_object* v___f_7150_, lean_object* v___f_7151_, lean_object* v_____x_7152_){
_start:
{
lean_object* v___x_7153_; uint8_t v___x_7154_; 
v___x_7153_ = l_Lean_Expr_cleanupAnnotations(v_____x_7152_);
v___x_7154_ = l_Lean_Expr_isApp(v___x_7153_);
if (v___x_7154_ == 0)
{
lean_object* v___x_7155_; 
lean_dec_ref(v___x_7153_);
lean_dec(v___f_7151_);
lean_dec(v___f_7150_);
lean_dec(v_asTopVar_7149_);
lean_dec(v_toBind_7148_);
lean_dec(v_asVar_7147_);
lean_dec(v_toVar_7146_);
lean_dec_ref(v_inst_7145_);
lean_dec_ref(v_inst_7144_);
lean_dec_ref(v_inst_7143_);
lean_dec_ref(v_inst_7142_);
lean_dec(v_inst_7141_);
lean_dec(v_toPure_7140_);
v___x_7155_ = lean_apply_1(v_toTopVar_7138_, v_e_7139_);
return v___x_7155_;
}
else
{
lean_object* v_arg_7156_; lean_object* v___x_7157_; uint8_t v___x_7158_; 
v_arg_7156_ = lean_ctor_get(v___x_7153_, 1);
lean_inc_ref(v_arg_7156_);
v___x_7157_ = l_Lean_Expr_appFnCleanup___redArg(v___x_7153_);
v___x_7158_ = l_Lean_Expr_isApp(v___x_7157_);
if (v___x_7158_ == 0)
{
lean_object* v___x_7159_; 
lean_dec_ref(v___x_7157_);
lean_dec_ref(v_arg_7156_);
lean_dec(v___f_7151_);
lean_dec(v___f_7150_);
lean_dec(v_asTopVar_7149_);
lean_dec(v_toBind_7148_);
lean_dec(v_asVar_7147_);
lean_dec(v_toVar_7146_);
lean_dec_ref(v_inst_7145_);
lean_dec_ref(v_inst_7144_);
lean_dec_ref(v_inst_7143_);
lean_dec_ref(v_inst_7142_);
lean_dec(v_inst_7141_);
lean_dec(v_toPure_7140_);
v___x_7159_ = lean_apply_1(v_toTopVar_7138_, v_e_7139_);
return v___x_7159_;
}
else
{
lean_object* v_arg_7160_; lean_object* v___x_7161_; uint8_t v___x_7162_; 
v_arg_7160_ = lean_ctor_get(v___x_7157_, 1);
lean_inc_ref(v_arg_7160_);
v___x_7161_ = l_Lean_Expr_appFnCleanup___redArg(v___x_7157_);
v___x_7162_ = l_Lean_Expr_isApp(v___x_7161_);
if (v___x_7162_ == 0)
{
lean_object* v___x_7163_; 
lean_dec_ref(v___x_7161_);
lean_dec_ref(v_arg_7160_);
lean_dec_ref(v_arg_7156_);
lean_dec(v___f_7151_);
lean_dec(v___f_7150_);
lean_dec(v_asTopVar_7149_);
lean_dec(v_toBind_7148_);
lean_dec(v_asVar_7147_);
lean_dec(v_toVar_7146_);
lean_dec_ref(v_inst_7145_);
lean_dec_ref(v_inst_7144_);
lean_dec_ref(v_inst_7143_);
lean_dec_ref(v_inst_7142_);
lean_dec(v_inst_7141_);
lean_dec(v_toPure_7140_);
v___x_7163_ = lean_apply_1(v_toTopVar_7138_, v_e_7139_);
return v___x_7163_;
}
else
{
lean_object* v_arg_7164_; lean_object* v___x_7165_; lean_object* v___x_7166_; uint8_t v___x_7167_; 
v_arg_7164_ = lean_ctor_get(v___x_7161_, 1);
lean_inc_ref(v_arg_7164_);
v___x_7165_ = l_Lean_Expr_appFnCleanup___redArg(v___x_7161_);
v___x_7166_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_7167_ = l_Lean_Expr_isConstOf(v___x_7165_, v___x_7166_);
if (v___x_7167_ == 0)
{
lean_object* v___x_7168_; uint8_t v___x_7169_; 
lean_dec(v___f_7151_);
v___x_7168_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_7169_ = l_Lean_Expr_isConstOf(v___x_7165_, v___x_7168_);
if (v___x_7169_ == 0)
{
uint8_t v___x_7170_; 
lean_dec(v___f_7150_);
v___x_7170_ = l_Lean_Expr_isApp(v___x_7165_);
if (v___x_7170_ == 0)
{
lean_object* v___x_7171_; 
lean_dec_ref(v___x_7165_);
lean_dec_ref(v_arg_7164_);
lean_dec_ref(v_arg_7160_);
lean_dec_ref(v_arg_7156_);
lean_dec(v_asTopVar_7149_);
lean_dec(v_toBind_7148_);
lean_dec(v_asVar_7147_);
lean_dec(v_toVar_7146_);
lean_dec_ref(v_inst_7145_);
lean_dec_ref(v_inst_7144_);
lean_dec_ref(v_inst_7143_);
lean_dec_ref(v_inst_7142_);
lean_dec(v_inst_7141_);
lean_dec(v_toPure_7140_);
v___x_7171_ = lean_apply_1(v_toTopVar_7138_, v_e_7139_);
return v___x_7171_;
}
else
{
lean_object* v___x_7172_; uint8_t v___x_7173_; 
v___x_7172_ = l_Lean_Expr_appFnCleanup___redArg(v___x_7165_);
v___x_7173_ = l_Lean_Expr_isApp(v___x_7172_);
if (v___x_7173_ == 0)
{
lean_object* v___x_7174_; 
lean_dec_ref(v___x_7172_);
lean_dec_ref(v_arg_7164_);
lean_dec_ref(v_arg_7160_);
lean_dec_ref(v_arg_7156_);
lean_dec(v_asTopVar_7149_);
lean_dec(v_toBind_7148_);
lean_dec(v_asVar_7147_);
lean_dec(v_toVar_7146_);
lean_dec_ref(v_inst_7145_);
lean_dec_ref(v_inst_7144_);
lean_dec_ref(v_inst_7143_);
lean_dec_ref(v_inst_7142_);
lean_dec(v_inst_7141_);
lean_dec(v_toPure_7140_);
v___x_7174_ = lean_apply_1(v_toTopVar_7138_, v_e_7139_);
return v___x_7174_;
}
else
{
lean_object* v___x_7175_; uint8_t v___x_7176_; 
v___x_7175_ = l_Lean_Expr_appFnCleanup___redArg(v___x_7172_);
v___x_7176_ = l_Lean_Expr_isApp(v___x_7175_);
if (v___x_7176_ == 0)
{
lean_object* v___x_7177_; 
lean_dec_ref(v___x_7175_);
lean_dec_ref(v_arg_7164_);
lean_dec_ref(v_arg_7160_);
lean_dec_ref(v_arg_7156_);
lean_dec(v_asTopVar_7149_);
lean_dec(v_toBind_7148_);
lean_dec(v_asVar_7147_);
lean_dec(v_toVar_7146_);
lean_dec_ref(v_inst_7145_);
lean_dec_ref(v_inst_7144_);
lean_dec_ref(v_inst_7143_);
lean_dec_ref(v_inst_7142_);
lean_dec(v_inst_7141_);
lean_dec(v_toPure_7140_);
v___x_7177_ = lean_apply_1(v_toTopVar_7138_, v_e_7139_);
return v___x_7177_;
}
else
{
lean_object* v___x_7178_; lean_object* v___x_7179_; uint8_t v___x_7180_; 
v___x_7178_ = l_Lean_Expr_appFnCleanup___redArg(v___x_7175_);
v___x_7179_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_7180_ = l_Lean_Expr_isConstOf(v___x_7178_, v___x_7179_);
if (v___x_7180_ == 0)
{
lean_object* v___x_7181_; uint8_t v___x_7182_; 
v___x_7181_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_7182_ = l_Lean_Expr_isConstOf(v___x_7178_, v___x_7181_);
if (v___x_7182_ == 0)
{
lean_object* v___x_7183_; uint8_t v___x_7184_; 
v___x_7183_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_7184_ = l_Lean_Expr_isConstOf(v___x_7178_, v___x_7183_);
lean_dec_ref(v___x_7178_);
if (v___x_7184_ == 0)
{
lean_object* v___x_7185_; 
lean_dec_ref(v_arg_7164_);
lean_dec_ref(v_arg_7160_);
lean_dec_ref(v_arg_7156_);
lean_dec(v_asTopVar_7149_);
lean_dec(v_toBind_7148_);
lean_dec(v_asVar_7147_);
lean_dec(v_toVar_7146_);
lean_dec_ref(v_inst_7145_);
lean_dec_ref(v_inst_7144_);
lean_dec_ref(v_inst_7143_);
lean_dec_ref(v_inst_7142_);
lean_dec(v_inst_7141_);
lean_dec(v_toPure_7140_);
v___x_7185_ = lean_apply_1(v_toTopVar_7138_, v_e_7139_);
return v___x_7185_;
}
else
{
lean_object* v___f_7186_; lean_object* v___f_7187_; lean_object* v___x_7188_; lean_object* v___x_7189_; 
lean_dec(v_toTopVar_7138_);
lean_inc(v_toBind_7148_);
lean_inc(v_asVar_7147_);
lean_inc(v_toVar_7146_);
lean_inc_ref(v_inst_7145_);
lean_inc_ref(v_inst_7144_);
lean_inc_ref(v_inst_7143_);
lean_inc_ref(v_inst_7142_);
lean_inc(v_inst_7141_);
v___f_7186_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__9), 11, 10);
lean_closure_set(v___f_7186_, 0, v_toPure_7140_);
lean_closure_set(v___f_7186_, 1, v_inst_7141_);
lean_closure_set(v___f_7186_, 2, v_inst_7142_);
lean_closure_set(v___f_7186_, 3, v_inst_7143_);
lean_closure_set(v___f_7186_, 4, v_inst_7144_);
lean_closure_set(v___f_7186_, 5, v_inst_7145_);
lean_closure_set(v___f_7186_, 6, v_toVar_7146_);
lean_closure_set(v___f_7186_, 7, v_asVar_7147_);
lean_closure_set(v___f_7186_, 8, v_arg_7156_);
lean_closure_set(v___f_7186_, 9, v_toBind_7148_);
lean_inc(v_toBind_7148_);
lean_inc_ref(v_inst_7145_);
lean_inc_ref(v_inst_7144_);
lean_inc_ref(v_inst_7143_);
lean_inc_ref(v_inst_7142_);
lean_inc(v_inst_7141_);
v___f_7187_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__4___boxed), 14, 13);
lean_closure_set(v___f_7187_, 0, v_arg_7164_);
lean_closure_set(v___f_7187_, 1, v_asTopVar_7149_);
lean_closure_set(v___f_7187_, 2, v_e_7139_);
lean_closure_set(v___f_7187_, 3, v_inst_7141_);
lean_closure_set(v___f_7187_, 4, v_inst_7142_);
lean_closure_set(v___f_7187_, 5, v_inst_7143_);
lean_closure_set(v___f_7187_, 6, v_inst_7144_);
lean_closure_set(v___f_7187_, 7, v_inst_7145_);
lean_closure_set(v___f_7187_, 8, v_toVar_7146_);
lean_closure_set(v___f_7187_, 9, v_asVar_7147_);
lean_closure_set(v___f_7187_, 10, v_arg_7160_);
lean_closure_set(v___f_7187_, 11, v_toBind_7148_);
lean_closure_set(v___f_7187_, 12, v___f_7186_);
v___x_7188_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___redArg(v_inst_7141_, v_inst_7142_, v_inst_7143_, v_inst_7144_, v_inst_7145_);
v___x_7189_ = lean_apply_4(v_toBind_7148_, lean_box(0), lean_box(0), v___x_7188_, v___f_7187_);
return v___x_7189_;
}
}
else
{
lean_object* v___f_7190_; lean_object* v___f_7191_; lean_object* v___x_7192_; lean_object* v___x_7193_; 
lean_dec_ref(v___x_7178_);
lean_dec(v_toTopVar_7138_);
lean_inc(v_toBind_7148_);
lean_inc(v_asVar_7147_);
lean_inc(v_toVar_7146_);
lean_inc_ref(v_inst_7145_);
lean_inc_ref(v_inst_7144_);
lean_inc_ref(v_inst_7143_);
lean_inc_ref(v_inst_7142_);
lean_inc(v_inst_7141_);
v___f_7190_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__10), 11, 10);
lean_closure_set(v___f_7190_, 0, v_toPure_7140_);
lean_closure_set(v___f_7190_, 1, v_inst_7141_);
lean_closure_set(v___f_7190_, 2, v_inst_7142_);
lean_closure_set(v___f_7190_, 3, v_inst_7143_);
lean_closure_set(v___f_7190_, 4, v_inst_7144_);
lean_closure_set(v___f_7190_, 5, v_inst_7145_);
lean_closure_set(v___f_7190_, 6, v_toVar_7146_);
lean_closure_set(v___f_7190_, 7, v_asVar_7147_);
lean_closure_set(v___f_7190_, 8, v_arg_7156_);
lean_closure_set(v___f_7190_, 9, v_toBind_7148_);
lean_inc(v_toBind_7148_);
lean_inc_ref(v_inst_7145_);
lean_inc_ref(v_inst_7144_);
lean_inc_ref(v_inst_7143_);
lean_inc_ref(v_inst_7142_);
lean_inc(v_inst_7141_);
v___f_7191_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__4___boxed), 14, 13);
lean_closure_set(v___f_7191_, 0, v_arg_7164_);
lean_closure_set(v___f_7191_, 1, v_asTopVar_7149_);
lean_closure_set(v___f_7191_, 2, v_e_7139_);
lean_closure_set(v___f_7191_, 3, v_inst_7141_);
lean_closure_set(v___f_7191_, 4, v_inst_7142_);
lean_closure_set(v___f_7191_, 5, v_inst_7143_);
lean_closure_set(v___f_7191_, 6, v_inst_7144_);
lean_closure_set(v___f_7191_, 7, v_inst_7145_);
lean_closure_set(v___f_7191_, 8, v_toVar_7146_);
lean_closure_set(v___f_7191_, 9, v_asVar_7147_);
lean_closure_set(v___f_7191_, 10, v_arg_7160_);
lean_closure_set(v___f_7191_, 11, v_toBind_7148_);
lean_closure_set(v___f_7191_, 12, v___f_7190_);
v___x_7192_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___redArg(v_inst_7141_, v_inst_7142_, v_inst_7143_, v_inst_7144_, v_inst_7145_);
v___x_7193_ = lean_apply_4(v_toBind_7148_, lean_box(0), lean_box(0), v___x_7192_, v___f_7191_);
return v___x_7193_;
}
}
else
{
lean_object* v___f_7194_; lean_object* v___x_7195_; lean_object* v___x_7196_; lean_object* v___x_7197_; 
lean_dec_ref(v___x_7178_);
lean_dec(v_toTopVar_7138_);
lean_inc(v_toBind_7148_);
lean_inc(v_inst_7141_);
v___f_7194_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__13), 14, 13);
lean_closure_set(v___f_7194_, 0, v_toPure_7140_);
lean_closure_set(v___f_7194_, 1, v_arg_7164_);
lean_closure_set(v___f_7194_, 2, v_asTopVar_7149_);
lean_closure_set(v___f_7194_, 3, v_e_7139_);
lean_closure_set(v___f_7194_, 4, v_inst_7141_);
lean_closure_set(v___f_7194_, 5, v_inst_7142_);
lean_closure_set(v___f_7194_, 6, v_inst_7143_);
lean_closure_set(v___f_7194_, 7, v_inst_7144_);
lean_closure_set(v___f_7194_, 8, v_inst_7145_);
lean_closure_set(v___f_7194_, 9, v_toVar_7146_);
lean_closure_set(v___f_7194_, 10, v_asVar_7147_);
lean_closure_set(v___f_7194_, 11, v_arg_7160_);
lean_closure_set(v___f_7194_, 12, v_toBind_7148_);
v___x_7195_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_7195_, 0, v_arg_7156_);
v___x_7196_ = lean_apply_2(v_inst_7141_, lean_box(0), v___x_7195_);
v___x_7197_ = lean_apply_4(v_toBind_7148_, lean_box(0), lean_box(0), v___x_7196_, v___f_7194_);
return v___x_7197_;
}
}
}
}
}
else
{
lean_object* v___f_7198_; lean_object* v___x_7199_; lean_object* v___x_7200_; 
lean_dec_ref(v___x_7165_);
lean_dec_ref(v_arg_7164_);
lean_dec(v_asVar_7147_);
lean_dec(v_toVar_7146_);
lean_dec_ref(v_inst_7142_);
lean_dec(v_toPure_7140_);
lean_dec(v_toTopVar_7138_);
lean_inc(v_toBind_7148_);
lean_inc(v_inst_7141_);
v___f_7198_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__8___boxed), 8, 7);
lean_closure_set(v___f_7198_, 0, v_arg_7160_);
lean_closure_set(v___f_7198_, 1, v_asTopVar_7149_);
lean_closure_set(v___f_7198_, 2, v_e_7139_);
lean_closure_set(v___f_7198_, 3, v_arg_7156_);
lean_closure_set(v___f_7198_, 4, v_inst_7141_);
lean_closure_set(v___f_7198_, 5, v_toBind_7148_);
lean_closure_set(v___f_7198_, 6, v___f_7150_);
v___x_7199_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___redArg(v_inst_7141_, v_inst_7143_, v_inst_7144_, v_inst_7145_);
v___x_7200_ = lean_apply_4(v_toBind_7148_, lean_box(0), lean_box(0), v___x_7199_, v___f_7198_);
return v___x_7200_;
}
}
else
{
lean_object* v___x_7201_; lean_object* v___x_7202_; lean_object* v___x_7203_; 
lean_dec_ref(v___x_7165_);
lean_dec_ref(v_arg_7164_);
lean_dec_ref(v_arg_7156_);
lean_dec(v___f_7150_);
lean_dec(v_asTopVar_7149_);
lean_dec(v_asVar_7147_);
lean_dec(v_toVar_7146_);
lean_dec_ref(v_inst_7145_);
lean_dec_ref(v_inst_7144_);
lean_dec_ref(v_inst_7143_);
lean_dec_ref(v_inst_7142_);
lean_dec(v_toPure_7140_);
lean_dec_ref(v_e_7139_);
lean_dec(v_toTopVar_7138_);
v___x_7201_ = lean_alloc_closure((void*)(l_Lean_Meta_getNatValue_x3f___boxed), 6, 1);
lean_closure_set(v___x_7201_, 0, v_arg_7160_);
v___x_7202_ = lean_apply_2(v_inst_7141_, lean_box(0), v___x_7201_);
v___x_7203_ = lean_apply_4(v_toBind_7148_, lean_box(0), lean_box(0), v___x_7202_, v___f_7151_);
return v___x_7203_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg(lean_object* v_inst_7204_, lean_object* v_inst_7205_, lean_object* v_inst_7206_, lean_object* v_inst_7207_, lean_object* v_inst_7208_, lean_object* v_inst_7209_, lean_object* v_inst_7210_, lean_object* v_e_7211_){
_start:
{
lean_object* v_toApplicative_7212_; lean_object* v_toBind_7213_; lean_object* v_toPure_7214_; lean_object* v_mkVar_7215_; lean_object* v___f_7216_; lean_object* v___f_7217_; lean_object* v_asVar_7218_; lean_object* v_toVar_7219_; lean_object* v_toTopVar_7220_; lean_object* v___f_7221_; lean_object* v_asTopVar_7222_; lean_object* v___f_7223_; lean_object* v___f_7224_; lean_object* v___x_7225_; lean_object* v___x_7226_; lean_object* v___x_7227_; 
v_toApplicative_7212_ = lean_ctor_get(v_inst_7207_, 0);
v_toBind_7213_ = lean_ctor_get(v_inst_7207_, 1);
lean_inc(v_toBind_7213_);
v_toPure_7214_ = lean_ctor_get(v_toApplicative_7212_, 1);
lean_inc(v_toPure_7214_);
lean_inc(v_toBind_7213_);
lean_inc_ref(v_inst_7209_);
lean_inc_ref(v_inst_7207_);
lean_inc(v_inst_7205_);
v_mkVar_7215_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__2), 6, 5);
lean_closure_set(v_mkVar_7215_, 0, v_inst_7205_);
lean_closure_set(v_mkVar_7215_, 1, v_inst_7207_);
lean_closure_set(v_mkVar_7215_, 2, v_inst_7209_);
lean_closure_set(v_mkVar_7215_, 3, v_inst_7210_);
lean_closure_set(v_mkVar_7215_, 4, v_toBind_7213_);
lean_inc(v_toPure_7214_);
v___f_7216_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__4), 2, 1);
lean_closure_set(v___f_7216_, 0, v_toPure_7214_);
lean_inc(v_toPure_7214_);
v___f_7217_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__5), 2, 1);
lean_closure_set(v___f_7217_, 0, v_toPure_7214_);
lean_inc(v_inst_7205_);
lean_inc_ref(v___f_7217_);
lean_inc(v_toBind_7213_);
lean_inc_ref(v_mkVar_7215_);
v_asVar_7218_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__6), 5, 4);
lean_closure_set(v_asVar_7218_, 0, v_mkVar_7215_);
lean_closure_set(v_asVar_7218_, 1, v_toBind_7213_);
lean_closure_set(v_asVar_7218_, 2, v___f_7217_);
lean_closure_set(v_asVar_7218_, 3, v_inst_7205_);
lean_inc(v_toBind_7213_);
v_toVar_7219_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__9), 4, 3);
lean_closure_set(v_toVar_7219_, 0, v_mkVar_7215_);
lean_closure_set(v_toVar_7219_, 1, v_toBind_7213_);
lean_closure_set(v_toVar_7219_, 2, v___f_7217_);
lean_inc(v_toBind_7213_);
lean_inc_ref(v_toVar_7219_);
v_toTopVar_7220_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__5), 4, 3);
lean_closure_set(v_toTopVar_7220_, 0, v_toVar_7219_);
lean_closure_set(v_toTopVar_7220_, 1, v_toBind_7213_);
lean_closure_set(v_toTopVar_7220_, 2, v___f_7216_);
lean_inc_ref(v_e_7211_);
lean_inc_ref(v_toTopVar_7220_);
lean_inc(v_toPure_7214_);
v___f_7221_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__3), 4, 3);
lean_closure_set(v___f_7221_, 0, v_toPure_7214_);
lean_closure_set(v___f_7221_, 1, v_toTopVar_7220_);
lean_closure_set(v___f_7221_, 2, v_e_7211_);
lean_inc(v_toBind_7213_);
lean_inc_ref(v_toTopVar_7220_);
v_asTopVar_7222_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__7), 4, 3);
lean_closure_set(v_asTopVar_7222_, 0, v_toTopVar_7220_);
lean_closure_set(v_asTopVar_7222_, 1, v_inst_7205_);
lean_closure_set(v_asTopVar_7222_, 2, v_toBind_7213_);
lean_inc_ref(v_e_7211_);
lean_inc_ref(v_asTopVar_7222_);
lean_inc(v_toPure_7214_);
v___f_7223_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___redArg___lam__14), 4, 3);
lean_closure_set(v___f_7223_, 0, v_toPure_7214_);
lean_closure_set(v___f_7223_, 1, v_asTopVar_7222_);
lean_closure_set(v___f_7223_, 2, v_e_7211_);
lean_inc(v_toBind_7213_);
lean_inc(v_inst_7204_);
lean_inc_ref(v_e_7211_);
v___f_7224_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg___lam__11), 15, 14);
lean_closure_set(v___f_7224_, 0, v_toTopVar_7220_);
lean_closure_set(v___f_7224_, 1, v_e_7211_);
lean_closure_set(v___f_7224_, 2, v_toPure_7214_);
lean_closure_set(v___f_7224_, 3, v_inst_7204_);
lean_closure_set(v___f_7224_, 4, v_inst_7206_);
lean_closure_set(v___f_7224_, 5, v_inst_7207_);
lean_closure_set(v___f_7224_, 6, v_inst_7208_);
lean_closure_set(v___f_7224_, 7, v_inst_7209_);
lean_closure_set(v___f_7224_, 8, v_toVar_7219_);
lean_closure_set(v___f_7224_, 9, v_asVar_7218_);
lean_closure_set(v___f_7224_, 10, v_toBind_7213_);
lean_closure_set(v___f_7224_, 11, v_asTopVar_7222_);
lean_closure_set(v___f_7224_, 12, v___f_7221_);
lean_closure_set(v___f_7224_, 13, v___f_7223_);
v___x_7225_ = lean_alloc_closure((void*)(l_Lean_Meta_instantiateMVarsIfMVarApp___boxed), 6, 1);
lean_closure_set(v___x_7225_, 0, v_e_7211_);
v___x_7226_ = lean_apply_2(v_inst_7204_, lean_box(0), v___x_7225_);
v___x_7227_ = lean_apply_4(v_toBind_7213_, lean_box(0), lean_box(0), v___x_7226_, v___f_7224_);
return v___x_7227_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f(lean_object* v_m_7228_, lean_object* v_inst_7229_, lean_object* v_inst_7230_, lean_object* v_inst_7231_, lean_object* v_inst_7232_, lean_object* v_inst_7233_, lean_object* v_inst_7234_, lean_object* v_inst_7235_, lean_object* v_e_7236_){
_start:
{
lean_object* v___x_7237_; 
v___x_7237_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___redArg(v_inst_7229_, v_inst_7230_, v_inst_7231_, v_inst_7232_, v_inst_7233_, v_inst_7234_, v_inst_7235_, v_e_7236_);
return v___x_7237_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4___lam__0(lean_object* v___y_7238_, lean_object* v_a_7239_, lean_object* v_s_7240_){
_start:
{
lean_object* v_rings_7241_; lean_object* v_typeIdOf_7242_; lean_object* v_exprToRingId_7243_; lean_object* v_semirings_7244_; lean_object* v_stypeIdOf_7245_; lean_object* v_exprToSemiringId_7246_; lean_object* v_ncRings_7247_; lean_object* v_exprToNCRingId_7248_; lean_object* v_nctypeIdOf_7249_; lean_object* v_ncSemirings_7250_; lean_object* v_exprToNCSemiringId_7251_; lean_object* v_ncstypeIdOf_7252_; lean_object* v_steps_7253_; lean_object* v___x_7254_; uint8_t v___x_7255_; 
v_rings_7241_ = lean_ctor_get(v_s_7240_, 0);
v_typeIdOf_7242_ = lean_ctor_get(v_s_7240_, 1);
v_exprToRingId_7243_ = lean_ctor_get(v_s_7240_, 2);
v_semirings_7244_ = lean_ctor_get(v_s_7240_, 3);
v_stypeIdOf_7245_ = lean_ctor_get(v_s_7240_, 4);
v_exprToSemiringId_7246_ = lean_ctor_get(v_s_7240_, 5);
v_ncRings_7247_ = lean_ctor_get(v_s_7240_, 6);
v_exprToNCRingId_7248_ = lean_ctor_get(v_s_7240_, 7);
v_nctypeIdOf_7249_ = lean_ctor_get(v_s_7240_, 8);
v_ncSemirings_7250_ = lean_ctor_get(v_s_7240_, 9);
v_exprToNCSemiringId_7251_ = lean_ctor_get(v_s_7240_, 10);
v_ncstypeIdOf_7252_ = lean_ctor_get(v_s_7240_, 11);
v_steps_7253_ = lean_ctor_get(v_s_7240_, 12);
v___x_7254_ = lean_array_get_size(v_semirings_7244_);
v___x_7255_ = lean_nat_dec_lt(v___y_7238_, v___x_7254_);
if (v___x_7255_ == 0)
{
lean_dec_ref(v_a_7239_);
return v_s_7240_;
}
else
{
lean_object* v___x_7257_; uint8_t v_isShared_7258_; uint8_t v_isSharedCheck_7297_; 
lean_inc(v_steps_7253_);
lean_inc_ref(v_ncstypeIdOf_7252_);
lean_inc_ref(v_exprToNCSemiringId_7251_);
lean_inc_ref(v_ncSemirings_7250_);
lean_inc_ref(v_nctypeIdOf_7249_);
lean_inc_ref(v_exprToNCRingId_7248_);
lean_inc_ref(v_ncRings_7247_);
lean_inc_ref(v_exprToSemiringId_7246_);
lean_inc_ref(v_stypeIdOf_7245_);
lean_inc_ref(v_semirings_7244_);
lean_inc_ref(v_exprToRingId_7243_);
lean_inc_ref(v_typeIdOf_7242_);
lean_inc_ref(v_rings_7241_);
v_isSharedCheck_7297_ = !lean_is_exclusive(v_s_7240_);
if (v_isSharedCheck_7297_ == 0)
{
lean_object* v_unused_7298_; lean_object* v_unused_7299_; lean_object* v_unused_7300_; lean_object* v_unused_7301_; lean_object* v_unused_7302_; lean_object* v_unused_7303_; lean_object* v_unused_7304_; lean_object* v_unused_7305_; lean_object* v_unused_7306_; lean_object* v_unused_7307_; lean_object* v_unused_7308_; lean_object* v_unused_7309_; lean_object* v_unused_7310_; 
v_unused_7298_ = lean_ctor_get(v_s_7240_, 12);
lean_dec(v_unused_7298_);
v_unused_7299_ = lean_ctor_get(v_s_7240_, 11);
lean_dec(v_unused_7299_);
v_unused_7300_ = lean_ctor_get(v_s_7240_, 10);
lean_dec(v_unused_7300_);
v_unused_7301_ = lean_ctor_get(v_s_7240_, 9);
lean_dec(v_unused_7301_);
v_unused_7302_ = lean_ctor_get(v_s_7240_, 8);
lean_dec(v_unused_7302_);
v_unused_7303_ = lean_ctor_get(v_s_7240_, 7);
lean_dec(v_unused_7303_);
v_unused_7304_ = lean_ctor_get(v_s_7240_, 6);
lean_dec(v_unused_7304_);
v_unused_7305_ = lean_ctor_get(v_s_7240_, 5);
lean_dec(v_unused_7305_);
v_unused_7306_ = lean_ctor_get(v_s_7240_, 4);
lean_dec(v_unused_7306_);
v_unused_7307_ = lean_ctor_get(v_s_7240_, 3);
lean_dec(v_unused_7307_);
v_unused_7308_ = lean_ctor_get(v_s_7240_, 2);
lean_dec(v_unused_7308_);
v_unused_7309_ = lean_ctor_get(v_s_7240_, 1);
lean_dec(v_unused_7309_);
v_unused_7310_ = lean_ctor_get(v_s_7240_, 0);
lean_dec(v_unused_7310_);
v___x_7257_ = v_s_7240_;
v_isShared_7258_ = v_isSharedCheck_7297_;
goto v_resetjp_7256_;
}
else
{
lean_dec(v_s_7240_);
v___x_7257_ = lean_box(0);
v_isShared_7258_ = v_isSharedCheck_7297_;
goto v_resetjp_7256_;
}
v_resetjp_7256_:
{
lean_object* v_v_7259_; lean_object* v_toSemiring_7260_; lean_object* v_ringId_7261_; lean_object* v_commSemiringInst_7262_; lean_object* v_addRightCancelInst_x3f_7263_; lean_object* v_toQFn_x3f_7264_; lean_object* v___x_7266_; uint8_t v_isShared_7267_; uint8_t v_isSharedCheck_7296_; 
v_v_7259_ = lean_array_fget(v_semirings_7244_, v___y_7238_);
v_toSemiring_7260_ = lean_ctor_get(v_v_7259_, 0);
v_ringId_7261_ = lean_ctor_get(v_v_7259_, 1);
v_commSemiringInst_7262_ = lean_ctor_get(v_v_7259_, 2);
v_addRightCancelInst_x3f_7263_ = lean_ctor_get(v_v_7259_, 3);
v_toQFn_x3f_7264_ = lean_ctor_get(v_v_7259_, 4);
v_isSharedCheck_7296_ = !lean_is_exclusive(v_v_7259_);
if (v_isSharedCheck_7296_ == 0)
{
v___x_7266_ = v_v_7259_;
v_isShared_7267_ = v_isSharedCheck_7296_;
goto v_resetjp_7265_;
}
else
{
lean_inc(v_toQFn_x3f_7264_);
lean_inc(v_addRightCancelInst_x3f_7263_);
lean_inc(v_commSemiringInst_7262_);
lean_inc(v_ringId_7261_);
lean_inc(v_toSemiring_7260_);
lean_dec(v_v_7259_);
v___x_7266_ = lean_box(0);
v_isShared_7267_ = v_isSharedCheck_7296_;
goto v_resetjp_7265_;
}
v_resetjp_7265_:
{
lean_object* v_id_7268_; lean_object* v_type_7269_; lean_object* v_u_7270_; lean_object* v_semiringInst_7271_; lean_object* v_addFn_x3f_7272_; lean_object* v_mulFn_x3f_7273_; lean_object* v_natCastFn_x3f_7274_; lean_object* v_denote_7275_; lean_object* v_vars_7276_; lean_object* v_varMap_7277_; lean_object* v___x_7279_; uint8_t v_isShared_7280_; uint8_t v_isSharedCheck_7294_; 
v_id_7268_ = lean_ctor_get(v_toSemiring_7260_, 0);
v_type_7269_ = lean_ctor_get(v_toSemiring_7260_, 1);
v_u_7270_ = lean_ctor_get(v_toSemiring_7260_, 2);
v_semiringInst_7271_ = lean_ctor_get(v_toSemiring_7260_, 3);
v_addFn_x3f_7272_ = lean_ctor_get(v_toSemiring_7260_, 4);
v_mulFn_x3f_7273_ = lean_ctor_get(v_toSemiring_7260_, 5);
v_natCastFn_x3f_7274_ = lean_ctor_get(v_toSemiring_7260_, 7);
v_denote_7275_ = lean_ctor_get(v_toSemiring_7260_, 8);
v_vars_7276_ = lean_ctor_get(v_toSemiring_7260_, 9);
v_varMap_7277_ = lean_ctor_get(v_toSemiring_7260_, 10);
v_isSharedCheck_7294_ = !lean_is_exclusive(v_toSemiring_7260_);
if (v_isSharedCheck_7294_ == 0)
{
lean_object* v_unused_7295_; 
v_unused_7295_ = lean_ctor_get(v_toSemiring_7260_, 6);
lean_dec(v_unused_7295_);
v___x_7279_ = v_toSemiring_7260_;
v_isShared_7280_ = v_isSharedCheck_7294_;
goto v_resetjp_7278_;
}
else
{
lean_inc(v_varMap_7277_);
lean_inc(v_vars_7276_);
lean_inc(v_denote_7275_);
lean_inc(v_natCastFn_x3f_7274_);
lean_inc(v_mulFn_x3f_7273_);
lean_inc(v_addFn_x3f_7272_);
lean_inc(v_semiringInst_7271_);
lean_inc(v_u_7270_);
lean_inc(v_type_7269_);
lean_inc(v_id_7268_);
lean_dec(v_toSemiring_7260_);
v___x_7279_ = lean_box(0);
v_isShared_7280_ = v_isSharedCheck_7294_;
goto v_resetjp_7278_;
}
v_resetjp_7278_:
{
lean_object* v___x_7281_; lean_object* v_xs_x27_7282_; lean_object* v___x_7283_; lean_object* v___x_7285_; 
v___x_7281_ = lean_box(0);
v_xs_x27_7282_ = lean_array_fset(v_semirings_7244_, v___y_7238_, v___x_7281_);
v___x_7283_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_7283_, 0, v_a_7239_);
if (v_isShared_7280_ == 0)
{
lean_ctor_set(v___x_7279_, 6, v___x_7283_);
v___x_7285_ = v___x_7279_;
goto v_reusejp_7284_;
}
else
{
lean_object* v_reuseFailAlloc_7293_; 
v_reuseFailAlloc_7293_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_7293_, 0, v_id_7268_);
lean_ctor_set(v_reuseFailAlloc_7293_, 1, v_type_7269_);
lean_ctor_set(v_reuseFailAlloc_7293_, 2, v_u_7270_);
lean_ctor_set(v_reuseFailAlloc_7293_, 3, v_semiringInst_7271_);
lean_ctor_set(v_reuseFailAlloc_7293_, 4, v_addFn_x3f_7272_);
lean_ctor_set(v_reuseFailAlloc_7293_, 5, v_mulFn_x3f_7273_);
lean_ctor_set(v_reuseFailAlloc_7293_, 6, v___x_7283_);
lean_ctor_set(v_reuseFailAlloc_7293_, 7, v_natCastFn_x3f_7274_);
lean_ctor_set(v_reuseFailAlloc_7293_, 8, v_denote_7275_);
lean_ctor_set(v_reuseFailAlloc_7293_, 9, v_vars_7276_);
lean_ctor_set(v_reuseFailAlloc_7293_, 10, v_varMap_7277_);
v___x_7285_ = v_reuseFailAlloc_7293_;
goto v_reusejp_7284_;
}
v_reusejp_7284_:
{
lean_object* v___x_7287_; 
if (v_isShared_7267_ == 0)
{
lean_ctor_set(v___x_7266_, 0, v___x_7285_);
v___x_7287_ = v___x_7266_;
goto v_reusejp_7286_;
}
else
{
lean_object* v_reuseFailAlloc_7292_; 
v_reuseFailAlloc_7292_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_7292_, 0, v___x_7285_);
lean_ctor_set(v_reuseFailAlloc_7292_, 1, v_ringId_7261_);
lean_ctor_set(v_reuseFailAlloc_7292_, 2, v_commSemiringInst_7262_);
lean_ctor_set(v_reuseFailAlloc_7292_, 3, v_addRightCancelInst_x3f_7263_);
lean_ctor_set(v_reuseFailAlloc_7292_, 4, v_toQFn_x3f_7264_);
v___x_7287_ = v_reuseFailAlloc_7292_;
goto v_reusejp_7286_;
}
v_reusejp_7286_:
{
lean_object* v___x_7288_; lean_object* v___x_7290_; 
v___x_7288_ = lean_array_fset(v_xs_x27_7282_, v___y_7238_, v___x_7287_);
if (v_isShared_7258_ == 0)
{
lean_ctor_set(v___x_7257_, 3, v___x_7288_);
v___x_7290_ = v___x_7257_;
goto v_reusejp_7289_;
}
else
{
lean_object* v_reuseFailAlloc_7291_; 
v_reuseFailAlloc_7291_ = lean_alloc_ctor(0, 13, 0);
lean_ctor_set(v_reuseFailAlloc_7291_, 0, v_rings_7241_);
lean_ctor_set(v_reuseFailAlloc_7291_, 1, v_typeIdOf_7242_);
lean_ctor_set(v_reuseFailAlloc_7291_, 2, v_exprToRingId_7243_);
lean_ctor_set(v_reuseFailAlloc_7291_, 3, v___x_7288_);
lean_ctor_set(v_reuseFailAlloc_7291_, 4, v_stypeIdOf_7245_);
lean_ctor_set(v_reuseFailAlloc_7291_, 5, v_exprToSemiringId_7246_);
lean_ctor_set(v_reuseFailAlloc_7291_, 6, v_ncRings_7247_);
lean_ctor_set(v_reuseFailAlloc_7291_, 7, v_exprToNCRingId_7248_);
lean_ctor_set(v_reuseFailAlloc_7291_, 8, v_nctypeIdOf_7249_);
lean_ctor_set(v_reuseFailAlloc_7291_, 9, v_ncSemirings_7250_);
lean_ctor_set(v_reuseFailAlloc_7291_, 10, v_exprToNCSemiringId_7251_);
lean_ctor_set(v_reuseFailAlloc_7291_, 11, v_ncstypeIdOf_7252_);
lean_ctor_set(v_reuseFailAlloc_7291_, 12, v_steps_7253_);
v___x_7290_ = v_reuseFailAlloc_7291_;
goto v_reusejp_7289_;
}
v_reusejp_7289_:
{
return v___x_7290_;
}
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4___lam__0___boxed(lean_object* v___y_7311_, lean_object* v_a_7312_, lean_object* v_s_7313_){
_start:
{
lean_object* v_res_7314_; 
v_res_7314_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4___lam__0(v___y_7311_, v_a_7312_, v_s_7313_);
lean_dec(v___y_7311_);
return v_res_7314_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg(lean_object* v_msg_7315_, lean_object* v___y_7316_, lean_object* v___y_7317_, lean_object* v___y_7318_, lean_object* v___y_7319_){
_start:
{
lean_object* v_ref_7321_; lean_object* v___x_7322_; lean_object* v_a_7323_; lean_object* v___x_7325_; uint8_t v_isShared_7326_; uint8_t v_isSharedCheck_7331_; 
v_ref_7321_ = lean_ctor_get(v___y_7318_, 5);
v___x_7322_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28_spec__31(v_msg_7315_, v___y_7316_, v___y_7317_, v___y_7318_, v___y_7319_);
v_a_7323_ = lean_ctor_get(v___x_7322_, 0);
v_isSharedCheck_7331_ = !lean_is_exclusive(v___x_7322_);
if (v_isSharedCheck_7331_ == 0)
{
v___x_7325_ = v___x_7322_;
v_isShared_7326_ = v_isSharedCheck_7331_;
goto v_resetjp_7324_;
}
else
{
lean_inc(v_a_7323_);
lean_dec(v___x_7322_);
v___x_7325_ = lean_box(0);
v_isShared_7326_ = v_isSharedCheck_7331_;
goto v_resetjp_7324_;
}
v_resetjp_7324_:
{
lean_object* v___x_7327_; lean_object* v___x_7329_; 
lean_inc(v_ref_7321_);
v___x_7327_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_7327_, 0, v_ref_7321_);
lean_ctor_set(v___x_7327_, 1, v_a_7323_);
if (v_isShared_7326_ == 0)
{
lean_ctor_set_tag(v___x_7325_, 1);
lean_ctor_set(v___x_7325_, 0, v___x_7327_);
v___x_7329_ = v___x_7325_;
goto v_reusejp_7328_;
}
else
{
lean_object* v_reuseFailAlloc_7330_; 
v_reuseFailAlloc_7330_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7330_, 0, v___x_7327_);
v___x_7329_ = v_reuseFailAlloc_7330_;
goto v_reusejp_7328_;
}
v_reusejp_7328_:
{
return v___x_7329_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg___boxed(lean_object* v_msg_7332_, lean_object* v___y_7333_, lean_object* v___y_7334_, lean_object* v___y_7335_, lean_object* v___y_7336_, lean_object* v___y_7337_){
_start:
{
lean_object* v_res_7338_; 
v_res_7338_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg(v_msg_7332_, v___y_7333_, v___y_7334_, v___y_7335_, v___y_7336_);
lean_dec(v___y_7336_);
lean_dec_ref(v___y_7335_);
lean_dec(v___y_7334_);
lean_dec_ref(v___y_7333_);
return v_res_7338_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3(lean_object* v_type_7339_, lean_object* v___y_7340_, lean_object* v___y_7341_, lean_object* v___y_7342_, lean_object* v___y_7343_, lean_object* v___y_7344_, lean_object* v___y_7345_, lean_object* v___y_7346_, lean_object* v___y_7347_, lean_object* v___y_7348_, lean_object* v___y_7349_, lean_object* v___y_7350_){
_start:
{
lean_object* v___x_7352_; 
lean_inc(v___y_7350_);
lean_inc_ref(v___y_7349_);
lean_inc(v___y_7348_);
lean_inc_ref(v___y_7347_);
lean_inc_ref(v_type_7339_);
v___x_7352_ = l_Lean_Meta_Grind_synthInstanceMeta_x3f(v_type_7339_, v___y_7347_, v___y_7348_, v___y_7349_, v___y_7350_);
if (lean_obj_tag(v___x_7352_) == 0)
{
lean_object* v_a_7353_; lean_object* v___x_7355_; uint8_t v_isShared_7356_; uint8_t v_isSharedCheck_7365_; 
v_a_7353_ = lean_ctor_get(v___x_7352_, 0);
v_isSharedCheck_7365_ = !lean_is_exclusive(v___x_7352_);
if (v_isSharedCheck_7365_ == 0)
{
v___x_7355_ = v___x_7352_;
v_isShared_7356_ = v_isSharedCheck_7365_;
goto v_resetjp_7354_;
}
else
{
lean_inc(v_a_7353_);
lean_dec(v___x_7352_);
v___x_7355_ = lean_box(0);
v_isShared_7356_ = v_isSharedCheck_7365_;
goto v_resetjp_7354_;
}
v_resetjp_7354_:
{
if (lean_obj_tag(v_a_7353_) == 1)
{
lean_object* v_val_7357_; lean_object* v___x_7359_; 
lean_dec(v___y_7350_);
lean_dec_ref(v___y_7349_);
lean_dec(v___y_7348_);
lean_dec_ref(v___y_7347_);
lean_dec_ref(v_type_7339_);
v_val_7357_ = lean_ctor_get(v_a_7353_, 0);
lean_inc(v_val_7357_);
lean_dec_ref(v_a_7353_);
if (v_isShared_7356_ == 0)
{
lean_ctor_set(v___x_7355_, 0, v_val_7357_);
v___x_7359_ = v___x_7355_;
goto v_reusejp_7358_;
}
else
{
lean_object* v_reuseFailAlloc_7360_; 
v_reuseFailAlloc_7360_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7360_, 0, v_val_7357_);
v___x_7359_ = v_reuseFailAlloc_7360_;
goto v_reusejp_7358_;
}
v_reusejp_7358_:
{
return v___x_7359_;
}
}
else
{
lean_object* v___x_7361_; lean_object* v___x_7362_; lean_object* v___x_7363_; lean_object* v___x_7364_; 
lean_del_object(v___x_7355_);
lean_dec(v_a_7353_);
v___x_7361_ = lean_obj_once(&l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1, &l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1_once, _init_l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1);
v___x_7362_ = l_Lean_indentExpr(v_type_7339_);
v___x_7363_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_7363_, 0, v___x_7361_);
lean_ctor_set(v___x_7363_, 1, v___x_7362_);
v___x_7364_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg(v___x_7363_, v___y_7347_, v___y_7348_, v___y_7349_, v___y_7350_);
lean_dec(v___y_7350_);
lean_dec_ref(v___y_7349_);
lean_dec(v___y_7348_);
lean_dec_ref(v___y_7347_);
return v___x_7364_;
}
}
}
else
{
lean_object* v_a_7366_; lean_object* v___x_7368_; uint8_t v_isShared_7369_; uint8_t v_isSharedCheck_7373_; 
lean_dec(v___y_7350_);
lean_dec_ref(v___y_7349_);
lean_dec(v___y_7348_);
lean_dec_ref(v___y_7347_);
lean_dec_ref(v_type_7339_);
v_a_7366_ = lean_ctor_get(v___x_7352_, 0);
v_isSharedCheck_7373_ = !lean_is_exclusive(v___x_7352_);
if (v_isSharedCheck_7373_ == 0)
{
v___x_7368_ = v___x_7352_;
v_isShared_7369_ = v_isSharedCheck_7373_;
goto v_resetjp_7367_;
}
else
{
lean_inc(v_a_7366_);
lean_dec(v___x_7352_);
v___x_7368_ = lean_box(0);
v_isShared_7369_ = v_isSharedCheck_7373_;
goto v_resetjp_7367_;
}
v_resetjp_7367_:
{
lean_object* v___x_7371_; 
if (v_isShared_7369_ == 0)
{
v___x_7371_ = v___x_7368_;
goto v_reusejp_7370_;
}
else
{
lean_object* v_reuseFailAlloc_7372_; 
v_reuseFailAlloc_7372_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7372_, 0, v_a_7366_);
v___x_7371_ = v_reuseFailAlloc_7372_;
goto v_reusejp_7370_;
}
v_reusejp_7370_:
{
return v___x_7371_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3___boxed(lean_object* v_type_7374_, lean_object* v___y_7375_, lean_object* v___y_7376_, lean_object* v___y_7377_, lean_object* v___y_7378_, lean_object* v___y_7379_, lean_object* v___y_7380_, lean_object* v___y_7381_, lean_object* v___y_7382_, lean_object* v___y_7383_, lean_object* v___y_7384_, lean_object* v___y_7385_, lean_object* v___y_7386_){
_start:
{
lean_object* v_res_7387_; 
v_res_7387_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3(v_type_7374_, v___y_7375_, v___y_7376_, v___y_7377_, v___y_7378_, v___y_7379_, v___y_7380_, v___y_7381_, v___y_7382_, v___y_7383_, v___y_7384_, v___y_7385_);
lean_dec(v___y_7381_);
lean_dec_ref(v___y_7380_);
lean_dec(v___y_7379_);
lean_dec_ref(v___y_7378_);
lean_dec(v___y_7377_);
lean_dec(v___y_7376_);
lean_dec(v___y_7375_);
return v_res_7387_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4_spec__6(lean_object* v_u_7388_, lean_object* v_type_7389_, lean_object* v_semiringInst_7390_, lean_object* v___y_7391_, lean_object* v___y_7392_, lean_object* v___y_7393_, lean_object* v___y_7394_, lean_object* v___y_7395_, lean_object* v___y_7396_, lean_object* v___y_7397_, lean_object* v___y_7398_, lean_object* v___y_7399_, lean_object* v___y_7400_, lean_object* v___y_7401_){
_start:
{
lean_object* v___x_7403_; lean_object* v___x_7404_; lean_object* v___x_7405_; lean_object* v___x_7406_; lean_object* v___x_7407_; lean_object* v___x_7408_; lean_object* v___x_7409_; lean_object* v___x_7410_; lean_object* v___x_7411_; lean_object* v___x_7412_; 
v___x_7403_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__0));
v___x_7404_ = lean_obj_once(&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1, &l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1_once, _init_l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1);
v___x_7405_ = lean_box(0);
lean_inc(v_u_7388_);
v___x_7406_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_7406_, 0, v_u_7388_);
lean_ctor_set(v___x_7406_, 1, v___x_7405_);
lean_inc_ref(v___x_7406_);
v___x_7407_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_7407_, 0, v___x_7404_);
lean_ctor_set(v___x_7407_, 1, v___x_7406_);
v___x_7408_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_7408_, 0, v_u_7388_);
lean_ctor_set(v___x_7408_, 1, v___x_7407_);
lean_inc_ref(v___x_7408_);
v___x_7409_ = l_Lean_mkConst(v___x_7403_, v___x_7408_);
v___x_7410_ = l_Lean_Nat_mkType;
lean_inc_ref_n(v_type_7389_, 2);
v___x_7411_ = l_Lean_mkApp3(v___x_7409_, v_type_7389_, v___x_7410_, v_type_7389_);
lean_inc(v___y_7401_);
lean_inc_ref(v___y_7400_);
lean_inc(v___y_7399_);
lean_inc_ref(v___y_7398_);
v___x_7412_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3(v___x_7411_, v___y_7391_, v___y_7392_, v___y_7393_, v___y_7394_, v___y_7395_, v___y_7396_, v___y_7397_, v___y_7398_, v___y_7399_, v___y_7400_, v___y_7401_);
if (lean_obj_tag(v___x_7412_) == 0)
{
lean_object* v_a_7413_; lean_object* v___x_7414_; lean_object* v___x_7415_; lean_object* v_inst_x27_7416_; lean_object* v___x_7417_; lean_object* v___x_7418_; 
v_a_7413_ = lean_ctor_get(v___x_7412_, 0);
lean_inc(v_a_7413_);
lean_dec_ref(v___x_7412_);
v___x_7414_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3));
v___x_7415_ = l_Lean_mkConst(v___x_7414_, v___x_7406_);
lean_inc_ref(v_type_7389_);
v_inst_x27_7416_ = l_Lean_mkAppB(v___x_7415_, v_type_7389_, v_semiringInst_7390_);
v___x_7417_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
lean_inc(v___y_7401_);
lean_inc_ref(v___y_7400_);
lean_inc(v___y_7399_);
lean_inc_ref(v___y_7398_);
lean_inc(v_a_7413_);
v___x_7418_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v___x_7417_, v_a_7413_, v_inst_x27_7416_, v___y_7398_, v___y_7399_, v___y_7400_, v___y_7401_);
if (lean_obj_tag(v___x_7418_) == 0)
{
lean_object* v___x_7419_; lean_object* v___x_7420_; lean_object* v___x_7421_; 
lean_dec_ref(v___x_7418_);
v___x_7419_ = l_Lean_mkConst(v___x_7417_, v___x_7408_);
lean_inc_ref(v_type_7389_);
v___x_7420_ = l_Lean_mkApp4(v___x_7419_, v_type_7389_, v___x_7410_, v_type_7389_, v_a_7413_);
lean_inc(v___y_7397_);
v___x_7421_ = lean_grind_canon(v___x_7420_, v___y_7392_, v___y_7393_, v___y_7394_, v___y_7395_, v___y_7396_, v___y_7397_, v___y_7398_, v___y_7399_, v___y_7400_, v___y_7401_);
if (lean_obj_tag(v___x_7421_) == 0)
{
lean_object* v_a_7422_; lean_object* v___x_7423_; 
v_a_7422_ = lean_ctor_get(v___x_7421_, 0);
lean_inc(v_a_7422_);
lean_dec_ref(v___x_7421_);
v___x_7423_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_7422_, v___y_7397_);
lean_dec(v___y_7397_);
return v___x_7423_;
}
else
{
lean_dec(v___y_7397_);
return v___x_7421_;
}
}
else
{
lean_object* v_a_7424_; lean_object* v___x_7426_; uint8_t v_isShared_7427_; uint8_t v_isSharedCheck_7431_; 
lean_dec(v_a_7413_);
lean_dec_ref(v___x_7408_);
lean_dec(v___y_7401_);
lean_dec_ref(v___y_7400_);
lean_dec(v___y_7399_);
lean_dec_ref(v___y_7398_);
lean_dec(v___y_7397_);
lean_dec_ref(v___y_7396_);
lean_dec(v___y_7395_);
lean_dec_ref(v___y_7394_);
lean_dec(v___y_7393_);
lean_dec(v___y_7392_);
lean_dec_ref(v_type_7389_);
v_a_7424_ = lean_ctor_get(v___x_7418_, 0);
v_isSharedCheck_7431_ = !lean_is_exclusive(v___x_7418_);
if (v_isSharedCheck_7431_ == 0)
{
v___x_7426_ = v___x_7418_;
v_isShared_7427_ = v_isSharedCheck_7431_;
goto v_resetjp_7425_;
}
else
{
lean_inc(v_a_7424_);
lean_dec(v___x_7418_);
v___x_7426_ = lean_box(0);
v_isShared_7427_ = v_isSharedCheck_7431_;
goto v_resetjp_7425_;
}
v_resetjp_7425_:
{
lean_object* v___x_7429_; 
if (v_isShared_7427_ == 0)
{
v___x_7429_ = v___x_7426_;
goto v_reusejp_7428_;
}
else
{
lean_object* v_reuseFailAlloc_7430_; 
v_reuseFailAlloc_7430_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7430_, 0, v_a_7424_);
v___x_7429_ = v_reuseFailAlloc_7430_;
goto v_reusejp_7428_;
}
v_reusejp_7428_:
{
return v___x_7429_;
}
}
}
}
else
{
lean_dec_ref(v___x_7408_);
lean_dec_ref(v___x_7406_);
lean_dec(v___y_7401_);
lean_dec_ref(v___y_7400_);
lean_dec(v___y_7399_);
lean_dec_ref(v___y_7398_);
lean_dec(v___y_7397_);
lean_dec_ref(v___y_7396_);
lean_dec(v___y_7395_);
lean_dec_ref(v___y_7394_);
lean_dec(v___y_7393_);
lean_dec(v___y_7392_);
lean_dec_ref(v_semiringInst_7390_);
lean_dec_ref(v_type_7389_);
return v___x_7412_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4_spec__6___boxed(lean_object* v_u_7432_, lean_object* v_type_7433_, lean_object* v_semiringInst_7434_, lean_object* v___y_7435_, lean_object* v___y_7436_, lean_object* v___y_7437_, lean_object* v___y_7438_, lean_object* v___y_7439_, lean_object* v___y_7440_, lean_object* v___y_7441_, lean_object* v___y_7442_, lean_object* v___y_7443_, lean_object* v___y_7444_, lean_object* v___y_7445_, lean_object* v___y_7446_){
_start:
{
lean_object* v_res_7447_; 
v_res_7447_ = l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4_spec__6(v_u_7432_, v_type_7433_, v_semiringInst_7434_, v___y_7435_, v___y_7436_, v___y_7437_, v___y_7438_, v___y_7439_, v___y_7440_, v___y_7441_, v___y_7442_, v___y_7443_, v___y_7444_, v___y_7445_);
lean_dec(v___y_7435_);
return v_res_7447_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4(lean_object* v___y_7448_, lean_object* v___y_7449_, lean_object* v___y_7450_, lean_object* v___y_7451_, lean_object* v___y_7452_, lean_object* v___y_7453_, lean_object* v___y_7454_, lean_object* v___y_7455_, lean_object* v___y_7456_, lean_object* v___y_7457_, lean_object* v___y_7458_){
_start:
{
lean_object* v___x_7460_; 
v___x_7460_ = l_Lean_Meta_Grind_Arith_CommRing_SemiringM_getCommSemiring(v___y_7448_, v___y_7449_, v___y_7450_, v___y_7451_, v___y_7452_, v___y_7453_, v___y_7454_, v___y_7455_, v___y_7456_, v___y_7457_, v___y_7458_);
if (lean_obj_tag(v___x_7460_) == 0)
{
lean_object* v_a_7461_; lean_object* v___x_7463_; uint8_t v_isShared_7464_; uint8_t v_isSharedCheck_7495_; 
v_a_7461_ = lean_ctor_get(v___x_7460_, 0);
v_isSharedCheck_7495_ = !lean_is_exclusive(v___x_7460_);
if (v_isSharedCheck_7495_ == 0)
{
v___x_7463_ = v___x_7460_;
v_isShared_7464_ = v_isSharedCheck_7495_;
goto v_resetjp_7462_;
}
else
{
lean_inc(v_a_7461_);
lean_dec(v___x_7460_);
v___x_7463_ = lean_box(0);
v_isShared_7464_ = v_isSharedCheck_7495_;
goto v_resetjp_7462_;
}
v_resetjp_7462_:
{
lean_object* v_toSemiring_7465_; lean_object* v_powFn_x3f_7466_; 
v_toSemiring_7465_ = lean_ctor_get(v_a_7461_, 0);
lean_inc_ref(v_toSemiring_7465_);
lean_dec(v_a_7461_);
v_powFn_x3f_7466_ = lean_ctor_get(v_toSemiring_7465_, 6);
if (lean_obj_tag(v_powFn_x3f_7466_) == 1)
{
lean_object* v_val_7467_; lean_object* v___x_7469_; 
lean_inc_ref(v_powFn_x3f_7466_);
lean_dec_ref(v_toSemiring_7465_);
lean_dec(v___y_7458_);
lean_dec_ref(v___y_7457_);
lean_dec(v___y_7456_);
lean_dec_ref(v___y_7455_);
lean_dec(v___y_7454_);
lean_dec_ref(v___y_7453_);
lean_dec(v___y_7452_);
lean_dec_ref(v___y_7451_);
lean_dec(v___y_7450_);
lean_dec(v___y_7449_);
lean_dec(v___y_7448_);
v_val_7467_ = lean_ctor_get(v_powFn_x3f_7466_, 0);
lean_inc(v_val_7467_);
lean_dec_ref(v_powFn_x3f_7466_);
if (v_isShared_7464_ == 0)
{
lean_ctor_set(v___x_7463_, 0, v_val_7467_);
v___x_7469_ = v___x_7463_;
goto v_reusejp_7468_;
}
else
{
lean_object* v_reuseFailAlloc_7470_; 
v_reuseFailAlloc_7470_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7470_, 0, v_val_7467_);
v___x_7469_ = v_reuseFailAlloc_7470_;
goto v_reusejp_7468_;
}
v_reusejp_7468_:
{
return v___x_7469_;
}
}
else
{
lean_object* v_type_7471_; lean_object* v_u_7472_; lean_object* v_semiringInst_7473_; lean_object* v___x_7474_; 
lean_del_object(v___x_7463_);
v_type_7471_ = lean_ctor_get(v_toSemiring_7465_, 1);
lean_inc_ref(v_type_7471_);
v_u_7472_ = lean_ctor_get(v_toSemiring_7465_, 2);
lean_inc(v_u_7472_);
v_semiringInst_7473_ = lean_ctor_get(v_toSemiring_7465_, 3);
lean_inc_ref(v_semiringInst_7473_);
lean_dec_ref(v_toSemiring_7465_);
lean_inc(v___y_7449_);
v___x_7474_ = l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4_spec__6(v_u_7472_, v_type_7471_, v_semiringInst_7473_, v___y_7448_, v___y_7449_, v___y_7450_, v___y_7451_, v___y_7452_, v___y_7453_, v___y_7454_, v___y_7455_, v___y_7456_, v___y_7457_, v___y_7458_);
if (lean_obj_tag(v___x_7474_) == 0)
{
lean_object* v_a_7475_; lean_object* v___f_7476_; lean_object* v___x_7477_; lean_object* v___x_7478_; 
v_a_7475_ = lean_ctor_get(v___x_7474_, 0);
lean_inc(v_a_7475_);
lean_dec_ref(v___x_7474_);
lean_inc(v_a_7475_);
v___f_7476_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4___lam__0___boxed), 3, 2);
lean_closure_set(v___f_7476_, 0, v___y_7448_);
lean_closure_set(v___f_7476_, 1, v_a_7475_);
v___x_7477_ = l_Lean_Meta_Grind_Arith_CommRing_ringExt;
v___x_7478_ = l___private_Lean_Meta_Tactic_Grind_Types_0__Lean_Meta_Grind_SolverExtension_modifyStateImpl___redArg(v___x_7477_, v___f_7476_, v___y_7449_);
lean_dec(v___y_7449_);
if (lean_obj_tag(v___x_7478_) == 0)
{
lean_object* v___x_7480_; uint8_t v_isShared_7481_; uint8_t v_isSharedCheck_7485_; 
v_isSharedCheck_7485_ = !lean_is_exclusive(v___x_7478_);
if (v_isSharedCheck_7485_ == 0)
{
lean_object* v_unused_7486_; 
v_unused_7486_ = lean_ctor_get(v___x_7478_, 0);
lean_dec(v_unused_7486_);
v___x_7480_ = v___x_7478_;
v_isShared_7481_ = v_isSharedCheck_7485_;
goto v_resetjp_7479_;
}
else
{
lean_dec(v___x_7478_);
v___x_7480_ = lean_box(0);
v_isShared_7481_ = v_isSharedCheck_7485_;
goto v_resetjp_7479_;
}
v_resetjp_7479_:
{
lean_object* v___x_7483_; 
if (v_isShared_7481_ == 0)
{
lean_ctor_set(v___x_7480_, 0, v_a_7475_);
v___x_7483_ = v___x_7480_;
goto v_reusejp_7482_;
}
else
{
lean_object* v_reuseFailAlloc_7484_; 
v_reuseFailAlloc_7484_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7484_, 0, v_a_7475_);
v___x_7483_ = v_reuseFailAlloc_7484_;
goto v_reusejp_7482_;
}
v_reusejp_7482_:
{
return v___x_7483_;
}
}
}
else
{
lean_object* v_a_7487_; lean_object* v___x_7489_; uint8_t v_isShared_7490_; uint8_t v_isSharedCheck_7494_; 
lean_dec(v_a_7475_);
v_a_7487_ = lean_ctor_get(v___x_7478_, 0);
v_isSharedCheck_7494_ = !lean_is_exclusive(v___x_7478_);
if (v_isSharedCheck_7494_ == 0)
{
v___x_7489_ = v___x_7478_;
v_isShared_7490_ = v_isSharedCheck_7494_;
goto v_resetjp_7488_;
}
else
{
lean_inc(v_a_7487_);
lean_dec(v___x_7478_);
v___x_7489_ = lean_box(0);
v_isShared_7490_ = v_isSharedCheck_7494_;
goto v_resetjp_7488_;
}
v_resetjp_7488_:
{
lean_object* v___x_7492_; 
if (v_isShared_7490_ == 0)
{
v___x_7492_ = v___x_7489_;
goto v_reusejp_7491_;
}
else
{
lean_object* v_reuseFailAlloc_7493_; 
v_reuseFailAlloc_7493_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7493_, 0, v_a_7487_);
v___x_7492_ = v_reuseFailAlloc_7493_;
goto v_reusejp_7491_;
}
v_reusejp_7491_:
{
return v___x_7492_;
}
}
}
}
else
{
lean_dec(v___y_7449_);
lean_dec(v___y_7448_);
return v___x_7474_;
}
}
}
}
else
{
lean_object* v_a_7496_; lean_object* v___x_7498_; uint8_t v_isShared_7499_; uint8_t v_isSharedCheck_7503_; 
lean_dec(v___y_7458_);
lean_dec_ref(v___y_7457_);
lean_dec(v___y_7456_);
lean_dec_ref(v___y_7455_);
lean_dec(v___y_7454_);
lean_dec_ref(v___y_7453_);
lean_dec(v___y_7452_);
lean_dec_ref(v___y_7451_);
lean_dec(v___y_7450_);
lean_dec(v___y_7449_);
lean_dec(v___y_7448_);
v_a_7496_ = lean_ctor_get(v___x_7460_, 0);
v_isSharedCheck_7503_ = !lean_is_exclusive(v___x_7460_);
if (v_isSharedCheck_7503_ == 0)
{
v___x_7498_ = v___x_7460_;
v_isShared_7499_ = v_isSharedCheck_7503_;
goto v_resetjp_7497_;
}
else
{
lean_inc(v_a_7496_);
lean_dec(v___x_7460_);
v___x_7498_ = lean_box(0);
v_isShared_7499_ = v_isSharedCheck_7503_;
goto v_resetjp_7497_;
}
v_resetjp_7497_:
{
lean_object* v___x_7501_; 
if (v_isShared_7499_ == 0)
{
v___x_7501_ = v___x_7498_;
goto v_reusejp_7500_;
}
else
{
lean_object* v_reuseFailAlloc_7502_; 
v_reuseFailAlloc_7502_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7502_, 0, v_a_7496_);
v___x_7501_ = v_reuseFailAlloc_7502_;
goto v_reusejp_7500_;
}
v_reusejp_7500_:
{
return v___x_7501_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4___boxed(lean_object* v___y_7504_, lean_object* v___y_7505_, lean_object* v___y_7506_, lean_object* v___y_7507_, lean_object* v___y_7508_, lean_object* v___y_7509_, lean_object* v___y_7510_, lean_object* v___y_7511_, lean_object* v___y_7512_, lean_object* v___y_7513_, lean_object* v___y_7514_, lean_object* v___y_7515_){
_start:
{
lean_object* v_res_7516_; 
v_res_7516_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4(v___y_7504_, v___y_7505_, v___y_7506_, v___y_7507_, v___y_7508_, v___y_7509_, v___y_7510_, v___y_7511_, v___y_7512_, v___y_7513_, v___y_7514_);
return v_res_7516_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1___lam__0(lean_object* v___y_7517_, lean_object* v_a_7518_, lean_object* v_s_7519_){
_start:
{
lean_object* v_rings_7520_; lean_object* v_typeIdOf_7521_; lean_object* v_exprToRingId_7522_; lean_object* v_semirings_7523_; lean_object* v_stypeIdOf_7524_; lean_object* v_exprToSemiringId_7525_; lean_object* v_ncRings_7526_; lean_object* v_exprToNCRingId_7527_; lean_object* v_nctypeIdOf_7528_; lean_object* v_ncSemirings_7529_; lean_object* v_exprToNCSemiringId_7530_; lean_object* v_ncstypeIdOf_7531_; lean_object* v_steps_7532_; lean_object* v___x_7533_; uint8_t v___x_7534_; 
v_rings_7520_ = lean_ctor_get(v_s_7519_, 0);
v_typeIdOf_7521_ = lean_ctor_get(v_s_7519_, 1);
v_exprToRingId_7522_ = lean_ctor_get(v_s_7519_, 2);
v_semirings_7523_ = lean_ctor_get(v_s_7519_, 3);
v_stypeIdOf_7524_ = lean_ctor_get(v_s_7519_, 4);
v_exprToSemiringId_7525_ = lean_ctor_get(v_s_7519_, 5);
v_ncRings_7526_ = lean_ctor_get(v_s_7519_, 6);
v_exprToNCRingId_7527_ = lean_ctor_get(v_s_7519_, 7);
v_nctypeIdOf_7528_ = lean_ctor_get(v_s_7519_, 8);
v_ncSemirings_7529_ = lean_ctor_get(v_s_7519_, 9);
v_exprToNCSemiringId_7530_ = lean_ctor_get(v_s_7519_, 10);
v_ncstypeIdOf_7531_ = lean_ctor_get(v_s_7519_, 11);
v_steps_7532_ = lean_ctor_get(v_s_7519_, 12);
v___x_7533_ = lean_array_get_size(v_semirings_7523_);
v___x_7534_ = lean_nat_dec_lt(v___y_7517_, v___x_7533_);
if (v___x_7534_ == 0)
{
lean_dec_ref(v_a_7518_);
return v_s_7519_;
}
else
{
lean_object* v___x_7536_; uint8_t v_isShared_7537_; uint8_t v_isSharedCheck_7576_; 
lean_inc(v_steps_7532_);
lean_inc_ref(v_ncstypeIdOf_7531_);
lean_inc_ref(v_exprToNCSemiringId_7530_);
lean_inc_ref(v_ncSemirings_7529_);
lean_inc_ref(v_nctypeIdOf_7528_);
lean_inc_ref(v_exprToNCRingId_7527_);
lean_inc_ref(v_ncRings_7526_);
lean_inc_ref(v_exprToSemiringId_7525_);
lean_inc_ref(v_stypeIdOf_7524_);
lean_inc_ref(v_semirings_7523_);
lean_inc_ref(v_exprToRingId_7522_);
lean_inc_ref(v_typeIdOf_7521_);
lean_inc_ref(v_rings_7520_);
v_isSharedCheck_7576_ = !lean_is_exclusive(v_s_7519_);
if (v_isSharedCheck_7576_ == 0)
{
lean_object* v_unused_7577_; lean_object* v_unused_7578_; lean_object* v_unused_7579_; lean_object* v_unused_7580_; lean_object* v_unused_7581_; lean_object* v_unused_7582_; lean_object* v_unused_7583_; lean_object* v_unused_7584_; lean_object* v_unused_7585_; lean_object* v_unused_7586_; lean_object* v_unused_7587_; lean_object* v_unused_7588_; lean_object* v_unused_7589_; 
v_unused_7577_ = lean_ctor_get(v_s_7519_, 12);
lean_dec(v_unused_7577_);
v_unused_7578_ = lean_ctor_get(v_s_7519_, 11);
lean_dec(v_unused_7578_);
v_unused_7579_ = lean_ctor_get(v_s_7519_, 10);
lean_dec(v_unused_7579_);
v_unused_7580_ = lean_ctor_get(v_s_7519_, 9);
lean_dec(v_unused_7580_);
v_unused_7581_ = lean_ctor_get(v_s_7519_, 8);
lean_dec(v_unused_7581_);
v_unused_7582_ = lean_ctor_get(v_s_7519_, 7);
lean_dec(v_unused_7582_);
v_unused_7583_ = lean_ctor_get(v_s_7519_, 6);
lean_dec(v_unused_7583_);
v_unused_7584_ = lean_ctor_get(v_s_7519_, 5);
lean_dec(v_unused_7584_);
v_unused_7585_ = lean_ctor_get(v_s_7519_, 4);
lean_dec(v_unused_7585_);
v_unused_7586_ = lean_ctor_get(v_s_7519_, 3);
lean_dec(v_unused_7586_);
v_unused_7587_ = lean_ctor_get(v_s_7519_, 2);
lean_dec(v_unused_7587_);
v_unused_7588_ = lean_ctor_get(v_s_7519_, 1);
lean_dec(v_unused_7588_);
v_unused_7589_ = lean_ctor_get(v_s_7519_, 0);
lean_dec(v_unused_7589_);
v___x_7536_ = v_s_7519_;
v_isShared_7537_ = v_isSharedCheck_7576_;
goto v_resetjp_7535_;
}
else
{
lean_dec(v_s_7519_);
v___x_7536_ = lean_box(0);
v_isShared_7537_ = v_isSharedCheck_7576_;
goto v_resetjp_7535_;
}
v_resetjp_7535_:
{
lean_object* v_v_7538_; lean_object* v_toSemiring_7539_; lean_object* v_ringId_7540_; lean_object* v_commSemiringInst_7541_; lean_object* v_addRightCancelInst_x3f_7542_; lean_object* v_toQFn_x3f_7543_; lean_object* v___x_7545_; uint8_t v_isShared_7546_; uint8_t v_isSharedCheck_7575_; 
v_v_7538_ = lean_array_fget(v_semirings_7523_, v___y_7517_);
v_toSemiring_7539_ = lean_ctor_get(v_v_7538_, 0);
v_ringId_7540_ = lean_ctor_get(v_v_7538_, 1);
v_commSemiringInst_7541_ = lean_ctor_get(v_v_7538_, 2);
v_addRightCancelInst_x3f_7542_ = lean_ctor_get(v_v_7538_, 3);
v_toQFn_x3f_7543_ = lean_ctor_get(v_v_7538_, 4);
v_isSharedCheck_7575_ = !lean_is_exclusive(v_v_7538_);
if (v_isSharedCheck_7575_ == 0)
{
v___x_7545_ = v_v_7538_;
v_isShared_7546_ = v_isSharedCheck_7575_;
goto v_resetjp_7544_;
}
else
{
lean_inc(v_toQFn_x3f_7543_);
lean_inc(v_addRightCancelInst_x3f_7542_);
lean_inc(v_commSemiringInst_7541_);
lean_inc(v_ringId_7540_);
lean_inc(v_toSemiring_7539_);
lean_dec(v_v_7538_);
v___x_7545_ = lean_box(0);
v_isShared_7546_ = v_isSharedCheck_7575_;
goto v_resetjp_7544_;
}
v_resetjp_7544_:
{
lean_object* v_id_7547_; lean_object* v_type_7548_; lean_object* v_u_7549_; lean_object* v_semiringInst_7550_; lean_object* v_mulFn_x3f_7551_; lean_object* v_powFn_x3f_7552_; lean_object* v_natCastFn_x3f_7553_; lean_object* v_denote_7554_; lean_object* v_vars_7555_; lean_object* v_varMap_7556_; lean_object* v___x_7558_; uint8_t v_isShared_7559_; uint8_t v_isSharedCheck_7573_; 
v_id_7547_ = lean_ctor_get(v_toSemiring_7539_, 0);
v_type_7548_ = lean_ctor_get(v_toSemiring_7539_, 1);
v_u_7549_ = lean_ctor_get(v_toSemiring_7539_, 2);
v_semiringInst_7550_ = lean_ctor_get(v_toSemiring_7539_, 3);
v_mulFn_x3f_7551_ = lean_ctor_get(v_toSemiring_7539_, 5);
v_powFn_x3f_7552_ = lean_ctor_get(v_toSemiring_7539_, 6);
v_natCastFn_x3f_7553_ = lean_ctor_get(v_toSemiring_7539_, 7);
v_denote_7554_ = lean_ctor_get(v_toSemiring_7539_, 8);
v_vars_7555_ = lean_ctor_get(v_toSemiring_7539_, 9);
v_varMap_7556_ = lean_ctor_get(v_toSemiring_7539_, 10);
v_isSharedCheck_7573_ = !lean_is_exclusive(v_toSemiring_7539_);
if (v_isSharedCheck_7573_ == 0)
{
lean_object* v_unused_7574_; 
v_unused_7574_ = lean_ctor_get(v_toSemiring_7539_, 4);
lean_dec(v_unused_7574_);
v___x_7558_ = v_toSemiring_7539_;
v_isShared_7559_ = v_isSharedCheck_7573_;
goto v_resetjp_7557_;
}
else
{
lean_inc(v_varMap_7556_);
lean_inc(v_vars_7555_);
lean_inc(v_denote_7554_);
lean_inc(v_natCastFn_x3f_7553_);
lean_inc(v_powFn_x3f_7552_);
lean_inc(v_mulFn_x3f_7551_);
lean_inc(v_semiringInst_7550_);
lean_inc(v_u_7549_);
lean_inc(v_type_7548_);
lean_inc(v_id_7547_);
lean_dec(v_toSemiring_7539_);
v___x_7558_ = lean_box(0);
v_isShared_7559_ = v_isSharedCheck_7573_;
goto v_resetjp_7557_;
}
v_resetjp_7557_:
{
lean_object* v___x_7560_; lean_object* v_xs_x27_7561_; lean_object* v___x_7562_; lean_object* v___x_7564_; 
v___x_7560_ = lean_box(0);
v_xs_x27_7561_ = lean_array_fset(v_semirings_7523_, v___y_7517_, v___x_7560_);
v___x_7562_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_7562_, 0, v_a_7518_);
if (v_isShared_7559_ == 0)
{
lean_ctor_set(v___x_7558_, 4, v___x_7562_);
v___x_7564_ = v___x_7558_;
goto v_reusejp_7563_;
}
else
{
lean_object* v_reuseFailAlloc_7572_; 
v_reuseFailAlloc_7572_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_7572_, 0, v_id_7547_);
lean_ctor_set(v_reuseFailAlloc_7572_, 1, v_type_7548_);
lean_ctor_set(v_reuseFailAlloc_7572_, 2, v_u_7549_);
lean_ctor_set(v_reuseFailAlloc_7572_, 3, v_semiringInst_7550_);
lean_ctor_set(v_reuseFailAlloc_7572_, 4, v___x_7562_);
lean_ctor_set(v_reuseFailAlloc_7572_, 5, v_mulFn_x3f_7551_);
lean_ctor_set(v_reuseFailAlloc_7572_, 6, v_powFn_x3f_7552_);
lean_ctor_set(v_reuseFailAlloc_7572_, 7, v_natCastFn_x3f_7553_);
lean_ctor_set(v_reuseFailAlloc_7572_, 8, v_denote_7554_);
lean_ctor_set(v_reuseFailAlloc_7572_, 9, v_vars_7555_);
lean_ctor_set(v_reuseFailAlloc_7572_, 10, v_varMap_7556_);
v___x_7564_ = v_reuseFailAlloc_7572_;
goto v_reusejp_7563_;
}
v_reusejp_7563_:
{
lean_object* v___x_7566_; 
if (v_isShared_7546_ == 0)
{
lean_ctor_set(v___x_7545_, 0, v___x_7564_);
v___x_7566_ = v___x_7545_;
goto v_reusejp_7565_;
}
else
{
lean_object* v_reuseFailAlloc_7571_; 
v_reuseFailAlloc_7571_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_7571_, 0, v___x_7564_);
lean_ctor_set(v_reuseFailAlloc_7571_, 1, v_ringId_7540_);
lean_ctor_set(v_reuseFailAlloc_7571_, 2, v_commSemiringInst_7541_);
lean_ctor_set(v_reuseFailAlloc_7571_, 3, v_addRightCancelInst_x3f_7542_);
lean_ctor_set(v_reuseFailAlloc_7571_, 4, v_toQFn_x3f_7543_);
v___x_7566_ = v_reuseFailAlloc_7571_;
goto v_reusejp_7565_;
}
v_reusejp_7565_:
{
lean_object* v___x_7567_; lean_object* v___x_7569_; 
v___x_7567_ = lean_array_fset(v_xs_x27_7561_, v___y_7517_, v___x_7566_);
if (v_isShared_7537_ == 0)
{
lean_ctor_set(v___x_7536_, 3, v___x_7567_);
v___x_7569_ = v___x_7536_;
goto v_reusejp_7568_;
}
else
{
lean_object* v_reuseFailAlloc_7570_; 
v_reuseFailAlloc_7570_ = lean_alloc_ctor(0, 13, 0);
lean_ctor_set(v_reuseFailAlloc_7570_, 0, v_rings_7520_);
lean_ctor_set(v_reuseFailAlloc_7570_, 1, v_typeIdOf_7521_);
lean_ctor_set(v_reuseFailAlloc_7570_, 2, v_exprToRingId_7522_);
lean_ctor_set(v_reuseFailAlloc_7570_, 3, v___x_7567_);
lean_ctor_set(v_reuseFailAlloc_7570_, 4, v_stypeIdOf_7524_);
lean_ctor_set(v_reuseFailAlloc_7570_, 5, v_exprToSemiringId_7525_);
lean_ctor_set(v_reuseFailAlloc_7570_, 6, v_ncRings_7526_);
lean_ctor_set(v_reuseFailAlloc_7570_, 7, v_exprToNCRingId_7527_);
lean_ctor_set(v_reuseFailAlloc_7570_, 8, v_nctypeIdOf_7528_);
lean_ctor_set(v_reuseFailAlloc_7570_, 9, v_ncSemirings_7529_);
lean_ctor_set(v_reuseFailAlloc_7570_, 10, v_exprToNCSemiringId_7530_);
lean_ctor_set(v_reuseFailAlloc_7570_, 11, v_ncstypeIdOf_7531_);
lean_ctor_set(v_reuseFailAlloc_7570_, 12, v_steps_7532_);
v___x_7569_ = v_reuseFailAlloc_7570_;
goto v_reusejp_7568_;
}
v_reusejp_7568_:
{
return v___x_7569_;
}
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1___lam__0___boxed(lean_object* v___y_7590_, lean_object* v_a_7591_, lean_object* v_s_7592_){
_start:
{
lean_object* v_res_7593_; 
v_res_7593_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1___lam__0(v___y_7590_, v_a_7591_, v_s_7592_);
lean_dec(v___y_7590_);
return v_res_7593_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2(lean_object* v_type_7594_, lean_object* v_u_7595_, lean_object* v_instDeclName_7596_, lean_object* v_declName_7597_, lean_object* v_expectedInst_7598_, lean_object* v___y_7599_, lean_object* v___y_7600_, lean_object* v___y_7601_, lean_object* v___y_7602_, lean_object* v___y_7603_, lean_object* v___y_7604_, lean_object* v___y_7605_, lean_object* v___y_7606_, lean_object* v___y_7607_, lean_object* v___y_7608_, lean_object* v___y_7609_){
_start:
{
lean_object* v___x_7611_; lean_object* v___x_7612_; lean_object* v___x_7613_; lean_object* v___x_7614_; lean_object* v___x_7615_; lean_object* v___x_7616_; lean_object* v___x_7617_; 
v___x_7611_ = lean_box(0);
lean_inc(v_u_7595_);
v___x_7612_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_7612_, 0, v_u_7595_);
lean_ctor_set(v___x_7612_, 1, v___x_7611_);
lean_inc(v_u_7595_);
v___x_7613_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_7613_, 0, v_u_7595_);
lean_ctor_set(v___x_7613_, 1, v___x_7612_);
v___x_7614_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_7614_, 0, v_u_7595_);
lean_ctor_set(v___x_7614_, 1, v___x_7613_);
lean_inc_ref(v___x_7614_);
v___x_7615_ = l_Lean_mkConst(v_instDeclName_7596_, v___x_7614_);
lean_inc_ref_n(v_type_7594_, 3);
v___x_7616_ = l_Lean_mkApp3(v___x_7615_, v_type_7594_, v_type_7594_, v_type_7594_);
lean_inc(v___y_7609_);
lean_inc_ref(v___y_7608_);
lean_inc(v___y_7607_);
lean_inc_ref(v___y_7606_);
v___x_7617_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3(v___x_7616_, v___y_7599_, v___y_7600_, v___y_7601_, v___y_7602_, v___y_7603_, v___y_7604_, v___y_7605_, v___y_7606_, v___y_7607_, v___y_7608_, v___y_7609_);
if (lean_obj_tag(v___x_7617_) == 0)
{
lean_object* v_a_7618_; lean_object* v___x_7619_; 
v_a_7618_ = lean_ctor_get(v___x_7617_, 0);
lean_inc(v_a_7618_);
lean_dec_ref(v___x_7617_);
lean_inc(v___y_7609_);
lean_inc_ref(v___y_7608_);
lean_inc(v___y_7607_);
lean_inc_ref(v___y_7606_);
lean_inc(v_a_7618_);
lean_inc(v_declName_7597_);
v___x_7619_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v_declName_7597_, v_a_7618_, v_expectedInst_7598_, v___y_7606_, v___y_7607_, v___y_7608_, v___y_7609_);
if (lean_obj_tag(v___x_7619_) == 0)
{
lean_object* v___x_7620_; lean_object* v___x_7621_; lean_object* v___x_7622_; 
lean_dec_ref(v___x_7619_);
v___x_7620_ = l_Lean_mkConst(v_declName_7597_, v___x_7614_);
lean_inc_ref_n(v_type_7594_, 2);
v___x_7621_ = l_Lean_mkApp4(v___x_7620_, v_type_7594_, v_type_7594_, v_type_7594_, v_a_7618_);
lean_inc(v___y_7605_);
v___x_7622_ = lean_grind_canon(v___x_7621_, v___y_7600_, v___y_7601_, v___y_7602_, v___y_7603_, v___y_7604_, v___y_7605_, v___y_7606_, v___y_7607_, v___y_7608_, v___y_7609_);
if (lean_obj_tag(v___x_7622_) == 0)
{
lean_object* v_a_7623_; lean_object* v___x_7624_; 
v_a_7623_ = lean_ctor_get(v___x_7622_, 0);
lean_inc(v_a_7623_);
lean_dec_ref(v___x_7622_);
v___x_7624_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_7623_, v___y_7605_);
lean_dec(v___y_7605_);
return v___x_7624_;
}
else
{
lean_dec(v___y_7605_);
return v___x_7622_;
}
}
else
{
lean_object* v_a_7625_; lean_object* v___x_7627_; uint8_t v_isShared_7628_; uint8_t v_isSharedCheck_7632_; 
lean_dec(v_a_7618_);
lean_dec_ref(v___x_7614_);
lean_dec(v___y_7609_);
lean_dec_ref(v___y_7608_);
lean_dec(v___y_7607_);
lean_dec_ref(v___y_7606_);
lean_dec(v___y_7605_);
lean_dec_ref(v___y_7604_);
lean_dec(v___y_7603_);
lean_dec_ref(v___y_7602_);
lean_dec(v___y_7601_);
lean_dec(v___y_7600_);
lean_dec(v_declName_7597_);
lean_dec_ref(v_type_7594_);
v_a_7625_ = lean_ctor_get(v___x_7619_, 0);
v_isSharedCheck_7632_ = !lean_is_exclusive(v___x_7619_);
if (v_isSharedCheck_7632_ == 0)
{
v___x_7627_ = v___x_7619_;
v_isShared_7628_ = v_isSharedCheck_7632_;
goto v_resetjp_7626_;
}
else
{
lean_inc(v_a_7625_);
lean_dec(v___x_7619_);
v___x_7627_ = lean_box(0);
v_isShared_7628_ = v_isSharedCheck_7632_;
goto v_resetjp_7626_;
}
v_resetjp_7626_:
{
lean_object* v___x_7630_; 
if (v_isShared_7628_ == 0)
{
v___x_7630_ = v___x_7627_;
goto v_reusejp_7629_;
}
else
{
lean_object* v_reuseFailAlloc_7631_; 
v_reuseFailAlloc_7631_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7631_, 0, v_a_7625_);
v___x_7630_ = v_reuseFailAlloc_7631_;
goto v_reusejp_7629_;
}
v_reusejp_7629_:
{
return v___x_7630_;
}
}
}
}
else
{
lean_dec_ref(v___x_7614_);
lean_dec(v___y_7609_);
lean_dec_ref(v___y_7608_);
lean_dec(v___y_7607_);
lean_dec_ref(v___y_7606_);
lean_dec(v___y_7605_);
lean_dec_ref(v___y_7604_);
lean_dec(v___y_7603_);
lean_dec_ref(v___y_7602_);
lean_dec(v___y_7601_);
lean_dec(v___y_7600_);
lean_dec_ref(v_expectedInst_7598_);
lean_dec(v_declName_7597_);
lean_dec_ref(v_type_7594_);
return v___x_7617_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2___boxed(lean_object** _args){
lean_object* v_type_7633_ = _args[0];
lean_object* v_u_7634_ = _args[1];
lean_object* v_instDeclName_7635_ = _args[2];
lean_object* v_declName_7636_ = _args[3];
lean_object* v_expectedInst_7637_ = _args[4];
lean_object* v___y_7638_ = _args[5];
lean_object* v___y_7639_ = _args[6];
lean_object* v___y_7640_ = _args[7];
lean_object* v___y_7641_ = _args[8];
lean_object* v___y_7642_ = _args[9];
lean_object* v___y_7643_ = _args[10];
lean_object* v___y_7644_ = _args[11];
lean_object* v___y_7645_ = _args[12];
lean_object* v___y_7646_ = _args[13];
lean_object* v___y_7647_ = _args[14];
lean_object* v___y_7648_ = _args[15];
lean_object* v___y_7649_ = _args[16];
_start:
{
lean_object* v_res_7650_; 
v_res_7650_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2(v_type_7633_, v_u_7634_, v_instDeclName_7635_, v_declName_7636_, v_expectedInst_7637_, v___y_7638_, v___y_7639_, v___y_7640_, v___y_7641_, v___y_7642_, v___y_7643_, v___y_7644_, v___y_7645_, v___y_7646_, v___y_7647_, v___y_7648_);
lean_dec(v___y_7638_);
return v_res_7650_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1(lean_object* v___y_7651_, lean_object* v___y_7652_, lean_object* v___y_7653_, lean_object* v___y_7654_, lean_object* v___y_7655_, lean_object* v___y_7656_, lean_object* v___y_7657_, lean_object* v___y_7658_, lean_object* v___y_7659_, lean_object* v___y_7660_, lean_object* v___y_7661_){
_start:
{
lean_object* v___x_7663_; 
v___x_7663_ = l_Lean_Meta_Grind_Arith_CommRing_SemiringM_getCommSemiring(v___y_7651_, v___y_7652_, v___y_7653_, v___y_7654_, v___y_7655_, v___y_7656_, v___y_7657_, v___y_7658_, v___y_7659_, v___y_7660_, v___y_7661_);
if (lean_obj_tag(v___x_7663_) == 0)
{
lean_object* v_a_7664_; lean_object* v___x_7666_; uint8_t v_isShared_7667_; uint8_t v_isSharedCheck_7708_; 
v_a_7664_ = lean_ctor_get(v___x_7663_, 0);
v_isSharedCheck_7708_ = !lean_is_exclusive(v___x_7663_);
if (v_isSharedCheck_7708_ == 0)
{
v___x_7666_ = v___x_7663_;
v_isShared_7667_ = v_isSharedCheck_7708_;
goto v_resetjp_7665_;
}
else
{
lean_inc(v_a_7664_);
lean_dec(v___x_7663_);
v___x_7666_ = lean_box(0);
v_isShared_7667_ = v_isSharedCheck_7708_;
goto v_resetjp_7665_;
}
v_resetjp_7665_:
{
lean_object* v_toSemiring_7668_; lean_object* v_addFn_x3f_7669_; 
v_toSemiring_7668_ = lean_ctor_get(v_a_7664_, 0);
lean_inc_ref(v_toSemiring_7668_);
lean_dec(v_a_7664_);
v_addFn_x3f_7669_ = lean_ctor_get(v_toSemiring_7668_, 4);
if (lean_obj_tag(v_addFn_x3f_7669_) == 1)
{
lean_object* v_val_7670_; lean_object* v___x_7672_; 
lean_inc_ref(v_addFn_x3f_7669_);
lean_dec_ref(v_toSemiring_7668_);
lean_dec(v___y_7661_);
lean_dec_ref(v___y_7660_);
lean_dec(v___y_7659_);
lean_dec_ref(v___y_7658_);
lean_dec(v___y_7657_);
lean_dec_ref(v___y_7656_);
lean_dec(v___y_7655_);
lean_dec_ref(v___y_7654_);
lean_dec(v___y_7653_);
lean_dec(v___y_7652_);
lean_dec(v___y_7651_);
v_val_7670_ = lean_ctor_get(v_addFn_x3f_7669_, 0);
lean_inc(v_val_7670_);
lean_dec_ref(v_addFn_x3f_7669_);
if (v_isShared_7667_ == 0)
{
lean_ctor_set(v___x_7666_, 0, v_val_7670_);
v___x_7672_ = v___x_7666_;
goto v_reusejp_7671_;
}
else
{
lean_object* v_reuseFailAlloc_7673_; 
v_reuseFailAlloc_7673_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7673_, 0, v_val_7670_);
v___x_7672_ = v_reuseFailAlloc_7673_;
goto v_reusejp_7671_;
}
v_reusejp_7671_:
{
return v___x_7672_;
}
}
else
{
lean_object* v_type_7674_; lean_object* v_u_7675_; lean_object* v_semiringInst_7676_; lean_object* v___x_7677_; lean_object* v___x_7678_; lean_object* v___x_7679_; lean_object* v___x_7680_; lean_object* v___x_7681_; lean_object* v___x_7682_; lean_object* v___x_7683_; lean_object* v_expectedInst_7684_; lean_object* v___x_7685_; lean_object* v___x_7686_; lean_object* v___x_7687_; 
lean_del_object(v___x_7666_);
v_type_7674_ = lean_ctor_get(v_toSemiring_7668_, 1);
lean_inc_ref(v_type_7674_);
v_u_7675_ = lean_ctor_get(v_toSemiring_7668_, 2);
lean_inc(v_u_7675_);
v_semiringInst_7676_ = lean_ctor_get(v_toSemiring_7668_, 3);
lean_inc_ref(v_semiringInst_7676_);
lean_dec_ref(v_toSemiring_7668_);
v___x_7677_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__1));
v___x_7678_ = lean_box(0);
lean_inc(v_u_7675_);
v___x_7679_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_7679_, 0, v_u_7675_);
lean_ctor_set(v___x_7679_, 1, v___x_7678_);
lean_inc_ref(v___x_7679_);
v___x_7680_ = l_Lean_mkConst(v___x_7677_, v___x_7679_);
v___x_7681_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3));
v___x_7682_ = l_Lean_mkConst(v___x_7681_, v___x_7679_);
lean_inc_ref(v_type_7674_);
v___x_7683_ = l_Lean_mkAppB(v___x_7682_, v_type_7674_, v_semiringInst_7676_);
lean_inc_ref(v_type_7674_);
v_expectedInst_7684_ = l_Lean_mkAppB(v___x_7680_, v_type_7674_, v___x_7683_);
v___x_7685_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__4));
v___x_7686_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
lean_inc(v___y_7652_);
v___x_7687_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2(v_type_7674_, v_u_7675_, v___x_7685_, v___x_7686_, v_expectedInst_7684_, v___y_7651_, v___y_7652_, v___y_7653_, v___y_7654_, v___y_7655_, v___y_7656_, v___y_7657_, v___y_7658_, v___y_7659_, v___y_7660_, v___y_7661_);
if (lean_obj_tag(v___x_7687_) == 0)
{
lean_object* v_a_7688_; lean_object* v___f_7689_; lean_object* v___x_7690_; lean_object* v___x_7691_; 
v_a_7688_ = lean_ctor_get(v___x_7687_, 0);
lean_inc(v_a_7688_);
lean_dec_ref(v___x_7687_);
lean_inc(v_a_7688_);
v___f_7689_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1___lam__0___boxed), 3, 2);
lean_closure_set(v___f_7689_, 0, v___y_7651_);
lean_closure_set(v___f_7689_, 1, v_a_7688_);
v___x_7690_ = l_Lean_Meta_Grind_Arith_CommRing_ringExt;
v___x_7691_ = l___private_Lean_Meta_Tactic_Grind_Types_0__Lean_Meta_Grind_SolverExtension_modifyStateImpl___redArg(v___x_7690_, v___f_7689_, v___y_7652_);
lean_dec(v___y_7652_);
if (lean_obj_tag(v___x_7691_) == 0)
{
lean_object* v___x_7693_; uint8_t v_isShared_7694_; uint8_t v_isSharedCheck_7698_; 
v_isSharedCheck_7698_ = !lean_is_exclusive(v___x_7691_);
if (v_isSharedCheck_7698_ == 0)
{
lean_object* v_unused_7699_; 
v_unused_7699_ = lean_ctor_get(v___x_7691_, 0);
lean_dec(v_unused_7699_);
v___x_7693_ = v___x_7691_;
v_isShared_7694_ = v_isSharedCheck_7698_;
goto v_resetjp_7692_;
}
else
{
lean_dec(v___x_7691_);
v___x_7693_ = lean_box(0);
v_isShared_7694_ = v_isSharedCheck_7698_;
goto v_resetjp_7692_;
}
v_resetjp_7692_:
{
lean_object* v___x_7696_; 
if (v_isShared_7694_ == 0)
{
lean_ctor_set(v___x_7693_, 0, v_a_7688_);
v___x_7696_ = v___x_7693_;
goto v_reusejp_7695_;
}
else
{
lean_object* v_reuseFailAlloc_7697_; 
v_reuseFailAlloc_7697_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7697_, 0, v_a_7688_);
v___x_7696_ = v_reuseFailAlloc_7697_;
goto v_reusejp_7695_;
}
v_reusejp_7695_:
{
return v___x_7696_;
}
}
}
else
{
lean_object* v_a_7700_; lean_object* v___x_7702_; uint8_t v_isShared_7703_; uint8_t v_isSharedCheck_7707_; 
lean_dec(v_a_7688_);
v_a_7700_ = lean_ctor_get(v___x_7691_, 0);
v_isSharedCheck_7707_ = !lean_is_exclusive(v___x_7691_);
if (v_isSharedCheck_7707_ == 0)
{
v___x_7702_ = v___x_7691_;
v_isShared_7703_ = v_isSharedCheck_7707_;
goto v_resetjp_7701_;
}
else
{
lean_inc(v_a_7700_);
lean_dec(v___x_7691_);
v___x_7702_ = lean_box(0);
v_isShared_7703_ = v_isSharedCheck_7707_;
goto v_resetjp_7701_;
}
v_resetjp_7701_:
{
lean_object* v___x_7705_; 
if (v_isShared_7703_ == 0)
{
v___x_7705_ = v___x_7702_;
goto v_reusejp_7704_;
}
else
{
lean_object* v_reuseFailAlloc_7706_; 
v_reuseFailAlloc_7706_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7706_, 0, v_a_7700_);
v___x_7705_ = v_reuseFailAlloc_7706_;
goto v_reusejp_7704_;
}
v_reusejp_7704_:
{
return v___x_7705_;
}
}
}
}
else
{
lean_dec(v___y_7652_);
lean_dec(v___y_7651_);
return v___x_7687_;
}
}
}
}
else
{
lean_object* v_a_7709_; lean_object* v___x_7711_; uint8_t v_isShared_7712_; uint8_t v_isSharedCheck_7716_; 
lean_dec(v___y_7661_);
lean_dec_ref(v___y_7660_);
lean_dec(v___y_7659_);
lean_dec_ref(v___y_7658_);
lean_dec(v___y_7657_);
lean_dec_ref(v___y_7656_);
lean_dec(v___y_7655_);
lean_dec_ref(v___y_7654_);
lean_dec(v___y_7653_);
lean_dec(v___y_7652_);
lean_dec(v___y_7651_);
v_a_7709_ = lean_ctor_get(v___x_7663_, 0);
v_isSharedCheck_7716_ = !lean_is_exclusive(v___x_7663_);
if (v_isSharedCheck_7716_ == 0)
{
v___x_7711_ = v___x_7663_;
v_isShared_7712_ = v_isSharedCheck_7716_;
goto v_resetjp_7710_;
}
else
{
lean_inc(v_a_7709_);
lean_dec(v___x_7663_);
v___x_7711_ = lean_box(0);
v_isShared_7712_ = v_isSharedCheck_7716_;
goto v_resetjp_7710_;
}
v_resetjp_7710_:
{
lean_object* v___x_7714_; 
if (v_isShared_7712_ == 0)
{
v___x_7714_ = v___x_7711_;
goto v_reusejp_7713_;
}
else
{
lean_object* v_reuseFailAlloc_7715_; 
v_reuseFailAlloc_7715_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7715_, 0, v_a_7709_);
v___x_7714_ = v_reuseFailAlloc_7715_;
goto v_reusejp_7713_;
}
v_reusejp_7713_:
{
return v___x_7714_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1___boxed(lean_object* v___y_7717_, lean_object* v___y_7718_, lean_object* v___y_7719_, lean_object* v___y_7720_, lean_object* v___y_7721_, lean_object* v___y_7722_, lean_object* v___y_7723_, lean_object* v___y_7724_, lean_object* v___y_7725_, lean_object* v___y_7726_, lean_object* v___y_7727_, lean_object* v___y_7728_){
_start:
{
lean_object* v_res_7729_; 
v_res_7729_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1(v___y_7717_, v___y_7718_, v___y_7719_, v___y_7720_, v___y_7721_, v___y_7722_, v___y_7723_, v___y_7724_, v___y_7725_, v___y_7726_, v___y_7727_);
return v_res_7729_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5___lam__0(lean_object* v___y_7730_, lean_object* v_a_7731_, lean_object* v_s_7732_){
_start:
{
lean_object* v_rings_7733_; lean_object* v_typeIdOf_7734_; lean_object* v_exprToRingId_7735_; lean_object* v_semirings_7736_; lean_object* v_stypeIdOf_7737_; lean_object* v_exprToSemiringId_7738_; lean_object* v_ncRings_7739_; lean_object* v_exprToNCRingId_7740_; lean_object* v_nctypeIdOf_7741_; lean_object* v_ncSemirings_7742_; lean_object* v_exprToNCSemiringId_7743_; lean_object* v_ncstypeIdOf_7744_; lean_object* v_steps_7745_; lean_object* v___x_7746_; uint8_t v___x_7747_; 
v_rings_7733_ = lean_ctor_get(v_s_7732_, 0);
v_typeIdOf_7734_ = lean_ctor_get(v_s_7732_, 1);
v_exprToRingId_7735_ = lean_ctor_get(v_s_7732_, 2);
v_semirings_7736_ = lean_ctor_get(v_s_7732_, 3);
v_stypeIdOf_7737_ = lean_ctor_get(v_s_7732_, 4);
v_exprToSemiringId_7738_ = lean_ctor_get(v_s_7732_, 5);
v_ncRings_7739_ = lean_ctor_get(v_s_7732_, 6);
v_exprToNCRingId_7740_ = lean_ctor_get(v_s_7732_, 7);
v_nctypeIdOf_7741_ = lean_ctor_get(v_s_7732_, 8);
v_ncSemirings_7742_ = lean_ctor_get(v_s_7732_, 9);
v_exprToNCSemiringId_7743_ = lean_ctor_get(v_s_7732_, 10);
v_ncstypeIdOf_7744_ = lean_ctor_get(v_s_7732_, 11);
v_steps_7745_ = lean_ctor_get(v_s_7732_, 12);
v___x_7746_ = lean_array_get_size(v_semirings_7736_);
v___x_7747_ = lean_nat_dec_lt(v___y_7730_, v___x_7746_);
if (v___x_7747_ == 0)
{
lean_dec_ref(v_a_7731_);
return v_s_7732_;
}
else
{
lean_object* v___x_7749_; uint8_t v_isShared_7750_; uint8_t v_isSharedCheck_7789_; 
lean_inc(v_steps_7745_);
lean_inc_ref(v_ncstypeIdOf_7744_);
lean_inc_ref(v_exprToNCSemiringId_7743_);
lean_inc_ref(v_ncSemirings_7742_);
lean_inc_ref(v_nctypeIdOf_7741_);
lean_inc_ref(v_exprToNCRingId_7740_);
lean_inc_ref(v_ncRings_7739_);
lean_inc_ref(v_exprToSemiringId_7738_);
lean_inc_ref(v_stypeIdOf_7737_);
lean_inc_ref(v_semirings_7736_);
lean_inc_ref(v_exprToRingId_7735_);
lean_inc_ref(v_typeIdOf_7734_);
lean_inc_ref(v_rings_7733_);
v_isSharedCheck_7789_ = !lean_is_exclusive(v_s_7732_);
if (v_isSharedCheck_7789_ == 0)
{
lean_object* v_unused_7790_; lean_object* v_unused_7791_; lean_object* v_unused_7792_; lean_object* v_unused_7793_; lean_object* v_unused_7794_; lean_object* v_unused_7795_; lean_object* v_unused_7796_; lean_object* v_unused_7797_; lean_object* v_unused_7798_; lean_object* v_unused_7799_; lean_object* v_unused_7800_; lean_object* v_unused_7801_; lean_object* v_unused_7802_; 
v_unused_7790_ = lean_ctor_get(v_s_7732_, 12);
lean_dec(v_unused_7790_);
v_unused_7791_ = lean_ctor_get(v_s_7732_, 11);
lean_dec(v_unused_7791_);
v_unused_7792_ = lean_ctor_get(v_s_7732_, 10);
lean_dec(v_unused_7792_);
v_unused_7793_ = lean_ctor_get(v_s_7732_, 9);
lean_dec(v_unused_7793_);
v_unused_7794_ = lean_ctor_get(v_s_7732_, 8);
lean_dec(v_unused_7794_);
v_unused_7795_ = lean_ctor_get(v_s_7732_, 7);
lean_dec(v_unused_7795_);
v_unused_7796_ = lean_ctor_get(v_s_7732_, 6);
lean_dec(v_unused_7796_);
v_unused_7797_ = lean_ctor_get(v_s_7732_, 5);
lean_dec(v_unused_7797_);
v_unused_7798_ = lean_ctor_get(v_s_7732_, 4);
lean_dec(v_unused_7798_);
v_unused_7799_ = lean_ctor_get(v_s_7732_, 3);
lean_dec(v_unused_7799_);
v_unused_7800_ = lean_ctor_get(v_s_7732_, 2);
lean_dec(v_unused_7800_);
v_unused_7801_ = lean_ctor_get(v_s_7732_, 1);
lean_dec(v_unused_7801_);
v_unused_7802_ = lean_ctor_get(v_s_7732_, 0);
lean_dec(v_unused_7802_);
v___x_7749_ = v_s_7732_;
v_isShared_7750_ = v_isSharedCheck_7789_;
goto v_resetjp_7748_;
}
else
{
lean_dec(v_s_7732_);
v___x_7749_ = lean_box(0);
v_isShared_7750_ = v_isSharedCheck_7789_;
goto v_resetjp_7748_;
}
v_resetjp_7748_:
{
lean_object* v_v_7751_; lean_object* v_toSemiring_7752_; lean_object* v_ringId_7753_; lean_object* v_commSemiringInst_7754_; lean_object* v_addRightCancelInst_x3f_7755_; lean_object* v_toQFn_x3f_7756_; lean_object* v___x_7758_; uint8_t v_isShared_7759_; uint8_t v_isSharedCheck_7788_; 
v_v_7751_ = lean_array_fget(v_semirings_7736_, v___y_7730_);
v_toSemiring_7752_ = lean_ctor_get(v_v_7751_, 0);
v_ringId_7753_ = lean_ctor_get(v_v_7751_, 1);
v_commSemiringInst_7754_ = lean_ctor_get(v_v_7751_, 2);
v_addRightCancelInst_x3f_7755_ = lean_ctor_get(v_v_7751_, 3);
v_toQFn_x3f_7756_ = lean_ctor_get(v_v_7751_, 4);
v_isSharedCheck_7788_ = !lean_is_exclusive(v_v_7751_);
if (v_isSharedCheck_7788_ == 0)
{
v___x_7758_ = v_v_7751_;
v_isShared_7759_ = v_isSharedCheck_7788_;
goto v_resetjp_7757_;
}
else
{
lean_inc(v_toQFn_x3f_7756_);
lean_inc(v_addRightCancelInst_x3f_7755_);
lean_inc(v_commSemiringInst_7754_);
lean_inc(v_ringId_7753_);
lean_inc(v_toSemiring_7752_);
lean_dec(v_v_7751_);
v___x_7758_ = lean_box(0);
v_isShared_7759_ = v_isSharedCheck_7788_;
goto v_resetjp_7757_;
}
v_resetjp_7757_:
{
lean_object* v_id_7760_; lean_object* v_type_7761_; lean_object* v_u_7762_; lean_object* v_semiringInst_7763_; lean_object* v_addFn_x3f_7764_; lean_object* v_mulFn_x3f_7765_; lean_object* v_powFn_x3f_7766_; lean_object* v_denote_7767_; lean_object* v_vars_7768_; lean_object* v_varMap_7769_; lean_object* v___x_7771_; uint8_t v_isShared_7772_; uint8_t v_isSharedCheck_7786_; 
v_id_7760_ = lean_ctor_get(v_toSemiring_7752_, 0);
v_type_7761_ = lean_ctor_get(v_toSemiring_7752_, 1);
v_u_7762_ = lean_ctor_get(v_toSemiring_7752_, 2);
v_semiringInst_7763_ = lean_ctor_get(v_toSemiring_7752_, 3);
v_addFn_x3f_7764_ = lean_ctor_get(v_toSemiring_7752_, 4);
v_mulFn_x3f_7765_ = lean_ctor_get(v_toSemiring_7752_, 5);
v_powFn_x3f_7766_ = lean_ctor_get(v_toSemiring_7752_, 6);
v_denote_7767_ = lean_ctor_get(v_toSemiring_7752_, 8);
v_vars_7768_ = lean_ctor_get(v_toSemiring_7752_, 9);
v_varMap_7769_ = lean_ctor_get(v_toSemiring_7752_, 10);
v_isSharedCheck_7786_ = !lean_is_exclusive(v_toSemiring_7752_);
if (v_isSharedCheck_7786_ == 0)
{
lean_object* v_unused_7787_; 
v_unused_7787_ = lean_ctor_get(v_toSemiring_7752_, 7);
lean_dec(v_unused_7787_);
v___x_7771_ = v_toSemiring_7752_;
v_isShared_7772_ = v_isSharedCheck_7786_;
goto v_resetjp_7770_;
}
else
{
lean_inc(v_varMap_7769_);
lean_inc(v_vars_7768_);
lean_inc(v_denote_7767_);
lean_inc(v_powFn_x3f_7766_);
lean_inc(v_mulFn_x3f_7765_);
lean_inc(v_addFn_x3f_7764_);
lean_inc(v_semiringInst_7763_);
lean_inc(v_u_7762_);
lean_inc(v_type_7761_);
lean_inc(v_id_7760_);
lean_dec(v_toSemiring_7752_);
v___x_7771_ = lean_box(0);
v_isShared_7772_ = v_isSharedCheck_7786_;
goto v_resetjp_7770_;
}
v_resetjp_7770_:
{
lean_object* v___x_7773_; lean_object* v_xs_x27_7774_; lean_object* v___x_7775_; lean_object* v___x_7777_; 
v___x_7773_ = lean_box(0);
v_xs_x27_7774_ = lean_array_fset(v_semirings_7736_, v___y_7730_, v___x_7773_);
v___x_7775_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_7775_, 0, v_a_7731_);
if (v_isShared_7772_ == 0)
{
lean_ctor_set(v___x_7771_, 7, v___x_7775_);
v___x_7777_ = v___x_7771_;
goto v_reusejp_7776_;
}
else
{
lean_object* v_reuseFailAlloc_7785_; 
v_reuseFailAlloc_7785_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_7785_, 0, v_id_7760_);
lean_ctor_set(v_reuseFailAlloc_7785_, 1, v_type_7761_);
lean_ctor_set(v_reuseFailAlloc_7785_, 2, v_u_7762_);
lean_ctor_set(v_reuseFailAlloc_7785_, 3, v_semiringInst_7763_);
lean_ctor_set(v_reuseFailAlloc_7785_, 4, v_addFn_x3f_7764_);
lean_ctor_set(v_reuseFailAlloc_7785_, 5, v_mulFn_x3f_7765_);
lean_ctor_set(v_reuseFailAlloc_7785_, 6, v_powFn_x3f_7766_);
lean_ctor_set(v_reuseFailAlloc_7785_, 7, v___x_7775_);
lean_ctor_set(v_reuseFailAlloc_7785_, 8, v_denote_7767_);
lean_ctor_set(v_reuseFailAlloc_7785_, 9, v_vars_7768_);
lean_ctor_set(v_reuseFailAlloc_7785_, 10, v_varMap_7769_);
v___x_7777_ = v_reuseFailAlloc_7785_;
goto v_reusejp_7776_;
}
v_reusejp_7776_:
{
lean_object* v___x_7779_; 
if (v_isShared_7759_ == 0)
{
lean_ctor_set(v___x_7758_, 0, v___x_7777_);
v___x_7779_ = v___x_7758_;
goto v_reusejp_7778_;
}
else
{
lean_object* v_reuseFailAlloc_7784_; 
v_reuseFailAlloc_7784_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_7784_, 0, v___x_7777_);
lean_ctor_set(v_reuseFailAlloc_7784_, 1, v_ringId_7753_);
lean_ctor_set(v_reuseFailAlloc_7784_, 2, v_commSemiringInst_7754_);
lean_ctor_set(v_reuseFailAlloc_7784_, 3, v_addRightCancelInst_x3f_7755_);
lean_ctor_set(v_reuseFailAlloc_7784_, 4, v_toQFn_x3f_7756_);
v___x_7779_ = v_reuseFailAlloc_7784_;
goto v_reusejp_7778_;
}
v_reusejp_7778_:
{
lean_object* v___x_7780_; lean_object* v___x_7782_; 
v___x_7780_ = lean_array_fset(v_xs_x27_7774_, v___y_7730_, v___x_7779_);
if (v_isShared_7750_ == 0)
{
lean_ctor_set(v___x_7749_, 3, v___x_7780_);
v___x_7782_ = v___x_7749_;
goto v_reusejp_7781_;
}
else
{
lean_object* v_reuseFailAlloc_7783_; 
v_reuseFailAlloc_7783_ = lean_alloc_ctor(0, 13, 0);
lean_ctor_set(v_reuseFailAlloc_7783_, 0, v_rings_7733_);
lean_ctor_set(v_reuseFailAlloc_7783_, 1, v_typeIdOf_7734_);
lean_ctor_set(v_reuseFailAlloc_7783_, 2, v_exprToRingId_7735_);
lean_ctor_set(v_reuseFailAlloc_7783_, 3, v___x_7780_);
lean_ctor_set(v_reuseFailAlloc_7783_, 4, v_stypeIdOf_7737_);
lean_ctor_set(v_reuseFailAlloc_7783_, 5, v_exprToSemiringId_7738_);
lean_ctor_set(v_reuseFailAlloc_7783_, 6, v_ncRings_7739_);
lean_ctor_set(v_reuseFailAlloc_7783_, 7, v_exprToNCRingId_7740_);
lean_ctor_set(v_reuseFailAlloc_7783_, 8, v_nctypeIdOf_7741_);
lean_ctor_set(v_reuseFailAlloc_7783_, 9, v_ncSemirings_7742_);
lean_ctor_set(v_reuseFailAlloc_7783_, 10, v_exprToNCSemiringId_7743_);
lean_ctor_set(v_reuseFailAlloc_7783_, 11, v_ncstypeIdOf_7744_);
lean_ctor_set(v_reuseFailAlloc_7783_, 12, v_steps_7745_);
v___x_7782_ = v_reuseFailAlloc_7783_;
goto v_reusejp_7781_;
}
v_reusejp_7781_:
{
return v___x_7782_;
}
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5___lam__0___boxed(lean_object* v___y_7803_, lean_object* v_a_7804_, lean_object* v_s_7805_){
_start:
{
lean_object* v_res_7806_; 
v_res_7806_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5___lam__0(v___y_7803_, v_a_7804_, v_s_7805_);
lean_dec(v___y_7803_);
return v_res_7806_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8___redArg(lean_object* v_u_7807_, lean_object* v_type_7808_, lean_object* v_semiringInst_7809_, lean_object* v___y_7810_, lean_object* v___y_7811_, lean_object* v___y_7812_, lean_object* v___y_7813_, lean_object* v___y_7814_, lean_object* v___y_7815_, lean_object* v___y_7816_, lean_object* v___y_7817_, lean_object* v___y_7818_, lean_object* v___y_7819_){
_start:
{
lean_object* v___x_7821_; lean_object* v___x_7822_; lean_object* v___x_7823_; lean_object* v___x_7824_; lean_object* v_inst_x27_7825_; lean_object* v_inst_7827_; lean_object* v___y_7828_; lean_object* v___y_7829_; lean_object* v___y_7830_; lean_object* v___y_7831_; lean_object* v___y_7832_; lean_object* v___y_7833_; lean_object* v___y_7834_; lean_object* v___y_7835_; lean_object* v___y_7836_; lean_object* v___y_7837_; lean_object* v___x_7844_; lean_object* v___x_7845_; lean_object* v_instType_7846_; lean_object* v___x_7847_; 
v___x_7821_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0));
v___x_7822_ = lean_box(0);
v___x_7823_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_7823_, 0, v_u_7807_);
lean_ctor_set(v___x_7823_, 1, v___x_7822_);
lean_inc_ref(v___x_7823_);
v___x_7824_ = l_Lean_mkConst(v___x_7821_, v___x_7823_);
lean_inc_ref(v_type_7808_);
v_inst_x27_7825_ = l_Lean_mkAppB(v___x_7824_, v_type_7808_, v_semiringInst_7809_);
v___x_7844_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__1));
lean_inc_ref(v___x_7823_);
v___x_7845_ = l_Lean_mkConst(v___x_7844_, v___x_7823_);
lean_inc_ref(v_type_7808_);
v_instType_7846_ = l_Lean_Expr_app___override(v___x_7845_, v_type_7808_);
lean_inc(v___y_7819_);
lean_inc_ref(v___y_7818_);
lean_inc(v___y_7817_);
lean_inc_ref(v___y_7816_);
v___x_7847_ = l_Lean_Meta_Grind_synthInstanceMeta_x3f(v_instType_7846_, v___y_7816_, v___y_7817_, v___y_7818_, v___y_7819_);
if (lean_obj_tag(v___x_7847_) == 0)
{
lean_object* v_a_7848_; 
v_a_7848_ = lean_ctor_get(v___x_7847_, 0);
lean_inc(v_a_7848_);
lean_dec_ref(v___x_7847_);
if (lean_obj_tag(v_a_7848_) == 0)
{
v_inst_7827_ = v_inst_x27_7825_;
v___y_7828_ = v___y_7810_;
v___y_7829_ = v___y_7811_;
v___y_7830_ = v___y_7812_;
v___y_7831_ = v___y_7813_;
v___y_7832_ = v___y_7814_;
v___y_7833_ = v___y_7815_;
v___y_7834_ = v___y_7816_;
v___y_7835_ = v___y_7817_;
v___y_7836_ = v___y_7818_;
v___y_7837_ = v___y_7819_;
goto v___jp_7826_;
}
else
{
lean_object* v_val_7849_; lean_object* v___x_7850_; lean_object* v___x_7851_; 
v_val_7849_ = lean_ctor_get(v_a_7848_, 0);
lean_inc(v_val_7849_);
lean_dec_ref(v_a_7848_);
v___x_7850_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
lean_inc(v___y_7819_);
lean_inc_ref(v___y_7818_);
lean_inc(v___y_7817_);
lean_inc_ref(v___y_7816_);
lean_inc(v_val_7849_);
v___x_7851_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v___x_7850_, v_val_7849_, v_inst_x27_7825_, v___y_7816_, v___y_7817_, v___y_7818_, v___y_7819_);
if (lean_obj_tag(v___x_7851_) == 0)
{
lean_dec_ref(v___x_7851_);
v_inst_7827_ = v_val_7849_;
v___y_7828_ = v___y_7810_;
v___y_7829_ = v___y_7811_;
v___y_7830_ = v___y_7812_;
v___y_7831_ = v___y_7813_;
v___y_7832_ = v___y_7814_;
v___y_7833_ = v___y_7815_;
v___y_7834_ = v___y_7816_;
v___y_7835_ = v___y_7817_;
v___y_7836_ = v___y_7818_;
v___y_7837_ = v___y_7819_;
goto v___jp_7826_;
}
else
{
lean_object* v_a_7852_; lean_object* v___x_7854_; uint8_t v_isShared_7855_; uint8_t v_isSharedCheck_7859_; 
lean_dec(v_val_7849_);
lean_dec_ref(v___x_7823_);
lean_dec(v___y_7819_);
lean_dec_ref(v___y_7818_);
lean_dec(v___y_7817_);
lean_dec_ref(v___y_7816_);
lean_dec(v___y_7815_);
lean_dec_ref(v___y_7814_);
lean_dec(v___y_7813_);
lean_dec_ref(v___y_7812_);
lean_dec(v___y_7811_);
lean_dec(v___y_7810_);
lean_dec_ref(v_type_7808_);
v_a_7852_ = lean_ctor_get(v___x_7851_, 0);
v_isSharedCheck_7859_ = !lean_is_exclusive(v___x_7851_);
if (v_isSharedCheck_7859_ == 0)
{
v___x_7854_ = v___x_7851_;
v_isShared_7855_ = v_isSharedCheck_7859_;
goto v_resetjp_7853_;
}
else
{
lean_inc(v_a_7852_);
lean_dec(v___x_7851_);
v___x_7854_ = lean_box(0);
v_isShared_7855_ = v_isSharedCheck_7859_;
goto v_resetjp_7853_;
}
v_resetjp_7853_:
{
lean_object* v___x_7857_; 
if (v_isShared_7855_ == 0)
{
v___x_7857_ = v___x_7854_;
goto v_reusejp_7856_;
}
else
{
lean_object* v_reuseFailAlloc_7858_; 
v_reuseFailAlloc_7858_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7858_, 0, v_a_7852_);
v___x_7857_ = v_reuseFailAlloc_7858_;
goto v_reusejp_7856_;
}
v_reusejp_7856_:
{
return v___x_7857_;
}
}
}
}
}
else
{
lean_object* v_a_7860_; lean_object* v___x_7862_; uint8_t v_isShared_7863_; uint8_t v_isSharedCheck_7867_; 
lean_dec_ref(v_inst_x27_7825_);
lean_dec_ref(v___x_7823_);
lean_dec(v___y_7819_);
lean_dec_ref(v___y_7818_);
lean_dec(v___y_7817_);
lean_dec_ref(v___y_7816_);
lean_dec(v___y_7815_);
lean_dec_ref(v___y_7814_);
lean_dec(v___y_7813_);
lean_dec_ref(v___y_7812_);
lean_dec(v___y_7811_);
lean_dec(v___y_7810_);
lean_dec_ref(v_type_7808_);
v_a_7860_ = lean_ctor_get(v___x_7847_, 0);
v_isSharedCheck_7867_ = !lean_is_exclusive(v___x_7847_);
if (v_isSharedCheck_7867_ == 0)
{
v___x_7862_ = v___x_7847_;
v_isShared_7863_ = v_isSharedCheck_7867_;
goto v_resetjp_7861_;
}
else
{
lean_inc(v_a_7860_);
lean_dec(v___x_7847_);
v___x_7862_ = lean_box(0);
v_isShared_7863_ = v_isSharedCheck_7867_;
goto v_resetjp_7861_;
}
v_resetjp_7861_:
{
lean_object* v___x_7865_; 
if (v_isShared_7863_ == 0)
{
v___x_7865_ = v___x_7862_;
goto v_reusejp_7864_;
}
else
{
lean_object* v_reuseFailAlloc_7866_; 
v_reuseFailAlloc_7866_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7866_, 0, v_a_7860_);
v___x_7865_ = v_reuseFailAlloc_7866_;
goto v_reusejp_7864_;
}
v_reusejp_7864_:
{
return v___x_7865_;
}
}
}
v___jp_7826_:
{
lean_object* v___x_7838_; lean_object* v___x_7839_; lean_object* v___x_7840_; lean_object* v___x_7841_; 
v___x_7838_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_7839_ = l_Lean_mkConst(v___x_7838_, v___x_7823_);
v___x_7840_ = l_Lean_mkAppB(v___x_7839_, v_type_7808_, v_inst_7827_);
lean_inc(v___y_7833_);
v___x_7841_ = lean_grind_canon(v___x_7840_, v___y_7828_, v___y_7829_, v___y_7830_, v___y_7831_, v___y_7832_, v___y_7833_, v___y_7834_, v___y_7835_, v___y_7836_, v___y_7837_);
if (lean_obj_tag(v___x_7841_) == 0)
{
lean_object* v_a_7842_; lean_object* v___x_7843_; 
v_a_7842_ = lean_ctor_get(v___x_7841_, 0);
lean_inc(v_a_7842_);
lean_dec_ref(v___x_7841_);
v___x_7843_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_7842_, v___y_7833_);
lean_dec(v___y_7833_);
return v___x_7843_;
}
else
{
lean_dec(v___y_7833_);
return v___x_7841_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8___redArg___boxed(lean_object* v_u_7868_, lean_object* v_type_7869_, lean_object* v_semiringInst_7870_, lean_object* v___y_7871_, lean_object* v___y_7872_, lean_object* v___y_7873_, lean_object* v___y_7874_, lean_object* v___y_7875_, lean_object* v___y_7876_, lean_object* v___y_7877_, lean_object* v___y_7878_, lean_object* v___y_7879_, lean_object* v___y_7880_, lean_object* v___y_7881_){
_start:
{
lean_object* v_res_7882_; 
v_res_7882_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8___redArg(v_u_7868_, v_type_7869_, v_semiringInst_7870_, v___y_7871_, v___y_7872_, v___y_7873_, v___y_7874_, v___y_7875_, v___y_7876_, v___y_7877_, v___y_7878_, v___y_7879_, v___y_7880_);
return v_res_7882_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5(lean_object* v___y_7883_, lean_object* v___y_7884_, lean_object* v___y_7885_, lean_object* v___y_7886_, lean_object* v___y_7887_, lean_object* v___y_7888_, lean_object* v___y_7889_, lean_object* v___y_7890_, lean_object* v___y_7891_, lean_object* v___y_7892_, lean_object* v___y_7893_){
_start:
{
lean_object* v___x_7895_; 
v___x_7895_ = l_Lean_Meta_Grind_Arith_CommRing_SemiringM_getCommSemiring(v___y_7883_, v___y_7884_, v___y_7885_, v___y_7886_, v___y_7887_, v___y_7888_, v___y_7889_, v___y_7890_, v___y_7891_, v___y_7892_, v___y_7893_);
if (lean_obj_tag(v___x_7895_) == 0)
{
lean_object* v_a_7896_; lean_object* v___x_7898_; uint8_t v_isShared_7899_; uint8_t v_isSharedCheck_7930_; 
v_a_7896_ = lean_ctor_get(v___x_7895_, 0);
v_isSharedCheck_7930_ = !lean_is_exclusive(v___x_7895_);
if (v_isSharedCheck_7930_ == 0)
{
v___x_7898_ = v___x_7895_;
v_isShared_7899_ = v_isSharedCheck_7930_;
goto v_resetjp_7897_;
}
else
{
lean_inc(v_a_7896_);
lean_dec(v___x_7895_);
v___x_7898_ = lean_box(0);
v_isShared_7899_ = v_isSharedCheck_7930_;
goto v_resetjp_7897_;
}
v_resetjp_7897_:
{
lean_object* v_toSemiring_7900_; lean_object* v_natCastFn_x3f_7901_; 
v_toSemiring_7900_ = lean_ctor_get(v_a_7896_, 0);
lean_inc_ref(v_toSemiring_7900_);
lean_dec(v_a_7896_);
v_natCastFn_x3f_7901_ = lean_ctor_get(v_toSemiring_7900_, 7);
if (lean_obj_tag(v_natCastFn_x3f_7901_) == 1)
{
lean_object* v_val_7902_; lean_object* v___x_7904_; 
lean_inc_ref(v_natCastFn_x3f_7901_);
lean_dec_ref(v_toSemiring_7900_);
lean_dec(v___y_7893_);
lean_dec_ref(v___y_7892_);
lean_dec(v___y_7891_);
lean_dec_ref(v___y_7890_);
lean_dec(v___y_7889_);
lean_dec_ref(v___y_7888_);
lean_dec(v___y_7887_);
lean_dec_ref(v___y_7886_);
lean_dec(v___y_7885_);
lean_dec(v___y_7884_);
lean_dec(v___y_7883_);
v_val_7902_ = lean_ctor_get(v_natCastFn_x3f_7901_, 0);
lean_inc(v_val_7902_);
lean_dec_ref(v_natCastFn_x3f_7901_);
if (v_isShared_7899_ == 0)
{
lean_ctor_set(v___x_7898_, 0, v_val_7902_);
v___x_7904_ = v___x_7898_;
goto v_reusejp_7903_;
}
else
{
lean_object* v_reuseFailAlloc_7905_; 
v_reuseFailAlloc_7905_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7905_, 0, v_val_7902_);
v___x_7904_ = v_reuseFailAlloc_7905_;
goto v_reusejp_7903_;
}
v_reusejp_7903_:
{
return v___x_7904_;
}
}
else
{
lean_object* v_type_7906_; lean_object* v_u_7907_; lean_object* v_semiringInst_7908_; lean_object* v___x_7909_; 
lean_del_object(v___x_7898_);
v_type_7906_ = lean_ctor_get(v_toSemiring_7900_, 1);
lean_inc_ref(v_type_7906_);
v_u_7907_ = lean_ctor_get(v_toSemiring_7900_, 2);
lean_inc(v_u_7907_);
v_semiringInst_7908_ = lean_ctor_get(v_toSemiring_7900_, 3);
lean_inc_ref(v_semiringInst_7908_);
lean_dec_ref(v_toSemiring_7900_);
lean_inc(v___y_7884_);
v___x_7909_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8___redArg(v_u_7907_, v_type_7906_, v_semiringInst_7908_, v___y_7884_, v___y_7885_, v___y_7886_, v___y_7887_, v___y_7888_, v___y_7889_, v___y_7890_, v___y_7891_, v___y_7892_, v___y_7893_);
if (lean_obj_tag(v___x_7909_) == 0)
{
lean_object* v_a_7910_; lean_object* v___f_7911_; lean_object* v___x_7912_; lean_object* v___x_7913_; 
v_a_7910_ = lean_ctor_get(v___x_7909_, 0);
lean_inc(v_a_7910_);
lean_dec_ref(v___x_7909_);
lean_inc(v_a_7910_);
v___f_7911_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5___lam__0___boxed), 3, 2);
lean_closure_set(v___f_7911_, 0, v___y_7883_);
lean_closure_set(v___f_7911_, 1, v_a_7910_);
v___x_7912_ = l_Lean_Meta_Grind_Arith_CommRing_ringExt;
v___x_7913_ = l___private_Lean_Meta_Tactic_Grind_Types_0__Lean_Meta_Grind_SolverExtension_modifyStateImpl___redArg(v___x_7912_, v___f_7911_, v___y_7884_);
lean_dec(v___y_7884_);
if (lean_obj_tag(v___x_7913_) == 0)
{
lean_object* v___x_7915_; uint8_t v_isShared_7916_; uint8_t v_isSharedCheck_7920_; 
v_isSharedCheck_7920_ = !lean_is_exclusive(v___x_7913_);
if (v_isSharedCheck_7920_ == 0)
{
lean_object* v_unused_7921_; 
v_unused_7921_ = lean_ctor_get(v___x_7913_, 0);
lean_dec(v_unused_7921_);
v___x_7915_ = v___x_7913_;
v_isShared_7916_ = v_isSharedCheck_7920_;
goto v_resetjp_7914_;
}
else
{
lean_dec(v___x_7913_);
v___x_7915_ = lean_box(0);
v_isShared_7916_ = v_isSharedCheck_7920_;
goto v_resetjp_7914_;
}
v_resetjp_7914_:
{
lean_object* v___x_7918_; 
if (v_isShared_7916_ == 0)
{
lean_ctor_set(v___x_7915_, 0, v_a_7910_);
v___x_7918_ = v___x_7915_;
goto v_reusejp_7917_;
}
else
{
lean_object* v_reuseFailAlloc_7919_; 
v_reuseFailAlloc_7919_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7919_, 0, v_a_7910_);
v___x_7918_ = v_reuseFailAlloc_7919_;
goto v_reusejp_7917_;
}
v_reusejp_7917_:
{
return v___x_7918_;
}
}
}
else
{
lean_object* v_a_7922_; lean_object* v___x_7924_; uint8_t v_isShared_7925_; uint8_t v_isSharedCheck_7929_; 
lean_dec(v_a_7910_);
v_a_7922_ = lean_ctor_get(v___x_7913_, 0);
v_isSharedCheck_7929_ = !lean_is_exclusive(v___x_7913_);
if (v_isSharedCheck_7929_ == 0)
{
v___x_7924_ = v___x_7913_;
v_isShared_7925_ = v_isSharedCheck_7929_;
goto v_resetjp_7923_;
}
else
{
lean_inc(v_a_7922_);
lean_dec(v___x_7913_);
v___x_7924_ = lean_box(0);
v_isShared_7925_ = v_isSharedCheck_7929_;
goto v_resetjp_7923_;
}
v_resetjp_7923_:
{
lean_object* v___x_7927_; 
if (v_isShared_7925_ == 0)
{
v___x_7927_ = v___x_7924_;
goto v_reusejp_7926_;
}
else
{
lean_object* v_reuseFailAlloc_7928_; 
v_reuseFailAlloc_7928_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7928_, 0, v_a_7922_);
v___x_7927_ = v_reuseFailAlloc_7928_;
goto v_reusejp_7926_;
}
v_reusejp_7926_:
{
return v___x_7927_;
}
}
}
}
else
{
lean_dec(v___y_7884_);
lean_dec(v___y_7883_);
return v___x_7909_;
}
}
}
}
else
{
lean_object* v_a_7931_; lean_object* v___x_7933_; uint8_t v_isShared_7934_; uint8_t v_isSharedCheck_7938_; 
lean_dec(v___y_7893_);
lean_dec_ref(v___y_7892_);
lean_dec(v___y_7891_);
lean_dec_ref(v___y_7890_);
lean_dec(v___y_7889_);
lean_dec_ref(v___y_7888_);
lean_dec(v___y_7887_);
lean_dec_ref(v___y_7886_);
lean_dec(v___y_7885_);
lean_dec(v___y_7884_);
lean_dec(v___y_7883_);
v_a_7931_ = lean_ctor_get(v___x_7895_, 0);
v_isSharedCheck_7938_ = !lean_is_exclusive(v___x_7895_);
if (v_isSharedCheck_7938_ == 0)
{
v___x_7933_ = v___x_7895_;
v_isShared_7934_ = v_isSharedCheck_7938_;
goto v_resetjp_7932_;
}
else
{
lean_inc(v_a_7931_);
lean_dec(v___x_7895_);
v___x_7933_ = lean_box(0);
v_isShared_7934_ = v_isSharedCheck_7938_;
goto v_resetjp_7932_;
}
v_resetjp_7932_:
{
lean_object* v___x_7936_; 
if (v_isShared_7934_ == 0)
{
v___x_7936_ = v___x_7933_;
goto v_reusejp_7935_;
}
else
{
lean_object* v_reuseFailAlloc_7937_; 
v_reuseFailAlloc_7937_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7937_, 0, v_a_7931_);
v___x_7936_ = v_reuseFailAlloc_7937_;
goto v_reusejp_7935_;
}
v_reusejp_7935_:
{
return v___x_7936_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5___boxed(lean_object* v___y_7939_, lean_object* v___y_7940_, lean_object* v___y_7941_, lean_object* v___y_7942_, lean_object* v___y_7943_, lean_object* v___y_7944_, lean_object* v___y_7945_, lean_object* v___y_7946_, lean_object* v___y_7947_, lean_object* v___y_7948_, lean_object* v___y_7949_, lean_object* v___y_7950_){
_start:
{
lean_object* v_res_7951_; 
v_res_7951_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5(v___y_7939_, v___y_7940_, v___y_7941_, v___y_7942_, v___y_7943_, v___y_7944_, v___y_7945_, v___y_7946_, v___y_7947_, v___y_7948_, v___y_7949_);
return v_res_7951_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3___lam__0(lean_object* v___y_7952_, lean_object* v_a_7953_, lean_object* v_s_7954_){
_start:
{
lean_object* v_rings_7955_; lean_object* v_typeIdOf_7956_; lean_object* v_exprToRingId_7957_; lean_object* v_semirings_7958_; lean_object* v_stypeIdOf_7959_; lean_object* v_exprToSemiringId_7960_; lean_object* v_ncRings_7961_; lean_object* v_exprToNCRingId_7962_; lean_object* v_nctypeIdOf_7963_; lean_object* v_ncSemirings_7964_; lean_object* v_exprToNCSemiringId_7965_; lean_object* v_ncstypeIdOf_7966_; lean_object* v_steps_7967_; lean_object* v___x_7968_; uint8_t v___x_7969_; 
v_rings_7955_ = lean_ctor_get(v_s_7954_, 0);
v_typeIdOf_7956_ = lean_ctor_get(v_s_7954_, 1);
v_exprToRingId_7957_ = lean_ctor_get(v_s_7954_, 2);
v_semirings_7958_ = lean_ctor_get(v_s_7954_, 3);
v_stypeIdOf_7959_ = lean_ctor_get(v_s_7954_, 4);
v_exprToSemiringId_7960_ = lean_ctor_get(v_s_7954_, 5);
v_ncRings_7961_ = lean_ctor_get(v_s_7954_, 6);
v_exprToNCRingId_7962_ = lean_ctor_get(v_s_7954_, 7);
v_nctypeIdOf_7963_ = lean_ctor_get(v_s_7954_, 8);
v_ncSemirings_7964_ = lean_ctor_get(v_s_7954_, 9);
v_exprToNCSemiringId_7965_ = lean_ctor_get(v_s_7954_, 10);
v_ncstypeIdOf_7966_ = lean_ctor_get(v_s_7954_, 11);
v_steps_7967_ = lean_ctor_get(v_s_7954_, 12);
v___x_7968_ = lean_array_get_size(v_semirings_7958_);
v___x_7969_ = lean_nat_dec_lt(v___y_7952_, v___x_7968_);
if (v___x_7969_ == 0)
{
lean_dec_ref(v_a_7953_);
return v_s_7954_;
}
else
{
lean_object* v___x_7971_; uint8_t v_isShared_7972_; uint8_t v_isSharedCheck_8011_; 
lean_inc(v_steps_7967_);
lean_inc_ref(v_ncstypeIdOf_7966_);
lean_inc_ref(v_exprToNCSemiringId_7965_);
lean_inc_ref(v_ncSemirings_7964_);
lean_inc_ref(v_nctypeIdOf_7963_);
lean_inc_ref(v_exprToNCRingId_7962_);
lean_inc_ref(v_ncRings_7961_);
lean_inc_ref(v_exprToSemiringId_7960_);
lean_inc_ref(v_stypeIdOf_7959_);
lean_inc_ref(v_semirings_7958_);
lean_inc_ref(v_exprToRingId_7957_);
lean_inc_ref(v_typeIdOf_7956_);
lean_inc_ref(v_rings_7955_);
v_isSharedCheck_8011_ = !lean_is_exclusive(v_s_7954_);
if (v_isSharedCheck_8011_ == 0)
{
lean_object* v_unused_8012_; lean_object* v_unused_8013_; lean_object* v_unused_8014_; lean_object* v_unused_8015_; lean_object* v_unused_8016_; lean_object* v_unused_8017_; lean_object* v_unused_8018_; lean_object* v_unused_8019_; lean_object* v_unused_8020_; lean_object* v_unused_8021_; lean_object* v_unused_8022_; lean_object* v_unused_8023_; lean_object* v_unused_8024_; 
v_unused_8012_ = lean_ctor_get(v_s_7954_, 12);
lean_dec(v_unused_8012_);
v_unused_8013_ = lean_ctor_get(v_s_7954_, 11);
lean_dec(v_unused_8013_);
v_unused_8014_ = lean_ctor_get(v_s_7954_, 10);
lean_dec(v_unused_8014_);
v_unused_8015_ = lean_ctor_get(v_s_7954_, 9);
lean_dec(v_unused_8015_);
v_unused_8016_ = lean_ctor_get(v_s_7954_, 8);
lean_dec(v_unused_8016_);
v_unused_8017_ = lean_ctor_get(v_s_7954_, 7);
lean_dec(v_unused_8017_);
v_unused_8018_ = lean_ctor_get(v_s_7954_, 6);
lean_dec(v_unused_8018_);
v_unused_8019_ = lean_ctor_get(v_s_7954_, 5);
lean_dec(v_unused_8019_);
v_unused_8020_ = lean_ctor_get(v_s_7954_, 4);
lean_dec(v_unused_8020_);
v_unused_8021_ = lean_ctor_get(v_s_7954_, 3);
lean_dec(v_unused_8021_);
v_unused_8022_ = lean_ctor_get(v_s_7954_, 2);
lean_dec(v_unused_8022_);
v_unused_8023_ = lean_ctor_get(v_s_7954_, 1);
lean_dec(v_unused_8023_);
v_unused_8024_ = lean_ctor_get(v_s_7954_, 0);
lean_dec(v_unused_8024_);
v___x_7971_ = v_s_7954_;
v_isShared_7972_ = v_isSharedCheck_8011_;
goto v_resetjp_7970_;
}
else
{
lean_dec(v_s_7954_);
v___x_7971_ = lean_box(0);
v_isShared_7972_ = v_isSharedCheck_8011_;
goto v_resetjp_7970_;
}
v_resetjp_7970_:
{
lean_object* v_v_7973_; lean_object* v_toSemiring_7974_; lean_object* v_ringId_7975_; lean_object* v_commSemiringInst_7976_; lean_object* v_addRightCancelInst_x3f_7977_; lean_object* v_toQFn_x3f_7978_; lean_object* v___x_7980_; uint8_t v_isShared_7981_; uint8_t v_isSharedCheck_8010_; 
v_v_7973_ = lean_array_fget(v_semirings_7958_, v___y_7952_);
v_toSemiring_7974_ = lean_ctor_get(v_v_7973_, 0);
v_ringId_7975_ = lean_ctor_get(v_v_7973_, 1);
v_commSemiringInst_7976_ = lean_ctor_get(v_v_7973_, 2);
v_addRightCancelInst_x3f_7977_ = lean_ctor_get(v_v_7973_, 3);
v_toQFn_x3f_7978_ = lean_ctor_get(v_v_7973_, 4);
v_isSharedCheck_8010_ = !lean_is_exclusive(v_v_7973_);
if (v_isSharedCheck_8010_ == 0)
{
v___x_7980_ = v_v_7973_;
v_isShared_7981_ = v_isSharedCheck_8010_;
goto v_resetjp_7979_;
}
else
{
lean_inc(v_toQFn_x3f_7978_);
lean_inc(v_addRightCancelInst_x3f_7977_);
lean_inc(v_commSemiringInst_7976_);
lean_inc(v_ringId_7975_);
lean_inc(v_toSemiring_7974_);
lean_dec(v_v_7973_);
v___x_7980_ = lean_box(0);
v_isShared_7981_ = v_isSharedCheck_8010_;
goto v_resetjp_7979_;
}
v_resetjp_7979_:
{
lean_object* v_id_7982_; lean_object* v_type_7983_; lean_object* v_u_7984_; lean_object* v_semiringInst_7985_; lean_object* v_addFn_x3f_7986_; lean_object* v_powFn_x3f_7987_; lean_object* v_natCastFn_x3f_7988_; lean_object* v_denote_7989_; lean_object* v_vars_7990_; lean_object* v_varMap_7991_; lean_object* v___x_7993_; uint8_t v_isShared_7994_; uint8_t v_isSharedCheck_8008_; 
v_id_7982_ = lean_ctor_get(v_toSemiring_7974_, 0);
v_type_7983_ = lean_ctor_get(v_toSemiring_7974_, 1);
v_u_7984_ = lean_ctor_get(v_toSemiring_7974_, 2);
v_semiringInst_7985_ = lean_ctor_get(v_toSemiring_7974_, 3);
v_addFn_x3f_7986_ = lean_ctor_get(v_toSemiring_7974_, 4);
v_powFn_x3f_7987_ = lean_ctor_get(v_toSemiring_7974_, 6);
v_natCastFn_x3f_7988_ = lean_ctor_get(v_toSemiring_7974_, 7);
v_denote_7989_ = lean_ctor_get(v_toSemiring_7974_, 8);
v_vars_7990_ = lean_ctor_get(v_toSemiring_7974_, 9);
v_varMap_7991_ = lean_ctor_get(v_toSemiring_7974_, 10);
v_isSharedCheck_8008_ = !lean_is_exclusive(v_toSemiring_7974_);
if (v_isSharedCheck_8008_ == 0)
{
lean_object* v_unused_8009_; 
v_unused_8009_ = lean_ctor_get(v_toSemiring_7974_, 5);
lean_dec(v_unused_8009_);
v___x_7993_ = v_toSemiring_7974_;
v_isShared_7994_ = v_isSharedCheck_8008_;
goto v_resetjp_7992_;
}
else
{
lean_inc(v_varMap_7991_);
lean_inc(v_vars_7990_);
lean_inc(v_denote_7989_);
lean_inc(v_natCastFn_x3f_7988_);
lean_inc(v_powFn_x3f_7987_);
lean_inc(v_addFn_x3f_7986_);
lean_inc(v_semiringInst_7985_);
lean_inc(v_u_7984_);
lean_inc(v_type_7983_);
lean_inc(v_id_7982_);
lean_dec(v_toSemiring_7974_);
v___x_7993_ = lean_box(0);
v_isShared_7994_ = v_isSharedCheck_8008_;
goto v_resetjp_7992_;
}
v_resetjp_7992_:
{
lean_object* v___x_7995_; lean_object* v_xs_x27_7996_; lean_object* v___x_7997_; lean_object* v___x_7999_; 
v___x_7995_ = lean_box(0);
v_xs_x27_7996_ = lean_array_fset(v_semirings_7958_, v___y_7952_, v___x_7995_);
v___x_7997_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_7997_, 0, v_a_7953_);
if (v_isShared_7994_ == 0)
{
lean_ctor_set(v___x_7993_, 5, v___x_7997_);
v___x_7999_ = v___x_7993_;
goto v_reusejp_7998_;
}
else
{
lean_object* v_reuseFailAlloc_8007_; 
v_reuseFailAlloc_8007_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_8007_, 0, v_id_7982_);
lean_ctor_set(v_reuseFailAlloc_8007_, 1, v_type_7983_);
lean_ctor_set(v_reuseFailAlloc_8007_, 2, v_u_7984_);
lean_ctor_set(v_reuseFailAlloc_8007_, 3, v_semiringInst_7985_);
lean_ctor_set(v_reuseFailAlloc_8007_, 4, v_addFn_x3f_7986_);
lean_ctor_set(v_reuseFailAlloc_8007_, 5, v___x_7997_);
lean_ctor_set(v_reuseFailAlloc_8007_, 6, v_powFn_x3f_7987_);
lean_ctor_set(v_reuseFailAlloc_8007_, 7, v_natCastFn_x3f_7988_);
lean_ctor_set(v_reuseFailAlloc_8007_, 8, v_denote_7989_);
lean_ctor_set(v_reuseFailAlloc_8007_, 9, v_vars_7990_);
lean_ctor_set(v_reuseFailAlloc_8007_, 10, v_varMap_7991_);
v___x_7999_ = v_reuseFailAlloc_8007_;
goto v_reusejp_7998_;
}
v_reusejp_7998_:
{
lean_object* v___x_8001_; 
if (v_isShared_7981_ == 0)
{
lean_ctor_set(v___x_7980_, 0, v___x_7999_);
v___x_8001_ = v___x_7980_;
goto v_reusejp_8000_;
}
else
{
lean_object* v_reuseFailAlloc_8006_; 
v_reuseFailAlloc_8006_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_8006_, 0, v___x_7999_);
lean_ctor_set(v_reuseFailAlloc_8006_, 1, v_ringId_7975_);
lean_ctor_set(v_reuseFailAlloc_8006_, 2, v_commSemiringInst_7976_);
lean_ctor_set(v_reuseFailAlloc_8006_, 3, v_addRightCancelInst_x3f_7977_);
lean_ctor_set(v_reuseFailAlloc_8006_, 4, v_toQFn_x3f_7978_);
v___x_8001_ = v_reuseFailAlloc_8006_;
goto v_reusejp_8000_;
}
v_reusejp_8000_:
{
lean_object* v___x_8002_; lean_object* v___x_8004_; 
v___x_8002_ = lean_array_fset(v_xs_x27_7996_, v___y_7952_, v___x_8001_);
if (v_isShared_7972_ == 0)
{
lean_ctor_set(v___x_7971_, 3, v___x_8002_);
v___x_8004_ = v___x_7971_;
goto v_reusejp_8003_;
}
else
{
lean_object* v_reuseFailAlloc_8005_; 
v_reuseFailAlloc_8005_ = lean_alloc_ctor(0, 13, 0);
lean_ctor_set(v_reuseFailAlloc_8005_, 0, v_rings_7955_);
lean_ctor_set(v_reuseFailAlloc_8005_, 1, v_typeIdOf_7956_);
lean_ctor_set(v_reuseFailAlloc_8005_, 2, v_exprToRingId_7957_);
lean_ctor_set(v_reuseFailAlloc_8005_, 3, v___x_8002_);
lean_ctor_set(v_reuseFailAlloc_8005_, 4, v_stypeIdOf_7959_);
lean_ctor_set(v_reuseFailAlloc_8005_, 5, v_exprToSemiringId_7960_);
lean_ctor_set(v_reuseFailAlloc_8005_, 6, v_ncRings_7961_);
lean_ctor_set(v_reuseFailAlloc_8005_, 7, v_exprToNCRingId_7962_);
lean_ctor_set(v_reuseFailAlloc_8005_, 8, v_nctypeIdOf_7963_);
lean_ctor_set(v_reuseFailAlloc_8005_, 9, v_ncSemirings_7964_);
lean_ctor_set(v_reuseFailAlloc_8005_, 10, v_exprToNCSemiringId_7965_);
lean_ctor_set(v_reuseFailAlloc_8005_, 11, v_ncstypeIdOf_7966_);
lean_ctor_set(v_reuseFailAlloc_8005_, 12, v_steps_7967_);
v___x_8004_ = v_reuseFailAlloc_8005_;
goto v_reusejp_8003_;
}
v_reusejp_8003_:
{
return v___x_8004_;
}
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3___lam__0___boxed(lean_object* v___y_8025_, lean_object* v_a_8026_, lean_object* v_s_8027_){
_start:
{
lean_object* v_res_8028_; 
v_res_8028_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3___lam__0(v___y_8025_, v_a_8026_, v_s_8027_);
lean_dec(v___y_8025_);
return v_res_8028_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3(lean_object* v___y_8029_, lean_object* v___y_8030_, lean_object* v___y_8031_, lean_object* v___y_8032_, lean_object* v___y_8033_, lean_object* v___y_8034_, lean_object* v___y_8035_, lean_object* v___y_8036_, lean_object* v___y_8037_, lean_object* v___y_8038_, lean_object* v___y_8039_){
_start:
{
lean_object* v___x_8041_; 
v___x_8041_ = l_Lean_Meta_Grind_Arith_CommRing_SemiringM_getCommSemiring(v___y_8029_, v___y_8030_, v___y_8031_, v___y_8032_, v___y_8033_, v___y_8034_, v___y_8035_, v___y_8036_, v___y_8037_, v___y_8038_, v___y_8039_);
if (lean_obj_tag(v___x_8041_) == 0)
{
lean_object* v_a_8042_; lean_object* v___x_8044_; uint8_t v_isShared_8045_; uint8_t v_isSharedCheck_8086_; 
v_a_8042_ = lean_ctor_get(v___x_8041_, 0);
v_isSharedCheck_8086_ = !lean_is_exclusive(v___x_8041_);
if (v_isSharedCheck_8086_ == 0)
{
v___x_8044_ = v___x_8041_;
v_isShared_8045_ = v_isSharedCheck_8086_;
goto v_resetjp_8043_;
}
else
{
lean_inc(v_a_8042_);
lean_dec(v___x_8041_);
v___x_8044_ = lean_box(0);
v_isShared_8045_ = v_isSharedCheck_8086_;
goto v_resetjp_8043_;
}
v_resetjp_8043_:
{
lean_object* v_toSemiring_8046_; lean_object* v_mulFn_x3f_8047_; 
v_toSemiring_8046_ = lean_ctor_get(v_a_8042_, 0);
lean_inc_ref(v_toSemiring_8046_);
lean_dec(v_a_8042_);
v_mulFn_x3f_8047_ = lean_ctor_get(v_toSemiring_8046_, 5);
if (lean_obj_tag(v_mulFn_x3f_8047_) == 1)
{
lean_object* v_val_8048_; lean_object* v___x_8050_; 
lean_inc_ref(v_mulFn_x3f_8047_);
lean_dec_ref(v_toSemiring_8046_);
lean_dec(v___y_8039_);
lean_dec_ref(v___y_8038_);
lean_dec(v___y_8037_);
lean_dec_ref(v___y_8036_);
lean_dec(v___y_8035_);
lean_dec_ref(v___y_8034_);
lean_dec(v___y_8033_);
lean_dec_ref(v___y_8032_);
lean_dec(v___y_8031_);
lean_dec(v___y_8030_);
lean_dec(v___y_8029_);
v_val_8048_ = lean_ctor_get(v_mulFn_x3f_8047_, 0);
lean_inc(v_val_8048_);
lean_dec_ref(v_mulFn_x3f_8047_);
if (v_isShared_8045_ == 0)
{
lean_ctor_set(v___x_8044_, 0, v_val_8048_);
v___x_8050_ = v___x_8044_;
goto v_reusejp_8049_;
}
else
{
lean_object* v_reuseFailAlloc_8051_; 
v_reuseFailAlloc_8051_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8051_, 0, v_val_8048_);
v___x_8050_ = v_reuseFailAlloc_8051_;
goto v_reusejp_8049_;
}
v_reusejp_8049_:
{
return v___x_8050_;
}
}
else
{
lean_object* v_type_8052_; lean_object* v_u_8053_; lean_object* v_semiringInst_8054_; lean_object* v___x_8055_; lean_object* v___x_8056_; lean_object* v___x_8057_; lean_object* v___x_8058_; lean_object* v___x_8059_; lean_object* v___x_8060_; lean_object* v___x_8061_; lean_object* v_expectedInst_8062_; lean_object* v___x_8063_; lean_object* v___x_8064_; lean_object* v___x_8065_; 
lean_del_object(v___x_8044_);
v_type_8052_ = lean_ctor_get(v_toSemiring_8046_, 1);
lean_inc_ref(v_type_8052_);
v_u_8053_ = lean_ctor_get(v_toSemiring_8046_, 2);
lean_inc(v_u_8053_);
v_semiringInst_8054_ = lean_ctor_get(v_toSemiring_8046_, 3);
lean_inc_ref(v_semiringInst_8054_);
lean_dec_ref(v_toSemiring_8046_);
v___x_8055_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__1));
v___x_8056_ = lean_box(0);
lean_inc(v_u_8053_);
v___x_8057_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_8057_, 0, v_u_8053_);
lean_ctor_set(v___x_8057_, 1, v___x_8056_);
lean_inc_ref(v___x_8057_);
v___x_8058_ = l_Lean_mkConst(v___x_8055_, v___x_8057_);
v___x_8059_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6));
v___x_8060_ = l_Lean_mkConst(v___x_8059_, v___x_8057_);
lean_inc_ref(v_type_8052_);
v___x_8061_ = l_Lean_mkAppB(v___x_8060_, v_type_8052_, v_semiringInst_8054_);
lean_inc_ref(v_type_8052_);
v_expectedInst_8062_ = l_Lean_mkAppB(v___x_8058_, v_type_8052_, v___x_8061_);
v___x_8063_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__7));
v___x_8064_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
lean_inc(v___y_8030_);
v___x_8065_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2(v_type_8052_, v_u_8053_, v___x_8063_, v___x_8064_, v_expectedInst_8062_, v___y_8029_, v___y_8030_, v___y_8031_, v___y_8032_, v___y_8033_, v___y_8034_, v___y_8035_, v___y_8036_, v___y_8037_, v___y_8038_, v___y_8039_);
if (lean_obj_tag(v___x_8065_) == 0)
{
lean_object* v_a_8066_; lean_object* v___f_8067_; lean_object* v___x_8068_; lean_object* v___x_8069_; 
v_a_8066_ = lean_ctor_get(v___x_8065_, 0);
lean_inc(v_a_8066_);
lean_dec_ref(v___x_8065_);
lean_inc(v_a_8066_);
v___f_8067_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3___lam__0___boxed), 3, 2);
lean_closure_set(v___f_8067_, 0, v___y_8029_);
lean_closure_set(v___f_8067_, 1, v_a_8066_);
v___x_8068_ = l_Lean_Meta_Grind_Arith_CommRing_ringExt;
v___x_8069_ = l___private_Lean_Meta_Tactic_Grind_Types_0__Lean_Meta_Grind_SolverExtension_modifyStateImpl___redArg(v___x_8068_, v___f_8067_, v___y_8030_);
lean_dec(v___y_8030_);
if (lean_obj_tag(v___x_8069_) == 0)
{
lean_object* v___x_8071_; uint8_t v_isShared_8072_; uint8_t v_isSharedCheck_8076_; 
v_isSharedCheck_8076_ = !lean_is_exclusive(v___x_8069_);
if (v_isSharedCheck_8076_ == 0)
{
lean_object* v_unused_8077_; 
v_unused_8077_ = lean_ctor_get(v___x_8069_, 0);
lean_dec(v_unused_8077_);
v___x_8071_ = v___x_8069_;
v_isShared_8072_ = v_isSharedCheck_8076_;
goto v_resetjp_8070_;
}
else
{
lean_dec(v___x_8069_);
v___x_8071_ = lean_box(0);
v_isShared_8072_ = v_isSharedCheck_8076_;
goto v_resetjp_8070_;
}
v_resetjp_8070_:
{
lean_object* v___x_8074_; 
if (v_isShared_8072_ == 0)
{
lean_ctor_set(v___x_8071_, 0, v_a_8066_);
v___x_8074_ = v___x_8071_;
goto v_reusejp_8073_;
}
else
{
lean_object* v_reuseFailAlloc_8075_; 
v_reuseFailAlloc_8075_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8075_, 0, v_a_8066_);
v___x_8074_ = v_reuseFailAlloc_8075_;
goto v_reusejp_8073_;
}
v_reusejp_8073_:
{
return v___x_8074_;
}
}
}
else
{
lean_object* v_a_8078_; lean_object* v___x_8080_; uint8_t v_isShared_8081_; uint8_t v_isSharedCheck_8085_; 
lean_dec(v_a_8066_);
v_a_8078_ = lean_ctor_get(v___x_8069_, 0);
v_isSharedCheck_8085_ = !lean_is_exclusive(v___x_8069_);
if (v_isSharedCheck_8085_ == 0)
{
v___x_8080_ = v___x_8069_;
v_isShared_8081_ = v_isSharedCheck_8085_;
goto v_resetjp_8079_;
}
else
{
lean_inc(v_a_8078_);
lean_dec(v___x_8069_);
v___x_8080_ = lean_box(0);
v_isShared_8081_ = v_isSharedCheck_8085_;
goto v_resetjp_8079_;
}
v_resetjp_8079_:
{
lean_object* v___x_8083_; 
if (v_isShared_8081_ == 0)
{
v___x_8083_ = v___x_8080_;
goto v_reusejp_8082_;
}
else
{
lean_object* v_reuseFailAlloc_8084_; 
v_reuseFailAlloc_8084_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8084_, 0, v_a_8078_);
v___x_8083_ = v_reuseFailAlloc_8084_;
goto v_reusejp_8082_;
}
v_reusejp_8082_:
{
return v___x_8083_;
}
}
}
}
else
{
lean_dec(v___y_8030_);
lean_dec(v___y_8029_);
return v___x_8065_;
}
}
}
}
else
{
lean_object* v_a_8087_; lean_object* v___x_8089_; uint8_t v_isShared_8090_; uint8_t v_isSharedCheck_8094_; 
lean_dec(v___y_8039_);
lean_dec_ref(v___y_8038_);
lean_dec(v___y_8037_);
lean_dec_ref(v___y_8036_);
lean_dec(v___y_8035_);
lean_dec_ref(v___y_8034_);
lean_dec(v___y_8033_);
lean_dec_ref(v___y_8032_);
lean_dec(v___y_8031_);
lean_dec(v___y_8030_);
lean_dec(v___y_8029_);
v_a_8087_ = lean_ctor_get(v___x_8041_, 0);
v_isSharedCheck_8094_ = !lean_is_exclusive(v___x_8041_);
if (v_isSharedCheck_8094_ == 0)
{
v___x_8089_ = v___x_8041_;
v_isShared_8090_ = v_isSharedCheck_8094_;
goto v_resetjp_8088_;
}
else
{
lean_inc(v_a_8087_);
lean_dec(v___x_8041_);
v___x_8089_ = lean_box(0);
v_isShared_8090_ = v_isSharedCheck_8094_;
goto v_resetjp_8088_;
}
v_resetjp_8088_:
{
lean_object* v___x_8092_; 
if (v_isShared_8090_ == 0)
{
v___x_8092_ = v___x_8089_;
goto v_reusejp_8091_;
}
else
{
lean_object* v_reuseFailAlloc_8093_; 
v_reuseFailAlloc_8093_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8093_, 0, v_a_8087_);
v___x_8092_ = v_reuseFailAlloc_8093_;
goto v_reusejp_8091_;
}
v_reusejp_8091_:
{
return v___x_8092_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3___boxed(lean_object* v___y_8095_, lean_object* v___y_8096_, lean_object* v___y_8097_, lean_object* v___y_8098_, lean_object* v___y_8099_, lean_object* v___y_8100_, lean_object* v___y_8101_, lean_object* v___y_8102_, lean_object* v___y_8103_, lean_object* v___y_8104_, lean_object* v___y_8105_, lean_object* v___y_8106_){
_start:
{
lean_object* v_res_8107_; 
v_res_8107_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3(v___y_8095_, v___y_8096_, v___y_8097_, v___y_8098_, v___y_8099_, v___y_8100_, v___y_8101_, v___y_8102_, v___y_8103_, v___y_8104_, v___y_8105_);
return v_res_8107_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(lean_object* v_toVar_8108_, lean_object* v_asVar_8109_, lean_object* v_e_8110_, lean_object* v___y_8111_, lean_object* v___y_8112_, lean_object* v___y_8113_, lean_object* v___y_8114_, lean_object* v___y_8115_, lean_object* v___y_8116_, lean_object* v___y_8117_, lean_object* v___y_8118_, lean_object* v___y_8119_, lean_object* v___y_8120_, lean_object* v___y_8121_){
_start:
{
lean_object* v___x_8123_; 
lean_inc_ref(v_e_8110_);
v___x_8123_ = l_Lean_Meta_instantiateMVarsIfMVarApp___redArg(v_e_8110_, v___y_8119_);
if (lean_obj_tag(v___x_8123_) == 0)
{
lean_object* v_a_8124_; lean_object* v___x_8125_; uint8_t v___x_8126_; 
v_a_8124_ = lean_ctor_get(v___x_8123_, 0);
lean_inc(v_a_8124_);
lean_dec_ref(v___x_8123_);
v___x_8125_ = l_Lean_Expr_cleanupAnnotations(v_a_8124_);
v___x_8126_ = l_Lean_Expr_isApp(v___x_8125_);
if (v___x_8126_ == 0)
{
lean_object* v___x_8127_; 
lean_dec_ref(v___x_8125_);
lean_dec_ref(v_asVar_8109_);
v___x_8127_ = lean_apply_13(v_toVar_8108_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8127_;
}
else
{
lean_object* v_arg_8128_; lean_object* v___x_8129_; uint8_t v___x_8130_; 
v_arg_8128_ = lean_ctor_get(v___x_8125_, 1);
lean_inc_ref(v_arg_8128_);
v___x_8129_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8125_);
v___x_8130_ = l_Lean_Expr_isApp(v___x_8129_);
if (v___x_8130_ == 0)
{
lean_object* v___x_8131_; 
lean_dec_ref(v___x_8129_);
lean_dec_ref(v_arg_8128_);
lean_dec_ref(v_asVar_8109_);
v___x_8131_ = lean_apply_13(v_toVar_8108_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8131_;
}
else
{
lean_object* v_arg_8132_; lean_object* v___x_8133_; uint8_t v___x_8134_; 
v_arg_8132_ = lean_ctor_get(v___x_8129_, 1);
lean_inc_ref(v_arg_8132_);
v___x_8133_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8129_);
v___x_8134_ = l_Lean_Expr_isApp(v___x_8133_);
if (v___x_8134_ == 0)
{
lean_object* v___x_8135_; 
lean_dec_ref(v___x_8133_);
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_arg_8128_);
lean_dec_ref(v_asVar_8109_);
v___x_8135_ = lean_apply_13(v_toVar_8108_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8135_;
}
else
{
lean_object* v_arg_8136_; lean_object* v___x_8137_; lean_object* v___x_8138_; uint8_t v___x_8139_; 
v_arg_8136_ = lean_ctor_get(v___x_8133_, 1);
lean_inc_ref(v_arg_8136_);
v___x_8137_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8133_);
v___x_8138_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_8139_ = l_Lean_Expr_isConstOf(v___x_8137_, v___x_8138_);
if (v___x_8139_ == 0)
{
lean_object* v___x_8140_; uint8_t v___x_8141_; 
v___x_8140_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_8141_ = l_Lean_Expr_isConstOf(v___x_8137_, v___x_8140_);
if (v___x_8141_ == 0)
{
uint8_t v___x_8142_; 
v___x_8142_ = l_Lean_Expr_isApp(v___x_8137_);
if (v___x_8142_ == 0)
{
lean_object* v___x_8143_; 
lean_dec_ref(v___x_8137_);
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_arg_8128_);
lean_dec_ref(v_asVar_8109_);
v___x_8143_ = lean_apply_13(v_toVar_8108_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8143_;
}
else
{
lean_object* v___x_8144_; uint8_t v___x_8145_; 
v___x_8144_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8137_);
v___x_8145_ = l_Lean_Expr_isApp(v___x_8144_);
if (v___x_8145_ == 0)
{
lean_object* v___x_8146_; 
lean_dec_ref(v___x_8144_);
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_arg_8128_);
lean_dec_ref(v_asVar_8109_);
v___x_8146_ = lean_apply_13(v_toVar_8108_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8146_;
}
else
{
lean_object* v___x_8147_; uint8_t v___x_8148_; 
v___x_8147_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8144_);
v___x_8148_ = l_Lean_Expr_isApp(v___x_8147_);
if (v___x_8148_ == 0)
{
lean_object* v___x_8149_; 
lean_dec_ref(v___x_8147_);
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_arg_8128_);
lean_dec_ref(v_asVar_8109_);
v___x_8149_ = lean_apply_13(v_toVar_8108_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8149_;
}
else
{
lean_object* v___x_8150_; lean_object* v___x_8151_; uint8_t v___x_8152_; 
v___x_8150_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8147_);
v___x_8151_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_8152_ = l_Lean_Expr_isConstOf(v___x_8150_, v___x_8151_);
if (v___x_8152_ == 0)
{
lean_object* v___x_8153_; uint8_t v___x_8154_; 
v___x_8153_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_8154_ = l_Lean_Expr_isConstOf(v___x_8150_, v___x_8153_);
if (v___x_8154_ == 0)
{
lean_object* v___x_8155_; uint8_t v___x_8156_; 
v___x_8155_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_8156_ = l_Lean_Expr_isConstOf(v___x_8150_, v___x_8155_);
lean_dec_ref(v___x_8150_);
if (v___x_8156_ == 0)
{
lean_object* v___x_8157_; 
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_arg_8128_);
lean_dec_ref(v_asVar_8109_);
v___x_8157_ = lean_apply_13(v_toVar_8108_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8157_;
}
else
{
lean_object* v___x_8158_; 
lean_inc(v___y_8121_);
lean_inc_ref(v___y_8120_);
lean_inc(v___y_8119_);
lean_inc_ref(v___y_8118_);
lean_inc(v___y_8117_);
lean_inc_ref(v___y_8116_);
lean_inc(v___y_8115_);
lean_inc_ref(v___y_8114_);
lean_inc(v___y_8113_);
lean_inc(v___y_8112_);
lean_inc(v___y_8111_);
v___x_8158_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1(v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
if (lean_obj_tag(v___x_8158_) == 0)
{
lean_object* v_a_8159_; lean_object* v___x_8160_; uint8_t v___x_8161_; 
v_a_8159_ = lean_ctor_get(v___x_8158_, 0);
lean_inc(v_a_8159_);
lean_dec_ref(v___x_8158_);
v___x_8160_ = l_Lean_Expr_appArg_x21(v_a_8159_);
lean_dec(v_a_8159_);
v___x_8161_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_8160_, v_arg_8136_);
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v___x_8160_);
if (v___x_8161_ == 0)
{
lean_object* v___x_8162_; 
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_arg_8128_);
lean_dec_ref(v_toVar_8108_);
v___x_8162_ = lean_apply_13(v_asVar_8109_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8162_;
}
else
{
lean_object* v___x_8163_; 
lean_dec_ref(v_e_8110_);
lean_inc(v___y_8121_);
lean_inc_ref(v___y_8120_);
lean_inc(v___y_8119_);
lean_inc_ref(v___y_8118_);
lean_inc(v___y_8117_);
lean_inc_ref(v___y_8116_);
lean_inc(v___y_8115_);
lean_inc_ref(v___y_8114_);
lean_inc(v___y_8113_);
lean_inc(v___y_8112_);
lean_inc(v___y_8111_);
lean_inc_ref(v_asVar_8109_);
lean_inc_ref(v_toVar_8108_);
v___x_8163_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8108_, v_asVar_8109_, v_arg_8132_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
if (lean_obj_tag(v___x_8163_) == 0)
{
lean_object* v_a_8164_; lean_object* v___x_8165_; 
v_a_8164_ = lean_ctor_get(v___x_8163_, 0);
lean_inc(v_a_8164_);
lean_dec_ref(v___x_8163_);
v___x_8165_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8108_, v_asVar_8109_, v_arg_8128_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
if (lean_obj_tag(v___x_8165_) == 0)
{
lean_object* v_a_8166_; lean_object* v___x_8168_; uint8_t v_isShared_8169_; uint8_t v_isSharedCheck_8174_; 
v_a_8166_ = lean_ctor_get(v___x_8165_, 0);
v_isSharedCheck_8174_ = !lean_is_exclusive(v___x_8165_);
if (v_isSharedCheck_8174_ == 0)
{
v___x_8168_ = v___x_8165_;
v_isShared_8169_ = v_isSharedCheck_8174_;
goto v_resetjp_8167_;
}
else
{
lean_inc(v_a_8166_);
lean_dec(v___x_8165_);
v___x_8168_ = lean_box(0);
v_isShared_8169_ = v_isSharedCheck_8174_;
goto v_resetjp_8167_;
}
v_resetjp_8167_:
{
lean_object* v___x_8170_; lean_object* v___x_8172_; 
v___x_8170_ = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(v___x_8170_, 0, v_a_8164_);
lean_ctor_set(v___x_8170_, 1, v_a_8166_);
if (v_isShared_8169_ == 0)
{
lean_ctor_set(v___x_8168_, 0, v___x_8170_);
v___x_8172_ = v___x_8168_;
goto v_reusejp_8171_;
}
else
{
lean_object* v_reuseFailAlloc_8173_; 
v_reuseFailAlloc_8173_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8173_, 0, v___x_8170_);
v___x_8172_ = v_reuseFailAlloc_8173_;
goto v_reusejp_8171_;
}
v_reusejp_8171_:
{
return v___x_8172_;
}
}
}
else
{
lean_dec(v_a_8164_);
return v___x_8165_;
}
}
else
{
lean_dec_ref(v_arg_8128_);
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_asVar_8109_);
lean_dec_ref(v_toVar_8108_);
return v___x_8163_;
}
}
}
else
{
lean_object* v_a_8175_; lean_object* v___x_8177_; uint8_t v_isShared_8178_; uint8_t v_isSharedCheck_8182_; 
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_arg_8128_);
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_e_8110_);
lean_dec_ref(v_asVar_8109_);
lean_dec_ref(v_toVar_8108_);
v_a_8175_ = lean_ctor_get(v___x_8158_, 0);
v_isSharedCheck_8182_ = !lean_is_exclusive(v___x_8158_);
if (v_isSharedCheck_8182_ == 0)
{
v___x_8177_ = v___x_8158_;
v_isShared_8178_ = v_isSharedCheck_8182_;
goto v_resetjp_8176_;
}
else
{
lean_inc(v_a_8175_);
lean_dec(v___x_8158_);
v___x_8177_ = lean_box(0);
v_isShared_8178_ = v_isSharedCheck_8182_;
goto v_resetjp_8176_;
}
v_resetjp_8176_:
{
lean_object* v___x_8180_; 
if (v_isShared_8178_ == 0)
{
v___x_8180_ = v___x_8177_;
goto v_reusejp_8179_;
}
else
{
lean_object* v_reuseFailAlloc_8181_; 
v_reuseFailAlloc_8181_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8181_, 0, v_a_8175_);
v___x_8180_ = v_reuseFailAlloc_8181_;
goto v_reusejp_8179_;
}
v_reusejp_8179_:
{
return v___x_8180_;
}
}
}
}
}
else
{
lean_object* v___x_8183_; 
lean_dec_ref(v___x_8150_);
lean_inc(v___y_8121_);
lean_inc_ref(v___y_8120_);
lean_inc(v___y_8119_);
lean_inc_ref(v___y_8118_);
lean_inc(v___y_8117_);
lean_inc_ref(v___y_8116_);
lean_inc(v___y_8115_);
lean_inc_ref(v___y_8114_);
lean_inc(v___y_8113_);
lean_inc(v___y_8112_);
lean_inc(v___y_8111_);
v___x_8183_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3(v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
if (lean_obj_tag(v___x_8183_) == 0)
{
lean_object* v_a_8184_; lean_object* v___x_8185_; uint8_t v___x_8186_; 
v_a_8184_ = lean_ctor_get(v___x_8183_, 0);
lean_inc(v_a_8184_);
lean_dec_ref(v___x_8183_);
v___x_8185_ = l_Lean_Expr_appArg_x21(v_a_8184_);
lean_dec(v_a_8184_);
v___x_8186_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_8185_, v_arg_8136_);
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v___x_8185_);
if (v___x_8186_ == 0)
{
lean_object* v___x_8187_; 
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_arg_8128_);
lean_dec_ref(v_toVar_8108_);
v___x_8187_ = lean_apply_13(v_asVar_8109_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8187_;
}
else
{
lean_object* v___x_8188_; 
lean_dec_ref(v_e_8110_);
lean_inc(v___y_8121_);
lean_inc_ref(v___y_8120_);
lean_inc(v___y_8119_);
lean_inc_ref(v___y_8118_);
lean_inc(v___y_8117_);
lean_inc_ref(v___y_8116_);
lean_inc(v___y_8115_);
lean_inc_ref(v___y_8114_);
lean_inc(v___y_8113_);
lean_inc(v___y_8112_);
lean_inc(v___y_8111_);
lean_inc_ref(v_asVar_8109_);
lean_inc_ref(v_toVar_8108_);
v___x_8188_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8108_, v_asVar_8109_, v_arg_8132_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
if (lean_obj_tag(v___x_8188_) == 0)
{
lean_object* v_a_8189_; lean_object* v___x_8190_; 
v_a_8189_ = lean_ctor_get(v___x_8188_, 0);
lean_inc(v_a_8189_);
lean_dec_ref(v___x_8188_);
v___x_8190_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8108_, v_asVar_8109_, v_arg_8128_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
if (lean_obj_tag(v___x_8190_) == 0)
{
lean_object* v_a_8191_; lean_object* v___x_8193_; uint8_t v_isShared_8194_; uint8_t v_isSharedCheck_8199_; 
v_a_8191_ = lean_ctor_get(v___x_8190_, 0);
v_isSharedCheck_8199_ = !lean_is_exclusive(v___x_8190_);
if (v_isSharedCheck_8199_ == 0)
{
v___x_8193_ = v___x_8190_;
v_isShared_8194_ = v_isSharedCheck_8199_;
goto v_resetjp_8192_;
}
else
{
lean_inc(v_a_8191_);
lean_dec(v___x_8190_);
v___x_8193_ = lean_box(0);
v_isShared_8194_ = v_isSharedCheck_8199_;
goto v_resetjp_8192_;
}
v_resetjp_8192_:
{
lean_object* v___x_8195_; lean_object* v___x_8197_; 
v___x_8195_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8195_, 0, v_a_8189_);
lean_ctor_set(v___x_8195_, 1, v_a_8191_);
if (v_isShared_8194_ == 0)
{
lean_ctor_set(v___x_8193_, 0, v___x_8195_);
v___x_8197_ = v___x_8193_;
goto v_reusejp_8196_;
}
else
{
lean_object* v_reuseFailAlloc_8198_; 
v_reuseFailAlloc_8198_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8198_, 0, v___x_8195_);
v___x_8197_ = v_reuseFailAlloc_8198_;
goto v_reusejp_8196_;
}
v_reusejp_8196_:
{
return v___x_8197_;
}
}
}
else
{
lean_dec(v_a_8189_);
return v___x_8190_;
}
}
else
{
lean_dec_ref(v_arg_8128_);
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_asVar_8109_);
lean_dec_ref(v_toVar_8108_);
return v___x_8188_;
}
}
}
else
{
lean_object* v_a_8200_; lean_object* v___x_8202_; uint8_t v_isShared_8203_; uint8_t v_isSharedCheck_8207_; 
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_arg_8128_);
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_e_8110_);
lean_dec_ref(v_asVar_8109_);
lean_dec_ref(v_toVar_8108_);
v_a_8200_ = lean_ctor_get(v___x_8183_, 0);
v_isSharedCheck_8207_ = !lean_is_exclusive(v___x_8183_);
if (v_isSharedCheck_8207_ == 0)
{
v___x_8202_ = v___x_8183_;
v_isShared_8203_ = v_isSharedCheck_8207_;
goto v_resetjp_8201_;
}
else
{
lean_inc(v_a_8200_);
lean_dec(v___x_8183_);
v___x_8202_ = lean_box(0);
v_isShared_8203_ = v_isSharedCheck_8207_;
goto v_resetjp_8201_;
}
v_resetjp_8201_:
{
lean_object* v___x_8205_; 
if (v_isShared_8203_ == 0)
{
v___x_8205_ = v___x_8202_;
goto v_reusejp_8204_;
}
else
{
lean_object* v_reuseFailAlloc_8206_; 
v_reuseFailAlloc_8206_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8206_, 0, v_a_8200_);
v___x_8205_ = v_reuseFailAlloc_8206_;
goto v_reusejp_8204_;
}
v_reusejp_8204_:
{
return v___x_8205_;
}
}
}
}
}
else
{
lean_object* v___x_8208_; 
lean_dec_ref(v___x_8150_);
lean_inc(v___y_8121_);
lean_inc_ref(v___y_8120_);
lean_inc(v___y_8119_);
lean_inc_ref(v___y_8118_);
v___x_8208_ = l_Lean_Meta_getNatValue_x3f(v_arg_8128_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
lean_dec_ref(v_arg_8128_);
if (lean_obj_tag(v___x_8208_) == 0)
{
lean_object* v_a_8209_; 
v_a_8209_ = lean_ctor_get(v___x_8208_, 0);
lean_inc(v_a_8209_);
lean_dec_ref(v___x_8208_);
if (lean_obj_tag(v_a_8209_) == 1)
{
lean_object* v_val_8210_; lean_object* v___x_8211_; 
v_val_8210_ = lean_ctor_get(v_a_8209_, 0);
lean_inc(v_val_8210_);
lean_dec_ref(v_a_8209_);
lean_inc(v___y_8121_);
lean_inc_ref(v___y_8120_);
lean_inc(v___y_8119_);
lean_inc_ref(v___y_8118_);
lean_inc(v___y_8117_);
lean_inc_ref(v___y_8116_);
lean_inc(v___y_8115_);
lean_inc_ref(v___y_8114_);
lean_inc(v___y_8113_);
lean_inc(v___y_8112_);
lean_inc(v___y_8111_);
v___x_8211_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4(v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
if (lean_obj_tag(v___x_8211_) == 0)
{
lean_object* v_a_8212_; lean_object* v___x_8213_; uint8_t v___x_8214_; 
v_a_8212_ = lean_ctor_get(v___x_8211_, 0);
lean_inc(v_a_8212_);
lean_dec_ref(v___x_8211_);
v___x_8213_ = l_Lean_Expr_appArg_x21(v_a_8212_);
lean_dec(v_a_8212_);
v___x_8214_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_8213_, v_arg_8136_);
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v___x_8213_);
if (v___x_8214_ == 0)
{
lean_object* v___x_8215_; 
lean_dec(v_val_8210_);
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_toVar_8108_);
v___x_8215_ = lean_apply_13(v_asVar_8109_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8215_;
}
else
{
lean_object* v___x_8216_; 
lean_dec_ref(v_e_8110_);
v___x_8216_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8108_, v_asVar_8109_, v_arg_8132_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
if (lean_obj_tag(v___x_8216_) == 0)
{
lean_object* v_a_8217_; lean_object* v___x_8219_; uint8_t v_isShared_8220_; uint8_t v_isSharedCheck_8225_; 
v_a_8217_ = lean_ctor_get(v___x_8216_, 0);
v_isSharedCheck_8225_ = !lean_is_exclusive(v___x_8216_);
if (v_isSharedCheck_8225_ == 0)
{
v___x_8219_ = v___x_8216_;
v_isShared_8220_ = v_isSharedCheck_8225_;
goto v_resetjp_8218_;
}
else
{
lean_inc(v_a_8217_);
lean_dec(v___x_8216_);
v___x_8219_ = lean_box(0);
v_isShared_8220_ = v_isSharedCheck_8225_;
goto v_resetjp_8218_;
}
v_resetjp_8218_:
{
lean_object* v___x_8221_; lean_object* v___x_8223_; 
v___x_8221_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_8221_, 0, v_a_8217_);
lean_ctor_set(v___x_8221_, 1, v_val_8210_);
if (v_isShared_8220_ == 0)
{
lean_ctor_set(v___x_8219_, 0, v___x_8221_);
v___x_8223_ = v___x_8219_;
goto v_reusejp_8222_;
}
else
{
lean_object* v_reuseFailAlloc_8224_; 
v_reuseFailAlloc_8224_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8224_, 0, v___x_8221_);
v___x_8223_ = v_reuseFailAlloc_8224_;
goto v_reusejp_8222_;
}
v_reusejp_8222_:
{
return v___x_8223_;
}
}
}
else
{
lean_dec(v_val_8210_);
return v___x_8216_;
}
}
}
else
{
lean_object* v_a_8226_; lean_object* v___x_8228_; uint8_t v_isShared_8229_; uint8_t v_isSharedCheck_8233_; 
lean_dec(v_val_8210_);
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v_arg_8132_);
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_e_8110_);
lean_dec_ref(v_asVar_8109_);
lean_dec_ref(v_toVar_8108_);
v_a_8226_ = lean_ctor_get(v___x_8211_, 0);
v_isSharedCheck_8233_ = !lean_is_exclusive(v___x_8211_);
if (v_isSharedCheck_8233_ == 0)
{
v___x_8228_ = v___x_8211_;
v_isShared_8229_ = v_isSharedCheck_8233_;
goto v_resetjp_8227_;
}
else
{
lean_inc(v_a_8226_);
lean_dec(v___x_8211_);
v___x_8228_ = lean_box(0);
v_isShared_8229_ = v_isSharedCheck_8233_;
goto v_resetjp_8227_;
}
v_resetjp_8227_:
{
lean_object* v___x_8231_; 
if (v_isShared_8229_ == 0)
{
v___x_8231_ = v___x_8228_;
goto v_reusejp_8230_;
}
else
{
lean_object* v_reuseFailAlloc_8232_; 
v_reuseFailAlloc_8232_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8232_, 0, v_a_8226_);
v___x_8231_ = v_reuseFailAlloc_8232_;
goto v_reusejp_8230_;
}
v_reusejp_8230_:
{
return v___x_8231_;
}
}
}
}
else
{
lean_object* v___x_8234_; 
lean_dec(v_a_8209_);
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_asVar_8109_);
v___x_8234_ = lean_apply_13(v_toVar_8108_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8234_;
}
}
else
{
lean_object* v_a_8235_; lean_object* v___x_8237_; uint8_t v_isShared_8238_; uint8_t v_isSharedCheck_8242_; 
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v_arg_8132_);
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_e_8110_);
lean_dec_ref(v_asVar_8109_);
lean_dec_ref(v_toVar_8108_);
v_a_8235_ = lean_ctor_get(v___x_8208_, 0);
v_isSharedCheck_8242_ = !lean_is_exclusive(v___x_8208_);
if (v_isSharedCheck_8242_ == 0)
{
v___x_8237_ = v___x_8208_;
v_isShared_8238_ = v_isSharedCheck_8242_;
goto v_resetjp_8236_;
}
else
{
lean_inc(v_a_8235_);
lean_dec(v___x_8208_);
v___x_8237_ = lean_box(0);
v_isShared_8238_ = v_isSharedCheck_8242_;
goto v_resetjp_8236_;
}
v_resetjp_8236_:
{
lean_object* v___x_8240_; 
if (v_isShared_8238_ == 0)
{
v___x_8240_ = v___x_8237_;
goto v_reusejp_8239_;
}
else
{
lean_object* v_reuseFailAlloc_8241_; 
v_reuseFailAlloc_8241_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8241_, 0, v_a_8235_);
v___x_8240_ = v_reuseFailAlloc_8241_;
goto v_reusejp_8239_;
}
v_reusejp_8239_:
{
return v___x_8240_;
}
}
}
}
}
}
}
}
else
{
lean_object* v___x_8243_; 
lean_dec_ref(v___x_8137_);
lean_dec_ref(v_arg_8136_);
lean_inc(v___y_8121_);
lean_inc_ref(v___y_8120_);
lean_inc(v___y_8119_);
lean_inc_ref(v___y_8118_);
lean_inc(v___y_8117_);
lean_inc_ref(v___y_8116_);
lean_inc(v___y_8115_);
lean_inc_ref(v___y_8114_);
lean_inc(v___y_8113_);
lean_inc(v___y_8112_);
lean_inc(v___y_8111_);
v___x_8243_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5(v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
if (lean_obj_tag(v___x_8243_) == 0)
{
lean_object* v_a_8244_; lean_object* v___x_8245_; uint8_t v___x_8246_; 
v_a_8244_ = lean_ctor_get(v___x_8243_, 0);
lean_inc(v_a_8244_);
lean_dec_ref(v___x_8243_);
v___x_8245_ = l_Lean_Expr_appArg_x21(v_a_8244_);
lean_dec(v_a_8244_);
v___x_8246_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_8245_, v_arg_8132_);
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v___x_8245_);
if (v___x_8246_ == 0)
{
lean_object* v___x_8247_; 
lean_dec_ref(v_arg_8128_);
lean_dec_ref(v_toVar_8108_);
v___x_8247_ = lean_apply_13(v_asVar_8109_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8247_;
}
else
{
lean_object* v___x_8248_; 
lean_dec_ref(v_asVar_8109_);
lean_inc(v___y_8121_);
lean_inc_ref(v___y_8120_);
lean_inc(v___y_8119_);
lean_inc_ref(v___y_8118_);
v___x_8248_ = l_Lean_Meta_getNatValue_x3f(v_arg_8128_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
lean_dec_ref(v_arg_8128_);
if (lean_obj_tag(v___x_8248_) == 0)
{
lean_object* v_a_8249_; lean_object* v___x_8251_; uint8_t v_isShared_8252_; uint8_t v_isSharedCheck_8266_; 
v_a_8249_ = lean_ctor_get(v___x_8248_, 0);
v_isSharedCheck_8266_ = !lean_is_exclusive(v___x_8248_);
if (v_isSharedCheck_8266_ == 0)
{
v___x_8251_ = v___x_8248_;
v_isShared_8252_ = v_isSharedCheck_8266_;
goto v_resetjp_8250_;
}
else
{
lean_inc(v_a_8249_);
lean_dec(v___x_8248_);
v___x_8251_ = lean_box(0);
v_isShared_8252_ = v_isSharedCheck_8266_;
goto v_resetjp_8250_;
}
v_resetjp_8250_:
{
if (lean_obj_tag(v_a_8249_) == 1)
{
lean_object* v_val_8253_; lean_object* v___x_8255_; uint8_t v_isShared_8256_; uint8_t v_isSharedCheck_8264_; 
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_e_8110_);
lean_dec_ref(v_toVar_8108_);
v_val_8253_ = lean_ctor_get(v_a_8249_, 0);
v_isSharedCheck_8264_ = !lean_is_exclusive(v_a_8249_);
if (v_isSharedCheck_8264_ == 0)
{
v___x_8255_ = v_a_8249_;
v_isShared_8256_ = v_isSharedCheck_8264_;
goto v_resetjp_8254_;
}
else
{
lean_inc(v_val_8253_);
lean_dec(v_a_8249_);
v___x_8255_ = lean_box(0);
v_isShared_8256_ = v_isSharedCheck_8264_;
goto v_resetjp_8254_;
}
v_resetjp_8254_:
{
lean_object* v___x_8257_; lean_object* v___x_8259_; 
v___x_8257_ = lean_nat_to_int(v_val_8253_);
if (v_isShared_8256_ == 0)
{
lean_ctor_set_tag(v___x_8255_, 0);
lean_ctor_set(v___x_8255_, 0, v___x_8257_);
v___x_8259_ = v___x_8255_;
goto v_reusejp_8258_;
}
else
{
lean_object* v_reuseFailAlloc_8263_; 
v_reuseFailAlloc_8263_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8263_, 0, v___x_8257_);
v___x_8259_ = v_reuseFailAlloc_8263_;
goto v_reusejp_8258_;
}
v_reusejp_8258_:
{
lean_object* v___x_8261_; 
if (v_isShared_8252_ == 0)
{
lean_ctor_set(v___x_8251_, 0, v___x_8259_);
v___x_8261_ = v___x_8251_;
goto v_reusejp_8260_;
}
else
{
lean_object* v_reuseFailAlloc_8262_; 
v_reuseFailAlloc_8262_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8262_, 0, v___x_8259_);
v___x_8261_ = v_reuseFailAlloc_8262_;
goto v_reusejp_8260_;
}
v_reusejp_8260_:
{
return v___x_8261_;
}
}
}
}
else
{
lean_object* v___x_8265_; 
lean_del_object(v___x_8251_);
lean_dec(v_a_8249_);
v___x_8265_ = lean_apply_13(v_toVar_8108_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8265_;
}
}
}
else
{
lean_object* v_a_8267_; lean_object* v___x_8269_; uint8_t v_isShared_8270_; uint8_t v_isSharedCheck_8274_; 
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_e_8110_);
lean_dec_ref(v_toVar_8108_);
v_a_8267_ = lean_ctor_get(v___x_8248_, 0);
v_isSharedCheck_8274_ = !lean_is_exclusive(v___x_8248_);
if (v_isSharedCheck_8274_ == 0)
{
v___x_8269_ = v___x_8248_;
v_isShared_8270_ = v_isSharedCheck_8274_;
goto v_resetjp_8268_;
}
else
{
lean_inc(v_a_8267_);
lean_dec(v___x_8248_);
v___x_8269_ = lean_box(0);
v_isShared_8270_ = v_isSharedCheck_8274_;
goto v_resetjp_8268_;
}
v_resetjp_8268_:
{
lean_object* v___x_8272_; 
if (v_isShared_8270_ == 0)
{
v___x_8272_ = v___x_8269_;
goto v_reusejp_8271_;
}
else
{
lean_object* v_reuseFailAlloc_8273_; 
v_reuseFailAlloc_8273_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8273_, 0, v_a_8267_);
v___x_8272_ = v_reuseFailAlloc_8273_;
goto v_reusejp_8271_;
}
v_reusejp_8271_:
{
return v___x_8272_;
}
}
}
}
}
else
{
lean_object* v_a_8275_; lean_object* v___x_8277_; uint8_t v_isShared_8278_; uint8_t v_isSharedCheck_8282_; 
lean_dec_ref(v_arg_8132_);
lean_dec_ref(v_arg_8128_);
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_e_8110_);
lean_dec_ref(v_asVar_8109_);
lean_dec_ref(v_toVar_8108_);
v_a_8275_ = lean_ctor_get(v___x_8243_, 0);
v_isSharedCheck_8282_ = !lean_is_exclusive(v___x_8243_);
if (v_isSharedCheck_8282_ == 0)
{
v___x_8277_ = v___x_8243_;
v_isShared_8278_ = v_isSharedCheck_8282_;
goto v_resetjp_8276_;
}
else
{
lean_inc(v_a_8275_);
lean_dec(v___x_8243_);
v___x_8277_ = lean_box(0);
v_isShared_8278_ = v_isSharedCheck_8282_;
goto v_resetjp_8276_;
}
v_resetjp_8276_:
{
lean_object* v___x_8280_; 
if (v_isShared_8278_ == 0)
{
v___x_8280_ = v___x_8277_;
goto v_reusejp_8279_;
}
else
{
lean_object* v_reuseFailAlloc_8281_; 
v_reuseFailAlloc_8281_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8281_, 0, v_a_8275_);
v___x_8280_ = v_reuseFailAlloc_8281_;
goto v_reusejp_8279_;
}
v_reusejp_8279_:
{
return v___x_8280_;
}
}
}
}
}
else
{
lean_object* v___x_8283_; 
lean_dec_ref(v___x_8137_);
lean_dec_ref(v_arg_8136_);
lean_dec_ref(v_arg_8128_);
lean_dec_ref(v_asVar_8109_);
lean_inc(v___y_8121_);
lean_inc_ref(v___y_8120_);
lean_inc(v___y_8119_);
lean_inc_ref(v___y_8118_);
v___x_8283_ = l_Lean_Meta_getNatValue_x3f(v_arg_8132_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_);
lean_dec_ref(v_arg_8132_);
if (lean_obj_tag(v___x_8283_) == 0)
{
lean_object* v_a_8284_; lean_object* v___x_8286_; uint8_t v_isShared_8287_; uint8_t v_isSharedCheck_8301_; 
v_a_8284_ = lean_ctor_get(v___x_8283_, 0);
v_isSharedCheck_8301_ = !lean_is_exclusive(v___x_8283_);
if (v_isSharedCheck_8301_ == 0)
{
v___x_8286_ = v___x_8283_;
v_isShared_8287_ = v_isSharedCheck_8301_;
goto v_resetjp_8285_;
}
else
{
lean_inc(v_a_8284_);
lean_dec(v___x_8283_);
v___x_8286_ = lean_box(0);
v_isShared_8287_ = v_isSharedCheck_8301_;
goto v_resetjp_8285_;
}
v_resetjp_8285_:
{
if (lean_obj_tag(v_a_8284_) == 1)
{
lean_object* v_val_8288_; lean_object* v___x_8290_; uint8_t v_isShared_8291_; uint8_t v_isSharedCheck_8299_; 
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_e_8110_);
lean_dec_ref(v_toVar_8108_);
v_val_8288_ = lean_ctor_get(v_a_8284_, 0);
v_isSharedCheck_8299_ = !lean_is_exclusive(v_a_8284_);
if (v_isSharedCheck_8299_ == 0)
{
v___x_8290_ = v_a_8284_;
v_isShared_8291_ = v_isSharedCheck_8299_;
goto v_resetjp_8289_;
}
else
{
lean_inc(v_val_8288_);
lean_dec(v_a_8284_);
v___x_8290_ = lean_box(0);
v_isShared_8291_ = v_isSharedCheck_8299_;
goto v_resetjp_8289_;
}
v_resetjp_8289_:
{
lean_object* v___x_8292_; lean_object* v___x_8294_; 
v___x_8292_ = lean_nat_to_int(v_val_8288_);
if (v_isShared_8291_ == 0)
{
lean_ctor_set_tag(v___x_8290_, 0);
lean_ctor_set(v___x_8290_, 0, v___x_8292_);
v___x_8294_ = v___x_8290_;
goto v_reusejp_8293_;
}
else
{
lean_object* v_reuseFailAlloc_8298_; 
v_reuseFailAlloc_8298_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8298_, 0, v___x_8292_);
v___x_8294_ = v_reuseFailAlloc_8298_;
goto v_reusejp_8293_;
}
v_reusejp_8293_:
{
lean_object* v___x_8296_; 
if (v_isShared_8287_ == 0)
{
lean_ctor_set(v___x_8286_, 0, v___x_8294_);
v___x_8296_ = v___x_8286_;
goto v_reusejp_8295_;
}
else
{
lean_object* v_reuseFailAlloc_8297_; 
v_reuseFailAlloc_8297_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8297_, 0, v___x_8294_);
v___x_8296_ = v_reuseFailAlloc_8297_;
goto v_reusejp_8295_;
}
v_reusejp_8295_:
{
return v___x_8296_;
}
}
}
}
else
{
lean_object* v___x_8300_; 
lean_del_object(v___x_8286_);
lean_dec(v_a_8284_);
v___x_8300_ = lean_apply_13(v_toVar_8108_, v_e_8110_, v___y_8111_, v___y_8112_, v___y_8113_, v___y_8114_, v___y_8115_, v___y_8116_, v___y_8117_, v___y_8118_, v___y_8119_, v___y_8120_, v___y_8121_, lean_box(0));
return v___x_8300_;
}
}
}
else
{
lean_object* v_a_8302_; lean_object* v___x_8304_; uint8_t v_isShared_8305_; uint8_t v_isSharedCheck_8309_; 
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_e_8110_);
lean_dec_ref(v_toVar_8108_);
v_a_8302_ = lean_ctor_get(v___x_8283_, 0);
v_isSharedCheck_8309_ = !lean_is_exclusive(v___x_8283_);
if (v_isSharedCheck_8309_ == 0)
{
v___x_8304_ = v___x_8283_;
v_isShared_8305_ = v_isSharedCheck_8309_;
goto v_resetjp_8303_;
}
else
{
lean_inc(v_a_8302_);
lean_dec(v___x_8283_);
v___x_8304_ = lean_box(0);
v_isShared_8305_ = v_isSharedCheck_8309_;
goto v_resetjp_8303_;
}
v_resetjp_8303_:
{
lean_object* v___x_8307_; 
if (v_isShared_8305_ == 0)
{
v___x_8307_ = v___x_8304_;
goto v_reusejp_8306_;
}
else
{
lean_object* v_reuseFailAlloc_8308_; 
v_reuseFailAlloc_8308_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8308_, 0, v_a_8302_);
v___x_8307_ = v_reuseFailAlloc_8308_;
goto v_reusejp_8306_;
}
v_reusejp_8306_:
{
return v___x_8307_;
}
}
}
}
}
}
}
}
else
{
lean_object* v_a_8310_; lean_object* v___x_8312_; uint8_t v_isShared_8313_; uint8_t v_isSharedCheck_8317_; 
lean_dec(v___y_8121_);
lean_dec_ref(v___y_8120_);
lean_dec(v___y_8119_);
lean_dec_ref(v___y_8118_);
lean_dec(v___y_8117_);
lean_dec_ref(v___y_8116_);
lean_dec(v___y_8115_);
lean_dec_ref(v___y_8114_);
lean_dec(v___y_8113_);
lean_dec(v___y_8112_);
lean_dec(v___y_8111_);
lean_dec_ref(v_e_8110_);
lean_dec_ref(v_asVar_8109_);
lean_dec_ref(v_toVar_8108_);
v_a_8310_ = lean_ctor_get(v___x_8123_, 0);
v_isSharedCheck_8317_ = !lean_is_exclusive(v___x_8123_);
if (v_isSharedCheck_8317_ == 0)
{
v___x_8312_ = v___x_8123_;
v_isShared_8313_ = v_isSharedCheck_8317_;
goto v_resetjp_8311_;
}
else
{
lean_inc(v_a_8310_);
lean_dec(v___x_8123_);
v___x_8312_ = lean_box(0);
v_isShared_8313_ = v_isSharedCheck_8317_;
goto v_resetjp_8311_;
}
v_resetjp_8311_:
{
lean_object* v___x_8315_; 
if (v_isShared_8313_ == 0)
{
v___x_8315_ = v___x_8312_;
goto v_reusejp_8314_;
}
else
{
lean_object* v_reuseFailAlloc_8316_; 
v_reuseFailAlloc_8316_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8316_, 0, v_a_8310_);
v___x_8315_ = v_reuseFailAlloc_8316_;
goto v_reusejp_8314_;
}
v_reusejp_8314_:
{
return v___x_8315_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2___boxed(lean_object* v_toVar_8318_, lean_object* v_asVar_8319_, lean_object* v_e_8320_, lean_object* v___y_8321_, lean_object* v___y_8322_, lean_object* v___y_8323_, lean_object* v___y_8324_, lean_object* v___y_8325_, lean_object* v___y_8326_, lean_object* v___y_8327_, lean_object* v___y_8328_, lean_object* v___y_8329_, lean_object* v___y_8330_, lean_object* v___y_8331_, lean_object* v___y_8332_){
_start:
{
lean_object* v_res_8333_; 
v_res_8333_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8318_, v_asVar_8319_, v_e_8320_, v___y_8321_, v___y_8322_, v___y_8323_, v___y_8324_, v___y_8325_, v___y_8326_, v___y_8327_, v___y_8328_, v___y_8329_, v___y_8330_, v___y_8331_);
return v_res_8333_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__2(lean_object* v_mkVar_8334_, lean_object* v_e_8335_, lean_object* v___y_8336_, lean_object* v___y_8337_, lean_object* v___y_8338_, lean_object* v___y_8339_, lean_object* v___y_8340_, lean_object* v___y_8341_, lean_object* v___y_8342_, lean_object* v___y_8343_, lean_object* v___y_8344_, lean_object* v___y_8345_, lean_object* v___y_8346_){
_start:
{
lean_object* v___x_8348_; 
lean_inc_ref(v_e_8335_);
v___x_8348_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg(v_e_8335_, v___y_8338_, v___y_8339_, v___y_8340_, v___y_8341_, v___y_8342_, v___y_8343_, v___y_8344_, v___y_8345_, v___y_8346_);
if (lean_obj_tag(v___x_8348_) == 0)
{
lean_object* v___x_8349_; 
lean_dec_ref(v___x_8348_);
v___x_8349_ = lean_apply_13(v_mkVar_8334_, v_e_8335_, v___y_8336_, v___y_8337_, v___y_8338_, v___y_8339_, v___y_8340_, v___y_8341_, v___y_8342_, v___y_8343_, v___y_8344_, v___y_8345_, v___y_8346_, lean_box(0));
if (lean_obj_tag(v___x_8349_) == 0)
{
lean_object* v_a_8350_; lean_object* v___x_8352_; uint8_t v_isShared_8353_; uint8_t v_isSharedCheck_8358_; 
v_a_8350_ = lean_ctor_get(v___x_8349_, 0);
v_isSharedCheck_8358_ = !lean_is_exclusive(v___x_8349_);
if (v_isSharedCheck_8358_ == 0)
{
v___x_8352_ = v___x_8349_;
v_isShared_8353_ = v_isSharedCheck_8358_;
goto v_resetjp_8351_;
}
else
{
lean_inc(v_a_8350_);
lean_dec(v___x_8349_);
v___x_8352_ = lean_box(0);
v_isShared_8353_ = v_isSharedCheck_8358_;
goto v_resetjp_8351_;
}
v_resetjp_8351_:
{
lean_object* v___x_8354_; lean_object* v___x_8356_; 
v___x_8354_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_8354_, 0, v_a_8350_);
if (v_isShared_8353_ == 0)
{
lean_ctor_set(v___x_8352_, 0, v___x_8354_);
v___x_8356_ = v___x_8352_;
goto v_reusejp_8355_;
}
else
{
lean_object* v_reuseFailAlloc_8357_; 
v_reuseFailAlloc_8357_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8357_, 0, v___x_8354_);
v___x_8356_ = v_reuseFailAlloc_8357_;
goto v_reusejp_8355_;
}
v_reusejp_8355_:
{
return v___x_8356_;
}
}
}
else
{
lean_object* v_a_8359_; lean_object* v___x_8361_; uint8_t v_isShared_8362_; uint8_t v_isSharedCheck_8366_; 
v_a_8359_ = lean_ctor_get(v___x_8349_, 0);
v_isSharedCheck_8366_ = !lean_is_exclusive(v___x_8349_);
if (v_isSharedCheck_8366_ == 0)
{
v___x_8361_ = v___x_8349_;
v_isShared_8362_ = v_isSharedCheck_8366_;
goto v_resetjp_8360_;
}
else
{
lean_inc(v_a_8359_);
lean_dec(v___x_8349_);
v___x_8361_ = lean_box(0);
v_isShared_8362_ = v_isSharedCheck_8366_;
goto v_resetjp_8360_;
}
v_resetjp_8360_:
{
lean_object* v___x_8364_; 
if (v_isShared_8362_ == 0)
{
v___x_8364_ = v___x_8361_;
goto v_reusejp_8363_;
}
else
{
lean_object* v_reuseFailAlloc_8365_; 
v_reuseFailAlloc_8365_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8365_, 0, v_a_8359_);
v___x_8364_ = v_reuseFailAlloc_8365_;
goto v_reusejp_8363_;
}
v_reusejp_8363_:
{
return v___x_8364_;
}
}
}
}
else
{
lean_object* v_a_8367_; lean_object* v___x_8369_; uint8_t v_isShared_8370_; uint8_t v_isSharedCheck_8374_; 
lean_dec(v___y_8346_);
lean_dec_ref(v___y_8345_);
lean_dec(v___y_8344_);
lean_dec_ref(v___y_8343_);
lean_dec(v___y_8342_);
lean_dec_ref(v___y_8341_);
lean_dec(v___y_8340_);
lean_dec_ref(v___y_8339_);
lean_dec(v___y_8338_);
lean_dec(v___y_8337_);
lean_dec(v___y_8336_);
lean_dec_ref(v_e_8335_);
lean_dec_ref(v_mkVar_8334_);
v_a_8367_ = lean_ctor_get(v___x_8348_, 0);
v_isSharedCheck_8374_ = !lean_is_exclusive(v___x_8348_);
if (v_isSharedCheck_8374_ == 0)
{
v___x_8369_ = v___x_8348_;
v_isShared_8370_ = v_isSharedCheck_8374_;
goto v_resetjp_8368_;
}
else
{
lean_inc(v_a_8367_);
lean_dec(v___x_8348_);
v___x_8369_ = lean_box(0);
v_isShared_8370_ = v_isSharedCheck_8374_;
goto v_resetjp_8368_;
}
v_resetjp_8368_:
{
lean_object* v___x_8372_; 
if (v_isShared_8370_ == 0)
{
v___x_8372_ = v___x_8369_;
goto v_reusejp_8371_;
}
else
{
lean_object* v_reuseFailAlloc_8373_; 
v_reuseFailAlloc_8373_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8373_, 0, v_a_8367_);
v___x_8372_ = v_reuseFailAlloc_8373_;
goto v_reusejp_8371_;
}
v_reusejp_8371_:
{
return v___x_8372_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__2___boxed(lean_object* v_mkVar_8375_, lean_object* v_e_8376_, lean_object* v___y_8377_, lean_object* v___y_8378_, lean_object* v___y_8379_, lean_object* v___y_8380_, lean_object* v___y_8381_, lean_object* v___y_8382_, lean_object* v___y_8383_, lean_object* v___y_8384_, lean_object* v___y_8385_, lean_object* v___y_8386_, lean_object* v___y_8387_, lean_object* v___y_8388_){
_start:
{
lean_object* v_res_8389_; 
v_res_8389_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__2(v_mkVar_8375_, v_e_8376_, v___y_8377_, v___y_8378_, v___y_8379_, v___y_8380_, v___y_8381_, v___y_8382_, v___y_8383_, v___y_8384_, v___y_8385_, v___y_8386_, v___y_8387_);
return v_res_8389_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0___lam__0(lean_object* v___y_8390_, lean_object* v_e_8391_, lean_object* v_size_8392_, lean_object* v_s_8393_){
_start:
{
lean_object* v_rings_8394_; lean_object* v_typeIdOf_8395_; lean_object* v_exprToRingId_8396_; lean_object* v_semirings_8397_; lean_object* v_stypeIdOf_8398_; lean_object* v_exprToSemiringId_8399_; lean_object* v_ncRings_8400_; lean_object* v_exprToNCRingId_8401_; lean_object* v_nctypeIdOf_8402_; lean_object* v_ncSemirings_8403_; lean_object* v_exprToNCSemiringId_8404_; lean_object* v_ncstypeIdOf_8405_; lean_object* v_steps_8406_; lean_object* v___x_8407_; uint8_t v___x_8408_; 
v_rings_8394_ = lean_ctor_get(v_s_8393_, 0);
v_typeIdOf_8395_ = lean_ctor_get(v_s_8393_, 1);
v_exprToRingId_8396_ = lean_ctor_get(v_s_8393_, 2);
v_semirings_8397_ = lean_ctor_get(v_s_8393_, 3);
v_stypeIdOf_8398_ = lean_ctor_get(v_s_8393_, 4);
v_exprToSemiringId_8399_ = lean_ctor_get(v_s_8393_, 5);
v_ncRings_8400_ = lean_ctor_get(v_s_8393_, 6);
v_exprToNCRingId_8401_ = lean_ctor_get(v_s_8393_, 7);
v_nctypeIdOf_8402_ = lean_ctor_get(v_s_8393_, 8);
v_ncSemirings_8403_ = lean_ctor_get(v_s_8393_, 9);
v_exprToNCSemiringId_8404_ = lean_ctor_get(v_s_8393_, 10);
v_ncstypeIdOf_8405_ = lean_ctor_get(v_s_8393_, 11);
v_steps_8406_ = lean_ctor_get(v_s_8393_, 12);
v___x_8407_ = lean_array_get_size(v_semirings_8397_);
v___x_8408_ = lean_nat_dec_lt(v___y_8390_, v___x_8407_);
if (v___x_8408_ == 0)
{
lean_dec(v_size_8392_);
lean_dec_ref(v_e_8391_);
return v_s_8393_;
}
else
{
lean_object* v___x_8410_; uint8_t v_isShared_8411_; uint8_t v_isSharedCheck_8451_; 
lean_inc(v_steps_8406_);
lean_inc_ref(v_ncstypeIdOf_8405_);
lean_inc_ref(v_exprToNCSemiringId_8404_);
lean_inc_ref(v_ncSemirings_8403_);
lean_inc_ref(v_nctypeIdOf_8402_);
lean_inc_ref(v_exprToNCRingId_8401_);
lean_inc_ref(v_ncRings_8400_);
lean_inc_ref(v_exprToSemiringId_8399_);
lean_inc_ref(v_stypeIdOf_8398_);
lean_inc_ref(v_semirings_8397_);
lean_inc_ref(v_exprToRingId_8396_);
lean_inc_ref(v_typeIdOf_8395_);
lean_inc_ref(v_rings_8394_);
v_isSharedCheck_8451_ = !lean_is_exclusive(v_s_8393_);
if (v_isSharedCheck_8451_ == 0)
{
lean_object* v_unused_8452_; lean_object* v_unused_8453_; lean_object* v_unused_8454_; lean_object* v_unused_8455_; lean_object* v_unused_8456_; lean_object* v_unused_8457_; lean_object* v_unused_8458_; lean_object* v_unused_8459_; lean_object* v_unused_8460_; lean_object* v_unused_8461_; lean_object* v_unused_8462_; lean_object* v_unused_8463_; lean_object* v_unused_8464_; 
v_unused_8452_ = lean_ctor_get(v_s_8393_, 12);
lean_dec(v_unused_8452_);
v_unused_8453_ = lean_ctor_get(v_s_8393_, 11);
lean_dec(v_unused_8453_);
v_unused_8454_ = lean_ctor_get(v_s_8393_, 10);
lean_dec(v_unused_8454_);
v_unused_8455_ = lean_ctor_get(v_s_8393_, 9);
lean_dec(v_unused_8455_);
v_unused_8456_ = lean_ctor_get(v_s_8393_, 8);
lean_dec(v_unused_8456_);
v_unused_8457_ = lean_ctor_get(v_s_8393_, 7);
lean_dec(v_unused_8457_);
v_unused_8458_ = lean_ctor_get(v_s_8393_, 6);
lean_dec(v_unused_8458_);
v_unused_8459_ = lean_ctor_get(v_s_8393_, 5);
lean_dec(v_unused_8459_);
v_unused_8460_ = lean_ctor_get(v_s_8393_, 4);
lean_dec(v_unused_8460_);
v_unused_8461_ = lean_ctor_get(v_s_8393_, 3);
lean_dec(v_unused_8461_);
v_unused_8462_ = lean_ctor_get(v_s_8393_, 2);
lean_dec(v_unused_8462_);
v_unused_8463_ = lean_ctor_get(v_s_8393_, 1);
lean_dec(v_unused_8463_);
v_unused_8464_ = lean_ctor_get(v_s_8393_, 0);
lean_dec(v_unused_8464_);
v___x_8410_ = v_s_8393_;
v_isShared_8411_ = v_isSharedCheck_8451_;
goto v_resetjp_8409_;
}
else
{
lean_dec(v_s_8393_);
v___x_8410_ = lean_box(0);
v_isShared_8411_ = v_isSharedCheck_8451_;
goto v_resetjp_8409_;
}
v_resetjp_8409_:
{
lean_object* v_v_8412_; lean_object* v_toSemiring_8413_; lean_object* v_ringId_8414_; lean_object* v_commSemiringInst_8415_; lean_object* v_addRightCancelInst_x3f_8416_; lean_object* v_toQFn_x3f_8417_; lean_object* v___x_8419_; uint8_t v_isShared_8420_; uint8_t v_isSharedCheck_8450_; 
v_v_8412_ = lean_array_fget(v_semirings_8397_, v___y_8390_);
v_toSemiring_8413_ = lean_ctor_get(v_v_8412_, 0);
v_ringId_8414_ = lean_ctor_get(v_v_8412_, 1);
v_commSemiringInst_8415_ = lean_ctor_get(v_v_8412_, 2);
v_addRightCancelInst_x3f_8416_ = lean_ctor_get(v_v_8412_, 3);
v_toQFn_x3f_8417_ = lean_ctor_get(v_v_8412_, 4);
v_isSharedCheck_8450_ = !lean_is_exclusive(v_v_8412_);
if (v_isSharedCheck_8450_ == 0)
{
v___x_8419_ = v_v_8412_;
v_isShared_8420_ = v_isSharedCheck_8450_;
goto v_resetjp_8418_;
}
else
{
lean_inc(v_toQFn_x3f_8417_);
lean_inc(v_addRightCancelInst_x3f_8416_);
lean_inc(v_commSemiringInst_8415_);
lean_inc(v_ringId_8414_);
lean_inc(v_toSemiring_8413_);
lean_dec(v_v_8412_);
v___x_8419_ = lean_box(0);
v_isShared_8420_ = v_isSharedCheck_8450_;
goto v_resetjp_8418_;
}
v_resetjp_8418_:
{
lean_object* v_id_8421_; lean_object* v_type_8422_; lean_object* v_u_8423_; lean_object* v_semiringInst_8424_; lean_object* v_addFn_x3f_8425_; lean_object* v_mulFn_x3f_8426_; lean_object* v_powFn_x3f_8427_; lean_object* v_natCastFn_x3f_8428_; lean_object* v_denote_8429_; lean_object* v_vars_8430_; lean_object* v_varMap_8431_; lean_object* v___x_8433_; uint8_t v_isShared_8434_; uint8_t v_isSharedCheck_8449_; 
v_id_8421_ = lean_ctor_get(v_toSemiring_8413_, 0);
v_type_8422_ = lean_ctor_get(v_toSemiring_8413_, 1);
v_u_8423_ = lean_ctor_get(v_toSemiring_8413_, 2);
v_semiringInst_8424_ = lean_ctor_get(v_toSemiring_8413_, 3);
v_addFn_x3f_8425_ = lean_ctor_get(v_toSemiring_8413_, 4);
v_mulFn_x3f_8426_ = lean_ctor_get(v_toSemiring_8413_, 5);
v_powFn_x3f_8427_ = lean_ctor_get(v_toSemiring_8413_, 6);
v_natCastFn_x3f_8428_ = lean_ctor_get(v_toSemiring_8413_, 7);
v_denote_8429_ = lean_ctor_get(v_toSemiring_8413_, 8);
v_vars_8430_ = lean_ctor_get(v_toSemiring_8413_, 9);
v_varMap_8431_ = lean_ctor_get(v_toSemiring_8413_, 10);
v_isSharedCheck_8449_ = !lean_is_exclusive(v_toSemiring_8413_);
if (v_isSharedCheck_8449_ == 0)
{
v___x_8433_ = v_toSemiring_8413_;
v_isShared_8434_ = v_isSharedCheck_8449_;
goto v_resetjp_8432_;
}
else
{
lean_inc(v_varMap_8431_);
lean_inc(v_vars_8430_);
lean_inc(v_denote_8429_);
lean_inc(v_natCastFn_x3f_8428_);
lean_inc(v_powFn_x3f_8427_);
lean_inc(v_mulFn_x3f_8426_);
lean_inc(v_addFn_x3f_8425_);
lean_inc(v_semiringInst_8424_);
lean_inc(v_u_8423_);
lean_inc(v_type_8422_);
lean_inc(v_id_8421_);
lean_dec(v_toSemiring_8413_);
v___x_8433_ = lean_box(0);
v_isShared_8434_ = v_isSharedCheck_8449_;
goto v_resetjp_8432_;
}
v_resetjp_8432_:
{
lean_object* v___x_8435_; lean_object* v_xs_x27_8436_; lean_object* v___x_8437_; lean_object* v___x_8438_; lean_object* v___x_8440_; 
v___x_8435_ = lean_box(0);
v_xs_x27_8436_ = lean_array_fset(v_semirings_8397_, v___y_8390_, v___x_8435_);
lean_inc_ref(v_e_8391_);
v___x_8437_ = l_Lean_PersistentArray_push___redArg(v_vars_8430_, v_e_8391_);
v___x_8438_ = l_Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2___redArg(v_varMap_8431_, v_e_8391_, v_size_8392_);
if (v_isShared_8434_ == 0)
{
lean_ctor_set(v___x_8433_, 10, v___x_8438_);
lean_ctor_set(v___x_8433_, 9, v___x_8437_);
v___x_8440_ = v___x_8433_;
goto v_reusejp_8439_;
}
else
{
lean_object* v_reuseFailAlloc_8448_; 
v_reuseFailAlloc_8448_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_8448_, 0, v_id_8421_);
lean_ctor_set(v_reuseFailAlloc_8448_, 1, v_type_8422_);
lean_ctor_set(v_reuseFailAlloc_8448_, 2, v_u_8423_);
lean_ctor_set(v_reuseFailAlloc_8448_, 3, v_semiringInst_8424_);
lean_ctor_set(v_reuseFailAlloc_8448_, 4, v_addFn_x3f_8425_);
lean_ctor_set(v_reuseFailAlloc_8448_, 5, v_mulFn_x3f_8426_);
lean_ctor_set(v_reuseFailAlloc_8448_, 6, v_powFn_x3f_8427_);
lean_ctor_set(v_reuseFailAlloc_8448_, 7, v_natCastFn_x3f_8428_);
lean_ctor_set(v_reuseFailAlloc_8448_, 8, v_denote_8429_);
lean_ctor_set(v_reuseFailAlloc_8448_, 9, v___x_8437_);
lean_ctor_set(v_reuseFailAlloc_8448_, 10, v___x_8438_);
v___x_8440_ = v_reuseFailAlloc_8448_;
goto v_reusejp_8439_;
}
v_reusejp_8439_:
{
lean_object* v___x_8442_; 
if (v_isShared_8420_ == 0)
{
lean_ctor_set(v___x_8419_, 0, v___x_8440_);
v___x_8442_ = v___x_8419_;
goto v_reusejp_8441_;
}
else
{
lean_object* v_reuseFailAlloc_8447_; 
v_reuseFailAlloc_8447_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_8447_, 0, v___x_8440_);
lean_ctor_set(v_reuseFailAlloc_8447_, 1, v_ringId_8414_);
lean_ctor_set(v_reuseFailAlloc_8447_, 2, v_commSemiringInst_8415_);
lean_ctor_set(v_reuseFailAlloc_8447_, 3, v_addRightCancelInst_x3f_8416_);
lean_ctor_set(v_reuseFailAlloc_8447_, 4, v_toQFn_x3f_8417_);
v___x_8442_ = v_reuseFailAlloc_8447_;
goto v_reusejp_8441_;
}
v_reusejp_8441_:
{
lean_object* v___x_8443_; lean_object* v___x_8445_; 
v___x_8443_ = lean_array_fset(v_xs_x27_8436_, v___y_8390_, v___x_8442_);
if (v_isShared_8411_ == 0)
{
lean_ctor_set(v___x_8410_, 3, v___x_8443_);
v___x_8445_ = v___x_8410_;
goto v_reusejp_8444_;
}
else
{
lean_object* v_reuseFailAlloc_8446_; 
v_reuseFailAlloc_8446_ = lean_alloc_ctor(0, 13, 0);
lean_ctor_set(v_reuseFailAlloc_8446_, 0, v_rings_8394_);
lean_ctor_set(v_reuseFailAlloc_8446_, 1, v_typeIdOf_8395_);
lean_ctor_set(v_reuseFailAlloc_8446_, 2, v_exprToRingId_8396_);
lean_ctor_set(v_reuseFailAlloc_8446_, 3, v___x_8443_);
lean_ctor_set(v_reuseFailAlloc_8446_, 4, v_stypeIdOf_8398_);
lean_ctor_set(v_reuseFailAlloc_8446_, 5, v_exprToSemiringId_8399_);
lean_ctor_set(v_reuseFailAlloc_8446_, 6, v_ncRings_8400_);
lean_ctor_set(v_reuseFailAlloc_8446_, 7, v_exprToNCRingId_8401_);
lean_ctor_set(v_reuseFailAlloc_8446_, 8, v_nctypeIdOf_8402_);
lean_ctor_set(v_reuseFailAlloc_8446_, 9, v_ncSemirings_8403_);
lean_ctor_set(v_reuseFailAlloc_8446_, 10, v_exprToNCSemiringId_8404_);
lean_ctor_set(v_reuseFailAlloc_8446_, 11, v_ncstypeIdOf_8405_);
lean_ctor_set(v_reuseFailAlloc_8446_, 12, v_steps_8406_);
v___x_8445_ = v_reuseFailAlloc_8446_;
goto v_reusejp_8444_;
}
v_reusejp_8444_:
{
return v___x_8445_;
}
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0___lam__0___boxed(lean_object* v___y_8465_, lean_object* v_e_8466_, lean_object* v_size_8467_, lean_object* v_s_8468_){
_start:
{
lean_object* v_res_8469_; 
v_res_8469_ = l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0___lam__0(v___y_8465_, v_e_8466_, v_size_8467_, v_s_8468_);
lean_dec(v___y_8465_);
return v_res_8469_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0(lean_object* v_e_8470_, lean_object* v___y_8471_, lean_object* v___y_8472_, lean_object* v___y_8473_, lean_object* v___y_8474_, lean_object* v___y_8475_, lean_object* v___y_8476_, lean_object* v___y_8477_, lean_object* v___y_8478_, lean_object* v___y_8479_, lean_object* v___y_8480_, lean_object* v___y_8481_){
_start:
{
lean_object* v___x_8483_; 
v___x_8483_ = l_Lean_Meta_Grind_Arith_CommRing_SemiringM_getCommSemiring(v___y_8471_, v___y_8472_, v___y_8473_, v___y_8474_, v___y_8475_, v___y_8476_, v___y_8477_, v___y_8478_, v___y_8479_, v___y_8480_, v___y_8481_);
if (lean_obj_tag(v___x_8483_) == 0)
{
lean_object* v_a_8484_; lean_object* v___x_8486_; uint8_t v_isShared_8487_; uint8_t v_isSharedCheck_8534_; 
v_a_8484_ = lean_ctor_get(v___x_8483_, 0);
v_isSharedCheck_8534_ = !lean_is_exclusive(v___x_8483_);
if (v_isSharedCheck_8534_ == 0)
{
v___x_8486_ = v___x_8483_;
v_isShared_8487_ = v_isSharedCheck_8534_;
goto v_resetjp_8485_;
}
else
{
lean_inc(v_a_8484_);
lean_dec(v___x_8483_);
v___x_8486_ = lean_box(0);
v_isShared_8487_ = v_isSharedCheck_8534_;
goto v_resetjp_8485_;
}
v_resetjp_8485_:
{
lean_object* v_toSemiring_8488_; lean_object* v_vars_8489_; lean_object* v_varMap_8490_; lean_object* v___x_8491_; 
v_toSemiring_8488_ = lean_ctor_get(v_a_8484_, 0);
lean_inc_ref(v_toSemiring_8488_);
lean_dec(v_a_8484_);
v_vars_8489_ = lean_ctor_get(v_toSemiring_8488_, 9);
lean_inc_ref(v_vars_8489_);
v_varMap_8490_ = lean_ctor_get(v_toSemiring_8488_, 10);
lean_inc_ref(v_varMap_8490_);
lean_dec_ref(v_toSemiring_8488_);
v___x_8491_ = l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___redArg(v_varMap_8490_, v_e_8470_);
if (lean_obj_tag(v___x_8491_) == 1)
{
lean_object* v_val_8492_; lean_object* v___x_8494_; 
lean_dec_ref(v_vars_8489_);
lean_dec(v___y_8481_);
lean_dec_ref(v___y_8480_);
lean_dec(v___y_8479_);
lean_dec_ref(v___y_8478_);
lean_dec(v___y_8477_);
lean_dec_ref(v___y_8476_);
lean_dec(v___y_8475_);
lean_dec_ref(v___y_8474_);
lean_dec(v___y_8473_);
lean_dec(v___y_8472_);
lean_dec(v___y_8471_);
lean_dec_ref(v_e_8470_);
v_val_8492_ = lean_ctor_get(v___x_8491_, 0);
lean_inc(v_val_8492_);
lean_dec_ref(v___x_8491_);
if (v_isShared_8487_ == 0)
{
lean_ctor_set(v___x_8486_, 0, v_val_8492_);
v___x_8494_ = v___x_8486_;
goto v_reusejp_8493_;
}
else
{
lean_object* v_reuseFailAlloc_8495_; 
v_reuseFailAlloc_8495_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8495_, 0, v_val_8492_);
v___x_8494_ = v_reuseFailAlloc_8495_;
goto v_reusejp_8493_;
}
v_reusejp_8493_:
{
return v___x_8494_;
}
}
else
{
lean_object* v_size_8496_; lean_object* v___f_8497_; lean_object* v___x_8498_; lean_object* v___x_8499_; 
lean_dec(v___x_8491_);
lean_del_object(v___x_8486_);
v_size_8496_ = lean_ctor_get(v_vars_8489_, 2);
lean_inc(v_size_8496_);
lean_dec_ref(v_vars_8489_);
lean_inc(v_size_8496_);
lean_inc_ref(v_e_8470_);
lean_inc(v___y_8471_);
v___f_8497_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0___lam__0___boxed), 4, 3);
lean_closure_set(v___f_8497_, 0, v___y_8471_);
lean_closure_set(v___f_8497_, 1, v_e_8470_);
lean_closure_set(v___f_8497_, 2, v_size_8496_);
v___x_8498_ = l_Lean_Meta_Grind_Arith_CommRing_ringExt;
v___x_8499_ = l___private_Lean_Meta_Tactic_Grind_Types_0__Lean_Meta_Grind_SolverExtension_modifyStateImpl___redArg(v___x_8498_, v___f_8497_, v___y_8472_);
if (lean_obj_tag(v___x_8499_) == 0)
{
lean_object* v___x_8500_; 
lean_dec_ref(v___x_8499_);
lean_inc_ref(v_e_8470_);
v___x_8500_ = l_Lean_Meta_Grind_Arith_CommRing_setTermSemiringId(v_e_8470_, v___y_8471_, v___y_8472_, v___y_8473_, v___y_8474_, v___y_8475_, v___y_8476_, v___y_8477_, v___y_8478_, v___y_8479_, v___y_8480_, v___y_8481_);
if (lean_obj_tag(v___x_8500_) == 0)
{
lean_object* v___x_8501_; 
lean_dec_ref(v___x_8500_);
v___x_8501_ = l_Lean_Meta_Grind_SolverExtension_markTerm___redArg(v___x_8498_, v_e_8470_, v___y_8472_, v___y_8473_, v___y_8474_, v___y_8475_, v___y_8476_, v___y_8477_, v___y_8478_, v___y_8479_, v___y_8480_, v___y_8481_);
if (lean_obj_tag(v___x_8501_) == 0)
{
lean_object* v___x_8503_; uint8_t v_isShared_8504_; uint8_t v_isSharedCheck_8508_; 
v_isSharedCheck_8508_ = !lean_is_exclusive(v___x_8501_);
if (v_isSharedCheck_8508_ == 0)
{
lean_object* v_unused_8509_; 
v_unused_8509_ = lean_ctor_get(v___x_8501_, 0);
lean_dec(v_unused_8509_);
v___x_8503_ = v___x_8501_;
v_isShared_8504_ = v_isSharedCheck_8508_;
goto v_resetjp_8502_;
}
else
{
lean_dec(v___x_8501_);
v___x_8503_ = lean_box(0);
v_isShared_8504_ = v_isSharedCheck_8508_;
goto v_resetjp_8502_;
}
v_resetjp_8502_:
{
lean_object* v___x_8506_; 
if (v_isShared_8504_ == 0)
{
lean_ctor_set(v___x_8503_, 0, v_size_8496_);
v___x_8506_ = v___x_8503_;
goto v_reusejp_8505_;
}
else
{
lean_object* v_reuseFailAlloc_8507_; 
v_reuseFailAlloc_8507_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8507_, 0, v_size_8496_);
v___x_8506_ = v_reuseFailAlloc_8507_;
goto v_reusejp_8505_;
}
v_reusejp_8505_:
{
return v___x_8506_;
}
}
}
else
{
lean_object* v_a_8510_; lean_object* v___x_8512_; uint8_t v_isShared_8513_; uint8_t v_isSharedCheck_8517_; 
lean_dec(v_size_8496_);
v_a_8510_ = lean_ctor_get(v___x_8501_, 0);
v_isSharedCheck_8517_ = !lean_is_exclusive(v___x_8501_);
if (v_isSharedCheck_8517_ == 0)
{
v___x_8512_ = v___x_8501_;
v_isShared_8513_ = v_isSharedCheck_8517_;
goto v_resetjp_8511_;
}
else
{
lean_inc(v_a_8510_);
lean_dec(v___x_8501_);
v___x_8512_ = lean_box(0);
v_isShared_8513_ = v_isSharedCheck_8517_;
goto v_resetjp_8511_;
}
v_resetjp_8511_:
{
lean_object* v___x_8515_; 
if (v_isShared_8513_ == 0)
{
v___x_8515_ = v___x_8512_;
goto v_reusejp_8514_;
}
else
{
lean_object* v_reuseFailAlloc_8516_; 
v_reuseFailAlloc_8516_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8516_, 0, v_a_8510_);
v___x_8515_ = v_reuseFailAlloc_8516_;
goto v_reusejp_8514_;
}
v_reusejp_8514_:
{
return v___x_8515_;
}
}
}
}
else
{
lean_object* v_a_8518_; lean_object* v___x_8520_; uint8_t v_isShared_8521_; uint8_t v_isSharedCheck_8525_; 
lean_dec(v_size_8496_);
lean_dec(v___y_8481_);
lean_dec_ref(v___y_8480_);
lean_dec(v___y_8479_);
lean_dec_ref(v___y_8478_);
lean_dec(v___y_8477_);
lean_dec_ref(v___y_8476_);
lean_dec(v___y_8475_);
lean_dec_ref(v___y_8474_);
lean_dec(v___y_8473_);
lean_dec(v___y_8472_);
lean_dec_ref(v_e_8470_);
v_a_8518_ = lean_ctor_get(v___x_8500_, 0);
v_isSharedCheck_8525_ = !lean_is_exclusive(v___x_8500_);
if (v_isSharedCheck_8525_ == 0)
{
v___x_8520_ = v___x_8500_;
v_isShared_8521_ = v_isSharedCheck_8525_;
goto v_resetjp_8519_;
}
else
{
lean_inc(v_a_8518_);
lean_dec(v___x_8500_);
v___x_8520_ = lean_box(0);
v_isShared_8521_ = v_isSharedCheck_8525_;
goto v_resetjp_8519_;
}
v_resetjp_8519_:
{
lean_object* v___x_8523_; 
if (v_isShared_8521_ == 0)
{
v___x_8523_ = v___x_8520_;
goto v_reusejp_8522_;
}
else
{
lean_object* v_reuseFailAlloc_8524_; 
v_reuseFailAlloc_8524_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8524_, 0, v_a_8518_);
v___x_8523_ = v_reuseFailAlloc_8524_;
goto v_reusejp_8522_;
}
v_reusejp_8522_:
{
return v___x_8523_;
}
}
}
}
else
{
lean_object* v_a_8526_; lean_object* v___x_8528_; uint8_t v_isShared_8529_; uint8_t v_isSharedCheck_8533_; 
lean_dec(v_size_8496_);
lean_dec(v___y_8481_);
lean_dec_ref(v___y_8480_);
lean_dec(v___y_8479_);
lean_dec_ref(v___y_8478_);
lean_dec(v___y_8477_);
lean_dec_ref(v___y_8476_);
lean_dec(v___y_8475_);
lean_dec_ref(v___y_8474_);
lean_dec(v___y_8473_);
lean_dec(v___y_8472_);
lean_dec(v___y_8471_);
lean_dec_ref(v_e_8470_);
v_a_8526_ = lean_ctor_get(v___x_8499_, 0);
v_isSharedCheck_8533_ = !lean_is_exclusive(v___x_8499_);
if (v_isSharedCheck_8533_ == 0)
{
v___x_8528_ = v___x_8499_;
v_isShared_8529_ = v_isSharedCheck_8533_;
goto v_resetjp_8527_;
}
else
{
lean_inc(v_a_8526_);
lean_dec(v___x_8499_);
v___x_8528_ = lean_box(0);
v_isShared_8529_ = v_isSharedCheck_8533_;
goto v_resetjp_8527_;
}
v_resetjp_8527_:
{
lean_object* v___x_8531_; 
if (v_isShared_8529_ == 0)
{
v___x_8531_ = v___x_8528_;
goto v_reusejp_8530_;
}
else
{
lean_object* v_reuseFailAlloc_8532_; 
v_reuseFailAlloc_8532_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8532_, 0, v_a_8526_);
v___x_8531_ = v_reuseFailAlloc_8532_;
goto v_reusejp_8530_;
}
v_reusejp_8530_:
{
return v___x_8531_;
}
}
}
}
}
}
else
{
lean_object* v_a_8535_; lean_object* v___x_8537_; uint8_t v_isShared_8538_; uint8_t v_isSharedCheck_8542_; 
lean_dec(v___y_8481_);
lean_dec_ref(v___y_8480_);
lean_dec(v___y_8479_);
lean_dec_ref(v___y_8478_);
lean_dec(v___y_8477_);
lean_dec_ref(v___y_8476_);
lean_dec(v___y_8475_);
lean_dec_ref(v___y_8474_);
lean_dec(v___y_8473_);
lean_dec(v___y_8472_);
lean_dec(v___y_8471_);
lean_dec_ref(v_e_8470_);
v_a_8535_ = lean_ctor_get(v___x_8483_, 0);
v_isSharedCheck_8542_ = !lean_is_exclusive(v___x_8483_);
if (v_isSharedCheck_8542_ == 0)
{
v___x_8537_ = v___x_8483_;
v_isShared_8538_ = v_isSharedCheck_8542_;
goto v_resetjp_8536_;
}
else
{
lean_inc(v_a_8535_);
lean_dec(v___x_8483_);
v___x_8537_ = lean_box(0);
v_isShared_8538_ = v_isSharedCheck_8542_;
goto v_resetjp_8536_;
}
v_resetjp_8536_:
{
lean_object* v___x_8540_; 
if (v_isShared_8538_ == 0)
{
v___x_8540_ = v___x_8537_;
goto v_reusejp_8539_;
}
else
{
lean_object* v_reuseFailAlloc_8541_; 
v_reuseFailAlloc_8541_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8541_, 0, v_a_8535_);
v___x_8540_ = v_reuseFailAlloc_8541_;
goto v_reusejp_8539_;
}
v_reusejp_8539_:
{
return v___x_8540_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0___boxed(lean_object* v_e_8543_, lean_object* v___y_8544_, lean_object* v___y_8545_, lean_object* v___y_8546_, lean_object* v___y_8547_, lean_object* v___y_8548_, lean_object* v___y_8549_, lean_object* v___y_8550_, lean_object* v___y_8551_, lean_object* v___y_8552_, lean_object* v___y_8553_, lean_object* v___y_8554_, lean_object* v___y_8555_){
_start:
{
lean_object* v_res_8556_; 
v_res_8556_ = l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0(v_e_8543_, v___y_8544_, v___y_8545_, v___y_8546_, v___y_8547_, v___y_8548_, v___y_8549_, v___y_8550_, v___y_8551_, v___y_8552_, v___y_8553_, v___y_8554_);
return v_res_8556_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__0(lean_object* v_e_8557_, lean_object* v___y_8558_, lean_object* v___y_8559_, lean_object* v___y_8560_, lean_object* v___y_8561_, lean_object* v___y_8562_, lean_object* v___y_8563_, lean_object* v___y_8564_, lean_object* v___y_8565_, lean_object* v___y_8566_, lean_object* v___y_8567_, lean_object* v___y_8568_){
_start:
{
lean_object* v___x_8570_; 
v___x_8570_ = l_Lean_Meta_Grind_alreadyInternalized___redArg(v_e_8557_, v___y_8559_);
if (lean_obj_tag(v___x_8570_) == 0)
{
lean_object* v_a_8571_; uint8_t v___x_8572_; 
v_a_8571_ = lean_ctor_get(v___x_8570_, 0);
lean_inc(v_a_8571_);
lean_dec_ref(v___x_8570_);
v___x_8572_ = lean_unbox(v_a_8571_);
lean_dec(v_a_8571_);
if (v___x_8572_ == 0)
{
lean_object* v___x_8573_; lean_object* v___x_8574_; lean_object* v___x_8575_; 
v___x_8573_ = lean_unsigned_to_nat(0u);
v___x_8574_ = lean_box(0);
lean_inc(v___y_8568_);
lean_inc_ref(v___y_8567_);
lean_inc(v___y_8566_);
lean_inc_ref(v___y_8565_);
lean_inc(v___y_8564_);
lean_inc_ref(v___y_8563_);
lean_inc(v___y_8562_);
lean_inc_ref(v___y_8561_);
lean_inc(v___y_8560_);
lean_inc(v___y_8559_);
lean_inc_ref(v_e_8557_);
v___x_8575_ = lean_grind_internalize(v_e_8557_, v___x_8573_, v___x_8574_, v___y_8559_, v___y_8560_, v___y_8561_, v___y_8562_, v___y_8563_, v___y_8564_, v___y_8565_, v___y_8566_, v___y_8567_, v___y_8568_);
if (lean_obj_tag(v___x_8575_) == 0)
{
lean_object* v___x_8576_; 
lean_dec_ref(v___x_8575_);
v___x_8576_ = l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0(v_e_8557_, v___y_8558_, v___y_8559_, v___y_8560_, v___y_8561_, v___y_8562_, v___y_8563_, v___y_8564_, v___y_8565_, v___y_8566_, v___y_8567_, v___y_8568_);
return v___x_8576_;
}
else
{
lean_object* v_a_8577_; lean_object* v___x_8579_; uint8_t v_isShared_8580_; uint8_t v_isSharedCheck_8584_; 
lean_dec(v___y_8568_);
lean_dec_ref(v___y_8567_);
lean_dec(v___y_8566_);
lean_dec_ref(v___y_8565_);
lean_dec(v___y_8564_);
lean_dec_ref(v___y_8563_);
lean_dec(v___y_8562_);
lean_dec_ref(v___y_8561_);
lean_dec(v___y_8560_);
lean_dec(v___y_8559_);
lean_dec(v___y_8558_);
lean_dec_ref(v_e_8557_);
v_a_8577_ = lean_ctor_get(v___x_8575_, 0);
v_isSharedCheck_8584_ = !lean_is_exclusive(v___x_8575_);
if (v_isSharedCheck_8584_ == 0)
{
v___x_8579_ = v___x_8575_;
v_isShared_8580_ = v_isSharedCheck_8584_;
goto v_resetjp_8578_;
}
else
{
lean_inc(v_a_8577_);
lean_dec(v___x_8575_);
v___x_8579_ = lean_box(0);
v_isShared_8580_ = v_isSharedCheck_8584_;
goto v_resetjp_8578_;
}
v_resetjp_8578_:
{
lean_object* v___x_8582_; 
if (v_isShared_8580_ == 0)
{
v___x_8582_ = v___x_8579_;
goto v_reusejp_8581_;
}
else
{
lean_object* v_reuseFailAlloc_8583_; 
v_reuseFailAlloc_8583_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8583_, 0, v_a_8577_);
v___x_8582_ = v_reuseFailAlloc_8583_;
goto v_reusejp_8581_;
}
v_reusejp_8581_:
{
return v___x_8582_;
}
}
}
}
else
{
lean_object* v___x_8585_; 
v___x_8585_ = l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__0(v_e_8557_, v___y_8558_, v___y_8559_, v___y_8560_, v___y_8561_, v___y_8562_, v___y_8563_, v___y_8564_, v___y_8565_, v___y_8566_, v___y_8567_, v___y_8568_);
return v___x_8585_;
}
}
else
{
lean_object* v_a_8586_; lean_object* v___x_8588_; uint8_t v_isShared_8589_; uint8_t v_isSharedCheck_8593_; 
lean_dec(v___y_8568_);
lean_dec_ref(v___y_8567_);
lean_dec(v___y_8566_);
lean_dec_ref(v___y_8565_);
lean_dec(v___y_8564_);
lean_dec_ref(v___y_8563_);
lean_dec(v___y_8562_);
lean_dec_ref(v___y_8561_);
lean_dec(v___y_8560_);
lean_dec(v___y_8559_);
lean_dec(v___y_8558_);
lean_dec_ref(v_e_8557_);
v_a_8586_ = lean_ctor_get(v___x_8570_, 0);
v_isSharedCheck_8593_ = !lean_is_exclusive(v___x_8570_);
if (v_isSharedCheck_8593_ == 0)
{
v___x_8588_ = v___x_8570_;
v_isShared_8589_ = v_isSharedCheck_8593_;
goto v_resetjp_8587_;
}
else
{
lean_inc(v_a_8586_);
lean_dec(v___x_8570_);
v___x_8588_ = lean_box(0);
v_isShared_8589_ = v_isSharedCheck_8593_;
goto v_resetjp_8587_;
}
v_resetjp_8587_:
{
lean_object* v___x_8591_; 
if (v_isShared_8589_ == 0)
{
v___x_8591_ = v___x_8588_;
goto v_reusejp_8590_;
}
else
{
lean_object* v_reuseFailAlloc_8592_; 
v_reuseFailAlloc_8592_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8592_, 0, v_a_8586_);
v___x_8591_ = v_reuseFailAlloc_8592_;
goto v_reusejp_8590_;
}
v_reusejp_8590_:
{
return v___x_8591_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__0___boxed(lean_object* v_e_8594_, lean_object* v___y_8595_, lean_object* v___y_8596_, lean_object* v___y_8597_, lean_object* v___y_8598_, lean_object* v___y_8599_, lean_object* v___y_8600_, lean_object* v___y_8601_, lean_object* v___y_8602_, lean_object* v___y_8603_, lean_object* v___y_8604_, lean_object* v___y_8605_, lean_object* v___y_8606_){
_start:
{
lean_object* v_res_8607_; 
v_res_8607_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___lam__0(v_e_8594_, v___y_8595_, v___y_8596_, v___y_8597_, v___y_8598_, v___y_8599_, v___y_8600_, v___y_8601_, v___y_8602_, v___y_8603_, v___y_8604_, v___y_8605_);
return v_res_8607_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0(lean_object* v_e_8613_, lean_object* v___y_8614_, lean_object* v___y_8615_, lean_object* v___y_8616_, lean_object* v___y_8617_, lean_object* v___y_8618_, lean_object* v___y_8619_, lean_object* v___y_8620_, lean_object* v___y_8621_, lean_object* v___y_8622_, lean_object* v___y_8623_, lean_object* v___y_8624_){
_start:
{
lean_object* v___x_8626_; 
lean_inc_ref(v_e_8613_);
v___x_8626_ = l_Lean_Meta_instantiateMVarsIfMVarApp___redArg(v_e_8613_, v___y_8622_);
if (lean_obj_tag(v___x_8626_) == 0)
{
lean_object* v_a_8627_; lean_object* v_mkVar_8628_; lean_object* v_toVar_8629_; lean_object* v_e_8631_; lean_object* v___y_8632_; lean_object* v___y_8633_; lean_object* v___y_8634_; lean_object* v___y_8635_; lean_object* v___y_8636_; lean_object* v___y_8637_; lean_object* v___y_8638_; lean_object* v___y_8639_; lean_object* v___y_8640_; lean_object* v___y_8641_; lean_object* v___y_8642_; lean_object* v_e_8662_; lean_object* v___y_8663_; lean_object* v___y_8664_; lean_object* v___y_8665_; lean_object* v___y_8666_; lean_object* v___y_8667_; lean_object* v___y_8668_; lean_object* v___y_8669_; lean_object* v___y_8670_; lean_object* v___y_8671_; lean_object* v___y_8672_; lean_object* v___y_8673_; lean_object* v___x_8683_; uint8_t v___x_8684_; 
v_a_8627_ = lean_ctor_get(v___x_8626_, 0);
lean_inc(v_a_8627_);
lean_dec_ref(v___x_8626_);
v_mkVar_8628_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__0));
v_toVar_8629_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__1));
v___x_8683_ = l_Lean_Expr_cleanupAnnotations(v_a_8627_);
v___x_8684_ = l_Lean_Expr_isApp(v___x_8683_);
if (v___x_8684_ == 0)
{
lean_dec_ref(v___x_8683_);
v_e_8631_ = v_e_8613_;
v___y_8632_ = v___y_8614_;
v___y_8633_ = v___y_8615_;
v___y_8634_ = v___y_8616_;
v___y_8635_ = v___y_8617_;
v___y_8636_ = v___y_8618_;
v___y_8637_ = v___y_8619_;
v___y_8638_ = v___y_8620_;
v___y_8639_ = v___y_8621_;
v___y_8640_ = v___y_8622_;
v___y_8641_ = v___y_8623_;
v___y_8642_ = v___y_8624_;
goto v___jp_8630_;
}
else
{
lean_object* v_arg_8685_; lean_object* v___x_8686_; uint8_t v___x_8687_; 
v_arg_8685_ = lean_ctor_get(v___x_8683_, 1);
lean_inc_ref(v_arg_8685_);
v___x_8686_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8683_);
v___x_8687_ = l_Lean_Expr_isApp(v___x_8686_);
if (v___x_8687_ == 0)
{
lean_dec_ref(v___x_8686_);
lean_dec_ref(v_arg_8685_);
v_e_8631_ = v_e_8613_;
v___y_8632_ = v___y_8614_;
v___y_8633_ = v___y_8615_;
v___y_8634_ = v___y_8616_;
v___y_8635_ = v___y_8617_;
v___y_8636_ = v___y_8618_;
v___y_8637_ = v___y_8619_;
v___y_8638_ = v___y_8620_;
v___y_8639_ = v___y_8621_;
v___y_8640_ = v___y_8622_;
v___y_8641_ = v___y_8623_;
v___y_8642_ = v___y_8624_;
goto v___jp_8630_;
}
else
{
lean_object* v_arg_8688_; lean_object* v___x_8689_; uint8_t v___x_8690_; 
v_arg_8688_ = lean_ctor_get(v___x_8686_, 1);
lean_inc_ref(v_arg_8688_);
v___x_8689_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8686_);
v___x_8690_ = l_Lean_Expr_isApp(v___x_8689_);
if (v___x_8690_ == 0)
{
lean_dec_ref(v___x_8689_);
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v_arg_8685_);
v_e_8631_ = v_e_8613_;
v___y_8632_ = v___y_8614_;
v___y_8633_ = v___y_8615_;
v___y_8634_ = v___y_8616_;
v___y_8635_ = v___y_8617_;
v___y_8636_ = v___y_8618_;
v___y_8637_ = v___y_8619_;
v___y_8638_ = v___y_8620_;
v___y_8639_ = v___y_8621_;
v___y_8640_ = v___y_8622_;
v___y_8641_ = v___y_8623_;
v___y_8642_ = v___y_8624_;
goto v___jp_8630_;
}
else
{
lean_object* v_arg_8691_; lean_object* v___x_8692_; lean_object* v___x_8693_; uint8_t v___x_8694_; 
v_arg_8691_ = lean_ctor_get(v___x_8689_, 1);
lean_inc_ref(v_arg_8691_);
v___x_8692_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8689_);
v___x_8693_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_8694_ = l_Lean_Expr_isConstOf(v___x_8692_, v___x_8693_);
if (v___x_8694_ == 0)
{
lean_object* v___x_8695_; uint8_t v___x_8696_; 
v___x_8695_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_8696_ = l_Lean_Expr_isConstOf(v___x_8692_, v___x_8695_);
if (v___x_8696_ == 0)
{
uint8_t v___x_8697_; 
v___x_8697_ = l_Lean_Expr_isApp(v___x_8692_);
if (v___x_8697_ == 0)
{
lean_dec_ref(v___x_8692_);
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v_arg_8685_);
v_e_8631_ = v_e_8613_;
v___y_8632_ = v___y_8614_;
v___y_8633_ = v___y_8615_;
v___y_8634_ = v___y_8616_;
v___y_8635_ = v___y_8617_;
v___y_8636_ = v___y_8618_;
v___y_8637_ = v___y_8619_;
v___y_8638_ = v___y_8620_;
v___y_8639_ = v___y_8621_;
v___y_8640_ = v___y_8622_;
v___y_8641_ = v___y_8623_;
v___y_8642_ = v___y_8624_;
goto v___jp_8630_;
}
else
{
lean_object* v___x_8698_; uint8_t v___x_8699_; 
v___x_8698_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8692_);
v___x_8699_ = l_Lean_Expr_isApp(v___x_8698_);
if (v___x_8699_ == 0)
{
lean_dec_ref(v___x_8698_);
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v_arg_8685_);
v_e_8631_ = v_e_8613_;
v___y_8632_ = v___y_8614_;
v___y_8633_ = v___y_8615_;
v___y_8634_ = v___y_8616_;
v___y_8635_ = v___y_8617_;
v___y_8636_ = v___y_8618_;
v___y_8637_ = v___y_8619_;
v___y_8638_ = v___y_8620_;
v___y_8639_ = v___y_8621_;
v___y_8640_ = v___y_8622_;
v___y_8641_ = v___y_8623_;
v___y_8642_ = v___y_8624_;
goto v___jp_8630_;
}
else
{
lean_object* v___x_8700_; uint8_t v___x_8701_; 
v___x_8700_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8698_);
v___x_8701_ = l_Lean_Expr_isApp(v___x_8700_);
if (v___x_8701_ == 0)
{
lean_dec_ref(v___x_8700_);
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v_arg_8685_);
v_e_8631_ = v_e_8613_;
v___y_8632_ = v___y_8614_;
v___y_8633_ = v___y_8615_;
v___y_8634_ = v___y_8616_;
v___y_8635_ = v___y_8617_;
v___y_8636_ = v___y_8618_;
v___y_8637_ = v___y_8619_;
v___y_8638_ = v___y_8620_;
v___y_8639_ = v___y_8621_;
v___y_8640_ = v___y_8622_;
v___y_8641_ = v___y_8623_;
v___y_8642_ = v___y_8624_;
goto v___jp_8630_;
}
else
{
lean_object* v_asVar_8702_; lean_object* v___x_8703_; lean_object* v___x_8704_; uint8_t v___x_8705_; 
v_asVar_8702_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___closed__2));
v___x_8703_ = l_Lean_Expr_appFnCleanup___redArg(v___x_8700_);
v___x_8704_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_8705_ = l_Lean_Expr_isConstOf(v___x_8703_, v___x_8704_);
if (v___x_8705_ == 0)
{
lean_object* v___x_8706_; uint8_t v___x_8707_; 
v___x_8706_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_8707_ = l_Lean_Expr_isConstOf(v___x_8703_, v___x_8706_);
if (v___x_8707_ == 0)
{
lean_object* v___x_8708_; uint8_t v___x_8709_; 
v___x_8708_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_8709_ = l_Lean_Expr_isConstOf(v___x_8703_, v___x_8708_);
lean_dec_ref(v___x_8703_);
if (v___x_8709_ == 0)
{
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v_arg_8685_);
v_e_8631_ = v_e_8613_;
v___y_8632_ = v___y_8614_;
v___y_8633_ = v___y_8615_;
v___y_8634_ = v___y_8616_;
v___y_8635_ = v___y_8617_;
v___y_8636_ = v___y_8618_;
v___y_8637_ = v___y_8619_;
v___y_8638_ = v___y_8620_;
v___y_8639_ = v___y_8621_;
v___y_8640_ = v___y_8622_;
v___y_8641_ = v___y_8623_;
v___y_8642_ = v___y_8624_;
goto v___jp_8630_;
}
else
{
lean_object* v___x_8710_; 
lean_inc(v___y_8624_);
lean_inc_ref(v___y_8623_);
lean_inc(v___y_8622_);
lean_inc_ref(v___y_8621_);
lean_inc(v___y_8620_);
lean_inc_ref(v___y_8619_);
lean_inc(v___y_8618_);
lean_inc_ref(v___y_8617_);
lean_inc(v___y_8616_);
lean_inc(v___y_8615_);
lean_inc(v___y_8614_);
v___x_8710_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1(v___y_8614_, v___y_8615_, v___y_8616_, v___y_8617_, v___y_8618_, v___y_8619_, v___y_8620_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
if (lean_obj_tag(v___x_8710_) == 0)
{
lean_object* v_a_8711_; lean_object* v___x_8712_; uint8_t v___x_8713_; 
v_a_8711_ = lean_ctor_get(v___x_8710_, 0);
lean_inc(v_a_8711_);
lean_dec_ref(v___x_8710_);
v___x_8712_ = l_Lean_Expr_appArg_x21(v_a_8711_);
lean_dec(v_a_8711_);
v___x_8713_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_8712_, v_arg_8691_);
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v___x_8712_);
if (v___x_8713_ == 0)
{
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v_arg_8685_);
v_e_8662_ = v_e_8613_;
v___y_8663_ = v___y_8614_;
v___y_8664_ = v___y_8615_;
v___y_8665_ = v___y_8616_;
v___y_8666_ = v___y_8617_;
v___y_8667_ = v___y_8618_;
v___y_8668_ = v___y_8619_;
v___y_8669_ = v___y_8620_;
v___y_8670_ = v___y_8621_;
v___y_8671_ = v___y_8622_;
v___y_8672_ = v___y_8623_;
v___y_8673_ = v___y_8624_;
goto v___jp_8661_;
}
else
{
lean_object* v___x_8714_; 
lean_dec_ref(v_e_8613_);
lean_inc(v___y_8624_);
lean_inc_ref(v___y_8623_);
lean_inc(v___y_8622_);
lean_inc_ref(v___y_8621_);
lean_inc(v___y_8620_);
lean_inc_ref(v___y_8619_);
lean_inc(v___y_8618_);
lean_inc_ref(v___y_8617_);
lean_inc(v___y_8616_);
lean_inc(v___y_8615_);
lean_inc(v___y_8614_);
v___x_8714_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8629_, v_asVar_8702_, v_arg_8688_, v___y_8614_, v___y_8615_, v___y_8616_, v___y_8617_, v___y_8618_, v___y_8619_, v___y_8620_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
if (lean_obj_tag(v___x_8714_) == 0)
{
lean_object* v_a_8715_; lean_object* v___x_8716_; 
v_a_8715_ = lean_ctor_get(v___x_8714_, 0);
lean_inc(v_a_8715_);
lean_dec_ref(v___x_8714_);
v___x_8716_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8629_, v_asVar_8702_, v_arg_8685_, v___y_8614_, v___y_8615_, v___y_8616_, v___y_8617_, v___y_8618_, v___y_8619_, v___y_8620_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
if (lean_obj_tag(v___x_8716_) == 0)
{
lean_object* v_a_8717_; lean_object* v___x_8719_; uint8_t v_isShared_8720_; uint8_t v_isSharedCheck_8726_; 
v_a_8717_ = lean_ctor_get(v___x_8716_, 0);
v_isSharedCheck_8726_ = !lean_is_exclusive(v___x_8716_);
if (v_isSharedCheck_8726_ == 0)
{
v___x_8719_ = v___x_8716_;
v_isShared_8720_ = v_isSharedCheck_8726_;
goto v_resetjp_8718_;
}
else
{
lean_inc(v_a_8717_);
lean_dec(v___x_8716_);
v___x_8719_ = lean_box(0);
v_isShared_8720_ = v_isSharedCheck_8726_;
goto v_resetjp_8718_;
}
v_resetjp_8718_:
{
lean_object* v___x_8721_; lean_object* v___x_8722_; lean_object* v___x_8724_; 
v___x_8721_ = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(v___x_8721_, 0, v_a_8715_);
lean_ctor_set(v___x_8721_, 1, v_a_8717_);
v___x_8722_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_8722_, 0, v___x_8721_);
if (v_isShared_8720_ == 0)
{
lean_ctor_set(v___x_8719_, 0, v___x_8722_);
v___x_8724_ = v___x_8719_;
goto v_reusejp_8723_;
}
else
{
lean_object* v_reuseFailAlloc_8725_; 
v_reuseFailAlloc_8725_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8725_, 0, v___x_8722_);
v___x_8724_ = v_reuseFailAlloc_8725_;
goto v_reusejp_8723_;
}
v_reusejp_8723_:
{
return v___x_8724_;
}
}
}
else
{
lean_object* v_a_8727_; lean_object* v___x_8729_; uint8_t v_isShared_8730_; uint8_t v_isSharedCheck_8734_; 
lean_dec(v_a_8715_);
v_a_8727_ = lean_ctor_get(v___x_8716_, 0);
v_isSharedCheck_8734_ = !lean_is_exclusive(v___x_8716_);
if (v_isSharedCheck_8734_ == 0)
{
v___x_8729_ = v___x_8716_;
v_isShared_8730_ = v_isSharedCheck_8734_;
goto v_resetjp_8728_;
}
else
{
lean_inc(v_a_8727_);
lean_dec(v___x_8716_);
v___x_8729_ = lean_box(0);
v_isShared_8730_ = v_isSharedCheck_8734_;
goto v_resetjp_8728_;
}
v_resetjp_8728_:
{
lean_object* v___x_8732_; 
if (v_isShared_8730_ == 0)
{
v___x_8732_ = v___x_8729_;
goto v_reusejp_8731_;
}
else
{
lean_object* v_reuseFailAlloc_8733_; 
v_reuseFailAlloc_8733_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8733_, 0, v_a_8727_);
v___x_8732_ = v_reuseFailAlloc_8733_;
goto v_reusejp_8731_;
}
v_reusejp_8731_:
{
return v___x_8732_;
}
}
}
}
else
{
lean_object* v_a_8735_; lean_object* v___x_8737_; uint8_t v_isShared_8738_; uint8_t v_isSharedCheck_8742_; 
lean_dec_ref(v_arg_8685_);
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
v_a_8735_ = lean_ctor_get(v___x_8714_, 0);
v_isSharedCheck_8742_ = !lean_is_exclusive(v___x_8714_);
if (v_isSharedCheck_8742_ == 0)
{
v___x_8737_ = v___x_8714_;
v_isShared_8738_ = v_isSharedCheck_8742_;
goto v_resetjp_8736_;
}
else
{
lean_inc(v_a_8735_);
lean_dec(v___x_8714_);
v___x_8737_ = lean_box(0);
v_isShared_8738_ = v_isSharedCheck_8742_;
goto v_resetjp_8736_;
}
v_resetjp_8736_:
{
lean_object* v___x_8740_; 
if (v_isShared_8738_ == 0)
{
v___x_8740_ = v___x_8737_;
goto v_reusejp_8739_;
}
else
{
lean_object* v_reuseFailAlloc_8741_; 
v_reuseFailAlloc_8741_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8741_, 0, v_a_8735_);
v___x_8740_ = v_reuseFailAlloc_8741_;
goto v_reusejp_8739_;
}
v_reusejp_8739_:
{
return v___x_8740_;
}
}
}
}
}
else
{
lean_object* v_a_8743_; lean_object* v___x_8745_; uint8_t v_isShared_8746_; uint8_t v_isSharedCheck_8750_; 
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v_arg_8685_);
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v_a_8743_ = lean_ctor_get(v___x_8710_, 0);
v_isSharedCheck_8750_ = !lean_is_exclusive(v___x_8710_);
if (v_isSharedCheck_8750_ == 0)
{
v___x_8745_ = v___x_8710_;
v_isShared_8746_ = v_isSharedCheck_8750_;
goto v_resetjp_8744_;
}
else
{
lean_inc(v_a_8743_);
lean_dec(v___x_8710_);
v___x_8745_ = lean_box(0);
v_isShared_8746_ = v_isSharedCheck_8750_;
goto v_resetjp_8744_;
}
v_resetjp_8744_:
{
lean_object* v___x_8748_; 
if (v_isShared_8746_ == 0)
{
v___x_8748_ = v___x_8745_;
goto v_reusejp_8747_;
}
else
{
lean_object* v_reuseFailAlloc_8749_; 
v_reuseFailAlloc_8749_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8749_, 0, v_a_8743_);
v___x_8748_ = v_reuseFailAlloc_8749_;
goto v_reusejp_8747_;
}
v_reusejp_8747_:
{
return v___x_8748_;
}
}
}
}
}
else
{
lean_object* v___x_8751_; 
lean_dec_ref(v___x_8703_);
lean_inc(v___y_8624_);
lean_inc_ref(v___y_8623_);
lean_inc(v___y_8622_);
lean_inc_ref(v___y_8621_);
lean_inc(v___y_8620_);
lean_inc_ref(v___y_8619_);
lean_inc(v___y_8618_);
lean_inc_ref(v___y_8617_);
lean_inc(v___y_8616_);
lean_inc(v___y_8615_);
lean_inc(v___y_8614_);
v___x_8751_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__3(v___y_8614_, v___y_8615_, v___y_8616_, v___y_8617_, v___y_8618_, v___y_8619_, v___y_8620_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
if (lean_obj_tag(v___x_8751_) == 0)
{
lean_object* v_a_8752_; lean_object* v___x_8753_; uint8_t v___x_8754_; 
v_a_8752_ = lean_ctor_get(v___x_8751_, 0);
lean_inc(v_a_8752_);
lean_dec_ref(v___x_8751_);
v___x_8753_ = l_Lean_Expr_appArg_x21(v_a_8752_);
lean_dec(v_a_8752_);
v___x_8754_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_8753_, v_arg_8691_);
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v___x_8753_);
if (v___x_8754_ == 0)
{
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v_arg_8685_);
v_e_8662_ = v_e_8613_;
v___y_8663_ = v___y_8614_;
v___y_8664_ = v___y_8615_;
v___y_8665_ = v___y_8616_;
v___y_8666_ = v___y_8617_;
v___y_8667_ = v___y_8618_;
v___y_8668_ = v___y_8619_;
v___y_8669_ = v___y_8620_;
v___y_8670_ = v___y_8621_;
v___y_8671_ = v___y_8622_;
v___y_8672_ = v___y_8623_;
v___y_8673_ = v___y_8624_;
goto v___jp_8661_;
}
else
{
lean_object* v___x_8755_; 
lean_dec_ref(v_e_8613_);
lean_inc(v___y_8624_);
lean_inc_ref(v___y_8623_);
lean_inc(v___y_8622_);
lean_inc_ref(v___y_8621_);
lean_inc(v___y_8620_);
lean_inc_ref(v___y_8619_);
lean_inc(v___y_8618_);
lean_inc_ref(v___y_8617_);
lean_inc(v___y_8616_);
lean_inc(v___y_8615_);
lean_inc(v___y_8614_);
v___x_8755_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8629_, v_asVar_8702_, v_arg_8688_, v___y_8614_, v___y_8615_, v___y_8616_, v___y_8617_, v___y_8618_, v___y_8619_, v___y_8620_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
if (lean_obj_tag(v___x_8755_) == 0)
{
lean_object* v_a_8756_; lean_object* v___x_8757_; 
v_a_8756_ = lean_ctor_get(v___x_8755_, 0);
lean_inc(v_a_8756_);
lean_dec_ref(v___x_8755_);
v___x_8757_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8629_, v_asVar_8702_, v_arg_8685_, v___y_8614_, v___y_8615_, v___y_8616_, v___y_8617_, v___y_8618_, v___y_8619_, v___y_8620_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
if (lean_obj_tag(v___x_8757_) == 0)
{
lean_object* v_a_8758_; lean_object* v___x_8760_; uint8_t v_isShared_8761_; uint8_t v_isSharedCheck_8767_; 
v_a_8758_ = lean_ctor_get(v___x_8757_, 0);
v_isSharedCheck_8767_ = !lean_is_exclusive(v___x_8757_);
if (v_isSharedCheck_8767_ == 0)
{
v___x_8760_ = v___x_8757_;
v_isShared_8761_ = v_isSharedCheck_8767_;
goto v_resetjp_8759_;
}
else
{
lean_inc(v_a_8758_);
lean_dec(v___x_8757_);
v___x_8760_ = lean_box(0);
v_isShared_8761_ = v_isSharedCheck_8767_;
goto v_resetjp_8759_;
}
v_resetjp_8759_:
{
lean_object* v___x_8762_; lean_object* v___x_8763_; lean_object* v___x_8765_; 
v___x_8762_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8762_, 0, v_a_8756_);
lean_ctor_set(v___x_8762_, 1, v_a_8758_);
v___x_8763_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_8763_, 0, v___x_8762_);
if (v_isShared_8761_ == 0)
{
lean_ctor_set(v___x_8760_, 0, v___x_8763_);
v___x_8765_ = v___x_8760_;
goto v_reusejp_8764_;
}
else
{
lean_object* v_reuseFailAlloc_8766_; 
v_reuseFailAlloc_8766_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8766_, 0, v___x_8763_);
v___x_8765_ = v_reuseFailAlloc_8766_;
goto v_reusejp_8764_;
}
v_reusejp_8764_:
{
return v___x_8765_;
}
}
}
else
{
lean_object* v_a_8768_; lean_object* v___x_8770_; uint8_t v_isShared_8771_; uint8_t v_isSharedCheck_8775_; 
lean_dec(v_a_8756_);
v_a_8768_ = lean_ctor_get(v___x_8757_, 0);
v_isSharedCheck_8775_ = !lean_is_exclusive(v___x_8757_);
if (v_isSharedCheck_8775_ == 0)
{
v___x_8770_ = v___x_8757_;
v_isShared_8771_ = v_isSharedCheck_8775_;
goto v_resetjp_8769_;
}
else
{
lean_inc(v_a_8768_);
lean_dec(v___x_8757_);
v___x_8770_ = lean_box(0);
v_isShared_8771_ = v_isSharedCheck_8775_;
goto v_resetjp_8769_;
}
v_resetjp_8769_:
{
lean_object* v___x_8773_; 
if (v_isShared_8771_ == 0)
{
v___x_8773_ = v___x_8770_;
goto v_reusejp_8772_;
}
else
{
lean_object* v_reuseFailAlloc_8774_; 
v_reuseFailAlloc_8774_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8774_, 0, v_a_8768_);
v___x_8773_ = v_reuseFailAlloc_8774_;
goto v_reusejp_8772_;
}
v_reusejp_8772_:
{
return v___x_8773_;
}
}
}
}
else
{
lean_object* v_a_8776_; lean_object* v___x_8778_; uint8_t v_isShared_8779_; uint8_t v_isSharedCheck_8783_; 
lean_dec_ref(v_arg_8685_);
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
v_a_8776_ = lean_ctor_get(v___x_8755_, 0);
v_isSharedCheck_8783_ = !lean_is_exclusive(v___x_8755_);
if (v_isSharedCheck_8783_ == 0)
{
v___x_8778_ = v___x_8755_;
v_isShared_8779_ = v_isSharedCheck_8783_;
goto v_resetjp_8777_;
}
else
{
lean_inc(v_a_8776_);
lean_dec(v___x_8755_);
v___x_8778_ = lean_box(0);
v_isShared_8779_ = v_isSharedCheck_8783_;
goto v_resetjp_8777_;
}
v_resetjp_8777_:
{
lean_object* v___x_8781_; 
if (v_isShared_8779_ == 0)
{
v___x_8781_ = v___x_8778_;
goto v_reusejp_8780_;
}
else
{
lean_object* v_reuseFailAlloc_8782_; 
v_reuseFailAlloc_8782_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8782_, 0, v_a_8776_);
v___x_8781_ = v_reuseFailAlloc_8782_;
goto v_reusejp_8780_;
}
v_reusejp_8780_:
{
return v___x_8781_;
}
}
}
}
}
else
{
lean_object* v_a_8784_; lean_object* v___x_8786_; uint8_t v_isShared_8787_; uint8_t v_isSharedCheck_8791_; 
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v_arg_8685_);
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v_a_8784_ = lean_ctor_get(v___x_8751_, 0);
v_isSharedCheck_8791_ = !lean_is_exclusive(v___x_8751_);
if (v_isSharedCheck_8791_ == 0)
{
v___x_8786_ = v___x_8751_;
v_isShared_8787_ = v_isSharedCheck_8791_;
goto v_resetjp_8785_;
}
else
{
lean_inc(v_a_8784_);
lean_dec(v___x_8751_);
v___x_8786_ = lean_box(0);
v_isShared_8787_ = v_isSharedCheck_8791_;
goto v_resetjp_8785_;
}
v_resetjp_8785_:
{
lean_object* v___x_8789_; 
if (v_isShared_8787_ == 0)
{
v___x_8789_ = v___x_8786_;
goto v_reusejp_8788_;
}
else
{
lean_object* v_reuseFailAlloc_8790_; 
v_reuseFailAlloc_8790_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8790_, 0, v_a_8784_);
v___x_8789_ = v_reuseFailAlloc_8790_;
goto v_reusejp_8788_;
}
v_reusejp_8788_:
{
return v___x_8789_;
}
}
}
}
}
else
{
lean_object* v___x_8792_; 
lean_dec_ref(v___x_8703_);
lean_inc(v___y_8624_);
lean_inc_ref(v___y_8623_);
lean_inc(v___y_8622_);
lean_inc_ref(v___y_8621_);
v___x_8792_ = l_Lean_Meta_getNatValue_x3f(v_arg_8685_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
lean_dec_ref(v_arg_8685_);
if (lean_obj_tag(v___x_8792_) == 0)
{
lean_object* v_a_8793_; lean_object* v___x_8795_; uint8_t v_isShared_8796_; uint8_t v_isSharedCheck_8839_; 
v_a_8793_ = lean_ctor_get(v___x_8792_, 0);
v_isSharedCheck_8839_ = !lean_is_exclusive(v___x_8792_);
if (v_isSharedCheck_8839_ == 0)
{
v___x_8795_ = v___x_8792_;
v_isShared_8796_ = v_isSharedCheck_8839_;
goto v_resetjp_8794_;
}
else
{
lean_inc(v_a_8793_);
lean_dec(v___x_8792_);
v___x_8795_ = lean_box(0);
v_isShared_8796_ = v_isSharedCheck_8839_;
goto v_resetjp_8794_;
}
v_resetjp_8794_:
{
if (lean_obj_tag(v_a_8793_) == 1)
{
lean_object* v_val_8797_; lean_object* v___x_8799_; uint8_t v_isShared_8800_; uint8_t v_isSharedCheck_8834_; 
lean_del_object(v___x_8795_);
v_val_8797_ = lean_ctor_get(v_a_8793_, 0);
v_isSharedCheck_8834_ = !lean_is_exclusive(v_a_8793_);
if (v_isSharedCheck_8834_ == 0)
{
v___x_8799_ = v_a_8793_;
v_isShared_8800_ = v_isSharedCheck_8834_;
goto v_resetjp_8798_;
}
else
{
lean_inc(v_val_8797_);
lean_dec(v_a_8793_);
v___x_8799_ = lean_box(0);
v_isShared_8800_ = v_isSharedCheck_8834_;
goto v_resetjp_8798_;
}
v_resetjp_8798_:
{
lean_object* v___x_8801_; 
lean_inc(v___y_8624_);
lean_inc_ref(v___y_8623_);
lean_inc(v___y_8622_);
lean_inc_ref(v___y_8621_);
lean_inc(v___y_8620_);
lean_inc_ref(v___y_8619_);
lean_inc(v___y_8618_);
lean_inc_ref(v___y_8617_);
lean_inc(v___y_8616_);
lean_inc(v___y_8615_);
lean_inc(v___y_8614_);
v___x_8801_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__4(v___y_8614_, v___y_8615_, v___y_8616_, v___y_8617_, v___y_8618_, v___y_8619_, v___y_8620_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
if (lean_obj_tag(v___x_8801_) == 0)
{
lean_object* v_a_8802_; lean_object* v___x_8803_; uint8_t v___x_8804_; 
v_a_8802_ = lean_ctor_get(v___x_8801_, 0);
lean_inc(v_a_8802_);
lean_dec_ref(v___x_8801_);
v___x_8803_ = l_Lean_Expr_appArg_x21(v_a_8802_);
lean_dec(v_a_8802_);
v___x_8804_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_8803_, v_arg_8691_);
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v___x_8803_);
if (v___x_8804_ == 0)
{
lean_del_object(v___x_8799_);
lean_dec(v_val_8797_);
lean_dec_ref(v_arg_8688_);
v_e_8662_ = v_e_8613_;
v___y_8663_ = v___y_8614_;
v___y_8664_ = v___y_8615_;
v___y_8665_ = v___y_8616_;
v___y_8666_ = v___y_8617_;
v___y_8667_ = v___y_8618_;
v___y_8668_ = v___y_8619_;
v___y_8669_ = v___y_8620_;
v___y_8670_ = v___y_8621_;
v___y_8671_ = v___y_8622_;
v___y_8672_ = v___y_8623_;
v___y_8673_ = v___y_8624_;
goto v___jp_8661_;
}
else
{
lean_object* v___x_8805_; 
lean_dec_ref(v_e_8613_);
v___x_8805_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__2(v_toVar_8629_, v_asVar_8702_, v_arg_8688_, v___y_8614_, v___y_8615_, v___y_8616_, v___y_8617_, v___y_8618_, v___y_8619_, v___y_8620_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
if (lean_obj_tag(v___x_8805_) == 0)
{
lean_object* v_a_8806_; lean_object* v___x_8808_; uint8_t v_isShared_8809_; uint8_t v_isSharedCheck_8817_; 
v_a_8806_ = lean_ctor_get(v___x_8805_, 0);
v_isSharedCheck_8817_ = !lean_is_exclusive(v___x_8805_);
if (v_isSharedCheck_8817_ == 0)
{
v___x_8808_ = v___x_8805_;
v_isShared_8809_ = v_isSharedCheck_8817_;
goto v_resetjp_8807_;
}
else
{
lean_inc(v_a_8806_);
lean_dec(v___x_8805_);
v___x_8808_ = lean_box(0);
v_isShared_8809_ = v_isSharedCheck_8817_;
goto v_resetjp_8807_;
}
v_resetjp_8807_:
{
lean_object* v___x_8810_; lean_object* v___x_8812_; 
v___x_8810_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_8810_, 0, v_a_8806_);
lean_ctor_set(v___x_8810_, 1, v_val_8797_);
if (v_isShared_8800_ == 0)
{
lean_ctor_set(v___x_8799_, 0, v___x_8810_);
v___x_8812_ = v___x_8799_;
goto v_reusejp_8811_;
}
else
{
lean_object* v_reuseFailAlloc_8816_; 
v_reuseFailAlloc_8816_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8816_, 0, v___x_8810_);
v___x_8812_ = v_reuseFailAlloc_8816_;
goto v_reusejp_8811_;
}
v_reusejp_8811_:
{
lean_object* v___x_8814_; 
if (v_isShared_8809_ == 0)
{
lean_ctor_set(v___x_8808_, 0, v___x_8812_);
v___x_8814_ = v___x_8808_;
goto v_reusejp_8813_;
}
else
{
lean_object* v_reuseFailAlloc_8815_; 
v_reuseFailAlloc_8815_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8815_, 0, v___x_8812_);
v___x_8814_ = v_reuseFailAlloc_8815_;
goto v_reusejp_8813_;
}
v_reusejp_8813_:
{
return v___x_8814_;
}
}
}
}
else
{
lean_object* v_a_8818_; lean_object* v___x_8820_; uint8_t v_isShared_8821_; uint8_t v_isSharedCheck_8825_; 
lean_del_object(v___x_8799_);
lean_dec(v_val_8797_);
v_a_8818_ = lean_ctor_get(v___x_8805_, 0);
v_isSharedCheck_8825_ = !lean_is_exclusive(v___x_8805_);
if (v_isSharedCheck_8825_ == 0)
{
v___x_8820_ = v___x_8805_;
v_isShared_8821_ = v_isSharedCheck_8825_;
goto v_resetjp_8819_;
}
else
{
lean_inc(v_a_8818_);
lean_dec(v___x_8805_);
v___x_8820_ = lean_box(0);
v_isShared_8821_ = v_isSharedCheck_8825_;
goto v_resetjp_8819_;
}
v_resetjp_8819_:
{
lean_object* v___x_8823_; 
if (v_isShared_8821_ == 0)
{
v___x_8823_ = v___x_8820_;
goto v_reusejp_8822_;
}
else
{
lean_object* v_reuseFailAlloc_8824_; 
v_reuseFailAlloc_8824_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8824_, 0, v_a_8818_);
v___x_8823_ = v_reuseFailAlloc_8824_;
goto v_reusejp_8822_;
}
v_reusejp_8822_:
{
return v___x_8823_;
}
}
}
}
}
else
{
lean_object* v_a_8826_; lean_object* v___x_8828_; uint8_t v_isShared_8829_; uint8_t v_isSharedCheck_8833_; 
lean_del_object(v___x_8799_);
lean_dec(v_val_8797_);
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v_arg_8688_);
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v_a_8826_ = lean_ctor_get(v___x_8801_, 0);
v_isSharedCheck_8833_ = !lean_is_exclusive(v___x_8801_);
if (v_isSharedCheck_8833_ == 0)
{
v___x_8828_ = v___x_8801_;
v_isShared_8829_ = v_isSharedCheck_8833_;
goto v_resetjp_8827_;
}
else
{
lean_inc(v_a_8826_);
lean_dec(v___x_8801_);
v___x_8828_ = lean_box(0);
v_isShared_8829_ = v_isSharedCheck_8833_;
goto v_resetjp_8827_;
}
v_resetjp_8827_:
{
lean_object* v___x_8831_; 
if (v_isShared_8829_ == 0)
{
v___x_8831_ = v___x_8828_;
goto v_reusejp_8830_;
}
else
{
lean_object* v_reuseFailAlloc_8832_; 
v_reuseFailAlloc_8832_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8832_, 0, v_a_8826_);
v___x_8831_ = v_reuseFailAlloc_8832_;
goto v_reusejp_8830_;
}
v_reusejp_8830_:
{
return v___x_8831_;
}
}
}
}
}
else
{
lean_object* v___x_8835_; lean_object* v___x_8837_; 
lean_dec(v_a_8793_);
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v_arg_8688_);
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v___x_8835_ = lean_box(0);
if (v_isShared_8796_ == 0)
{
lean_ctor_set(v___x_8795_, 0, v___x_8835_);
v___x_8837_ = v___x_8795_;
goto v_reusejp_8836_;
}
else
{
lean_object* v_reuseFailAlloc_8838_; 
v_reuseFailAlloc_8838_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8838_, 0, v___x_8835_);
v___x_8837_ = v_reuseFailAlloc_8838_;
goto v_reusejp_8836_;
}
v_reusejp_8836_:
{
return v___x_8837_;
}
}
}
}
else
{
lean_object* v_a_8840_; lean_object* v___x_8842_; uint8_t v_isShared_8843_; uint8_t v_isSharedCheck_8847_; 
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v_arg_8688_);
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v_a_8840_ = lean_ctor_get(v___x_8792_, 0);
v_isSharedCheck_8847_ = !lean_is_exclusive(v___x_8792_);
if (v_isSharedCheck_8847_ == 0)
{
v___x_8842_ = v___x_8792_;
v_isShared_8843_ = v_isSharedCheck_8847_;
goto v_resetjp_8841_;
}
else
{
lean_inc(v_a_8840_);
lean_dec(v___x_8792_);
v___x_8842_ = lean_box(0);
v_isShared_8843_ = v_isSharedCheck_8847_;
goto v_resetjp_8841_;
}
v_resetjp_8841_:
{
lean_object* v___x_8845_; 
if (v_isShared_8843_ == 0)
{
v___x_8845_ = v___x_8842_;
goto v_reusejp_8844_;
}
else
{
lean_object* v_reuseFailAlloc_8846_; 
v_reuseFailAlloc_8846_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8846_, 0, v_a_8840_);
v___x_8845_ = v_reuseFailAlloc_8846_;
goto v_reusejp_8844_;
}
v_reusejp_8844_:
{
return v___x_8845_;
}
}
}
}
}
}
}
}
else
{
lean_object* v___x_8848_; 
lean_dec_ref(v___x_8692_);
lean_dec_ref(v_arg_8691_);
lean_inc(v___y_8624_);
lean_inc_ref(v___y_8623_);
lean_inc(v___y_8622_);
lean_inc_ref(v___y_8621_);
lean_inc(v___y_8620_);
lean_inc_ref(v___y_8619_);
lean_inc(v___y_8618_);
lean_inc_ref(v___y_8617_);
lean_inc(v___y_8616_);
lean_inc(v___y_8615_);
lean_inc(v___y_8614_);
v___x_8848_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5(v___y_8614_, v___y_8615_, v___y_8616_, v___y_8617_, v___y_8618_, v___y_8619_, v___y_8620_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
if (lean_obj_tag(v___x_8848_) == 0)
{
lean_object* v_a_8849_; lean_object* v___x_8850_; uint8_t v___x_8851_; 
v_a_8849_ = lean_ctor_get(v___x_8848_, 0);
lean_inc(v_a_8849_);
lean_dec_ref(v___x_8848_);
v___x_8850_ = l_Lean_Expr_appArg_x21(v_a_8849_);
lean_dec(v_a_8849_);
v___x_8851_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_8850_, v_arg_8688_);
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v___x_8850_);
if (v___x_8851_ == 0)
{
lean_dec_ref(v_arg_8685_);
v_e_8662_ = v_e_8613_;
v___y_8663_ = v___y_8614_;
v___y_8664_ = v___y_8615_;
v___y_8665_ = v___y_8616_;
v___y_8666_ = v___y_8617_;
v___y_8667_ = v___y_8618_;
v___y_8668_ = v___y_8619_;
v___y_8669_ = v___y_8620_;
v___y_8670_ = v___y_8621_;
v___y_8671_ = v___y_8622_;
v___y_8672_ = v___y_8623_;
v___y_8673_ = v___y_8624_;
goto v___jp_8661_;
}
else
{
lean_object* v___x_8852_; 
lean_inc(v___y_8624_);
lean_inc_ref(v___y_8623_);
lean_inc(v___y_8622_);
lean_inc_ref(v___y_8621_);
v___x_8852_ = l_Lean_Meta_getNatValue_x3f(v_arg_8685_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
lean_dec_ref(v_arg_8685_);
if (lean_obj_tag(v___x_8852_) == 0)
{
lean_object* v_a_8853_; lean_object* v___x_8855_; uint8_t v_isShared_8856_; uint8_t v_isSharedCheck_8870_; 
v_a_8853_ = lean_ctor_get(v___x_8852_, 0);
v_isSharedCheck_8870_ = !lean_is_exclusive(v___x_8852_);
if (v_isSharedCheck_8870_ == 0)
{
v___x_8855_ = v___x_8852_;
v_isShared_8856_ = v_isSharedCheck_8870_;
goto v_resetjp_8854_;
}
else
{
lean_inc(v_a_8853_);
lean_dec(v___x_8852_);
v___x_8855_ = lean_box(0);
v_isShared_8856_ = v_isSharedCheck_8870_;
goto v_resetjp_8854_;
}
v_resetjp_8854_:
{
if (lean_obj_tag(v_a_8853_) == 1)
{
lean_object* v_val_8857_; lean_object* v___x_8859_; uint8_t v_isShared_8860_; uint8_t v_isSharedCheck_8869_; 
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v_val_8857_ = lean_ctor_get(v_a_8853_, 0);
v_isSharedCheck_8869_ = !lean_is_exclusive(v_a_8853_);
if (v_isSharedCheck_8869_ == 0)
{
v___x_8859_ = v_a_8853_;
v_isShared_8860_ = v_isSharedCheck_8869_;
goto v_resetjp_8858_;
}
else
{
lean_inc(v_val_8857_);
lean_dec(v_a_8853_);
v___x_8859_ = lean_box(0);
v_isShared_8860_ = v_isSharedCheck_8869_;
goto v_resetjp_8858_;
}
v_resetjp_8858_:
{
lean_object* v___x_8861_; lean_object* v___x_8862_; lean_object* v___x_8864_; 
v___x_8861_ = lean_nat_to_int(v_val_8857_);
v___x_8862_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_8862_, 0, v___x_8861_);
if (v_isShared_8860_ == 0)
{
lean_ctor_set(v___x_8859_, 0, v___x_8862_);
v___x_8864_ = v___x_8859_;
goto v_reusejp_8863_;
}
else
{
lean_object* v_reuseFailAlloc_8868_; 
v_reuseFailAlloc_8868_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8868_, 0, v___x_8862_);
v___x_8864_ = v_reuseFailAlloc_8868_;
goto v_reusejp_8863_;
}
v_reusejp_8863_:
{
lean_object* v___x_8866_; 
if (v_isShared_8856_ == 0)
{
lean_ctor_set(v___x_8855_, 0, v___x_8864_);
v___x_8866_ = v___x_8855_;
goto v_reusejp_8865_;
}
else
{
lean_object* v_reuseFailAlloc_8867_; 
v_reuseFailAlloc_8867_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8867_, 0, v___x_8864_);
v___x_8866_ = v_reuseFailAlloc_8867_;
goto v_reusejp_8865_;
}
v_reusejp_8865_:
{
return v___x_8866_;
}
}
}
}
else
{
lean_del_object(v___x_8855_);
lean_dec(v_a_8853_);
v_e_8631_ = v_e_8613_;
v___y_8632_ = v___y_8614_;
v___y_8633_ = v___y_8615_;
v___y_8634_ = v___y_8616_;
v___y_8635_ = v___y_8617_;
v___y_8636_ = v___y_8618_;
v___y_8637_ = v___y_8619_;
v___y_8638_ = v___y_8620_;
v___y_8639_ = v___y_8621_;
v___y_8640_ = v___y_8622_;
v___y_8641_ = v___y_8623_;
v___y_8642_ = v___y_8624_;
goto v___jp_8630_;
}
}
}
else
{
lean_object* v_a_8871_; lean_object* v___x_8873_; uint8_t v_isShared_8874_; uint8_t v_isSharedCheck_8878_; 
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v_a_8871_ = lean_ctor_get(v___x_8852_, 0);
v_isSharedCheck_8878_ = !lean_is_exclusive(v___x_8852_);
if (v_isSharedCheck_8878_ == 0)
{
v___x_8873_ = v___x_8852_;
v_isShared_8874_ = v_isSharedCheck_8878_;
goto v_resetjp_8872_;
}
else
{
lean_inc(v_a_8871_);
lean_dec(v___x_8852_);
v___x_8873_ = lean_box(0);
v_isShared_8874_ = v_isSharedCheck_8878_;
goto v_resetjp_8872_;
}
v_resetjp_8872_:
{
lean_object* v___x_8876_; 
if (v_isShared_8874_ == 0)
{
v___x_8876_ = v___x_8873_;
goto v_reusejp_8875_;
}
else
{
lean_object* v_reuseFailAlloc_8877_; 
v_reuseFailAlloc_8877_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8877_, 0, v_a_8871_);
v___x_8876_ = v_reuseFailAlloc_8877_;
goto v_reusejp_8875_;
}
v_reusejp_8875_:
{
return v___x_8876_;
}
}
}
}
}
else
{
lean_object* v_a_8879_; lean_object* v___x_8881_; uint8_t v_isShared_8882_; uint8_t v_isSharedCheck_8886_; 
lean_dec_ref(v_arg_8688_);
lean_dec_ref(v_arg_8685_);
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v_a_8879_ = lean_ctor_get(v___x_8848_, 0);
v_isSharedCheck_8886_ = !lean_is_exclusive(v___x_8848_);
if (v_isSharedCheck_8886_ == 0)
{
v___x_8881_ = v___x_8848_;
v_isShared_8882_ = v_isSharedCheck_8886_;
goto v_resetjp_8880_;
}
else
{
lean_inc(v_a_8879_);
lean_dec(v___x_8848_);
v___x_8881_ = lean_box(0);
v_isShared_8882_ = v_isSharedCheck_8886_;
goto v_resetjp_8880_;
}
v_resetjp_8880_:
{
lean_object* v___x_8884_; 
if (v_isShared_8882_ == 0)
{
v___x_8884_ = v___x_8881_;
goto v_reusejp_8883_;
}
else
{
lean_object* v_reuseFailAlloc_8885_; 
v_reuseFailAlloc_8885_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8885_, 0, v_a_8879_);
v___x_8884_ = v_reuseFailAlloc_8885_;
goto v_reusejp_8883_;
}
v_reusejp_8883_:
{
return v___x_8884_;
}
}
}
}
}
else
{
lean_object* v___x_8887_; 
lean_dec_ref(v___x_8692_);
lean_dec_ref(v_arg_8691_);
lean_dec_ref(v_arg_8685_);
lean_inc(v___y_8624_);
lean_inc_ref(v___y_8623_);
lean_inc(v___y_8622_);
lean_inc_ref(v___y_8621_);
v___x_8887_ = l_Lean_Meta_getNatValue_x3f(v_arg_8688_, v___y_8621_, v___y_8622_, v___y_8623_, v___y_8624_);
lean_dec_ref(v_arg_8688_);
if (lean_obj_tag(v___x_8887_) == 0)
{
lean_object* v_a_8888_; lean_object* v___x_8890_; uint8_t v_isShared_8891_; uint8_t v_isSharedCheck_8905_; 
v_a_8888_ = lean_ctor_get(v___x_8887_, 0);
v_isSharedCheck_8905_ = !lean_is_exclusive(v___x_8887_);
if (v_isSharedCheck_8905_ == 0)
{
v___x_8890_ = v___x_8887_;
v_isShared_8891_ = v_isSharedCheck_8905_;
goto v_resetjp_8889_;
}
else
{
lean_inc(v_a_8888_);
lean_dec(v___x_8887_);
v___x_8890_ = lean_box(0);
v_isShared_8891_ = v_isSharedCheck_8905_;
goto v_resetjp_8889_;
}
v_resetjp_8889_:
{
if (lean_obj_tag(v_a_8888_) == 1)
{
lean_object* v_val_8892_; lean_object* v___x_8894_; uint8_t v_isShared_8895_; uint8_t v_isSharedCheck_8904_; 
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v_val_8892_ = lean_ctor_get(v_a_8888_, 0);
v_isSharedCheck_8904_ = !lean_is_exclusive(v_a_8888_);
if (v_isSharedCheck_8904_ == 0)
{
v___x_8894_ = v_a_8888_;
v_isShared_8895_ = v_isSharedCheck_8904_;
goto v_resetjp_8893_;
}
else
{
lean_inc(v_val_8892_);
lean_dec(v_a_8888_);
v___x_8894_ = lean_box(0);
v_isShared_8895_ = v_isSharedCheck_8904_;
goto v_resetjp_8893_;
}
v_resetjp_8893_:
{
lean_object* v___x_8896_; lean_object* v___x_8897_; lean_object* v___x_8899_; 
v___x_8896_ = lean_nat_to_int(v_val_8892_);
v___x_8897_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_8897_, 0, v___x_8896_);
if (v_isShared_8895_ == 0)
{
lean_ctor_set(v___x_8894_, 0, v___x_8897_);
v___x_8899_ = v___x_8894_;
goto v_reusejp_8898_;
}
else
{
lean_object* v_reuseFailAlloc_8903_; 
v_reuseFailAlloc_8903_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8903_, 0, v___x_8897_);
v___x_8899_ = v_reuseFailAlloc_8903_;
goto v_reusejp_8898_;
}
v_reusejp_8898_:
{
lean_object* v___x_8901_; 
if (v_isShared_8891_ == 0)
{
lean_ctor_set(v___x_8890_, 0, v___x_8899_);
v___x_8901_ = v___x_8890_;
goto v_reusejp_8900_;
}
else
{
lean_object* v_reuseFailAlloc_8902_; 
v_reuseFailAlloc_8902_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8902_, 0, v___x_8899_);
v___x_8901_ = v_reuseFailAlloc_8902_;
goto v_reusejp_8900_;
}
v_reusejp_8900_:
{
return v___x_8901_;
}
}
}
}
else
{
lean_del_object(v___x_8890_);
lean_dec(v_a_8888_);
v_e_8662_ = v_e_8613_;
v___y_8663_ = v___y_8614_;
v___y_8664_ = v___y_8615_;
v___y_8665_ = v___y_8616_;
v___y_8666_ = v___y_8617_;
v___y_8667_ = v___y_8618_;
v___y_8668_ = v___y_8619_;
v___y_8669_ = v___y_8620_;
v___y_8670_ = v___y_8621_;
v___y_8671_ = v___y_8622_;
v___y_8672_ = v___y_8623_;
v___y_8673_ = v___y_8624_;
goto v___jp_8661_;
}
}
}
else
{
lean_object* v_a_8906_; lean_object* v___x_8908_; uint8_t v_isShared_8909_; uint8_t v_isSharedCheck_8913_; 
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v_a_8906_ = lean_ctor_get(v___x_8887_, 0);
v_isSharedCheck_8913_ = !lean_is_exclusive(v___x_8887_);
if (v_isSharedCheck_8913_ == 0)
{
v___x_8908_ = v___x_8887_;
v_isShared_8909_ = v_isSharedCheck_8913_;
goto v_resetjp_8907_;
}
else
{
lean_inc(v_a_8906_);
lean_dec(v___x_8887_);
v___x_8908_ = lean_box(0);
v_isShared_8909_ = v_isSharedCheck_8913_;
goto v_resetjp_8907_;
}
v_resetjp_8907_:
{
lean_object* v___x_8911_; 
if (v_isShared_8909_ == 0)
{
v___x_8911_ = v___x_8908_;
goto v_reusejp_8910_;
}
else
{
lean_object* v_reuseFailAlloc_8912_; 
v_reuseFailAlloc_8912_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8912_, 0, v_a_8906_);
v___x_8911_ = v_reuseFailAlloc_8912_;
goto v_reusejp_8910_;
}
v_reusejp_8910_:
{
return v___x_8911_;
}
}
}
}
}
}
}
v___jp_8630_:
{
lean_object* v___x_8643_; 
v___x_8643_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1(v_mkVar_8628_, v_e_8631_, v___y_8632_, v___y_8633_, v___y_8634_, v___y_8635_, v___y_8636_, v___y_8637_, v___y_8638_, v___y_8639_, v___y_8640_, v___y_8641_, v___y_8642_);
if (lean_obj_tag(v___x_8643_) == 0)
{
lean_object* v_a_8644_; lean_object* v___x_8646_; uint8_t v_isShared_8647_; uint8_t v_isSharedCheck_8652_; 
v_a_8644_ = lean_ctor_get(v___x_8643_, 0);
v_isSharedCheck_8652_ = !lean_is_exclusive(v___x_8643_);
if (v_isSharedCheck_8652_ == 0)
{
v___x_8646_ = v___x_8643_;
v_isShared_8647_ = v_isSharedCheck_8652_;
goto v_resetjp_8645_;
}
else
{
lean_inc(v_a_8644_);
lean_dec(v___x_8643_);
v___x_8646_ = lean_box(0);
v_isShared_8647_ = v_isSharedCheck_8652_;
goto v_resetjp_8645_;
}
v_resetjp_8645_:
{
lean_object* v___x_8648_; lean_object* v___x_8650_; 
v___x_8648_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_8648_, 0, v_a_8644_);
if (v_isShared_8647_ == 0)
{
lean_ctor_set(v___x_8646_, 0, v___x_8648_);
v___x_8650_ = v___x_8646_;
goto v_reusejp_8649_;
}
else
{
lean_object* v_reuseFailAlloc_8651_; 
v_reuseFailAlloc_8651_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8651_, 0, v___x_8648_);
v___x_8650_ = v_reuseFailAlloc_8651_;
goto v_reusejp_8649_;
}
v_reusejp_8649_:
{
return v___x_8650_;
}
}
}
else
{
lean_object* v_a_8653_; lean_object* v___x_8655_; uint8_t v_isShared_8656_; uint8_t v_isSharedCheck_8660_; 
v_a_8653_ = lean_ctor_get(v___x_8643_, 0);
v_isSharedCheck_8660_ = !lean_is_exclusive(v___x_8643_);
if (v_isSharedCheck_8660_ == 0)
{
v___x_8655_ = v___x_8643_;
v_isShared_8656_ = v_isSharedCheck_8660_;
goto v_resetjp_8654_;
}
else
{
lean_inc(v_a_8653_);
lean_dec(v___x_8643_);
v___x_8655_ = lean_box(0);
v_isShared_8656_ = v_isSharedCheck_8660_;
goto v_resetjp_8654_;
}
v_resetjp_8654_:
{
lean_object* v___x_8658_; 
if (v_isShared_8656_ == 0)
{
v___x_8658_ = v___x_8655_;
goto v_reusejp_8657_;
}
else
{
lean_object* v_reuseFailAlloc_8659_; 
v_reuseFailAlloc_8659_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8659_, 0, v_a_8653_);
v___x_8658_ = v_reuseFailAlloc_8659_;
goto v_reusejp_8657_;
}
v_reusejp_8657_:
{
return v___x_8658_;
}
}
}
}
v___jp_8661_:
{
lean_object* v___x_8674_; 
lean_inc_ref(v_e_8662_);
v___x_8674_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg(v_e_8662_, v___y_8665_, v___y_8666_, v___y_8667_, v___y_8668_, v___y_8669_, v___y_8670_, v___y_8671_, v___y_8672_, v___y_8673_);
if (lean_obj_tag(v___x_8674_) == 0)
{
lean_dec_ref(v___x_8674_);
v_e_8631_ = v_e_8662_;
v___y_8632_ = v___y_8663_;
v___y_8633_ = v___y_8664_;
v___y_8634_ = v___y_8665_;
v___y_8635_ = v___y_8666_;
v___y_8636_ = v___y_8667_;
v___y_8637_ = v___y_8668_;
v___y_8638_ = v___y_8669_;
v___y_8639_ = v___y_8670_;
v___y_8640_ = v___y_8671_;
v___y_8641_ = v___y_8672_;
v___y_8642_ = v___y_8673_;
goto v___jp_8630_;
}
else
{
lean_object* v_a_8675_; lean_object* v___x_8677_; uint8_t v_isShared_8678_; uint8_t v_isSharedCheck_8682_; 
lean_dec(v___y_8673_);
lean_dec_ref(v___y_8672_);
lean_dec(v___y_8671_);
lean_dec_ref(v___y_8670_);
lean_dec(v___y_8669_);
lean_dec_ref(v___y_8668_);
lean_dec(v___y_8667_);
lean_dec_ref(v___y_8666_);
lean_dec(v___y_8665_);
lean_dec(v___y_8664_);
lean_dec(v___y_8663_);
lean_dec_ref(v_e_8662_);
v_a_8675_ = lean_ctor_get(v___x_8674_, 0);
v_isSharedCheck_8682_ = !lean_is_exclusive(v___x_8674_);
if (v_isSharedCheck_8682_ == 0)
{
v___x_8677_ = v___x_8674_;
v_isShared_8678_ = v_isSharedCheck_8682_;
goto v_resetjp_8676_;
}
else
{
lean_inc(v_a_8675_);
lean_dec(v___x_8674_);
v___x_8677_ = lean_box(0);
v_isShared_8678_ = v_isSharedCheck_8682_;
goto v_resetjp_8676_;
}
v_resetjp_8676_:
{
lean_object* v___x_8680_; 
if (v_isShared_8678_ == 0)
{
v___x_8680_ = v___x_8677_;
goto v_reusejp_8679_;
}
else
{
lean_object* v_reuseFailAlloc_8681_; 
v_reuseFailAlloc_8681_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8681_, 0, v_a_8675_);
v___x_8680_ = v_reuseFailAlloc_8681_;
goto v_reusejp_8679_;
}
v_reusejp_8679_:
{
return v___x_8680_;
}
}
}
}
}
else
{
lean_object* v_a_8914_; lean_object* v___x_8916_; uint8_t v_isShared_8917_; uint8_t v_isSharedCheck_8921_; 
lean_dec(v___y_8624_);
lean_dec_ref(v___y_8623_);
lean_dec(v___y_8622_);
lean_dec_ref(v___y_8621_);
lean_dec(v___y_8620_);
lean_dec_ref(v___y_8619_);
lean_dec(v___y_8618_);
lean_dec_ref(v___y_8617_);
lean_dec(v___y_8616_);
lean_dec(v___y_8615_);
lean_dec(v___y_8614_);
lean_dec_ref(v_e_8613_);
v_a_8914_ = lean_ctor_get(v___x_8626_, 0);
v_isSharedCheck_8921_ = !lean_is_exclusive(v___x_8626_);
if (v_isSharedCheck_8921_ == 0)
{
v___x_8916_ = v___x_8626_;
v_isShared_8917_ = v_isSharedCheck_8921_;
goto v_resetjp_8915_;
}
else
{
lean_inc(v_a_8914_);
lean_dec(v___x_8626_);
v___x_8916_ = lean_box(0);
v_isShared_8917_ = v_isSharedCheck_8921_;
goto v_resetjp_8915_;
}
v_resetjp_8915_:
{
lean_object* v___x_8919_; 
if (v_isShared_8917_ == 0)
{
v___x_8919_ = v___x_8916_;
goto v_reusejp_8918_;
}
else
{
lean_object* v_reuseFailAlloc_8920_; 
v_reuseFailAlloc_8920_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8920_, 0, v_a_8914_);
v___x_8919_ = v_reuseFailAlloc_8920_;
goto v_reusejp_8918_;
}
v_reusejp_8918_:
{
return v___x_8919_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0___boxed(lean_object* v_e_8922_, lean_object* v___y_8923_, lean_object* v___y_8924_, lean_object* v___y_8925_, lean_object* v___y_8926_, lean_object* v___y_8927_, lean_object* v___y_8928_, lean_object* v___y_8929_, lean_object* v___y_8930_, lean_object* v___y_8931_, lean_object* v___y_8932_, lean_object* v___y_8933_, lean_object* v___y_8934_){
_start:
{
lean_object* v_res_8935_; 
v_res_8935_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0(v_e_8922_, v___y_8923_, v___y_8924_, v___y_8925_, v___y_8926_, v___y_8927_, v___y_8928_, v___y_8929_, v___y_8930_, v___y_8931_, v___y_8932_, v___y_8933_);
return v_res_8935_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreify_x3f(lean_object* v_e_8936_, lean_object* v_a_8937_, lean_object* v_a_8938_, lean_object* v_a_8939_, lean_object* v_a_8940_, lean_object* v_a_8941_, lean_object* v_a_8942_, lean_object* v_a_8943_, lean_object* v_a_8944_, lean_object* v_a_8945_, lean_object* v_a_8946_, lean_object* v_a_8947_){
_start:
{
lean_object* v___x_8949_; 
v___x_8949_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0(v_e_8936_, v_a_8937_, v_a_8938_, v_a_8939_, v_a_8940_, v_a_8941_, v_a_8942_, v_a_8943_, v_a_8944_, v_a_8945_, v_a_8946_, v_a_8947_);
return v___x_8949_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreify_x3f___boxed(lean_object* v_e_8950_, lean_object* v_a_8951_, lean_object* v_a_8952_, lean_object* v_a_8953_, lean_object* v_a_8954_, lean_object* v_a_8955_, lean_object* v_a_8956_, lean_object* v_a_8957_, lean_object* v_a_8958_, lean_object* v_a_8959_, lean_object* v_a_8960_, lean_object* v_a_8961_, lean_object* v_a_8962_){
_start:
{
lean_object* v_res_8963_; 
v_res_8963_ = l_Lean_Meta_Grind_Arith_CommRing_sreify_x3f(v_e_8950_, v_a_8951_, v_a_8952_, v_a_8953_, v_a_8954_, v_a_8955_, v_a_8956_, v_a_8957_, v_a_8958_, v_a_8959_, v_a_8960_, v_a_8961_);
return v_res_8963_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8(lean_object* v_u_8964_, lean_object* v_type_8965_, lean_object* v_semiringInst_8966_, lean_object* v___y_8967_, lean_object* v___y_8968_, lean_object* v___y_8969_, lean_object* v___y_8970_, lean_object* v___y_8971_, lean_object* v___y_8972_, lean_object* v___y_8973_, lean_object* v___y_8974_, lean_object* v___y_8975_, lean_object* v___y_8976_, lean_object* v___y_8977_){
_start:
{
lean_object* v___x_8979_; 
v___x_8979_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8___redArg(v_u_8964_, v_type_8965_, v_semiringInst_8966_, v___y_8968_, v___y_8969_, v___y_8970_, v___y_8971_, v___y_8972_, v___y_8973_, v___y_8974_, v___y_8975_, v___y_8976_, v___y_8977_);
return v___x_8979_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8___boxed(lean_object* v_u_8980_, lean_object* v_type_8981_, lean_object* v_semiringInst_8982_, lean_object* v___y_8983_, lean_object* v___y_8984_, lean_object* v___y_8985_, lean_object* v___y_8986_, lean_object* v___y_8987_, lean_object* v___y_8988_, lean_object* v___y_8989_, lean_object* v___y_8990_, lean_object* v___y_8991_, lean_object* v___y_8992_, lean_object* v___y_8993_, lean_object* v___y_8994_){
_start:
{
lean_object* v_res_8995_; 
v_res_8995_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__5_spec__8(v_u_8980_, v_type_8981_, v_semiringInst_8982_, v___y_8983_, v___y_8984_, v___y_8985_, v___y_8986_, v___y_8987_, v___y_8988_, v___y_8989_, v___y_8990_, v___y_8991_, v___y_8992_, v___y_8993_);
lean_dec(v___y_8983_);
return v_res_8995_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9(lean_object* v_00_u03b1_8996_, lean_object* v_msg_8997_, lean_object* v___y_8998_, lean_object* v___y_8999_, lean_object* v___y_9000_, lean_object* v___y_9001_, lean_object* v___y_9002_, lean_object* v___y_9003_, lean_object* v___y_9004_, lean_object* v___y_9005_, lean_object* v___y_9006_, lean_object* v___y_9007_, lean_object* v___y_9008_){
_start:
{
lean_object* v___x_9010_; 
v___x_9010_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg(v_msg_8997_, v___y_9005_, v___y_9006_, v___y_9007_, v___y_9008_);
return v___x_9010_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___boxed(lean_object* v_00_u03b1_9011_, lean_object* v_msg_9012_, lean_object* v___y_9013_, lean_object* v___y_9014_, lean_object* v___y_9015_, lean_object* v___y_9016_, lean_object* v___y_9017_, lean_object* v___y_9018_, lean_object* v___y_9019_, lean_object* v___y_9020_, lean_object* v___y_9021_, lean_object* v___y_9022_, lean_object* v___y_9023_, lean_object* v___y_9024_){
_start:
{
lean_object* v_res_9025_; 
v_res_9025_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_sreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9(v_00_u03b1_9011_, v_msg_9012_, v___y_9013_, v___y_9014_, v___y_9015_, v___y_9016_, v___y_9017_, v___y_9018_, v___y_9019_, v___y_9020_, v___y_9021_, v___y_9022_, v___y_9023_);
lean_dec(v___y_9023_);
lean_dec_ref(v___y_9022_);
lean_dec(v___y_9021_);
lean_dec_ref(v___y_9020_);
lean_dec(v___y_9019_);
lean_dec_ref(v___y_9018_);
lean_dec(v___y_9017_);
lean_dec_ref(v___y_9016_);
lean_dec(v___y_9015_);
lean_dec(v___y_9014_);
lean_dec(v___y_9013_);
return v_res_9025_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4___lam__0(lean_object* v_a_9026_, lean_object* v_s_9027_){
_start:
{
lean_object* v_id_9028_; lean_object* v_type_9029_; lean_object* v_u_9030_; lean_object* v_semiringInst_9031_; lean_object* v_addFn_x3f_9032_; lean_object* v_mulFn_x3f_9033_; lean_object* v_natCastFn_x3f_9034_; lean_object* v_denote_9035_; lean_object* v_vars_9036_; lean_object* v_varMap_9037_; lean_object* v___x_9039_; uint8_t v_isShared_9040_; uint8_t v_isSharedCheck_9045_; 
v_id_9028_ = lean_ctor_get(v_s_9027_, 0);
v_type_9029_ = lean_ctor_get(v_s_9027_, 1);
v_u_9030_ = lean_ctor_get(v_s_9027_, 2);
v_semiringInst_9031_ = lean_ctor_get(v_s_9027_, 3);
v_addFn_x3f_9032_ = lean_ctor_get(v_s_9027_, 4);
v_mulFn_x3f_9033_ = lean_ctor_get(v_s_9027_, 5);
v_natCastFn_x3f_9034_ = lean_ctor_get(v_s_9027_, 7);
v_denote_9035_ = lean_ctor_get(v_s_9027_, 8);
v_vars_9036_ = lean_ctor_get(v_s_9027_, 9);
v_varMap_9037_ = lean_ctor_get(v_s_9027_, 10);
v_isSharedCheck_9045_ = !lean_is_exclusive(v_s_9027_);
if (v_isSharedCheck_9045_ == 0)
{
lean_object* v_unused_9046_; 
v_unused_9046_ = lean_ctor_get(v_s_9027_, 6);
lean_dec(v_unused_9046_);
v___x_9039_ = v_s_9027_;
v_isShared_9040_ = v_isSharedCheck_9045_;
goto v_resetjp_9038_;
}
else
{
lean_inc(v_varMap_9037_);
lean_inc(v_vars_9036_);
lean_inc(v_denote_9035_);
lean_inc(v_natCastFn_x3f_9034_);
lean_inc(v_mulFn_x3f_9033_);
lean_inc(v_addFn_x3f_9032_);
lean_inc(v_semiringInst_9031_);
lean_inc(v_u_9030_);
lean_inc(v_type_9029_);
lean_inc(v_id_9028_);
lean_dec(v_s_9027_);
v___x_9039_ = lean_box(0);
v_isShared_9040_ = v_isSharedCheck_9045_;
goto v_resetjp_9038_;
}
v_resetjp_9038_:
{
lean_object* v___x_9041_; lean_object* v___x_9043_; 
v___x_9041_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_9041_, 0, v_a_9026_);
if (v_isShared_9040_ == 0)
{
lean_ctor_set(v___x_9039_, 6, v___x_9041_);
v___x_9043_ = v___x_9039_;
goto v_reusejp_9042_;
}
else
{
lean_object* v_reuseFailAlloc_9044_; 
v_reuseFailAlloc_9044_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_9044_, 0, v_id_9028_);
lean_ctor_set(v_reuseFailAlloc_9044_, 1, v_type_9029_);
lean_ctor_set(v_reuseFailAlloc_9044_, 2, v_u_9030_);
lean_ctor_set(v_reuseFailAlloc_9044_, 3, v_semiringInst_9031_);
lean_ctor_set(v_reuseFailAlloc_9044_, 4, v_addFn_x3f_9032_);
lean_ctor_set(v_reuseFailAlloc_9044_, 5, v_mulFn_x3f_9033_);
lean_ctor_set(v_reuseFailAlloc_9044_, 6, v___x_9041_);
lean_ctor_set(v_reuseFailAlloc_9044_, 7, v_natCastFn_x3f_9034_);
lean_ctor_set(v_reuseFailAlloc_9044_, 8, v_denote_9035_);
lean_ctor_set(v_reuseFailAlloc_9044_, 9, v_vars_9036_);
lean_ctor_set(v_reuseFailAlloc_9044_, 10, v_varMap_9037_);
v___x_9043_ = v_reuseFailAlloc_9044_;
goto v_reusejp_9042_;
}
v_reusejp_9042_:
{
return v___x_9043_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg(lean_object* v_msg_9047_, lean_object* v___y_9048_, lean_object* v___y_9049_, lean_object* v___y_9050_, lean_object* v___y_9051_){
_start:
{
lean_object* v_ref_9053_; lean_object* v___x_9054_; lean_object* v_a_9055_; lean_object* v___x_9057_; uint8_t v_isShared_9058_; uint8_t v_isSharedCheck_9063_; 
v_ref_9053_ = lean_ctor_get(v___y_9050_, 5);
v___x_9054_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20_spec__28_spec__31(v_msg_9047_, v___y_9048_, v___y_9049_, v___y_9050_, v___y_9051_);
v_a_9055_ = lean_ctor_get(v___x_9054_, 0);
v_isSharedCheck_9063_ = !lean_is_exclusive(v___x_9054_);
if (v_isSharedCheck_9063_ == 0)
{
v___x_9057_ = v___x_9054_;
v_isShared_9058_ = v_isSharedCheck_9063_;
goto v_resetjp_9056_;
}
else
{
lean_inc(v_a_9055_);
lean_dec(v___x_9054_);
v___x_9057_ = lean_box(0);
v_isShared_9058_ = v_isSharedCheck_9063_;
goto v_resetjp_9056_;
}
v_resetjp_9056_:
{
lean_object* v___x_9059_; lean_object* v___x_9061_; 
lean_inc(v_ref_9053_);
v___x_9059_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_9059_, 0, v_ref_9053_);
lean_ctor_set(v___x_9059_, 1, v_a_9055_);
if (v_isShared_9058_ == 0)
{
lean_ctor_set_tag(v___x_9057_, 1);
lean_ctor_set(v___x_9057_, 0, v___x_9059_);
v___x_9061_ = v___x_9057_;
goto v_reusejp_9060_;
}
else
{
lean_object* v_reuseFailAlloc_9062_; 
v_reuseFailAlloc_9062_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9062_, 0, v___x_9059_);
v___x_9061_ = v_reuseFailAlloc_9062_;
goto v_reusejp_9060_;
}
v_reusejp_9060_:
{
return v___x_9061_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg___boxed(lean_object* v_msg_9064_, lean_object* v___y_9065_, lean_object* v___y_9066_, lean_object* v___y_9067_, lean_object* v___y_9068_, lean_object* v___y_9069_){
_start:
{
lean_object* v_res_9070_; 
v_res_9070_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg(v_msg_9064_, v___y_9065_, v___y_9066_, v___y_9067_, v___y_9068_);
lean_dec(v___y_9068_);
lean_dec_ref(v___y_9067_);
lean_dec(v___y_9066_);
lean_dec_ref(v___y_9065_);
return v_res_9070_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3(lean_object* v_type_9071_, lean_object* v___y_9072_, lean_object* v___y_9073_, lean_object* v___y_9074_, lean_object* v___y_9075_, lean_object* v___y_9076_, lean_object* v___y_9077_, lean_object* v___y_9078_, lean_object* v___y_9079_, lean_object* v___y_9080_, lean_object* v___y_9081_, lean_object* v___y_9082_){
_start:
{
lean_object* v___x_9084_; 
lean_inc(v___y_9082_);
lean_inc_ref(v___y_9081_);
lean_inc(v___y_9080_);
lean_inc_ref(v___y_9079_);
lean_inc_ref(v_type_9071_);
v___x_9084_ = l_Lean_Meta_Grind_synthInstanceMeta_x3f(v_type_9071_, v___y_9079_, v___y_9080_, v___y_9081_, v___y_9082_);
if (lean_obj_tag(v___x_9084_) == 0)
{
lean_object* v_a_9085_; lean_object* v___x_9087_; uint8_t v_isShared_9088_; uint8_t v_isSharedCheck_9097_; 
v_a_9085_ = lean_ctor_get(v___x_9084_, 0);
v_isSharedCheck_9097_ = !lean_is_exclusive(v___x_9084_);
if (v_isSharedCheck_9097_ == 0)
{
v___x_9087_ = v___x_9084_;
v_isShared_9088_ = v_isSharedCheck_9097_;
goto v_resetjp_9086_;
}
else
{
lean_inc(v_a_9085_);
lean_dec(v___x_9084_);
v___x_9087_ = lean_box(0);
v_isShared_9088_ = v_isSharedCheck_9097_;
goto v_resetjp_9086_;
}
v_resetjp_9086_:
{
if (lean_obj_tag(v_a_9085_) == 1)
{
lean_object* v_val_9089_; lean_object* v___x_9091_; 
lean_dec(v___y_9082_);
lean_dec_ref(v___y_9081_);
lean_dec(v___y_9080_);
lean_dec_ref(v___y_9079_);
lean_dec_ref(v_type_9071_);
v_val_9089_ = lean_ctor_get(v_a_9085_, 0);
lean_inc(v_val_9089_);
lean_dec_ref(v_a_9085_);
if (v_isShared_9088_ == 0)
{
lean_ctor_set(v___x_9087_, 0, v_val_9089_);
v___x_9091_ = v___x_9087_;
goto v_reusejp_9090_;
}
else
{
lean_object* v_reuseFailAlloc_9092_; 
v_reuseFailAlloc_9092_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9092_, 0, v_val_9089_);
v___x_9091_ = v_reuseFailAlloc_9092_;
goto v_reusejp_9090_;
}
v_reusejp_9090_:
{
return v___x_9091_;
}
}
else
{
lean_object* v___x_9093_; lean_object* v___x_9094_; lean_object* v___x_9095_; lean_object* v___x_9096_; 
lean_del_object(v___x_9087_);
lean_dec(v_a_9085_);
v___x_9093_ = lean_obj_once(&l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1, &l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1_once, _init_l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4_spec__8_spec__20___closed__1);
v___x_9094_ = l_Lean_indentExpr(v_type_9071_);
v___x_9095_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_9095_, 0, v___x_9093_);
lean_ctor_set(v___x_9095_, 1, v___x_9094_);
v___x_9096_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg(v___x_9095_, v___y_9079_, v___y_9080_, v___y_9081_, v___y_9082_);
lean_dec(v___y_9082_);
lean_dec_ref(v___y_9081_);
lean_dec(v___y_9080_);
lean_dec_ref(v___y_9079_);
return v___x_9096_;
}
}
}
else
{
lean_object* v_a_9098_; lean_object* v___x_9100_; uint8_t v_isShared_9101_; uint8_t v_isSharedCheck_9105_; 
lean_dec(v___y_9082_);
lean_dec_ref(v___y_9081_);
lean_dec(v___y_9080_);
lean_dec_ref(v___y_9079_);
lean_dec_ref(v_type_9071_);
v_a_9098_ = lean_ctor_get(v___x_9084_, 0);
v_isSharedCheck_9105_ = !lean_is_exclusive(v___x_9084_);
if (v_isSharedCheck_9105_ == 0)
{
v___x_9100_ = v___x_9084_;
v_isShared_9101_ = v_isSharedCheck_9105_;
goto v_resetjp_9099_;
}
else
{
lean_inc(v_a_9098_);
lean_dec(v___x_9084_);
v___x_9100_ = lean_box(0);
v_isShared_9101_ = v_isSharedCheck_9105_;
goto v_resetjp_9099_;
}
v_resetjp_9099_:
{
lean_object* v___x_9103_; 
if (v_isShared_9101_ == 0)
{
v___x_9103_ = v___x_9100_;
goto v_reusejp_9102_;
}
else
{
lean_object* v_reuseFailAlloc_9104_; 
v_reuseFailAlloc_9104_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9104_, 0, v_a_9098_);
v___x_9103_ = v_reuseFailAlloc_9104_;
goto v_reusejp_9102_;
}
v_reusejp_9102_:
{
return v___x_9103_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3___boxed(lean_object* v_type_9106_, lean_object* v___y_9107_, lean_object* v___y_9108_, lean_object* v___y_9109_, lean_object* v___y_9110_, lean_object* v___y_9111_, lean_object* v___y_9112_, lean_object* v___y_9113_, lean_object* v___y_9114_, lean_object* v___y_9115_, lean_object* v___y_9116_, lean_object* v___y_9117_, lean_object* v___y_9118_){
_start:
{
lean_object* v_res_9119_; 
v_res_9119_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3(v_type_9106_, v___y_9107_, v___y_9108_, v___y_9109_, v___y_9110_, v___y_9111_, v___y_9112_, v___y_9113_, v___y_9114_, v___y_9115_, v___y_9116_, v___y_9117_);
lean_dec(v___y_9113_);
lean_dec_ref(v___y_9112_);
lean_dec(v___y_9111_);
lean_dec_ref(v___y_9110_);
lean_dec(v___y_9109_);
lean_dec(v___y_9108_);
lean_dec(v___y_9107_);
return v_res_9119_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4_spec__6(lean_object* v_u_9120_, lean_object* v_type_9121_, lean_object* v_semiringInst_9122_, lean_object* v___y_9123_, lean_object* v___y_9124_, lean_object* v___y_9125_, lean_object* v___y_9126_, lean_object* v___y_9127_, lean_object* v___y_9128_, lean_object* v___y_9129_, lean_object* v___y_9130_, lean_object* v___y_9131_, lean_object* v___y_9132_, lean_object* v___y_9133_){
_start:
{
lean_object* v___x_9135_; lean_object* v___x_9136_; lean_object* v___x_9137_; lean_object* v___x_9138_; lean_object* v___x_9139_; lean_object* v___x_9140_; lean_object* v___x_9141_; lean_object* v___x_9142_; lean_object* v___x_9143_; lean_object* v___x_9144_; 
v___x_9135_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__0));
v___x_9136_ = lean_obj_once(&l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1, &l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1_once, _init_l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__1);
v___x_9137_ = lean_box(0);
lean_inc(v_u_9120_);
v___x_9138_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_9138_, 0, v_u_9120_);
lean_ctor_set(v___x_9138_, 1, v___x_9137_);
lean_inc_ref(v___x_9138_);
v___x_9139_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_9139_, 0, v___x_9136_);
lean_ctor_set(v___x_9139_, 1, v___x_9138_);
v___x_9140_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_9140_, 0, v_u_9120_);
lean_ctor_set(v___x_9140_, 1, v___x_9139_);
lean_inc_ref(v___x_9140_);
v___x_9141_ = l_Lean_mkConst(v___x_9135_, v___x_9140_);
v___x_9142_ = l_Lean_Nat_mkType;
lean_inc_ref_n(v_type_9121_, 2);
v___x_9143_ = l_Lean_mkApp3(v___x_9141_, v_type_9121_, v___x_9142_, v_type_9121_);
lean_inc(v___y_9133_);
lean_inc_ref(v___y_9132_);
lean_inc(v___y_9131_);
lean_inc_ref(v___y_9130_);
v___x_9144_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3(v___x_9143_, v___y_9123_, v___y_9124_, v___y_9125_, v___y_9126_, v___y_9127_, v___y_9128_, v___y_9129_, v___y_9130_, v___y_9131_, v___y_9132_, v___y_9133_);
if (lean_obj_tag(v___x_9144_) == 0)
{
lean_object* v_a_9145_; lean_object* v___x_9146_; lean_object* v___x_9147_; lean_object* v_inst_x27_9148_; lean_object* v___x_9149_; lean_object* v___x_9150_; 
v_a_9145_ = lean_ctor_get(v___x_9144_, 0);
lean_inc(v_a_9145_);
lean_dec_ref(v___x_9144_);
v___x_9146_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn___at___00Lean_Meta_Grind_Arith_CommRing_isPowInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__5_spec__11_spec__16___closed__3));
v___x_9147_ = l_Lean_mkConst(v___x_9146_, v___x_9138_);
lean_inc_ref(v_type_9121_);
v_inst_x27_9148_ = l_Lean_mkAppB(v___x_9147_, v_type_9121_, v_semiringInst_9122_);
v___x_9149_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
lean_inc(v___y_9133_);
lean_inc_ref(v___y_9132_);
lean_inc(v___y_9131_);
lean_inc_ref(v___y_9130_);
lean_inc(v_a_9145_);
v___x_9150_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v___x_9149_, v_a_9145_, v_inst_x27_9148_, v___y_9130_, v___y_9131_, v___y_9132_, v___y_9133_);
if (lean_obj_tag(v___x_9150_) == 0)
{
lean_object* v___x_9151_; lean_object* v___x_9152_; lean_object* v___x_9153_; 
lean_dec_ref(v___x_9150_);
v___x_9151_ = l_Lean_mkConst(v___x_9149_, v___x_9140_);
lean_inc_ref(v_type_9121_);
v___x_9152_ = l_Lean_mkApp4(v___x_9151_, v_type_9121_, v___x_9142_, v_type_9121_, v_a_9145_);
lean_inc(v___y_9129_);
v___x_9153_ = lean_grind_canon(v___x_9152_, v___y_9124_, v___y_9125_, v___y_9126_, v___y_9127_, v___y_9128_, v___y_9129_, v___y_9130_, v___y_9131_, v___y_9132_, v___y_9133_);
if (lean_obj_tag(v___x_9153_) == 0)
{
lean_object* v_a_9154_; lean_object* v___x_9155_; 
v_a_9154_ = lean_ctor_get(v___x_9153_, 0);
lean_inc(v_a_9154_);
lean_dec_ref(v___x_9153_);
v___x_9155_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_9154_, v___y_9129_);
lean_dec(v___y_9129_);
return v___x_9155_;
}
else
{
lean_dec(v___y_9129_);
return v___x_9153_;
}
}
else
{
lean_object* v_a_9156_; lean_object* v___x_9158_; uint8_t v_isShared_9159_; uint8_t v_isSharedCheck_9163_; 
lean_dec(v_a_9145_);
lean_dec_ref(v___x_9140_);
lean_dec(v___y_9133_);
lean_dec_ref(v___y_9132_);
lean_dec(v___y_9131_);
lean_dec_ref(v___y_9130_);
lean_dec(v___y_9129_);
lean_dec_ref(v___y_9128_);
lean_dec(v___y_9127_);
lean_dec_ref(v___y_9126_);
lean_dec(v___y_9125_);
lean_dec(v___y_9124_);
lean_dec_ref(v_type_9121_);
v_a_9156_ = lean_ctor_get(v___x_9150_, 0);
v_isSharedCheck_9163_ = !lean_is_exclusive(v___x_9150_);
if (v_isSharedCheck_9163_ == 0)
{
v___x_9158_ = v___x_9150_;
v_isShared_9159_ = v_isSharedCheck_9163_;
goto v_resetjp_9157_;
}
else
{
lean_inc(v_a_9156_);
lean_dec(v___x_9150_);
v___x_9158_ = lean_box(0);
v_isShared_9159_ = v_isSharedCheck_9163_;
goto v_resetjp_9157_;
}
v_resetjp_9157_:
{
lean_object* v___x_9161_; 
if (v_isShared_9159_ == 0)
{
v___x_9161_ = v___x_9158_;
goto v_reusejp_9160_;
}
else
{
lean_object* v_reuseFailAlloc_9162_; 
v_reuseFailAlloc_9162_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9162_, 0, v_a_9156_);
v___x_9161_ = v_reuseFailAlloc_9162_;
goto v_reusejp_9160_;
}
v_reusejp_9160_:
{
return v___x_9161_;
}
}
}
}
else
{
lean_dec_ref(v___x_9140_);
lean_dec_ref(v___x_9138_);
lean_dec(v___y_9133_);
lean_dec_ref(v___y_9132_);
lean_dec(v___y_9131_);
lean_dec_ref(v___y_9130_);
lean_dec(v___y_9129_);
lean_dec_ref(v___y_9128_);
lean_dec(v___y_9127_);
lean_dec_ref(v___y_9126_);
lean_dec(v___y_9125_);
lean_dec(v___y_9124_);
lean_dec_ref(v_semiringInst_9122_);
lean_dec_ref(v_type_9121_);
return v___x_9144_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4_spec__6___boxed(lean_object* v_u_9164_, lean_object* v_type_9165_, lean_object* v_semiringInst_9166_, lean_object* v___y_9167_, lean_object* v___y_9168_, lean_object* v___y_9169_, lean_object* v___y_9170_, lean_object* v___y_9171_, lean_object* v___y_9172_, lean_object* v___y_9173_, lean_object* v___y_9174_, lean_object* v___y_9175_, lean_object* v___y_9176_, lean_object* v___y_9177_, lean_object* v___y_9178_){
_start:
{
lean_object* v_res_9179_; 
v_res_9179_ = l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4_spec__6(v_u_9164_, v_type_9165_, v_semiringInst_9166_, v___y_9167_, v___y_9168_, v___y_9169_, v___y_9170_, v___y_9171_, v___y_9172_, v___y_9173_, v___y_9174_, v___y_9175_, v___y_9176_, v___y_9177_);
lean_dec(v___y_9167_);
return v_res_9179_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4(lean_object* v___y_9180_, lean_object* v___y_9181_, lean_object* v___y_9182_, lean_object* v___y_9183_, lean_object* v___y_9184_, lean_object* v___y_9185_, lean_object* v___y_9186_, lean_object* v___y_9187_, lean_object* v___y_9188_, lean_object* v___y_9189_, lean_object* v___y_9190_){
_start:
{
lean_object* v___x_9192_; 
v___x_9192_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_getSemiring(v___y_9180_, v___y_9181_, v___y_9182_, v___y_9183_, v___y_9184_, v___y_9185_, v___y_9186_, v___y_9187_, v___y_9188_, v___y_9189_, v___y_9190_);
if (lean_obj_tag(v___x_9192_) == 0)
{
lean_object* v_a_9193_; lean_object* v___x_9195_; uint8_t v_isShared_9196_; uint8_t v_isSharedCheck_9225_; 
v_a_9193_ = lean_ctor_get(v___x_9192_, 0);
v_isSharedCheck_9225_ = !lean_is_exclusive(v___x_9192_);
if (v_isSharedCheck_9225_ == 0)
{
v___x_9195_ = v___x_9192_;
v_isShared_9196_ = v_isSharedCheck_9225_;
goto v_resetjp_9194_;
}
else
{
lean_inc(v_a_9193_);
lean_dec(v___x_9192_);
v___x_9195_ = lean_box(0);
v_isShared_9196_ = v_isSharedCheck_9225_;
goto v_resetjp_9194_;
}
v_resetjp_9194_:
{
lean_object* v_powFn_x3f_9197_; 
v_powFn_x3f_9197_ = lean_ctor_get(v_a_9193_, 6);
if (lean_obj_tag(v_powFn_x3f_9197_) == 1)
{
lean_object* v_val_9198_; lean_object* v___x_9200_; 
lean_inc_ref(v_powFn_x3f_9197_);
lean_dec(v_a_9193_);
lean_dec(v___y_9190_);
lean_dec_ref(v___y_9189_);
lean_dec(v___y_9188_);
lean_dec_ref(v___y_9187_);
lean_dec(v___y_9186_);
lean_dec_ref(v___y_9185_);
lean_dec(v___y_9184_);
lean_dec_ref(v___y_9183_);
lean_dec(v___y_9182_);
lean_dec(v___y_9181_);
lean_dec(v___y_9180_);
v_val_9198_ = lean_ctor_get(v_powFn_x3f_9197_, 0);
lean_inc(v_val_9198_);
lean_dec_ref(v_powFn_x3f_9197_);
if (v_isShared_9196_ == 0)
{
lean_ctor_set(v___x_9195_, 0, v_val_9198_);
v___x_9200_ = v___x_9195_;
goto v_reusejp_9199_;
}
else
{
lean_object* v_reuseFailAlloc_9201_; 
v_reuseFailAlloc_9201_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9201_, 0, v_val_9198_);
v___x_9200_ = v_reuseFailAlloc_9201_;
goto v_reusejp_9199_;
}
v_reusejp_9199_:
{
return v___x_9200_;
}
}
else
{
lean_object* v_type_9202_; lean_object* v_u_9203_; lean_object* v_semiringInst_9204_; lean_object* v___x_9205_; 
lean_del_object(v___x_9195_);
v_type_9202_ = lean_ctor_get(v_a_9193_, 1);
lean_inc_ref(v_type_9202_);
v_u_9203_ = lean_ctor_get(v_a_9193_, 2);
lean_inc(v_u_9203_);
v_semiringInst_9204_ = lean_ctor_get(v_a_9193_, 3);
lean_inc_ref(v_semiringInst_9204_);
lean_dec(v_a_9193_);
lean_inc(v___y_9181_);
v___x_9205_ = l_Lean_Meta_Grind_Arith_CommRing_mkPowFn___at___00Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4_spec__6(v_u_9203_, v_type_9202_, v_semiringInst_9204_, v___y_9180_, v___y_9181_, v___y_9182_, v___y_9183_, v___y_9184_, v___y_9185_, v___y_9186_, v___y_9187_, v___y_9188_, v___y_9189_, v___y_9190_);
if (lean_obj_tag(v___x_9205_) == 0)
{
lean_object* v_a_9206_; lean_object* v___f_9207_; lean_object* v___x_9208_; 
v_a_9206_ = lean_ctor_get(v___x_9205_, 0);
lean_inc(v_a_9206_);
lean_dec_ref(v___x_9205_);
lean_inc(v_a_9206_);
v___f_9207_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4___lam__0), 2, 1);
lean_closure_set(v___f_9207_, 0, v_a_9206_);
v___x_9208_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_modifySemiring___redArg(v___f_9207_, v___y_9180_, v___y_9181_);
lean_dec(v___y_9181_);
if (lean_obj_tag(v___x_9208_) == 0)
{
lean_object* v___x_9210_; uint8_t v_isShared_9211_; uint8_t v_isSharedCheck_9215_; 
v_isSharedCheck_9215_ = !lean_is_exclusive(v___x_9208_);
if (v_isSharedCheck_9215_ == 0)
{
lean_object* v_unused_9216_; 
v_unused_9216_ = lean_ctor_get(v___x_9208_, 0);
lean_dec(v_unused_9216_);
v___x_9210_ = v___x_9208_;
v_isShared_9211_ = v_isSharedCheck_9215_;
goto v_resetjp_9209_;
}
else
{
lean_dec(v___x_9208_);
v___x_9210_ = lean_box(0);
v_isShared_9211_ = v_isSharedCheck_9215_;
goto v_resetjp_9209_;
}
v_resetjp_9209_:
{
lean_object* v___x_9213_; 
if (v_isShared_9211_ == 0)
{
lean_ctor_set(v___x_9210_, 0, v_a_9206_);
v___x_9213_ = v___x_9210_;
goto v_reusejp_9212_;
}
else
{
lean_object* v_reuseFailAlloc_9214_; 
v_reuseFailAlloc_9214_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9214_, 0, v_a_9206_);
v___x_9213_ = v_reuseFailAlloc_9214_;
goto v_reusejp_9212_;
}
v_reusejp_9212_:
{
return v___x_9213_;
}
}
}
else
{
lean_object* v_a_9217_; lean_object* v___x_9219_; uint8_t v_isShared_9220_; uint8_t v_isSharedCheck_9224_; 
lean_dec(v_a_9206_);
v_a_9217_ = lean_ctor_get(v___x_9208_, 0);
v_isSharedCheck_9224_ = !lean_is_exclusive(v___x_9208_);
if (v_isSharedCheck_9224_ == 0)
{
v___x_9219_ = v___x_9208_;
v_isShared_9220_ = v_isSharedCheck_9224_;
goto v_resetjp_9218_;
}
else
{
lean_inc(v_a_9217_);
lean_dec(v___x_9208_);
v___x_9219_ = lean_box(0);
v_isShared_9220_ = v_isSharedCheck_9224_;
goto v_resetjp_9218_;
}
v_resetjp_9218_:
{
lean_object* v___x_9222_; 
if (v_isShared_9220_ == 0)
{
v___x_9222_ = v___x_9219_;
goto v_reusejp_9221_;
}
else
{
lean_object* v_reuseFailAlloc_9223_; 
v_reuseFailAlloc_9223_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9223_, 0, v_a_9217_);
v___x_9222_ = v_reuseFailAlloc_9223_;
goto v_reusejp_9221_;
}
v_reusejp_9221_:
{
return v___x_9222_;
}
}
}
}
else
{
lean_dec(v___y_9181_);
lean_dec(v___y_9180_);
return v___x_9205_;
}
}
}
}
else
{
lean_object* v_a_9226_; lean_object* v___x_9228_; uint8_t v_isShared_9229_; uint8_t v_isSharedCheck_9233_; 
lean_dec(v___y_9190_);
lean_dec_ref(v___y_9189_);
lean_dec(v___y_9188_);
lean_dec_ref(v___y_9187_);
lean_dec(v___y_9186_);
lean_dec_ref(v___y_9185_);
lean_dec(v___y_9184_);
lean_dec_ref(v___y_9183_);
lean_dec(v___y_9182_);
lean_dec(v___y_9181_);
lean_dec(v___y_9180_);
v_a_9226_ = lean_ctor_get(v___x_9192_, 0);
v_isSharedCheck_9233_ = !lean_is_exclusive(v___x_9192_);
if (v_isSharedCheck_9233_ == 0)
{
v___x_9228_ = v___x_9192_;
v_isShared_9229_ = v_isSharedCheck_9233_;
goto v_resetjp_9227_;
}
else
{
lean_inc(v_a_9226_);
lean_dec(v___x_9192_);
v___x_9228_ = lean_box(0);
v_isShared_9229_ = v_isSharedCheck_9233_;
goto v_resetjp_9227_;
}
v_resetjp_9227_:
{
lean_object* v___x_9231_; 
if (v_isShared_9229_ == 0)
{
v___x_9231_ = v___x_9228_;
goto v_reusejp_9230_;
}
else
{
lean_object* v_reuseFailAlloc_9232_; 
v_reuseFailAlloc_9232_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9232_, 0, v_a_9226_);
v___x_9231_ = v_reuseFailAlloc_9232_;
goto v_reusejp_9230_;
}
v_reusejp_9230_:
{
return v___x_9231_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4___boxed(lean_object* v___y_9234_, lean_object* v___y_9235_, lean_object* v___y_9236_, lean_object* v___y_9237_, lean_object* v___y_9238_, lean_object* v___y_9239_, lean_object* v___y_9240_, lean_object* v___y_9241_, lean_object* v___y_9242_, lean_object* v___y_9243_, lean_object* v___y_9244_, lean_object* v___y_9245_){
_start:
{
lean_object* v_res_9246_; 
v_res_9246_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4(v___y_9234_, v___y_9235_, v___y_9236_, v___y_9237_, v___y_9238_, v___y_9239_, v___y_9240_, v___y_9241_, v___y_9242_, v___y_9243_, v___y_9244_);
return v_res_9246_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5___lam__0(lean_object* v_a_9247_, lean_object* v_s_9248_){
_start:
{
lean_object* v_id_9249_; lean_object* v_type_9250_; lean_object* v_u_9251_; lean_object* v_semiringInst_9252_; lean_object* v_addFn_x3f_9253_; lean_object* v_mulFn_x3f_9254_; lean_object* v_powFn_x3f_9255_; lean_object* v_denote_9256_; lean_object* v_vars_9257_; lean_object* v_varMap_9258_; lean_object* v___x_9260_; uint8_t v_isShared_9261_; uint8_t v_isSharedCheck_9266_; 
v_id_9249_ = lean_ctor_get(v_s_9248_, 0);
v_type_9250_ = lean_ctor_get(v_s_9248_, 1);
v_u_9251_ = lean_ctor_get(v_s_9248_, 2);
v_semiringInst_9252_ = lean_ctor_get(v_s_9248_, 3);
v_addFn_x3f_9253_ = lean_ctor_get(v_s_9248_, 4);
v_mulFn_x3f_9254_ = lean_ctor_get(v_s_9248_, 5);
v_powFn_x3f_9255_ = lean_ctor_get(v_s_9248_, 6);
v_denote_9256_ = lean_ctor_get(v_s_9248_, 8);
v_vars_9257_ = lean_ctor_get(v_s_9248_, 9);
v_varMap_9258_ = lean_ctor_get(v_s_9248_, 10);
v_isSharedCheck_9266_ = !lean_is_exclusive(v_s_9248_);
if (v_isSharedCheck_9266_ == 0)
{
lean_object* v_unused_9267_; 
v_unused_9267_ = lean_ctor_get(v_s_9248_, 7);
lean_dec(v_unused_9267_);
v___x_9260_ = v_s_9248_;
v_isShared_9261_ = v_isSharedCheck_9266_;
goto v_resetjp_9259_;
}
else
{
lean_inc(v_varMap_9258_);
lean_inc(v_vars_9257_);
lean_inc(v_denote_9256_);
lean_inc(v_powFn_x3f_9255_);
lean_inc(v_mulFn_x3f_9254_);
lean_inc(v_addFn_x3f_9253_);
lean_inc(v_semiringInst_9252_);
lean_inc(v_u_9251_);
lean_inc(v_type_9250_);
lean_inc(v_id_9249_);
lean_dec(v_s_9248_);
v___x_9260_ = lean_box(0);
v_isShared_9261_ = v_isSharedCheck_9266_;
goto v_resetjp_9259_;
}
v_resetjp_9259_:
{
lean_object* v___x_9262_; lean_object* v___x_9264_; 
v___x_9262_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_9262_, 0, v_a_9247_);
if (v_isShared_9261_ == 0)
{
lean_ctor_set(v___x_9260_, 7, v___x_9262_);
v___x_9264_ = v___x_9260_;
goto v_reusejp_9263_;
}
else
{
lean_object* v_reuseFailAlloc_9265_; 
v_reuseFailAlloc_9265_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_9265_, 0, v_id_9249_);
lean_ctor_set(v_reuseFailAlloc_9265_, 1, v_type_9250_);
lean_ctor_set(v_reuseFailAlloc_9265_, 2, v_u_9251_);
lean_ctor_set(v_reuseFailAlloc_9265_, 3, v_semiringInst_9252_);
lean_ctor_set(v_reuseFailAlloc_9265_, 4, v_addFn_x3f_9253_);
lean_ctor_set(v_reuseFailAlloc_9265_, 5, v_mulFn_x3f_9254_);
lean_ctor_set(v_reuseFailAlloc_9265_, 6, v_powFn_x3f_9255_);
lean_ctor_set(v_reuseFailAlloc_9265_, 7, v___x_9262_);
lean_ctor_set(v_reuseFailAlloc_9265_, 8, v_denote_9256_);
lean_ctor_set(v_reuseFailAlloc_9265_, 9, v_vars_9257_);
lean_ctor_set(v_reuseFailAlloc_9265_, 10, v_varMap_9258_);
v___x_9264_ = v_reuseFailAlloc_9265_;
goto v_reusejp_9263_;
}
v_reusejp_9263_:
{
return v___x_9264_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8___redArg(lean_object* v_u_9268_, lean_object* v_type_9269_, lean_object* v_semiringInst_9270_, lean_object* v___y_9271_, lean_object* v___y_9272_, lean_object* v___y_9273_, lean_object* v___y_9274_, lean_object* v___y_9275_, lean_object* v___y_9276_, lean_object* v___y_9277_, lean_object* v___y_9278_, lean_object* v___y_9279_, lean_object* v___y_9280_){
_start:
{
lean_object* v___x_9282_; lean_object* v___x_9283_; lean_object* v___x_9284_; lean_object* v___x_9285_; lean_object* v_inst_x27_9286_; lean_object* v_inst_9288_; lean_object* v___y_9289_; lean_object* v___y_9290_; lean_object* v___y_9291_; lean_object* v___y_9292_; lean_object* v___y_9293_; lean_object* v___y_9294_; lean_object* v___y_9295_; lean_object* v___y_9296_; lean_object* v___y_9297_; lean_object* v___y_9298_; lean_object* v___x_9305_; lean_object* v___x_9306_; lean_object* v_instType_9307_; lean_object* v___x_9308_; 
v___x_9282_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__0));
v___x_9283_ = lean_box(0);
v___x_9284_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_9284_, 0, v_u_9268_);
lean_ctor_set(v___x_9284_, 1, v___x_9283_);
lean_inc_ref(v___x_9284_);
v___x_9285_ = l_Lean_mkConst(v___x_9282_, v___x_9284_);
lean_inc_ref(v_type_9269_);
v_inst_x27_9286_ = l_Lean_mkAppB(v___x_9285_, v_type_9269_, v_semiringInst_9270_);
v___x_9305_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_isNatCastInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__8_spec__17_spec__24___redArg___closed__1));
lean_inc_ref(v___x_9284_);
v___x_9306_ = l_Lean_mkConst(v___x_9305_, v___x_9284_);
lean_inc_ref(v_type_9269_);
v_instType_9307_ = l_Lean_Expr_app___override(v___x_9306_, v_type_9269_);
lean_inc(v___y_9280_);
lean_inc_ref(v___y_9279_);
lean_inc(v___y_9278_);
lean_inc_ref(v___y_9277_);
v___x_9308_ = l_Lean_Meta_Grind_synthInstanceMeta_x3f(v_instType_9307_, v___y_9277_, v___y_9278_, v___y_9279_, v___y_9280_);
if (lean_obj_tag(v___x_9308_) == 0)
{
lean_object* v_a_9309_; 
v_a_9309_ = lean_ctor_get(v___x_9308_, 0);
lean_inc(v_a_9309_);
lean_dec_ref(v___x_9308_);
if (lean_obj_tag(v_a_9309_) == 0)
{
v_inst_9288_ = v_inst_x27_9286_;
v___y_9289_ = v___y_9271_;
v___y_9290_ = v___y_9272_;
v___y_9291_ = v___y_9273_;
v___y_9292_ = v___y_9274_;
v___y_9293_ = v___y_9275_;
v___y_9294_ = v___y_9276_;
v___y_9295_ = v___y_9277_;
v___y_9296_ = v___y_9278_;
v___y_9297_ = v___y_9279_;
v___y_9298_ = v___y_9280_;
goto v___jp_9287_;
}
else
{
lean_object* v_val_9310_; lean_object* v___x_9311_; lean_object* v___x_9312_; 
v_val_9310_ = lean_ctor_get(v_a_9309_, 0);
lean_inc(v_val_9310_);
lean_dec_ref(v_a_9309_);
v___x_9311_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
lean_inc(v___y_9280_);
lean_inc_ref(v___y_9279_);
lean_inc(v___y_9278_);
lean_inc_ref(v___y_9277_);
lean_inc(v_val_9310_);
v___x_9312_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v___x_9311_, v_val_9310_, v_inst_x27_9286_, v___y_9277_, v___y_9278_, v___y_9279_, v___y_9280_);
if (lean_obj_tag(v___x_9312_) == 0)
{
lean_dec_ref(v___x_9312_);
v_inst_9288_ = v_val_9310_;
v___y_9289_ = v___y_9271_;
v___y_9290_ = v___y_9272_;
v___y_9291_ = v___y_9273_;
v___y_9292_ = v___y_9274_;
v___y_9293_ = v___y_9275_;
v___y_9294_ = v___y_9276_;
v___y_9295_ = v___y_9277_;
v___y_9296_ = v___y_9278_;
v___y_9297_ = v___y_9279_;
v___y_9298_ = v___y_9280_;
goto v___jp_9287_;
}
else
{
lean_object* v_a_9313_; lean_object* v___x_9315_; uint8_t v_isShared_9316_; uint8_t v_isSharedCheck_9320_; 
lean_dec(v_val_9310_);
lean_dec_ref(v___x_9284_);
lean_dec(v___y_9280_);
lean_dec_ref(v___y_9279_);
lean_dec(v___y_9278_);
lean_dec_ref(v___y_9277_);
lean_dec(v___y_9276_);
lean_dec_ref(v___y_9275_);
lean_dec(v___y_9274_);
lean_dec_ref(v___y_9273_);
lean_dec(v___y_9272_);
lean_dec(v___y_9271_);
lean_dec_ref(v_type_9269_);
v_a_9313_ = lean_ctor_get(v___x_9312_, 0);
v_isSharedCheck_9320_ = !lean_is_exclusive(v___x_9312_);
if (v_isSharedCheck_9320_ == 0)
{
v___x_9315_ = v___x_9312_;
v_isShared_9316_ = v_isSharedCheck_9320_;
goto v_resetjp_9314_;
}
else
{
lean_inc(v_a_9313_);
lean_dec(v___x_9312_);
v___x_9315_ = lean_box(0);
v_isShared_9316_ = v_isSharedCheck_9320_;
goto v_resetjp_9314_;
}
v_resetjp_9314_:
{
lean_object* v___x_9318_; 
if (v_isShared_9316_ == 0)
{
v___x_9318_ = v___x_9315_;
goto v_reusejp_9317_;
}
else
{
lean_object* v_reuseFailAlloc_9319_; 
v_reuseFailAlloc_9319_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9319_, 0, v_a_9313_);
v___x_9318_ = v_reuseFailAlloc_9319_;
goto v_reusejp_9317_;
}
v_reusejp_9317_:
{
return v___x_9318_;
}
}
}
}
}
else
{
lean_object* v_a_9321_; lean_object* v___x_9323_; uint8_t v_isShared_9324_; uint8_t v_isSharedCheck_9328_; 
lean_dec_ref(v_inst_x27_9286_);
lean_dec_ref(v___x_9284_);
lean_dec(v___y_9280_);
lean_dec_ref(v___y_9279_);
lean_dec(v___y_9278_);
lean_dec_ref(v___y_9277_);
lean_dec(v___y_9276_);
lean_dec_ref(v___y_9275_);
lean_dec(v___y_9274_);
lean_dec_ref(v___y_9273_);
lean_dec(v___y_9272_);
lean_dec(v___y_9271_);
lean_dec_ref(v_type_9269_);
v_a_9321_ = lean_ctor_get(v___x_9308_, 0);
v_isSharedCheck_9328_ = !lean_is_exclusive(v___x_9308_);
if (v_isSharedCheck_9328_ == 0)
{
v___x_9323_ = v___x_9308_;
v_isShared_9324_ = v_isSharedCheck_9328_;
goto v_resetjp_9322_;
}
else
{
lean_inc(v_a_9321_);
lean_dec(v___x_9308_);
v___x_9323_ = lean_box(0);
v_isShared_9324_ = v_isSharedCheck_9328_;
goto v_resetjp_9322_;
}
v_resetjp_9322_:
{
lean_object* v___x_9326_; 
if (v_isShared_9324_ == 0)
{
v___x_9326_ = v___x_9323_;
goto v_reusejp_9325_;
}
else
{
lean_object* v_reuseFailAlloc_9327_; 
v_reuseFailAlloc_9327_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9327_, 0, v_a_9321_);
v___x_9326_ = v_reuseFailAlloc_9327_;
goto v_reusejp_9325_;
}
v_reusejp_9325_:
{
return v___x_9326_;
}
}
}
v___jp_9287_:
{
lean_object* v___x_9299_; lean_object* v___x_9300_; lean_object* v___x_9301_; lean_object* v___x_9302_; 
v___x_9299_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_9300_ = l_Lean_mkConst(v___x_9299_, v___x_9284_);
v___x_9301_ = l_Lean_mkAppB(v___x_9300_, v_type_9269_, v_inst_9288_);
lean_inc(v___y_9294_);
v___x_9302_ = lean_grind_canon(v___x_9301_, v___y_9289_, v___y_9290_, v___y_9291_, v___y_9292_, v___y_9293_, v___y_9294_, v___y_9295_, v___y_9296_, v___y_9297_, v___y_9298_);
if (lean_obj_tag(v___x_9302_) == 0)
{
lean_object* v_a_9303_; lean_object* v___x_9304_; 
v_a_9303_ = lean_ctor_get(v___x_9302_, 0);
lean_inc(v_a_9303_);
lean_dec_ref(v___x_9302_);
v___x_9304_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_9303_, v___y_9294_);
lean_dec(v___y_9294_);
return v___x_9304_;
}
else
{
lean_dec(v___y_9294_);
return v___x_9302_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8___redArg___boxed(lean_object* v_u_9329_, lean_object* v_type_9330_, lean_object* v_semiringInst_9331_, lean_object* v___y_9332_, lean_object* v___y_9333_, lean_object* v___y_9334_, lean_object* v___y_9335_, lean_object* v___y_9336_, lean_object* v___y_9337_, lean_object* v___y_9338_, lean_object* v___y_9339_, lean_object* v___y_9340_, lean_object* v___y_9341_, lean_object* v___y_9342_){
_start:
{
lean_object* v_res_9343_; 
v_res_9343_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8___redArg(v_u_9329_, v_type_9330_, v_semiringInst_9331_, v___y_9332_, v___y_9333_, v___y_9334_, v___y_9335_, v___y_9336_, v___y_9337_, v___y_9338_, v___y_9339_, v___y_9340_, v___y_9341_);
return v_res_9343_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5(lean_object* v___y_9344_, lean_object* v___y_9345_, lean_object* v___y_9346_, lean_object* v___y_9347_, lean_object* v___y_9348_, lean_object* v___y_9349_, lean_object* v___y_9350_, lean_object* v___y_9351_, lean_object* v___y_9352_, lean_object* v___y_9353_, lean_object* v___y_9354_){
_start:
{
lean_object* v___x_9356_; 
v___x_9356_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_getSemiring(v___y_9344_, v___y_9345_, v___y_9346_, v___y_9347_, v___y_9348_, v___y_9349_, v___y_9350_, v___y_9351_, v___y_9352_, v___y_9353_, v___y_9354_);
if (lean_obj_tag(v___x_9356_) == 0)
{
lean_object* v_a_9357_; lean_object* v___x_9359_; uint8_t v_isShared_9360_; uint8_t v_isSharedCheck_9389_; 
v_a_9357_ = lean_ctor_get(v___x_9356_, 0);
v_isSharedCheck_9389_ = !lean_is_exclusive(v___x_9356_);
if (v_isSharedCheck_9389_ == 0)
{
v___x_9359_ = v___x_9356_;
v_isShared_9360_ = v_isSharedCheck_9389_;
goto v_resetjp_9358_;
}
else
{
lean_inc(v_a_9357_);
lean_dec(v___x_9356_);
v___x_9359_ = lean_box(0);
v_isShared_9360_ = v_isSharedCheck_9389_;
goto v_resetjp_9358_;
}
v_resetjp_9358_:
{
lean_object* v_natCastFn_x3f_9361_; 
v_natCastFn_x3f_9361_ = lean_ctor_get(v_a_9357_, 7);
if (lean_obj_tag(v_natCastFn_x3f_9361_) == 1)
{
lean_object* v_val_9362_; lean_object* v___x_9364_; 
lean_inc_ref(v_natCastFn_x3f_9361_);
lean_dec(v_a_9357_);
lean_dec(v___y_9354_);
lean_dec_ref(v___y_9353_);
lean_dec(v___y_9352_);
lean_dec_ref(v___y_9351_);
lean_dec(v___y_9350_);
lean_dec_ref(v___y_9349_);
lean_dec(v___y_9348_);
lean_dec_ref(v___y_9347_);
lean_dec(v___y_9346_);
lean_dec(v___y_9345_);
lean_dec(v___y_9344_);
v_val_9362_ = lean_ctor_get(v_natCastFn_x3f_9361_, 0);
lean_inc(v_val_9362_);
lean_dec_ref(v_natCastFn_x3f_9361_);
if (v_isShared_9360_ == 0)
{
lean_ctor_set(v___x_9359_, 0, v_val_9362_);
v___x_9364_ = v___x_9359_;
goto v_reusejp_9363_;
}
else
{
lean_object* v_reuseFailAlloc_9365_; 
v_reuseFailAlloc_9365_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9365_, 0, v_val_9362_);
v___x_9364_ = v_reuseFailAlloc_9365_;
goto v_reusejp_9363_;
}
v_reusejp_9363_:
{
return v___x_9364_;
}
}
else
{
lean_object* v_type_9366_; lean_object* v_u_9367_; lean_object* v_semiringInst_9368_; lean_object* v___x_9369_; 
lean_del_object(v___x_9359_);
v_type_9366_ = lean_ctor_get(v_a_9357_, 1);
lean_inc_ref(v_type_9366_);
v_u_9367_ = lean_ctor_get(v_a_9357_, 2);
lean_inc(v_u_9367_);
v_semiringInst_9368_ = lean_ctor_get(v_a_9357_, 3);
lean_inc_ref(v_semiringInst_9368_);
lean_dec(v_a_9357_);
lean_inc(v___y_9345_);
v___x_9369_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8___redArg(v_u_9367_, v_type_9366_, v_semiringInst_9368_, v___y_9345_, v___y_9346_, v___y_9347_, v___y_9348_, v___y_9349_, v___y_9350_, v___y_9351_, v___y_9352_, v___y_9353_, v___y_9354_);
if (lean_obj_tag(v___x_9369_) == 0)
{
lean_object* v_a_9370_; lean_object* v___f_9371_; lean_object* v___x_9372_; 
v_a_9370_ = lean_ctor_get(v___x_9369_, 0);
lean_inc(v_a_9370_);
lean_dec_ref(v___x_9369_);
lean_inc(v_a_9370_);
v___f_9371_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5___lam__0), 2, 1);
lean_closure_set(v___f_9371_, 0, v_a_9370_);
v___x_9372_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_modifySemiring___redArg(v___f_9371_, v___y_9344_, v___y_9345_);
lean_dec(v___y_9345_);
if (lean_obj_tag(v___x_9372_) == 0)
{
lean_object* v___x_9374_; uint8_t v_isShared_9375_; uint8_t v_isSharedCheck_9379_; 
v_isSharedCheck_9379_ = !lean_is_exclusive(v___x_9372_);
if (v_isSharedCheck_9379_ == 0)
{
lean_object* v_unused_9380_; 
v_unused_9380_ = lean_ctor_get(v___x_9372_, 0);
lean_dec(v_unused_9380_);
v___x_9374_ = v___x_9372_;
v_isShared_9375_ = v_isSharedCheck_9379_;
goto v_resetjp_9373_;
}
else
{
lean_dec(v___x_9372_);
v___x_9374_ = lean_box(0);
v_isShared_9375_ = v_isSharedCheck_9379_;
goto v_resetjp_9373_;
}
v_resetjp_9373_:
{
lean_object* v___x_9377_; 
if (v_isShared_9375_ == 0)
{
lean_ctor_set(v___x_9374_, 0, v_a_9370_);
v___x_9377_ = v___x_9374_;
goto v_reusejp_9376_;
}
else
{
lean_object* v_reuseFailAlloc_9378_; 
v_reuseFailAlloc_9378_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9378_, 0, v_a_9370_);
v___x_9377_ = v_reuseFailAlloc_9378_;
goto v_reusejp_9376_;
}
v_reusejp_9376_:
{
return v___x_9377_;
}
}
}
else
{
lean_object* v_a_9381_; lean_object* v___x_9383_; uint8_t v_isShared_9384_; uint8_t v_isSharedCheck_9388_; 
lean_dec(v_a_9370_);
v_a_9381_ = lean_ctor_get(v___x_9372_, 0);
v_isSharedCheck_9388_ = !lean_is_exclusive(v___x_9372_);
if (v_isSharedCheck_9388_ == 0)
{
v___x_9383_ = v___x_9372_;
v_isShared_9384_ = v_isSharedCheck_9388_;
goto v_resetjp_9382_;
}
else
{
lean_inc(v_a_9381_);
lean_dec(v___x_9372_);
v___x_9383_ = lean_box(0);
v_isShared_9384_ = v_isSharedCheck_9388_;
goto v_resetjp_9382_;
}
v_resetjp_9382_:
{
lean_object* v___x_9386_; 
if (v_isShared_9384_ == 0)
{
v___x_9386_ = v___x_9383_;
goto v_reusejp_9385_;
}
else
{
lean_object* v_reuseFailAlloc_9387_; 
v_reuseFailAlloc_9387_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9387_, 0, v_a_9381_);
v___x_9386_ = v_reuseFailAlloc_9387_;
goto v_reusejp_9385_;
}
v_reusejp_9385_:
{
return v___x_9386_;
}
}
}
}
else
{
lean_dec(v___y_9345_);
lean_dec(v___y_9344_);
return v___x_9369_;
}
}
}
}
else
{
lean_object* v_a_9390_; lean_object* v___x_9392_; uint8_t v_isShared_9393_; uint8_t v_isSharedCheck_9397_; 
lean_dec(v___y_9354_);
lean_dec_ref(v___y_9353_);
lean_dec(v___y_9352_);
lean_dec_ref(v___y_9351_);
lean_dec(v___y_9350_);
lean_dec_ref(v___y_9349_);
lean_dec(v___y_9348_);
lean_dec_ref(v___y_9347_);
lean_dec(v___y_9346_);
lean_dec(v___y_9345_);
lean_dec(v___y_9344_);
v_a_9390_ = lean_ctor_get(v___x_9356_, 0);
v_isSharedCheck_9397_ = !lean_is_exclusive(v___x_9356_);
if (v_isSharedCheck_9397_ == 0)
{
v___x_9392_ = v___x_9356_;
v_isShared_9393_ = v_isSharedCheck_9397_;
goto v_resetjp_9391_;
}
else
{
lean_inc(v_a_9390_);
lean_dec(v___x_9356_);
v___x_9392_ = lean_box(0);
v_isShared_9393_ = v_isSharedCheck_9397_;
goto v_resetjp_9391_;
}
v_resetjp_9391_:
{
lean_object* v___x_9395_; 
if (v_isShared_9393_ == 0)
{
v___x_9395_ = v___x_9392_;
goto v_reusejp_9394_;
}
else
{
lean_object* v_reuseFailAlloc_9396_; 
v_reuseFailAlloc_9396_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9396_, 0, v_a_9390_);
v___x_9395_ = v_reuseFailAlloc_9396_;
goto v_reusejp_9394_;
}
v_reusejp_9394_:
{
return v___x_9395_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5___boxed(lean_object* v___y_9398_, lean_object* v___y_9399_, lean_object* v___y_9400_, lean_object* v___y_9401_, lean_object* v___y_9402_, lean_object* v___y_9403_, lean_object* v___y_9404_, lean_object* v___y_9405_, lean_object* v___y_9406_, lean_object* v___y_9407_, lean_object* v___y_9408_, lean_object* v___y_9409_){
_start:
{
lean_object* v_res_9410_; 
v_res_9410_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5(v___y_9398_, v___y_9399_, v___y_9400_, v___y_9401_, v___y_9402_, v___y_9403_, v___y_9404_, v___y_9405_, v___y_9406_, v___y_9407_, v___y_9408_);
return v_res_9410_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__0___lam__0(lean_object* v_e_9411_, lean_object* v_size_9412_, lean_object* v_s_9413_){
_start:
{
lean_object* v_id_9414_; lean_object* v_type_9415_; lean_object* v_u_9416_; lean_object* v_semiringInst_9417_; lean_object* v_addFn_x3f_9418_; lean_object* v_mulFn_x3f_9419_; lean_object* v_powFn_x3f_9420_; lean_object* v_natCastFn_x3f_9421_; lean_object* v_denote_9422_; lean_object* v_vars_9423_; lean_object* v_varMap_9424_; lean_object* v___x_9426_; uint8_t v_isShared_9427_; uint8_t v_isSharedCheck_9433_; 
v_id_9414_ = lean_ctor_get(v_s_9413_, 0);
v_type_9415_ = lean_ctor_get(v_s_9413_, 1);
v_u_9416_ = lean_ctor_get(v_s_9413_, 2);
v_semiringInst_9417_ = lean_ctor_get(v_s_9413_, 3);
v_addFn_x3f_9418_ = lean_ctor_get(v_s_9413_, 4);
v_mulFn_x3f_9419_ = lean_ctor_get(v_s_9413_, 5);
v_powFn_x3f_9420_ = lean_ctor_get(v_s_9413_, 6);
v_natCastFn_x3f_9421_ = lean_ctor_get(v_s_9413_, 7);
v_denote_9422_ = lean_ctor_get(v_s_9413_, 8);
v_vars_9423_ = lean_ctor_get(v_s_9413_, 9);
v_varMap_9424_ = lean_ctor_get(v_s_9413_, 10);
v_isSharedCheck_9433_ = !lean_is_exclusive(v_s_9413_);
if (v_isSharedCheck_9433_ == 0)
{
v___x_9426_ = v_s_9413_;
v_isShared_9427_ = v_isSharedCheck_9433_;
goto v_resetjp_9425_;
}
else
{
lean_inc(v_varMap_9424_);
lean_inc(v_vars_9423_);
lean_inc(v_denote_9422_);
lean_inc(v_natCastFn_x3f_9421_);
lean_inc(v_powFn_x3f_9420_);
lean_inc(v_mulFn_x3f_9419_);
lean_inc(v_addFn_x3f_9418_);
lean_inc(v_semiringInst_9417_);
lean_inc(v_u_9416_);
lean_inc(v_type_9415_);
lean_inc(v_id_9414_);
lean_dec(v_s_9413_);
v___x_9426_ = lean_box(0);
v_isShared_9427_ = v_isSharedCheck_9433_;
goto v_resetjp_9425_;
}
v_resetjp_9425_:
{
lean_object* v___x_9428_; lean_object* v___x_9429_; lean_object* v___x_9431_; 
lean_inc_ref(v_e_9411_);
v___x_9428_ = l_Lean_PersistentArray_push___redArg(v_vars_9423_, v_e_9411_);
v___x_9429_ = l_Lean_PersistentHashMap_insert___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__2___redArg(v_varMap_9424_, v_e_9411_, v_size_9412_);
if (v_isShared_9427_ == 0)
{
lean_ctor_set(v___x_9426_, 10, v___x_9429_);
lean_ctor_set(v___x_9426_, 9, v___x_9428_);
v___x_9431_ = v___x_9426_;
goto v_reusejp_9430_;
}
else
{
lean_object* v_reuseFailAlloc_9432_; 
v_reuseFailAlloc_9432_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_9432_, 0, v_id_9414_);
lean_ctor_set(v_reuseFailAlloc_9432_, 1, v_type_9415_);
lean_ctor_set(v_reuseFailAlloc_9432_, 2, v_u_9416_);
lean_ctor_set(v_reuseFailAlloc_9432_, 3, v_semiringInst_9417_);
lean_ctor_set(v_reuseFailAlloc_9432_, 4, v_addFn_x3f_9418_);
lean_ctor_set(v_reuseFailAlloc_9432_, 5, v_mulFn_x3f_9419_);
lean_ctor_set(v_reuseFailAlloc_9432_, 6, v_powFn_x3f_9420_);
lean_ctor_set(v_reuseFailAlloc_9432_, 7, v_natCastFn_x3f_9421_);
lean_ctor_set(v_reuseFailAlloc_9432_, 8, v_denote_9422_);
lean_ctor_set(v_reuseFailAlloc_9432_, 9, v___x_9428_);
lean_ctor_set(v_reuseFailAlloc_9432_, 10, v___x_9429_);
v___x_9431_ = v_reuseFailAlloc_9432_;
goto v_reusejp_9430_;
}
v_reusejp_9430_:
{
return v___x_9431_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__0(lean_object* v_e_9434_, lean_object* v___y_9435_, lean_object* v___y_9436_, lean_object* v___y_9437_, lean_object* v___y_9438_, lean_object* v___y_9439_, lean_object* v___y_9440_, lean_object* v___y_9441_, lean_object* v___y_9442_, lean_object* v___y_9443_, lean_object* v___y_9444_, lean_object* v___y_9445_){
_start:
{
lean_object* v___x_9447_; 
v___x_9447_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_getSemiring(v___y_9435_, v___y_9436_, v___y_9437_, v___y_9438_, v___y_9439_, v___y_9440_, v___y_9441_, v___y_9442_, v___y_9443_, v___y_9444_, v___y_9445_);
if (lean_obj_tag(v___x_9447_) == 0)
{
lean_object* v_a_9448_; lean_object* v___x_9450_; uint8_t v_isShared_9451_; uint8_t v_isSharedCheck_9497_; 
v_a_9448_ = lean_ctor_get(v___x_9447_, 0);
v_isSharedCheck_9497_ = !lean_is_exclusive(v___x_9447_);
if (v_isSharedCheck_9497_ == 0)
{
v___x_9450_ = v___x_9447_;
v_isShared_9451_ = v_isSharedCheck_9497_;
goto v_resetjp_9449_;
}
else
{
lean_inc(v_a_9448_);
lean_dec(v___x_9447_);
v___x_9450_ = lean_box(0);
v_isShared_9451_ = v_isSharedCheck_9497_;
goto v_resetjp_9449_;
}
v_resetjp_9449_:
{
lean_object* v_vars_9452_; lean_object* v_varMap_9453_; lean_object* v___x_9454_; 
v_vars_9452_ = lean_ctor_get(v_a_9448_, 9);
lean_inc_ref(v_vars_9452_);
v_varMap_9453_ = lean_ctor_get(v_a_9448_, 10);
lean_inc_ref(v_varMap_9453_);
lean_dec(v_a_9448_);
v___x_9454_ = l_Lean_PersistentHashMap_find_x3f___at___00Lean_Meta_Grind_Arith_CommRing_mkVarCore___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__0_spec__1___redArg(v_varMap_9453_, v_e_9434_);
if (lean_obj_tag(v___x_9454_) == 1)
{
lean_object* v_val_9455_; lean_object* v___x_9457_; 
lean_dec_ref(v_vars_9452_);
lean_dec(v___y_9445_);
lean_dec_ref(v___y_9444_);
lean_dec(v___y_9443_);
lean_dec_ref(v___y_9442_);
lean_dec(v___y_9441_);
lean_dec_ref(v___y_9440_);
lean_dec(v___y_9439_);
lean_dec_ref(v___y_9438_);
lean_dec(v___y_9437_);
lean_dec(v___y_9436_);
lean_dec(v___y_9435_);
lean_dec_ref(v_e_9434_);
v_val_9455_ = lean_ctor_get(v___x_9454_, 0);
lean_inc(v_val_9455_);
lean_dec_ref(v___x_9454_);
if (v_isShared_9451_ == 0)
{
lean_ctor_set(v___x_9450_, 0, v_val_9455_);
v___x_9457_ = v___x_9450_;
goto v_reusejp_9456_;
}
else
{
lean_object* v_reuseFailAlloc_9458_; 
v_reuseFailAlloc_9458_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9458_, 0, v_val_9455_);
v___x_9457_ = v_reuseFailAlloc_9458_;
goto v_reusejp_9456_;
}
v_reusejp_9456_:
{
return v___x_9457_;
}
}
else
{
lean_object* v_size_9459_; lean_object* v___f_9460_; lean_object* v___x_9461_; 
lean_dec(v___x_9454_);
lean_del_object(v___x_9450_);
v_size_9459_ = lean_ctor_get(v_vars_9452_, 2);
lean_inc(v_size_9459_);
lean_dec_ref(v_vars_9452_);
lean_inc(v_size_9459_);
lean_inc_ref(v_e_9434_);
v___f_9460_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__0___lam__0), 3, 2);
lean_closure_set(v___f_9460_, 0, v_e_9434_);
lean_closure_set(v___f_9460_, 1, v_size_9459_);
lean_inc(v___y_9435_);
v___x_9461_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_modifySemiring___redArg(v___f_9460_, v___y_9435_, v___y_9436_);
if (lean_obj_tag(v___x_9461_) == 0)
{
lean_object* v___x_9462_; 
lean_dec_ref(v___x_9461_);
lean_inc_ref(v_e_9434_);
v___x_9462_ = l_Lean_Meta_Grind_Arith_CommRing_setTermNonCommSemiringId(v_e_9434_, v___y_9435_, v___y_9436_, v___y_9437_, v___y_9438_, v___y_9439_, v___y_9440_, v___y_9441_, v___y_9442_, v___y_9443_, v___y_9444_, v___y_9445_);
if (lean_obj_tag(v___x_9462_) == 0)
{
lean_object* v___x_9463_; lean_object* v___x_9464_; 
lean_dec_ref(v___x_9462_);
v___x_9463_ = l_Lean_Meta_Grind_Arith_CommRing_ringExt;
v___x_9464_ = l_Lean_Meta_Grind_SolverExtension_markTerm___redArg(v___x_9463_, v_e_9434_, v___y_9436_, v___y_9437_, v___y_9438_, v___y_9439_, v___y_9440_, v___y_9441_, v___y_9442_, v___y_9443_, v___y_9444_, v___y_9445_);
if (lean_obj_tag(v___x_9464_) == 0)
{
lean_object* v___x_9466_; uint8_t v_isShared_9467_; uint8_t v_isSharedCheck_9471_; 
v_isSharedCheck_9471_ = !lean_is_exclusive(v___x_9464_);
if (v_isSharedCheck_9471_ == 0)
{
lean_object* v_unused_9472_; 
v_unused_9472_ = lean_ctor_get(v___x_9464_, 0);
lean_dec(v_unused_9472_);
v___x_9466_ = v___x_9464_;
v_isShared_9467_ = v_isSharedCheck_9471_;
goto v_resetjp_9465_;
}
else
{
lean_dec(v___x_9464_);
v___x_9466_ = lean_box(0);
v_isShared_9467_ = v_isSharedCheck_9471_;
goto v_resetjp_9465_;
}
v_resetjp_9465_:
{
lean_object* v___x_9469_; 
if (v_isShared_9467_ == 0)
{
lean_ctor_set(v___x_9466_, 0, v_size_9459_);
v___x_9469_ = v___x_9466_;
goto v_reusejp_9468_;
}
else
{
lean_object* v_reuseFailAlloc_9470_; 
v_reuseFailAlloc_9470_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9470_, 0, v_size_9459_);
v___x_9469_ = v_reuseFailAlloc_9470_;
goto v_reusejp_9468_;
}
v_reusejp_9468_:
{
return v___x_9469_;
}
}
}
else
{
lean_object* v_a_9473_; lean_object* v___x_9475_; uint8_t v_isShared_9476_; uint8_t v_isSharedCheck_9480_; 
lean_dec(v_size_9459_);
v_a_9473_ = lean_ctor_get(v___x_9464_, 0);
v_isSharedCheck_9480_ = !lean_is_exclusive(v___x_9464_);
if (v_isSharedCheck_9480_ == 0)
{
v___x_9475_ = v___x_9464_;
v_isShared_9476_ = v_isSharedCheck_9480_;
goto v_resetjp_9474_;
}
else
{
lean_inc(v_a_9473_);
lean_dec(v___x_9464_);
v___x_9475_ = lean_box(0);
v_isShared_9476_ = v_isSharedCheck_9480_;
goto v_resetjp_9474_;
}
v_resetjp_9474_:
{
lean_object* v___x_9478_; 
if (v_isShared_9476_ == 0)
{
v___x_9478_ = v___x_9475_;
goto v_reusejp_9477_;
}
else
{
lean_object* v_reuseFailAlloc_9479_; 
v_reuseFailAlloc_9479_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9479_, 0, v_a_9473_);
v___x_9478_ = v_reuseFailAlloc_9479_;
goto v_reusejp_9477_;
}
v_reusejp_9477_:
{
return v___x_9478_;
}
}
}
}
else
{
lean_object* v_a_9481_; lean_object* v___x_9483_; uint8_t v_isShared_9484_; uint8_t v_isSharedCheck_9488_; 
lean_dec(v_size_9459_);
lean_dec(v___y_9445_);
lean_dec_ref(v___y_9444_);
lean_dec(v___y_9443_);
lean_dec_ref(v___y_9442_);
lean_dec(v___y_9441_);
lean_dec_ref(v___y_9440_);
lean_dec(v___y_9439_);
lean_dec_ref(v___y_9438_);
lean_dec(v___y_9437_);
lean_dec(v___y_9436_);
lean_dec_ref(v_e_9434_);
v_a_9481_ = lean_ctor_get(v___x_9462_, 0);
v_isSharedCheck_9488_ = !lean_is_exclusive(v___x_9462_);
if (v_isSharedCheck_9488_ == 0)
{
v___x_9483_ = v___x_9462_;
v_isShared_9484_ = v_isSharedCheck_9488_;
goto v_resetjp_9482_;
}
else
{
lean_inc(v_a_9481_);
lean_dec(v___x_9462_);
v___x_9483_ = lean_box(0);
v_isShared_9484_ = v_isSharedCheck_9488_;
goto v_resetjp_9482_;
}
v_resetjp_9482_:
{
lean_object* v___x_9486_; 
if (v_isShared_9484_ == 0)
{
v___x_9486_ = v___x_9483_;
goto v_reusejp_9485_;
}
else
{
lean_object* v_reuseFailAlloc_9487_; 
v_reuseFailAlloc_9487_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9487_, 0, v_a_9481_);
v___x_9486_ = v_reuseFailAlloc_9487_;
goto v_reusejp_9485_;
}
v_reusejp_9485_:
{
return v___x_9486_;
}
}
}
}
else
{
lean_object* v_a_9489_; lean_object* v___x_9491_; uint8_t v_isShared_9492_; uint8_t v_isSharedCheck_9496_; 
lean_dec(v_size_9459_);
lean_dec(v___y_9445_);
lean_dec_ref(v___y_9444_);
lean_dec(v___y_9443_);
lean_dec_ref(v___y_9442_);
lean_dec(v___y_9441_);
lean_dec_ref(v___y_9440_);
lean_dec(v___y_9439_);
lean_dec_ref(v___y_9438_);
lean_dec(v___y_9437_);
lean_dec(v___y_9436_);
lean_dec(v___y_9435_);
lean_dec_ref(v_e_9434_);
v_a_9489_ = lean_ctor_get(v___x_9461_, 0);
v_isSharedCheck_9496_ = !lean_is_exclusive(v___x_9461_);
if (v_isSharedCheck_9496_ == 0)
{
v___x_9491_ = v___x_9461_;
v_isShared_9492_ = v_isSharedCheck_9496_;
goto v_resetjp_9490_;
}
else
{
lean_inc(v_a_9489_);
lean_dec(v___x_9461_);
v___x_9491_ = lean_box(0);
v_isShared_9492_ = v_isSharedCheck_9496_;
goto v_resetjp_9490_;
}
v_resetjp_9490_:
{
lean_object* v___x_9494_; 
if (v_isShared_9492_ == 0)
{
v___x_9494_ = v___x_9491_;
goto v_reusejp_9493_;
}
else
{
lean_object* v_reuseFailAlloc_9495_; 
v_reuseFailAlloc_9495_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9495_, 0, v_a_9489_);
v___x_9494_ = v_reuseFailAlloc_9495_;
goto v_reusejp_9493_;
}
v_reusejp_9493_:
{
return v___x_9494_;
}
}
}
}
}
}
else
{
lean_object* v_a_9498_; lean_object* v___x_9500_; uint8_t v_isShared_9501_; uint8_t v_isSharedCheck_9505_; 
lean_dec(v___y_9445_);
lean_dec_ref(v___y_9444_);
lean_dec(v___y_9443_);
lean_dec_ref(v___y_9442_);
lean_dec(v___y_9441_);
lean_dec_ref(v___y_9440_);
lean_dec(v___y_9439_);
lean_dec_ref(v___y_9438_);
lean_dec(v___y_9437_);
lean_dec(v___y_9436_);
lean_dec(v___y_9435_);
lean_dec_ref(v_e_9434_);
v_a_9498_ = lean_ctor_get(v___x_9447_, 0);
v_isSharedCheck_9505_ = !lean_is_exclusive(v___x_9447_);
if (v_isSharedCheck_9505_ == 0)
{
v___x_9500_ = v___x_9447_;
v_isShared_9501_ = v_isSharedCheck_9505_;
goto v_resetjp_9499_;
}
else
{
lean_inc(v_a_9498_);
lean_dec(v___x_9447_);
v___x_9500_ = lean_box(0);
v_isShared_9501_ = v_isSharedCheck_9505_;
goto v_resetjp_9499_;
}
v_resetjp_9499_:
{
lean_object* v___x_9503_; 
if (v_isShared_9501_ == 0)
{
v___x_9503_ = v___x_9500_;
goto v_reusejp_9502_;
}
else
{
lean_object* v_reuseFailAlloc_9504_; 
v_reuseFailAlloc_9504_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9504_, 0, v_a_9498_);
v___x_9503_ = v_reuseFailAlloc_9504_;
goto v_reusejp_9502_;
}
v_reusejp_9502_:
{
return v___x_9503_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__0___boxed(lean_object* v_e_9506_, lean_object* v___y_9507_, lean_object* v___y_9508_, lean_object* v___y_9509_, lean_object* v___y_9510_, lean_object* v___y_9511_, lean_object* v___y_9512_, lean_object* v___y_9513_, lean_object* v___y_9514_, lean_object* v___y_9515_, lean_object* v___y_9516_, lean_object* v___y_9517_, lean_object* v___y_9518_){
_start:
{
lean_object* v_res_9519_; 
v_res_9519_ = l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__0(v_e_9506_, v___y_9507_, v___y_9508_, v___y_9509_, v___y_9510_, v___y_9511_, v___y_9512_, v___y_9513_, v___y_9514_, v___y_9515_, v___y_9516_, v___y_9517_);
return v_res_9519_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___lam__0(lean_object* v_e_9520_, lean_object* v___y_9521_, lean_object* v___y_9522_, lean_object* v___y_9523_, lean_object* v___y_9524_, lean_object* v___y_9525_, lean_object* v___y_9526_, lean_object* v___y_9527_, lean_object* v___y_9528_, lean_object* v___y_9529_, lean_object* v___y_9530_, lean_object* v___y_9531_){
_start:
{
lean_object* v___x_9533_; 
v___x_9533_ = l_Lean_Meta_Grind_alreadyInternalized___redArg(v_e_9520_, v___y_9522_);
if (lean_obj_tag(v___x_9533_) == 0)
{
lean_object* v_a_9534_; uint8_t v___x_9535_; 
v_a_9534_ = lean_ctor_get(v___x_9533_, 0);
lean_inc(v_a_9534_);
lean_dec_ref(v___x_9533_);
v___x_9535_ = lean_unbox(v_a_9534_);
lean_dec(v_a_9534_);
if (v___x_9535_ == 0)
{
lean_object* v___x_9536_; lean_object* v___x_9537_; lean_object* v___x_9538_; 
v___x_9536_ = lean_unsigned_to_nat(0u);
v___x_9537_ = lean_box(0);
lean_inc(v___y_9531_);
lean_inc_ref(v___y_9530_);
lean_inc(v___y_9529_);
lean_inc_ref(v___y_9528_);
lean_inc(v___y_9527_);
lean_inc_ref(v___y_9526_);
lean_inc(v___y_9525_);
lean_inc_ref(v___y_9524_);
lean_inc(v___y_9523_);
lean_inc(v___y_9522_);
lean_inc_ref(v_e_9520_);
v___x_9538_ = lean_grind_internalize(v_e_9520_, v___x_9536_, v___x_9537_, v___y_9522_, v___y_9523_, v___y_9524_, v___y_9525_, v___y_9526_, v___y_9527_, v___y_9528_, v___y_9529_, v___y_9530_, v___y_9531_);
if (lean_obj_tag(v___x_9538_) == 0)
{
lean_object* v___x_9539_; 
lean_dec_ref(v___x_9538_);
v___x_9539_ = l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__0(v_e_9520_, v___y_9521_, v___y_9522_, v___y_9523_, v___y_9524_, v___y_9525_, v___y_9526_, v___y_9527_, v___y_9528_, v___y_9529_, v___y_9530_, v___y_9531_);
return v___x_9539_;
}
else
{
lean_object* v_a_9540_; lean_object* v___x_9542_; uint8_t v_isShared_9543_; uint8_t v_isSharedCheck_9547_; 
lean_dec(v___y_9531_);
lean_dec_ref(v___y_9530_);
lean_dec(v___y_9529_);
lean_dec_ref(v___y_9528_);
lean_dec(v___y_9527_);
lean_dec_ref(v___y_9526_);
lean_dec(v___y_9525_);
lean_dec_ref(v___y_9524_);
lean_dec(v___y_9523_);
lean_dec(v___y_9522_);
lean_dec(v___y_9521_);
lean_dec_ref(v_e_9520_);
v_a_9540_ = lean_ctor_get(v___x_9538_, 0);
v_isSharedCheck_9547_ = !lean_is_exclusive(v___x_9538_);
if (v_isSharedCheck_9547_ == 0)
{
v___x_9542_ = v___x_9538_;
v_isShared_9543_ = v_isSharedCheck_9547_;
goto v_resetjp_9541_;
}
else
{
lean_inc(v_a_9540_);
lean_dec(v___x_9538_);
v___x_9542_ = lean_box(0);
v_isShared_9543_ = v_isSharedCheck_9547_;
goto v_resetjp_9541_;
}
v_resetjp_9541_:
{
lean_object* v___x_9545_; 
if (v_isShared_9543_ == 0)
{
v___x_9545_ = v___x_9542_;
goto v_reusejp_9544_;
}
else
{
lean_object* v_reuseFailAlloc_9546_; 
v_reuseFailAlloc_9546_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9546_, 0, v_a_9540_);
v___x_9545_ = v_reuseFailAlloc_9546_;
goto v_reusejp_9544_;
}
v_reusejp_9544_:
{
return v___x_9545_;
}
}
}
}
else
{
lean_object* v___x_9548_; 
v___x_9548_ = l_Lean_Meta_Grind_Arith_CommRing_mkSVarCore___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__0(v_e_9520_, v___y_9521_, v___y_9522_, v___y_9523_, v___y_9524_, v___y_9525_, v___y_9526_, v___y_9527_, v___y_9528_, v___y_9529_, v___y_9530_, v___y_9531_);
return v___x_9548_;
}
}
else
{
lean_object* v_a_9549_; lean_object* v___x_9551_; uint8_t v_isShared_9552_; uint8_t v_isSharedCheck_9556_; 
lean_dec(v___y_9531_);
lean_dec_ref(v___y_9530_);
lean_dec(v___y_9529_);
lean_dec_ref(v___y_9528_);
lean_dec(v___y_9527_);
lean_dec_ref(v___y_9526_);
lean_dec(v___y_9525_);
lean_dec_ref(v___y_9524_);
lean_dec(v___y_9523_);
lean_dec(v___y_9522_);
lean_dec(v___y_9521_);
lean_dec_ref(v_e_9520_);
v_a_9549_ = lean_ctor_get(v___x_9533_, 0);
v_isSharedCheck_9556_ = !lean_is_exclusive(v___x_9533_);
if (v_isSharedCheck_9556_ == 0)
{
v___x_9551_ = v___x_9533_;
v_isShared_9552_ = v_isSharedCheck_9556_;
goto v_resetjp_9550_;
}
else
{
lean_inc(v_a_9549_);
lean_dec(v___x_9533_);
v___x_9551_ = lean_box(0);
v_isShared_9552_ = v_isSharedCheck_9556_;
goto v_resetjp_9550_;
}
v_resetjp_9550_:
{
lean_object* v___x_9554_; 
if (v_isShared_9552_ == 0)
{
v___x_9554_ = v___x_9551_;
goto v_reusejp_9553_;
}
else
{
lean_object* v_reuseFailAlloc_9555_; 
v_reuseFailAlloc_9555_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9555_, 0, v_a_9549_);
v___x_9554_ = v_reuseFailAlloc_9555_;
goto v_reusejp_9553_;
}
v_reusejp_9553_:
{
return v___x_9554_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___lam__0___boxed(lean_object* v_e_9557_, lean_object* v___y_9558_, lean_object* v___y_9559_, lean_object* v___y_9560_, lean_object* v___y_9561_, lean_object* v___y_9562_, lean_object* v___y_9563_, lean_object* v___y_9564_, lean_object* v___y_9565_, lean_object* v___y_9566_, lean_object* v___y_9567_, lean_object* v___y_9568_, lean_object* v___y_9569_){
_start:
{
lean_object* v_res_9570_; 
v_res_9570_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___lam__0(v_e_9557_, v___y_9558_, v___y_9559_, v___y_9560_, v___y_9561_, v___y_9562_, v___y_9563_, v___y_9564_, v___y_9565_, v___y_9566_, v___y_9567_, v___y_9568_);
return v_res_9570_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2(lean_object* v_type_9571_, lean_object* v_u_9572_, lean_object* v_instDeclName_9573_, lean_object* v_declName_9574_, lean_object* v_expectedInst_9575_, lean_object* v___y_9576_, lean_object* v___y_9577_, lean_object* v___y_9578_, lean_object* v___y_9579_, lean_object* v___y_9580_, lean_object* v___y_9581_, lean_object* v___y_9582_, lean_object* v___y_9583_, lean_object* v___y_9584_, lean_object* v___y_9585_, lean_object* v___y_9586_){
_start:
{
lean_object* v___x_9588_; lean_object* v___x_9589_; lean_object* v___x_9590_; lean_object* v___x_9591_; lean_object* v___x_9592_; lean_object* v___x_9593_; lean_object* v___x_9594_; 
v___x_9588_ = lean_box(0);
lean_inc(v_u_9572_);
v___x_9589_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_9589_, 0, v_u_9572_);
lean_ctor_set(v___x_9589_, 1, v___x_9588_);
lean_inc(v_u_9572_);
v___x_9590_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_9590_, 0, v_u_9572_);
lean_ctor_set(v___x_9590_, 1, v___x_9589_);
v___x_9591_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_9591_, 0, v_u_9572_);
lean_ctor_set(v___x_9591_, 1, v___x_9590_);
lean_inc_ref(v___x_9591_);
v___x_9592_ = l_Lean_mkConst(v_instDeclName_9573_, v___x_9591_);
lean_inc_ref_n(v_type_9571_, 3);
v___x_9593_ = l_Lean_mkApp3(v___x_9592_, v_type_9571_, v_type_9571_, v_type_9571_);
lean_inc(v___y_9586_);
lean_inc_ref(v___y_9585_);
lean_inc(v___y_9584_);
lean_inc_ref(v___y_9583_);
v___x_9594_ = l_Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3(v___x_9593_, v___y_9576_, v___y_9577_, v___y_9578_, v___y_9579_, v___y_9580_, v___y_9581_, v___y_9582_, v___y_9583_, v___y_9584_, v___y_9585_, v___y_9586_);
if (lean_obj_tag(v___x_9594_) == 0)
{
lean_object* v_a_9595_; lean_object* v___x_9596_; 
v_a_9595_ = lean_ctor_get(v___x_9594_, 0);
lean_inc(v_a_9595_);
lean_dec_ref(v___x_9594_);
lean_inc(v___y_9586_);
lean_inc_ref(v___y_9585_);
lean_inc(v___y_9584_);
lean_inc_ref(v___y_9583_);
lean_inc(v_a_9595_);
lean_inc(v_declName_9574_);
v___x_9596_ = l_Lean_Meta_Grind_Arith_CommRing_checkInst(v_declName_9574_, v_a_9595_, v_expectedInst_9575_, v___y_9583_, v___y_9584_, v___y_9585_, v___y_9586_);
if (lean_obj_tag(v___x_9596_) == 0)
{
lean_object* v___x_9597_; lean_object* v___x_9598_; lean_object* v___x_9599_; 
lean_dec_ref(v___x_9596_);
v___x_9597_ = l_Lean_mkConst(v_declName_9574_, v___x_9591_);
lean_inc_ref_n(v_type_9571_, 2);
v___x_9598_ = l_Lean_mkApp4(v___x_9597_, v_type_9571_, v_type_9571_, v_type_9571_, v_a_9595_);
lean_inc(v___y_9582_);
v___x_9599_ = lean_grind_canon(v___x_9598_, v___y_9577_, v___y_9578_, v___y_9579_, v___y_9580_, v___y_9581_, v___y_9582_, v___y_9583_, v___y_9584_, v___y_9585_, v___y_9586_);
if (lean_obj_tag(v___x_9599_) == 0)
{
lean_object* v_a_9600_; lean_object* v___x_9601_; 
v_a_9600_ = lean_ctor_get(v___x_9599_, 0);
lean_inc(v_a_9600_);
lean_dec_ref(v___x_9599_);
v___x_9601_ = l_Lean_Meta_Sym_shareCommon___redArg(v_a_9600_, v___y_9582_);
lean_dec(v___y_9582_);
return v___x_9601_;
}
else
{
lean_dec(v___y_9582_);
return v___x_9599_;
}
}
else
{
lean_object* v_a_9602_; lean_object* v___x_9604_; uint8_t v_isShared_9605_; uint8_t v_isSharedCheck_9609_; 
lean_dec(v_a_9595_);
lean_dec_ref(v___x_9591_);
lean_dec(v___y_9586_);
lean_dec_ref(v___y_9585_);
lean_dec(v___y_9584_);
lean_dec_ref(v___y_9583_);
lean_dec(v___y_9582_);
lean_dec_ref(v___y_9581_);
lean_dec(v___y_9580_);
lean_dec_ref(v___y_9579_);
lean_dec(v___y_9578_);
lean_dec(v___y_9577_);
lean_dec(v_declName_9574_);
lean_dec_ref(v_type_9571_);
v_a_9602_ = lean_ctor_get(v___x_9596_, 0);
v_isSharedCheck_9609_ = !lean_is_exclusive(v___x_9596_);
if (v_isSharedCheck_9609_ == 0)
{
v___x_9604_ = v___x_9596_;
v_isShared_9605_ = v_isSharedCheck_9609_;
goto v_resetjp_9603_;
}
else
{
lean_inc(v_a_9602_);
lean_dec(v___x_9596_);
v___x_9604_ = lean_box(0);
v_isShared_9605_ = v_isSharedCheck_9609_;
goto v_resetjp_9603_;
}
v_resetjp_9603_:
{
lean_object* v___x_9607_; 
if (v_isShared_9605_ == 0)
{
v___x_9607_ = v___x_9604_;
goto v_reusejp_9606_;
}
else
{
lean_object* v_reuseFailAlloc_9608_; 
v_reuseFailAlloc_9608_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9608_, 0, v_a_9602_);
v___x_9607_ = v_reuseFailAlloc_9608_;
goto v_reusejp_9606_;
}
v_reusejp_9606_:
{
return v___x_9607_;
}
}
}
}
else
{
lean_dec_ref(v___x_9591_);
lean_dec(v___y_9586_);
lean_dec_ref(v___y_9585_);
lean_dec(v___y_9584_);
lean_dec_ref(v___y_9583_);
lean_dec(v___y_9582_);
lean_dec_ref(v___y_9581_);
lean_dec(v___y_9580_);
lean_dec_ref(v___y_9579_);
lean_dec(v___y_9578_);
lean_dec(v___y_9577_);
lean_dec_ref(v_expectedInst_9575_);
lean_dec(v_declName_9574_);
lean_dec_ref(v_type_9571_);
return v___x_9594_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2___boxed(lean_object** _args){
lean_object* v_type_9610_ = _args[0];
lean_object* v_u_9611_ = _args[1];
lean_object* v_instDeclName_9612_ = _args[2];
lean_object* v_declName_9613_ = _args[3];
lean_object* v_expectedInst_9614_ = _args[4];
lean_object* v___y_9615_ = _args[5];
lean_object* v___y_9616_ = _args[6];
lean_object* v___y_9617_ = _args[7];
lean_object* v___y_9618_ = _args[8];
lean_object* v___y_9619_ = _args[9];
lean_object* v___y_9620_ = _args[10];
lean_object* v___y_9621_ = _args[11];
lean_object* v___y_9622_ = _args[12];
lean_object* v___y_9623_ = _args[13];
lean_object* v___y_9624_ = _args[14];
lean_object* v___y_9625_ = _args[15];
lean_object* v___y_9626_ = _args[16];
_start:
{
lean_object* v_res_9627_; 
v_res_9627_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2(v_type_9610_, v_u_9611_, v_instDeclName_9612_, v_declName_9613_, v_expectedInst_9614_, v___y_9615_, v___y_9616_, v___y_9617_, v___y_9618_, v___y_9619_, v___y_9620_, v___y_9621_, v___y_9622_, v___y_9623_, v___y_9624_, v___y_9625_);
lean_dec(v___y_9615_);
return v_res_9627_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1___lam__0(lean_object* v_a_9628_, lean_object* v_s_9629_){
_start:
{
lean_object* v_id_9630_; lean_object* v_type_9631_; lean_object* v_u_9632_; lean_object* v_semiringInst_9633_; lean_object* v_mulFn_x3f_9634_; lean_object* v_powFn_x3f_9635_; lean_object* v_natCastFn_x3f_9636_; lean_object* v_denote_9637_; lean_object* v_vars_9638_; lean_object* v_varMap_9639_; lean_object* v___x_9641_; uint8_t v_isShared_9642_; uint8_t v_isSharedCheck_9647_; 
v_id_9630_ = lean_ctor_get(v_s_9629_, 0);
v_type_9631_ = lean_ctor_get(v_s_9629_, 1);
v_u_9632_ = lean_ctor_get(v_s_9629_, 2);
v_semiringInst_9633_ = lean_ctor_get(v_s_9629_, 3);
v_mulFn_x3f_9634_ = lean_ctor_get(v_s_9629_, 5);
v_powFn_x3f_9635_ = lean_ctor_get(v_s_9629_, 6);
v_natCastFn_x3f_9636_ = lean_ctor_get(v_s_9629_, 7);
v_denote_9637_ = lean_ctor_get(v_s_9629_, 8);
v_vars_9638_ = lean_ctor_get(v_s_9629_, 9);
v_varMap_9639_ = lean_ctor_get(v_s_9629_, 10);
v_isSharedCheck_9647_ = !lean_is_exclusive(v_s_9629_);
if (v_isSharedCheck_9647_ == 0)
{
lean_object* v_unused_9648_; 
v_unused_9648_ = lean_ctor_get(v_s_9629_, 4);
lean_dec(v_unused_9648_);
v___x_9641_ = v_s_9629_;
v_isShared_9642_ = v_isSharedCheck_9647_;
goto v_resetjp_9640_;
}
else
{
lean_inc(v_varMap_9639_);
lean_inc(v_vars_9638_);
lean_inc(v_denote_9637_);
lean_inc(v_natCastFn_x3f_9636_);
lean_inc(v_powFn_x3f_9635_);
lean_inc(v_mulFn_x3f_9634_);
lean_inc(v_semiringInst_9633_);
lean_inc(v_u_9632_);
lean_inc(v_type_9631_);
lean_inc(v_id_9630_);
lean_dec(v_s_9629_);
v___x_9641_ = lean_box(0);
v_isShared_9642_ = v_isSharedCheck_9647_;
goto v_resetjp_9640_;
}
v_resetjp_9640_:
{
lean_object* v___x_9643_; lean_object* v___x_9645_; 
v___x_9643_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_9643_, 0, v_a_9628_);
if (v_isShared_9642_ == 0)
{
lean_ctor_set(v___x_9641_, 4, v___x_9643_);
v___x_9645_ = v___x_9641_;
goto v_reusejp_9644_;
}
else
{
lean_object* v_reuseFailAlloc_9646_; 
v_reuseFailAlloc_9646_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_9646_, 0, v_id_9630_);
lean_ctor_set(v_reuseFailAlloc_9646_, 1, v_type_9631_);
lean_ctor_set(v_reuseFailAlloc_9646_, 2, v_u_9632_);
lean_ctor_set(v_reuseFailAlloc_9646_, 3, v_semiringInst_9633_);
lean_ctor_set(v_reuseFailAlloc_9646_, 4, v___x_9643_);
lean_ctor_set(v_reuseFailAlloc_9646_, 5, v_mulFn_x3f_9634_);
lean_ctor_set(v_reuseFailAlloc_9646_, 6, v_powFn_x3f_9635_);
lean_ctor_set(v_reuseFailAlloc_9646_, 7, v_natCastFn_x3f_9636_);
lean_ctor_set(v_reuseFailAlloc_9646_, 8, v_denote_9637_);
lean_ctor_set(v_reuseFailAlloc_9646_, 9, v_vars_9638_);
lean_ctor_set(v_reuseFailAlloc_9646_, 10, v_varMap_9639_);
v___x_9645_ = v_reuseFailAlloc_9646_;
goto v_reusejp_9644_;
}
v_reusejp_9644_:
{
return v___x_9645_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1(lean_object* v___y_9649_, lean_object* v___y_9650_, lean_object* v___y_9651_, lean_object* v___y_9652_, lean_object* v___y_9653_, lean_object* v___y_9654_, lean_object* v___y_9655_, lean_object* v___y_9656_, lean_object* v___y_9657_, lean_object* v___y_9658_, lean_object* v___y_9659_){
_start:
{
lean_object* v___x_9661_; 
v___x_9661_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_getSemiring(v___y_9649_, v___y_9650_, v___y_9651_, v___y_9652_, v___y_9653_, v___y_9654_, v___y_9655_, v___y_9656_, v___y_9657_, v___y_9658_, v___y_9659_);
if (lean_obj_tag(v___x_9661_) == 0)
{
lean_object* v_a_9662_; lean_object* v___x_9664_; uint8_t v_isShared_9665_; uint8_t v_isSharedCheck_9704_; 
v_a_9662_ = lean_ctor_get(v___x_9661_, 0);
v_isSharedCheck_9704_ = !lean_is_exclusive(v___x_9661_);
if (v_isSharedCheck_9704_ == 0)
{
v___x_9664_ = v___x_9661_;
v_isShared_9665_ = v_isSharedCheck_9704_;
goto v_resetjp_9663_;
}
else
{
lean_inc(v_a_9662_);
lean_dec(v___x_9661_);
v___x_9664_ = lean_box(0);
v_isShared_9665_ = v_isSharedCheck_9704_;
goto v_resetjp_9663_;
}
v_resetjp_9663_:
{
lean_object* v_addFn_x3f_9666_; 
v_addFn_x3f_9666_ = lean_ctor_get(v_a_9662_, 4);
if (lean_obj_tag(v_addFn_x3f_9666_) == 1)
{
lean_object* v_val_9667_; lean_object* v___x_9669_; 
lean_inc_ref(v_addFn_x3f_9666_);
lean_dec(v_a_9662_);
lean_dec(v___y_9659_);
lean_dec_ref(v___y_9658_);
lean_dec(v___y_9657_);
lean_dec_ref(v___y_9656_);
lean_dec(v___y_9655_);
lean_dec_ref(v___y_9654_);
lean_dec(v___y_9653_);
lean_dec_ref(v___y_9652_);
lean_dec(v___y_9651_);
lean_dec(v___y_9650_);
lean_dec(v___y_9649_);
v_val_9667_ = lean_ctor_get(v_addFn_x3f_9666_, 0);
lean_inc(v_val_9667_);
lean_dec_ref(v_addFn_x3f_9666_);
if (v_isShared_9665_ == 0)
{
lean_ctor_set(v___x_9664_, 0, v_val_9667_);
v___x_9669_ = v___x_9664_;
goto v_reusejp_9668_;
}
else
{
lean_object* v_reuseFailAlloc_9670_; 
v_reuseFailAlloc_9670_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9670_, 0, v_val_9667_);
v___x_9669_ = v_reuseFailAlloc_9670_;
goto v_reusejp_9668_;
}
v_reusejp_9668_:
{
return v___x_9669_;
}
}
else
{
lean_object* v_type_9671_; lean_object* v_u_9672_; lean_object* v_semiringInst_9673_; lean_object* v___x_9674_; lean_object* v___x_9675_; lean_object* v___x_9676_; lean_object* v___x_9677_; lean_object* v___x_9678_; lean_object* v___x_9679_; lean_object* v___x_9680_; lean_object* v_expectedInst_9681_; lean_object* v___x_9682_; lean_object* v___x_9683_; lean_object* v___x_9684_; 
lean_del_object(v___x_9664_);
v_type_9671_ = lean_ctor_get(v_a_9662_, 1);
lean_inc_ref(v_type_9671_);
v_u_9672_ = lean_ctor_get(v_a_9662_, 2);
lean_inc(v_u_9672_);
v_semiringInst_9673_ = lean_ctor_get(v_a_9662_, 3);
lean_inc_ref(v_semiringInst_9673_);
lean_dec(v_a_9662_);
v___x_9674_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__1));
v___x_9675_ = lean_box(0);
lean_inc(v_u_9672_);
v___x_9676_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_9676_, 0, v_u_9672_);
lean_ctor_set(v___x_9676_, 1, v___x_9675_);
lean_inc_ref(v___x_9676_);
v___x_9677_ = l_Lean_mkConst(v___x_9674_, v___x_9676_);
v___x_9678_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__3));
v___x_9679_ = l_Lean_mkConst(v___x_9678_, v___x_9676_);
lean_inc_ref(v_type_9671_);
v___x_9680_ = l_Lean_mkAppB(v___x_9679_, v_type_9671_, v_semiringInst_9673_);
lean_inc_ref(v_type_9671_);
v_expectedInst_9681_ = l_Lean_mkAppB(v___x_9677_, v_type_9671_, v___x_9680_);
v___x_9682_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn___at___00Lean_Meta_Grind_Arith_CommRing_isAddInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__1_spec__4___closed__4));
v___x_9683_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
lean_inc(v___y_9650_);
v___x_9684_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2(v_type_9671_, v_u_9672_, v___x_9682_, v___x_9683_, v_expectedInst_9681_, v___y_9649_, v___y_9650_, v___y_9651_, v___y_9652_, v___y_9653_, v___y_9654_, v___y_9655_, v___y_9656_, v___y_9657_, v___y_9658_, v___y_9659_);
if (lean_obj_tag(v___x_9684_) == 0)
{
lean_object* v_a_9685_; lean_object* v___f_9686_; lean_object* v___x_9687_; 
v_a_9685_ = lean_ctor_get(v___x_9684_, 0);
lean_inc(v_a_9685_);
lean_dec_ref(v___x_9684_);
lean_inc(v_a_9685_);
v___f_9686_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1___lam__0), 2, 1);
lean_closure_set(v___f_9686_, 0, v_a_9685_);
v___x_9687_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_modifySemiring___redArg(v___f_9686_, v___y_9649_, v___y_9650_);
lean_dec(v___y_9650_);
if (lean_obj_tag(v___x_9687_) == 0)
{
lean_object* v___x_9689_; uint8_t v_isShared_9690_; uint8_t v_isSharedCheck_9694_; 
v_isSharedCheck_9694_ = !lean_is_exclusive(v___x_9687_);
if (v_isSharedCheck_9694_ == 0)
{
lean_object* v_unused_9695_; 
v_unused_9695_ = lean_ctor_get(v___x_9687_, 0);
lean_dec(v_unused_9695_);
v___x_9689_ = v___x_9687_;
v_isShared_9690_ = v_isSharedCheck_9694_;
goto v_resetjp_9688_;
}
else
{
lean_dec(v___x_9687_);
v___x_9689_ = lean_box(0);
v_isShared_9690_ = v_isSharedCheck_9694_;
goto v_resetjp_9688_;
}
v_resetjp_9688_:
{
lean_object* v___x_9692_; 
if (v_isShared_9690_ == 0)
{
lean_ctor_set(v___x_9689_, 0, v_a_9685_);
v___x_9692_ = v___x_9689_;
goto v_reusejp_9691_;
}
else
{
lean_object* v_reuseFailAlloc_9693_; 
v_reuseFailAlloc_9693_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9693_, 0, v_a_9685_);
v___x_9692_ = v_reuseFailAlloc_9693_;
goto v_reusejp_9691_;
}
v_reusejp_9691_:
{
return v___x_9692_;
}
}
}
else
{
lean_object* v_a_9696_; lean_object* v___x_9698_; uint8_t v_isShared_9699_; uint8_t v_isSharedCheck_9703_; 
lean_dec(v_a_9685_);
v_a_9696_ = lean_ctor_get(v___x_9687_, 0);
v_isSharedCheck_9703_ = !lean_is_exclusive(v___x_9687_);
if (v_isSharedCheck_9703_ == 0)
{
v___x_9698_ = v___x_9687_;
v_isShared_9699_ = v_isSharedCheck_9703_;
goto v_resetjp_9697_;
}
else
{
lean_inc(v_a_9696_);
lean_dec(v___x_9687_);
v___x_9698_ = lean_box(0);
v_isShared_9699_ = v_isSharedCheck_9703_;
goto v_resetjp_9697_;
}
v_resetjp_9697_:
{
lean_object* v___x_9701_; 
if (v_isShared_9699_ == 0)
{
v___x_9701_ = v___x_9698_;
goto v_reusejp_9700_;
}
else
{
lean_object* v_reuseFailAlloc_9702_; 
v_reuseFailAlloc_9702_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9702_, 0, v_a_9696_);
v___x_9701_ = v_reuseFailAlloc_9702_;
goto v_reusejp_9700_;
}
v_reusejp_9700_:
{
return v___x_9701_;
}
}
}
}
else
{
lean_dec(v___y_9650_);
lean_dec(v___y_9649_);
return v___x_9684_;
}
}
}
}
else
{
lean_object* v_a_9705_; lean_object* v___x_9707_; uint8_t v_isShared_9708_; uint8_t v_isSharedCheck_9712_; 
lean_dec(v___y_9659_);
lean_dec_ref(v___y_9658_);
lean_dec(v___y_9657_);
lean_dec_ref(v___y_9656_);
lean_dec(v___y_9655_);
lean_dec_ref(v___y_9654_);
lean_dec(v___y_9653_);
lean_dec_ref(v___y_9652_);
lean_dec(v___y_9651_);
lean_dec(v___y_9650_);
lean_dec(v___y_9649_);
v_a_9705_ = lean_ctor_get(v___x_9661_, 0);
v_isSharedCheck_9712_ = !lean_is_exclusive(v___x_9661_);
if (v_isSharedCheck_9712_ == 0)
{
v___x_9707_ = v___x_9661_;
v_isShared_9708_ = v_isSharedCheck_9712_;
goto v_resetjp_9706_;
}
else
{
lean_inc(v_a_9705_);
lean_dec(v___x_9661_);
v___x_9707_ = lean_box(0);
v_isShared_9708_ = v_isSharedCheck_9712_;
goto v_resetjp_9706_;
}
v_resetjp_9706_:
{
lean_object* v___x_9710_; 
if (v_isShared_9708_ == 0)
{
v___x_9710_ = v___x_9707_;
goto v_reusejp_9709_;
}
else
{
lean_object* v_reuseFailAlloc_9711_; 
v_reuseFailAlloc_9711_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9711_, 0, v_a_9705_);
v___x_9710_ = v_reuseFailAlloc_9711_;
goto v_reusejp_9709_;
}
v_reusejp_9709_:
{
return v___x_9710_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1___boxed(lean_object* v___y_9713_, lean_object* v___y_9714_, lean_object* v___y_9715_, lean_object* v___y_9716_, lean_object* v___y_9717_, lean_object* v___y_9718_, lean_object* v___y_9719_, lean_object* v___y_9720_, lean_object* v___y_9721_, lean_object* v___y_9722_, lean_object* v___y_9723_, lean_object* v___y_9724_){
_start:
{
lean_object* v_res_9725_; 
v_res_9725_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1(v___y_9713_, v___y_9714_, v___y_9715_, v___y_9716_, v___y_9717_, v___y_9718_, v___y_9719_, v___y_9720_, v___y_9721_, v___y_9722_, v___y_9723_);
return v_res_9725_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__3___lam__0(lean_object* v_a_9726_, lean_object* v_s_9727_){
_start:
{
lean_object* v_id_9728_; lean_object* v_type_9729_; lean_object* v_u_9730_; lean_object* v_semiringInst_9731_; lean_object* v_addFn_x3f_9732_; lean_object* v_powFn_x3f_9733_; lean_object* v_natCastFn_x3f_9734_; lean_object* v_denote_9735_; lean_object* v_vars_9736_; lean_object* v_varMap_9737_; lean_object* v___x_9739_; uint8_t v_isShared_9740_; uint8_t v_isSharedCheck_9745_; 
v_id_9728_ = lean_ctor_get(v_s_9727_, 0);
v_type_9729_ = lean_ctor_get(v_s_9727_, 1);
v_u_9730_ = lean_ctor_get(v_s_9727_, 2);
v_semiringInst_9731_ = lean_ctor_get(v_s_9727_, 3);
v_addFn_x3f_9732_ = lean_ctor_get(v_s_9727_, 4);
v_powFn_x3f_9733_ = lean_ctor_get(v_s_9727_, 6);
v_natCastFn_x3f_9734_ = lean_ctor_get(v_s_9727_, 7);
v_denote_9735_ = lean_ctor_get(v_s_9727_, 8);
v_vars_9736_ = lean_ctor_get(v_s_9727_, 9);
v_varMap_9737_ = lean_ctor_get(v_s_9727_, 10);
v_isSharedCheck_9745_ = !lean_is_exclusive(v_s_9727_);
if (v_isSharedCheck_9745_ == 0)
{
lean_object* v_unused_9746_; 
v_unused_9746_ = lean_ctor_get(v_s_9727_, 5);
lean_dec(v_unused_9746_);
v___x_9739_ = v_s_9727_;
v_isShared_9740_ = v_isSharedCheck_9745_;
goto v_resetjp_9738_;
}
else
{
lean_inc(v_varMap_9737_);
lean_inc(v_vars_9736_);
lean_inc(v_denote_9735_);
lean_inc(v_natCastFn_x3f_9734_);
lean_inc(v_powFn_x3f_9733_);
lean_inc(v_addFn_x3f_9732_);
lean_inc(v_semiringInst_9731_);
lean_inc(v_u_9730_);
lean_inc(v_type_9729_);
lean_inc(v_id_9728_);
lean_dec(v_s_9727_);
v___x_9739_ = lean_box(0);
v_isShared_9740_ = v_isSharedCheck_9745_;
goto v_resetjp_9738_;
}
v_resetjp_9738_:
{
lean_object* v___x_9741_; lean_object* v___x_9743_; 
v___x_9741_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_9741_, 0, v_a_9726_);
if (v_isShared_9740_ == 0)
{
lean_ctor_set(v___x_9739_, 5, v___x_9741_);
v___x_9743_ = v___x_9739_;
goto v_reusejp_9742_;
}
else
{
lean_object* v_reuseFailAlloc_9744_; 
v_reuseFailAlloc_9744_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_9744_, 0, v_id_9728_);
lean_ctor_set(v_reuseFailAlloc_9744_, 1, v_type_9729_);
lean_ctor_set(v_reuseFailAlloc_9744_, 2, v_u_9730_);
lean_ctor_set(v_reuseFailAlloc_9744_, 3, v_semiringInst_9731_);
lean_ctor_set(v_reuseFailAlloc_9744_, 4, v_addFn_x3f_9732_);
lean_ctor_set(v_reuseFailAlloc_9744_, 5, v___x_9741_);
lean_ctor_set(v_reuseFailAlloc_9744_, 6, v_powFn_x3f_9733_);
lean_ctor_set(v_reuseFailAlloc_9744_, 7, v_natCastFn_x3f_9734_);
lean_ctor_set(v_reuseFailAlloc_9744_, 8, v_denote_9735_);
lean_ctor_set(v_reuseFailAlloc_9744_, 9, v_vars_9736_);
lean_ctor_set(v_reuseFailAlloc_9744_, 10, v_varMap_9737_);
v___x_9743_ = v_reuseFailAlloc_9744_;
goto v_reusejp_9742_;
}
v_reusejp_9742_:
{
return v___x_9743_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__3(lean_object* v___y_9747_, lean_object* v___y_9748_, lean_object* v___y_9749_, lean_object* v___y_9750_, lean_object* v___y_9751_, lean_object* v___y_9752_, lean_object* v___y_9753_, lean_object* v___y_9754_, lean_object* v___y_9755_, lean_object* v___y_9756_, lean_object* v___y_9757_){
_start:
{
lean_object* v___x_9759_; 
v___x_9759_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_getSemiring(v___y_9747_, v___y_9748_, v___y_9749_, v___y_9750_, v___y_9751_, v___y_9752_, v___y_9753_, v___y_9754_, v___y_9755_, v___y_9756_, v___y_9757_);
if (lean_obj_tag(v___x_9759_) == 0)
{
lean_object* v_a_9760_; lean_object* v___x_9762_; uint8_t v_isShared_9763_; uint8_t v_isSharedCheck_9802_; 
v_a_9760_ = lean_ctor_get(v___x_9759_, 0);
v_isSharedCheck_9802_ = !lean_is_exclusive(v___x_9759_);
if (v_isSharedCheck_9802_ == 0)
{
v___x_9762_ = v___x_9759_;
v_isShared_9763_ = v_isSharedCheck_9802_;
goto v_resetjp_9761_;
}
else
{
lean_inc(v_a_9760_);
lean_dec(v___x_9759_);
v___x_9762_ = lean_box(0);
v_isShared_9763_ = v_isSharedCheck_9802_;
goto v_resetjp_9761_;
}
v_resetjp_9761_:
{
lean_object* v_mulFn_x3f_9764_; 
v_mulFn_x3f_9764_ = lean_ctor_get(v_a_9760_, 5);
if (lean_obj_tag(v_mulFn_x3f_9764_) == 1)
{
lean_object* v_val_9765_; lean_object* v___x_9767_; 
lean_inc_ref(v_mulFn_x3f_9764_);
lean_dec(v_a_9760_);
lean_dec(v___y_9757_);
lean_dec_ref(v___y_9756_);
lean_dec(v___y_9755_);
lean_dec_ref(v___y_9754_);
lean_dec(v___y_9753_);
lean_dec_ref(v___y_9752_);
lean_dec(v___y_9751_);
lean_dec_ref(v___y_9750_);
lean_dec(v___y_9749_);
lean_dec(v___y_9748_);
lean_dec(v___y_9747_);
v_val_9765_ = lean_ctor_get(v_mulFn_x3f_9764_, 0);
lean_inc(v_val_9765_);
lean_dec_ref(v_mulFn_x3f_9764_);
if (v_isShared_9763_ == 0)
{
lean_ctor_set(v___x_9762_, 0, v_val_9765_);
v___x_9767_ = v___x_9762_;
goto v_reusejp_9766_;
}
else
{
lean_object* v_reuseFailAlloc_9768_; 
v_reuseFailAlloc_9768_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9768_, 0, v_val_9765_);
v___x_9767_ = v_reuseFailAlloc_9768_;
goto v_reusejp_9766_;
}
v_reusejp_9766_:
{
return v___x_9767_;
}
}
else
{
lean_object* v_type_9769_; lean_object* v_u_9770_; lean_object* v_semiringInst_9771_; lean_object* v___x_9772_; lean_object* v___x_9773_; lean_object* v___x_9774_; lean_object* v___x_9775_; lean_object* v___x_9776_; lean_object* v___x_9777_; lean_object* v___x_9778_; lean_object* v_expectedInst_9779_; lean_object* v___x_9780_; lean_object* v___x_9781_; lean_object* v___x_9782_; 
lean_del_object(v___x_9762_);
v_type_9769_ = lean_ctor_get(v_a_9760_, 1);
lean_inc_ref(v_type_9769_);
v_u_9770_ = lean_ctor_get(v_a_9760_, 2);
lean_inc(v_u_9770_);
v_semiringInst_9771_ = lean_ctor_get(v_a_9760_, 3);
lean_inc_ref(v_semiringInst_9771_);
lean_dec(v_a_9760_);
v___x_9772_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__1));
v___x_9773_ = lean_box(0);
lean_inc(v_u_9770_);
v___x_9774_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_9774_, 0, v_u_9770_);
lean_ctor_set(v___x_9774_, 1, v___x_9773_);
lean_inc_ref(v___x_9774_);
v___x_9775_ = l_Lean_mkConst(v___x_9772_, v___x_9774_);
v___x_9776_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__6));
v___x_9777_ = l_Lean_mkConst(v___x_9776_, v___x_9774_);
lean_inc_ref(v_type_9769_);
v___x_9778_ = l_Lean_mkAppB(v___x_9777_, v_type_9769_, v_semiringInst_9771_);
lean_inc_ref(v_type_9769_);
v_expectedInst_9779_ = l_Lean_mkAppB(v___x_9775_, v_type_9769_, v___x_9778_);
v___x_9780_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn___at___00Lean_Meta_Grind_Arith_CommRing_isMulInst___at___00Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_reify_x3f_spec__0_spec__3_spec__7___closed__7));
v___x_9781_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
lean_inc(v___y_9748_);
v___x_9782_ = l_Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2(v_type_9769_, v_u_9770_, v___x_9780_, v___x_9781_, v_expectedInst_9779_, v___y_9747_, v___y_9748_, v___y_9749_, v___y_9750_, v___y_9751_, v___y_9752_, v___y_9753_, v___y_9754_, v___y_9755_, v___y_9756_, v___y_9757_);
if (lean_obj_tag(v___x_9782_) == 0)
{
lean_object* v_a_9783_; lean_object* v___f_9784_; lean_object* v___x_9785_; 
v_a_9783_ = lean_ctor_get(v___x_9782_, 0);
lean_inc(v_a_9783_);
lean_dec_ref(v___x_9782_);
lean_inc(v_a_9783_);
v___f_9784_ = lean_alloc_closure((void*)(l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__3___lam__0), 2, 1);
lean_closure_set(v___f_9784_, 0, v_a_9783_);
v___x_9785_ = l_Lean_Meta_Grind_Arith_CommRing_NonCommSemiringM_modifySemiring___redArg(v___f_9784_, v___y_9747_, v___y_9748_);
lean_dec(v___y_9748_);
if (lean_obj_tag(v___x_9785_) == 0)
{
lean_object* v___x_9787_; uint8_t v_isShared_9788_; uint8_t v_isSharedCheck_9792_; 
v_isSharedCheck_9792_ = !lean_is_exclusive(v___x_9785_);
if (v_isSharedCheck_9792_ == 0)
{
lean_object* v_unused_9793_; 
v_unused_9793_ = lean_ctor_get(v___x_9785_, 0);
lean_dec(v_unused_9793_);
v___x_9787_ = v___x_9785_;
v_isShared_9788_ = v_isSharedCheck_9792_;
goto v_resetjp_9786_;
}
else
{
lean_dec(v___x_9785_);
v___x_9787_ = lean_box(0);
v_isShared_9788_ = v_isSharedCheck_9792_;
goto v_resetjp_9786_;
}
v_resetjp_9786_:
{
lean_object* v___x_9790_; 
if (v_isShared_9788_ == 0)
{
lean_ctor_set(v___x_9787_, 0, v_a_9783_);
v___x_9790_ = v___x_9787_;
goto v_reusejp_9789_;
}
else
{
lean_object* v_reuseFailAlloc_9791_; 
v_reuseFailAlloc_9791_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9791_, 0, v_a_9783_);
v___x_9790_ = v_reuseFailAlloc_9791_;
goto v_reusejp_9789_;
}
v_reusejp_9789_:
{
return v___x_9790_;
}
}
}
else
{
lean_object* v_a_9794_; lean_object* v___x_9796_; uint8_t v_isShared_9797_; uint8_t v_isSharedCheck_9801_; 
lean_dec(v_a_9783_);
v_a_9794_ = lean_ctor_get(v___x_9785_, 0);
v_isSharedCheck_9801_ = !lean_is_exclusive(v___x_9785_);
if (v_isSharedCheck_9801_ == 0)
{
v___x_9796_ = v___x_9785_;
v_isShared_9797_ = v_isSharedCheck_9801_;
goto v_resetjp_9795_;
}
else
{
lean_inc(v_a_9794_);
lean_dec(v___x_9785_);
v___x_9796_ = lean_box(0);
v_isShared_9797_ = v_isSharedCheck_9801_;
goto v_resetjp_9795_;
}
v_resetjp_9795_:
{
lean_object* v___x_9799_; 
if (v_isShared_9797_ == 0)
{
v___x_9799_ = v___x_9796_;
goto v_reusejp_9798_;
}
else
{
lean_object* v_reuseFailAlloc_9800_; 
v_reuseFailAlloc_9800_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9800_, 0, v_a_9794_);
v___x_9799_ = v_reuseFailAlloc_9800_;
goto v_reusejp_9798_;
}
v_reusejp_9798_:
{
return v___x_9799_;
}
}
}
}
else
{
lean_dec(v___y_9748_);
lean_dec(v___y_9747_);
return v___x_9782_;
}
}
}
}
else
{
lean_object* v_a_9803_; lean_object* v___x_9805_; uint8_t v_isShared_9806_; uint8_t v_isSharedCheck_9810_; 
lean_dec(v___y_9757_);
lean_dec_ref(v___y_9756_);
lean_dec(v___y_9755_);
lean_dec_ref(v___y_9754_);
lean_dec(v___y_9753_);
lean_dec_ref(v___y_9752_);
lean_dec(v___y_9751_);
lean_dec_ref(v___y_9750_);
lean_dec(v___y_9749_);
lean_dec(v___y_9748_);
lean_dec(v___y_9747_);
v_a_9803_ = lean_ctor_get(v___x_9759_, 0);
v_isSharedCheck_9810_ = !lean_is_exclusive(v___x_9759_);
if (v_isSharedCheck_9810_ == 0)
{
v___x_9805_ = v___x_9759_;
v_isShared_9806_ = v_isSharedCheck_9810_;
goto v_resetjp_9804_;
}
else
{
lean_inc(v_a_9803_);
lean_dec(v___x_9759_);
v___x_9805_ = lean_box(0);
v_isShared_9806_ = v_isSharedCheck_9810_;
goto v_resetjp_9804_;
}
v_resetjp_9804_:
{
lean_object* v___x_9808_; 
if (v_isShared_9806_ == 0)
{
v___x_9808_ = v___x_9805_;
goto v_reusejp_9807_;
}
else
{
lean_object* v_reuseFailAlloc_9809_; 
v_reuseFailAlloc_9809_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9809_, 0, v_a_9803_);
v___x_9808_ = v_reuseFailAlloc_9809_;
goto v_reusejp_9807_;
}
v_reusejp_9807_:
{
return v___x_9808_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__3___boxed(lean_object* v___y_9811_, lean_object* v___y_9812_, lean_object* v___y_9813_, lean_object* v___y_9814_, lean_object* v___y_9815_, lean_object* v___y_9816_, lean_object* v___y_9817_, lean_object* v___y_9818_, lean_object* v___y_9819_, lean_object* v___y_9820_, lean_object* v___y_9821_, lean_object* v___y_9822_){
_start:
{
lean_object* v_res_9823_; 
v_res_9823_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__3(v___y_9811_, v___y_9812_, v___y_9813_, v___y_9814_, v___y_9815_, v___y_9816_, v___y_9817_, v___y_9818_, v___y_9819_, v___y_9820_, v___y_9821_);
return v_res_9823_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(lean_object* v_toVar_9824_, lean_object* v_asVar_9825_, lean_object* v_e_9826_, lean_object* v___y_9827_, lean_object* v___y_9828_, lean_object* v___y_9829_, lean_object* v___y_9830_, lean_object* v___y_9831_, lean_object* v___y_9832_, lean_object* v___y_9833_, lean_object* v___y_9834_, lean_object* v___y_9835_, lean_object* v___y_9836_, lean_object* v___y_9837_){
_start:
{
lean_object* v___x_9839_; 
lean_inc_ref(v_e_9826_);
v___x_9839_ = l_Lean_Meta_instantiateMVarsIfMVarApp___redArg(v_e_9826_, v___y_9835_);
if (lean_obj_tag(v___x_9839_) == 0)
{
lean_object* v_a_9840_; lean_object* v___x_9841_; uint8_t v___x_9842_; 
v_a_9840_ = lean_ctor_get(v___x_9839_, 0);
lean_inc(v_a_9840_);
lean_dec_ref(v___x_9839_);
v___x_9841_ = l_Lean_Expr_cleanupAnnotations(v_a_9840_);
v___x_9842_ = l_Lean_Expr_isApp(v___x_9841_);
if (v___x_9842_ == 0)
{
lean_object* v___x_9843_; 
lean_dec_ref(v___x_9841_);
lean_dec_ref(v_asVar_9825_);
v___x_9843_ = lean_apply_13(v_toVar_9824_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9843_;
}
else
{
lean_object* v_arg_9844_; lean_object* v___x_9845_; uint8_t v___x_9846_; 
v_arg_9844_ = lean_ctor_get(v___x_9841_, 1);
lean_inc_ref(v_arg_9844_);
v___x_9845_ = l_Lean_Expr_appFnCleanup___redArg(v___x_9841_);
v___x_9846_ = l_Lean_Expr_isApp(v___x_9845_);
if (v___x_9846_ == 0)
{
lean_object* v___x_9847_; 
lean_dec_ref(v___x_9845_);
lean_dec_ref(v_arg_9844_);
lean_dec_ref(v_asVar_9825_);
v___x_9847_ = lean_apply_13(v_toVar_9824_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9847_;
}
else
{
lean_object* v_arg_9848_; lean_object* v___x_9849_; uint8_t v___x_9850_; 
v_arg_9848_ = lean_ctor_get(v___x_9845_, 1);
lean_inc_ref(v_arg_9848_);
v___x_9849_ = l_Lean_Expr_appFnCleanup___redArg(v___x_9845_);
v___x_9850_ = l_Lean_Expr_isApp(v___x_9849_);
if (v___x_9850_ == 0)
{
lean_object* v___x_9851_; 
lean_dec_ref(v___x_9849_);
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_arg_9844_);
lean_dec_ref(v_asVar_9825_);
v___x_9851_ = lean_apply_13(v_toVar_9824_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9851_;
}
else
{
lean_object* v_arg_9852_; lean_object* v___x_9853_; lean_object* v___x_9854_; uint8_t v___x_9855_; 
v_arg_9852_ = lean_ctor_get(v___x_9849_, 1);
lean_inc_ref(v_arg_9852_);
v___x_9853_ = l_Lean_Expr_appFnCleanup___redArg(v___x_9849_);
v___x_9854_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_9855_ = l_Lean_Expr_isConstOf(v___x_9853_, v___x_9854_);
if (v___x_9855_ == 0)
{
lean_object* v___x_9856_; uint8_t v___x_9857_; 
v___x_9856_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_9857_ = l_Lean_Expr_isConstOf(v___x_9853_, v___x_9856_);
if (v___x_9857_ == 0)
{
uint8_t v___x_9858_; 
v___x_9858_ = l_Lean_Expr_isApp(v___x_9853_);
if (v___x_9858_ == 0)
{
lean_object* v___x_9859_; 
lean_dec_ref(v___x_9853_);
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_arg_9844_);
lean_dec_ref(v_asVar_9825_);
v___x_9859_ = lean_apply_13(v_toVar_9824_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9859_;
}
else
{
lean_object* v___x_9860_; uint8_t v___x_9861_; 
v___x_9860_ = l_Lean_Expr_appFnCleanup___redArg(v___x_9853_);
v___x_9861_ = l_Lean_Expr_isApp(v___x_9860_);
if (v___x_9861_ == 0)
{
lean_object* v___x_9862_; 
lean_dec_ref(v___x_9860_);
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_arg_9844_);
lean_dec_ref(v_asVar_9825_);
v___x_9862_ = lean_apply_13(v_toVar_9824_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9862_;
}
else
{
lean_object* v___x_9863_; uint8_t v___x_9864_; 
v___x_9863_ = l_Lean_Expr_appFnCleanup___redArg(v___x_9860_);
v___x_9864_ = l_Lean_Expr_isApp(v___x_9863_);
if (v___x_9864_ == 0)
{
lean_object* v___x_9865_; 
lean_dec_ref(v___x_9863_);
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_arg_9844_);
lean_dec_ref(v_asVar_9825_);
v___x_9865_ = lean_apply_13(v_toVar_9824_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9865_;
}
else
{
lean_object* v___x_9866_; lean_object* v___x_9867_; uint8_t v___x_9868_; 
v___x_9866_ = l_Lean_Expr_appFnCleanup___redArg(v___x_9863_);
v___x_9867_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_9868_ = l_Lean_Expr_isConstOf(v___x_9866_, v___x_9867_);
if (v___x_9868_ == 0)
{
lean_object* v___x_9869_; uint8_t v___x_9870_; 
v___x_9869_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_9870_ = l_Lean_Expr_isConstOf(v___x_9866_, v___x_9869_);
if (v___x_9870_ == 0)
{
lean_object* v___x_9871_; uint8_t v___x_9872_; 
v___x_9871_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_9872_ = l_Lean_Expr_isConstOf(v___x_9866_, v___x_9871_);
lean_dec_ref(v___x_9866_);
if (v___x_9872_ == 0)
{
lean_object* v___x_9873_; 
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_arg_9844_);
lean_dec_ref(v_asVar_9825_);
v___x_9873_ = lean_apply_13(v_toVar_9824_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9873_;
}
else
{
lean_object* v___x_9874_; 
lean_inc(v___y_9837_);
lean_inc_ref(v___y_9836_);
lean_inc(v___y_9835_);
lean_inc_ref(v___y_9834_);
lean_inc(v___y_9833_);
lean_inc_ref(v___y_9832_);
lean_inc(v___y_9831_);
lean_inc_ref(v___y_9830_);
lean_inc(v___y_9829_);
lean_inc(v___y_9828_);
lean_inc(v___y_9827_);
v___x_9874_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1(v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
if (lean_obj_tag(v___x_9874_) == 0)
{
lean_object* v_a_9875_; lean_object* v___x_9876_; uint8_t v___x_9877_; 
v_a_9875_ = lean_ctor_get(v___x_9874_, 0);
lean_inc(v_a_9875_);
lean_dec_ref(v___x_9874_);
v___x_9876_ = l_Lean_Expr_appArg_x21(v_a_9875_);
lean_dec(v_a_9875_);
v___x_9877_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_9876_, v_arg_9852_);
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v___x_9876_);
if (v___x_9877_ == 0)
{
lean_object* v___x_9878_; 
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_arg_9844_);
lean_dec_ref(v_toVar_9824_);
v___x_9878_ = lean_apply_13(v_asVar_9825_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9878_;
}
else
{
lean_object* v___x_9879_; 
lean_dec_ref(v_e_9826_);
lean_inc(v___y_9837_);
lean_inc_ref(v___y_9836_);
lean_inc(v___y_9835_);
lean_inc_ref(v___y_9834_);
lean_inc(v___y_9833_);
lean_inc_ref(v___y_9832_);
lean_inc(v___y_9831_);
lean_inc_ref(v___y_9830_);
lean_inc(v___y_9829_);
lean_inc(v___y_9828_);
lean_inc(v___y_9827_);
lean_inc_ref(v_asVar_9825_);
lean_inc_ref(v_toVar_9824_);
v___x_9879_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_9824_, v_asVar_9825_, v_arg_9848_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
if (lean_obj_tag(v___x_9879_) == 0)
{
lean_object* v_a_9880_; lean_object* v___x_9881_; 
v_a_9880_ = lean_ctor_get(v___x_9879_, 0);
lean_inc(v_a_9880_);
lean_dec_ref(v___x_9879_);
v___x_9881_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_9824_, v_asVar_9825_, v_arg_9844_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
if (lean_obj_tag(v___x_9881_) == 0)
{
lean_object* v_a_9882_; lean_object* v___x_9884_; uint8_t v_isShared_9885_; uint8_t v_isSharedCheck_9890_; 
v_a_9882_ = lean_ctor_get(v___x_9881_, 0);
v_isSharedCheck_9890_ = !lean_is_exclusive(v___x_9881_);
if (v_isSharedCheck_9890_ == 0)
{
v___x_9884_ = v___x_9881_;
v_isShared_9885_ = v_isSharedCheck_9890_;
goto v_resetjp_9883_;
}
else
{
lean_inc(v_a_9882_);
lean_dec(v___x_9881_);
v___x_9884_ = lean_box(0);
v_isShared_9885_ = v_isSharedCheck_9890_;
goto v_resetjp_9883_;
}
v_resetjp_9883_:
{
lean_object* v___x_9886_; lean_object* v___x_9888_; 
v___x_9886_ = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(v___x_9886_, 0, v_a_9880_);
lean_ctor_set(v___x_9886_, 1, v_a_9882_);
if (v_isShared_9885_ == 0)
{
lean_ctor_set(v___x_9884_, 0, v___x_9886_);
v___x_9888_ = v___x_9884_;
goto v_reusejp_9887_;
}
else
{
lean_object* v_reuseFailAlloc_9889_; 
v_reuseFailAlloc_9889_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9889_, 0, v___x_9886_);
v___x_9888_ = v_reuseFailAlloc_9889_;
goto v_reusejp_9887_;
}
v_reusejp_9887_:
{
return v___x_9888_;
}
}
}
else
{
lean_dec(v_a_9880_);
return v___x_9881_;
}
}
else
{
lean_dec_ref(v_arg_9844_);
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_asVar_9825_);
lean_dec_ref(v_toVar_9824_);
return v___x_9879_;
}
}
}
else
{
lean_object* v_a_9891_; lean_object* v___x_9893_; uint8_t v_isShared_9894_; uint8_t v_isSharedCheck_9898_; 
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_arg_9844_);
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_e_9826_);
lean_dec_ref(v_asVar_9825_);
lean_dec_ref(v_toVar_9824_);
v_a_9891_ = lean_ctor_get(v___x_9874_, 0);
v_isSharedCheck_9898_ = !lean_is_exclusive(v___x_9874_);
if (v_isSharedCheck_9898_ == 0)
{
v___x_9893_ = v___x_9874_;
v_isShared_9894_ = v_isSharedCheck_9898_;
goto v_resetjp_9892_;
}
else
{
lean_inc(v_a_9891_);
lean_dec(v___x_9874_);
v___x_9893_ = lean_box(0);
v_isShared_9894_ = v_isSharedCheck_9898_;
goto v_resetjp_9892_;
}
v_resetjp_9892_:
{
lean_object* v___x_9896_; 
if (v_isShared_9894_ == 0)
{
v___x_9896_ = v___x_9893_;
goto v_reusejp_9895_;
}
else
{
lean_object* v_reuseFailAlloc_9897_; 
v_reuseFailAlloc_9897_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9897_, 0, v_a_9891_);
v___x_9896_ = v_reuseFailAlloc_9897_;
goto v_reusejp_9895_;
}
v_reusejp_9895_:
{
return v___x_9896_;
}
}
}
}
}
else
{
lean_object* v___x_9899_; 
lean_dec_ref(v___x_9866_);
lean_inc(v___y_9837_);
lean_inc_ref(v___y_9836_);
lean_inc(v___y_9835_);
lean_inc_ref(v___y_9834_);
lean_inc(v___y_9833_);
lean_inc_ref(v___y_9832_);
lean_inc(v___y_9831_);
lean_inc_ref(v___y_9830_);
lean_inc(v___y_9829_);
lean_inc(v___y_9828_);
lean_inc(v___y_9827_);
v___x_9899_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__3(v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
if (lean_obj_tag(v___x_9899_) == 0)
{
lean_object* v_a_9900_; lean_object* v___x_9901_; uint8_t v___x_9902_; 
v_a_9900_ = lean_ctor_get(v___x_9899_, 0);
lean_inc(v_a_9900_);
lean_dec_ref(v___x_9899_);
v___x_9901_ = l_Lean_Expr_appArg_x21(v_a_9900_);
lean_dec(v_a_9900_);
v___x_9902_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_9901_, v_arg_9852_);
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v___x_9901_);
if (v___x_9902_ == 0)
{
lean_object* v___x_9903_; 
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_arg_9844_);
lean_dec_ref(v_toVar_9824_);
v___x_9903_ = lean_apply_13(v_asVar_9825_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9903_;
}
else
{
lean_object* v___x_9904_; 
lean_dec_ref(v_e_9826_);
lean_inc(v___y_9837_);
lean_inc_ref(v___y_9836_);
lean_inc(v___y_9835_);
lean_inc_ref(v___y_9834_);
lean_inc(v___y_9833_);
lean_inc_ref(v___y_9832_);
lean_inc(v___y_9831_);
lean_inc_ref(v___y_9830_);
lean_inc(v___y_9829_);
lean_inc(v___y_9828_);
lean_inc(v___y_9827_);
lean_inc_ref(v_asVar_9825_);
lean_inc_ref(v_toVar_9824_);
v___x_9904_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_9824_, v_asVar_9825_, v_arg_9848_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
if (lean_obj_tag(v___x_9904_) == 0)
{
lean_object* v_a_9905_; lean_object* v___x_9906_; 
v_a_9905_ = lean_ctor_get(v___x_9904_, 0);
lean_inc(v_a_9905_);
lean_dec_ref(v___x_9904_);
v___x_9906_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_9824_, v_asVar_9825_, v_arg_9844_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
if (lean_obj_tag(v___x_9906_) == 0)
{
lean_object* v_a_9907_; lean_object* v___x_9909_; uint8_t v_isShared_9910_; uint8_t v_isSharedCheck_9915_; 
v_a_9907_ = lean_ctor_get(v___x_9906_, 0);
v_isSharedCheck_9915_ = !lean_is_exclusive(v___x_9906_);
if (v_isSharedCheck_9915_ == 0)
{
v___x_9909_ = v___x_9906_;
v_isShared_9910_ = v_isSharedCheck_9915_;
goto v_resetjp_9908_;
}
else
{
lean_inc(v_a_9907_);
lean_dec(v___x_9906_);
v___x_9909_ = lean_box(0);
v_isShared_9910_ = v_isSharedCheck_9915_;
goto v_resetjp_9908_;
}
v_resetjp_9908_:
{
lean_object* v___x_9911_; lean_object* v___x_9913_; 
v___x_9911_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_9911_, 0, v_a_9905_);
lean_ctor_set(v___x_9911_, 1, v_a_9907_);
if (v_isShared_9910_ == 0)
{
lean_ctor_set(v___x_9909_, 0, v___x_9911_);
v___x_9913_ = v___x_9909_;
goto v_reusejp_9912_;
}
else
{
lean_object* v_reuseFailAlloc_9914_; 
v_reuseFailAlloc_9914_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9914_, 0, v___x_9911_);
v___x_9913_ = v_reuseFailAlloc_9914_;
goto v_reusejp_9912_;
}
v_reusejp_9912_:
{
return v___x_9913_;
}
}
}
else
{
lean_dec(v_a_9905_);
return v___x_9906_;
}
}
else
{
lean_dec_ref(v_arg_9844_);
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_asVar_9825_);
lean_dec_ref(v_toVar_9824_);
return v___x_9904_;
}
}
}
else
{
lean_object* v_a_9916_; lean_object* v___x_9918_; uint8_t v_isShared_9919_; uint8_t v_isSharedCheck_9923_; 
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_arg_9844_);
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_e_9826_);
lean_dec_ref(v_asVar_9825_);
lean_dec_ref(v_toVar_9824_);
v_a_9916_ = lean_ctor_get(v___x_9899_, 0);
v_isSharedCheck_9923_ = !lean_is_exclusive(v___x_9899_);
if (v_isSharedCheck_9923_ == 0)
{
v___x_9918_ = v___x_9899_;
v_isShared_9919_ = v_isSharedCheck_9923_;
goto v_resetjp_9917_;
}
else
{
lean_inc(v_a_9916_);
lean_dec(v___x_9899_);
v___x_9918_ = lean_box(0);
v_isShared_9919_ = v_isSharedCheck_9923_;
goto v_resetjp_9917_;
}
v_resetjp_9917_:
{
lean_object* v___x_9921_; 
if (v_isShared_9919_ == 0)
{
v___x_9921_ = v___x_9918_;
goto v_reusejp_9920_;
}
else
{
lean_object* v_reuseFailAlloc_9922_; 
v_reuseFailAlloc_9922_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9922_, 0, v_a_9916_);
v___x_9921_ = v_reuseFailAlloc_9922_;
goto v_reusejp_9920_;
}
v_reusejp_9920_:
{
return v___x_9921_;
}
}
}
}
}
else
{
lean_object* v___x_9924_; 
lean_dec_ref(v___x_9866_);
lean_inc(v___y_9837_);
lean_inc_ref(v___y_9836_);
lean_inc(v___y_9835_);
lean_inc_ref(v___y_9834_);
v___x_9924_ = l_Lean_Meta_getNatValue_x3f(v_arg_9844_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
lean_dec_ref(v_arg_9844_);
if (lean_obj_tag(v___x_9924_) == 0)
{
lean_object* v_a_9925_; 
v_a_9925_ = lean_ctor_get(v___x_9924_, 0);
lean_inc(v_a_9925_);
lean_dec_ref(v___x_9924_);
if (lean_obj_tag(v_a_9925_) == 1)
{
lean_object* v_val_9926_; lean_object* v___x_9927_; 
v_val_9926_ = lean_ctor_get(v_a_9925_, 0);
lean_inc(v_val_9926_);
lean_dec_ref(v_a_9925_);
lean_inc(v___y_9837_);
lean_inc_ref(v___y_9836_);
lean_inc(v___y_9835_);
lean_inc_ref(v___y_9834_);
lean_inc(v___y_9833_);
lean_inc_ref(v___y_9832_);
lean_inc(v___y_9831_);
lean_inc_ref(v___y_9830_);
lean_inc(v___y_9829_);
lean_inc(v___y_9828_);
lean_inc(v___y_9827_);
v___x_9927_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4(v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
if (lean_obj_tag(v___x_9927_) == 0)
{
lean_object* v_a_9928_; lean_object* v___x_9929_; uint8_t v___x_9930_; 
v_a_9928_ = lean_ctor_get(v___x_9927_, 0);
lean_inc(v_a_9928_);
lean_dec_ref(v___x_9927_);
v___x_9929_ = l_Lean_Expr_appArg_x21(v_a_9928_);
lean_dec(v_a_9928_);
v___x_9930_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_9929_, v_arg_9852_);
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v___x_9929_);
if (v___x_9930_ == 0)
{
lean_object* v___x_9931_; 
lean_dec(v_val_9926_);
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_toVar_9824_);
v___x_9931_ = lean_apply_13(v_asVar_9825_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9931_;
}
else
{
lean_object* v___x_9932_; 
lean_dec_ref(v_e_9826_);
v___x_9932_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_9824_, v_asVar_9825_, v_arg_9848_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
if (lean_obj_tag(v___x_9932_) == 0)
{
lean_object* v_a_9933_; lean_object* v___x_9935_; uint8_t v_isShared_9936_; uint8_t v_isSharedCheck_9941_; 
v_a_9933_ = lean_ctor_get(v___x_9932_, 0);
v_isSharedCheck_9941_ = !lean_is_exclusive(v___x_9932_);
if (v_isSharedCheck_9941_ == 0)
{
v___x_9935_ = v___x_9932_;
v_isShared_9936_ = v_isSharedCheck_9941_;
goto v_resetjp_9934_;
}
else
{
lean_inc(v_a_9933_);
lean_dec(v___x_9932_);
v___x_9935_ = lean_box(0);
v_isShared_9936_ = v_isSharedCheck_9941_;
goto v_resetjp_9934_;
}
v_resetjp_9934_:
{
lean_object* v___x_9937_; lean_object* v___x_9939_; 
v___x_9937_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_9937_, 0, v_a_9933_);
lean_ctor_set(v___x_9937_, 1, v_val_9926_);
if (v_isShared_9936_ == 0)
{
lean_ctor_set(v___x_9935_, 0, v___x_9937_);
v___x_9939_ = v___x_9935_;
goto v_reusejp_9938_;
}
else
{
lean_object* v_reuseFailAlloc_9940_; 
v_reuseFailAlloc_9940_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9940_, 0, v___x_9937_);
v___x_9939_ = v_reuseFailAlloc_9940_;
goto v_reusejp_9938_;
}
v_reusejp_9938_:
{
return v___x_9939_;
}
}
}
else
{
lean_dec(v_val_9926_);
return v___x_9932_;
}
}
}
else
{
lean_object* v_a_9942_; lean_object* v___x_9944_; uint8_t v_isShared_9945_; uint8_t v_isSharedCheck_9949_; 
lean_dec(v_val_9926_);
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v_arg_9848_);
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_e_9826_);
lean_dec_ref(v_asVar_9825_);
lean_dec_ref(v_toVar_9824_);
v_a_9942_ = lean_ctor_get(v___x_9927_, 0);
v_isSharedCheck_9949_ = !lean_is_exclusive(v___x_9927_);
if (v_isSharedCheck_9949_ == 0)
{
v___x_9944_ = v___x_9927_;
v_isShared_9945_ = v_isSharedCheck_9949_;
goto v_resetjp_9943_;
}
else
{
lean_inc(v_a_9942_);
lean_dec(v___x_9927_);
v___x_9944_ = lean_box(0);
v_isShared_9945_ = v_isSharedCheck_9949_;
goto v_resetjp_9943_;
}
v_resetjp_9943_:
{
lean_object* v___x_9947_; 
if (v_isShared_9945_ == 0)
{
v___x_9947_ = v___x_9944_;
goto v_reusejp_9946_;
}
else
{
lean_object* v_reuseFailAlloc_9948_; 
v_reuseFailAlloc_9948_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9948_, 0, v_a_9942_);
v___x_9947_ = v_reuseFailAlloc_9948_;
goto v_reusejp_9946_;
}
v_reusejp_9946_:
{
return v___x_9947_;
}
}
}
}
else
{
lean_object* v___x_9950_; 
lean_dec(v_a_9925_);
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_asVar_9825_);
v___x_9950_ = lean_apply_13(v_toVar_9824_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9950_;
}
}
else
{
lean_object* v_a_9951_; lean_object* v___x_9953_; uint8_t v_isShared_9954_; uint8_t v_isSharedCheck_9958_; 
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v_arg_9848_);
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_e_9826_);
lean_dec_ref(v_asVar_9825_);
lean_dec_ref(v_toVar_9824_);
v_a_9951_ = lean_ctor_get(v___x_9924_, 0);
v_isSharedCheck_9958_ = !lean_is_exclusive(v___x_9924_);
if (v_isSharedCheck_9958_ == 0)
{
v___x_9953_ = v___x_9924_;
v_isShared_9954_ = v_isSharedCheck_9958_;
goto v_resetjp_9952_;
}
else
{
lean_inc(v_a_9951_);
lean_dec(v___x_9924_);
v___x_9953_ = lean_box(0);
v_isShared_9954_ = v_isSharedCheck_9958_;
goto v_resetjp_9952_;
}
v_resetjp_9952_:
{
lean_object* v___x_9956_; 
if (v_isShared_9954_ == 0)
{
v___x_9956_ = v___x_9953_;
goto v_reusejp_9955_;
}
else
{
lean_object* v_reuseFailAlloc_9957_; 
v_reuseFailAlloc_9957_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9957_, 0, v_a_9951_);
v___x_9956_ = v_reuseFailAlloc_9957_;
goto v_reusejp_9955_;
}
v_reusejp_9955_:
{
return v___x_9956_;
}
}
}
}
}
}
}
}
else
{
lean_object* v___x_9959_; 
lean_dec_ref(v___x_9853_);
lean_dec_ref(v_arg_9852_);
lean_inc(v___y_9837_);
lean_inc_ref(v___y_9836_);
lean_inc(v___y_9835_);
lean_inc_ref(v___y_9834_);
lean_inc(v___y_9833_);
lean_inc_ref(v___y_9832_);
lean_inc(v___y_9831_);
lean_inc_ref(v___y_9830_);
lean_inc(v___y_9829_);
lean_inc(v___y_9828_);
lean_inc(v___y_9827_);
v___x_9959_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5(v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
if (lean_obj_tag(v___x_9959_) == 0)
{
lean_object* v_a_9960_; lean_object* v___x_9961_; uint8_t v___x_9962_; 
v_a_9960_ = lean_ctor_get(v___x_9959_, 0);
lean_inc(v_a_9960_);
lean_dec_ref(v___x_9959_);
v___x_9961_ = l_Lean_Expr_appArg_x21(v_a_9960_);
lean_dec(v_a_9960_);
v___x_9962_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_9961_, v_arg_9848_);
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v___x_9961_);
if (v___x_9962_ == 0)
{
lean_object* v___x_9963_; 
lean_dec_ref(v_arg_9844_);
lean_dec_ref(v_toVar_9824_);
v___x_9963_ = lean_apply_13(v_asVar_9825_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9963_;
}
else
{
lean_object* v___x_9964_; 
lean_dec_ref(v_asVar_9825_);
lean_inc(v___y_9837_);
lean_inc_ref(v___y_9836_);
lean_inc(v___y_9835_);
lean_inc_ref(v___y_9834_);
v___x_9964_ = l_Lean_Meta_getNatValue_x3f(v_arg_9844_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
lean_dec_ref(v_arg_9844_);
if (lean_obj_tag(v___x_9964_) == 0)
{
lean_object* v_a_9965_; lean_object* v___x_9967_; uint8_t v_isShared_9968_; uint8_t v_isSharedCheck_9982_; 
v_a_9965_ = lean_ctor_get(v___x_9964_, 0);
v_isSharedCheck_9982_ = !lean_is_exclusive(v___x_9964_);
if (v_isSharedCheck_9982_ == 0)
{
v___x_9967_ = v___x_9964_;
v_isShared_9968_ = v_isSharedCheck_9982_;
goto v_resetjp_9966_;
}
else
{
lean_inc(v_a_9965_);
lean_dec(v___x_9964_);
v___x_9967_ = lean_box(0);
v_isShared_9968_ = v_isSharedCheck_9982_;
goto v_resetjp_9966_;
}
v_resetjp_9966_:
{
if (lean_obj_tag(v_a_9965_) == 1)
{
lean_object* v_val_9969_; lean_object* v___x_9971_; uint8_t v_isShared_9972_; uint8_t v_isSharedCheck_9980_; 
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_e_9826_);
lean_dec_ref(v_toVar_9824_);
v_val_9969_ = lean_ctor_get(v_a_9965_, 0);
v_isSharedCheck_9980_ = !lean_is_exclusive(v_a_9965_);
if (v_isSharedCheck_9980_ == 0)
{
v___x_9971_ = v_a_9965_;
v_isShared_9972_ = v_isSharedCheck_9980_;
goto v_resetjp_9970_;
}
else
{
lean_inc(v_val_9969_);
lean_dec(v_a_9965_);
v___x_9971_ = lean_box(0);
v_isShared_9972_ = v_isSharedCheck_9980_;
goto v_resetjp_9970_;
}
v_resetjp_9970_:
{
lean_object* v___x_9973_; lean_object* v___x_9975_; 
v___x_9973_ = lean_nat_to_int(v_val_9969_);
if (v_isShared_9972_ == 0)
{
lean_ctor_set_tag(v___x_9971_, 0);
lean_ctor_set(v___x_9971_, 0, v___x_9973_);
v___x_9975_ = v___x_9971_;
goto v_reusejp_9974_;
}
else
{
lean_object* v_reuseFailAlloc_9979_; 
v_reuseFailAlloc_9979_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9979_, 0, v___x_9973_);
v___x_9975_ = v_reuseFailAlloc_9979_;
goto v_reusejp_9974_;
}
v_reusejp_9974_:
{
lean_object* v___x_9977_; 
if (v_isShared_9968_ == 0)
{
lean_ctor_set(v___x_9967_, 0, v___x_9975_);
v___x_9977_ = v___x_9967_;
goto v_reusejp_9976_;
}
else
{
lean_object* v_reuseFailAlloc_9978_; 
v_reuseFailAlloc_9978_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9978_, 0, v___x_9975_);
v___x_9977_ = v_reuseFailAlloc_9978_;
goto v_reusejp_9976_;
}
v_reusejp_9976_:
{
return v___x_9977_;
}
}
}
}
else
{
lean_object* v___x_9981_; 
lean_del_object(v___x_9967_);
lean_dec(v_a_9965_);
v___x_9981_ = lean_apply_13(v_toVar_9824_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_9981_;
}
}
}
else
{
lean_object* v_a_9983_; lean_object* v___x_9985_; uint8_t v_isShared_9986_; uint8_t v_isSharedCheck_9990_; 
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_e_9826_);
lean_dec_ref(v_toVar_9824_);
v_a_9983_ = lean_ctor_get(v___x_9964_, 0);
v_isSharedCheck_9990_ = !lean_is_exclusive(v___x_9964_);
if (v_isSharedCheck_9990_ == 0)
{
v___x_9985_ = v___x_9964_;
v_isShared_9986_ = v_isSharedCheck_9990_;
goto v_resetjp_9984_;
}
else
{
lean_inc(v_a_9983_);
lean_dec(v___x_9964_);
v___x_9985_ = lean_box(0);
v_isShared_9986_ = v_isSharedCheck_9990_;
goto v_resetjp_9984_;
}
v_resetjp_9984_:
{
lean_object* v___x_9988_; 
if (v_isShared_9986_ == 0)
{
v___x_9988_ = v___x_9985_;
goto v_reusejp_9987_;
}
else
{
lean_object* v_reuseFailAlloc_9989_; 
v_reuseFailAlloc_9989_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9989_, 0, v_a_9983_);
v___x_9988_ = v_reuseFailAlloc_9989_;
goto v_reusejp_9987_;
}
v_reusejp_9987_:
{
return v___x_9988_;
}
}
}
}
}
else
{
lean_object* v_a_9991_; lean_object* v___x_9993_; uint8_t v_isShared_9994_; uint8_t v_isSharedCheck_9998_; 
lean_dec_ref(v_arg_9848_);
lean_dec_ref(v_arg_9844_);
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_e_9826_);
lean_dec_ref(v_asVar_9825_);
lean_dec_ref(v_toVar_9824_);
v_a_9991_ = lean_ctor_get(v___x_9959_, 0);
v_isSharedCheck_9998_ = !lean_is_exclusive(v___x_9959_);
if (v_isSharedCheck_9998_ == 0)
{
v___x_9993_ = v___x_9959_;
v_isShared_9994_ = v_isSharedCheck_9998_;
goto v_resetjp_9992_;
}
else
{
lean_inc(v_a_9991_);
lean_dec(v___x_9959_);
v___x_9993_ = lean_box(0);
v_isShared_9994_ = v_isSharedCheck_9998_;
goto v_resetjp_9992_;
}
v_resetjp_9992_:
{
lean_object* v___x_9996_; 
if (v_isShared_9994_ == 0)
{
v___x_9996_ = v___x_9993_;
goto v_reusejp_9995_;
}
else
{
lean_object* v_reuseFailAlloc_9997_; 
v_reuseFailAlloc_9997_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_9997_, 0, v_a_9991_);
v___x_9996_ = v_reuseFailAlloc_9997_;
goto v_reusejp_9995_;
}
v_reusejp_9995_:
{
return v___x_9996_;
}
}
}
}
}
else
{
lean_object* v___x_9999_; 
lean_dec_ref(v___x_9853_);
lean_dec_ref(v_arg_9852_);
lean_dec_ref(v_arg_9844_);
lean_dec_ref(v_asVar_9825_);
lean_inc(v___y_9837_);
lean_inc_ref(v___y_9836_);
lean_inc(v___y_9835_);
lean_inc_ref(v___y_9834_);
v___x_9999_ = l_Lean_Meta_getNatValue_x3f(v_arg_9848_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_);
lean_dec_ref(v_arg_9848_);
if (lean_obj_tag(v___x_9999_) == 0)
{
lean_object* v_a_10000_; lean_object* v___x_10002_; uint8_t v_isShared_10003_; uint8_t v_isSharedCheck_10017_; 
v_a_10000_ = lean_ctor_get(v___x_9999_, 0);
v_isSharedCheck_10017_ = !lean_is_exclusive(v___x_9999_);
if (v_isSharedCheck_10017_ == 0)
{
v___x_10002_ = v___x_9999_;
v_isShared_10003_ = v_isSharedCheck_10017_;
goto v_resetjp_10001_;
}
else
{
lean_inc(v_a_10000_);
lean_dec(v___x_9999_);
v___x_10002_ = lean_box(0);
v_isShared_10003_ = v_isSharedCheck_10017_;
goto v_resetjp_10001_;
}
v_resetjp_10001_:
{
if (lean_obj_tag(v_a_10000_) == 1)
{
lean_object* v_val_10004_; lean_object* v___x_10006_; uint8_t v_isShared_10007_; uint8_t v_isSharedCheck_10015_; 
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_e_9826_);
lean_dec_ref(v_toVar_9824_);
v_val_10004_ = lean_ctor_get(v_a_10000_, 0);
v_isSharedCheck_10015_ = !lean_is_exclusive(v_a_10000_);
if (v_isSharedCheck_10015_ == 0)
{
v___x_10006_ = v_a_10000_;
v_isShared_10007_ = v_isSharedCheck_10015_;
goto v_resetjp_10005_;
}
else
{
lean_inc(v_val_10004_);
lean_dec(v_a_10000_);
v___x_10006_ = lean_box(0);
v_isShared_10007_ = v_isSharedCheck_10015_;
goto v_resetjp_10005_;
}
v_resetjp_10005_:
{
lean_object* v___x_10008_; lean_object* v___x_10010_; 
v___x_10008_ = lean_nat_to_int(v_val_10004_);
if (v_isShared_10007_ == 0)
{
lean_ctor_set_tag(v___x_10006_, 0);
lean_ctor_set(v___x_10006_, 0, v___x_10008_);
v___x_10010_ = v___x_10006_;
goto v_reusejp_10009_;
}
else
{
lean_object* v_reuseFailAlloc_10014_; 
v_reuseFailAlloc_10014_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10014_, 0, v___x_10008_);
v___x_10010_ = v_reuseFailAlloc_10014_;
goto v_reusejp_10009_;
}
v_reusejp_10009_:
{
lean_object* v___x_10012_; 
if (v_isShared_10003_ == 0)
{
lean_ctor_set(v___x_10002_, 0, v___x_10010_);
v___x_10012_ = v___x_10002_;
goto v_reusejp_10011_;
}
else
{
lean_object* v_reuseFailAlloc_10013_; 
v_reuseFailAlloc_10013_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10013_, 0, v___x_10010_);
v___x_10012_ = v_reuseFailAlloc_10013_;
goto v_reusejp_10011_;
}
v_reusejp_10011_:
{
return v___x_10012_;
}
}
}
}
else
{
lean_object* v___x_10016_; 
lean_del_object(v___x_10002_);
lean_dec(v_a_10000_);
v___x_10016_ = lean_apply_13(v_toVar_9824_, v_e_9826_, v___y_9827_, v___y_9828_, v___y_9829_, v___y_9830_, v___y_9831_, v___y_9832_, v___y_9833_, v___y_9834_, v___y_9835_, v___y_9836_, v___y_9837_, lean_box(0));
return v___x_10016_;
}
}
}
else
{
lean_object* v_a_10018_; lean_object* v___x_10020_; uint8_t v_isShared_10021_; uint8_t v_isSharedCheck_10025_; 
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_e_9826_);
lean_dec_ref(v_toVar_9824_);
v_a_10018_ = lean_ctor_get(v___x_9999_, 0);
v_isSharedCheck_10025_ = !lean_is_exclusive(v___x_9999_);
if (v_isSharedCheck_10025_ == 0)
{
v___x_10020_ = v___x_9999_;
v_isShared_10021_ = v_isSharedCheck_10025_;
goto v_resetjp_10019_;
}
else
{
lean_inc(v_a_10018_);
lean_dec(v___x_9999_);
v___x_10020_ = lean_box(0);
v_isShared_10021_ = v_isSharedCheck_10025_;
goto v_resetjp_10019_;
}
v_resetjp_10019_:
{
lean_object* v___x_10023_; 
if (v_isShared_10021_ == 0)
{
v___x_10023_ = v___x_10020_;
goto v_reusejp_10022_;
}
else
{
lean_object* v_reuseFailAlloc_10024_; 
v_reuseFailAlloc_10024_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10024_, 0, v_a_10018_);
v___x_10023_ = v_reuseFailAlloc_10024_;
goto v_reusejp_10022_;
}
v_reusejp_10022_:
{
return v___x_10023_;
}
}
}
}
}
}
}
}
else
{
lean_object* v_a_10026_; lean_object* v___x_10028_; uint8_t v_isShared_10029_; uint8_t v_isSharedCheck_10033_; 
lean_dec(v___y_9837_);
lean_dec_ref(v___y_9836_);
lean_dec(v___y_9835_);
lean_dec_ref(v___y_9834_);
lean_dec(v___y_9833_);
lean_dec_ref(v___y_9832_);
lean_dec(v___y_9831_);
lean_dec_ref(v___y_9830_);
lean_dec(v___y_9829_);
lean_dec(v___y_9828_);
lean_dec(v___y_9827_);
lean_dec_ref(v_e_9826_);
lean_dec_ref(v_asVar_9825_);
lean_dec_ref(v_toVar_9824_);
v_a_10026_ = lean_ctor_get(v___x_9839_, 0);
v_isSharedCheck_10033_ = !lean_is_exclusive(v___x_9839_);
if (v_isSharedCheck_10033_ == 0)
{
v___x_10028_ = v___x_9839_;
v_isShared_10029_ = v_isSharedCheck_10033_;
goto v_resetjp_10027_;
}
else
{
lean_inc(v_a_10026_);
lean_dec(v___x_9839_);
v___x_10028_ = lean_box(0);
v_isShared_10029_ = v_isSharedCheck_10033_;
goto v_resetjp_10027_;
}
v_resetjp_10027_:
{
lean_object* v___x_10031_; 
if (v_isShared_10029_ == 0)
{
v___x_10031_ = v___x_10028_;
goto v_reusejp_10030_;
}
else
{
lean_object* v_reuseFailAlloc_10032_; 
v_reuseFailAlloc_10032_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10032_, 0, v_a_10026_);
v___x_10031_ = v_reuseFailAlloc_10032_;
goto v_reusejp_10030_;
}
v_reusejp_10030_:
{
return v___x_10031_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2___boxed(lean_object* v_toVar_10034_, lean_object* v_asVar_10035_, lean_object* v_e_10036_, lean_object* v___y_10037_, lean_object* v___y_10038_, lean_object* v___y_10039_, lean_object* v___y_10040_, lean_object* v___y_10041_, lean_object* v___y_10042_, lean_object* v___y_10043_, lean_object* v___y_10044_, lean_object* v___y_10045_, lean_object* v___y_10046_, lean_object* v___y_10047_, lean_object* v___y_10048_){
_start:
{
lean_object* v_res_10049_; 
v_res_10049_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_10034_, v_asVar_10035_, v_e_10036_, v___y_10037_, v___y_10038_, v___y_10039_, v___y_10040_, v___y_10041_, v___y_10042_, v___y_10043_, v___y_10044_, v___y_10045_, v___y_10046_, v___y_10047_);
return v_res_10049_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0(lean_object* v_e_10055_, lean_object* v___y_10056_, lean_object* v___y_10057_, lean_object* v___y_10058_, lean_object* v___y_10059_, lean_object* v___y_10060_, lean_object* v___y_10061_, lean_object* v___y_10062_, lean_object* v___y_10063_, lean_object* v___y_10064_, lean_object* v___y_10065_, lean_object* v___y_10066_){
_start:
{
lean_object* v___x_10068_; 
lean_inc_ref(v_e_10055_);
v___x_10068_ = l_Lean_Meta_instantiateMVarsIfMVarApp___redArg(v_e_10055_, v___y_10064_);
if (lean_obj_tag(v___x_10068_) == 0)
{
lean_object* v_a_10069_; lean_object* v_mkVar_10070_; lean_object* v_toVar_10071_; lean_object* v_e_10073_; lean_object* v___y_10074_; lean_object* v___y_10075_; lean_object* v___y_10076_; lean_object* v___y_10077_; lean_object* v___y_10078_; lean_object* v___y_10079_; lean_object* v___y_10080_; lean_object* v___y_10081_; lean_object* v___y_10082_; lean_object* v___y_10083_; lean_object* v___y_10084_; lean_object* v_e_10104_; lean_object* v___y_10105_; lean_object* v___y_10106_; lean_object* v___y_10107_; lean_object* v___y_10108_; lean_object* v___y_10109_; lean_object* v___y_10110_; lean_object* v___y_10111_; lean_object* v___y_10112_; lean_object* v___y_10113_; lean_object* v___y_10114_; lean_object* v___y_10115_; lean_object* v___x_10125_; uint8_t v___x_10126_; 
v_a_10069_ = lean_ctor_get(v___x_10068_, 0);
lean_inc(v_a_10069_);
lean_dec_ref(v___x_10068_);
v_mkVar_10070_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__0));
v_toVar_10071_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__1));
v___x_10125_ = l_Lean_Expr_cleanupAnnotations(v_a_10069_);
v___x_10126_ = l_Lean_Expr_isApp(v___x_10125_);
if (v___x_10126_ == 0)
{
lean_dec_ref(v___x_10125_);
v_e_10073_ = v_e_10055_;
v___y_10074_ = v___y_10056_;
v___y_10075_ = v___y_10057_;
v___y_10076_ = v___y_10058_;
v___y_10077_ = v___y_10059_;
v___y_10078_ = v___y_10060_;
v___y_10079_ = v___y_10061_;
v___y_10080_ = v___y_10062_;
v___y_10081_ = v___y_10063_;
v___y_10082_ = v___y_10064_;
v___y_10083_ = v___y_10065_;
v___y_10084_ = v___y_10066_;
goto v___jp_10072_;
}
else
{
lean_object* v_arg_10127_; lean_object* v___x_10128_; uint8_t v___x_10129_; 
v_arg_10127_ = lean_ctor_get(v___x_10125_, 1);
lean_inc_ref(v_arg_10127_);
v___x_10128_ = l_Lean_Expr_appFnCleanup___redArg(v___x_10125_);
v___x_10129_ = l_Lean_Expr_isApp(v___x_10128_);
if (v___x_10129_ == 0)
{
lean_dec_ref(v___x_10128_);
lean_dec_ref(v_arg_10127_);
v_e_10073_ = v_e_10055_;
v___y_10074_ = v___y_10056_;
v___y_10075_ = v___y_10057_;
v___y_10076_ = v___y_10058_;
v___y_10077_ = v___y_10059_;
v___y_10078_ = v___y_10060_;
v___y_10079_ = v___y_10061_;
v___y_10080_ = v___y_10062_;
v___y_10081_ = v___y_10063_;
v___y_10082_ = v___y_10064_;
v___y_10083_ = v___y_10065_;
v___y_10084_ = v___y_10066_;
goto v___jp_10072_;
}
else
{
lean_object* v_arg_10130_; lean_object* v___x_10131_; uint8_t v___x_10132_; 
v_arg_10130_ = lean_ctor_get(v___x_10128_, 1);
lean_inc_ref(v_arg_10130_);
v___x_10131_ = l_Lean_Expr_appFnCleanup___redArg(v___x_10128_);
v___x_10132_ = l_Lean_Expr_isApp(v___x_10131_);
if (v___x_10132_ == 0)
{
lean_dec_ref(v___x_10131_);
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v_arg_10127_);
v_e_10073_ = v_e_10055_;
v___y_10074_ = v___y_10056_;
v___y_10075_ = v___y_10057_;
v___y_10076_ = v___y_10058_;
v___y_10077_ = v___y_10059_;
v___y_10078_ = v___y_10060_;
v___y_10079_ = v___y_10061_;
v___y_10080_ = v___y_10062_;
v___y_10081_ = v___y_10063_;
v___y_10082_ = v___y_10064_;
v___y_10083_ = v___y_10065_;
v___y_10084_ = v___y_10066_;
goto v___jp_10072_;
}
else
{
lean_object* v_arg_10133_; lean_object* v___x_10134_; lean_object* v___x_10135_; uint8_t v___x_10136_; 
v_arg_10133_ = lean_ctor_get(v___x_10131_, 1);
lean_inc_ref(v_arg_10133_);
v___x_10134_ = l_Lean_Expr_appFnCleanup___redArg(v___x_10131_);
v___x_10135_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__4));
v___x_10136_ = l_Lean_Expr_isConstOf(v___x_10134_, v___x_10135_);
if (v___x_10136_ == 0)
{
lean_object* v___x_10137_; uint8_t v___x_10138_; 
v___x_10137_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__7));
v___x_10138_ = l_Lean_Expr_isConstOf(v___x_10134_, v___x_10137_);
if (v___x_10138_ == 0)
{
uint8_t v___x_10139_; 
v___x_10139_ = l_Lean_Expr_isApp(v___x_10134_);
if (v___x_10139_ == 0)
{
lean_dec_ref(v___x_10134_);
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v_arg_10127_);
v_e_10073_ = v_e_10055_;
v___y_10074_ = v___y_10056_;
v___y_10075_ = v___y_10057_;
v___y_10076_ = v___y_10058_;
v___y_10077_ = v___y_10059_;
v___y_10078_ = v___y_10060_;
v___y_10079_ = v___y_10061_;
v___y_10080_ = v___y_10062_;
v___y_10081_ = v___y_10063_;
v___y_10082_ = v___y_10064_;
v___y_10083_ = v___y_10065_;
v___y_10084_ = v___y_10066_;
goto v___jp_10072_;
}
else
{
lean_object* v___x_10140_; uint8_t v___x_10141_; 
v___x_10140_ = l_Lean_Expr_appFnCleanup___redArg(v___x_10134_);
v___x_10141_ = l_Lean_Expr_isApp(v___x_10140_);
if (v___x_10141_ == 0)
{
lean_dec_ref(v___x_10140_);
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v_arg_10127_);
v_e_10073_ = v_e_10055_;
v___y_10074_ = v___y_10056_;
v___y_10075_ = v___y_10057_;
v___y_10076_ = v___y_10058_;
v___y_10077_ = v___y_10059_;
v___y_10078_ = v___y_10060_;
v___y_10079_ = v___y_10061_;
v___y_10080_ = v___y_10062_;
v___y_10081_ = v___y_10063_;
v___y_10082_ = v___y_10064_;
v___y_10083_ = v___y_10065_;
v___y_10084_ = v___y_10066_;
goto v___jp_10072_;
}
else
{
lean_object* v___x_10142_; uint8_t v___x_10143_; 
v___x_10142_ = l_Lean_Expr_appFnCleanup___redArg(v___x_10140_);
v___x_10143_ = l_Lean_Expr_isApp(v___x_10142_);
if (v___x_10143_ == 0)
{
lean_dec_ref(v___x_10142_);
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v_arg_10127_);
v_e_10073_ = v_e_10055_;
v___y_10074_ = v___y_10056_;
v___y_10075_ = v___y_10057_;
v___y_10076_ = v___y_10058_;
v___y_10077_ = v___y_10059_;
v___y_10078_ = v___y_10060_;
v___y_10079_ = v___y_10061_;
v___y_10080_ = v___y_10062_;
v___y_10081_ = v___y_10063_;
v___y_10082_ = v___y_10064_;
v___y_10083_ = v___y_10065_;
v___y_10084_ = v___y_10066_;
goto v___jp_10072_;
}
else
{
lean_object* v_asVar_10144_; lean_object* v___x_10145_; lean_object* v___x_10146_; uint8_t v___x_10147_; 
v_asVar_10144_ = ((lean_object*)(l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___closed__2));
v___x_10145_ = l_Lean_Expr_appFnCleanup___redArg(v___x_10142_);
v___x_10146_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__16));
v___x_10147_ = l_Lean_Expr_isConstOf(v___x_10145_, v___x_10146_);
if (v___x_10147_ == 0)
{
lean_object* v___x_10148_; uint8_t v___x_10149_; 
v___x_10148_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__22));
v___x_10149_ = l_Lean_Expr_isConstOf(v___x_10145_, v___x_10148_);
if (v___x_10149_ == 0)
{
lean_object* v___x_10150_; uint8_t v___x_10151_; 
v___x_10150_ = ((lean_object*)(l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f_go___redArg___lam__15___closed__25));
v___x_10151_ = l_Lean_Expr_isConstOf(v___x_10145_, v___x_10150_);
lean_dec_ref(v___x_10145_);
if (v___x_10151_ == 0)
{
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v_arg_10127_);
v_e_10073_ = v_e_10055_;
v___y_10074_ = v___y_10056_;
v___y_10075_ = v___y_10057_;
v___y_10076_ = v___y_10058_;
v___y_10077_ = v___y_10059_;
v___y_10078_ = v___y_10060_;
v___y_10079_ = v___y_10061_;
v___y_10080_ = v___y_10062_;
v___y_10081_ = v___y_10063_;
v___y_10082_ = v___y_10064_;
v___y_10083_ = v___y_10065_;
v___y_10084_ = v___y_10066_;
goto v___jp_10072_;
}
else
{
lean_object* v___x_10152_; 
lean_inc(v___y_10066_);
lean_inc_ref(v___y_10065_);
lean_inc(v___y_10064_);
lean_inc_ref(v___y_10063_);
lean_inc(v___y_10062_);
lean_inc_ref(v___y_10061_);
lean_inc(v___y_10060_);
lean_inc_ref(v___y_10059_);
lean_inc(v___y_10058_);
lean_inc(v___y_10057_);
lean_inc(v___y_10056_);
v___x_10152_ = l_Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1(v___y_10056_, v___y_10057_, v___y_10058_, v___y_10059_, v___y_10060_, v___y_10061_, v___y_10062_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
if (lean_obj_tag(v___x_10152_) == 0)
{
lean_object* v_a_10153_; lean_object* v___x_10154_; uint8_t v___x_10155_; 
v_a_10153_ = lean_ctor_get(v___x_10152_, 0);
lean_inc(v_a_10153_);
lean_dec_ref(v___x_10152_);
v___x_10154_ = l_Lean_Expr_appArg_x21(v_a_10153_);
lean_dec(v_a_10153_);
v___x_10155_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_10154_, v_arg_10133_);
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v___x_10154_);
if (v___x_10155_ == 0)
{
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v_arg_10127_);
v_e_10104_ = v_e_10055_;
v___y_10105_ = v___y_10056_;
v___y_10106_ = v___y_10057_;
v___y_10107_ = v___y_10058_;
v___y_10108_ = v___y_10059_;
v___y_10109_ = v___y_10060_;
v___y_10110_ = v___y_10061_;
v___y_10111_ = v___y_10062_;
v___y_10112_ = v___y_10063_;
v___y_10113_ = v___y_10064_;
v___y_10114_ = v___y_10065_;
v___y_10115_ = v___y_10066_;
goto v___jp_10103_;
}
else
{
lean_object* v___x_10156_; 
lean_dec_ref(v_e_10055_);
lean_inc(v___y_10066_);
lean_inc_ref(v___y_10065_);
lean_inc(v___y_10064_);
lean_inc_ref(v___y_10063_);
lean_inc(v___y_10062_);
lean_inc_ref(v___y_10061_);
lean_inc(v___y_10060_);
lean_inc_ref(v___y_10059_);
lean_inc(v___y_10058_);
lean_inc(v___y_10057_);
lean_inc(v___y_10056_);
v___x_10156_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_10071_, v_asVar_10144_, v_arg_10130_, v___y_10056_, v___y_10057_, v___y_10058_, v___y_10059_, v___y_10060_, v___y_10061_, v___y_10062_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
if (lean_obj_tag(v___x_10156_) == 0)
{
lean_object* v_a_10157_; lean_object* v___x_10158_; 
v_a_10157_ = lean_ctor_get(v___x_10156_, 0);
lean_inc(v_a_10157_);
lean_dec_ref(v___x_10156_);
v___x_10158_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_10071_, v_asVar_10144_, v_arg_10127_, v___y_10056_, v___y_10057_, v___y_10058_, v___y_10059_, v___y_10060_, v___y_10061_, v___y_10062_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
if (lean_obj_tag(v___x_10158_) == 0)
{
lean_object* v_a_10159_; lean_object* v___x_10161_; uint8_t v_isShared_10162_; uint8_t v_isSharedCheck_10168_; 
v_a_10159_ = lean_ctor_get(v___x_10158_, 0);
v_isSharedCheck_10168_ = !lean_is_exclusive(v___x_10158_);
if (v_isSharedCheck_10168_ == 0)
{
v___x_10161_ = v___x_10158_;
v_isShared_10162_ = v_isSharedCheck_10168_;
goto v_resetjp_10160_;
}
else
{
lean_inc(v_a_10159_);
lean_dec(v___x_10158_);
v___x_10161_ = lean_box(0);
v_isShared_10162_ = v_isSharedCheck_10168_;
goto v_resetjp_10160_;
}
v_resetjp_10160_:
{
lean_object* v___x_10163_; lean_object* v___x_10164_; lean_object* v___x_10166_; 
v___x_10163_ = lean_alloc_ctor(5, 2, 0);
lean_ctor_set(v___x_10163_, 0, v_a_10157_);
lean_ctor_set(v___x_10163_, 1, v_a_10159_);
v___x_10164_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_10164_, 0, v___x_10163_);
if (v_isShared_10162_ == 0)
{
lean_ctor_set(v___x_10161_, 0, v___x_10164_);
v___x_10166_ = v___x_10161_;
goto v_reusejp_10165_;
}
else
{
lean_object* v_reuseFailAlloc_10167_; 
v_reuseFailAlloc_10167_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10167_, 0, v___x_10164_);
v___x_10166_ = v_reuseFailAlloc_10167_;
goto v_reusejp_10165_;
}
v_reusejp_10165_:
{
return v___x_10166_;
}
}
}
else
{
lean_object* v_a_10169_; lean_object* v___x_10171_; uint8_t v_isShared_10172_; uint8_t v_isSharedCheck_10176_; 
lean_dec(v_a_10157_);
v_a_10169_ = lean_ctor_get(v___x_10158_, 0);
v_isSharedCheck_10176_ = !lean_is_exclusive(v___x_10158_);
if (v_isSharedCheck_10176_ == 0)
{
v___x_10171_ = v___x_10158_;
v_isShared_10172_ = v_isSharedCheck_10176_;
goto v_resetjp_10170_;
}
else
{
lean_inc(v_a_10169_);
lean_dec(v___x_10158_);
v___x_10171_ = lean_box(0);
v_isShared_10172_ = v_isSharedCheck_10176_;
goto v_resetjp_10170_;
}
v_resetjp_10170_:
{
lean_object* v___x_10174_; 
if (v_isShared_10172_ == 0)
{
v___x_10174_ = v___x_10171_;
goto v_reusejp_10173_;
}
else
{
lean_object* v_reuseFailAlloc_10175_; 
v_reuseFailAlloc_10175_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10175_, 0, v_a_10169_);
v___x_10174_ = v_reuseFailAlloc_10175_;
goto v_reusejp_10173_;
}
v_reusejp_10173_:
{
return v___x_10174_;
}
}
}
}
else
{
lean_object* v_a_10177_; lean_object* v___x_10179_; uint8_t v_isShared_10180_; uint8_t v_isSharedCheck_10184_; 
lean_dec_ref(v_arg_10127_);
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
v_a_10177_ = lean_ctor_get(v___x_10156_, 0);
v_isSharedCheck_10184_ = !lean_is_exclusive(v___x_10156_);
if (v_isSharedCheck_10184_ == 0)
{
v___x_10179_ = v___x_10156_;
v_isShared_10180_ = v_isSharedCheck_10184_;
goto v_resetjp_10178_;
}
else
{
lean_inc(v_a_10177_);
lean_dec(v___x_10156_);
v___x_10179_ = lean_box(0);
v_isShared_10180_ = v_isSharedCheck_10184_;
goto v_resetjp_10178_;
}
v_resetjp_10178_:
{
lean_object* v___x_10182_; 
if (v_isShared_10180_ == 0)
{
v___x_10182_ = v___x_10179_;
goto v_reusejp_10181_;
}
else
{
lean_object* v_reuseFailAlloc_10183_; 
v_reuseFailAlloc_10183_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10183_, 0, v_a_10177_);
v___x_10182_ = v_reuseFailAlloc_10183_;
goto v_reusejp_10181_;
}
v_reusejp_10181_:
{
return v___x_10182_;
}
}
}
}
}
else
{
lean_object* v_a_10185_; lean_object* v___x_10187_; uint8_t v_isShared_10188_; uint8_t v_isSharedCheck_10192_; 
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v_arg_10127_);
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v_a_10185_ = lean_ctor_get(v___x_10152_, 0);
v_isSharedCheck_10192_ = !lean_is_exclusive(v___x_10152_);
if (v_isSharedCheck_10192_ == 0)
{
v___x_10187_ = v___x_10152_;
v_isShared_10188_ = v_isSharedCheck_10192_;
goto v_resetjp_10186_;
}
else
{
lean_inc(v_a_10185_);
lean_dec(v___x_10152_);
v___x_10187_ = lean_box(0);
v_isShared_10188_ = v_isSharedCheck_10192_;
goto v_resetjp_10186_;
}
v_resetjp_10186_:
{
lean_object* v___x_10190_; 
if (v_isShared_10188_ == 0)
{
v___x_10190_ = v___x_10187_;
goto v_reusejp_10189_;
}
else
{
lean_object* v_reuseFailAlloc_10191_; 
v_reuseFailAlloc_10191_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10191_, 0, v_a_10185_);
v___x_10190_ = v_reuseFailAlloc_10191_;
goto v_reusejp_10189_;
}
v_reusejp_10189_:
{
return v___x_10190_;
}
}
}
}
}
else
{
lean_object* v___x_10193_; 
lean_dec_ref(v___x_10145_);
lean_inc(v___y_10066_);
lean_inc_ref(v___y_10065_);
lean_inc(v___y_10064_);
lean_inc_ref(v___y_10063_);
lean_inc(v___y_10062_);
lean_inc_ref(v___y_10061_);
lean_inc(v___y_10060_);
lean_inc_ref(v___y_10059_);
lean_inc(v___y_10058_);
lean_inc(v___y_10057_);
lean_inc(v___y_10056_);
v___x_10193_ = l_Lean_Meta_Grind_Arith_CommRing_getMulFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__3(v___y_10056_, v___y_10057_, v___y_10058_, v___y_10059_, v___y_10060_, v___y_10061_, v___y_10062_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
if (lean_obj_tag(v___x_10193_) == 0)
{
lean_object* v_a_10194_; lean_object* v___x_10195_; uint8_t v___x_10196_; 
v_a_10194_ = lean_ctor_get(v___x_10193_, 0);
lean_inc(v_a_10194_);
lean_dec_ref(v___x_10193_);
v___x_10195_ = l_Lean_Expr_appArg_x21(v_a_10194_);
lean_dec(v_a_10194_);
v___x_10196_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_10195_, v_arg_10133_);
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v___x_10195_);
if (v___x_10196_ == 0)
{
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v_arg_10127_);
v_e_10104_ = v_e_10055_;
v___y_10105_ = v___y_10056_;
v___y_10106_ = v___y_10057_;
v___y_10107_ = v___y_10058_;
v___y_10108_ = v___y_10059_;
v___y_10109_ = v___y_10060_;
v___y_10110_ = v___y_10061_;
v___y_10111_ = v___y_10062_;
v___y_10112_ = v___y_10063_;
v___y_10113_ = v___y_10064_;
v___y_10114_ = v___y_10065_;
v___y_10115_ = v___y_10066_;
goto v___jp_10103_;
}
else
{
lean_object* v___x_10197_; 
lean_dec_ref(v_e_10055_);
lean_inc(v___y_10066_);
lean_inc_ref(v___y_10065_);
lean_inc(v___y_10064_);
lean_inc_ref(v___y_10063_);
lean_inc(v___y_10062_);
lean_inc_ref(v___y_10061_);
lean_inc(v___y_10060_);
lean_inc_ref(v___y_10059_);
lean_inc(v___y_10058_);
lean_inc(v___y_10057_);
lean_inc(v___y_10056_);
v___x_10197_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_10071_, v_asVar_10144_, v_arg_10130_, v___y_10056_, v___y_10057_, v___y_10058_, v___y_10059_, v___y_10060_, v___y_10061_, v___y_10062_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
if (lean_obj_tag(v___x_10197_) == 0)
{
lean_object* v_a_10198_; lean_object* v___x_10199_; 
v_a_10198_ = lean_ctor_get(v___x_10197_, 0);
lean_inc(v_a_10198_);
lean_dec_ref(v___x_10197_);
v___x_10199_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_10071_, v_asVar_10144_, v_arg_10127_, v___y_10056_, v___y_10057_, v___y_10058_, v___y_10059_, v___y_10060_, v___y_10061_, v___y_10062_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
if (lean_obj_tag(v___x_10199_) == 0)
{
lean_object* v_a_10200_; lean_object* v___x_10202_; uint8_t v_isShared_10203_; uint8_t v_isSharedCheck_10209_; 
v_a_10200_ = lean_ctor_get(v___x_10199_, 0);
v_isSharedCheck_10209_ = !lean_is_exclusive(v___x_10199_);
if (v_isSharedCheck_10209_ == 0)
{
v___x_10202_ = v___x_10199_;
v_isShared_10203_ = v_isSharedCheck_10209_;
goto v_resetjp_10201_;
}
else
{
lean_inc(v_a_10200_);
lean_dec(v___x_10199_);
v___x_10202_ = lean_box(0);
v_isShared_10203_ = v_isSharedCheck_10209_;
goto v_resetjp_10201_;
}
v_resetjp_10201_:
{
lean_object* v___x_10204_; lean_object* v___x_10205_; lean_object* v___x_10207_; 
v___x_10204_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_10204_, 0, v_a_10198_);
lean_ctor_set(v___x_10204_, 1, v_a_10200_);
v___x_10205_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_10205_, 0, v___x_10204_);
if (v_isShared_10203_ == 0)
{
lean_ctor_set(v___x_10202_, 0, v___x_10205_);
v___x_10207_ = v___x_10202_;
goto v_reusejp_10206_;
}
else
{
lean_object* v_reuseFailAlloc_10208_; 
v_reuseFailAlloc_10208_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10208_, 0, v___x_10205_);
v___x_10207_ = v_reuseFailAlloc_10208_;
goto v_reusejp_10206_;
}
v_reusejp_10206_:
{
return v___x_10207_;
}
}
}
else
{
lean_object* v_a_10210_; lean_object* v___x_10212_; uint8_t v_isShared_10213_; uint8_t v_isSharedCheck_10217_; 
lean_dec(v_a_10198_);
v_a_10210_ = lean_ctor_get(v___x_10199_, 0);
v_isSharedCheck_10217_ = !lean_is_exclusive(v___x_10199_);
if (v_isSharedCheck_10217_ == 0)
{
v___x_10212_ = v___x_10199_;
v_isShared_10213_ = v_isSharedCheck_10217_;
goto v_resetjp_10211_;
}
else
{
lean_inc(v_a_10210_);
lean_dec(v___x_10199_);
v___x_10212_ = lean_box(0);
v_isShared_10213_ = v_isSharedCheck_10217_;
goto v_resetjp_10211_;
}
v_resetjp_10211_:
{
lean_object* v___x_10215_; 
if (v_isShared_10213_ == 0)
{
v___x_10215_ = v___x_10212_;
goto v_reusejp_10214_;
}
else
{
lean_object* v_reuseFailAlloc_10216_; 
v_reuseFailAlloc_10216_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10216_, 0, v_a_10210_);
v___x_10215_ = v_reuseFailAlloc_10216_;
goto v_reusejp_10214_;
}
v_reusejp_10214_:
{
return v___x_10215_;
}
}
}
}
else
{
lean_object* v_a_10218_; lean_object* v___x_10220_; uint8_t v_isShared_10221_; uint8_t v_isSharedCheck_10225_; 
lean_dec_ref(v_arg_10127_);
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
v_a_10218_ = lean_ctor_get(v___x_10197_, 0);
v_isSharedCheck_10225_ = !lean_is_exclusive(v___x_10197_);
if (v_isSharedCheck_10225_ == 0)
{
v___x_10220_ = v___x_10197_;
v_isShared_10221_ = v_isSharedCheck_10225_;
goto v_resetjp_10219_;
}
else
{
lean_inc(v_a_10218_);
lean_dec(v___x_10197_);
v___x_10220_ = lean_box(0);
v_isShared_10221_ = v_isSharedCheck_10225_;
goto v_resetjp_10219_;
}
v_resetjp_10219_:
{
lean_object* v___x_10223_; 
if (v_isShared_10221_ == 0)
{
v___x_10223_ = v___x_10220_;
goto v_reusejp_10222_;
}
else
{
lean_object* v_reuseFailAlloc_10224_; 
v_reuseFailAlloc_10224_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10224_, 0, v_a_10218_);
v___x_10223_ = v_reuseFailAlloc_10224_;
goto v_reusejp_10222_;
}
v_reusejp_10222_:
{
return v___x_10223_;
}
}
}
}
}
else
{
lean_object* v_a_10226_; lean_object* v___x_10228_; uint8_t v_isShared_10229_; uint8_t v_isSharedCheck_10233_; 
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v_arg_10127_);
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v_a_10226_ = lean_ctor_get(v___x_10193_, 0);
v_isSharedCheck_10233_ = !lean_is_exclusive(v___x_10193_);
if (v_isSharedCheck_10233_ == 0)
{
v___x_10228_ = v___x_10193_;
v_isShared_10229_ = v_isSharedCheck_10233_;
goto v_resetjp_10227_;
}
else
{
lean_inc(v_a_10226_);
lean_dec(v___x_10193_);
v___x_10228_ = lean_box(0);
v_isShared_10229_ = v_isSharedCheck_10233_;
goto v_resetjp_10227_;
}
v_resetjp_10227_:
{
lean_object* v___x_10231_; 
if (v_isShared_10229_ == 0)
{
v___x_10231_ = v___x_10228_;
goto v_reusejp_10230_;
}
else
{
lean_object* v_reuseFailAlloc_10232_; 
v_reuseFailAlloc_10232_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10232_, 0, v_a_10226_);
v___x_10231_ = v_reuseFailAlloc_10232_;
goto v_reusejp_10230_;
}
v_reusejp_10230_:
{
return v___x_10231_;
}
}
}
}
}
else
{
lean_object* v___x_10234_; 
lean_dec_ref(v___x_10145_);
lean_inc(v___y_10066_);
lean_inc_ref(v___y_10065_);
lean_inc(v___y_10064_);
lean_inc_ref(v___y_10063_);
v___x_10234_ = l_Lean_Meta_getNatValue_x3f(v_arg_10127_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
lean_dec_ref(v_arg_10127_);
if (lean_obj_tag(v___x_10234_) == 0)
{
lean_object* v_a_10235_; lean_object* v___x_10237_; uint8_t v_isShared_10238_; uint8_t v_isSharedCheck_10281_; 
v_a_10235_ = lean_ctor_get(v___x_10234_, 0);
v_isSharedCheck_10281_ = !lean_is_exclusive(v___x_10234_);
if (v_isSharedCheck_10281_ == 0)
{
v___x_10237_ = v___x_10234_;
v_isShared_10238_ = v_isSharedCheck_10281_;
goto v_resetjp_10236_;
}
else
{
lean_inc(v_a_10235_);
lean_dec(v___x_10234_);
v___x_10237_ = lean_box(0);
v_isShared_10238_ = v_isSharedCheck_10281_;
goto v_resetjp_10236_;
}
v_resetjp_10236_:
{
if (lean_obj_tag(v_a_10235_) == 1)
{
lean_object* v_val_10239_; lean_object* v___x_10241_; uint8_t v_isShared_10242_; uint8_t v_isSharedCheck_10276_; 
lean_del_object(v___x_10237_);
v_val_10239_ = lean_ctor_get(v_a_10235_, 0);
v_isSharedCheck_10276_ = !lean_is_exclusive(v_a_10235_);
if (v_isSharedCheck_10276_ == 0)
{
v___x_10241_ = v_a_10235_;
v_isShared_10242_ = v_isSharedCheck_10276_;
goto v_resetjp_10240_;
}
else
{
lean_inc(v_val_10239_);
lean_dec(v_a_10235_);
v___x_10241_ = lean_box(0);
v_isShared_10242_ = v_isSharedCheck_10276_;
goto v_resetjp_10240_;
}
v_resetjp_10240_:
{
lean_object* v___x_10243_; 
lean_inc(v___y_10066_);
lean_inc_ref(v___y_10065_);
lean_inc(v___y_10064_);
lean_inc_ref(v___y_10063_);
lean_inc(v___y_10062_);
lean_inc_ref(v___y_10061_);
lean_inc(v___y_10060_);
lean_inc_ref(v___y_10059_);
lean_inc(v___y_10058_);
lean_inc(v___y_10057_);
lean_inc(v___y_10056_);
v___x_10243_ = l_Lean_Meta_Grind_Arith_CommRing_getPowFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__4(v___y_10056_, v___y_10057_, v___y_10058_, v___y_10059_, v___y_10060_, v___y_10061_, v___y_10062_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
if (lean_obj_tag(v___x_10243_) == 0)
{
lean_object* v_a_10244_; lean_object* v___x_10245_; uint8_t v___x_10246_; 
v_a_10244_ = lean_ctor_get(v___x_10243_, 0);
lean_inc(v_a_10244_);
lean_dec_ref(v___x_10243_);
v___x_10245_ = l_Lean_Expr_appArg_x21(v_a_10244_);
lean_dec(v_a_10244_);
v___x_10246_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_10245_, v_arg_10133_);
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v___x_10245_);
if (v___x_10246_ == 0)
{
lean_del_object(v___x_10241_);
lean_dec(v_val_10239_);
lean_dec_ref(v_arg_10130_);
v_e_10104_ = v_e_10055_;
v___y_10105_ = v___y_10056_;
v___y_10106_ = v___y_10057_;
v___y_10107_ = v___y_10058_;
v___y_10108_ = v___y_10059_;
v___y_10109_ = v___y_10060_;
v___y_10110_ = v___y_10061_;
v___y_10111_ = v___y_10062_;
v___y_10112_ = v___y_10063_;
v___y_10113_ = v___y_10064_;
v___y_10114_ = v___y_10065_;
v___y_10115_ = v___y_10066_;
goto v___jp_10103_;
}
else
{
lean_object* v___x_10247_; 
lean_dec_ref(v_e_10055_);
v___x_10247_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f_go___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__2(v_toVar_10071_, v_asVar_10144_, v_arg_10130_, v___y_10056_, v___y_10057_, v___y_10058_, v___y_10059_, v___y_10060_, v___y_10061_, v___y_10062_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
if (lean_obj_tag(v___x_10247_) == 0)
{
lean_object* v_a_10248_; lean_object* v___x_10250_; uint8_t v_isShared_10251_; uint8_t v_isSharedCheck_10259_; 
v_a_10248_ = lean_ctor_get(v___x_10247_, 0);
v_isSharedCheck_10259_ = !lean_is_exclusive(v___x_10247_);
if (v_isSharedCheck_10259_ == 0)
{
v___x_10250_ = v___x_10247_;
v_isShared_10251_ = v_isSharedCheck_10259_;
goto v_resetjp_10249_;
}
else
{
lean_inc(v_a_10248_);
lean_dec(v___x_10247_);
v___x_10250_ = lean_box(0);
v_isShared_10251_ = v_isSharedCheck_10259_;
goto v_resetjp_10249_;
}
v_resetjp_10249_:
{
lean_object* v___x_10252_; lean_object* v___x_10254_; 
v___x_10252_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_10252_, 0, v_a_10248_);
lean_ctor_set(v___x_10252_, 1, v_val_10239_);
if (v_isShared_10242_ == 0)
{
lean_ctor_set(v___x_10241_, 0, v___x_10252_);
v___x_10254_ = v___x_10241_;
goto v_reusejp_10253_;
}
else
{
lean_object* v_reuseFailAlloc_10258_; 
v_reuseFailAlloc_10258_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10258_, 0, v___x_10252_);
v___x_10254_ = v_reuseFailAlloc_10258_;
goto v_reusejp_10253_;
}
v_reusejp_10253_:
{
lean_object* v___x_10256_; 
if (v_isShared_10251_ == 0)
{
lean_ctor_set(v___x_10250_, 0, v___x_10254_);
v___x_10256_ = v___x_10250_;
goto v_reusejp_10255_;
}
else
{
lean_object* v_reuseFailAlloc_10257_; 
v_reuseFailAlloc_10257_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10257_, 0, v___x_10254_);
v___x_10256_ = v_reuseFailAlloc_10257_;
goto v_reusejp_10255_;
}
v_reusejp_10255_:
{
return v___x_10256_;
}
}
}
}
else
{
lean_object* v_a_10260_; lean_object* v___x_10262_; uint8_t v_isShared_10263_; uint8_t v_isSharedCheck_10267_; 
lean_del_object(v___x_10241_);
lean_dec(v_val_10239_);
v_a_10260_ = lean_ctor_get(v___x_10247_, 0);
v_isSharedCheck_10267_ = !lean_is_exclusive(v___x_10247_);
if (v_isSharedCheck_10267_ == 0)
{
v___x_10262_ = v___x_10247_;
v_isShared_10263_ = v_isSharedCheck_10267_;
goto v_resetjp_10261_;
}
else
{
lean_inc(v_a_10260_);
lean_dec(v___x_10247_);
v___x_10262_ = lean_box(0);
v_isShared_10263_ = v_isSharedCheck_10267_;
goto v_resetjp_10261_;
}
v_resetjp_10261_:
{
lean_object* v___x_10265_; 
if (v_isShared_10263_ == 0)
{
v___x_10265_ = v___x_10262_;
goto v_reusejp_10264_;
}
else
{
lean_object* v_reuseFailAlloc_10266_; 
v_reuseFailAlloc_10266_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10266_, 0, v_a_10260_);
v___x_10265_ = v_reuseFailAlloc_10266_;
goto v_reusejp_10264_;
}
v_reusejp_10264_:
{
return v___x_10265_;
}
}
}
}
}
else
{
lean_object* v_a_10268_; lean_object* v___x_10270_; uint8_t v_isShared_10271_; uint8_t v_isSharedCheck_10275_; 
lean_del_object(v___x_10241_);
lean_dec(v_val_10239_);
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v_arg_10130_);
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v_a_10268_ = lean_ctor_get(v___x_10243_, 0);
v_isSharedCheck_10275_ = !lean_is_exclusive(v___x_10243_);
if (v_isSharedCheck_10275_ == 0)
{
v___x_10270_ = v___x_10243_;
v_isShared_10271_ = v_isSharedCheck_10275_;
goto v_resetjp_10269_;
}
else
{
lean_inc(v_a_10268_);
lean_dec(v___x_10243_);
v___x_10270_ = lean_box(0);
v_isShared_10271_ = v_isSharedCheck_10275_;
goto v_resetjp_10269_;
}
v_resetjp_10269_:
{
lean_object* v___x_10273_; 
if (v_isShared_10271_ == 0)
{
v___x_10273_ = v___x_10270_;
goto v_reusejp_10272_;
}
else
{
lean_object* v_reuseFailAlloc_10274_; 
v_reuseFailAlloc_10274_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10274_, 0, v_a_10268_);
v___x_10273_ = v_reuseFailAlloc_10274_;
goto v_reusejp_10272_;
}
v_reusejp_10272_:
{
return v___x_10273_;
}
}
}
}
}
else
{
lean_object* v___x_10277_; lean_object* v___x_10279_; 
lean_dec(v_a_10235_);
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v_arg_10130_);
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v___x_10277_ = lean_box(0);
if (v_isShared_10238_ == 0)
{
lean_ctor_set(v___x_10237_, 0, v___x_10277_);
v___x_10279_ = v___x_10237_;
goto v_reusejp_10278_;
}
else
{
lean_object* v_reuseFailAlloc_10280_; 
v_reuseFailAlloc_10280_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10280_, 0, v___x_10277_);
v___x_10279_ = v_reuseFailAlloc_10280_;
goto v_reusejp_10278_;
}
v_reusejp_10278_:
{
return v___x_10279_;
}
}
}
}
else
{
lean_object* v_a_10282_; lean_object* v___x_10284_; uint8_t v_isShared_10285_; uint8_t v_isSharedCheck_10289_; 
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v_arg_10130_);
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v_a_10282_ = lean_ctor_get(v___x_10234_, 0);
v_isSharedCheck_10289_ = !lean_is_exclusive(v___x_10234_);
if (v_isSharedCheck_10289_ == 0)
{
v___x_10284_ = v___x_10234_;
v_isShared_10285_ = v_isSharedCheck_10289_;
goto v_resetjp_10283_;
}
else
{
lean_inc(v_a_10282_);
lean_dec(v___x_10234_);
v___x_10284_ = lean_box(0);
v_isShared_10285_ = v_isSharedCheck_10289_;
goto v_resetjp_10283_;
}
v_resetjp_10283_:
{
lean_object* v___x_10287_; 
if (v_isShared_10285_ == 0)
{
v___x_10287_ = v___x_10284_;
goto v_reusejp_10286_;
}
else
{
lean_object* v_reuseFailAlloc_10288_; 
v_reuseFailAlloc_10288_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10288_, 0, v_a_10282_);
v___x_10287_ = v_reuseFailAlloc_10288_;
goto v_reusejp_10286_;
}
v_reusejp_10286_:
{
return v___x_10287_;
}
}
}
}
}
}
}
}
else
{
lean_object* v___x_10290_; 
lean_dec_ref(v___x_10134_);
lean_dec_ref(v_arg_10133_);
lean_inc(v___y_10066_);
lean_inc_ref(v___y_10065_);
lean_inc(v___y_10064_);
lean_inc_ref(v___y_10063_);
lean_inc(v___y_10062_);
lean_inc_ref(v___y_10061_);
lean_inc(v___y_10060_);
lean_inc_ref(v___y_10059_);
lean_inc(v___y_10058_);
lean_inc(v___y_10057_);
lean_inc(v___y_10056_);
v___x_10290_ = l_Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5(v___y_10056_, v___y_10057_, v___y_10058_, v___y_10059_, v___y_10060_, v___y_10061_, v___y_10062_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
if (lean_obj_tag(v___x_10290_) == 0)
{
lean_object* v_a_10291_; lean_object* v___x_10292_; uint8_t v___x_10293_; 
v_a_10291_ = lean_ctor_get(v___x_10290_, 0);
lean_inc(v_a_10291_);
lean_dec_ref(v___x_10290_);
v___x_10292_ = l_Lean_Expr_appArg_x21(v_a_10291_);
lean_dec(v_a_10291_);
v___x_10293_ = l___private_Lean_Meta_Sym_ExprPtr_0__Lean_Meta_Sym_isSameExpr_unsafe__1(v___x_10292_, v_arg_10130_);
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v___x_10292_);
if (v___x_10293_ == 0)
{
lean_dec_ref(v_arg_10127_);
v_e_10104_ = v_e_10055_;
v___y_10105_ = v___y_10056_;
v___y_10106_ = v___y_10057_;
v___y_10107_ = v___y_10058_;
v___y_10108_ = v___y_10059_;
v___y_10109_ = v___y_10060_;
v___y_10110_ = v___y_10061_;
v___y_10111_ = v___y_10062_;
v___y_10112_ = v___y_10063_;
v___y_10113_ = v___y_10064_;
v___y_10114_ = v___y_10065_;
v___y_10115_ = v___y_10066_;
goto v___jp_10103_;
}
else
{
lean_object* v___x_10294_; 
lean_inc(v___y_10066_);
lean_inc_ref(v___y_10065_);
lean_inc(v___y_10064_);
lean_inc_ref(v___y_10063_);
v___x_10294_ = l_Lean_Meta_getNatValue_x3f(v_arg_10127_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
lean_dec_ref(v_arg_10127_);
if (lean_obj_tag(v___x_10294_) == 0)
{
lean_object* v_a_10295_; lean_object* v___x_10297_; uint8_t v_isShared_10298_; uint8_t v_isSharedCheck_10312_; 
v_a_10295_ = lean_ctor_get(v___x_10294_, 0);
v_isSharedCheck_10312_ = !lean_is_exclusive(v___x_10294_);
if (v_isSharedCheck_10312_ == 0)
{
v___x_10297_ = v___x_10294_;
v_isShared_10298_ = v_isSharedCheck_10312_;
goto v_resetjp_10296_;
}
else
{
lean_inc(v_a_10295_);
lean_dec(v___x_10294_);
v___x_10297_ = lean_box(0);
v_isShared_10298_ = v_isSharedCheck_10312_;
goto v_resetjp_10296_;
}
v_resetjp_10296_:
{
if (lean_obj_tag(v_a_10295_) == 1)
{
lean_object* v_val_10299_; lean_object* v___x_10301_; uint8_t v_isShared_10302_; uint8_t v_isSharedCheck_10311_; 
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v_val_10299_ = lean_ctor_get(v_a_10295_, 0);
v_isSharedCheck_10311_ = !lean_is_exclusive(v_a_10295_);
if (v_isSharedCheck_10311_ == 0)
{
v___x_10301_ = v_a_10295_;
v_isShared_10302_ = v_isSharedCheck_10311_;
goto v_resetjp_10300_;
}
else
{
lean_inc(v_val_10299_);
lean_dec(v_a_10295_);
v___x_10301_ = lean_box(0);
v_isShared_10302_ = v_isSharedCheck_10311_;
goto v_resetjp_10300_;
}
v_resetjp_10300_:
{
lean_object* v___x_10303_; lean_object* v___x_10304_; lean_object* v___x_10306_; 
v___x_10303_ = lean_nat_to_int(v_val_10299_);
v___x_10304_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_10304_, 0, v___x_10303_);
if (v_isShared_10302_ == 0)
{
lean_ctor_set(v___x_10301_, 0, v___x_10304_);
v___x_10306_ = v___x_10301_;
goto v_reusejp_10305_;
}
else
{
lean_object* v_reuseFailAlloc_10310_; 
v_reuseFailAlloc_10310_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10310_, 0, v___x_10304_);
v___x_10306_ = v_reuseFailAlloc_10310_;
goto v_reusejp_10305_;
}
v_reusejp_10305_:
{
lean_object* v___x_10308_; 
if (v_isShared_10298_ == 0)
{
lean_ctor_set(v___x_10297_, 0, v___x_10306_);
v___x_10308_ = v___x_10297_;
goto v_reusejp_10307_;
}
else
{
lean_object* v_reuseFailAlloc_10309_; 
v_reuseFailAlloc_10309_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10309_, 0, v___x_10306_);
v___x_10308_ = v_reuseFailAlloc_10309_;
goto v_reusejp_10307_;
}
v_reusejp_10307_:
{
return v___x_10308_;
}
}
}
}
else
{
lean_del_object(v___x_10297_);
lean_dec(v_a_10295_);
v_e_10073_ = v_e_10055_;
v___y_10074_ = v___y_10056_;
v___y_10075_ = v___y_10057_;
v___y_10076_ = v___y_10058_;
v___y_10077_ = v___y_10059_;
v___y_10078_ = v___y_10060_;
v___y_10079_ = v___y_10061_;
v___y_10080_ = v___y_10062_;
v___y_10081_ = v___y_10063_;
v___y_10082_ = v___y_10064_;
v___y_10083_ = v___y_10065_;
v___y_10084_ = v___y_10066_;
goto v___jp_10072_;
}
}
}
else
{
lean_object* v_a_10313_; lean_object* v___x_10315_; uint8_t v_isShared_10316_; uint8_t v_isSharedCheck_10320_; 
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v_a_10313_ = lean_ctor_get(v___x_10294_, 0);
v_isSharedCheck_10320_ = !lean_is_exclusive(v___x_10294_);
if (v_isSharedCheck_10320_ == 0)
{
v___x_10315_ = v___x_10294_;
v_isShared_10316_ = v_isSharedCheck_10320_;
goto v_resetjp_10314_;
}
else
{
lean_inc(v_a_10313_);
lean_dec(v___x_10294_);
v___x_10315_ = lean_box(0);
v_isShared_10316_ = v_isSharedCheck_10320_;
goto v_resetjp_10314_;
}
v_resetjp_10314_:
{
lean_object* v___x_10318_; 
if (v_isShared_10316_ == 0)
{
v___x_10318_ = v___x_10315_;
goto v_reusejp_10317_;
}
else
{
lean_object* v_reuseFailAlloc_10319_; 
v_reuseFailAlloc_10319_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10319_, 0, v_a_10313_);
v___x_10318_ = v_reuseFailAlloc_10319_;
goto v_reusejp_10317_;
}
v_reusejp_10317_:
{
return v___x_10318_;
}
}
}
}
}
else
{
lean_object* v_a_10321_; lean_object* v___x_10323_; uint8_t v_isShared_10324_; uint8_t v_isSharedCheck_10328_; 
lean_dec_ref(v_arg_10130_);
lean_dec_ref(v_arg_10127_);
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v_a_10321_ = lean_ctor_get(v___x_10290_, 0);
v_isSharedCheck_10328_ = !lean_is_exclusive(v___x_10290_);
if (v_isSharedCheck_10328_ == 0)
{
v___x_10323_ = v___x_10290_;
v_isShared_10324_ = v_isSharedCheck_10328_;
goto v_resetjp_10322_;
}
else
{
lean_inc(v_a_10321_);
lean_dec(v___x_10290_);
v___x_10323_ = lean_box(0);
v_isShared_10324_ = v_isSharedCheck_10328_;
goto v_resetjp_10322_;
}
v_resetjp_10322_:
{
lean_object* v___x_10326_; 
if (v_isShared_10324_ == 0)
{
v___x_10326_ = v___x_10323_;
goto v_reusejp_10325_;
}
else
{
lean_object* v_reuseFailAlloc_10327_; 
v_reuseFailAlloc_10327_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10327_, 0, v_a_10321_);
v___x_10326_ = v_reuseFailAlloc_10327_;
goto v_reusejp_10325_;
}
v_reusejp_10325_:
{
return v___x_10326_;
}
}
}
}
}
else
{
lean_object* v___x_10329_; 
lean_dec_ref(v___x_10134_);
lean_dec_ref(v_arg_10133_);
lean_dec_ref(v_arg_10127_);
lean_inc(v___y_10066_);
lean_inc_ref(v___y_10065_);
lean_inc(v___y_10064_);
lean_inc_ref(v___y_10063_);
v___x_10329_ = l_Lean_Meta_getNatValue_x3f(v_arg_10130_, v___y_10063_, v___y_10064_, v___y_10065_, v___y_10066_);
lean_dec_ref(v_arg_10130_);
if (lean_obj_tag(v___x_10329_) == 0)
{
lean_object* v_a_10330_; lean_object* v___x_10332_; uint8_t v_isShared_10333_; uint8_t v_isSharedCheck_10347_; 
v_a_10330_ = lean_ctor_get(v___x_10329_, 0);
v_isSharedCheck_10347_ = !lean_is_exclusive(v___x_10329_);
if (v_isSharedCheck_10347_ == 0)
{
v___x_10332_ = v___x_10329_;
v_isShared_10333_ = v_isSharedCheck_10347_;
goto v_resetjp_10331_;
}
else
{
lean_inc(v_a_10330_);
lean_dec(v___x_10329_);
v___x_10332_ = lean_box(0);
v_isShared_10333_ = v_isSharedCheck_10347_;
goto v_resetjp_10331_;
}
v_resetjp_10331_:
{
if (lean_obj_tag(v_a_10330_) == 1)
{
lean_object* v_val_10334_; lean_object* v___x_10336_; uint8_t v_isShared_10337_; uint8_t v_isSharedCheck_10346_; 
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v_val_10334_ = lean_ctor_get(v_a_10330_, 0);
v_isSharedCheck_10346_ = !lean_is_exclusive(v_a_10330_);
if (v_isSharedCheck_10346_ == 0)
{
v___x_10336_ = v_a_10330_;
v_isShared_10337_ = v_isSharedCheck_10346_;
goto v_resetjp_10335_;
}
else
{
lean_inc(v_val_10334_);
lean_dec(v_a_10330_);
v___x_10336_ = lean_box(0);
v_isShared_10337_ = v_isSharedCheck_10346_;
goto v_resetjp_10335_;
}
v_resetjp_10335_:
{
lean_object* v___x_10338_; lean_object* v___x_10339_; lean_object* v___x_10341_; 
v___x_10338_ = lean_nat_to_int(v_val_10334_);
v___x_10339_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_10339_, 0, v___x_10338_);
if (v_isShared_10337_ == 0)
{
lean_ctor_set(v___x_10336_, 0, v___x_10339_);
v___x_10341_ = v___x_10336_;
goto v_reusejp_10340_;
}
else
{
lean_object* v_reuseFailAlloc_10345_; 
v_reuseFailAlloc_10345_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10345_, 0, v___x_10339_);
v___x_10341_ = v_reuseFailAlloc_10345_;
goto v_reusejp_10340_;
}
v_reusejp_10340_:
{
lean_object* v___x_10343_; 
if (v_isShared_10333_ == 0)
{
lean_ctor_set(v___x_10332_, 0, v___x_10341_);
v___x_10343_ = v___x_10332_;
goto v_reusejp_10342_;
}
else
{
lean_object* v_reuseFailAlloc_10344_; 
v_reuseFailAlloc_10344_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10344_, 0, v___x_10341_);
v___x_10343_ = v_reuseFailAlloc_10344_;
goto v_reusejp_10342_;
}
v_reusejp_10342_:
{
return v___x_10343_;
}
}
}
}
else
{
lean_del_object(v___x_10332_);
lean_dec(v_a_10330_);
v_e_10104_ = v_e_10055_;
v___y_10105_ = v___y_10056_;
v___y_10106_ = v___y_10057_;
v___y_10107_ = v___y_10058_;
v___y_10108_ = v___y_10059_;
v___y_10109_ = v___y_10060_;
v___y_10110_ = v___y_10061_;
v___y_10111_ = v___y_10062_;
v___y_10112_ = v___y_10063_;
v___y_10113_ = v___y_10064_;
v___y_10114_ = v___y_10065_;
v___y_10115_ = v___y_10066_;
goto v___jp_10103_;
}
}
}
else
{
lean_object* v_a_10348_; lean_object* v___x_10350_; uint8_t v_isShared_10351_; uint8_t v_isSharedCheck_10355_; 
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v_a_10348_ = lean_ctor_get(v___x_10329_, 0);
v_isSharedCheck_10355_ = !lean_is_exclusive(v___x_10329_);
if (v_isSharedCheck_10355_ == 0)
{
v___x_10350_ = v___x_10329_;
v_isShared_10351_ = v_isSharedCheck_10355_;
goto v_resetjp_10349_;
}
else
{
lean_inc(v_a_10348_);
lean_dec(v___x_10329_);
v___x_10350_ = lean_box(0);
v_isShared_10351_ = v_isSharedCheck_10355_;
goto v_resetjp_10349_;
}
v_resetjp_10349_:
{
lean_object* v___x_10353_; 
if (v_isShared_10351_ == 0)
{
v___x_10353_ = v___x_10350_;
goto v_reusejp_10352_;
}
else
{
lean_object* v_reuseFailAlloc_10354_; 
v_reuseFailAlloc_10354_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10354_, 0, v_a_10348_);
v___x_10353_ = v_reuseFailAlloc_10354_;
goto v_reusejp_10352_;
}
v_reusejp_10352_:
{
return v___x_10353_;
}
}
}
}
}
}
}
v___jp_10072_:
{
lean_object* v___x_10085_; 
v___x_10085_ = l_Lean_Meta_Grind_Arith_CommRing_reifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncreify_x3f_spec__0___lam__1(v_mkVar_10070_, v_e_10073_, v___y_10074_, v___y_10075_, v___y_10076_, v___y_10077_, v___y_10078_, v___y_10079_, v___y_10080_, v___y_10081_, v___y_10082_, v___y_10083_, v___y_10084_);
if (lean_obj_tag(v___x_10085_) == 0)
{
lean_object* v_a_10086_; lean_object* v___x_10088_; uint8_t v_isShared_10089_; uint8_t v_isSharedCheck_10094_; 
v_a_10086_ = lean_ctor_get(v___x_10085_, 0);
v_isSharedCheck_10094_ = !lean_is_exclusive(v___x_10085_);
if (v_isSharedCheck_10094_ == 0)
{
v___x_10088_ = v___x_10085_;
v_isShared_10089_ = v_isSharedCheck_10094_;
goto v_resetjp_10087_;
}
else
{
lean_inc(v_a_10086_);
lean_dec(v___x_10085_);
v___x_10088_ = lean_box(0);
v_isShared_10089_ = v_isSharedCheck_10094_;
goto v_resetjp_10087_;
}
v_resetjp_10087_:
{
lean_object* v___x_10090_; lean_object* v___x_10092_; 
v___x_10090_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_10090_, 0, v_a_10086_);
if (v_isShared_10089_ == 0)
{
lean_ctor_set(v___x_10088_, 0, v___x_10090_);
v___x_10092_ = v___x_10088_;
goto v_reusejp_10091_;
}
else
{
lean_object* v_reuseFailAlloc_10093_; 
v_reuseFailAlloc_10093_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10093_, 0, v___x_10090_);
v___x_10092_ = v_reuseFailAlloc_10093_;
goto v_reusejp_10091_;
}
v_reusejp_10091_:
{
return v___x_10092_;
}
}
}
else
{
lean_object* v_a_10095_; lean_object* v___x_10097_; uint8_t v_isShared_10098_; uint8_t v_isSharedCheck_10102_; 
v_a_10095_ = lean_ctor_get(v___x_10085_, 0);
v_isSharedCheck_10102_ = !lean_is_exclusive(v___x_10085_);
if (v_isSharedCheck_10102_ == 0)
{
v___x_10097_ = v___x_10085_;
v_isShared_10098_ = v_isSharedCheck_10102_;
goto v_resetjp_10096_;
}
else
{
lean_inc(v_a_10095_);
lean_dec(v___x_10085_);
v___x_10097_ = lean_box(0);
v_isShared_10098_ = v_isSharedCheck_10102_;
goto v_resetjp_10096_;
}
v_resetjp_10096_:
{
lean_object* v___x_10100_; 
if (v_isShared_10098_ == 0)
{
v___x_10100_ = v___x_10097_;
goto v_reusejp_10099_;
}
else
{
lean_object* v_reuseFailAlloc_10101_; 
v_reuseFailAlloc_10101_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10101_, 0, v_a_10095_);
v___x_10100_ = v_reuseFailAlloc_10101_;
goto v_reusejp_10099_;
}
v_reusejp_10099_:
{
return v___x_10100_;
}
}
}
}
v___jp_10103_:
{
lean_object* v___x_10116_; 
lean_inc_ref(v_e_10104_);
v___x_10116_ = l___private_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify_0__Lean_Meta_Grind_Arith_CommRing_reportSAppIssue___redArg(v_e_10104_, v___y_10107_, v___y_10108_, v___y_10109_, v___y_10110_, v___y_10111_, v___y_10112_, v___y_10113_, v___y_10114_, v___y_10115_);
if (lean_obj_tag(v___x_10116_) == 0)
{
lean_dec_ref(v___x_10116_);
v_e_10073_ = v_e_10104_;
v___y_10074_ = v___y_10105_;
v___y_10075_ = v___y_10106_;
v___y_10076_ = v___y_10107_;
v___y_10077_ = v___y_10108_;
v___y_10078_ = v___y_10109_;
v___y_10079_ = v___y_10110_;
v___y_10080_ = v___y_10111_;
v___y_10081_ = v___y_10112_;
v___y_10082_ = v___y_10113_;
v___y_10083_ = v___y_10114_;
v___y_10084_ = v___y_10115_;
goto v___jp_10072_;
}
else
{
lean_object* v_a_10117_; lean_object* v___x_10119_; uint8_t v_isShared_10120_; uint8_t v_isSharedCheck_10124_; 
lean_dec(v___y_10115_);
lean_dec_ref(v___y_10114_);
lean_dec(v___y_10113_);
lean_dec_ref(v___y_10112_);
lean_dec(v___y_10111_);
lean_dec_ref(v___y_10110_);
lean_dec(v___y_10109_);
lean_dec_ref(v___y_10108_);
lean_dec(v___y_10107_);
lean_dec(v___y_10106_);
lean_dec(v___y_10105_);
lean_dec_ref(v_e_10104_);
v_a_10117_ = lean_ctor_get(v___x_10116_, 0);
v_isSharedCheck_10124_ = !lean_is_exclusive(v___x_10116_);
if (v_isSharedCheck_10124_ == 0)
{
v___x_10119_ = v___x_10116_;
v_isShared_10120_ = v_isSharedCheck_10124_;
goto v_resetjp_10118_;
}
else
{
lean_inc(v_a_10117_);
lean_dec(v___x_10116_);
v___x_10119_ = lean_box(0);
v_isShared_10120_ = v_isSharedCheck_10124_;
goto v_resetjp_10118_;
}
v_resetjp_10118_:
{
lean_object* v___x_10122_; 
if (v_isShared_10120_ == 0)
{
v___x_10122_ = v___x_10119_;
goto v_reusejp_10121_;
}
else
{
lean_object* v_reuseFailAlloc_10123_; 
v_reuseFailAlloc_10123_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10123_, 0, v_a_10117_);
v___x_10122_ = v_reuseFailAlloc_10123_;
goto v_reusejp_10121_;
}
v_reusejp_10121_:
{
return v___x_10122_;
}
}
}
}
}
else
{
lean_object* v_a_10356_; lean_object* v___x_10358_; uint8_t v_isShared_10359_; uint8_t v_isSharedCheck_10363_; 
lean_dec(v___y_10066_);
lean_dec_ref(v___y_10065_);
lean_dec(v___y_10064_);
lean_dec_ref(v___y_10063_);
lean_dec(v___y_10062_);
lean_dec_ref(v___y_10061_);
lean_dec(v___y_10060_);
lean_dec_ref(v___y_10059_);
lean_dec(v___y_10058_);
lean_dec(v___y_10057_);
lean_dec(v___y_10056_);
lean_dec_ref(v_e_10055_);
v_a_10356_ = lean_ctor_get(v___x_10068_, 0);
v_isSharedCheck_10363_ = !lean_is_exclusive(v___x_10068_);
if (v_isSharedCheck_10363_ == 0)
{
v___x_10358_ = v___x_10068_;
v_isShared_10359_ = v_isSharedCheck_10363_;
goto v_resetjp_10357_;
}
else
{
lean_inc(v_a_10356_);
lean_dec(v___x_10068_);
v___x_10358_ = lean_box(0);
v_isShared_10359_ = v_isSharedCheck_10363_;
goto v_resetjp_10357_;
}
v_resetjp_10357_:
{
lean_object* v___x_10361_; 
if (v_isShared_10359_ == 0)
{
v___x_10361_ = v___x_10358_;
goto v_reusejp_10360_;
}
else
{
lean_object* v_reuseFailAlloc_10362_; 
v_reuseFailAlloc_10362_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_10362_, 0, v_a_10356_);
v___x_10361_ = v_reuseFailAlloc_10362_;
goto v_reusejp_10360_;
}
v_reusejp_10360_:
{
return v___x_10361_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0___boxed(lean_object* v_e_10364_, lean_object* v___y_10365_, lean_object* v___y_10366_, lean_object* v___y_10367_, lean_object* v___y_10368_, lean_object* v___y_10369_, lean_object* v___y_10370_, lean_object* v___y_10371_, lean_object* v___y_10372_, lean_object* v___y_10373_, lean_object* v___y_10374_, lean_object* v___y_10375_, lean_object* v___y_10376_){
_start:
{
lean_object* v_res_10377_; 
v_res_10377_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0(v_e_10364_, v___y_10365_, v___y_10366_, v___y_10367_, v___y_10368_, v___y_10369_, v___y_10370_, v___y_10371_, v___y_10372_, v___y_10373_, v___y_10374_, v___y_10375_);
return v_res_10377_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f(lean_object* v_e_10378_, lean_object* v_a_10379_, lean_object* v_a_10380_, lean_object* v_a_10381_, lean_object* v_a_10382_, lean_object* v_a_10383_, lean_object* v_a_10384_, lean_object* v_a_10385_, lean_object* v_a_10386_, lean_object* v_a_10387_, lean_object* v_a_10388_, lean_object* v_a_10389_){
_start:
{
lean_object* v___x_10391_; 
v___x_10391_ = l_Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0(v_e_10378_, v_a_10379_, v_a_10380_, v_a_10381_, v_a_10382_, v_a_10383_, v_a_10384_, v_a_10385_, v_a_10386_, v_a_10387_, v_a_10388_, v_a_10389_);
return v___x_10391_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f___boxed(lean_object* v_e_10392_, lean_object* v_a_10393_, lean_object* v_a_10394_, lean_object* v_a_10395_, lean_object* v_a_10396_, lean_object* v_a_10397_, lean_object* v_a_10398_, lean_object* v_a_10399_, lean_object* v_a_10400_, lean_object* v_a_10401_, lean_object* v_a_10402_, lean_object* v_a_10403_, lean_object* v_a_10404_){
_start:
{
lean_object* v_res_10405_; 
v_res_10405_ = l_Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f(v_e_10392_, v_a_10393_, v_a_10394_, v_a_10395_, v_a_10396_, v_a_10397_, v_a_10398_, v_a_10399_, v_a_10400_, v_a_10401_, v_a_10402_, v_a_10403_);
return v_res_10405_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8(lean_object* v_u_10406_, lean_object* v_type_10407_, lean_object* v_semiringInst_10408_, lean_object* v___y_10409_, lean_object* v___y_10410_, lean_object* v___y_10411_, lean_object* v___y_10412_, lean_object* v___y_10413_, lean_object* v___y_10414_, lean_object* v___y_10415_, lean_object* v___y_10416_, lean_object* v___y_10417_, lean_object* v___y_10418_, lean_object* v___y_10419_){
_start:
{
lean_object* v___x_10421_; 
v___x_10421_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8___redArg(v_u_10406_, v_type_10407_, v_semiringInst_10408_, v___y_10410_, v___y_10411_, v___y_10412_, v___y_10413_, v___y_10414_, v___y_10415_, v___y_10416_, v___y_10417_, v___y_10418_, v___y_10419_);
return v___x_10421_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8___boxed(lean_object* v_u_10422_, lean_object* v_type_10423_, lean_object* v_semiringInst_10424_, lean_object* v___y_10425_, lean_object* v___y_10426_, lean_object* v___y_10427_, lean_object* v___y_10428_, lean_object* v___y_10429_, lean_object* v___y_10430_, lean_object* v___y_10431_, lean_object* v___y_10432_, lean_object* v___y_10433_, lean_object* v___y_10434_, lean_object* v___y_10435_, lean_object* v___y_10436_){
_start:
{
lean_object* v_res_10437_; 
v_res_10437_ = l_Lean_Meta_Grind_Arith_CommRing_mkNatCastFn___at___00Lean_Meta_Grind_Arith_CommRing_getNatCastFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__5_spec__8(v_u_10422_, v_type_10423_, v_semiringInst_10424_, v___y_10425_, v___y_10426_, v___y_10427_, v___y_10428_, v___y_10429_, v___y_10430_, v___y_10431_, v___y_10432_, v___y_10433_, v___y_10434_, v___y_10435_);
lean_dec(v___y_10425_);
return v_res_10437_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9(lean_object* v_00_u03b1_10438_, lean_object* v_msg_10439_, lean_object* v___y_10440_, lean_object* v___y_10441_, lean_object* v___y_10442_, lean_object* v___y_10443_, lean_object* v___y_10444_, lean_object* v___y_10445_, lean_object* v___y_10446_, lean_object* v___y_10447_, lean_object* v___y_10448_, lean_object* v___y_10449_, lean_object* v___y_10450_){
_start:
{
lean_object* v___x_10452_; 
v___x_10452_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___redArg(v_msg_10439_, v___y_10447_, v___y_10448_, v___y_10449_, v___y_10450_);
return v___x_10452_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9___boxed(lean_object* v_00_u03b1_10453_, lean_object* v_msg_10454_, lean_object* v___y_10455_, lean_object* v___y_10456_, lean_object* v___y_10457_, lean_object* v___y_10458_, lean_object* v___y_10459_, lean_object* v___y_10460_, lean_object* v___y_10461_, lean_object* v___y_10462_, lean_object* v___y_10463_, lean_object* v___y_10464_, lean_object* v___y_10465_, lean_object* v___y_10466_){
_start:
{
lean_object* v_res_10467_; 
v_res_10467_ = l_Lean_throwError___at___00Lean_Meta_Grind_Arith_CommRing_MonadCanon_synthInstance___at___00Lean_Meta_Grind_Arith_CommRing_mkBinHomoFn___at___00Lean_Meta_Grind_Arith_CommRing_getAddFn_x27___at___00Lean_Meta_Grind_Arith_CommRing_sreifyCore_x3f___at___00Lean_Meta_Grind_Arith_CommRing_ncsreify_x3f_spec__0_spec__1_spec__2_spec__3_spec__9(v_00_u03b1_10453_, v_msg_10454_, v___y_10455_, v___y_10456_, v___y_10457_, v___y_10458_, v___y_10459_, v___y_10460_, v___y_10461_, v___y_10462_, v___y_10463_, v___y_10464_, v___y_10465_);
lean_dec(v___y_10465_);
lean_dec_ref(v___y_10464_);
lean_dec(v___y_10463_);
lean_dec_ref(v___y_10462_);
lean_dec(v___y_10461_);
lean_dec_ref(v___y_10460_);
lean_dec(v___y_10459_);
lean_dec_ref(v___y_10458_);
lean_dec(v___y_10457_);
lean_dec(v___y_10456_);
lean_dec(v___y_10455_);
return v_res_10467_;
}
}
lean_object* runtime_initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_NonCommRingM(uint8_t builtin);
lean_object* runtime_initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_NonCommSemiringM(uint8_t builtin);
static bool _G_runtime_initialized = false;
LEAN_EXPORT lean_object* runtime_initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify(uint8_t builtin) {
lean_object * res;
if (_G_runtime_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_runtime_initialized = true;
res = runtime_initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_NonCommRingM(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = runtime_initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_NonCommSemiringM(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
return lean_io_result_mk_ok(lean_box(0));
}
static bool _G_meta_initialized = false;
LEAN_EXPORT lean_object* meta_initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify(uint8_t builtin) {
lean_object * res;
if (_G_meta_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_meta_initialized = true;
return lean_io_result_mk_ok(lean_box(0));
}
lean_object* initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_NonCommRingM(uint8_t builtin);
lean_object* initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_NonCommSemiringM(uint8_t builtin);
static bool _G_initialized = false;
LEAN_EXPORT lean_object* initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify(uint8_t builtin) {
lean_object * res;
if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_initialized = true;
res = initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_NonCommRingM(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_NonCommSemiringM(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = runtime_initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = meta_initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
return initialize_Lean_Meta_Tactic_Grind_Arith_CommRing_Reify(builtin);
}
#ifdef __cplusplus
}
#endif
