diff --git a/stage0/src/Init/Meta.lean b/stage0/src/Init/Meta.lean index 1a279f6278..2ce23b8dcb 100644 --- a/stage0/src/Init/Meta.lean +++ b/stage0/src/Init/Meta.lean @@ -794,4 +794,5 @@ def expandInterpolatedStr (interpStr : Syntax) (type : Syntax) (toTypeFn : Synta def getSepArgs (stx : Syntax) : Array Syntax := stx.getArgs.getSepElems -end Lean.Syntax +end Syntax +end Lean diff --git a/stage0/src/Lean/Elab/Command.lean b/stage0/src/Lean/Elab/Command.lean index 6d8eeb9e7c..a46cf84e38 100644 --- a/stage0/src/Lean/Elab/Command.lean +++ b/stage0/src/Lean/Elab/Command.lean @@ -121,7 +121,8 @@ private def ioErrorToMessage (ctx : Context) (ref : Syntax) (err : IO.Error) : M let ctx ← read IO.toEIO (fun (ex : IO.Error) => Exception.error ctx.ref ex.toString) x -instance : MonadLiftT IO CommandElabM := { monadLift := liftIO } +instance : MonadLiftT IO CommandElabM where + monadLift := liftIO def getScope : CommandElabM Scope := do pure (← get).scopes.head! diff --git a/stage0/src/Lean/Elab/DeclUtil.lean b/stage0/src/Lean/Elab/DeclUtil.lean index 67b6f16fdb..ce0c7ad3ec 100644 --- a/stage0/src/Lean/Elab/DeclUtil.lean +++ b/stage0/src/Lean/Elab/DeclUtil.lean @@ -17,7 +17,7 @@ def forallTelescopeCompatibleAux {α} (k : Array Expr → Expr → Expr → Meta unless n₁ == n₂ do throwError! "parameter name mismatch '{n₁}', expected '{n₂}'" unless (← isDefEq d₁ d₂) do - throwError! "type mismatch at parameter '{n₁}'{indentExpr d₁}\nexpected type{indentExpr d₂}" + throwError! "parameter '{n₁}' {← mkHasTypeButIsExpectedMsg d₁ d₂}" unless c₁.binderInfo == c₂.binderInfo do throwError! "binder annotation mismatch at parameter '{n₁}'" withLocalDecl n₁ c₁.binderInfo d₁ fun x => diff --git a/stage0/src/Lean/Elab/Deriving.lean b/stage0/src/Lean/Elab/Deriving.lean index bbca818a5f..de069d1c17 100644 --- a/stage0/src/Lean/Elab/Deriving.lean +++ b/stage0/src/Lean/Elab/Deriving.lean @@ -7,3 +7,4 @@ import Lean.Elab.Deriving.Basic import Lean.Elab.Deriving.Util import Lean.Elab.Deriving.Inhabited import Lean.Elab.Deriving.BEq +import Lean.Elab.Deriving.DecEq diff --git a/stage0/src/Lean/Elab/Deriving/BEq.lean b/stage0/src/Lean/Elab/Deriving/BEq.lean index ff59524da0..3f9169b031 100644 --- a/stage0/src/Lean/Elab/Deriving/BEq.lean +++ b/stage0/src/Lean/Elab/Deriving/BEq.lean @@ -11,44 +11,16 @@ namespace Lean.Elab.Deriving.BEq open Lean.Parser.Term open Meta -structure Header where - binders : Array Syntax - argNames : Array Name - target1Name : Name - target2Name : Name +open Binary (Header mkDiscrs) def mkHeader (ctx : Context) (indVal : InductiveVal) : TermElabM Header := do - let argNames ← mkInductArgNames indVal - let binders ← mkImplicitBinders argNames - let targetType ← mkInductiveApp indVal argNames - let target1Name ← mkFreshUserName `x - let target2Name ← mkFreshUserName `y - let binders := binders ++ (← mkInstImplicitBinders `BEq indVal argNames) - let target1Binder ← `(explicitBinderF| ($(mkIdent target1Name) : $targetType)) - let target2Binder ← `(explicitBinderF| ($(mkIdent target2Name) : $targetType)) - let binders := binders ++ #[target1Binder, target2Binder] - return { - binders := binders - argNames := argNames - target1Name := target1Name - target2Name := target2Name - } + Binary.mkHeader ctx `BEq indVal -def mkMatch (ctx : Context) (header : Header) (indVal : InductiveVal) (auxFunName : Name) (argNames : Array Name) : TermElabM Syntax := do - let discrs ← mkDiscrs +def mkMatch (ctx : Context) (header : Header) (indVal : InductiveVal) (auxFunName : Name) : TermElabM Syntax := do + let discrs ← mkDiscrs header indVal let alts ← mkAlts `(match $[$discrs],* with $alts:matchAlt*) where - mkDiscr (varName : Name) : TermElabM Syntax := - `(Parser.Term.matchDiscr| $(mkIdent varName):term) - - mkDiscrs : TermElabM (Array Syntax) := do - let mut discrs := #[] - -- add indices - for argName in argNames[indVal.nparams:] do - discrs := discrs.push (← mkDiscr argName) - return discrs ++ #[← mkDiscr header.target1Name, ← mkDiscr header.target2Name] - mkElseAlt : TermElabM Syntax := do let mut patterns := #[] -- add `_` pattern for indices @@ -102,7 +74,7 @@ def mkAuxFunction (ctx : Context) (i : Nat) : TermElabM Syntax := do let auxFunName ← ctx.auxFunNames[i] let indVal ← ctx.typeInfos[i] let header ← mkHeader ctx indVal - let mut body ← mkMatch ctx header indVal auxFunName header.argNames + let mut body ← mkMatch ctx header indVal auxFunName if ctx.usePartial then let letDecls ← mkLocalInstanceLetDecls ctx `BEq header.argNames body ← mkLet letDecls body @@ -122,7 +94,7 @@ def mkMutualBlock (ctx : Context) : TermElabM Syntax := do end) private def mkBEqInstanceCmds (declNames : Array Name) : TermElabM (Array Syntax) := do - let ctx ← mkContext declNames[0] + let ctx ← mkContext "beq" declNames[0] let cmds := #[← mkMutualBlock ctx] ++ (← mkInstanceCmds ctx `BEq declNames) trace[Elab.Deriving.beq]! "\n{cmds}" return cmds diff --git a/stage0/src/Lean/Elab/Deriving/DecEq.lean b/stage0/src/Lean/Elab/Deriving/DecEq.lean new file mode 100644 index 0000000000..73237d8581 --- /dev/null +++ b/stage0/src/Lean/Elab/Deriving/DecEq.lean @@ -0,0 +1,113 @@ +/- +Copyright (c) 2020 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Leonardo de Moura +-/ +import Lean.Meta.Transform +import Lean.Meta.Inductive +import Lean.Elab.Deriving.Basic +import Lean.Elab.Deriving.Util + +namespace Lean.Elab.Deriving.DecEq +open Lean.Parser.Term +open Meta +open Binary (Header mkDiscrs) + +def mkHeader (ctx : Context) (indVal : InductiveVal) : TermElabM Header := do + Binary.mkHeader ctx `DecidableEq indVal + +def mkMatch (ctx : Context) (header : Header) (indVal : InductiveVal) (auxFunName : Name) (argNames : Array Name) : TermElabM Syntax := do + let discrs ← mkDiscrs header indVal + let alts ← mkAlts + `(match $[$discrs],* with $alts:matchAlt*) +where + mkSameCtorRhs : List (Syntax × Syntax × Bool) → TermElabM Syntax + | [] => `(isTrue rfl) + | (a, b, false) :: todo => withFreshMacroScope do + `(if h : $a = $b then + by subst h; exact $(← mkSameCtorRhs todo):term + else + isFalse (by intro n; injection n; apply h _; assumption)) + | (a, b, true) :: todo => withFreshMacroScope do + `(@dite _ _ ($(mkIdent auxFunName) $a $b) + (fun h => by subst h; exact $(← mkSameCtorRhs todo):term) + (fun h => isFalse (by intro n; injection n; apply h _; assumption))) + + mkAlts : TermElabM (Array Syntax) := do + let mut alts := #[] + for ctorName₁ in indVal.ctors do + let ctorInfo ← getConstInfoCtor ctorName₁ + for ctorName₂ in indVal.ctors do + let mut patterns := #[] + -- add `_` pattern for indices + for i in [:indVal.nindices] do + patterns := patterns.push (← `(_)) + if ctorName₁ == ctorName₂ then + let alt ← forallTelescopeReducing ctorInfo.type fun xs type => do + let type ← Core.betaReduce type -- we 'beta-reduce' to eliminate "artificial" dependencies + let mut patterns := patterns + let mut ctorArgs1 := #[] + let mut ctorArgs2 := #[] + -- add `_` for inductive parameters, they are inaccessible + for i in [:indVal.nparams] do + ctorArgs1 := ctorArgs1.push (← `(_)) + ctorArgs2 := ctorArgs2.push (← `(_)) + let mut todo := #[] + for i in [:ctorInfo.nfields] do + let x := xs[indVal.nparams + i] + if type.containsFVar x.fvarId! then + -- If resulting type depends on this field, we don't need to compare + ctorArgs1 := ctorArgs1.push (← `(_)) + ctorArgs2 := ctorArgs2.push (← `(_)) + else + let a := mkIdent (← mkFreshUserName `a) + let b := mkIdent (← mkFreshUserName `b) + ctorArgs1 := ctorArgs1.push a + ctorArgs2 := ctorArgs2.push b + let recField := (← inferType x).isAppOf indVal.name + todo := todo.push (a, b, recField) + patterns := patterns.push (← `(@$(mkIdent ctorName₁):ident $ctorArgs1:term*)) + patterns := patterns.push (← `(@$(mkIdent ctorName₁):ident $ctorArgs2:term*)) + let rhs ← mkSameCtorRhs todo.toList + `(matchAltExpr| | $[$patterns:term],* => $rhs:term) + alts := alts.push alt + else if (← compatibleCtors ctorName₁ ctorName₂) then + patterns := patterns ++ #[(← `($(mkIdent ctorName₁) ..)), (← `($(mkIdent ctorName₂) ..))] + let rhs ← `(isFalse (by intro h; injection h)) + alts ← alts.push (← `(matchAltExpr| | $[$patterns:term],* => $rhs:term)) + return alts + +def mkAuxFunction (ctx : Context) : TermElabM Syntax := do + let auxFunName ← ctx.auxFunNames[0] + let indVal ← ctx.typeInfos[0] + let header ← mkHeader ctx indVal + let mut body ← mkMatch ctx header indVal auxFunName header.argNames + let binders := header.binders + let type ← `(Decidable ($(mkIdent header.target1Name) = $(mkIdent header.target2Name))) + `(private def $(mkIdent auxFunName):ident $binders:explicitBinder* : $type:term := $body:term) + +def mkDecEqCmds (indVal : InductiveVal) : TermElabM (Array Syntax) := do + let ctx ← mkContext "decEq" indVal.name + let cmds := #[← mkAuxFunction ctx] ++ (← mkInstanceCmds ctx `DecidableEq #[indVal.name] (useAnonCtor := false)) + trace[Elab.Deriving.decEq]! "\n{cmds}" + return cmds + +open Command + +def mkDecEqInstanceHandler (declNames : Array Name) : CommandElabM Bool := do + if declNames.size != 1 then + return false -- mutually inductive types are not supported yet + else + let indVal ← getConstInfoInduct declNames[0] + if indVal.isNested then + return false -- nested inductive types are not supported yet + else + let cmds ← liftTermElabM none <| mkDecEqCmds indVal + cmds.forM elabCommand + return true + +builtin_initialize + registerBuiltinDerivingHandler `DecidableEq mkDecEqInstanceHandler + registerTraceClass `Elab.Deriving.decEq + +end Lean.Elab.Deriving.DecEq diff --git a/stage0/src/Lean/Elab/Deriving/Util.lean b/stage0/src/Lean/Elab/Deriving/Util.lean index c014489711..c90e1ee2ac 100644 --- a/stage0/src/Lean/Elab/Deriving/Util.lean +++ b/stage0/src/Lean/Elab/Deriving/Util.lean @@ -51,7 +51,7 @@ structure Context where auxFunNames : Array Name usePartial : Bool -def mkContext (typeName : Name) : TermElabM Context := do +def mkContext (fnPrefix : String) (typeName : Name) : TermElabM Context := do let indVal ← getConstInfoInduct typeName let mut typeInfos := #[] for typeName in indVal.all do @@ -59,7 +59,7 @@ def mkContext (typeName : Name) : TermElabM Context := do let mut auxFunNames := #[] for typeName in indVal.all do match typeName.eraseMacroScopes with - | Name.str _ t _ => auxFunNames := auxFunNames.push (← mkFreshUserName <| Name.mkSimple <| "beq" ++ t) + | Name.str _ t _ => auxFunNames := auxFunNames.push (← mkFreshUserName <| Name.mkSimple <| fnPrefix ++ t) | _ => auxFunNames := auxFunNames.push (← mkFreshUserName `instFn) trace[Elab.Deriving.beq]! "{auxFunNames}" let usePartial := indVal.isNested || typeInfos.size > 1 @@ -91,7 +91,7 @@ def mkLet (letDecls : Array Syntax) (body : Syntax) : TermElabM Syntax := letDecls.foldrM (init := body) fun letDecl body => `(let $letDecl:letDecl; $body) -def mkInstanceCmds (ctx : Context) (className : Name) (typeNames : Array Name) : TermElabM (Array Syntax) := do +def mkInstanceCmds (ctx : Context) (className : Name) (typeNames : Array Name) (useAnonCtor := true) : TermElabM (Array Syntax) := do let mut instances := #[] for i in [:ctx.typeInfos.size] do let indVal := ctx.typeInfos[i] @@ -102,10 +102,47 @@ def mkInstanceCmds (ctx : Context) (className : Name) (typeNames : Array Name) : let binders := binders ++ (← mkInstImplicitBinders className indVal argNames) let indType ← mkInductiveApp indVal argNames let type ← `($(mkIdent className) $indType) - let val ← `(⟨$(mkIdent auxFunName)⟩) + let val ← if useAnonCtor then `(⟨$(mkIdent auxFunName)⟩) else pure <| mkIdent auxFunName let instCmd ← `(instance $binders:implicitBinder* : $type := $val) trace[Meta.debug]! "\n{instCmd}" instances := instances.push instCmd return instances +namespace Binary + +structure Header where + binders : Array Syntax + argNames : Array Name + target1Name : Name + target2Name : Name + +def mkHeader (ctx : Context) (className : Name) (indVal : InductiveVal) : TermElabM Header := do + let argNames ← mkInductArgNames indVal + let binders ← mkImplicitBinders argNames + let targetType ← mkInductiveApp indVal argNames + let target1Name ← mkFreshUserName `x + let target2Name ← mkFreshUserName `y + let binders := binders ++ (← mkInstImplicitBinders className indVal argNames) + let target1Binder ← `(explicitBinderF| ($(mkIdent target1Name) : $targetType)) + let target2Binder ← `(explicitBinderF| ($(mkIdent target2Name) : $targetType)) + let binders := binders ++ #[target1Binder, target2Binder] + return { + binders := binders + argNames := argNames + target1Name := target1Name + target2Name := target2Name + } + +def mkDiscr (varName : Name) : TermElabM Syntax := + `(Parser.Term.matchDiscr| $(mkIdent varName):term) + +def mkDiscrs (header : Header) (indVal : InductiveVal) : TermElabM (Array Syntax) := do + let mut discrs := #[] + -- add indices + for argName in header.argNames[indVal.nparams:] do + discrs := discrs.push (← mkDiscr argName) + return discrs ++ #[← mkDiscr header.target1Name, ← mkDiscr header.target2Name] + +end Binary + end Lean.Elab.Deriving diff --git a/stage0/src/Lean/Elab/Tactic/Basic.lean b/stage0/src/Lean/Elab/Tactic/Basic.lean index 6578cbf3ab..92caeb281a 100644 --- a/stage0/src/Lean/Elab/Tactic/Basic.lean +++ b/stage0/src/Lean/Elab/Tactic/Basic.lean @@ -54,23 +54,22 @@ def BacktrackableState.restore (b : BacktrackableState) : TacticM Unit := do let b ← saveBacktrackableState try x catch ex => b.restore; h ex -instance : MonadExcept Exception TacticM := { - throw := throw, +instance : MonadExcept Exception TacticM where + throw := throw tryCatch := Tactic.tryCatch -} @[inline] protected def orElse {α} (x y : TacticM α) : TacticM α := do try x catch _ => y -instance {α} : OrElse (TacticM α) := ⟨Tactic.orElse⟩ +instance {α} : OrElse (TacticM α) where + orElse := Tactic.orElse structure SavedState where core : Core.State meta : Meta.State term : Term.State tactic : State - -instance : Inhabited SavedState := ⟨⟨arbitrary, arbitrary, arbitrary, arbitrary⟩⟩ + deriving Inhabited def saveAllState : TacticM SavedState := do pure { core := (← getThe Core.State), meta := (← getThe Meta.State), term := (← getThe Term.State), tactic := (← get) } diff --git a/stage0/src/Lean/Elab/Tactic/Induction.lean b/stage0/src/Lean/Elab/Tactic/Induction.lean index d8038d1c0b..069ce67c70 100644 --- a/stage0/src/Lean/Elab/Tactic/Induction.lean +++ b/stage0/src/Lean/Elab/Tactic/Induction.lean @@ -143,7 +143,7 @@ def setMotiveArg (mvarId : MVarId) (motiveArg : MVarId) (targets : Array FVarId) let motiverInferredType ← inferType motive let motiveType ← inferType (mkMVar motiveArg) unless (← isDefEqGuarded motiverInferredType motiveType) do - throwError! "type mismatch when assigning motive{indentExpr motive}\nhas type{indentExpr motiverInferredType}\nexpected type{indentExpr motiveType}" + throwError! "type mismatch when assigning motive{indentExpr motive}\n{← mkHasTypeButIsExpectedMsg motiverInferredType motiveType}" assignExprMVar motiveArg motive private def getAltNumFields (elimInfo : ElimInfo) (altName : Name) : TermElabM Nat := do diff --git a/stage0/src/Lean/Elab/Term.lean b/stage0/src/Lean/Elab/Term.lean index 0040dbdbad..11d1577e8a 100644 --- a/stage0/src/Lean/Elab/Term.lean +++ b/stage0/src/Lean/Elab/Term.lean @@ -212,8 +212,8 @@ def applyResult (result : TermElabResult) : TermElabM Expr := @[inline] def liftCoreM {α} (x : CoreM α) : TermElabM α := Term.liftMetaM $ liftM x -instance : MonadLiftT MetaM TermElabM := - ⟨Term.liftMetaM⟩ +instance : MonadLiftT MetaM TermElabM where + monadLift := Term.liftMetaM def getLevelNames : TermElabM (List Name) := return (← get).levelNames @@ -223,24 +223,22 @@ def getFVarLocalDecl! (fvar : Expr) : TermElabM LocalDecl := do | some d => pure d | none => unreachable! -instance : AddErrorMessageContext TermElabM := { - add := fun ref msg => do +instance : AddErrorMessageContext TermElabM where + add ref msg := do let ctx ← read let ref := getBetterRef ref ctx.macroStack let msg ← addMessageContext msg let msg ← addMacroStack msg ctx.macroStack pure (ref, msg) -} -instance : MonadLog TermElabM := { - getRef := getRef, - getFileMap := do pure (← read).fileMap, - getFileName := do pure (← read).fileName, - logMessage := fun msg => do +instance : MonadLog TermElabM where + getRef := getRef + getFileMap := return (← read).fileMap + getFileName := return (← read).fileName + logMessage msg := do let ctx ← readThe Core.Context let msg := { msg with data := MessageData.withNamingContext { currNamespace := ctx.currNamespace, openDecls := ctx.openDecls } msg.data }; modify fun s => { s with messages := s.messages.add msg } -} protected def getCurrMacroScope : TermElabM MacroScope := do pure (← read).currMacroScope protected def getMainModule : TermElabM Name := do pure (← getEnv).mainModule @@ -249,11 +247,10 @@ protected def getMainModule : TermElabM Name := do pure (← getEnv).mainMod let fresh ← modifyGetThe Core.State (fun st => (st.nextMacroScope, { st with nextMacroScope := st.nextMacroScope + 1 })) withReader (fun ctx => { ctx with currMacroScope := fresh }) x -instance : MonadQuotation TermElabM := { - getCurrMacroScope := Term.getCurrMacroScope, - getMainModule := Term.getMainModule, +instance : MonadQuotation TermElabM where + getCurrMacroScope := Term.getCurrMacroScope + getMainModule := Term.getMainModule withFreshMacroScope := Term.withFreshMacroScope -} unsafe def mkTermElabAttributeUnsafe : IO (KeyedDeclsAttribute TermElab) := mkElabAttribute TermElab `Lean.Elab.Term.termElabAttribute `builtinTermElab `termElab `Lean.Parser.Term `Lean.Elab.Term.TermElab "term" @@ -274,10 +271,11 @@ inductive LVal where | fieldName (name : String) | getOp (idx : Syntax) -instance : ToString LVal := ⟨fun - | LVal.fieldIdx i => toString i - | LVal.fieldName n => n - | LVal.getOp idx => "[" ++ toString idx ++ "]"⟩ +instance : ToString LVal where + toString + | LVal.fieldIdx i => toString i + | LVal.fieldName n => n + | LVal.getOp idx => "[" ++ toString idx ++ "]" def getDeclName? : TermElabM (Option Name) := return (← read).declName? def getLetRecsToLift : TermElabM (List LetRecToLift) := return (← get).letRecsToLift @@ -301,10 +299,10 @@ def withoutErrToSorry {α} (x : TermElabM α) : TermElabM α := builtin_initialize registerOption `autoBoundImplicitLocal { - defValue := true, - group := "", + defValue := true + group := "" descr := "Unbound local variables in declaration headers become implicit arguments if they are a lower case or greek letter. For example, `def f (x : Vector α n) : Vector α n :=` automatically introduces the implicit variables {α n}" -} + } private def getAutoBoundImplicitLocalOption (opts : Options) : Bool := opts.get `autoBoundImplicitLocal true @@ -482,14 +480,14 @@ def applyAttributesAt (declName : Name) (attrs : Array Attribute) (applicationTi def applyAttributes (declName : Name) (attrs : Array Attribute) : TermElabM Unit := applyAttributesCore declName attrs none -def mkTypeMismatchError (header? : Option String) (e : Expr) (eType : Expr) (expectedType : Expr) : MessageData := +def mkTypeMismatchError (header? : Option String) (e : Expr) (eType : Expr) (expectedType : Expr) : TermElabM MessageData := do let header : MessageData := match header? with - | some header => m!"{header} has type" - | none => m!"type mismatch{indentExpr e}\nhas type" - m!"{header}{indentExpr eType}\nbut is expected to have type{indentExpr expectedType}" + | some header => m!"{header} " + | none => m!"type mismatch{indentExpr e}\n" + m!"{header}{← mkHasTypeButIsExpectedMsg eType expectedType}" def throwTypeMismatchError {α} (header? : Option String) (expectedType : Expr) (eType : Expr) (e : Expr) - (f? : Option Expr := none) (extraMsg? : Option MessageData := none) : TermElabM α := + (f? : Option Expr := none) (extraMsg? : Option MessageData := none) : TermElabM α := do /- We ignore `extraMsg?` for now. In all our tests, it contained no useful information. It was always of the form: @@ -506,7 +504,7 @@ def throwTypeMismatchError {α} (header? : Option String) (expectedType : Expr) | some extraMsg => Format.line ++ extraMsg; -/ match f? with - | none => throwError $ mkTypeMismatchError header? e eType expectedType ++ extraMsg + | none => throwError <| (← mkTypeMismatchError header? e eType expectedType) ++ extraMsg | some f => Meta.throwAppTypeMismatch f e extraMsg @[inline] def withoutMacroStackAtErr {α} (x : TermElabM α) : TermElabM α := @@ -893,11 +891,10 @@ private def elabUsingElabFns (stx : Syntax) (expectedType? : Option Expr) (catch | some elabFns => elabUsingElabFnsAux s stx expectedType? catchExPostpone elabFns | none => throwError! "elaboration function for '{k}' has not been implemented" -instance : MonadMacroAdapter TermElabM := { - getCurrMacroScope := getCurrMacroScope, - getNextMacroScope := return (← getThe Core.State).nextMacroScope, - setNextMacroScope := fun next => modifyThe Core.State fun s => { s with nextMacroScope := next } -} +instance : MonadMacroAdapter TermElabM where + getCurrMacroScope := getCurrMacroScope + getNextMacroScope := return (← getThe Core.State).nextMacroScope + setNextMacroScope next := modifyThe Core.State fun s => { s with nextMacroScope := next } private def isExplicit (stx : Syntax) : Bool := match stx with @@ -1332,13 +1329,13 @@ private def mkSomeContext : Context := { let ((a, s), sCore, sMeta) ← (x.run ctx s).toIO ctxCore sCore ctxMeta sMeta pure (a, sCore, sMeta, s) -instance {α} [MetaEval α] : MetaEval (TermElabM α) := - ⟨fun env opts x _ => +instance {α} [MetaEval α] : MetaEval (TermElabM α) where + eval env opts x _ := let x : TermElabM α := do try x finally let s ← get s.messages.forM fun msg => do IO.println (← msg.toString) - MetaEval.eval env opts (hideUnit := true) $ x.run' mkSomeContext⟩ + MetaEval.eval env opts (hideUnit := true) $ x.run' mkSomeContext end Term diff --git a/stage0/src/Lean/Meta.lean b/stage0/src/Lean/Meta.lean index c33a5e1a9d..f7678f14d5 100644 --- a/stage0/src/Lean/Meta.lean +++ b/stage0/src/Lean/Meta.lean @@ -27,3 +27,4 @@ import Lean.Meta.ForEachExpr import Lean.Meta.Transform import Lean.Meta.PPGoal import Lean.Meta.UnificationHint +import Lean.Meta.Inductive diff --git a/stage0/src/Lean/Meta/Check.lean b/stage0/src/Lean/Meta/Check.lean index 9cbb2ac662..a10e0d7ff5 100644 --- a/stage0/src/Lean/Meta/Check.lean +++ b/stage0/src/Lean/Meta/Check.lean @@ -36,13 +36,94 @@ private def getFunctionDomain (f : Expr) : MetaM (Expr × BinderInfo) := do | Expr.forallE _ d _ c => return (d, c.binderInfo) | _ => throwFunctionExpected f +/- +Given to expressions `a` and `b`, this method tries to annotate terms with `pp.explicit := true` to +expose "implicit" differences. For example, suppose `a` and `b` are of the form +```lean +@HashMap Nat Nat eqInst hasInst1 +@HashMap Nat Nat eqInst hasInst2 +``` +By default, the pretty printer formats both of them as `HashMap Nat Nat`. +So, counterintuitive error messages such as +```lean +error: application type mismatch + HashMap.insert m +argument + m +has type + HashMap Nat Nat +but is expected to have type + HashMap Nat Nat +``` +would be produced. +By adding `pp.explicit := true`, we can generate the more informative error +```lean +error: application type mismatch + HashMap.insert m +argument + m +has type + @HashMap Nat Nat eqInst hasInst1 +but is expected to have type + @HashMap Nat Nat eqInst hasInst2 +``` +Remark: this method implements a simple heuristic, we should extend it as we find other counterintuitive +error messages. +-/ +partial def addPPExplicitToExposeDiff (a b : Expr) : MetaM (Expr × Expr) := do + if (← getOptions).getBool `pp.all false || (← getOptions).getBool `pp.explicit false then + return (a, b) + else + visit a b +where + visit (a b : Expr) : MetaM (Expr × Expr) := do + try + if !a.isApp || !b.isApp then + return (a, b) + else if a.getAppNumArgs != b.getAppNumArgs then + return (a, b) + else if not (← isDefEq a.getAppFn b.getAppFn) then + return (a, b) + else + let fType ← inferType a.getAppFn + forallBoundedTelescope fType a.getAppNumArgs fun xs _ => do + let mut as := a.getAppArgs + let mut bs := b.getAppArgs + if (← hasExplicitDiff xs as bs) then + return (a, b) + else + for i in [:as.size] do + let (ai, bi) ← visit as[i] bs[i] + as := as.set! i ai + bs := bs.set! i bi + let a := mkAppN a.getAppFn as + let b := mkAppN b.getAppFn bs + return (a.setAppPPExplicit, b.setAppPPExplicit) + catch _ => + return (a, b) + + hasExplicitDiff (xs as bs : Array Expr) : MetaM Bool := do + for i in [:xs.size] do + let localDecl ← getLocalDecl xs[i].fvarId! + if localDecl.binderInfo.isExplicit then + if not (← isDefEq as[i] bs[i]) then + return true + return false + +/- + Return error message "has type{givenType}\nbut is expected to have type{expectedType}" +-/ +def mkHasTypeButIsExpectedMsg (givenType expectedType : Expr) : MetaM MessageData := do + let (givenType, expectedType) ← addPPExplicitToExposeDiff givenType expectedType + m!"has type{indentExpr givenType}\nbut is expected to have type{indentExpr expectedType}" + def throwAppTypeMismatch {α} (f a : Expr) (extraMsg : MessageData := Format.nil) : MetaM α := do let (expectedType, binfo) ← getFunctionDomain f let mut e := mkApp f a unless binfo.isExplicit do e := e.setAppPPExplicit let aType ← inferType a - throwError! "application type mismatch{indentExpr e}\nargument{indentExpr a}\nhas type{indentExpr aType}\nbut is expected to have type{indentExpr expectedType}{extraMsg}" + throwError! "application type mismatch{indentExpr e}\nargument{indentExpr a}\n{← mkHasTypeButIsExpectedMsg aType expectedType}" def checkApp (f a : Expr) : MetaM Unit := do let fType ← inferType f diff --git a/stage0/src/Lean/Meta/Inductive.lean b/stage0/src/Lean/Meta/Inductive.lean new file mode 100644 index 0000000000..2959699c99 --- /dev/null +++ b/stage0/src/Lean/Meta/Inductive.lean @@ -0,0 +1,23 @@ +/- +Copyright (c) 2020 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Leonardo de Moura +-/ +import Lean.Meta.ExprDefEq + +/- Helper methods for inductive datatypes -/ + +namespace Lean.Meta + +/- Return true if the types of the given constructors are compatible. -/ +def compatibleCtors (ctorName₁ ctorName₂ : Name) : MetaM Bool := do + let ctorInfo₁ ← getConstInfoCtor ctorName₁ + let ctorInfo₂ ← getConstInfoCtor ctorName₂ + if ctorInfo₁.induct != ctorInfo₂.induct then + return false + else + let (_, _, ctorType₁) ← forallMetaTelescope ctorInfo₁.type + let (_, _, ctorType₂) ← forallMetaTelescope ctorInfo₂.type + isDefEq ctorType₁ ctorType₂ + +end Lean.Meta diff --git a/stage0/src/Lean/Meta/Match/Basic.lean b/stage0/src/Lean/Meta/Match/Basic.lean index 1a8fdf3273..ef7aa4212f 100644 --- a/stage0/src/Lean/Meta/Match/Basic.lean +++ b/stage0/src/Lean/Meta/Match/Basic.lean @@ -3,6 +3,7 @@ Copyright (c) 2020 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura -/ +import Lean.Meta.Check import Lean.Meta.Match.MatcherInfo import Lean.Meta.Match.CaseArraySizes @@ -177,8 +178,9 @@ def checkAndReplaceFVarId (fvarId : FVarId) (v : Expr) (alt : Alt) : MetaM Alt : let vType ← inferType v unless (← isDefEqGuarded fvarDecl.type vType) do withExistingLocalDecls alt.fvarDecls do + let (expectedType, givenType) ← addPPExplicitToExposeDiff vType fvarDecl.type throwErrorAt alt.ref $ - m!"type mismatch during dependent match-elimination at pattern variable '{mkFVar fvarDecl.fvarId}' with type{indentExpr fvarDecl.type}\nexpected type{indentExpr vType}" + m!"type mismatch during dependent match-elimination at pattern variable '{mkFVar fvarDecl.fvarId}' with type{indentExpr givenType}\nexpected type{indentExpr expectedType}" pure $ replaceFVarId fvarId v alt end Alt diff --git a/stage0/src/Lean/Meta/Tactic/Assert.lean b/stage0/src/Lean/Meta/Tactic/Assert.lean index b77e8776bc..7ae0f44e90 100644 --- a/stage0/src/Lean/Meta/Tactic/Assert.lean +++ b/stage0/src/Lean/Meta/Tactic/Assert.lean @@ -27,7 +27,7 @@ def assert (mvarId : MVarId) (name : Name) (type : Expr) (val : Expr) : MetaM MV Convert the given goal `Ctx |- target` into `Ctx |- let name : type := val; target`. It assumes `val` has type `type` -/ def define (mvarId : MVarId) (name : Name) (type : Expr) (val : Expr) : MetaM MVarId := do - withMVarContext mvarId $ do + withMVarContext mvarId do checkNotAssigned mvarId `define let tag ← getMVarTag mvarId let target ← getMVarType mvarId @@ -40,7 +40,7 @@ def define (mvarId : MVarId) (name : Name) (type : Expr) (val : Expr) : MetaM MV Convert the given goal `Ctx |- target` into `Ctx |- (hName : type) -> hName = val -> target`. It assumes `val` has type `type` -/ def assertExt (mvarId : MVarId) (name : Name) (type : Expr) (val : Expr) (hName : Name := `h) : MetaM MVarId := do - withMVarContext mvarId $ do + withMVarContext mvarId do checkNotAssigned mvarId `assert let tag ← getMVarTag mvarId let target ← getMVarType mvarId @@ -62,7 +62,7 @@ structure AssertAfterResult where It assumes `val` has type `type`, and that `type` is well-formed after `fvarId`. Note that `val` does not need to be well-formed after `fvarId`. That is, it may contain variables that are defined after `fvarId`. -/ def assertAfter (mvarId : MVarId) (fvarId : FVarId) (userName : Name) (type : Expr) (val : Expr) : MetaM AssertAfterResult := do - withMVarContext mvarId $ do + withMVarContext mvarId do checkNotAssigned mvarId `assertAfter let tag ← getMVarTag mvarId let target ← getMVarType mvarId diff --git a/stage0/src/Lean/Meta/Tactic/Injection.lean b/stage0/src/Lean/Meta/Tactic/Injection.lean index 096e52bf6c..5d4cf04e5a 100644 --- a/stage0/src/Lean/Meta/Tactic/Injection.lean +++ b/stage0/src/Lean/Meta/Tactic/Injection.lean @@ -57,12 +57,15 @@ private def heqToEq (mvarId : MVarId) (fvarId : FVarId) : MetaM (FVarId × MVarI match type.heq? with | none => pure (fvarId, mvarId) | some (α, a, β, b) => - let pr ← mkEqOfHEq (mkFVar fvarId) - let eq ← mkEq a b - let mvarId ← assert mvarId decl.userName eq pr - let mvarId ← clear mvarId fvarId - let (fvarId, mvarId) ← intro1P mvarId - pure (fvarId, mvarId) + if (← isDefEq α β) then + let pr ← mkEqOfHEq (mkFVar fvarId) + let eq ← mkEq a b + let mvarId ← assert mvarId decl.userName eq pr + let mvarId ← clear mvarId fvarId + let (fvarId, mvarId) ← intro1P mvarId + pure (fvarId, mvarId) + else + pure (fvarId, mvarId) def injectionIntro : Nat → MVarId → Array FVarId → List Name → MetaM InjectionResult | 0, mvarId, fvarIds, remainingNames => @@ -79,6 +82,8 @@ def injectionIntro : Nat → MVarId → Array FVarId → List Name → MetaM Inj def injection (mvarId : MVarId) (fvarId : FVarId) (newNames : List Name := []) (useUnusedNames : Bool := true) : MetaM InjectionResult := do match (← injectionCore mvarId fvarId) with | InjectionResultCore.solved => pure InjectionResult.solved - | InjectionResultCore.subgoal mvarId numEqs => injectionIntro numEqs mvarId #[] newNames + | InjectionResultCore.subgoal mvarId numEqs => + trace[Meta.debug]! "before injectionIntro\n{MessageData.ofGoal mvarId}" + injectionIntro numEqs mvarId #[] newNames end Lean.Meta diff --git a/stage0/src/Lean/Meta/Tactic/Subst.lean b/stage0/src/Lean/Meta/Tactic/Subst.lean index 715843dddc..6c07ef1f56 100644 --- a/stage0/src/Lean/Meta/Tactic/Subst.lean +++ b/stage0/src/Lean/Meta/Tactic/Subst.lean @@ -15,6 +15,7 @@ namespace Lean.Meta def substCore (mvarId : MVarId) (hFVarId : FVarId) (symm := false) (fvarSubst : FVarSubst := {}) (clearH := true) : MetaM (FVarSubst × MVarId) := withMVarContext mvarId do + let mvarId0 := mvarId let tag ← getMVarTag mvarId checkNotAssigned mvarId `subst let hFVarIdOriginal := hFVarId @@ -40,61 +41,77 @@ def substCore (mvarId : MVarId) (hFVarId : FVarId) (symm := false) (fvarSubst : let a := mkFVar aFVarId let hFVarId := twoVars[1] let h := mkFVar hFVarId - withMVarContext mvarId do - let mvarDecl ← getMVarDecl mvarId - let type := mvarDecl.type - let hLocalDecl ← getLocalDecl hFVarId - match (← matchEq? hLocalDecl.type) with - | none => unreachable! - | some (α, lhs, rhs) => do - let b := if symm then lhs else rhs - let mctx ← getMCtx - let depElim := mctx.exprDependsOn mvarDecl.type hFVarId - let cont (motive : Expr) (newType : Expr) : MetaM (FVarSubst × MVarId) := do - let major ← if symm then pure h else mkEqSymm h - let newMVar ← mkFreshExprSyntheticOpaqueMVar newType tag - let minor := newMVar - let newVal ← if depElim then mkEqRec motive minor major else mkEqNDRec motive minor major - assignExprMVar mvarId newVal - let mvarId := newMVar.mvarId! - let mvarId ← - if clearH then - let mvarId ← clear mvarId hFVarId - clear mvarId aFVarId + /- Set skip to true if there is no local variable nor the target depend on the equality -/ + let skip ← + if vars.size == 2 then + pure false + else + let mvarType ← getMVarType mvarId + let mctx ← getMCtx + pure (!mctx.exprDependsOn mvarType aFVarId && !mctx.exprDependsOn mvarType hFVarId) + if skip then + if clearH then + let mvarId ← clear mvarId0 hFVarId + let mvarId ← clear mvarId aFVarId + pure ({}, mvarId) + else + pure ({}, mvarId0) + else + withMVarContext mvarId do + let mvarDecl ← getMVarDecl mvarId + let type := mvarDecl.type + let hLocalDecl ← getLocalDecl hFVarId + match (← matchEq? hLocalDecl.type) with + | none => unreachable! + | some (α, lhs, rhs) => do + let b := if symm then lhs else rhs + let mctx ← getMCtx + let depElim := mctx.exprDependsOn mvarDecl.type hFVarId + let cont (motive : Expr) (newType : Expr) : MetaM (FVarSubst × MVarId) := do + let major ← if symm then pure h else mkEqSymm h + let newMVar ← mkFreshExprSyntheticOpaqueMVar newType tag + let minor := newMVar + let newVal ← if depElim then mkEqRec motive minor major else mkEqNDRec motive minor major + assignExprMVar mvarId newVal + let mvarId := newMVar.mvarId! + let mvarId ← + if clearH then + let mvarId ← clear mvarId hFVarId + clear mvarId aFVarId + else + pure mvarId + let (newFVars, mvarId) ← introNP mvarId (vars.size - 2) + let fvarSubst ← newFVars.size.foldM (init := fvarSubst) fun i (fvarSubst : FVarSubst) => + let var := vars[i+2] + let newFVar := newFVars[i] + pure $ fvarSubst.insert var (mkFVar newFVar) + let fvarSubst := fvarSubst.insert aFVarIdOriginal (if clearH then b else mkFVar aFVarId) + let fvarSubst := fvarSubst.insert hFVarIdOriginal (mkFVar hFVarId) + pure (fvarSubst, mvarId) + if depElim then do + let newType := type.replaceFVar a b + let reflB ← mkEqRefl b + let newType := newType.replaceFVar h reflB + if symm then + let motive ← mkLambdaFVars #[a, h] type + cont motive newType else - pure mvarId - let (newFVars, mvarId) ← introNP mvarId (vars.size - 2) - let fvarSubst ← newFVars.size.foldM (init := fvarSubst) fun i (fvarSubst : FVarSubst) => - let var := vars[i+2] - let newFVar := newFVars[i] - pure $ fvarSubst.insert var (mkFVar newFVar) - let fvarSubst := fvarSubst.insert aFVarIdOriginal (if clearH then b else mkFVar aFVarId) - let fvarSubst := fvarSubst.insert hFVarIdOriginal (mkFVar hFVarId) - pure (fvarSubst, mvarId) - if depElim then do - let newType := type.replaceFVar a b - let reflB ← mkEqRefl b - let newType := newType.replaceFVar h reflB - if symm then - let motive ← mkLambdaFVars #[a, h] type - cont motive newType + /- `type` depends on (h : a = b). So, we use the following trick to avoid a type incorrect motive. + 1- Create a new local (hAux : b = a) + 2- Create newType := type [hAux.symm / h] + `newType` is type correct because `h` and `hAux.symm` are definitionally equal by proof irrelevance. + 3- Create motive by abstracting `a` and `hAux` in `newType`. -/ + let hAuxType ← mkEq b a + let motive ← withLocalDeclD `_h hAuxType fun hAux => do + let hAuxSymm ← mkEqSymm hAux + /- replace h in type with hAuxSymm -/ + let newType := type.replaceFVar h hAuxSymm + mkLambdaFVars #[a, hAux] newType + cont motive newType else - /- `type` depends on (h : a = b). So, we use the following trick to avoid a type incorrect motive. - 1- Create a new local (hAux : b = a) - 2- Create newType := type [hAux.symm / h] - `newType` is type correct because `h` and `hAux.symm` are definitionally equal by proof irrelevance. - 3- Create motive by abstracting `a` and `hAux` in `newType`. -/ - let hAuxType ← mkEq b a - let motive ← withLocalDeclD `_h hAuxType fun hAux => do - let hAuxSymm ← mkEqSymm hAux - /- replace h in type with hAuxSymm -/ - let newType := type.replaceFVar h hAuxSymm - mkLambdaFVars #[a, hAux] newType + let motive ← mkLambdaFVars #[a] type + let newType := type.replaceFVar a b cont motive newType - else - let motive ← mkLambdaFVars #[a] type - let newType := type.replaceFVar a b - cont motive newType | _ => let eqMsg := if symm then "(t = x)" else "(x = t)" throwTacticEx `subst mvarId diff --git a/stage0/src/library/compiler/ir_interpreter.cpp b/stage0/src/library/compiler/ir_interpreter.cpp index 5fde882707..bc4f6d8d2d 100644 --- a/stage0/src/library/compiler/ir_interpreter.cpp +++ b/stage0/src/library/compiler/ir_interpreter.cpp @@ -298,7 +298,7 @@ void * lookup_symbol_in_cur_exe(char const * sym) { } class interpreter; -LEAN_THREAD_PTR(interpreter, g_interpreter); +static interpreter & get_interpreter(); class interpreter { // stack of IR variable slots @@ -314,12 +314,10 @@ class interpreter { frame(name const & mFn, size_t mArgBp, size_t mJpBp) : m_fn(mFn), m_arg_bp(mArgBp), m_jp_bp(mJpBp) {} }; std::vector m_call_stack; - environment const & m_env; - options const & m_opts; + environment const * m_env; + options const * m_opts; // if `false`, use IR code where possible bool m_prefer_native; - // if we were called within the execution of a different interpreter, restore the value of `g_interpreter` in the end - interpreter * m_prev_interpreter; struct constant_cache_entry { bool m_is_scalar; value m_val; @@ -352,6 +350,37 @@ class interpreter { return m_arg_stack[i]; } +public: + template + static inline T with_interpreter(environment const & env, options const & opts, std::function const & f) { + interpreter & interp = get_interpreter(); + if (interp.m_env && is_eqp(*interp.m_env, env) && interp.m_opts && is_eqp(*interp.m_opts, opts)) { + return f(interp); + } else { + // We changed threads or the closure was stored and called in a different context. + time_task t("interpretation", + message_builder(env, get_global_ios(), "foo", pos_info(), message_severity::INFORMATION)); + abstract_type_context trace_ctx(opts); + scope_trace_env scope_trace(env, opts, trace_ctx); + flet fl1(interp.m_env, &env); + flet fl2(interp.m_opts, &opts); + flet fl3(interp.m_prefer_native, opts.get_bool(*g_interpreter_prefer_native, LEAN_DEFAULT_INTERPRETER_PREFER_NATIVE)); + if (interp.m_env) { + // both these caches contain data from the Environment, so we cannot reuse them when changing it + flet> fl4(interp.m_constant_cache, {}); + flet> fl5(interp.m_symbol_cache, {}); + return f(interp); + } else { + // if there is no outer interpreter, might as well leave the caches around; maybe the next call is for + // the same Environment + interp.m_constant_cache = {}; + interp.m_symbol_cache = {}; + return f(interp); + } + } + } + +private: value eval_arg(arg const & a) { // an "irrelevant" argument is type- or proof-erased; we can use an arbitrary value for it return arg_is_irrelevant(a) ? box(0) : var(arg_var_id(a)); @@ -383,8 +412,8 @@ class interpreter { object * mk_stub_closure(decl const & d, unsigned n, object ** args) { unsigned cls_size = 3 + decl_params(d).size(); object * cls = alloc_closure(get_stub(cls_size), cls_size, 3 + n); - closure_set(cls, 0, m_env.to_obj_arg()); - closure_set(cls, 1, m_opts.to_obj_arg()); + closure_set(cls, 0, m_env->to_obj_arg()); + closure_set(cls, 1, m_opts->to_obj_arg()); closure_set(cls, 2, d.to_obj_arg()); for (unsigned i = 0; i < n ; i++) closure_set(cls, 3 + i, args[i]); @@ -712,7 +741,7 @@ class interpreter { return *e; } else { symbol_cache_entry e_new { get_decl(fn), nullptr, false }; - if (m_prefer_native || decl_tag(e_new.m_decl) == decl_kind::Extern || has_init_attribute(m_env, fn)) { + if (m_prefer_native || decl_tag(e_new.m_decl) == decl_kind::Extern || has_init_attribute(*m_env, fn)) { string_ref mangled = name_mangle(fn, *g_mangle_prefix); string_ref boxed_mangled(string_append(mangled.to_obj_arg(), g_boxed_mangled_suffix->raw())); // check for boxed version first @@ -731,7 +760,7 @@ class interpreter { /** \brief Retrieve Lean declaration from environment. */ decl get_decl(name const & fn) { - option_ref d = find_ir_decl(m_env, fn); + option_ref d = find_ir_decl(*m_env, fn); if (!d) { throw exception(sstream() << "unknown declaration '" << fn << "'"); } @@ -751,7 +780,7 @@ class interpreter { return *o; } - if (get_regular_init_fn_name_for(m_env, fn)) { + if (get_regular_init_fn_name_for(*m_env, fn)) { // We don't know whether `[init]` decls can be re-executed, so let's not. throw exception(sstream() << "cannot evaluate `[init]` declaration '" << fn << "' in the same module"); } @@ -838,21 +867,13 @@ class interpreter { return r; } - // closure stub stub + // static closure stub static object * stub_m_aux(object ** args) { environment env(args[0]); options opts(args[1]); - if (g_interpreter && is_eqp(g_interpreter->m_env, env)) { - return g_interpreter->stub_m(args); - } else { - // We changed threads or the closure was stored and called in a different context. - // Create new interpreter with new stacks. - time_task t("interpretation", - message_builder(env, get_global_ios(), "foo", pos_info(), message_severity::INFORMATION)); - abstract_type_context trace_ctx(opts); - scope_trace_env scope_trace(env, opts, trace_ctx); - return interpreter(env, opts).stub_m(args); - } + return with_interpreter(env, opts, [&](interpreter & interp) { + return interp.stub_m(args); + }); } // python3 -c 'for i in range(1,17): print(f" static object * stub_{i}_aux(" + ", ".join([f"object * x_{j}" for j in range(1,i+1)]) + ") { object * args[] = { " + ", ".join([f"x_{j}" for j in range(1,i+1)]) + " }; return interpreter::stub_m_aux(args); }")' @@ -896,20 +917,12 @@ class interpreter { } } public: - explicit interpreter(environment const & env, options const & opts) : m_env(env), m_opts(opts) { - m_prev_interpreter = g_interpreter; - g_interpreter = this; - m_prefer_native = opts.get_bool(*g_interpreter_prefer_native, LEAN_DEFAULT_INTERPRETER_PREFER_NATIVE); - } - ~interpreter() { for_each(m_constant_cache, [](name const &, constant_cache_entry const & e) { if (!e.m_is_scalar) { dec(e.m_val.m_obj); } }); - lean_assert(g_interpreter == this); - g_interpreter = m_prev_interpreter; } /** A variant of `call` designed for external uses. @@ -931,7 +944,7 @@ public: } else { // `lookup_symbol` does not prefer the boxed version for interpreted functions, so check manually. decl d = e.m_decl; - if (option_ref d_boxed = find_ir_decl(m_env, fn + *g_boxed_suffix)) { + if (option_ref d_boxed = find_ir_decl(*m_env, fn + *g_boxed_suffix)) { d = *d_boxed.get(); } r = mk_stub_closure(d, 0, nullptr); @@ -1001,30 +1014,27 @@ public: } }; +MK_THREAD_LOCAL_GET_DEF(interpreter, get_interpreter); + object * run_boxed(environment const & env, options const & opts, name const & fn, unsigned n, object **args) { - return interpreter(env, opts).call_boxed(fn, n, args); + return interpreter::with_interpreter(env, opts, [&](interpreter & interp) { return interp.call_boxed(fn, n, args); }); } uint32 run_main(environment const & env, options const & opts, int argv, char * argc[]) { - return interpreter(env, opts).run_main(argv, argc); + return interpreter::with_interpreter(env, opts, [&](interpreter & interp) { return interp.run_main(argv, argc); }); } -extern "C" object * lean_eval_const(object * lenv, object * lopts, object * c) { - environment const & env = TO_REF(environment, lenv); - options const & opts = TO_REF(options, lopts); - time_task t("interpretation", - message_builder(environment(), get_global_ios(), "foo", pos_info(), message_severity::INFORMATION)); - abstract_type_context trace_ctx(opts); - scope_trace_env scope_trace(env, opts, trace_ctx); - +extern "C" object * lean_eval_const(object * env, object * opts, object * c) { try { - return mk_cnstr(1, run_boxed(env, opts, TO_REF(name, c), 0, 0)).steal(); + return mk_cnstr(1, run_boxed(TO_REF(environment, env), TO_REF(options, opts), TO_REF(name, c), 0, 0)).steal(); } catch (exception & ex) { return mk_cnstr(0, string_ref(ex.what())).steal(); } } extern "C" object * lean_run_init(object * env, object * opts, object * decl, object * init_decl, object *) { - return interpreter(TO_REF(environment, env), TO_REF(options, opts)).run_init(TO_REF(name, decl), TO_REF(name, init_decl)); + return interpreter::with_interpreter(TO_REF(environment, env), TO_REF(options, opts), [&](interpreter & interp) { + return interp.run_init(TO_REF(name, decl), TO_REF(name, init_decl)); + }); } } diff --git a/stage0/stdlib/CMakeLists.txt b/stage0/stdlib/CMakeLists.txt index d1b1c350dd..21423be7fd 100644 --- a/stage0/stdlib/CMakeLists.txt +++ b/stage0/stdlib/CMakeLists.txt @@ -1 +1 @@ -add_library (stage0 OBJECT ./Init.c ./Init/Classical.c ./Init/Coe.c ./Init/Control.c ./Init/Control/Basic.c ./Init/Control/EState.c ./Init/Control/Except.c ./Init/Control/Id.c ./Init/Control/Option.c ./Init/Control/Reader.c ./Init/Control/State.c ./Init/Control/StateRef.c ./Init/Core.c ./Init/Data.c ./Init/Data/Array.c ./Init/Data/Array/Basic.c ./Init/Data/Array/BinSearch.c ./Init/Data/Array/InsertionSort.c ./Init/Data/Array/QSort.c ./Init/Data/Array/Subarray.c ./Init/Data/Basic.c ./Init/Data/ByteArray.c ./Init/Data/ByteArray/Basic.c ./Init/Data/Char.c ./Init/Data/Char/Basic.c ./Init/Data/Fin.c ./Init/Data/Fin/Basic.c ./Init/Data/Float.c ./Init/Data/FloatArray.c ./Init/Data/FloatArray/Basic.c ./Init/Data/Hashable.c ./Init/Data/Int.c ./Init/Data/Int/Basic.c ./Init/Data/List.c ./Init/Data/List/Basic.c ./Init/Data/List/BasicAux.c ./Init/Data/List/Control.c ./Init/Data/Nat.c ./Init/Data/Nat/Basic.c ./Init/Data/Nat/Bitwise.c ./Init/Data/Nat/Control.c ./Init/Data/Nat/Div.c ./Init/Data/OfScientific.c ./Init/Data/Option.c ./Init/Data/Option/Basic.c ./Init/Data/Option/BasicAux.c ./Init/Data/Option/Instances.c ./Init/Data/Random.c ./Init/Data/Range.c ./Init/Data/Repr.c ./Init/Data/String.c ./Init/Data/String/Basic.c ./Init/Data/String/Extra.c ./Init/Data/ToString.c ./Init/Data/ToString/Basic.c ./Init/Data/ToString/Macro.c ./Init/Data/UInt.c ./Init/Fix.c ./Init/Meta.c ./Init/Notation.c ./Init/NotationExtra.c ./Init/Prelude.c ./Init/SizeOf.c ./Init/System.c ./Init/System/FilePath.c ./Init/System/IO.c ./Init/System/IOError.c ./Init/System/Platform.c ./Init/System/ST.c ./Init/Util.c ./Init/WF.c ./Lean.c ./Lean/Attributes.c ./Lean/AuxRecursor.c ./Lean/Class.c ./Lean/Compiler.c ./Lean/Compiler/BorrowedAnnotation.c ./Lean/Compiler/ClosedTermCache.c ./Lean/Compiler/ConstFolding.c ./Lean/Compiler/ExportAttr.c ./Lean/Compiler/ExternAttr.c ./Lean/Compiler/IR.c ./Lean/Compiler/IR/Basic.c ./Lean/Compiler/IR/Borrow.c ./Lean/Compiler/IR/Boxing.c ./Lean/Compiler/IR/Checker.c ./Lean/Compiler/IR/CompilerM.c ./Lean/Compiler/IR/CtorLayout.c ./Lean/Compiler/IR/ElimDeadBranches.c ./Lean/Compiler/IR/ElimDeadVars.c ./Lean/Compiler/IR/EmitC.c ./Lean/Compiler/IR/EmitUtil.c ./Lean/Compiler/IR/ExpandResetReuse.c ./Lean/Compiler/IR/Format.c ./Lean/Compiler/IR/FreeVars.c ./Lean/Compiler/IR/LiveVars.c ./Lean/Compiler/IR/NormIds.c ./Lean/Compiler/IR/PushProj.c ./Lean/Compiler/IR/RC.c ./Lean/Compiler/IR/ResetReuse.c ./Lean/Compiler/IR/SimpCase.c ./Lean/Compiler/IR/UnboxResult.c ./Lean/Compiler/ImplementedByAttr.c ./Lean/Compiler/InitAttr.c ./Lean/Compiler/InlineAttrs.c ./Lean/Compiler/NameMangling.c ./Lean/Compiler/NeverExtractAttr.c ./Lean/Compiler/Specialize.c ./Lean/Compiler/Util.c ./Lean/CoreM.c ./Lean/Data.c ./Lean/Data/Format.c ./Lean/Data/Json.c ./Lean/Data/Json/Basic.c ./Lean/Data/Json/FromToJson.c ./Lean/Data/Json/Parser.c ./Lean/Data/Json/Printer.c ./Lean/Data/Json/Stream.c ./Lean/Data/JsonRpc.c ./Lean/Data/KVMap.c ./Lean/Data/LBool.c ./Lean/Data/LOption.c ./Lean/Data/Lsp.c ./Lean/Data/Lsp/Basic.c ./Lean/Data/Lsp/Capabilities.c ./Lean/Data/Lsp/Communication.c ./Lean/Data/Lsp/Diagnostics.c ./Lean/Data/Lsp/Hover.c ./Lean/Data/Lsp/InitShutdown.c ./Lean/Data/Lsp/TextSync.c ./Lean/Data/Lsp/Utf16.c ./Lean/Data/Lsp/Workspace.c ./Lean/Data/Name.c ./Lean/Data/NameTrie.c ./Lean/Data/Occurrences.c ./Lean/Data/OpenDecl.c ./Lean/Data/Options.c ./Lean/Data/Position.c ./Lean/Data/PrefixTree.c ./Lean/Data/SMap.c ./Lean/Data/Trie.c ./Lean/Declaration.c ./Lean/Elab.c ./Lean/Elab/App.c ./Lean/Elab/Attributes.c ./Lean/Elab/Binders.c ./Lean/Elab/BuiltinNotation.c ./Lean/Elab/CollectFVars.c ./Lean/Elab/Command.c ./Lean/Elab/DeclModifiers.c ./Lean/Elab/DeclUtil.c ./Lean/Elab/Declaration.c ./Lean/Elab/DefView.c ./Lean/Elab/Deriving.c ./Lean/Elab/Deriving/BEq.c ./Lean/Elab/Deriving/Basic.c ./Lean/Elab/Deriving/Inhabited.c ./Lean/Elab/Deriving/Util.c ./Lean/Elab/Do.c ./Lean/Elab/Exception.c ./Lean/Elab/Frontend.c ./Lean/Elab/Import.c ./Lean/Elab/Inductive.c ./Lean/Elab/LetRec.c ./Lean/Elab/Level.c ./Lean/Elab/Log.c ./Lean/Elab/Match.c ./Lean/Elab/MutualDef.c ./Lean/Elab/PreDefinition.c ./Lean/Elab/PreDefinition/Basic.c ./Lean/Elab/PreDefinition/Main.c ./Lean/Elab/PreDefinition/MkInhabitant.c ./Lean/Elab/PreDefinition/Structural.c ./Lean/Elab/PreDefinition/WF.c ./Lean/Elab/Print.c ./Lean/Elab/Quotation.c ./Lean/Elab/Quotation/Util.c ./Lean/Elab/StructInst.c ./Lean/Elab/Structure.c ./Lean/Elab/Syntax.c ./Lean/Elab/SyntheticMVars.c ./Lean/Elab/Tactic.c ./Lean/Elab/Tactic/Basic.c ./Lean/Elab/Tactic/Binders.c ./Lean/Elab/Tactic/ElabTerm.c ./Lean/Elab/Tactic/Generalize.c ./Lean/Elab/Tactic/Induction.c ./Lean/Elab/Tactic/Injection.c ./Lean/Elab/Tactic/Location.c ./Lean/Elab/Tactic/Match.c ./Lean/Elab/Tactic/Rewrite.c ./Lean/Elab/Term.c ./Lean/Elab/Util.c ./Lean/Environment.c ./Lean/Eval.c ./Lean/Exception.c ./Lean/Expr.c ./Lean/HeadIndex.c ./Lean/Hygiene.c ./Lean/InternalExceptionId.c ./Lean/KeyedDeclsAttribute.c ./Lean/Level.c ./Lean/LocalContext.c ./Lean/Message.c ./Lean/Meta.c ./Lean/Meta/AbstractMVars.c ./Lean/Meta/AbstractNestedProofs.c ./Lean/Meta/AppBuilder.c ./Lean/Meta/Basic.c ./Lean/Meta/Check.c ./Lean/Meta/Closure.c ./Lean/Meta/CollectMVars.c ./Lean/Meta/DiscrTree.c ./Lean/Meta/DiscrTreeTypes.c ./Lean/Meta/ExprDefEq.c ./Lean/Meta/ForEachExpr.c ./Lean/Meta/FunInfo.c ./Lean/Meta/GeneralizeTelescope.c ./Lean/Meta/GetConst.c ./Lean/Meta/InferType.c ./Lean/Meta/Instances.c ./Lean/Meta/KAbstract.c ./Lean/Meta/LevelDefEq.c ./Lean/Meta/Match.c ./Lean/Meta/Match/Basic.c ./Lean/Meta/Match/CaseArraySizes.c ./Lean/Meta/Match/CaseValues.c ./Lean/Meta/Match/MVarRenaming.c ./Lean/Meta/Match/Match.c ./Lean/Meta/Match/MatchPatternAttr.c ./Lean/Meta/Match/MatcherInfo.c ./Lean/Meta/MatchUtil.c ./Lean/Meta/Offset.c ./Lean/Meta/PPGoal.c ./Lean/Meta/RecursorInfo.c ./Lean/Meta/Reduce.c ./Lean/Meta/ReduceEval.c ./Lean/Meta/SynthInstance.c ./Lean/Meta/Tactic.c ./Lean/Meta/Tactic/Apply.c ./Lean/Meta/Tactic/Assert.c ./Lean/Meta/Tactic/Assumption.c ./Lean/Meta/Tactic/Cases.c ./Lean/Meta/Tactic/Clear.c ./Lean/Meta/Tactic/Constructor.c ./Lean/Meta/Tactic/Delta.c ./Lean/Meta/Tactic/ElimInfo.c ./Lean/Meta/Tactic/FVarSubst.c ./Lean/Meta/Tactic/Generalize.c ./Lean/Meta/Tactic/Induction.c ./Lean/Meta/Tactic/Injection.c ./Lean/Meta/Tactic/Intro.c ./Lean/Meta/Tactic/Replace.c ./Lean/Meta/Tactic/Revert.c ./Lean/Meta/Tactic/Rewrite.c ./Lean/Meta/Tactic/Subst.c ./Lean/Meta/Tactic/Util.c ./Lean/Meta/Transform.c ./Lean/Meta/TransparencyMode.c ./Lean/Meta/UnificationHint.c ./Lean/Meta/WHNF.c ./Lean/MetavarContext.c ./Lean/Modifiers.c ./Lean/MonadEnv.c ./Lean/Parser.c ./Lean/Parser/Attr.c ./Lean/Parser/Basic.c ./Lean/Parser/Command.c ./Lean/Parser/Do.c ./Lean/Parser/Extension.c ./Lean/Parser/Extra.c ./Lean/Parser/Level.c ./Lean/Parser/Module.c ./Lean/Parser/StrInterpolation.c ./Lean/Parser/Syntax.c ./Lean/Parser/Tactic.c ./Lean/Parser/Term.c ./Lean/ParserCompiler.c ./Lean/ParserCompiler/Attribute.c ./Lean/PrettyPrinter.c ./Lean/PrettyPrinter/Basic.c ./Lean/PrettyPrinter/Delaborator.c ./Lean/PrettyPrinter/Delaborator/Basic.c ./Lean/PrettyPrinter/Delaborator/Builtins.c ./Lean/PrettyPrinter/Formatter.c ./Lean/PrettyPrinter/Parenthesizer.c ./Lean/ProjFns.c ./Lean/ReducibilityAttrs.c ./Lean/ResolveName.c ./Lean/Runtime.c ./Lean/ScopedEnvExtension.c ./Lean/Server.c ./Lean/Server/Snapshots.c ./Lean/Structure.c ./Lean/Syntax.c ./Lean/ToExpr.c ./Lean/Util.c ./Lean/Util/CollectFVars.c ./Lean/Util/CollectLevelParams.c ./Lean/Util/CollectMVars.c ./Lean/Util/Constructions.c ./Lean/Util/FindExpr.c ./Lean/Util/FindMVar.c ./Lean/Util/FoldConsts.c ./Lean/Util/ForEachExpr.c ./Lean/Util/MonadCache.c ./Lean/Util/PPExt.c ./Lean/Util/Path.c ./Lean/Util/Profile.c ./Lean/Util/RecDepth.c ./Lean/Util/Recognizers.c ./Lean/Util/ReplaceExpr.c ./Lean/Util/ReplaceLevel.c ./Lean/Util/SCC.c ./Lean/Util/Sorry.c ./Lean/Util/Trace.c ./Std.c ./Std/Data.c ./Std/Data/AssocList.c ./Std/Data/BinomialHeap.c ./Std/Data/DList.c ./Std/Data/HashMap.c ./Std/Data/HashSet.c ./Std/Data/PersistentArray.c ./Std/Data/PersistentHashMap.c ./Std/Data/PersistentHashSet.c ./Std/Data/Queue.c ./Std/Data/RBMap.c ./Std/Data/RBTree.c ./Std/Data/Stack.c ./Std/ShareCommon.c ) +add_library (stage0 OBJECT ./Init.c ./Init/Classical.c ./Init/Coe.c ./Init/Control.c ./Init/Control/Basic.c ./Init/Control/EState.c ./Init/Control/Except.c ./Init/Control/Id.c ./Init/Control/Option.c ./Init/Control/Reader.c ./Init/Control/State.c ./Init/Control/StateRef.c ./Init/Core.c ./Init/Data.c ./Init/Data/Array.c ./Init/Data/Array/Basic.c ./Init/Data/Array/BinSearch.c ./Init/Data/Array/InsertionSort.c ./Init/Data/Array/QSort.c ./Init/Data/Array/Subarray.c ./Init/Data/Basic.c ./Init/Data/ByteArray.c ./Init/Data/ByteArray/Basic.c ./Init/Data/Char.c ./Init/Data/Char/Basic.c ./Init/Data/Fin.c ./Init/Data/Fin/Basic.c ./Init/Data/Float.c ./Init/Data/FloatArray.c ./Init/Data/FloatArray/Basic.c ./Init/Data/Hashable.c ./Init/Data/Int.c ./Init/Data/Int/Basic.c ./Init/Data/List.c ./Init/Data/List/Basic.c ./Init/Data/List/BasicAux.c ./Init/Data/List/Control.c ./Init/Data/Nat.c ./Init/Data/Nat/Basic.c ./Init/Data/Nat/Bitwise.c ./Init/Data/Nat/Control.c ./Init/Data/Nat/Div.c ./Init/Data/OfScientific.c ./Init/Data/Option.c ./Init/Data/Option/Basic.c ./Init/Data/Option/BasicAux.c ./Init/Data/Option/Instances.c ./Init/Data/Random.c ./Init/Data/Range.c ./Init/Data/Repr.c ./Init/Data/String.c ./Init/Data/String/Basic.c ./Init/Data/String/Extra.c ./Init/Data/ToString.c ./Init/Data/ToString/Basic.c ./Init/Data/ToString/Macro.c ./Init/Data/UInt.c ./Init/Fix.c ./Init/Meta.c ./Init/Notation.c ./Init/NotationExtra.c ./Init/Prelude.c ./Init/SizeOf.c ./Init/System.c ./Init/System/FilePath.c ./Init/System/IO.c ./Init/System/IOError.c ./Init/System/Platform.c ./Init/System/ST.c ./Init/Util.c ./Init/WF.c ./Lean.c ./Lean/Attributes.c ./Lean/AuxRecursor.c ./Lean/Class.c ./Lean/Compiler.c ./Lean/Compiler/BorrowedAnnotation.c ./Lean/Compiler/ClosedTermCache.c ./Lean/Compiler/ConstFolding.c ./Lean/Compiler/ExportAttr.c ./Lean/Compiler/ExternAttr.c ./Lean/Compiler/IR.c ./Lean/Compiler/IR/Basic.c ./Lean/Compiler/IR/Borrow.c ./Lean/Compiler/IR/Boxing.c ./Lean/Compiler/IR/Checker.c ./Lean/Compiler/IR/CompilerM.c ./Lean/Compiler/IR/CtorLayout.c ./Lean/Compiler/IR/ElimDeadBranches.c ./Lean/Compiler/IR/ElimDeadVars.c ./Lean/Compiler/IR/EmitC.c ./Lean/Compiler/IR/EmitUtil.c ./Lean/Compiler/IR/ExpandResetReuse.c ./Lean/Compiler/IR/Format.c ./Lean/Compiler/IR/FreeVars.c ./Lean/Compiler/IR/LiveVars.c ./Lean/Compiler/IR/NormIds.c ./Lean/Compiler/IR/PushProj.c ./Lean/Compiler/IR/RC.c ./Lean/Compiler/IR/ResetReuse.c ./Lean/Compiler/IR/SimpCase.c ./Lean/Compiler/IR/UnboxResult.c ./Lean/Compiler/ImplementedByAttr.c ./Lean/Compiler/InitAttr.c ./Lean/Compiler/InlineAttrs.c ./Lean/Compiler/NameMangling.c ./Lean/Compiler/NeverExtractAttr.c ./Lean/Compiler/Specialize.c ./Lean/Compiler/Util.c ./Lean/CoreM.c ./Lean/Data.c ./Lean/Data/Format.c ./Lean/Data/Json.c ./Lean/Data/Json/Basic.c ./Lean/Data/Json/FromToJson.c ./Lean/Data/Json/Parser.c ./Lean/Data/Json/Printer.c ./Lean/Data/Json/Stream.c ./Lean/Data/JsonRpc.c ./Lean/Data/KVMap.c ./Lean/Data/LBool.c ./Lean/Data/LOption.c ./Lean/Data/Lsp.c ./Lean/Data/Lsp/Basic.c ./Lean/Data/Lsp/Capabilities.c ./Lean/Data/Lsp/Communication.c ./Lean/Data/Lsp/Diagnostics.c ./Lean/Data/Lsp/Hover.c ./Lean/Data/Lsp/InitShutdown.c ./Lean/Data/Lsp/TextSync.c ./Lean/Data/Lsp/Utf16.c ./Lean/Data/Lsp/Workspace.c ./Lean/Data/Name.c ./Lean/Data/NameTrie.c ./Lean/Data/Occurrences.c ./Lean/Data/OpenDecl.c ./Lean/Data/Options.c ./Lean/Data/Position.c ./Lean/Data/PrefixTree.c ./Lean/Data/SMap.c ./Lean/Data/Trie.c ./Lean/Declaration.c ./Lean/Elab.c ./Lean/Elab/App.c ./Lean/Elab/Attributes.c ./Lean/Elab/Binders.c ./Lean/Elab/BuiltinNotation.c ./Lean/Elab/CollectFVars.c ./Lean/Elab/Command.c ./Lean/Elab/DeclModifiers.c ./Lean/Elab/DeclUtil.c ./Lean/Elab/Declaration.c ./Lean/Elab/DefView.c ./Lean/Elab/Deriving.c ./Lean/Elab/Deriving/BEq.c ./Lean/Elab/Deriving/Basic.c ./Lean/Elab/Deriving/DecEq.c ./Lean/Elab/Deriving/Inhabited.c ./Lean/Elab/Deriving/Util.c ./Lean/Elab/Do.c ./Lean/Elab/Exception.c ./Lean/Elab/Frontend.c ./Lean/Elab/Import.c ./Lean/Elab/Inductive.c ./Lean/Elab/LetRec.c ./Lean/Elab/Level.c ./Lean/Elab/Log.c ./Lean/Elab/Match.c ./Lean/Elab/MutualDef.c ./Lean/Elab/PreDefinition.c ./Lean/Elab/PreDefinition/Basic.c ./Lean/Elab/PreDefinition/Main.c ./Lean/Elab/PreDefinition/MkInhabitant.c ./Lean/Elab/PreDefinition/Structural.c ./Lean/Elab/PreDefinition/WF.c ./Lean/Elab/Print.c ./Lean/Elab/Quotation.c ./Lean/Elab/Quotation/Util.c ./Lean/Elab/StructInst.c ./Lean/Elab/Structure.c ./Lean/Elab/Syntax.c ./Lean/Elab/SyntheticMVars.c ./Lean/Elab/Tactic.c ./Lean/Elab/Tactic/Basic.c ./Lean/Elab/Tactic/Binders.c ./Lean/Elab/Tactic/ElabTerm.c ./Lean/Elab/Tactic/Generalize.c ./Lean/Elab/Tactic/Induction.c ./Lean/Elab/Tactic/Injection.c ./Lean/Elab/Tactic/Location.c ./Lean/Elab/Tactic/Match.c ./Lean/Elab/Tactic/Rewrite.c ./Lean/Elab/Term.c ./Lean/Elab/Util.c ./Lean/Environment.c ./Lean/Eval.c ./Lean/Exception.c ./Lean/Expr.c ./Lean/HeadIndex.c ./Lean/Hygiene.c ./Lean/InternalExceptionId.c ./Lean/KeyedDeclsAttribute.c ./Lean/Level.c ./Lean/LocalContext.c ./Lean/Message.c ./Lean/Meta.c ./Lean/Meta/AbstractMVars.c ./Lean/Meta/AbstractNestedProofs.c ./Lean/Meta/AppBuilder.c ./Lean/Meta/Basic.c ./Lean/Meta/Check.c ./Lean/Meta/Closure.c ./Lean/Meta/CollectMVars.c ./Lean/Meta/DiscrTree.c ./Lean/Meta/DiscrTreeTypes.c ./Lean/Meta/ExprDefEq.c ./Lean/Meta/ForEachExpr.c ./Lean/Meta/FunInfo.c ./Lean/Meta/GeneralizeTelescope.c ./Lean/Meta/GetConst.c ./Lean/Meta/Inductive.c ./Lean/Meta/InferType.c ./Lean/Meta/Instances.c ./Lean/Meta/KAbstract.c ./Lean/Meta/LevelDefEq.c ./Lean/Meta/Match.c ./Lean/Meta/Match/Basic.c ./Lean/Meta/Match/CaseArraySizes.c ./Lean/Meta/Match/CaseValues.c ./Lean/Meta/Match/MVarRenaming.c ./Lean/Meta/Match/Match.c ./Lean/Meta/Match/MatchPatternAttr.c ./Lean/Meta/Match/MatcherInfo.c ./Lean/Meta/MatchUtil.c ./Lean/Meta/Offset.c ./Lean/Meta/PPGoal.c ./Lean/Meta/RecursorInfo.c ./Lean/Meta/Reduce.c ./Lean/Meta/ReduceEval.c ./Lean/Meta/SynthInstance.c ./Lean/Meta/Tactic.c ./Lean/Meta/Tactic/Apply.c ./Lean/Meta/Tactic/Assert.c ./Lean/Meta/Tactic/Assumption.c ./Lean/Meta/Tactic/Cases.c ./Lean/Meta/Tactic/Clear.c ./Lean/Meta/Tactic/Constructor.c ./Lean/Meta/Tactic/Delta.c ./Lean/Meta/Tactic/ElimInfo.c ./Lean/Meta/Tactic/FVarSubst.c ./Lean/Meta/Tactic/Generalize.c ./Lean/Meta/Tactic/Induction.c ./Lean/Meta/Tactic/Injection.c ./Lean/Meta/Tactic/Intro.c ./Lean/Meta/Tactic/Replace.c ./Lean/Meta/Tactic/Revert.c ./Lean/Meta/Tactic/Rewrite.c ./Lean/Meta/Tactic/Subst.c ./Lean/Meta/Tactic/Util.c ./Lean/Meta/Transform.c ./Lean/Meta/TransparencyMode.c ./Lean/Meta/UnificationHint.c ./Lean/Meta/WHNF.c ./Lean/MetavarContext.c ./Lean/Modifiers.c ./Lean/MonadEnv.c ./Lean/Parser.c ./Lean/Parser/Attr.c ./Lean/Parser/Basic.c ./Lean/Parser/Command.c ./Lean/Parser/Do.c ./Lean/Parser/Extension.c ./Lean/Parser/Extra.c ./Lean/Parser/Level.c ./Lean/Parser/Module.c ./Lean/Parser/StrInterpolation.c ./Lean/Parser/Syntax.c ./Lean/Parser/Tactic.c ./Lean/Parser/Term.c ./Lean/Parser/Transform.c ./Lean/ParserCompiler.c ./Lean/ParserCompiler/Attribute.c ./Lean/PrettyPrinter.c ./Lean/PrettyPrinter/Basic.c ./Lean/PrettyPrinter/Delaborator.c ./Lean/PrettyPrinter/Delaborator/Basic.c ./Lean/PrettyPrinter/Delaborator/Builtins.c ./Lean/PrettyPrinter/Formatter.c ./Lean/PrettyPrinter/Parenthesizer.c ./Lean/ProjFns.c ./Lean/ReducibilityAttrs.c ./Lean/ResolveName.c ./Lean/Runtime.c ./Lean/ScopedEnvExtension.c ./Lean/Server.c ./Lean/Server/ServerBin.c ./Lean/Server/Snapshots.c ./Lean/Structure.c ./Lean/Syntax.c ./Lean/ToExpr.c ./Lean/Util.c ./Lean/Util/CollectFVars.c ./Lean/Util/CollectLevelParams.c ./Lean/Util/CollectMVars.c ./Lean/Util/Constructions.c ./Lean/Util/FindExpr.c ./Lean/Util/FindMVar.c ./Lean/Util/FoldConsts.c ./Lean/Util/ForEachExpr.c ./Lean/Util/MonadCache.c ./Lean/Util/PPExt.c ./Lean/Util/Path.c ./Lean/Util/Profile.c ./Lean/Util/RecDepth.c ./Lean/Util/Recognizers.c ./Lean/Util/ReplaceExpr.c ./Lean/Util/ReplaceLevel.c ./Lean/Util/SCC.c ./Lean/Util/Sorry.c ./Lean/Util/Trace.c ./Std.c ./Std/Data.c ./Std/Data/AssocList.c ./Std/Data/BinomialHeap.c ./Std/Data/DList.c ./Std/Data/HashMap.c ./Std/Data/HashSet.c ./Std/Data/PersistentArray.c ./Std/Data/PersistentHashMap.c ./Std/Data/PersistentHashSet.c ./Std/Data/Queue.c ./Std/Data/RBMap.c ./Std/Data/RBTree.c ./Std/Data/Stack.c ./Std/ShareCommon.c ) diff --git a/stage0/stdlib/Lean/Elab/Command.c b/stage0/stdlib/Lean/Elab/Command.c index bf519769a8..66ca89f5e6 100644 --- a/stage0/stdlib/Lean/Elab/Command.c +++ b/stage0/stdlib/Lean/Elab/Command.c @@ -13022,7 +13022,7 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Elab_Command_modifyScope___closed__1; x_2 = l_Lean_Elab_Command_modifyScope___closed__2; -x_3 = lean_unsigned_to_nat(380u); +x_3 = lean_unsigned_to_nat(381u); x_4 = lean_unsigned_to_nat(16u); x_5 = l_Lean_Syntax_strLitToAtom___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Lean/Elab/DeclUtil.c b/stage0/stdlib/Lean/Elab/DeclUtil.c index 406506bf69..11cc1cb730 100644 --- a/stage0/stdlib/Lean/Elab/DeclUtil.c +++ b/stage0/stdlib/Lean/Elab/DeclUtil.c @@ -86,6 +86,7 @@ lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spe lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__19___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__12(lean_object*); lean_object* l_Lean_Elab_sortDeclLevelParams___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_forallTelescopeCompatible___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -185,7 +186,6 @@ lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_sortDeclLevelParams___spec lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__3(uint64_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint64_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__21(lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__1(lean_object*); -lean_object* l_Lean_indentExpr(lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__24___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_isFreshInstanceName_match__1(lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__2(lean_object*); @@ -1505,7 +1505,7 @@ static lean_object* _init_l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lamb _start: { lean_object* x_1; -x_1 = lean_mk_string("type mismatch at parameter '"); +x_1 = lean_mk_string("parameter '"); return x_1; } } @@ -1522,7 +1522,7 @@ static lean_object* _init_l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lamb _start: { lean_object* x_1; -x_1 = lean_mk_string("\nexpected type"); +x_1 = lean_mk_string("' "); return x_1; } } @@ -1555,7 +1555,7 @@ x_19 = lean_unbox(x_18); lean_dec(x_18); if (x_19 == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); @@ -1564,71 +1564,72 @@ lean_dec(x_4); x_20 = lean_ctor_get(x_17, 1); lean_inc(x_20); lean_dec(x_17); -x_21 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_21, 0, x_9); -x_22 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__2; -x_23 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_21); -x_24 = l_Lean_KernelException_toMessageData___closed__3; -x_25 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); -x_26 = l_Lean_indentExpr(x_1); -x_27 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_27, 0, x_25); -lean_ctor_set(x_27, 1, x_26); -x_28 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4; +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +x_21 = l_Lean_Meta_mkHasTypeButIsExpectedMsg(x_1, x_2, x_12, x_13, x_14, x_15, x_20); +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_21, 1); +lean_inc(x_23); +lean_dec(x_21); +x_24 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_24, 0, x_9); +x_25 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__2; +x_26 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_24); +x_27 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4; +x_28 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); x_29 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -x_30 = l_Lean_indentExpr(x_2); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_22); +x_30 = l_Lean_KernelException_toMessageData___closed__15; x_31 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); -x_32 = l_Lean_KernelException_toMessageData___closed__15; -x_33 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_32); -x_34 = l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__16(x_33, x_12, x_13, x_14, x_15, x_20); +x_32 = l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__16(x_31, x_12, x_13, x_14, x_15, x_23); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); -x_35 = !lean_is_exclusive(x_34); -if (x_35 == 0) +x_33 = !lean_is_exclusive(x_32); +if (x_33 == 0) { -return x_34; +return x_32; } else { -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_34, 0); -x_37 = lean_ctor_get(x_34, 1); -lean_inc(x_37); -lean_inc(x_36); -lean_dec(x_34); -x_38 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_38, 0, x_36); -lean_ctor_set(x_38, 1, x_37); -return x_38; +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_32, 0); +x_35 = lean_ctor_get(x_32, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_32); +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +return x_36; } } else { -lean_object* x_39; lean_object* x_40; lean_object* x_41; +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_dec(x_2); -x_39 = lean_ctor_get(x_17, 1); -lean_inc(x_39); +x_37 = lean_ctor_get(x_17, 1); +lean_inc(x_37); lean_dec(x_17); -x_40 = lean_box(0); -x_41 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__3(x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_1, x_10, x_40, x_12, x_13, x_14, x_15, x_39); -return x_41; +x_38 = lean_box(0); +x_39 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__3(x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_1, x_10, x_38, x_12, x_13, x_14, x_15, x_37); +return x_39; } } else { -uint8_t x_42; +uint8_t x_40; lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); @@ -1641,23 +1642,23 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_42 = !lean_is_exclusive(x_17); -if (x_42 == 0) +x_40 = !lean_is_exclusive(x_17); +if (x_40 == 0) { return x_17; } else { -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_17, 0); -x_44 = lean_ctor_get(x_17, 1); -lean_inc(x_44); -lean_inc(x_43); +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_17, 0); +x_42 = lean_ctor_get(x_17, 1); +lean_inc(x_42); +lean_inc(x_41); lean_dec(x_17); -x_45 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_45, 0, x_43); -lean_ctor_set(x_45, 1, x_44); -return x_45; +x_43 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +return x_43; } } } diff --git a/stage0/stdlib/Lean/Elab/Deriving.c b/stage0/stdlib/Lean/Elab/Deriving.c index 79f2785d7b..be5b712c5e 100644 --- a/stage0/stdlib/Lean/Elab/Deriving.c +++ b/stage0/stdlib/Lean/Elab/Deriving.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Elab.Deriving -// Imports: Init Lean.Elab.Deriving.Basic Lean.Elab.Deriving.Util Lean.Elab.Deriving.Inhabited Lean.Elab.Deriving.BEq +// Imports: Init Lean.Elab.Deriving.Basic Lean.Elab.Deriving.Util Lean.Elab.Deriving.Inhabited Lean.Elab.Deriving.BEq Lean.Elab.Deriving.DecEq #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -18,6 +18,7 @@ lean_object* initialize_Lean_Elab_Deriving_Basic(lean_object*); lean_object* initialize_Lean_Elab_Deriving_Util(lean_object*); lean_object* initialize_Lean_Elab_Deriving_Inhabited(lean_object*); lean_object* initialize_Lean_Elab_Deriving_BEq(lean_object*); +lean_object* initialize_Lean_Elab_Deriving_DecEq(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Elab_Deriving(lean_object* w) { lean_object * res; @@ -38,6 +39,9 @@ lean_dec_ref(res); res = initialize_Lean_Elab_Deriving_BEq(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Elab_Deriving_DecEq(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Elab/Deriving/BEq.c b/stage0/stdlib/Lean/Elab/Deriving/BEq.c index 72111eea40..06b1e1e9fc 100644 --- a/stage0/stdlib/Lean/Elab/Deriving/BEq.c +++ b/stage0/stdlib/Lean/Elab/Deriving/BEq.c @@ -37,56 +37,51 @@ extern lean_object* l_Array_empty___closed__1; lean_object* lean_environment_find(lean_object*, lean_object*); extern lean_object* l_Std_Range_myMacro____x40_Init_Data_Range___hyg_261____closed__19; lean_object* lean_st_ref_get(lean_object*, lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_6100____closed__6; extern lean_object* l_instReprBool___closed__1; lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__31; lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__7; extern lean_object* l_Lean_Parser_Command_mutual___elambda__1___closed__2; uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*); -lean_object* l_Array_toSubarray___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___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_object* l_Lean_MessageData_ofList(lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkAlts_match__3(lean_object*); lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___spec__5___lambda__1___closed__1; -lean_object* l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs___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* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__25; lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkAlts_match__2___rarg(lean_object*, lean_object*); lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___spec__5___lambda__1___closed__4; extern lean_object* l_Lean_Parser_Command_mutual___elambda__1___closed__1; lean_object* lean_string_utf8_byte_size(lean_object*); -lean_object* l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2623____closed__1; lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_Deriving_BEq_mkBEqInstanceHandler___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_instReprBool___closed__2; lean_object* l_Lean_Elab_Term_getMainModule___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_instQuoteBool___closed__1; -uint8_t l_USize_decLt(size_t, size_t); lean_object* l_Lean_Elab_Deriving_mkLocalInstanceLetDecls(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__6; lean_object* lean_nat_add(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Deriving_BEq_mkMatch___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_BEq_mkMatch___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__10; extern lean_object* l_myMacro____x40_Init_Notation___hyg_12315____closed__11; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Command_elabCommand___spec__11(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_matchAlts___elambda__1___closed__1; extern lean_object* l_Lean_Elab_instToFormatModifiers___closed__8; -lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkAlts_match__4___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Deriving_mkInductArgNames(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___spec__5___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Deriving_BEq_0__Lean_Elab_Deriving_BEq_mkBEqInstanceCmds___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getConstInfoCtor___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instQuoteBool___closed__5; +lean_object* l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2265____closed__1; lean_object* l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkAlts_match__3___rarg(lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); extern lean_object* l_Lean_setOptionFromString___closed__4; lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__19; -lean_object* l_Lean_Elab_Deriving_mkInstanceCmds(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_mkInstanceCmds(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__11; -lean_object* l_Lean_Elab_Deriving_mkInstImplicitBinders(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__29; extern lean_object* l_Lean_Parser_Command_set__option___elambda__1___closed__2; extern lean_object* l_Array_myMacro____x40_Init_Data_Array_Subarray___hyg_905____closed__4; @@ -94,7 +89,6 @@ lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___spec lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__2; extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__7; lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___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_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Meta_mkArrow___closed__2; lean_object* l_Lean_Elab_Deriving_mkLet(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); @@ -106,7 +100,6 @@ extern lean_object* l_Lean_Elab_elabModifiers___rarg___lambda__3___closed__1; extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; extern lean_object* l_Lean_Core_betaReduce___closed__2; extern lean_object* l_Lean_instQuoteBool___closed__3; -extern lean_object* l_Lean_Parser_Term_matchDiscr___elambda__1___closed__1; lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkElseAlt___closed__3; lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__7; extern lean_object* l_Lean_instInhabitedSourceInfo___closed__1; @@ -133,7 +126,7 @@ lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts__ lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkAlts_match__2(lean_object*); lean_object* l_Lean_Core_transform___at_Lean_Core_betaReduce___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_isInductive___at_Lean_Elab_Deriving_BEq_mkBEqInstanceHandler___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Deriving_mkContext(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_mkContext(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__4; extern lean_object* l_Lean_KernelException_toMessageData___closed__3; size_t lean_usize_of_nat(lean_object*); @@ -141,16 +134,13 @@ extern lean_object* l_myMacro____x40_Init_Notation___hyg_12315____closed__17; lean_object* l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__23; lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*); -lean_object* l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__13; -extern lean_object* l_myMacro____x40_Init_Notation___hyg_658____closed__8; extern lean_object* l_Lean_nullKind___closed__2; lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__21; lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__8; lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkAlts(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Tactic_match___closed__1; -extern lean_object* l_Lean_Syntax_mkApp___closed__1; -lean_object* l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2623_(lean_object*); +lean_object* l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2265_(lean_object*); lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___spec__5___lambda__1___closed__3; lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMutualBlock___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_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -163,21 +153,21 @@ lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__18; uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(size_t, size_t, lean_object*); lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___spec__4___closed__3; -lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscr___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_12315____closed__13; lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__9; +lean_object* l_Lean_Elab_Deriving_Binary_mkDiscrs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_appendCore___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__12; extern lean_object* l_Lean_Core_betaReduce___closed__1; extern lean_object* l_Lean_myMacro____x40_Init_Notation___hyg_13175____closed__3; extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__25; lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__13; +lean_object* l_Lean_Elab_Deriving_Binary_mkHeader___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__5; extern lean_object* l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_16099____closed__5; lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__1; extern lean_object* l_myMacro____x40_Init_Notation___hyg_6100____closed__5; lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Deriving_mkImplicitBinders(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkMatch___boxed(lean_object*); extern lean_object* l_Lean_instInhabitedName; extern lean_object* l_Lean_getConstInfoCtor___rarg___lambda__1___closed__2; @@ -189,16 +179,11 @@ lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__2; lean_object* l_Lean_getConstInfoCtor___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__9; -extern lean_object* l_Lean_Elab_Term_mkExplicitBinder___closed__1; extern lean_object* l_Lean_Parser_Term_matchAlt___closed__1; -extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__5; extern lean_object* l_term___x3d_x3d_____closed__2; extern lean_object* l_IO_Prim_fopenFlags___closed__4; -lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___spec__5___lambda__1___closed__2; lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__3; -lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__46; extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__3; @@ -233,7 +218,6 @@ lean_object* l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1___closed__17; extern lean_object* l_myMacro____x40_Init_Notation___hyg_12315____closed__15; extern lean_object* l_Lean_setOptionFromString___closed__3; extern lean_object* l_Lean_Elab_instToStringVisibility___closed__2; -lean_object* l_Lean_Elab_Deriving_mkInductiveApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__3; extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__17; lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkAlts___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*); @@ -247,285 +231,10 @@ uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_BEq_mkHeader___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_9; -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_1); -x_9 = l_Lean_Elab_Deriving_mkInductArgNames(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_9) == 0) -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_9, 1); -lean_inc(x_11); -lean_dec(x_9); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_10); -x_12 = l_Lean_Elab_Deriving_mkImplicitBinders(x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_11); -if (lean_obj_tag(x_12) == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_12, 1); -lean_inc(x_14); -lean_dec(x_12); -lean_inc(x_10); -lean_inc(x_1); -x_15 = l_Lean_Elab_Deriving_mkInductiveApp(x_1, x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_14); -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); -x_17 = lean_ctor_get(x_15, 1); -lean_inc(x_17); -lean_dec(x_15); -x_18 = l_Lean_Meta_mkArrow___closed__2; -x_19 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_18, x_6, x_7, x_17); -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -x_21 = lean_ctor_get(x_19, 1); -lean_inc(x_21); -lean_dec(x_19); -x_22 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__5; -x_23 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_22, x_6, x_7, x_21); -x_24 = lean_ctor_get(x_23, 0); -lean_inc(x_24); -x_25 = lean_ctor_get(x_23, 1); -lean_inc(x_25); -lean_dec(x_23); -x_26 = l_myMacro____x40_Init_Notation___hyg_6100____closed__5; -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_10); -x_27 = l_Lean_Elab_Deriving_mkInstImplicitBinders(x_26, x_1, x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_25); -if (lean_obj_tag(x_27) == 0) -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; -x_28 = lean_ctor_get(x_27, 0); -lean_inc(x_28); -x_29 = lean_ctor_get(x_27, 1); -lean_inc(x_29); -lean_dec(x_27); -x_30 = l_Array_append___rarg(x_13, x_28); -lean_dec(x_28); -x_31 = l_Lean_Elab_Term_getCurrMacroScope(x_2, x_3, x_4, x_5, x_6, x_7, x_29); -x_32 = lean_ctor_get(x_31, 1); -lean_inc(x_32); -lean_dec(x_31); -x_33 = l_Lean_Elab_Term_getMainModule___rarg(x_7, x_32); -x_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -lean_inc(x_20); -x_35 = lean_mk_syntax_ident(x_20); -x_36 = l_Array_empty___closed__1; -x_37 = lean_array_push(x_36, x_35); -x_38 = l_Lean_nullKind___closed__2; -x_39 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_37); -x_40 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; -x_41 = lean_array_push(x_40, x_39); -x_42 = l_myMacro____x40_Init_Notation___hyg_12315____closed__11; -x_43 = lean_array_push(x_42, x_16); -x_44 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_44, 0, x_38); -lean_ctor_set(x_44, 1, x_43); -lean_inc(x_44); -x_45 = lean_array_push(x_41, x_44); -x_46 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; -x_47 = lean_array_push(x_45, x_46); -x_48 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; -x_49 = lean_array_push(x_47, x_48); -x_50 = l_Lean_Elab_Term_mkExplicitBinder___closed__1; -x_51 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_51, 0, x_50); -lean_ctor_set(x_51, 1, x_49); -x_52 = l_Lean_Elab_Term_getCurrMacroScope(x_2, x_3, x_4, x_5, x_6, x_7, x_34); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_53 = lean_ctor_get(x_52, 1); -lean_inc(x_53); -lean_dec(x_52); -x_54 = l_Lean_Elab_Term_getMainModule___rarg(x_7, x_53); -lean_dec(x_7); -x_55 = !lean_is_exclusive(x_54); -if (x_55 == 0) -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; -x_56 = lean_ctor_get(x_54, 0); -lean_dec(x_56); -lean_inc(x_24); -x_57 = lean_mk_syntax_ident(x_24); -x_58 = lean_array_push(x_36, x_57); -x_59 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_59, 0, x_38); -lean_ctor_set(x_59, 1, x_58); -x_60 = lean_array_push(x_40, x_59); -x_61 = lean_array_push(x_60, x_44); -x_62 = lean_array_push(x_61, x_46); -x_63 = lean_array_push(x_62, x_48); -x_64 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_64, 0, x_50); -lean_ctor_set(x_64, 1, x_63); -x_65 = l_Lean_Syntax_mkApp___closed__1; -x_66 = lean_array_push(x_65, x_51); -x_67 = lean_array_push(x_66, x_64); -x_68 = l_Array_append___rarg(x_30, x_67); -lean_dec(x_67); -x_69 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_69, 0, x_68); -lean_ctor_set(x_69, 1, x_10); -lean_ctor_set(x_69, 2, x_20); -lean_ctor_set(x_69, 3, x_24); -lean_ctor_set(x_54, 0, x_69); -return x_54; -} -else -{ -lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; -x_70 = lean_ctor_get(x_54, 1); -lean_inc(x_70); -lean_dec(x_54); -lean_inc(x_24); -x_71 = lean_mk_syntax_ident(x_24); -x_72 = lean_array_push(x_36, x_71); -x_73 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_73, 0, x_38); -lean_ctor_set(x_73, 1, x_72); -x_74 = lean_array_push(x_40, x_73); -x_75 = lean_array_push(x_74, x_44); -x_76 = lean_array_push(x_75, x_46); -x_77 = lean_array_push(x_76, x_48); -x_78 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_78, 0, x_50); -lean_ctor_set(x_78, 1, x_77); -x_79 = l_Lean_Syntax_mkApp___closed__1; -x_80 = lean_array_push(x_79, x_51); -x_81 = lean_array_push(x_80, x_78); -x_82 = l_Array_append___rarg(x_30, x_81); -lean_dec(x_81); -x_83 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_83, 0, x_82); -lean_ctor_set(x_83, 1, x_10); -lean_ctor_set(x_83, 2, x_20); -lean_ctor_set(x_83, 3, x_24); -x_84 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_84, 0, x_83); -lean_ctor_set(x_84, 1, x_70); -return x_84; -} -} -else -{ -uint8_t x_85; -lean_dec(x_24); -lean_dec(x_20); -lean_dec(x_16); -lean_dec(x_13); -lean_dec(x_10); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_85 = !lean_is_exclusive(x_27); -if (x_85 == 0) -{ -return x_27; -} -else -{ -lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_86 = lean_ctor_get(x_27, 0); -x_87 = lean_ctor_get(x_27, 1); -lean_inc(x_87); -lean_inc(x_86); -lean_dec(x_27); -x_88 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_88, 0, x_86); -lean_ctor_set(x_88, 1, x_87); -return x_88; -} -} -} -else -{ -uint8_t x_89; -lean_dec(x_10); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_89 = !lean_is_exclusive(x_12); -if (x_89 == 0) -{ -return x_12; -} -else -{ -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_12, 0); -x_91 = lean_ctor_get(x_12, 1); -lean_inc(x_91); -lean_inc(x_90); -lean_dec(x_12); -x_92 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_92, 0, x_90); -lean_ctor_set(x_92, 1, x_91); -return x_92; -} -} -} -else -{ -uint8_t x_93; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_93 = !lean_is_exclusive(x_9); -if (x_93 == 0) -{ -return x_9; -} -else -{ -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_9, 0); -x_95 = lean_ctor_get(x_9, 1); -lean_inc(x_95); -lean_inc(x_94); -lean_dec(x_9); -x_96 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_96, 0, x_94); -lean_ctor_set(x_96, 1, x_95); -return x_96; -} -} +lean_object* x_9; lean_object* x_10; +x_9 = l_myMacro____x40_Init_Notation___hyg_6100____closed__5; +x_10 = l_Lean_Elab_Deriving_Binary_mkHeader___rarg(x_9, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +return x_10; } } lean_object* l_Lean_Elab_Deriving_BEq_mkHeader(lean_object* x_1) { @@ -639,202 +348,6 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_BEq_mkMatch_mkAlts_match__ return x_2; } } -lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscr(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; -x_9 = l_Lean_Elab_Term_getCurrMacroScope(x_2, x_3, x_4, x_5, x_6, x_7, x_8); -x_10 = lean_ctor_get(x_9, 1); -lean_inc(x_10); -lean_dec(x_9); -x_11 = l_Lean_Elab_Term_getMainModule___rarg(x_7, x_10); -x_12 = !lean_is_exclusive(x_11); -if (x_12 == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_13 = lean_ctor_get(x_11, 0); -lean_dec(x_13); -x_14 = lean_mk_syntax_ident(x_1); -x_15 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_261____closed__19; -x_16 = lean_array_push(x_15, x_14); -x_17 = l_Lean_Parser_Term_matchDiscr___elambda__1___closed__1; -x_18 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_16); -lean_ctor_set(x_11, 0, x_18); -return x_11; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_19 = lean_ctor_get(x_11, 1); -lean_inc(x_19); -lean_dec(x_11); -x_20 = lean_mk_syntax_ident(x_1); -x_21 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_261____closed__19; -x_22 = lean_array_push(x_21, x_20); -x_23 = l_Lean_Parser_Term_matchDiscr___elambda__1___closed__1; -x_24 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_24, 0, x_23); -lean_ctor_set(x_24, 1, x_22); -x_25 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_25, 0, x_24); -lean_ctor_set(x_25, 1, x_19); -return x_25; -} -} -} -lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; -x_9 = l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscr(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { -_start: -{ -uint8_t x_12; -x_12 = x_3 < x_2; -if (x_12 == 0) -{ -lean_object* x_13; -x_13 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_13, 0, x_4); -lean_ctor_set(x_13, 1, x_11); -return x_13; -} -else -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; size_t x_20; size_t x_21; -x_14 = lean_ctor_get(x_1, 0); -x_15 = lean_array_uget(x_14, x_3); -x_16 = l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscr(x_15, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -x_17 = lean_ctor_get(x_16, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_16, 1); -lean_inc(x_18); -lean_dec(x_16); -x_19 = lean_array_push(x_4, x_17); -x_20 = 1; -x_21 = x_3 + x_20; -x_3 = x_21; -x_4 = x_19; -x_11 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { -_start: -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; lean_object* x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; -x_11 = lean_ctor_get(x_2, 1); -lean_inc(x_11); -lean_dec(x_2); -x_12 = lean_array_get_size(x_3); -x_13 = l_Array_toSubarray___rarg(x_3, x_11, x_12); -x_14 = lean_ctor_get(x_13, 2); -lean_inc(x_14); -x_15 = lean_usize_of_nat(x_14); -lean_dec(x_14); -x_16 = lean_ctor_get(x_13, 1); -lean_inc(x_16); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = l_Array_empty___closed__1; -x_19 = l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs___spec__1(x_13, x_15, x_17, x_18, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -lean_dec(x_13); -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -x_21 = lean_ctor_get(x_19, 1); -lean_inc(x_21); -lean_dec(x_19); -x_22 = lean_ctor_get(x_1, 2); -lean_inc(x_22); -x_23 = l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscr(x_22, x_4, x_5, x_6, x_7, x_8, x_9, x_21); -x_24 = lean_ctor_get(x_23, 0); -lean_inc(x_24); -x_25 = lean_ctor_get(x_23, 1); -lean_inc(x_25); -lean_dec(x_23); -x_26 = lean_ctor_get(x_1, 3); -lean_inc(x_26); -lean_dec(x_1); -x_27 = l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscr(x_26, x_4, x_5, x_6, x_7, x_8, x_9, x_25); -x_28 = !lean_is_exclusive(x_27); -if (x_28 == 0) -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_29 = lean_ctor_get(x_27, 0); -x_30 = l_Lean_Syntax_mkApp___closed__1; -x_31 = lean_array_push(x_30, x_24); -x_32 = lean_array_push(x_31, x_29); -x_33 = l_Array_append___rarg(x_20, x_32); -lean_dec(x_32); -lean_ctor_set(x_27, 0, x_33); -return x_27; -} -else -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_34 = lean_ctor_get(x_27, 0); -x_35 = lean_ctor_get(x_27, 1); -lean_inc(x_35); -lean_inc(x_34); -lean_dec(x_27); -x_36 = l_Lean_Syntax_mkApp___closed__1; -x_37 = lean_array_push(x_36, x_24); -x_38 = lean_array_push(x_37, x_34); -x_39 = l_Array_append___rarg(x_20, x_38); -lean_dec(x_38); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_35); -return x_40; -} -} -} -lean_object* l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { -_start: -{ -size_t x_12; size_t x_13; lean_object* x_14; -x_12 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_13 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_14 = l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs___spec__1(x_1, x_12, x_13, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_1); -return x_14; -} -} -lean_object* l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { -_start: -{ -lean_object* x_11; -x_11 = l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -return x_11; -} -} lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_BEq_mkMatch_mkElseAlt___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { @@ -3115,167 +2628,167 @@ lean_dec(x_6); return x_15; } } -lean_object* l_Lean_Elab_Deriving_BEq_mkMatch___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +lean_object* l_Lean_Elab_Deriving_BEq_mkMatch___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_inc(x_2); -x_12 = l_Lean_Elab_Deriving_BEq_mkMatch_mkDiscrs(x_1, x_2, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -x_13 = lean_ctor_get(x_12, 0); +x_11 = l_Lean_Elab_Deriving_Binary_mkDiscrs(x_1, x_2, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); lean_inc(x_13); -x_14 = lean_ctor_get(x_12, 1); -lean_inc(x_14); -lean_dec(x_12); -lean_inc(x_10); +lean_dec(x_11); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -x_15 = l_Lean_Elab_Deriving_BEq_mkMatch_mkAlts(x_2, x_3, x_5, x_6, x_7, x_8, x_9, x_10, x_14); -if (lean_obj_tag(x_15) == 0) +lean_inc(x_4); +x_14 = l_Lean_Elab_Deriving_BEq_mkMatch_mkAlts(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_13); +if (lean_obj_tag(x_14) == 0) { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; -x_16 = lean_ctor_get(x_15, 0); +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); -x_17 = lean_ctor_get(x_15, 1); -lean_inc(x_17); -lean_dec(x_15); -x_18 = l_Lean_Elab_Term_getCurrMacroScope(x_5, x_6, x_7, x_8, x_9, x_10, x_17); -lean_dec(x_9); +lean_dec(x_14); +x_17 = l_Lean_Elab_Term_getCurrMacroScope(x_4, x_5, x_6, x_7, x_8, x_9, x_16); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_19 = lean_ctor_get(x_18, 1); -lean_inc(x_19); -lean_dec(x_18); -x_20 = l_Lean_Elab_Term_getMainModule___rarg(x_10, x_19); -lean_dec(x_10); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) +lean_dec(x_4); +x_18 = lean_ctor_get(x_17, 1); +lean_inc(x_18); +lean_dec(x_17); +x_19 = l_Lean_Elab_Term_getMainModule___rarg(x_9, x_18); +lean_dec(x_9); +x_20 = !lean_is_exclusive(x_19); +if (x_20 == 0) { -lean_object* x_22; lean_object* x_23; size_t x_24; size_t x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_22 = lean_ctor_get(x_20, 0); +lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_21 = lean_ctor_get(x_19, 0); +lean_dec(x_21); +x_22 = lean_array_get_size(x_12); +x_23 = lean_usize_of_nat(x_22); lean_dec(x_22); -x_23 = lean_array_get_size(x_13); -x_24 = lean_usize_of_nat(x_23); -lean_dec(x_23); -x_25 = 0; -x_26 = x_13; -x_27 = l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(x_24, x_25, x_26); -x_28 = x_27; -x_29 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; -x_30 = l_Lean_mkSepArray(x_28, x_29); -lean_dec(x_28); -x_31 = l_Array_empty___closed__1; -x_32 = l_Array_appendCore___rarg(x_31, x_30); -lean_dec(x_30); -x_33 = l_Lean_nullKind___closed__2; -x_34 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_32); -x_35 = l_Lean_Elab_Term_expandFunBinders_loop___closed__2; -x_36 = lean_array_push(x_35, x_34); -x_37 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; -x_38 = lean_array_push(x_36, x_37); -x_39 = l_Lean_Elab_Term_expandFunBinders_loop___closed__4; -x_40 = lean_array_push(x_38, x_39); -x_41 = l_Array_appendCore___rarg(x_31, x_16); -lean_dec(x_16); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_33); -lean_ctor_set(x_42, 1, x_41); -x_43 = lean_array_push(x_31, x_42); -x_44 = l_Lean_Parser_Term_matchAlts___elambda__1___closed__1; -x_45 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_45, 0, x_44); -lean_ctor_set(x_45, 1, x_43); -x_46 = lean_array_push(x_40, x_45); -x_47 = l_Lean_Parser_Term_match___elambda__1___closed__1; -x_48 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_48, 0, x_47); -lean_ctor_set(x_48, 1, x_46); -lean_ctor_set(x_20, 0, x_48); -return x_20; +x_24 = 0; +x_25 = x_12; +x_26 = l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(x_23, x_24, x_25); +x_27 = x_26; +x_28 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; +x_29 = l_Lean_mkSepArray(x_27, x_28); +lean_dec(x_27); +x_30 = l_Array_empty___closed__1; +x_31 = l_Array_appendCore___rarg(x_30, x_29); +lean_dec(x_29); +x_32 = l_Lean_nullKind___closed__2; +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_31); +x_34 = l_Lean_Elab_Term_expandFunBinders_loop___closed__2; +x_35 = lean_array_push(x_34, x_33); +x_36 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_37 = lean_array_push(x_35, x_36); +x_38 = l_Lean_Elab_Term_expandFunBinders_loop___closed__4; +x_39 = lean_array_push(x_37, x_38); +x_40 = l_Array_appendCore___rarg(x_30, x_15); +lean_dec(x_15); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_32); +lean_ctor_set(x_41, 1, x_40); +x_42 = lean_array_push(x_30, x_41); +x_43 = l_Lean_Parser_Term_matchAlts___elambda__1___closed__1; +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_43); +lean_ctor_set(x_44, 1, x_42); +x_45 = lean_array_push(x_39, x_44); +x_46 = l_Lean_Parser_Term_match___elambda__1___closed__1; +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_45); +lean_ctor_set(x_19, 0, x_47); +return x_19; } else { -lean_object* x_49; lean_object* x_50; size_t x_51; size_t x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_49 = lean_ctor_get(x_20, 1); -lean_inc(x_49); -lean_dec(x_20); -x_50 = lean_array_get_size(x_13); -x_51 = lean_usize_of_nat(x_50); -lean_dec(x_50); -x_52 = 0; -x_53 = x_13; -x_54 = l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(x_51, x_52, x_53); -x_55 = x_54; -x_56 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; -x_57 = l_Lean_mkSepArray(x_55, x_56); -lean_dec(x_55); -x_58 = l_Array_empty___closed__1; -x_59 = l_Array_appendCore___rarg(x_58, x_57); -lean_dec(x_57); -x_60 = l_Lean_nullKind___closed__2; -x_61 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_61, 0, x_60); -lean_ctor_set(x_61, 1, x_59); -x_62 = l_Lean_Elab_Term_expandFunBinders_loop___closed__2; -x_63 = lean_array_push(x_62, x_61); -x_64 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; -x_65 = lean_array_push(x_63, x_64); -x_66 = l_Lean_Elab_Term_expandFunBinders_loop___closed__4; -x_67 = lean_array_push(x_65, x_66); -x_68 = l_Array_appendCore___rarg(x_58, x_16); -lean_dec(x_16); -x_69 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_69, 0, x_60); -lean_ctor_set(x_69, 1, x_68); -x_70 = lean_array_push(x_58, x_69); -x_71 = l_Lean_Parser_Term_matchAlts___elambda__1___closed__1; -x_72 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_72, 0, x_71); -lean_ctor_set(x_72, 1, x_70); -x_73 = lean_array_push(x_67, x_72); -x_74 = l_Lean_Parser_Term_match___elambda__1___closed__1; -x_75 = lean_alloc_ctor(1, 2, 0); +lean_object* x_48; lean_object* x_49; size_t x_50; size_t x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_48 = lean_ctor_get(x_19, 1); +lean_inc(x_48); +lean_dec(x_19); +x_49 = lean_array_get_size(x_12); +x_50 = lean_usize_of_nat(x_49); +lean_dec(x_49); +x_51 = 0; +x_52 = x_12; +x_53 = l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(x_50, x_51, x_52); +x_54 = x_53; +x_55 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; +x_56 = l_Lean_mkSepArray(x_54, x_55); +lean_dec(x_54); +x_57 = l_Array_empty___closed__1; +x_58 = l_Array_appendCore___rarg(x_57, x_56); +lean_dec(x_56); +x_59 = l_Lean_nullKind___closed__2; +x_60 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_58); +x_61 = l_Lean_Elab_Term_expandFunBinders_loop___closed__2; +x_62 = lean_array_push(x_61, x_60); +x_63 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_64 = lean_array_push(x_62, x_63); +x_65 = l_Lean_Elab_Term_expandFunBinders_loop___closed__4; +x_66 = lean_array_push(x_64, x_65); +x_67 = l_Array_appendCore___rarg(x_57, x_15); +lean_dec(x_15); +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_59); +lean_ctor_set(x_68, 1, x_67); +x_69 = lean_array_push(x_57, x_68); +x_70 = l_Lean_Parser_Term_matchAlts___elambda__1___closed__1; +x_71 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_71, 0, x_70); +lean_ctor_set(x_71, 1, x_69); +x_72 = lean_array_push(x_66, x_71); +x_73 = l_Lean_Parser_Term_match___elambda__1___closed__1; +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_73); +lean_ctor_set(x_74, 1, x_72); +x_75 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_75, 0, x_74); -lean_ctor_set(x_75, 1, x_73); -x_76 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_76, 0, x_75); -lean_ctor_set(x_76, 1, x_49); -return x_76; +lean_ctor_set(x_75, 1, x_48); +return x_75; } } else { -uint8_t x_77; -lean_dec(x_13); -lean_dec(x_10); +uint8_t x_76; +lean_dec(x_12); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_77 = !lean_is_exclusive(x_15); -if (x_77 == 0) +lean_dec(x_4); +x_76 = !lean_is_exclusive(x_14); +if (x_76 == 0) { -return x_15; +return x_14; } else { -lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_78 = lean_ctor_get(x_15, 0); -x_79 = lean_ctor_get(x_15, 1); -lean_inc(x_79); +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_14, 0); +x_78 = lean_ctor_get(x_14, 1); lean_inc(x_78); -lean_dec(x_15); -x_80 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_80, 0, x_78); -lean_ctor_set(x_80, 1, x_79); -return x_80; +lean_inc(x_77); +lean_dec(x_14); +x_79 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +return x_79; } } } @@ -3284,7 +2797,7 @@ lean_object* l_Lean_Elab_Deriving_BEq_mkMatch(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_BEq_mkMatch___rarg), 11, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_BEq_mkMatch___rarg), 10, 0); return x_2; } } @@ -3907,39 +3420,35 @@ lean_inc(x_15); x_16 = l_Lean_Elab_Deriving_BEq_mkHeader___rarg(x_15, x_3, x_4, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_16) == 0) { -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_17; lean_object* x_18; lean_object* x_19; x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); lean_dec(x_16); -x_19 = lean_ctor_get(x_17, 1); -lean_inc(x_19); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); -lean_inc(x_19); lean_inc(x_12); lean_inc(x_17); -x_20 = l_Lean_Elab_Deriving_BEq_mkMatch___rarg(x_17, x_15, x_12, x_19, x_3, x_4, x_5, x_6, x_7, x_8, x_18); -if (lean_obj_tag(x_20) == 0) +x_19 = l_Lean_Elab_Deriving_BEq_mkMatch___rarg(x_17, x_15, x_12, x_3, x_4, x_5, x_6, x_7, x_8, x_18); +if (lean_obj_tag(x_19) == 0) { -uint8_t x_21; -x_21 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); -if (x_21 == 0) +uint8_t x_20; +x_20 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); +if (x_20 == 0) { -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; -lean_dec(x_19); -x_22 = lean_ctor_get(x_20, 0); +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_21 = lean_ctor_get(x_19, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_19, 1); lean_inc(x_22); -x_23 = lean_ctor_get(x_20, 1); -lean_inc(x_23); -lean_dec(x_20); -x_24 = lean_box(0); -x_25 = l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1(x_17, x_1, x_12, x_22, x_24, x_3, x_4, x_5, x_6, x_7, x_8, x_23); +lean_dec(x_19); +x_23 = lean_box(0); +x_24 = l_Lean_Elab_Deriving_BEq_mkAuxFunction___lambda__1(x_17, x_1, x_12, x_21, x_23, x_3, x_4, x_5, x_6, x_7, x_8, x_22); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); @@ -3947,16 +3456,18 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_17); -return x_25; +return x_24; } else { -lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_26 = lean_ctor_get(x_20, 0); +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_25 = lean_ctor_get(x_19, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_19, 1); lean_inc(x_26); -x_27 = lean_ctor_get(x_20, 1); +lean_dec(x_19); +x_27 = lean_ctor_get(x_17, 1); lean_inc(x_27); -lean_dec(x_20); x_28 = l_myMacro____x40_Init_Notation___hyg_6100____closed__5; lean_inc(x_8); lean_inc(x_7); @@ -3964,7 +3475,7 @@ lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); -x_29 = l_Lean_Elab_Deriving_mkLocalInstanceLetDecls(x_1, x_28, x_19, x_3, x_4, x_5, x_6, x_7, x_8, x_27); +x_29 = l_Lean_Elab_Deriving_mkLocalInstanceLetDecls(x_1, x_28, x_27, x_3, x_4, x_5, x_6, x_7, x_8, x_26); if (lean_obj_tag(x_29) == 0) { lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; @@ -3973,7 +3484,7 @@ lean_inc(x_30); x_31 = lean_ctor_get(x_29, 1); lean_inc(x_31); lean_dec(x_29); -x_32 = l_Lean_Elab_Deriving_mkLet(x_30, x_26, x_3, x_4, x_5, x_6, x_7, x_8, x_31); +x_32 = l_Lean_Elab_Deriving_mkLet(x_30, x_25, x_3, x_4, x_5, x_6, x_7, x_8, x_31); lean_dec(x_30); x_33 = lean_ctor_get(x_32, 0); lean_inc(x_33); @@ -3994,7 +3505,7 @@ return x_36; else { uint8_t x_37; -lean_dec(x_26); +lean_dec(x_25); lean_dec(x_17); lean_dec(x_12); lean_dec(x_8); @@ -4027,7 +3538,6 @@ return x_40; else { uint8_t x_41; -lean_dec(x_19); lean_dec(x_17); lean_dec(x_12); lean_dec(x_8); @@ -4036,19 +3546,19 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -x_41 = !lean_is_exclusive(x_20); +x_41 = !lean_is_exclusive(x_19); if (x_41 == 0) { -return x_20; +return x_19; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_20, 0); -x_43 = lean_ctor_get(x_20, 1); +x_42 = lean_ctor_get(x_19, 0); +x_43 = lean_ctor_get(x_19, 1); lean_inc(x_43); lean_inc(x_42); -lean_dec(x_20); +lean_dec(x_19); x_44 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_44, 0, x_42); lean_ctor_set(x_44, 1, x_43); @@ -4602,255 +4112,257 @@ return x_12; lean_object* l___private_Lean_Elab_Deriving_BEq_0__Lean_Elab_Deriving_BEq_mkBEqInstanceCmds(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_9 = l_Lean_instInhabitedName; x_10 = lean_unsigned_to_nat(0u); x_11 = lean_array_get(x_9, x_1, x_10); +x_12 = l_myMacro____x40_Init_Notation___hyg_6100____closed__6; lean_inc(x_2); -x_12 = l_Lean_Elab_Deriving_mkContext(x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_12) == 0) +x_13 = l_Lean_Elab_Deriving_mkContext(x_12, x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_13) == 0) { -lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_12, 1); +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); -lean_dec(x_12); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); -x_15 = l_Lean_Elab_Deriving_BEq_mkMutualBlock(x_13, x_2, x_3, x_4, x_5, x_6, x_7, x_14); -if (lean_obj_tag(x_15) == 0) +x_16 = l_Lean_Elab_Deriving_BEq_mkMutualBlock(x_14, x_2, x_3, x_4, x_5, x_6, x_7, x_15); +if (lean_obj_tag(x_16) == 0) { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); -x_17 = lean_ctor_get(x_15, 1); +lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; +x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); -lean_dec(x_15); -x_18 = l_myMacro____x40_Init_Notation___hyg_6100____closed__5; +x_18 = lean_ctor_get(x_16, 1); +lean_inc(x_18); +lean_dec(x_16); +x_19 = l_myMacro____x40_Init_Notation___hyg_6100____closed__5; +x_20 = 1; lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); -x_19 = l_Lean_Elab_Deriving_mkInstanceCmds(x_13, x_18, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_17); -lean_dec(x_13); -if (lean_obj_tag(x_19) == 0) +x_21 = l_Lean_Elab_Deriving_mkInstanceCmds(x_14, x_19, x_1, x_20, x_2, x_3, x_4, x_5, x_6, x_7, x_18); +lean_dec(x_14); +if (lean_obj_tag(x_21) == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; lean_object* x_27; lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -x_21 = lean_ctor_get(x_19, 1); -lean_inc(x_21); -if (lean_is_exclusive(x_19)) { - lean_ctor_release(x_19, 0); - lean_ctor_release(x_19, 1); - x_22 = x_19; +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; lean_object* x_29; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_21, 1); +lean_inc(x_23); +if (lean_is_exclusive(x_21)) { + lean_ctor_release(x_21, 0); + lean_ctor_release(x_21, 1); + x_24 = x_21; } else { - lean_dec_ref(x_19); - x_22 = lean_box(0); + lean_dec_ref(x_21); + x_24 = lean_box(0); } -x_23 = l_Lean_mkOptionalNode___closed__2; -x_24 = lean_array_push(x_23, x_16); -x_25 = l_Array_append___rarg(x_24, x_20); -lean_dec(x_20); -x_43 = lean_st_ref_get(x_7, x_21); -x_44 = lean_ctor_get(x_43, 0); -lean_inc(x_44); -x_45 = lean_ctor_get(x_44, 3); -lean_inc(x_45); -lean_dec(x_44); -x_46 = lean_ctor_get_uint8(x_45, sizeof(void*)*1); -lean_dec(x_45); -if (x_46 == 0) -{ -lean_object* x_47; uint8_t x_48; -x_47 = lean_ctor_get(x_43, 1); -lean_inc(x_47); -lean_dec(x_43); -x_48 = 0; -x_26 = x_48; -x_27 = x_47; -goto block_42; -} -else -{ -lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; uint8_t x_54; -x_49 = lean_ctor_get(x_43, 1); -lean_inc(x_49); -lean_dec(x_43); -x_50 = l_Lean_Elab_Deriving_mkContext___closed__3; -x_51 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_50, x_2, x_3, x_4, x_5, x_6, x_7, x_49); -x_52 = lean_ctor_get(x_51, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_51, 1); -lean_inc(x_53); -lean_dec(x_51); -x_54 = lean_unbox(x_52); -lean_dec(x_52); -x_26 = x_54; -x_27 = x_53; -goto block_42; -} -block_42: -{ -if (x_26 == 0) -{ -lean_object* x_28; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -if (lean_is_scalar(x_22)) { - x_28 = lean_alloc_ctor(0, 2, 0); -} else { - x_28 = x_22; -} -lean_ctor_set(x_28, 0, x_25); -lean_ctor_set(x_28, 1, x_27); -return x_28; -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; +x_25 = l_Lean_mkOptionalNode___closed__2; +x_26 = lean_array_push(x_25, x_17); +x_27 = l_Array_append___rarg(x_26, x_22); lean_dec(x_22); -lean_inc(x_25); -x_29 = lean_array_to_list(lean_box(0), x_25); -x_30 = l_List_map___at___private_Lean_Elab_Deriving_BEq_0__Lean_Elab_Deriving_BEq_mkBEqInstanceCmds___spec__1(x_29); -x_31 = l_Lean_MessageData_ofList(x_30); -lean_dec(x_30); -x_32 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; -x_33 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_31); -x_34 = l_Lean_KernelException_toMessageData___closed__15; +x_45 = lean_st_ref_get(x_7, x_23); +x_46 = lean_ctor_get(x_45, 0); +lean_inc(x_46); +x_47 = lean_ctor_get(x_46, 3); +lean_inc(x_47); +lean_dec(x_46); +x_48 = lean_ctor_get_uint8(x_47, sizeof(void*)*1); +lean_dec(x_47); +if (x_48 == 0) +{ +lean_object* x_49; uint8_t x_50; +x_49 = lean_ctor_get(x_45, 1); +lean_inc(x_49); +lean_dec(x_45); +x_50 = 0; +x_28 = x_50; +x_29 = x_49; +goto block_44; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; +x_51 = lean_ctor_get(x_45, 1); +lean_inc(x_51); +lean_dec(x_45); +x_52 = l_Lean_Elab_Deriving_mkContext___closed__3; +x_53 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_52, x_2, x_3, x_4, x_5, x_6, x_7, x_51); +x_54 = lean_ctor_get(x_53, 0); +lean_inc(x_54); +x_55 = lean_ctor_get(x_53, 1); +lean_inc(x_55); +lean_dec(x_53); +x_56 = lean_unbox(x_54); +lean_dec(x_54); +x_28 = x_56; +x_29 = x_55; +goto block_44; +} +block_44: +{ +if (x_28 == 0) +{ +lean_object* x_30; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +if (lean_is_scalar(x_24)) { + x_30 = lean_alloc_ctor(0, 2, 0); +} else { + x_30 = x_24; +} +lean_ctor_set(x_30, 0, x_27); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; +lean_dec(x_24); +lean_inc(x_27); +x_31 = lean_array_to_list(lean_box(0), x_27); +x_32 = l_List_map___at___private_Lean_Elab_Deriving_BEq_0__Lean_Elab_Deriving_BEq_mkBEqInstanceCmds___spec__1(x_31); +x_33 = l_Lean_MessageData_ofList(x_32); +lean_dec(x_32); +x_34 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; x_35 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_35, 0, x_33); -lean_ctor_set(x_35, 1, x_34); -x_36 = l_Lean_Elab_Deriving_mkContext___closed__3; -x_37 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_36, x_35, x_2, x_3, x_4, x_5, x_6, x_7, x_27); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +x_36 = l_Lean_KernelException_toMessageData___closed__15; +x_37 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_37, 0, x_35); +lean_ctor_set(x_37, 1, x_36); +x_38 = l_Lean_Elab_Deriving_mkContext___closed__3; +x_39 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_38, x_37, x_2, x_3, x_4, x_5, x_6, x_7, x_29); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_38 = !lean_is_exclusive(x_37); -if (x_38 == 0) +x_40 = !lean_is_exclusive(x_39); +if (x_40 == 0) { -lean_object* x_39; -x_39 = lean_ctor_get(x_37, 0); +lean_object* x_41; +x_41 = lean_ctor_get(x_39, 0); +lean_dec(x_41); +lean_ctor_set(x_39, 0, x_27); +return x_39; +} +else +{ +lean_object* x_42; lean_object* x_43; +x_42 = lean_ctor_get(x_39, 1); +lean_inc(x_42); lean_dec(x_39); -lean_ctor_set(x_37, 0, x_25); -return x_37; -} -else -{ -lean_object* x_40; lean_object* x_41; -x_40 = lean_ctor_get(x_37, 1); -lean_inc(x_40); -lean_dec(x_37); -x_41 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_41, 0, x_25); -lean_ctor_set(x_41, 1, x_40); -return x_41; +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_27); +lean_ctor_set(x_43, 1, x_42); +return x_43; } } } } else { -uint8_t x_55; +uint8_t x_57; +lean_dec(x_17); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_57 = !lean_is_exclusive(x_21); +if (x_57 == 0) +{ +return x_21; +} +else +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_58 = lean_ctor_get(x_21, 0); +x_59 = lean_ctor_get(x_21, 1); +lean_inc(x_59); +lean_inc(x_58); +lean_dec(x_21); +x_60 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_60, 0, x_58); +lean_ctor_set(x_60, 1, x_59); +return x_60; +} +} +} +else +{ +uint8_t x_61; +lean_dec(x_14); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_61 = !lean_is_exclusive(x_16); +if (x_61 == 0) +{ +return x_16; +} +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_16, 0); +x_63 = lean_ctor_get(x_16, 1); +lean_inc(x_63); +lean_inc(x_62); lean_dec(x_16); +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_62); +lean_ctor_set(x_64, 1, x_63); +return x_64; +} +} +} +else +{ +uint8_t x_65; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_55 = !lean_is_exclusive(x_19); -if (x_55 == 0) +x_65 = !lean_is_exclusive(x_13); +if (x_65 == 0) { -return x_19; +return x_13; } else { -lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_56 = lean_ctor_get(x_19, 0); -x_57 = lean_ctor_get(x_19, 1); -lean_inc(x_57); -lean_inc(x_56); -lean_dec(x_19); -x_58 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_58, 0, x_56); -lean_ctor_set(x_58, 1, x_57); -return x_58; -} -} -} -else -{ -uint8_t x_59; +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_13, 0); +x_67 = lean_ctor_get(x_13, 1); +lean_inc(x_67); +lean_inc(x_66); lean_dec(x_13); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_59 = !lean_is_exclusive(x_15); -if (x_59 == 0) -{ -return x_15; -} -else -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_60 = lean_ctor_get(x_15, 0); -x_61 = lean_ctor_get(x_15, 1); -lean_inc(x_61); -lean_inc(x_60); -lean_dec(x_15); -x_62 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_62, 0, x_60); -lean_ctor_set(x_62, 1, x_61); -return x_62; -} -} -} -else -{ -uint8_t x_63; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_63 = !lean_is_exclusive(x_12); -if (x_63 == 0) -{ -return x_12; -} -else -{ -lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_64 = lean_ctor_get(x_12, 0); -x_65 = lean_ctor_get(x_12, 1); -lean_inc(x_65); -lean_inc(x_64); -lean_dec(x_12); -x_66 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_66, 0, x_64); -lean_ctor_set(x_66, 1, x_65); -return x_66; +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_66); +lean_ctor_set(x_68, 1, x_67); +return x_68; } } } @@ -5398,7 +4910,7 @@ lean_dec(x_1); return x_9; } } -static lean_object* _init_l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2623____closed__1() { +static lean_object* _init_l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2265____closed__1() { _start: { lean_object* x_1; @@ -5406,12 +4918,12 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_BEq_mkBEqInstanceHandler), return x_1; } } -lean_object* l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2623_(lean_object* x_1) { +lean_object* l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2265_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = l_myMacro____x40_Init_Notation___hyg_6100____closed__5; -x_3 = l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2623____closed__1; +x_3 = l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2265____closed__1; x_4 = l_Lean_Elab_registerBuiltinDerivingHandler(x_2, x_3, x_1); if (lean_obj_tag(x_4) == 0) { @@ -5568,9 +5080,9 @@ l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__13 = _init_l_Lean_Elab_Deriving lean_mark_persistent(l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__13); l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__14 = _init_l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__14(); lean_mark_persistent(l_Lean_Elab_Deriving_BEq_mkMutualBlock___closed__14); -l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2623____closed__1 = _init_l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2623____closed__1(); -lean_mark_persistent(l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2623____closed__1); -res = l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2623_(lean_io_mk_world()); +l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2265____closed__1 = _init_l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2265____closed__1(); +lean_mark_persistent(l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2265____closed__1); +res = l_Lean_Elab_Deriving_BEq_initFn____x40_Lean_Elab_Deriving_BEq___hyg_2265_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Elab/Deriving/DecEq.c b/stage0/stdlib/Lean/Elab/Deriving/DecEq.c new file mode 100644 index 0000000000..21ae628fd4 --- /dev/null +++ b/stage0/stdlib/Lean/Elab/Deriving/DecEq.c @@ -0,0 +1,7344 @@ +// Lean compiler output +// Module: Lean.Elab.Deriving.DecEq +// Imports: Init Lean.Meta.Transform Lean.Meta.Inductive Lean.Elab.Deriving.Basic Lean.Elab.Deriving.Util +#include +#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_getConstInfo___at_Lean_Elab_Term_mkConst___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__2; +uint8_t l_Lean_Expr_hasAnyFVar_visit___at_Lean_Expr_containsFVar___spec__1(lean_object*, lean_object*); +extern lean_object* l_Lean_mkDecIsFalse___closed__2; +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__13; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23; +extern lean_object* l_Lean_Parser_Tactic_apply___closed__2; +lean_object* l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__2; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__3___rarg(lean_object*, lean_object*); +extern lean_object* l_Lean_mkDecIsTrue___closed__3; +extern lean_object* l_Lean_Elab_Deriving_mkContext___closed__2; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__1; +extern lean_object* l_Lean_mkDecIsFalse___closed__1; +lean_object* l_Lean_Elab_Command_liftTermElabM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +lean_object* lean_name_mk_string(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Tactic_injection___closed__2; +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__2; +lean_object* l_Array_append___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__2; +extern lean_object* l_termIf_____x3a__Then__Else_____closed__3; +extern lean_object* l_Lean_getConstInfoInduct___rarg___lambda__1___closed__2; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__3; +extern lean_object* l_Lean_Parser_Tactic_intro___closed__4; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__9; +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___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_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_12315____closed__10; +extern lean_object* l_Lean_Parser_Term_match___elambda__1___closed__1; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch___boxed(lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__4; +lean_object* l_Lean_getConstInfo___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Array_empty___closed__1; +lean_object* lean_environment_find(lean_object*, lean_object*); +extern lean_object* l_Std_Range_myMacro____x40_Init_Data_Range___hyg_261____closed__19; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__3(lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__25; +lean_object* l_Lean_Meta_compatibleCtors(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_st_ref_get(lean_object*, lean_object*); +uint8_t lean_name_eq(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__1; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__6; +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__31; +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__1; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29; +uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__2; +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* lean_array_get_size(lean_object*); +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___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_object* l_Lean_MessageData_ofList(lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___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* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__1(lean_object*); +extern lean_object* l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__4; +lean_object* lean_string_utf8_byte_size(lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__34; +lean_object* l_Lean_getConstInfoInduct___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_getMainModule___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Tactic_injection___closed__1; +lean_object* lean_nat_add(lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__2; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_12315____closed__11; +extern lean_object* l_Lean_Parser_Tactic_subst___closed__1; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__6; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__19; +lean_object* l_Lean_getConstInfoCtor___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Command_elabCommand___spec__11(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_map___at_Lean_Elab_Deriving_DecEq_mkDecEqCmds___spec__1(lean_object*); +extern lean_object* l_Lean_Parser_Term_matchAlts___elambda__1___closed__1; +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___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_object*, lean_object*, lean_object*); +extern lean_object* l_termIf_____x3a__Then__Else_____closed__2; +lean_object* l_Lean_getConstInfo___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__11; +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Tactic_subst___closed__2; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__31; +lean_object* l_Lean_getConstInfoInduct___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5___closed__1; +extern lean_object* l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__5; +lean_object* lean_st_ref_take(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Tactic_assumption___closed__1; +lean_object* l_Lean_Elab_Deriving_mkInstanceCmds(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__13; +extern lean_object* l_Lean_Elab_Tactic_evalIntro___closed__3; +lean_object* lean_nat_sub(lean_object*, lean_object*); +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__29; +extern lean_object* l_Array_myMacro____x40_Init_Data_Array_Subarray___hyg_905____closed__4; +extern lean_object* l___private_Init_Notation_0__Lean_Parser_Tactic_withCheapRefl___closed__5; +extern lean_object* l_Lean_getBuiltinSearchPath___closed__1; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch(lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__4; +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__7; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__3; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__1; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__17; +lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__2; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__14; +lean_object* l_Lean_Expr_fvarId_x21(lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__8; +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___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* l_Lean_Elab_Deriving_DecEq_mkDecEqCmds(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_elabModifiers___rarg___lambda__3___closed__1; +extern lean_object* l_Lean_mkDecIsTrue___closed__1; +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__9; +extern lean_object* l_Lean_Core_betaReduce___closed__2; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__15; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__36; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__8; +extern lean_object* l_Lean_instInhabitedSourceInfo___closed__1; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__13; +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__10; +lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageContextTermElabM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_mkDecIsTrue___closed__2; +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___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*); +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__44; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__5; +lean_object* l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_to_list(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Tactic_assumption___closed__2; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__15; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35; +extern lean_object* l_Lean_mkDecIsTrue___closed__4; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_12942____closed__16; +extern lean_object* l_Lean_instInhabitedExpr; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__6; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__7; +extern lean_object* l___private_Init_NotationExtra_0__Lean_mkHintBody___closed__2; +extern lean_object* l_Lean_KernelException_toMessageData___closed__15; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__1___rarg(lean_object*, lean_object*); +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__50; +lean_object* l_Lean_mkSepArray(lean_object*, lean_object*); +lean_object* l_Lean_Core_transform___at_Lean_Core_betaReduce___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__10; +lean_object* l_Lean_Elab_Deriving_mkContext(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_KernelException_toMessageData___closed__3; +size_t lean_usize_of_nat(lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_12315____closed__17; +lean_object* l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*); +extern lean_object* l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__2; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20; +lean_object* l_Lean_getConstInfoCtor___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__10; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__32; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_658____closed__8; +extern lean_object* l_Lean_nullKind___closed__2; +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__2; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__2(lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__16; +lean_object* l_Lean_Elab_Deriving_DecEq_initFn____x40_Lean_Elab_Deriving_DecEq___hyg_3673____closed__1; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26; +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___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*); +extern lean_object* l_Lean_Syntax_mkApp___closed__1; +lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkHeader___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; +lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Command_instAddErrorMessageContextCommandElabM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs_match__1(lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_le(lean_object*, lean_object*); +extern lean_object* l_term___x3d_____closed__2; +lean_object* l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(size_t, size_t, lean_object*); +extern lean_object* l_Lean_Elab_Tactic_evalIntro___closed__4; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_12315____closed__13; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__12; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_12942____closed__18; +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_ellipsis___elambda__1___closed__2; +lean_object* l_Lean_Elab_Deriving_Binary_mkDiscrs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_appendCore___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_initFn____x40_Lean_Elab_Deriving_DecEq___hyg_3673_(lean_object*); +extern lean_object* l_Lean_Core_betaReduce___closed__1; +extern lean_object* l_Lean_myMacro____x40_Init_Notation___hyg_13175____closed__3; +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__25; +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_Binary_mkHeader___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__5; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__3; +lean_object* l_Lean_Elab_Command_getRef(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__15; +extern lean_object* l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_16099____closed__5; +lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_instInhabitedName; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +extern lean_object* l_Lean_getConstInfoCtor___rarg___lambda__1___closed__2; +extern lean_object* l_Lean_Elab_Term_expandFunBinders_loop___closed__2; +lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_registerBuiltinDerivingHandler(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__5; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__28; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__30; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__4(lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkHeader(lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14; +extern lean_object* l_Lean_Parser_Term_matchAlt___closed__1; +extern lean_object* l_Lean_expandExplicitBindersAux_loop___closed__1; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__33; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__18; +extern lean_object* l_IO_Prim_fopenFlags___closed__4; +extern lean_object* l_Lean_Parser_Tactic_exact___closed__2; +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__47; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__22; +extern lean_object* l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14110____closed__3; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__2___rarg(lean_object*, lean_object*); +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__46; +lean_object* lean_mk_syntax_ident(lean_object*); +extern lean_object* l_Lean_expandExplicitBindersAux_loop___closed__8; +extern lean_object* l_Lean_instInhabitedInductiveVal; +extern lean_object* l_Lean_mkOptionalNode___closed__2; +extern lean_object* l_Lean_expandExplicitBindersAux_loop___closed__2; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__12; +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__9; +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__3; +lean_object* l_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__27; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__11; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16; +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__11; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__7; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__24; +lean_object* l_Lean_Meta_forallTelescopeReducing___at_Lean_Elab_Deriving_mkInductArgNames___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +lean_object* l_Lean_mkConst(lean_object*, lean_object*); +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Term_expandFunBinders_loop___closed__4; +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__1; +lean_object* l_Lean_Elab_Deriving_DecEq_mkHeader___boxed(lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_12315____closed__15; +extern lean_object* l_Lean_Elab_instToStringVisibility___closed__2; +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__4; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__17; +lean_object* l_Lean_Elab_getBetterRef(lean_object*, lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_658____closed__7; +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__4___rarg(lean_object*, lean_object*); +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("DecidableEq"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkHeader___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; +x_9 = l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__2; +x_10 = l_Lean_Elab_Deriving_Binary_mkHeader___rarg(x_9, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +return x_10; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkHeader(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_DecEq_mkHeader___rarg), 8, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkHeader___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_Deriving_DecEq_mkHeader(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_5; lean_object* x_6; +lean_dec(x_4); +lean_dec(x_3); +x_5 = lean_box(0); +x_6 = lean_apply_1(x_2, x_5); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +lean_dec(x_2); +x_7 = lean_ctor_get(x_1, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_7, 1); +lean_inc(x_8); +x_9 = lean_ctor_get(x_8, 1); +lean_inc(x_9); +x_10 = lean_unbox(x_9); +lean_dec(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +lean_dec(x_4); +x_11 = lean_ctor_get(x_1, 1); +lean_inc(x_11); +lean_dec(x_1); +x_12 = lean_ctor_get(x_7, 0); +lean_inc(x_12); +lean_dec(x_7); +x_13 = lean_ctor_get(x_8, 0); +lean_inc(x_13); +lean_dec(x_8); +x_14 = lean_apply_3(x_3, x_12, x_13, x_11); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +lean_dec(x_3); +x_15 = lean_ctor_get(x_1, 1); +lean_inc(x_15); +lean_dec(x_1); +x_16 = lean_ctor_get(x_7, 0); +lean_inc(x_16); +lean_dec(x_7); +x_17 = lean_ctor_get(x_8, 0); +lean_inc(x_17); +lean_dec(x_8); +x_18 = lean_apply_3(x_4, x_16, x_17, x_15); +return x_18; +} +} +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs_match__1___rarg), 4, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__1___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__1___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__2___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_3 = lean_ctor_get(x_1, 1); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +lean_dec(x_3); +x_7 = lean_apply_3(x_2, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__2___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__3___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_3 = lean_ctor_get(x_1, 1); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +lean_dec(x_3); +x_7 = lean_apply_3(x_2, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__3(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__3___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__4___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts_match__4___rarg), 2, 0); +return x_2; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_mkDecIsTrue___closed__3; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_mkDecIsTrue___closed__3; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__1; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_mkDecIsTrue___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_mkDecIsTrue___closed__4; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__4; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__5; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__6; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instInhabitedSourceInfo___closed__1; +x_2 = l_termIf_____x3a__Then__Else_____closed__3; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__8; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__10() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("then"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instInhabitedSourceInfo___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__10; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__12() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("by"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__13() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instInhabitedSourceInfo___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__12; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__13; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__15() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instInhabitedSourceInfo___closed__1; +x_2 = l_Lean_Parser_Tactic_subst___closed__1; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__15; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__17() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("else"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__18() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instInhabitedSourceInfo___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__17; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__19() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_mkDecIsFalse___closed__1; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_mkDecIsFalse___closed__1; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__19; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_mkDecIsFalse___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__22() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_mkDecIsFalse___closed__2; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__22; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__24() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("n"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__25() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__24; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__24; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__25; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__24; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__28() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instInhabitedSourceInfo___closed__1; +x_2 = l_Lean_Parser_Tactic_injection___closed__1; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__28; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__30() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instInhabitedSourceInfo___closed__1; +x_2 = l_Lean_Parser_Tactic_assumption___closed__1; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__31() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__30; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__32() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Tactic_assumption___closed__2; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__31; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__33() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__32; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__34() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__33; +x_2 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_nullKind___closed__2; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__34; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__36() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_expandExplicitBindersAux_loop___closed__1; +x_2 = l_myMacro____x40_Init_Notation___hyg_12315____closed__17; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +lean_dec(x_1); +x_10 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_3); +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_12); +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_15 = lean_ctor_get(x_13, 0); +x_16 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__3; +lean_inc(x_11); +lean_inc(x_15); +x_17 = l_Lean_addMacroScope(x_15, x_16, x_11); +x_18 = l_Lean_instInhabitedSourceInfo___closed__1; +x_19 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__2; +x_20 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__5; +x_21 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_21, 0, x_18); +lean_ctor_set(x_21, 1, x_19); +lean_ctor_set(x_21, 2, x_17); +lean_ctor_set(x_21, 3, x_20); +x_22 = l_Array_empty___closed__1; +x_23 = lean_array_push(x_22, x_21); +x_24 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__5; +x_25 = l_Lean_addMacroScope(x_15, x_24, x_11); +x_26 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__4; +x_27 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__7; +x_28 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_28, 0, x_18); +lean_ctor_set(x_28, 1, x_26); +lean_ctor_set(x_28, 2, x_25); +lean_ctor_set(x_28, 3, x_27); +x_29 = lean_array_push(x_22, x_28); +x_30 = l_Lean_nullKind___closed__2; +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +x_32 = lean_array_push(x_23, x_31); +x_33 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_33); +lean_ctor_set(x_34, 1, x_32); +lean_ctor_set(x_13, 0, x_34); +return x_13; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_35 = lean_ctor_get(x_13, 0); +x_36 = lean_ctor_get(x_13, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_13); +x_37 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__3; +lean_inc(x_11); +lean_inc(x_35); +x_38 = l_Lean_addMacroScope(x_35, x_37, x_11); +x_39 = l_Lean_instInhabitedSourceInfo___closed__1; +x_40 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__2; +x_41 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__5; +x_42 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_42, 0, x_39); +lean_ctor_set(x_42, 1, x_40); +lean_ctor_set(x_42, 2, x_38); +lean_ctor_set(x_42, 3, x_41); +x_43 = l_Array_empty___closed__1; +x_44 = lean_array_push(x_43, x_42); +x_45 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__5; +x_46 = l_Lean_addMacroScope(x_35, x_45, x_11); +x_47 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__4; +x_48 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__7; +x_49 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_49, 0, x_39); +lean_ctor_set(x_49, 1, x_47); +lean_ctor_set(x_49, 2, x_46); +lean_ctor_set(x_49, 3, x_48); +x_50 = lean_array_push(x_43, x_49); +x_51 = l_Lean_nullKind___closed__2; +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +x_53 = lean_array_push(x_44, x_52); +x_54 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_55 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_55, 0, x_54); +lean_ctor_set(x_55, 1, x_53); +x_56 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_56, 0, x_55); +lean_ctor_set(x_56, 1, x_36); +return x_56; +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60; +x_57 = lean_ctor_get(x_2, 0); +lean_inc(x_57); +x_58 = lean_ctor_get(x_57, 1); +lean_inc(x_58); +x_59 = lean_ctor_get(x_58, 1); +lean_inc(x_59); +x_60 = lean_unbox(x_59); +lean_dec(x_59); +if (x_60 == 0) +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; uint8_t x_67; +x_61 = lean_ctor_get(x_2, 1); +lean_inc(x_61); +lean_dec(x_2); +x_62 = lean_ctor_get(x_57, 0); +lean_inc(x_62); +lean_dec(x_57); +x_63 = lean_ctor_get(x_58, 0); +lean_inc(x_63); +lean_dec(x_58); +x_64 = lean_st_ref_take(x_8, x_9); +x_65 = lean_ctor_get(x_64, 0); +lean_inc(x_65); +x_66 = lean_ctor_get(x_64, 1); +lean_inc(x_66); +lean_dec(x_64); +x_67 = !lean_is_exclusive(x_65); +if (x_67 == 0) +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73; +x_68 = lean_ctor_get(x_65, 1); +x_69 = lean_unsigned_to_nat(1u); +x_70 = lean_nat_add(x_68, x_69); +lean_ctor_set(x_65, 1, x_70); +x_71 = lean_st_ref_set(x_8, x_65, x_66); +x_72 = lean_ctor_get(x_71, 1); +lean_inc(x_72); +lean_dec(x_71); +x_73 = !lean_is_exclusive(x_3); +if (x_73 == 0) +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; +x_74 = lean_ctor_get(x_3, 4); +lean_dec(x_74); +lean_ctor_set(x_3, 4, x_68); +lean_inc(x_3); +x_75 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(x_1, x_61, x_3, x_4, x_5, x_6, x_7, x_8, x_72); +x_76 = lean_ctor_get(x_75, 0); +lean_inc(x_76); +x_77 = lean_ctor_get(x_75, 1); +lean_inc(x_77); +lean_dec(x_75); +x_78 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_77); +lean_dec(x_3); +x_79 = lean_ctor_get(x_78, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_78, 1); +lean_inc(x_80); +lean_dec(x_78); +x_81 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_80); +x_82 = !lean_is_exclusive(x_81); +if (x_82 == 0) +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; +x_83 = lean_ctor_get(x_81, 0); +x_84 = l_Lean_Elab_Tactic_evalIntro___closed__4; +lean_inc(x_79); +lean_inc(x_83); +x_85 = l_Lean_addMacroScope(x_83, x_84, x_79); +x_86 = lean_box(0); +x_87 = l_Lean_instInhabitedSourceInfo___closed__1; +x_88 = l_Lean_Elab_Tactic_evalIntro___closed__3; +x_89 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_89, 0, x_87); +lean_ctor_set(x_89, 1, x_88); +lean_ctor_set(x_89, 2, x_85); +lean_ctor_set(x_89, 3, x_86); +x_90 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__9; +lean_inc(x_89); +x_91 = lean_array_push(x_90, x_89); +x_92 = l_myMacro____x40_Init_Notation___hyg_12315____closed__10; +x_93 = lean_array_push(x_91, x_92); +x_94 = l_Array_empty___closed__1; +x_95 = lean_array_push(x_94, x_62); +x_96 = l___private_Init_NotationExtra_0__Lean_mkHintBody___closed__2; +x_97 = lean_array_push(x_95, x_96); +x_98 = lean_array_push(x_97, x_63); +x_99 = l_term___x3d_____closed__2; +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_99); +lean_ctor_set(x_100, 1, x_98); +x_101 = lean_array_push(x_93, x_100); +x_102 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__11; +x_103 = lean_array_push(x_101, x_102); +x_104 = lean_array_push(x_94, x_89); +x_105 = l_Lean_nullKind___closed__2; +lean_inc(x_104); +x_106 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_106, 0, x_105); +lean_ctor_set(x_106, 1, x_104); +x_107 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16; +x_108 = lean_array_push(x_107, x_106); +x_109 = l_Lean_Parser_Tactic_subst___closed__2; +x_110 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_110, 0, x_109); +lean_ctor_set(x_110, 1, x_108); +x_111 = lean_array_push(x_94, x_110); +x_112 = l_myMacro____x40_Init_Notation___hyg_12942____closed__18; +x_113 = lean_array_push(x_111, x_112); +x_114 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_114, 0, x_105); +lean_ctor_set(x_114, 1, x_113); +x_115 = lean_array_push(x_94, x_114); +x_116 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__2; +x_117 = lean_array_push(x_116, x_76); +x_118 = l_Lean_Parser_Tactic_exact___closed__2; +x_119 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_119, 0, x_118); +lean_ctor_set(x_119, 1, x_117); +x_120 = lean_array_push(x_94, x_119); +x_121 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_122 = lean_array_push(x_120, x_121); +x_123 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_123, 0, x_105); +lean_ctor_set(x_123, 1, x_122); +x_124 = lean_array_push(x_115, x_123); +x_125 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_125, 0, x_105); +lean_ctor_set(x_125, 1, x_124); +x_126 = lean_array_push(x_94, x_125); +x_127 = l___private_Init_Notation_0__Lean_Parser_Tactic_withCheapRefl___closed__5; +x_128 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_128, 0, x_127); +lean_ctor_set(x_128, 1, x_126); +x_129 = lean_array_push(x_94, x_128); +x_130 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14110____closed__3; +x_131 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_131, 0, x_130); +lean_ctor_set(x_131, 1, x_129); +x_132 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14; +x_133 = lean_array_push(x_132, x_131); +x_134 = l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__2; +x_135 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_135, 0, x_134); +lean_ctor_set(x_135, 1, x_133); +x_136 = lean_array_push(x_103, x_135); +x_137 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__18; +x_138 = lean_array_push(x_136, x_137); +x_139 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21; +lean_inc(x_79); +lean_inc(x_83); +x_140 = l_Lean_addMacroScope(x_83, x_139, x_79); +x_141 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20; +x_142 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23; +x_143 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_143, 0, x_87); +lean_ctor_set(x_143, 1, x_141); +lean_ctor_set(x_143, 2, x_140); +lean_ctor_set(x_143, 3, x_142); +x_144 = lean_array_push(x_94, x_143); +x_145 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27; +x_146 = l_Lean_addMacroScope(x_83, x_145, x_79); +x_147 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26; +x_148 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_148, 0, x_87); +lean_ctor_set(x_148, 1, x_147); +lean_ctor_set(x_148, 2, x_146); +lean_ctor_set(x_148, 3, x_86); +lean_inc(x_148); +x_149 = lean_array_push(x_94, x_148); +x_150 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_150, 0, x_105); +lean_ctor_set(x_150, 1, x_149); +x_151 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__10; +x_152 = lean_array_push(x_151, x_150); +x_153 = l_Lean_Parser_Tactic_intro___closed__4; +x_154 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_154, 0, x_153); +lean_ctor_set(x_154, 1, x_152); +x_155 = lean_array_push(x_94, x_154); +x_156 = lean_array_push(x_155, x_112); +x_157 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_157, 0, x_105); +lean_ctor_set(x_157, 1, x_156); +x_158 = lean_array_push(x_94, x_157); +x_159 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29; +x_160 = lean_array_push(x_159, x_148); +x_161 = lean_array_push(x_160, x_121); +x_162 = l_Lean_Parser_Tactic_injection___closed__2; +x_163 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_163, 0, x_162); +lean_ctor_set(x_163, 1, x_161); +x_164 = lean_array_push(x_94, x_163); +x_165 = lean_array_push(x_164, x_112); +x_166 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_166, 0, x_105); +lean_ctor_set(x_166, 1, x_165); +x_167 = lean_array_push(x_158, x_166); +x_168 = l_Lean_expandExplicitBindersAux_loop___closed__2; +x_169 = lean_array_push(x_104, x_168); +x_170 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_171 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_171, 0, x_170); +lean_ctor_set(x_171, 1, x_169); +x_172 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__2; +x_173 = lean_array_push(x_172, x_171); +x_174 = l_Lean_Parser_Tactic_apply___closed__2; +x_175 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_175, 0, x_174); +lean_ctor_set(x_175, 1, x_173); +x_176 = lean_array_push(x_94, x_175); +x_177 = lean_array_push(x_176, x_112); +x_178 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_178, 0, x_105); +lean_ctor_set(x_178, 1, x_177); +x_179 = lean_array_push(x_167, x_178); +x_180 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35; +x_181 = lean_array_push(x_179, x_180); +x_182 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_182, 0, x_105); +lean_ctor_set(x_182, 1, x_181); +x_183 = lean_array_push(x_94, x_182); +x_184 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_184, 0, x_127); +lean_ctor_set(x_184, 1, x_183); +x_185 = lean_array_push(x_94, x_184); +x_186 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_186, 0, x_130); +lean_ctor_set(x_186, 1, x_185); +x_187 = lean_array_push(x_132, x_186); +x_188 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_188, 0, x_134); +lean_ctor_set(x_188, 1, x_187); +x_189 = lean_array_push(x_94, x_188); +x_190 = lean_array_push(x_189, x_121); +x_191 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_191, 0, x_105); +lean_ctor_set(x_191, 1, x_190); +x_192 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +x_193 = lean_array_push(x_192, x_191); +x_194 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_195 = lean_array_push(x_193, x_194); +x_196 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_197 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_197, 0, x_196); +lean_ctor_set(x_197, 1, x_195); +x_198 = lean_array_push(x_94, x_197); +x_199 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_199, 0, x_105); +lean_ctor_set(x_199, 1, x_198); +x_200 = lean_array_push(x_144, x_199); +x_201 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_201, 0, x_170); +lean_ctor_set(x_201, 1, x_200); +x_202 = lean_array_push(x_138, x_201); +x_203 = l_termIf_____x3a__Then__Else_____closed__2; +x_204 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_204, 0, x_203); +lean_ctor_set(x_204, 1, x_202); +lean_ctor_set(x_81, 0, x_204); +return x_81; +} +else +{ +lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_290; lean_object* x_291; lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; lean_object* x_298; lean_object* x_299; lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; lean_object* x_313; lean_object* x_314; lean_object* x_315; lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; lean_object* x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_328; +x_205 = lean_ctor_get(x_81, 0); +x_206 = lean_ctor_get(x_81, 1); +lean_inc(x_206); +lean_inc(x_205); +lean_dec(x_81); +x_207 = l_Lean_Elab_Tactic_evalIntro___closed__4; +lean_inc(x_79); +lean_inc(x_205); +x_208 = l_Lean_addMacroScope(x_205, x_207, x_79); +x_209 = lean_box(0); +x_210 = l_Lean_instInhabitedSourceInfo___closed__1; +x_211 = l_Lean_Elab_Tactic_evalIntro___closed__3; +x_212 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_212, 0, x_210); +lean_ctor_set(x_212, 1, x_211); +lean_ctor_set(x_212, 2, x_208); +lean_ctor_set(x_212, 3, x_209); +x_213 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__9; +lean_inc(x_212); +x_214 = lean_array_push(x_213, x_212); +x_215 = l_myMacro____x40_Init_Notation___hyg_12315____closed__10; +x_216 = lean_array_push(x_214, x_215); +x_217 = l_Array_empty___closed__1; +x_218 = lean_array_push(x_217, x_62); +x_219 = l___private_Init_NotationExtra_0__Lean_mkHintBody___closed__2; +x_220 = lean_array_push(x_218, x_219); +x_221 = lean_array_push(x_220, x_63); +x_222 = l_term___x3d_____closed__2; +x_223 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_223, 0, x_222); +lean_ctor_set(x_223, 1, x_221); +x_224 = lean_array_push(x_216, x_223); +x_225 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__11; +x_226 = lean_array_push(x_224, x_225); +x_227 = lean_array_push(x_217, x_212); +x_228 = l_Lean_nullKind___closed__2; +lean_inc(x_227); +x_229 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_229, 0, x_228); +lean_ctor_set(x_229, 1, x_227); +x_230 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16; +x_231 = lean_array_push(x_230, x_229); +x_232 = l_Lean_Parser_Tactic_subst___closed__2; +x_233 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_233, 0, x_232); +lean_ctor_set(x_233, 1, x_231); +x_234 = lean_array_push(x_217, x_233); +x_235 = l_myMacro____x40_Init_Notation___hyg_12942____closed__18; +x_236 = lean_array_push(x_234, x_235); +x_237 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_237, 0, x_228); +lean_ctor_set(x_237, 1, x_236); +x_238 = lean_array_push(x_217, x_237); +x_239 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__2; +x_240 = lean_array_push(x_239, x_76); +x_241 = l_Lean_Parser_Tactic_exact___closed__2; +x_242 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_242, 0, x_241); +lean_ctor_set(x_242, 1, x_240); +x_243 = lean_array_push(x_217, x_242); +x_244 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_245 = lean_array_push(x_243, x_244); +x_246 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_246, 0, x_228); +lean_ctor_set(x_246, 1, x_245); +x_247 = lean_array_push(x_238, x_246); +x_248 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_248, 0, x_228); +lean_ctor_set(x_248, 1, x_247); +x_249 = lean_array_push(x_217, x_248); +x_250 = l___private_Init_Notation_0__Lean_Parser_Tactic_withCheapRefl___closed__5; +x_251 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_251, 0, x_250); +lean_ctor_set(x_251, 1, x_249); +x_252 = lean_array_push(x_217, x_251); +x_253 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14110____closed__3; +x_254 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_254, 0, x_253); +lean_ctor_set(x_254, 1, x_252); +x_255 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14; +x_256 = lean_array_push(x_255, x_254); +x_257 = l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__2; +x_258 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_258, 0, x_257); +lean_ctor_set(x_258, 1, x_256); +x_259 = lean_array_push(x_226, x_258); +x_260 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__18; +x_261 = lean_array_push(x_259, x_260); +x_262 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21; +lean_inc(x_79); +lean_inc(x_205); +x_263 = l_Lean_addMacroScope(x_205, x_262, x_79); +x_264 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20; +x_265 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23; +x_266 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_266, 0, x_210); +lean_ctor_set(x_266, 1, x_264); +lean_ctor_set(x_266, 2, x_263); +lean_ctor_set(x_266, 3, x_265); +x_267 = lean_array_push(x_217, x_266); +x_268 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27; +x_269 = l_Lean_addMacroScope(x_205, x_268, x_79); +x_270 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26; +x_271 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_271, 0, x_210); +lean_ctor_set(x_271, 1, x_270); +lean_ctor_set(x_271, 2, x_269); +lean_ctor_set(x_271, 3, x_209); +lean_inc(x_271); +x_272 = lean_array_push(x_217, x_271); +x_273 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_273, 0, x_228); +lean_ctor_set(x_273, 1, x_272); +x_274 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__10; +x_275 = lean_array_push(x_274, x_273); +x_276 = l_Lean_Parser_Tactic_intro___closed__4; +x_277 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_277, 0, x_276); +lean_ctor_set(x_277, 1, x_275); +x_278 = lean_array_push(x_217, x_277); +x_279 = lean_array_push(x_278, x_235); +x_280 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_280, 0, x_228); +lean_ctor_set(x_280, 1, x_279); +x_281 = lean_array_push(x_217, x_280); +x_282 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29; +x_283 = lean_array_push(x_282, x_271); +x_284 = lean_array_push(x_283, x_244); +x_285 = l_Lean_Parser_Tactic_injection___closed__2; +x_286 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_286, 0, x_285); +lean_ctor_set(x_286, 1, x_284); +x_287 = lean_array_push(x_217, x_286); +x_288 = lean_array_push(x_287, x_235); +x_289 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_289, 0, x_228); +lean_ctor_set(x_289, 1, x_288); +x_290 = lean_array_push(x_281, x_289); +x_291 = l_Lean_expandExplicitBindersAux_loop___closed__2; +x_292 = lean_array_push(x_227, x_291); +x_293 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_294 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_294, 0, x_293); +lean_ctor_set(x_294, 1, x_292); +x_295 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__2; +x_296 = lean_array_push(x_295, x_294); +x_297 = l_Lean_Parser_Tactic_apply___closed__2; +x_298 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_298, 0, x_297); +lean_ctor_set(x_298, 1, x_296); +x_299 = lean_array_push(x_217, x_298); +x_300 = lean_array_push(x_299, x_235); +x_301 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_301, 0, x_228); +lean_ctor_set(x_301, 1, x_300); +x_302 = lean_array_push(x_290, x_301); +x_303 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35; +x_304 = lean_array_push(x_302, x_303); +x_305 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_305, 0, x_228); +lean_ctor_set(x_305, 1, x_304); +x_306 = lean_array_push(x_217, x_305); +x_307 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_307, 0, x_250); +lean_ctor_set(x_307, 1, x_306); +x_308 = lean_array_push(x_217, x_307); +x_309 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_309, 0, x_253); +lean_ctor_set(x_309, 1, x_308); +x_310 = lean_array_push(x_255, x_309); +x_311 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_311, 0, x_257); +lean_ctor_set(x_311, 1, x_310); +x_312 = lean_array_push(x_217, x_311); +x_313 = lean_array_push(x_312, x_244); +x_314 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_314, 0, x_228); +lean_ctor_set(x_314, 1, x_313); +x_315 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +x_316 = lean_array_push(x_315, x_314); +x_317 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_318 = lean_array_push(x_316, x_317); +x_319 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_320 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_320, 0, x_319); +lean_ctor_set(x_320, 1, x_318); +x_321 = lean_array_push(x_217, x_320); +x_322 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_322, 0, x_228); +lean_ctor_set(x_322, 1, x_321); +x_323 = lean_array_push(x_267, x_322); +x_324 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_324, 0, x_293); +lean_ctor_set(x_324, 1, x_323); +x_325 = lean_array_push(x_261, x_324); +x_326 = l_termIf_____x3a__Then__Else_____closed__2; +x_327 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_327, 0, x_326); +lean_ctor_set(x_327, 1, x_325); +x_328 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_328, 0, x_327); +lean_ctor_set(x_328, 1, x_206); +return x_328; +} +} +else +{ +lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; uint8_t x_333; uint8_t x_334; uint8_t x_335; lean_object* x_336; lean_object* x_337; lean_object* x_338; lean_object* x_339; lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343; lean_object* x_344; lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; lean_object* x_372; lean_object* x_373; lean_object* x_374; lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; lean_object* x_380; lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; lean_object* x_386; lean_object* x_387; lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; lean_object* x_393; lean_object* x_394; lean_object* x_395; lean_object* x_396; lean_object* x_397; lean_object* x_398; lean_object* x_399; lean_object* x_400; lean_object* x_401; lean_object* x_402; lean_object* x_403; lean_object* x_404; lean_object* x_405; lean_object* x_406; lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; lean_object* x_421; lean_object* x_422; lean_object* x_423; lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435; lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; lean_object* x_444; lean_object* x_445; lean_object* x_446; lean_object* x_447; lean_object* x_448; lean_object* x_449; lean_object* x_450; lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; lean_object* x_455; lean_object* x_456; lean_object* x_457; lean_object* x_458; lean_object* x_459; lean_object* x_460; lean_object* x_461; lean_object* x_462; lean_object* x_463; lean_object* x_464; lean_object* x_465; lean_object* x_466; lean_object* x_467; lean_object* x_468; lean_object* x_469; +x_329 = lean_ctor_get(x_3, 0); +x_330 = lean_ctor_get(x_3, 1); +x_331 = lean_ctor_get(x_3, 2); +x_332 = lean_ctor_get(x_3, 3); +x_333 = lean_ctor_get_uint8(x_3, sizeof(void*)*6); +x_334 = lean_ctor_get_uint8(x_3, sizeof(void*)*6 + 1); +x_335 = lean_ctor_get_uint8(x_3, sizeof(void*)*6 + 2); +x_336 = lean_ctor_get(x_3, 5); +lean_inc(x_336); +lean_inc(x_332); +lean_inc(x_331); +lean_inc(x_330); +lean_inc(x_329); +lean_dec(x_3); +x_337 = lean_alloc_ctor(0, 6, 3); +lean_ctor_set(x_337, 0, x_329); +lean_ctor_set(x_337, 1, x_330); +lean_ctor_set(x_337, 2, x_331); +lean_ctor_set(x_337, 3, x_332); +lean_ctor_set(x_337, 4, x_68); +lean_ctor_set(x_337, 5, x_336); +lean_ctor_set_uint8(x_337, sizeof(void*)*6, x_333); +lean_ctor_set_uint8(x_337, sizeof(void*)*6 + 1, x_334); +lean_ctor_set_uint8(x_337, sizeof(void*)*6 + 2, x_335); +lean_inc(x_337); +x_338 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(x_1, x_61, x_337, x_4, x_5, x_6, x_7, x_8, x_72); +x_339 = lean_ctor_get(x_338, 0); +lean_inc(x_339); +x_340 = lean_ctor_get(x_338, 1); +lean_inc(x_340); +lean_dec(x_338); +x_341 = l_Lean_Elab_Term_getCurrMacroScope(x_337, x_4, x_5, x_6, x_7, x_8, x_340); +lean_dec(x_337); +x_342 = lean_ctor_get(x_341, 0); +lean_inc(x_342); +x_343 = lean_ctor_get(x_341, 1); +lean_inc(x_343); +lean_dec(x_341); +x_344 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_343); +x_345 = lean_ctor_get(x_344, 0); +lean_inc(x_345); +x_346 = lean_ctor_get(x_344, 1); +lean_inc(x_346); +if (lean_is_exclusive(x_344)) { + lean_ctor_release(x_344, 0); + lean_ctor_release(x_344, 1); + x_347 = x_344; +} else { + lean_dec_ref(x_344); + x_347 = lean_box(0); +} +x_348 = l_Lean_Elab_Tactic_evalIntro___closed__4; +lean_inc(x_342); +lean_inc(x_345); +x_349 = l_Lean_addMacroScope(x_345, x_348, x_342); +x_350 = lean_box(0); +x_351 = l_Lean_instInhabitedSourceInfo___closed__1; +x_352 = l_Lean_Elab_Tactic_evalIntro___closed__3; +x_353 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_353, 0, x_351); +lean_ctor_set(x_353, 1, x_352); +lean_ctor_set(x_353, 2, x_349); +lean_ctor_set(x_353, 3, x_350); +x_354 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__9; +lean_inc(x_353); +x_355 = lean_array_push(x_354, x_353); +x_356 = l_myMacro____x40_Init_Notation___hyg_12315____closed__10; +x_357 = lean_array_push(x_355, x_356); +x_358 = l_Array_empty___closed__1; +x_359 = lean_array_push(x_358, x_62); +x_360 = l___private_Init_NotationExtra_0__Lean_mkHintBody___closed__2; +x_361 = lean_array_push(x_359, x_360); +x_362 = lean_array_push(x_361, x_63); +x_363 = l_term___x3d_____closed__2; +x_364 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_364, 0, x_363); +lean_ctor_set(x_364, 1, x_362); +x_365 = lean_array_push(x_357, x_364); +x_366 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__11; +x_367 = lean_array_push(x_365, x_366); +x_368 = lean_array_push(x_358, x_353); +x_369 = l_Lean_nullKind___closed__2; +lean_inc(x_368); +x_370 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_370, 0, x_369); +lean_ctor_set(x_370, 1, x_368); +x_371 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16; +x_372 = lean_array_push(x_371, x_370); +x_373 = l_Lean_Parser_Tactic_subst___closed__2; +x_374 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_374, 0, x_373); +lean_ctor_set(x_374, 1, x_372); +x_375 = lean_array_push(x_358, x_374); +x_376 = l_myMacro____x40_Init_Notation___hyg_12942____closed__18; +x_377 = lean_array_push(x_375, x_376); +x_378 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_378, 0, x_369); +lean_ctor_set(x_378, 1, x_377); +x_379 = lean_array_push(x_358, x_378); +x_380 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__2; +x_381 = lean_array_push(x_380, x_339); +x_382 = l_Lean_Parser_Tactic_exact___closed__2; +x_383 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_383, 0, x_382); +lean_ctor_set(x_383, 1, x_381); +x_384 = lean_array_push(x_358, x_383); +x_385 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_386 = lean_array_push(x_384, x_385); +x_387 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_387, 0, x_369); +lean_ctor_set(x_387, 1, x_386); +x_388 = lean_array_push(x_379, x_387); +x_389 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_389, 0, x_369); +lean_ctor_set(x_389, 1, x_388); +x_390 = lean_array_push(x_358, x_389); +x_391 = l___private_Init_Notation_0__Lean_Parser_Tactic_withCheapRefl___closed__5; +x_392 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_392, 0, x_391); +lean_ctor_set(x_392, 1, x_390); +x_393 = lean_array_push(x_358, x_392); +x_394 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14110____closed__3; +x_395 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_395, 0, x_394); +lean_ctor_set(x_395, 1, x_393); +x_396 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14; +x_397 = lean_array_push(x_396, x_395); +x_398 = l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__2; +x_399 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_399, 0, x_398); +lean_ctor_set(x_399, 1, x_397); +x_400 = lean_array_push(x_367, x_399); +x_401 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__18; +x_402 = lean_array_push(x_400, x_401); +x_403 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21; +lean_inc(x_342); +lean_inc(x_345); +x_404 = l_Lean_addMacroScope(x_345, x_403, x_342); +x_405 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20; +x_406 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23; +x_407 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_407, 0, x_351); +lean_ctor_set(x_407, 1, x_405); +lean_ctor_set(x_407, 2, x_404); +lean_ctor_set(x_407, 3, x_406); +x_408 = lean_array_push(x_358, x_407); +x_409 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27; +x_410 = l_Lean_addMacroScope(x_345, x_409, x_342); +x_411 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26; +x_412 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_412, 0, x_351); +lean_ctor_set(x_412, 1, x_411); +lean_ctor_set(x_412, 2, x_410); +lean_ctor_set(x_412, 3, x_350); +lean_inc(x_412); +x_413 = lean_array_push(x_358, x_412); +x_414 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_414, 0, x_369); +lean_ctor_set(x_414, 1, x_413); +x_415 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__10; +x_416 = lean_array_push(x_415, x_414); +x_417 = l_Lean_Parser_Tactic_intro___closed__4; +x_418 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_418, 0, x_417); +lean_ctor_set(x_418, 1, x_416); +x_419 = lean_array_push(x_358, x_418); +x_420 = lean_array_push(x_419, x_376); +x_421 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_421, 0, x_369); +lean_ctor_set(x_421, 1, x_420); +x_422 = lean_array_push(x_358, x_421); +x_423 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29; +x_424 = lean_array_push(x_423, x_412); +x_425 = lean_array_push(x_424, x_385); +x_426 = l_Lean_Parser_Tactic_injection___closed__2; +x_427 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_427, 0, x_426); +lean_ctor_set(x_427, 1, x_425); +x_428 = lean_array_push(x_358, x_427); +x_429 = lean_array_push(x_428, x_376); +x_430 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_430, 0, x_369); +lean_ctor_set(x_430, 1, x_429); +x_431 = lean_array_push(x_422, x_430); +x_432 = l_Lean_expandExplicitBindersAux_loop___closed__2; +x_433 = lean_array_push(x_368, x_432); +x_434 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_435 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_435, 0, x_434); +lean_ctor_set(x_435, 1, x_433); +x_436 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__2; +x_437 = lean_array_push(x_436, x_435); +x_438 = l_Lean_Parser_Tactic_apply___closed__2; +x_439 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_439, 0, x_438); +lean_ctor_set(x_439, 1, x_437); +x_440 = lean_array_push(x_358, x_439); +x_441 = lean_array_push(x_440, x_376); +x_442 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_442, 0, x_369); +lean_ctor_set(x_442, 1, x_441); +x_443 = lean_array_push(x_431, x_442); +x_444 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35; +x_445 = lean_array_push(x_443, x_444); +x_446 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_446, 0, x_369); +lean_ctor_set(x_446, 1, x_445); +x_447 = lean_array_push(x_358, x_446); +x_448 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_448, 0, x_391); +lean_ctor_set(x_448, 1, x_447); +x_449 = lean_array_push(x_358, x_448); +x_450 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_450, 0, x_394); +lean_ctor_set(x_450, 1, x_449); +x_451 = lean_array_push(x_396, x_450); +x_452 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_452, 0, x_398); +lean_ctor_set(x_452, 1, x_451); +x_453 = lean_array_push(x_358, x_452); +x_454 = lean_array_push(x_453, x_385); +x_455 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_455, 0, x_369); +lean_ctor_set(x_455, 1, x_454); +x_456 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +x_457 = lean_array_push(x_456, x_455); +x_458 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_459 = lean_array_push(x_457, x_458); +x_460 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_461 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_461, 0, x_460); +lean_ctor_set(x_461, 1, x_459); +x_462 = lean_array_push(x_358, x_461); +x_463 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_463, 0, x_369); +lean_ctor_set(x_463, 1, x_462); +x_464 = lean_array_push(x_408, x_463); +x_465 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_465, 0, x_434); +lean_ctor_set(x_465, 1, x_464); +x_466 = lean_array_push(x_402, x_465); +x_467 = l_termIf_____x3a__Then__Else_____closed__2; +x_468 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_468, 0, x_467); +lean_ctor_set(x_468, 1, x_466); +if (lean_is_scalar(x_347)) { + x_469 = lean_alloc_ctor(0, 2, 0); +} else { + x_469 = x_347; +} +lean_ctor_set(x_469, 0, x_468); +lean_ctor_set(x_469, 1, x_346); +return x_469; +} +} +else +{ +lean_object* x_470; lean_object* x_471; lean_object* x_472; lean_object* x_473; lean_object* x_474; lean_object* x_475; lean_object* x_476; lean_object* x_477; lean_object* x_478; lean_object* x_479; lean_object* x_480; lean_object* x_481; lean_object* x_482; uint8_t x_483; uint8_t x_484; uint8_t x_485; lean_object* x_486; lean_object* x_487; lean_object* x_488; lean_object* x_489; lean_object* x_490; lean_object* x_491; lean_object* x_492; lean_object* x_493; lean_object* x_494; lean_object* x_495; lean_object* x_496; lean_object* x_497; lean_object* x_498; lean_object* x_499; lean_object* x_500; lean_object* x_501; lean_object* x_502; lean_object* x_503; lean_object* x_504; lean_object* x_505; lean_object* x_506; lean_object* x_507; lean_object* x_508; lean_object* x_509; lean_object* x_510; lean_object* x_511; lean_object* x_512; lean_object* x_513; lean_object* x_514; lean_object* x_515; lean_object* x_516; lean_object* x_517; lean_object* x_518; lean_object* x_519; lean_object* x_520; lean_object* x_521; lean_object* x_522; lean_object* x_523; lean_object* x_524; lean_object* x_525; lean_object* x_526; lean_object* x_527; lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; lean_object* x_533; lean_object* x_534; lean_object* x_535; lean_object* x_536; lean_object* x_537; lean_object* x_538; lean_object* x_539; lean_object* x_540; lean_object* x_541; lean_object* x_542; lean_object* x_543; lean_object* x_544; lean_object* x_545; lean_object* x_546; lean_object* x_547; lean_object* x_548; lean_object* x_549; lean_object* x_550; lean_object* x_551; lean_object* x_552; lean_object* x_553; lean_object* x_554; lean_object* x_555; lean_object* x_556; lean_object* x_557; lean_object* x_558; lean_object* x_559; lean_object* x_560; lean_object* x_561; lean_object* x_562; lean_object* x_563; lean_object* x_564; lean_object* x_565; lean_object* x_566; lean_object* x_567; lean_object* x_568; lean_object* x_569; lean_object* x_570; lean_object* x_571; lean_object* x_572; lean_object* x_573; lean_object* x_574; lean_object* x_575; lean_object* x_576; lean_object* x_577; lean_object* x_578; lean_object* x_579; lean_object* x_580; lean_object* x_581; lean_object* x_582; lean_object* x_583; lean_object* x_584; lean_object* x_585; lean_object* x_586; lean_object* x_587; lean_object* x_588; lean_object* x_589; lean_object* x_590; lean_object* x_591; lean_object* x_592; lean_object* x_593; lean_object* x_594; lean_object* x_595; lean_object* x_596; lean_object* x_597; lean_object* x_598; lean_object* x_599; lean_object* x_600; lean_object* x_601; lean_object* x_602; lean_object* x_603; lean_object* x_604; lean_object* x_605; lean_object* x_606; lean_object* x_607; lean_object* x_608; lean_object* x_609; lean_object* x_610; lean_object* x_611; lean_object* x_612; lean_object* x_613; lean_object* x_614; lean_object* x_615; lean_object* x_616; lean_object* x_617; lean_object* x_618; lean_object* x_619; lean_object* x_620; +x_470 = lean_ctor_get(x_65, 0); +x_471 = lean_ctor_get(x_65, 1); +x_472 = lean_ctor_get(x_65, 2); +x_473 = lean_ctor_get(x_65, 3); +lean_inc(x_473); +lean_inc(x_472); +lean_inc(x_471); +lean_inc(x_470); +lean_dec(x_65); +x_474 = lean_unsigned_to_nat(1u); +x_475 = lean_nat_add(x_471, x_474); +x_476 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_476, 0, x_470); +lean_ctor_set(x_476, 1, x_475); +lean_ctor_set(x_476, 2, x_472); +lean_ctor_set(x_476, 3, x_473); +x_477 = lean_st_ref_set(x_8, x_476, x_66); +x_478 = lean_ctor_get(x_477, 1); +lean_inc(x_478); +lean_dec(x_477); +x_479 = lean_ctor_get(x_3, 0); +lean_inc(x_479); +x_480 = lean_ctor_get(x_3, 1); +lean_inc(x_480); +x_481 = lean_ctor_get(x_3, 2); +lean_inc(x_481); +x_482 = lean_ctor_get(x_3, 3); +lean_inc(x_482); +x_483 = lean_ctor_get_uint8(x_3, sizeof(void*)*6); +x_484 = lean_ctor_get_uint8(x_3, sizeof(void*)*6 + 1); +x_485 = lean_ctor_get_uint8(x_3, sizeof(void*)*6 + 2); +x_486 = lean_ctor_get(x_3, 5); +lean_inc(x_486); +if (lean_is_exclusive(x_3)) { + lean_ctor_release(x_3, 0); + lean_ctor_release(x_3, 1); + lean_ctor_release(x_3, 2); + lean_ctor_release(x_3, 3); + lean_ctor_release(x_3, 4); + lean_ctor_release(x_3, 5); + x_487 = x_3; +} else { + lean_dec_ref(x_3); + x_487 = lean_box(0); +} +if (lean_is_scalar(x_487)) { + x_488 = lean_alloc_ctor(0, 6, 3); +} else { + x_488 = x_487; +} +lean_ctor_set(x_488, 0, x_479); +lean_ctor_set(x_488, 1, x_480); +lean_ctor_set(x_488, 2, x_481); +lean_ctor_set(x_488, 3, x_482); +lean_ctor_set(x_488, 4, x_471); +lean_ctor_set(x_488, 5, x_486); +lean_ctor_set_uint8(x_488, sizeof(void*)*6, x_483); +lean_ctor_set_uint8(x_488, sizeof(void*)*6 + 1, x_484); +lean_ctor_set_uint8(x_488, sizeof(void*)*6 + 2, x_485); +lean_inc(x_488); +x_489 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(x_1, x_61, x_488, x_4, x_5, x_6, x_7, x_8, x_478); +x_490 = lean_ctor_get(x_489, 0); +lean_inc(x_490); +x_491 = lean_ctor_get(x_489, 1); +lean_inc(x_491); +lean_dec(x_489); +x_492 = l_Lean_Elab_Term_getCurrMacroScope(x_488, x_4, x_5, x_6, x_7, x_8, x_491); +lean_dec(x_488); +x_493 = lean_ctor_get(x_492, 0); +lean_inc(x_493); +x_494 = lean_ctor_get(x_492, 1); +lean_inc(x_494); +lean_dec(x_492); +x_495 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_494); +x_496 = lean_ctor_get(x_495, 0); +lean_inc(x_496); +x_497 = lean_ctor_get(x_495, 1); +lean_inc(x_497); +if (lean_is_exclusive(x_495)) { + lean_ctor_release(x_495, 0); + lean_ctor_release(x_495, 1); + x_498 = x_495; +} else { + lean_dec_ref(x_495); + x_498 = lean_box(0); +} +x_499 = l_Lean_Elab_Tactic_evalIntro___closed__4; +lean_inc(x_493); +lean_inc(x_496); +x_500 = l_Lean_addMacroScope(x_496, x_499, x_493); +x_501 = lean_box(0); +x_502 = l_Lean_instInhabitedSourceInfo___closed__1; +x_503 = l_Lean_Elab_Tactic_evalIntro___closed__3; +x_504 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_504, 0, x_502); +lean_ctor_set(x_504, 1, x_503); +lean_ctor_set(x_504, 2, x_500); +lean_ctor_set(x_504, 3, x_501); +x_505 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__9; +lean_inc(x_504); +x_506 = lean_array_push(x_505, x_504); +x_507 = l_myMacro____x40_Init_Notation___hyg_12315____closed__10; +x_508 = lean_array_push(x_506, x_507); +x_509 = l_Array_empty___closed__1; +x_510 = lean_array_push(x_509, x_62); +x_511 = l___private_Init_NotationExtra_0__Lean_mkHintBody___closed__2; +x_512 = lean_array_push(x_510, x_511); +x_513 = lean_array_push(x_512, x_63); +x_514 = l_term___x3d_____closed__2; +x_515 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_515, 0, x_514); +lean_ctor_set(x_515, 1, x_513); +x_516 = lean_array_push(x_508, x_515); +x_517 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__11; +x_518 = lean_array_push(x_516, x_517); +x_519 = lean_array_push(x_509, x_504); +x_520 = l_Lean_nullKind___closed__2; +lean_inc(x_519); +x_521 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_521, 0, x_520); +lean_ctor_set(x_521, 1, x_519); +x_522 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16; +x_523 = lean_array_push(x_522, x_521); +x_524 = l_Lean_Parser_Tactic_subst___closed__2; +x_525 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_525, 0, x_524); +lean_ctor_set(x_525, 1, x_523); +x_526 = lean_array_push(x_509, x_525); +x_527 = l_myMacro____x40_Init_Notation___hyg_12942____closed__18; +x_528 = lean_array_push(x_526, x_527); +x_529 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_529, 0, x_520); +lean_ctor_set(x_529, 1, x_528); +x_530 = lean_array_push(x_509, x_529); +x_531 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__2; +x_532 = lean_array_push(x_531, x_490); +x_533 = l_Lean_Parser_Tactic_exact___closed__2; +x_534 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_534, 0, x_533); +lean_ctor_set(x_534, 1, x_532); +x_535 = lean_array_push(x_509, x_534); +x_536 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_537 = lean_array_push(x_535, x_536); +x_538 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_538, 0, x_520); +lean_ctor_set(x_538, 1, x_537); +x_539 = lean_array_push(x_530, x_538); +x_540 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_540, 0, x_520); +lean_ctor_set(x_540, 1, x_539); +x_541 = lean_array_push(x_509, x_540); +x_542 = l___private_Init_Notation_0__Lean_Parser_Tactic_withCheapRefl___closed__5; +x_543 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_543, 0, x_542); +lean_ctor_set(x_543, 1, x_541); +x_544 = lean_array_push(x_509, x_543); +x_545 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14110____closed__3; +x_546 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_546, 0, x_545); +lean_ctor_set(x_546, 1, x_544); +x_547 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14; +x_548 = lean_array_push(x_547, x_546); +x_549 = l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__2; +x_550 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_550, 0, x_549); +lean_ctor_set(x_550, 1, x_548); +x_551 = lean_array_push(x_518, x_550); +x_552 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__18; +x_553 = lean_array_push(x_551, x_552); +x_554 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21; +lean_inc(x_493); +lean_inc(x_496); +x_555 = l_Lean_addMacroScope(x_496, x_554, x_493); +x_556 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20; +x_557 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23; +x_558 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_558, 0, x_502); +lean_ctor_set(x_558, 1, x_556); +lean_ctor_set(x_558, 2, x_555); +lean_ctor_set(x_558, 3, x_557); +x_559 = lean_array_push(x_509, x_558); +x_560 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27; +x_561 = l_Lean_addMacroScope(x_496, x_560, x_493); +x_562 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26; +x_563 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_563, 0, x_502); +lean_ctor_set(x_563, 1, x_562); +lean_ctor_set(x_563, 2, x_561); +lean_ctor_set(x_563, 3, x_501); +lean_inc(x_563); +x_564 = lean_array_push(x_509, x_563); +x_565 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_565, 0, x_520); +lean_ctor_set(x_565, 1, x_564); +x_566 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__10; +x_567 = lean_array_push(x_566, x_565); +x_568 = l_Lean_Parser_Tactic_intro___closed__4; +x_569 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_569, 0, x_568); +lean_ctor_set(x_569, 1, x_567); +x_570 = lean_array_push(x_509, x_569); +x_571 = lean_array_push(x_570, x_527); +x_572 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_572, 0, x_520); +lean_ctor_set(x_572, 1, x_571); +x_573 = lean_array_push(x_509, x_572); +x_574 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29; +x_575 = lean_array_push(x_574, x_563); +x_576 = lean_array_push(x_575, x_536); +x_577 = l_Lean_Parser_Tactic_injection___closed__2; +x_578 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_578, 0, x_577); +lean_ctor_set(x_578, 1, x_576); +x_579 = lean_array_push(x_509, x_578); +x_580 = lean_array_push(x_579, x_527); +x_581 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_581, 0, x_520); +lean_ctor_set(x_581, 1, x_580); +x_582 = lean_array_push(x_573, x_581); +x_583 = l_Lean_expandExplicitBindersAux_loop___closed__2; +x_584 = lean_array_push(x_519, x_583); +x_585 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_586 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_586, 0, x_585); +lean_ctor_set(x_586, 1, x_584); +x_587 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__2; +x_588 = lean_array_push(x_587, x_586); +x_589 = l_Lean_Parser_Tactic_apply___closed__2; +x_590 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_590, 0, x_589); +lean_ctor_set(x_590, 1, x_588); +x_591 = lean_array_push(x_509, x_590); +x_592 = lean_array_push(x_591, x_527); +x_593 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_593, 0, x_520); +lean_ctor_set(x_593, 1, x_592); +x_594 = lean_array_push(x_582, x_593); +x_595 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35; +x_596 = lean_array_push(x_594, x_595); +x_597 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_597, 0, x_520); +lean_ctor_set(x_597, 1, x_596); +x_598 = lean_array_push(x_509, x_597); +x_599 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_599, 0, x_542); +lean_ctor_set(x_599, 1, x_598); +x_600 = lean_array_push(x_509, x_599); +x_601 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_601, 0, x_545); +lean_ctor_set(x_601, 1, x_600); +x_602 = lean_array_push(x_547, x_601); +x_603 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_603, 0, x_549); +lean_ctor_set(x_603, 1, x_602); +x_604 = lean_array_push(x_509, x_603); +x_605 = lean_array_push(x_604, x_536); +x_606 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_606, 0, x_520); +lean_ctor_set(x_606, 1, x_605); +x_607 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +x_608 = lean_array_push(x_607, x_606); +x_609 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_610 = lean_array_push(x_608, x_609); +x_611 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_612 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_612, 0, x_611); +lean_ctor_set(x_612, 1, x_610); +x_613 = lean_array_push(x_509, x_612); +x_614 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_614, 0, x_520); +lean_ctor_set(x_614, 1, x_613); +x_615 = lean_array_push(x_559, x_614); +x_616 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_616, 0, x_585); +lean_ctor_set(x_616, 1, x_615); +x_617 = lean_array_push(x_553, x_616); +x_618 = l_termIf_____x3a__Then__Else_____closed__2; +x_619 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_619, 0, x_618); +lean_ctor_set(x_619, 1, x_617); +if (lean_is_scalar(x_498)) { + x_620 = lean_alloc_ctor(0, 2, 0); +} else { + x_620 = x_498; +} +lean_ctor_set(x_620, 0, x_619); +lean_ctor_set(x_620, 1, x_497); +return x_620; +} +} +else +{ +lean_object* x_621; lean_object* x_622; lean_object* x_623; lean_object* x_624; lean_object* x_625; lean_object* x_626; uint8_t x_627; +x_621 = lean_ctor_get(x_2, 1); +lean_inc(x_621); +lean_dec(x_2); +x_622 = lean_ctor_get(x_57, 0); +lean_inc(x_622); +lean_dec(x_57); +x_623 = lean_ctor_get(x_58, 0); +lean_inc(x_623); +lean_dec(x_58); +x_624 = lean_st_ref_take(x_8, x_9); +x_625 = lean_ctor_get(x_624, 0); +lean_inc(x_625); +x_626 = lean_ctor_get(x_624, 1); +lean_inc(x_626); +lean_dec(x_624); +x_627 = !lean_is_exclusive(x_625); +if (x_627 == 0) +{ +lean_object* x_628; lean_object* x_629; lean_object* x_630; lean_object* x_631; lean_object* x_632; uint8_t x_633; +x_628 = lean_ctor_get(x_625, 1); +x_629 = lean_unsigned_to_nat(1u); +x_630 = lean_nat_add(x_628, x_629); +lean_ctor_set(x_625, 1, x_630); +x_631 = lean_st_ref_set(x_8, x_625, x_626); +x_632 = lean_ctor_get(x_631, 1); +lean_inc(x_632); +lean_dec(x_631); +x_633 = !lean_is_exclusive(x_3); +if (x_633 == 0) +{ +lean_object* x_634; lean_object* x_635; lean_object* x_636; lean_object* x_637; lean_object* x_638; lean_object* x_639; lean_object* x_640; lean_object* x_641; uint8_t x_642; +x_634 = lean_ctor_get(x_3, 4); +lean_dec(x_634); +lean_ctor_set(x_3, 4, x_628); +lean_inc(x_3); +lean_inc(x_1); +x_635 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(x_1, x_621, x_3, x_4, x_5, x_6, x_7, x_8, x_632); +x_636 = lean_ctor_get(x_635, 0); +lean_inc(x_636); +x_637 = lean_ctor_get(x_635, 1); +lean_inc(x_637); +lean_dec(x_635); +x_638 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_637); +lean_dec(x_3); +x_639 = lean_ctor_get(x_638, 0); +lean_inc(x_639); +x_640 = lean_ctor_get(x_638, 1); +lean_inc(x_640); +lean_dec(x_638); +x_641 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_640); +x_642 = !lean_is_exclusive(x_641); +if (x_642 == 0) +{ +lean_object* x_643; lean_object* x_644; lean_object* x_645; lean_object* x_646; lean_object* x_647; lean_object* x_648; lean_object* x_649; lean_object* x_650; lean_object* x_651; lean_object* x_652; lean_object* x_653; lean_object* x_654; lean_object* x_655; lean_object* x_656; lean_object* x_657; lean_object* x_658; lean_object* x_659; lean_object* x_660; lean_object* x_661; lean_object* x_662; lean_object* x_663; lean_object* x_664; lean_object* x_665; lean_object* x_666; lean_object* x_667; lean_object* x_668; lean_object* x_669; lean_object* x_670; lean_object* x_671; lean_object* x_672; lean_object* x_673; lean_object* x_674; lean_object* x_675; lean_object* x_676; lean_object* x_677; lean_object* x_678; lean_object* x_679; lean_object* x_680; lean_object* x_681; lean_object* x_682; lean_object* x_683; lean_object* x_684; lean_object* x_685; lean_object* x_686; lean_object* x_687; lean_object* x_688; lean_object* x_689; lean_object* x_690; lean_object* x_691; lean_object* x_692; lean_object* x_693; lean_object* x_694; lean_object* x_695; lean_object* x_696; lean_object* x_697; lean_object* x_698; lean_object* x_699; lean_object* x_700; lean_object* x_701; lean_object* x_702; lean_object* x_703; lean_object* x_704; lean_object* x_705; lean_object* x_706; lean_object* x_707; lean_object* x_708; lean_object* x_709; lean_object* x_710; lean_object* x_711; lean_object* x_712; lean_object* x_713; lean_object* x_714; lean_object* x_715; lean_object* x_716; lean_object* x_717; lean_object* x_718; lean_object* x_719; lean_object* x_720; lean_object* x_721; lean_object* x_722; lean_object* x_723; lean_object* x_724; lean_object* x_725; lean_object* x_726; lean_object* x_727; lean_object* x_728; lean_object* x_729; lean_object* x_730; lean_object* x_731; lean_object* x_732; lean_object* x_733; lean_object* x_734; lean_object* x_735; lean_object* x_736; lean_object* x_737; lean_object* x_738; lean_object* x_739; lean_object* x_740; lean_object* x_741; lean_object* x_742; lean_object* x_743; lean_object* x_744; lean_object* x_745; lean_object* x_746; lean_object* x_747; lean_object* x_748; lean_object* x_749; lean_object* x_750; lean_object* x_751; lean_object* x_752; lean_object* x_753; lean_object* x_754; lean_object* x_755; lean_object* x_756; lean_object* x_757; lean_object* x_758; lean_object* x_759; lean_object* x_760; lean_object* x_761; lean_object* x_762; lean_object* x_763; lean_object* x_764; lean_object* x_765; lean_object* x_766; lean_object* x_767; lean_object* x_768; lean_object* x_769; lean_object* x_770; lean_object* x_771; lean_object* x_772; lean_object* x_773; lean_object* x_774; lean_object* x_775; lean_object* x_776; lean_object* x_777; lean_object* x_778; lean_object* x_779; lean_object* x_780; lean_object* x_781; lean_object* x_782; lean_object* x_783; lean_object* x_784; lean_object* x_785; lean_object* x_786; lean_object* x_787; lean_object* x_788; lean_object* x_789; lean_object* x_790; lean_object* x_791; lean_object* x_792; lean_object* x_793; lean_object* x_794; lean_object* x_795; lean_object* x_796; lean_object* x_797; lean_object* x_798; lean_object* x_799; lean_object* x_800; lean_object* x_801; +x_643 = lean_ctor_get(x_641, 0); +x_644 = l_myMacro____x40_Init_Notation___hyg_11187____closed__4; +lean_inc(x_639); +lean_inc(x_643); +x_645 = l_Lean_addMacroScope(x_643, x_644, x_639); +x_646 = lean_box(0); +x_647 = l_Lean_instInhabitedSourceInfo___closed__1; +x_648 = l_myMacro____x40_Init_Notation___hyg_11187____closed__3; +x_649 = l_myMacro____x40_Init_Notation___hyg_11187____closed__6; +x_650 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_650, 0, x_647); +lean_ctor_set(x_650, 1, x_648); +lean_ctor_set(x_650, 2, x_645); +lean_ctor_set(x_650, 3, x_649); +x_651 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__47; +x_652 = lean_array_push(x_651, x_650); +x_653 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__44; +x_654 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_654, 0, x_653); +lean_ctor_set(x_654, 1, x_652); +x_655 = l_Array_empty___closed__1; +x_656 = lean_array_push(x_655, x_654); +x_657 = lean_mk_syntax_ident(x_1); +x_658 = lean_array_push(x_655, x_657); +x_659 = lean_array_push(x_655, x_622); +x_660 = lean_array_push(x_659, x_623); +x_661 = l_Lean_nullKind___closed__2; +x_662 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_662, 0, x_661); +lean_ctor_set(x_662, 1, x_660); +x_663 = lean_array_push(x_658, x_662); +x_664 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_665 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_665, 0, x_664); +lean_ctor_set(x_665, 1, x_663); +x_666 = lean_array_push(x_655, x_665); +x_667 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_668 = lean_array_push(x_666, x_667); +x_669 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_669, 0, x_661); +lean_ctor_set(x_669, 1, x_668); +x_670 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +x_671 = lean_array_push(x_670, x_669); +x_672 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_673 = lean_array_push(x_671, x_672); +x_674 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_675 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_675, 0, x_674); +lean_ctor_set(x_675, 1, x_673); +x_676 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__36; +x_677 = lean_array_push(x_676, x_675); +x_678 = l_Lean_Elab_Tactic_evalIntro___closed__4; +lean_inc(x_639); +lean_inc(x_643); +x_679 = l_Lean_addMacroScope(x_643, x_678, x_639); +x_680 = l_Lean_Elab_Tactic_evalIntro___closed__3; +x_681 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_681, 0, x_647); +lean_ctor_set(x_681, 1, x_680); +lean_ctor_set(x_681, 2, x_679); +lean_ctor_set(x_681, 3, x_646); +x_682 = lean_array_push(x_655, x_681); +lean_inc(x_682); +x_683 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_683, 0, x_661); +lean_ctor_set(x_683, 1, x_682); +lean_inc(x_683); +x_684 = lean_array_push(x_655, x_683); +x_685 = l_myMacro____x40_Init_Notation___hyg_11187____closed__17; +x_686 = lean_array_push(x_684, x_685); +x_687 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16; +x_688 = lean_array_push(x_687, x_683); +x_689 = l_Lean_Parser_Tactic_subst___closed__2; +x_690 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_690, 0, x_689); +lean_ctor_set(x_690, 1, x_688); +x_691 = lean_array_push(x_655, x_690); +x_692 = l_myMacro____x40_Init_Notation___hyg_12942____closed__18; +x_693 = lean_array_push(x_691, x_692); +x_694 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_694, 0, x_661); +lean_ctor_set(x_694, 1, x_693); +x_695 = lean_array_push(x_655, x_694); +x_696 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__2; +x_697 = lean_array_push(x_696, x_636); +x_698 = l_Lean_Parser_Tactic_exact___closed__2; +x_699 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_699, 0, x_698); +lean_ctor_set(x_699, 1, x_697); +x_700 = lean_array_push(x_655, x_699); +x_701 = lean_array_push(x_700, x_667); +x_702 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_702, 0, x_661); +lean_ctor_set(x_702, 1, x_701); +x_703 = lean_array_push(x_695, x_702); +x_704 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_704, 0, x_661); +lean_ctor_set(x_704, 1, x_703); +x_705 = lean_array_push(x_655, x_704); +x_706 = l___private_Init_Notation_0__Lean_Parser_Tactic_withCheapRefl___closed__5; +x_707 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_707, 0, x_706); +lean_ctor_set(x_707, 1, x_705); +x_708 = lean_array_push(x_655, x_707); +x_709 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14110____closed__3; +x_710 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_710, 0, x_709); +lean_ctor_set(x_710, 1, x_708); +x_711 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14; +x_712 = lean_array_push(x_711, x_710); +x_713 = l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__2; +x_714 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_714, 0, x_713); +lean_ctor_set(x_714, 1, x_712); +lean_inc(x_686); +x_715 = lean_array_push(x_686, x_714); +x_716 = l_myMacro____x40_Init_Notation___hyg_11187____closed__15; +x_717 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_717, 0, x_716); +lean_ctor_set(x_717, 1, x_715); +x_718 = l_myMacro____x40_Init_Notation___hyg_11187____closed__13; +x_719 = lean_array_push(x_718, x_717); +x_720 = l_myMacro____x40_Init_Notation___hyg_11187____closed__11; +x_721 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_721, 0, x_720); +lean_ctor_set(x_721, 1, x_719); +x_722 = lean_array_push(x_655, x_721); +x_723 = lean_array_push(x_722, x_667); +x_724 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_724, 0, x_661); +lean_ctor_set(x_724, 1, x_723); +x_725 = lean_array_push(x_670, x_724); +x_726 = lean_array_push(x_725, x_672); +x_727 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_727, 0, x_674); +lean_ctor_set(x_727, 1, x_726); +x_728 = lean_array_push(x_677, x_727); +x_729 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21; +lean_inc(x_639); +lean_inc(x_643); +x_730 = l_Lean_addMacroScope(x_643, x_729, x_639); +x_731 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20; +x_732 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23; +x_733 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_733, 0, x_647); +lean_ctor_set(x_733, 1, x_731); +lean_ctor_set(x_733, 2, x_730); +lean_ctor_set(x_733, 3, x_732); +x_734 = lean_array_push(x_655, x_733); +x_735 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27; +x_736 = l_Lean_addMacroScope(x_643, x_735, x_639); +x_737 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26; +x_738 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_738, 0, x_647); +lean_ctor_set(x_738, 1, x_737); +lean_ctor_set(x_738, 2, x_736); +lean_ctor_set(x_738, 3, x_646); +lean_inc(x_738); +x_739 = lean_array_push(x_655, x_738); +x_740 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_740, 0, x_661); +lean_ctor_set(x_740, 1, x_739); +x_741 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__10; +x_742 = lean_array_push(x_741, x_740); +x_743 = l_Lean_Parser_Tactic_intro___closed__4; +x_744 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_744, 0, x_743); +lean_ctor_set(x_744, 1, x_742); +x_745 = lean_array_push(x_655, x_744); +x_746 = lean_array_push(x_745, x_692); +x_747 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_747, 0, x_661); +lean_ctor_set(x_747, 1, x_746); +x_748 = lean_array_push(x_655, x_747); +x_749 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29; +x_750 = lean_array_push(x_749, x_738); +x_751 = lean_array_push(x_750, x_667); +x_752 = l_Lean_Parser_Tactic_injection___closed__2; +x_753 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_753, 0, x_752); +lean_ctor_set(x_753, 1, x_751); +x_754 = lean_array_push(x_655, x_753); +x_755 = lean_array_push(x_754, x_692); +x_756 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_756, 0, x_661); +lean_ctor_set(x_756, 1, x_755); +x_757 = lean_array_push(x_748, x_756); +x_758 = l_Lean_expandExplicitBindersAux_loop___closed__2; +x_759 = lean_array_push(x_682, x_758); +x_760 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_760, 0, x_664); +lean_ctor_set(x_760, 1, x_759); +x_761 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__2; +x_762 = lean_array_push(x_761, x_760); +x_763 = l_Lean_Parser_Tactic_apply___closed__2; +x_764 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_764, 0, x_763); +lean_ctor_set(x_764, 1, x_762); +x_765 = lean_array_push(x_655, x_764); +x_766 = lean_array_push(x_765, x_692); +x_767 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_767, 0, x_661); +lean_ctor_set(x_767, 1, x_766); +x_768 = lean_array_push(x_757, x_767); +x_769 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35; +x_770 = lean_array_push(x_768, x_769); +x_771 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_771, 0, x_661); +lean_ctor_set(x_771, 1, x_770); +x_772 = lean_array_push(x_655, x_771); +x_773 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_773, 0, x_706); +lean_ctor_set(x_773, 1, x_772); +x_774 = lean_array_push(x_655, x_773); +x_775 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_775, 0, x_709); +lean_ctor_set(x_775, 1, x_774); +x_776 = lean_array_push(x_711, x_775); +x_777 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_777, 0, x_713); +lean_ctor_set(x_777, 1, x_776); +x_778 = lean_array_push(x_655, x_777); +x_779 = lean_array_push(x_778, x_667); +x_780 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_780, 0, x_661); +lean_ctor_set(x_780, 1, x_779); +x_781 = lean_array_push(x_670, x_780); +x_782 = lean_array_push(x_781, x_672); +x_783 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_783, 0, x_674); +lean_ctor_set(x_783, 1, x_782); +x_784 = lean_array_push(x_655, x_783); +x_785 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_785, 0, x_661); +lean_ctor_set(x_785, 1, x_784); +x_786 = lean_array_push(x_734, x_785); +x_787 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_787, 0, x_664); +lean_ctor_set(x_787, 1, x_786); +x_788 = lean_array_push(x_686, x_787); +x_789 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_789, 0, x_716); +lean_ctor_set(x_789, 1, x_788); +x_790 = lean_array_push(x_718, x_789); +x_791 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_791, 0, x_720); +lean_ctor_set(x_791, 1, x_790); +x_792 = lean_array_push(x_655, x_791); +x_793 = lean_array_push(x_792, x_667); +x_794 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_794, 0, x_661); +lean_ctor_set(x_794, 1, x_793); +x_795 = lean_array_push(x_670, x_794); +x_796 = lean_array_push(x_795, x_672); +x_797 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_797, 0, x_674); +lean_ctor_set(x_797, 1, x_796); +x_798 = lean_array_push(x_728, x_797); +x_799 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_799, 0, x_661); +lean_ctor_set(x_799, 1, x_798); +x_800 = lean_array_push(x_656, x_799); +x_801 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_801, 0, x_664); +lean_ctor_set(x_801, 1, x_800); +lean_ctor_set(x_641, 0, x_801); +return x_641; +} +else +{ +lean_object* x_802; lean_object* x_803; lean_object* x_804; lean_object* x_805; lean_object* x_806; lean_object* x_807; lean_object* x_808; lean_object* x_809; lean_object* x_810; lean_object* x_811; lean_object* x_812; lean_object* x_813; lean_object* x_814; lean_object* x_815; lean_object* x_816; lean_object* x_817; lean_object* x_818; lean_object* x_819; lean_object* x_820; lean_object* x_821; lean_object* x_822; lean_object* x_823; lean_object* x_824; lean_object* x_825; lean_object* x_826; lean_object* x_827; lean_object* x_828; lean_object* x_829; lean_object* x_830; lean_object* x_831; lean_object* x_832; lean_object* x_833; lean_object* x_834; lean_object* x_835; lean_object* x_836; lean_object* x_837; lean_object* x_838; lean_object* x_839; lean_object* x_840; lean_object* x_841; lean_object* x_842; lean_object* x_843; lean_object* x_844; lean_object* x_845; lean_object* x_846; lean_object* x_847; lean_object* x_848; lean_object* x_849; lean_object* x_850; lean_object* x_851; lean_object* x_852; lean_object* x_853; lean_object* x_854; lean_object* x_855; lean_object* x_856; lean_object* x_857; lean_object* x_858; lean_object* x_859; lean_object* x_860; lean_object* x_861; lean_object* x_862; lean_object* x_863; lean_object* x_864; lean_object* x_865; lean_object* x_866; lean_object* x_867; lean_object* x_868; lean_object* x_869; lean_object* x_870; lean_object* x_871; lean_object* x_872; lean_object* x_873; lean_object* x_874; lean_object* x_875; lean_object* x_876; lean_object* x_877; lean_object* x_878; lean_object* x_879; lean_object* x_880; lean_object* x_881; lean_object* x_882; lean_object* x_883; lean_object* x_884; lean_object* x_885; lean_object* x_886; lean_object* x_887; lean_object* x_888; lean_object* x_889; lean_object* x_890; lean_object* x_891; lean_object* x_892; lean_object* x_893; lean_object* x_894; lean_object* x_895; lean_object* x_896; lean_object* x_897; lean_object* x_898; lean_object* x_899; lean_object* x_900; lean_object* x_901; lean_object* x_902; lean_object* x_903; lean_object* x_904; lean_object* x_905; lean_object* x_906; lean_object* x_907; lean_object* x_908; lean_object* x_909; lean_object* x_910; lean_object* x_911; lean_object* x_912; lean_object* x_913; lean_object* x_914; lean_object* x_915; lean_object* x_916; lean_object* x_917; lean_object* x_918; lean_object* x_919; lean_object* x_920; lean_object* x_921; lean_object* x_922; lean_object* x_923; lean_object* x_924; lean_object* x_925; lean_object* x_926; lean_object* x_927; lean_object* x_928; lean_object* x_929; lean_object* x_930; lean_object* x_931; lean_object* x_932; lean_object* x_933; lean_object* x_934; lean_object* x_935; lean_object* x_936; lean_object* x_937; lean_object* x_938; lean_object* x_939; lean_object* x_940; lean_object* x_941; lean_object* x_942; lean_object* x_943; lean_object* x_944; lean_object* x_945; lean_object* x_946; lean_object* x_947; lean_object* x_948; lean_object* x_949; lean_object* x_950; lean_object* x_951; lean_object* x_952; lean_object* x_953; lean_object* x_954; lean_object* x_955; lean_object* x_956; lean_object* x_957; lean_object* x_958; lean_object* x_959; lean_object* x_960; lean_object* x_961; lean_object* x_962; +x_802 = lean_ctor_get(x_641, 0); +x_803 = lean_ctor_get(x_641, 1); +lean_inc(x_803); +lean_inc(x_802); +lean_dec(x_641); +x_804 = l_myMacro____x40_Init_Notation___hyg_11187____closed__4; +lean_inc(x_639); +lean_inc(x_802); +x_805 = l_Lean_addMacroScope(x_802, x_804, x_639); +x_806 = lean_box(0); +x_807 = l_Lean_instInhabitedSourceInfo___closed__1; +x_808 = l_myMacro____x40_Init_Notation___hyg_11187____closed__3; +x_809 = l_myMacro____x40_Init_Notation___hyg_11187____closed__6; +x_810 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_810, 0, x_807); +lean_ctor_set(x_810, 1, x_808); +lean_ctor_set(x_810, 2, x_805); +lean_ctor_set(x_810, 3, x_809); +x_811 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__47; +x_812 = lean_array_push(x_811, x_810); +x_813 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__44; +x_814 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_814, 0, x_813); +lean_ctor_set(x_814, 1, x_812); +x_815 = l_Array_empty___closed__1; +x_816 = lean_array_push(x_815, x_814); +x_817 = lean_mk_syntax_ident(x_1); +x_818 = lean_array_push(x_815, x_817); +x_819 = lean_array_push(x_815, x_622); +x_820 = lean_array_push(x_819, x_623); +x_821 = l_Lean_nullKind___closed__2; +x_822 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_822, 0, x_821); +lean_ctor_set(x_822, 1, x_820); +x_823 = lean_array_push(x_818, x_822); +x_824 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_825 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_825, 0, x_824); +lean_ctor_set(x_825, 1, x_823); +x_826 = lean_array_push(x_815, x_825); +x_827 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_828 = lean_array_push(x_826, x_827); +x_829 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_829, 0, x_821); +lean_ctor_set(x_829, 1, x_828); +x_830 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +x_831 = lean_array_push(x_830, x_829); +x_832 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_833 = lean_array_push(x_831, x_832); +x_834 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_835 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_835, 0, x_834); +lean_ctor_set(x_835, 1, x_833); +x_836 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__36; +x_837 = lean_array_push(x_836, x_835); +x_838 = l_Lean_Elab_Tactic_evalIntro___closed__4; +lean_inc(x_639); +lean_inc(x_802); +x_839 = l_Lean_addMacroScope(x_802, x_838, x_639); +x_840 = l_Lean_Elab_Tactic_evalIntro___closed__3; +x_841 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_841, 0, x_807); +lean_ctor_set(x_841, 1, x_840); +lean_ctor_set(x_841, 2, x_839); +lean_ctor_set(x_841, 3, x_806); +x_842 = lean_array_push(x_815, x_841); +lean_inc(x_842); +x_843 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_843, 0, x_821); +lean_ctor_set(x_843, 1, x_842); +lean_inc(x_843); +x_844 = lean_array_push(x_815, x_843); +x_845 = l_myMacro____x40_Init_Notation___hyg_11187____closed__17; +x_846 = lean_array_push(x_844, x_845); +x_847 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16; +x_848 = lean_array_push(x_847, x_843); +x_849 = l_Lean_Parser_Tactic_subst___closed__2; +x_850 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_850, 0, x_849); +lean_ctor_set(x_850, 1, x_848); +x_851 = lean_array_push(x_815, x_850); +x_852 = l_myMacro____x40_Init_Notation___hyg_12942____closed__18; +x_853 = lean_array_push(x_851, x_852); +x_854 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_854, 0, x_821); +lean_ctor_set(x_854, 1, x_853); +x_855 = lean_array_push(x_815, x_854); +x_856 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__2; +x_857 = lean_array_push(x_856, x_636); +x_858 = l_Lean_Parser_Tactic_exact___closed__2; +x_859 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_859, 0, x_858); +lean_ctor_set(x_859, 1, x_857); +x_860 = lean_array_push(x_815, x_859); +x_861 = lean_array_push(x_860, x_827); +x_862 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_862, 0, x_821); +lean_ctor_set(x_862, 1, x_861); +x_863 = lean_array_push(x_855, x_862); +x_864 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_864, 0, x_821); +lean_ctor_set(x_864, 1, x_863); +x_865 = lean_array_push(x_815, x_864); +x_866 = l___private_Init_Notation_0__Lean_Parser_Tactic_withCheapRefl___closed__5; +x_867 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_867, 0, x_866); +lean_ctor_set(x_867, 1, x_865); +x_868 = lean_array_push(x_815, x_867); +x_869 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14110____closed__3; +x_870 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_870, 0, x_869); +lean_ctor_set(x_870, 1, x_868); +x_871 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14; +x_872 = lean_array_push(x_871, x_870); +x_873 = l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__2; +x_874 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_874, 0, x_873); +lean_ctor_set(x_874, 1, x_872); +lean_inc(x_846); +x_875 = lean_array_push(x_846, x_874); +x_876 = l_myMacro____x40_Init_Notation___hyg_11187____closed__15; +x_877 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_877, 0, x_876); +lean_ctor_set(x_877, 1, x_875); +x_878 = l_myMacro____x40_Init_Notation___hyg_11187____closed__13; +x_879 = lean_array_push(x_878, x_877); +x_880 = l_myMacro____x40_Init_Notation___hyg_11187____closed__11; +x_881 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_881, 0, x_880); +lean_ctor_set(x_881, 1, x_879); +x_882 = lean_array_push(x_815, x_881); +x_883 = lean_array_push(x_882, x_827); +x_884 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_884, 0, x_821); +lean_ctor_set(x_884, 1, x_883); +x_885 = lean_array_push(x_830, x_884); +x_886 = lean_array_push(x_885, x_832); +x_887 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_887, 0, x_834); +lean_ctor_set(x_887, 1, x_886); +x_888 = lean_array_push(x_837, x_887); +x_889 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21; +lean_inc(x_639); +lean_inc(x_802); +x_890 = l_Lean_addMacroScope(x_802, x_889, x_639); +x_891 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20; +x_892 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23; +x_893 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_893, 0, x_807); +lean_ctor_set(x_893, 1, x_891); +lean_ctor_set(x_893, 2, x_890); +lean_ctor_set(x_893, 3, x_892); +x_894 = lean_array_push(x_815, x_893); +x_895 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27; +x_896 = l_Lean_addMacroScope(x_802, x_895, x_639); +x_897 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26; +x_898 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_898, 0, x_807); +lean_ctor_set(x_898, 1, x_897); +lean_ctor_set(x_898, 2, x_896); +lean_ctor_set(x_898, 3, x_806); +lean_inc(x_898); +x_899 = lean_array_push(x_815, x_898); +x_900 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_900, 0, x_821); +lean_ctor_set(x_900, 1, x_899); +x_901 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__10; +x_902 = lean_array_push(x_901, x_900); +x_903 = l_Lean_Parser_Tactic_intro___closed__4; +x_904 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_904, 0, x_903); +lean_ctor_set(x_904, 1, x_902); +x_905 = lean_array_push(x_815, x_904); +x_906 = lean_array_push(x_905, x_852); +x_907 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_907, 0, x_821); +lean_ctor_set(x_907, 1, x_906); +x_908 = lean_array_push(x_815, x_907); +x_909 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29; +x_910 = lean_array_push(x_909, x_898); +x_911 = lean_array_push(x_910, x_827); +x_912 = l_Lean_Parser_Tactic_injection___closed__2; +x_913 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_913, 0, x_912); +lean_ctor_set(x_913, 1, x_911); +x_914 = lean_array_push(x_815, x_913); +x_915 = lean_array_push(x_914, x_852); +x_916 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_916, 0, x_821); +lean_ctor_set(x_916, 1, x_915); +x_917 = lean_array_push(x_908, x_916); +x_918 = l_Lean_expandExplicitBindersAux_loop___closed__2; +x_919 = lean_array_push(x_842, x_918); +x_920 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_920, 0, x_824); +lean_ctor_set(x_920, 1, x_919); +x_921 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__2; +x_922 = lean_array_push(x_921, x_920); +x_923 = l_Lean_Parser_Tactic_apply___closed__2; +x_924 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_924, 0, x_923); +lean_ctor_set(x_924, 1, x_922); +x_925 = lean_array_push(x_815, x_924); +x_926 = lean_array_push(x_925, x_852); +x_927 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_927, 0, x_821); +lean_ctor_set(x_927, 1, x_926); +x_928 = lean_array_push(x_917, x_927); +x_929 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35; +x_930 = lean_array_push(x_928, x_929); +x_931 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_931, 0, x_821); +lean_ctor_set(x_931, 1, x_930); +x_932 = lean_array_push(x_815, x_931); +x_933 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_933, 0, x_866); +lean_ctor_set(x_933, 1, x_932); +x_934 = lean_array_push(x_815, x_933); +x_935 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_935, 0, x_869); +lean_ctor_set(x_935, 1, x_934); +x_936 = lean_array_push(x_871, x_935); +x_937 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_937, 0, x_873); +lean_ctor_set(x_937, 1, x_936); +x_938 = lean_array_push(x_815, x_937); +x_939 = lean_array_push(x_938, x_827); +x_940 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_940, 0, x_821); +lean_ctor_set(x_940, 1, x_939); +x_941 = lean_array_push(x_830, x_940); +x_942 = lean_array_push(x_941, x_832); +x_943 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_943, 0, x_834); +lean_ctor_set(x_943, 1, x_942); +x_944 = lean_array_push(x_815, x_943); +x_945 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_945, 0, x_821); +lean_ctor_set(x_945, 1, x_944); +x_946 = lean_array_push(x_894, x_945); +x_947 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_947, 0, x_824); +lean_ctor_set(x_947, 1, x_946); +x_948 = lean_array_push(x_846, x_947); +x_949 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_949, 0, x_876); +lean_ctor_set(x_949, 1, x_948); +x_950 = lean_array_push(x_878, x_949); +x_951 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_951, 0, x_880); +lean_ctor_set(x_951, 1, x_950); +x_952 = lean_array_push(x_815, x_951); +x_953 = lean_array_push(x_952, x_827); +x_954 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_954, 0, x_821); +lean_ctor_set(x_954, 1, x_953); +x_955 = lean_array_push(x_830, x_954); +x_956 = lean_array_push(x_955, x_832); +x_957 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_957, 0, x_834); +lean_ctor_set(x_957, 1, x_956); +x_958 = lean_array_push(x_888, x_957); +x_959 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_959, 0, x_821); +lean_ctor_set(x_959, 1, x_958); +x_960 = lean_array_push(x_816, x_959); +x_961 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_961, 0, x_824); +lean_ctor_set(x_961, 1, x_960); +x_962 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_962, 0, x_961); +lean_ctor_set(x_962, 1, x_803); +return x_962; +} +} +else +{ +lean_object* x_963; lean_object* x_964; lean_object* x_965; lean_object* x_966; uint8_t x_967; uint8_t x_968; uint8_t x_969; lean_object* x_970; lean_object* x_971; lean_object* x_972; lean_object* x_973; lean_object* x_974; lean_object* x_975; lean_object* x_976; lean_object* x_977; lean_object* x_978; lean_object* x_979; lean_object* x_980; lean_object* x_981; lean_object* x_982; lean_object* x_983; lean_object* x_984; lean_object* x_985; lean_object* x_986; lean_object* x_987; lean_object* x_988; lean_object* x_989; lean_object* x_990; lean_object* x_991; lean_object* x_992; lean_object* x_993; lean_object* x_994; lean_object* x_995; lean_object* x_996; lean_object* x_997; lean_object* x_998; lean_object* x_999; lean_object* x_1000; lean_object* x_1001; lean_object* x_1002; lean_object* x_1003; lean_object* x_1004; lean_object* x_1005; lean_object* x_1006; lean_object* x_1007; lean_object* x_1008; lean_object* x_1009; lean_object* x_1010; lean_object* x_1011; lean_object* x_1012; lean_object* x_1013; lean_object* x_1014; lean_object* x_1015; lean_object* x_1016; lean_object* x_1017; lean_object* x_1018; lean_object* x_1019; lean_object* x_1020; lean_object* x_1021; lean_object* x_1022; lean_object* x_1023; lean_object* x_1024; lean_object* x_1025; lean_object* x_1026; lean_object* x_1027; lean_object* x_1028; lean_object* x_1029; lean_object* x_1030; lean_object* x_1031; lean_object* x_1032; lean_object* x_1033; lean_object* x_1034; lean_object* x_1035; lean_object* x_1036; lean_object* x_1037; lean_object* x_1038; lean_object* x_1039; lean_object* x_1040; lean_object* x_1041; lean_object* x_1042; lean_object* x_1043; lean_object* x_1044; lean_object* x_1045; lean_object* x_1046; lean_object* x_1047; lean_object* x_1048; lean_object* x_1049; lean_object* x_1050; lean_object* x_1051; lean_object* x_1052; lean_object* x_1053; lean_object* x_1054; lean_object* x_1055; lean_object* x_1056; lean_object* x_1057; lean_object* x_1058; lean_object* x_1059; lean_object* x_1060; lean_object* x_1061; lean_object* x_1062; lean_object* x_1063; lean_object* x_1064; lean_object* x_1065; lean_object* x_1066; lean_object* x_1067; lean_object* x_1068; lean_object* x_1069; lean_object* x_1070; lean_object* x_1071; lean_object* x_1072; lean_object* x_1073; lean_object* x_1074; lean_object* x_1075; lean_object* x_1076; lean_object* x_1077; lean_object* x_1078; lean_object* x_1079; lean_object* x_1080; lean_object* x_1081; lean_object* x_1082; lean_object* x_1083; lean_object* x_1084; lean_object* x_1085; lean_object* x_1086; lean_object* x_1087; lean_object* x_1088; lean_object* x_1089; lean_object* x_1090; lean_object* x_1091; lean_object* x_1092; lean_object* x_1093; lean_object* x_1094; lean_object* x_1095; lean_object* x_1096; lean_object* x_1097; lean_object* x_1098; lean_object* x_1099; lean_object* x_1100; lean_object* x_1101; lean_object* x_1102; lean_object* x_1103; lean_object* x_1104; lean_object* x_1105; lean_object* x_1106; lean_object* x_1107; lean_object* x_1108; lean_object* x_1109; lean_object* x_1110; lean_object* x_1111; lean_object* x_1112; lean_object* x_1113; lean_object* x_1114; lean_object* x_1115; lean_object* x_1116; lean_object* x_1117; lean_object* x_1118; lean_object* x_1119; lean_object* x_1120; lean_object* x_1121; lean_object* x_1122; lean_object* x_1123; lean_object* x_1124; lean_object* x_1125; lean_object* x_1126; lean_object* x_1127; lean_object* x_1128; lean_object* x_1129; lean_object* x_1130; lean_object* x_1131; lean_object* x_1132; lean_object* x_1133; lean_object* x_1134; lean_object* x_1135; lean_object* x_1136; lean_object* x_1137; lean_object* x_1138; lean_object* x_1139; lean_object* x_1140; +x_963 = lean_ctor_get(x_3, 0); +x_964 = lean_ctor_get(x_3, 1); +x_965 = lean_ctor_get(x_3, 2); +x_966 = lean_ctor_get(x_3, 3); +x_967 = lean_ctor_get_uint8(x_3, sizeof(void*)*6); +x_968 = lean_ctor_get_uint8(x_3, sizeof(void*)*6 + 1); +x_969 = lean_ctor_get_uint8(x_3, sizeof(void*)*6 + 2); +x_970 = lean_ctor_get(x_3, 5); +lean_inc(x_970); +lean_inc(x_966); +lean_inc(x_965); +lean_inc(x_964); +lean_inc(x_963); +lean_dec(x_3); +x_971 = lean_alloc_ctor(0, 6, 3); +lean_ctor_set(x_971, 0, x_963); +lean_ctor_set(x_971, 1, x_964); +lean_ctor_set(x_971, 2, x_965); +lean_ctor_set(x_971, 3, x_966); +lean_ctor_set(x_971, 4, x_628); +lean_ctor_set(x_971, 5, x_970); +lean_ctor_set_uint8(x_971, sizeof(void*)*6, x_967); +lean_ctor_set_uint8(x_971, sizeof(void*)*6 + 1, x_968); +lean_ctor_set_uint8(x_971, sizeof(void*)*6 + 2, x_969); +lean_inc(x_971); +lean_inc(x_1); +x_972 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(x_1, x_621, x_971, x_4, x_5, x_6, x_7, x_8, x_632); +x_973 = lean_ctor_get(x_972, 0); +lean_inc(x_973); +x_974 = lean_ctor_get(x_972, 1); +lean_inc(x_974); +lean_dec(x_972); +x_975 = l_Lean_Elab_Term_getCurrMacroScope(x_971, x_4, x_5, x_6, x_7, x_8, x_974); +lean_dec(x_971); +x_976 = lean_ctor_get(x_975, 0); +lean_inc(x_976); +x_977 = lean_ctor_get(x_975, 1); +lean_inc(x_977); +lean_dec(x_975); +x_978 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_977); +x_979 = lean_ctor_get(x_978, 0); +lean_inc(x_979); +x_980 = lean_ctor_get(x_978, 1); +lean_inc(x_980); +if (lean_is_exclusive(x_978)) { + lean_ctor_release(x_978, 0); + lean_ctor_release(x_978, 1); + x_981 = x_978; +} else { + lean_dec_ref(x_978); + x_981 = lean_box(0); +} +x_982 = l_myMacro____x40_Init_Notation___hyg_11187____closed__4; +lean_inc(x_976); +lean_inc(x_979); +x_983 = l_Lean_addMacroScope(x_979, x_982, x_976); +x_984 = lean_box(0); +x_985 = l_Lean_instInhabitedSourceInfo___closed__1; +x_986 = l_myMacro____x40_Init_Notation___hyg_11187____closed__3; +x_987 = l_myMacro____x40_Init_Notation___hyg_11187____closed__6; +x_988 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_988, 0, x_985); +lean_ctor_set(x_988, 1, x_986); +lean_ctor_set(x_988, 2, x_983); +lean_ctor_set(x_988, 3, x_987); +x_989 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__47; +x_990 = lean_array_push(x_989, x_988); +x_991 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__44; +x_992 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_992, 0, x_991); +lean_ctor_set(x_992, 1, x_990); +x_993 = l_Array_empty___closed__1; +x_994 = lean_array_push(x_993, x_992); +x_995 = lean_mk_syntax_ident(x_1); +x_996 = lean_array_push(x_993, x_995); +x_997 = lean_array_push(x_993, x_622); +x_998 = lean_array_push(x_997, x_623); +x_999 = l_Lean_nullKind___closed__2; +x_1000 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1000, 0, x_999); +lean_ctor_set(x_1000, 1, x_998); +x_1001 = lean_array_push(x_996, x_1000); +x_1002 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_1003 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1003, 0, x_1002); +lean_ctor_set(x_1003, 1, x_1001); +x_1004 = lean_array_push(x_993, x_1003); +x_1005 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_1006 = lean_array_push(x_1004, x_1005); +x_1007 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1007, 0, x_999); +lean_ctor_set(x_1007, 1, x_1006); +x_1008 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +x_1009 = lean_array_push(x_1008, x_1007); +x_1010 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_1011 = lean_array_push(x_1009, x_1010); +x_1012 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_1013 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1013, 0, x_1012); +lean_ctor_set(x_1013, 1, x_1011); +x_1014 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__36; +x_1015 = lean_array_push(x_1014, x_1013); +x_1016 = l_Lean_Elab_Tactic_evalIntro___closed__4; +lean_inc(x_976); +lean_inc(x_979); +x_1017 = l_Lean_addMacroScope(x_979, x_1016, x_976); +x_1018 = l_Lean_Elab_Tactic_evalIntro___closed__3; +x_1019 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_1019, 0, x_985); +lean_ctor_set(x_1019, 1, x_1018); +lean_ctor_set(x_1019, 2, x_1017); +lean_ctor_set(x_1019, 3, x_984); +x_1020 = lean_array_push(x_993, x_1019); +lean_inc(x_1020); +x_1021 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1021, 0, x_999); +lean_ctor_set(x_1021, 1, x_1020); +lean_inc(x_1021); +x_1022 = lean_array_push(x_993, x_1021); +x_1023 = l_myMacro____x40_Init_Notation___hyg_11187____closed__17; +x_1024 = lean_array_push(x_1022, x_1023); +x_1025 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16; +x_1026 = lean_array_push(x_1025, x_1021); +x_1027 = l_Lean_Parser_Tactic_subst___closed__2; +x_1028 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1028, 0, x_1027); +lean_ctor_set(x_1028, 1, x_1026); +x_1029 = lean_array_push(x_993, x_1028); +x_1030 = l_myMacro____x40_Init_Notation___hyg_12942____closed__18; +x_1031 = lean_array_push(x_1029, x_1030); +x_1032 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1032, 0, x_999); +lean_ctor_set(x_1032, 1, x_1031); +x_1033 = lean_array_push(x_993, x_1032); +x_1034 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__2; +x_1035 = lean_array_push(x_1034, x_973); +x_1036 = l_Lean_Parser_Tactic_exact___closed__2; +x_1037 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1037, 0, x_1036); +lean_ctor_set(x_1037, 1, x_1035); +x_1038 = lean_array_push(x_993, x_1037); +x_1039 = lean_array_push(x_1038, x_1005); +x_1040 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1040, 0, x_999); +lean_ctor_set(x_1040, 1, x_1039); +x_1041 = lean_array_push(x_1033, x_1040); +x_1042 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1042, 0, x_999); +lean_ctor_set(x_1042, 1, x_1041); +x_1043 = lean_array_push(x_993, x_1042); +x_1044 = l___private_Init_Notation_0__Lean_Parser_Tactic_withCheapRefl___closed__5; +x_1045 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1045, 0, x_1044); +lean_ctor_set(x_1045, 1, x_1043); +x_1046 = lean_array_push(x_993, x_1045); +x_1047 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14110____closed__3; +x_1048 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1048, 0, x_1047); +lean_ctor_set(x_1048, 1, x_1046); +x_1049 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14; +x_1050 = lean_array_push(x_1049, x_1048); +x_1051 = l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__2; +x_1052 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1052, 0, x_1051); +lean_ctor_set(x_1052, 1, x_1050); +lean_inc(x_1024); +x_1053 = lean_array_push(x_1024, x_1052); +x_1054 = l_myMacro____x40_Init_Notation___hyg_11187____closed__15; +x_1055 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1055, 0, x_1054); +lean_ctor_set(x_1055, 1, x_1053); +x_1056 = l_myMacro____x40_Init_Notation___hyg_11187____closed__13; +x_1057 = lean_array_push(x_1056, x_1055); +x_1058 = l_myMacro____x40_Init_Notation___hyg_11187____closed__11; +x_1059 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1059, 0, x_1058); +lean_ctor_set(x_1059, 1, x_1057); +x_1060 = lean_array_push(x_993, x_1059); +x_1061 = lean_array_push(x_1060, x_1005); +x_1062 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1062, 0, x_999); +lean_ctor_set(x_1062, 1, x_1061); +x_1063 = lean_array_push(x_1008, x_1062); +x_1064 = lean_array_push(x_1063, x_1010); +x_1065 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1065, 0, x_1012); +lean_ctor_set(x_1065, 1, x_1064); +x_1066 = lean_array_push(x_1015, x_1065); +x_1067 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21; +lean_inc(x_976); +lean_inc(x_979); +x_1068 = l_Lean_addMacroScope(x_979, x_1067, x_976); +x_1069 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20; +x_1070 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23; +x_1071 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_1071, 0, x_985); +lean_ctor_set(x_1071, 1, x_1069); +lean_ctor_set(x_1071, 2, x_1068); +lean_ctor_set(x_1071, 3, x_1070); +x_1072 = lean_array_push(x_993, x_1071); +x_1073 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27; +x_1074 = l_Lean_addMacroScope(x_979, x_1073, x_976); +x_1075 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26; +x_1076 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_1076, 0, x_985); +lean_ctor_set(x_1076, 1, x_1075); +lean_ctor_set(x_1076, 2, x_1074); +lean_ctor_set(x_1076, 3, x_984); +lean_inc(x_1076); +x_1077 = lean_array_push(x_993, x_1076); +x_1078 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1078, 0, x_999); +lean_ctor_set(x_1078, 1, x_1077); +x_1079 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__10; +x_1080 = lean_array_push(x_1079, x_1078); +x_1081 = l_Lean_Parser_Tactic_intro___closed__4; +x_1082 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1082, 0, x_1081); +lean_ctor_set(x_1082, 1, x_1080); +x_1083 = lean_array_push(x_993, x_1082); +x_1084 = lean_array_push(x_1083, x_1030); +x_1085 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1085, 0, x_999); +lean_ctor_set(x_1085, 1, x_1084); +x_1086 = lean_array_push(x_993, x_1085); +x_1087 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29; +x_1088 = lean_array_push(x_1087, x_1076); +x_1089 = lean_array_push(x_1088, x_1005); +x_1090 = l_Lean_Parser_Tactic_injection___closed__2; +x_1091 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1091, 0, x_1090); +lean_ctor_set(x_1091, 1, x_1089); +x_1092 = lean_array_push(x_993, x_1091); +x_1093 = lean_array_push(x_1092, x_1030); +x_1094 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1094, 0, x_999); +lean_ctor_set(x_1094, 1, x_1093); +x_1095 = lean_array_push(x_1086, x_1094); +x_1096 = l_Lean_expandExplicitBindersAux_loop___closed__2; +x_1097 = lean_array_push(x_1020, x_1096); +x_1098 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1098, 0, x_1002); +lean_ctor_set(x_1098, 1, x_1097); +x_1099 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__2; +x_1100 = lean_array_push(x_1099, x_1098); +x_1101 = l_Lean_Parser_Tactic_apply___closed__2; +x_1102 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1102, 0, x_1101); +lean_ctor_set(x_1102, 1, x_1100); +x_1103 = lean_array_push(x_993, x_1102); +x_1104 = lean_array_push(x_1103, x_1030); +x_1105 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1105, 0, x_999); +lean_ctor_set(x_1105, 1, x_1104); +x_1106 = lean_array_push(x_1095, x_1105); +x_1107 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35; +x_1108 = lean_array_push(x_1106, x_1107); +x_1109 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1109, 0, x_999); +lean_ctor_set(x_1109, 1, x_1108); +x_1110 = lean_array_push(x_993, x_1109); +x_1111 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1111, 0, x_1044); +lean_ctor_set(x_1111, 1, x_1110); +x_1112 = lean_array_push(x_993, x_1111); +x_1113 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1113, 0, x_1047); +lean_ctor_set(x_1113, 1, x_1112); +x_1114 = lean_array_push(x_1049, x_1113); +x_1115 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1115, 0, x_1051); +lean_ctor_set(x_1115, 1, x_1114); +x_1116 = lean_array_push(x_993, x_1115); +x_1117 = lean_array_push(x_1116, x_1005); +x_1118 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1118, 0, x_999); +lean_ctor_set(x_1118, 1, x_1117); +x_1119 = lean_array_push(x_1008, x_1118); +x_1120 = lean_array_push(x_1119, x_1010); +x_1121 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1121, 0, x_1012); +lean_ctor_set(x_1121, 1, x_1120); +x_1122 = lean_array_push(x_993, x_1121); +x_1123 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1123, 0, x_999); +lean_ctor_set(x_1123, 1, x_1122); +x_1124 = lean_array_push(x_1072, x_1123); +x_1125 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1125, 0, x_1002); +lean_ctor_set(x_1125, 1, x_1124); +x_1126 = lean_array_push(x_1024, x_1125); +x_1127 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1127, 0, x_1054); +lean_ctor_set(x_1127, 1, x_1126); +x_1128 = lean_array_push(x_1056, x_1127); +x_1129 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1129, 0, x_1058); +lean_ctor_set(x_1129, 1, x_1128); +x_1130 = lean_array_push(x_993, x_1129); +x_1131 = lean_array_push(x_1130, x_1005); +x_1132 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1132, 0, x_999); +lean_ctor_set(x_1132, 1, x_1131); +x_1133 = lean_array_push(x_1008, x_1132); +x_1134 = lean_array_push(x_1133, x_1010); +x_1135 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1135, 0, x_1012); +lean_ctor_set(x_1135, 1, x_1134); +x_1136 = lean_array_push(x_1066, x_1135); +x_1137 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1137, 0, x_999); +lean_ctor_set(x_1137, 1, x_1136); +x_1138 = lean_array_push(x_994, x_1137); +x_1139 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1139, 0, x_1002); +lean_ctor_set(x_1139, 1, x_1138); +if (lean_is_scalar(x_981)) { + x_1140 = lean_alloc_ctor(0, 2, 0); +} else { + x_1140 = x_981; +} +lean_ctor_set(x_1140, 0, x_1139); +lean_ctor_set(x_1140, 1, x_980); +return x_1140; +} +} +else +{ +lean_object* x_1141; lean_object* x_1142; lean_object* x_1143; lean_object* x_1144; lean_object* x_1145; lean_object* x_1146; lean_object* x_1147; lean_object* x_1148; lean_object* x_1149; lean_object* x_1150; lean_object* x_1151; lean_object* x_1152; lean_object* x_1153; uint8_t x_1154; uint8_t x_1155; uint8_t x_1156; lean_object* x_1157; lean_object* x_1158; lean_object* x_1159; lean_object* x_1160; lean_object* x_1161; lean_object* x_1162; lean_object* x_1163; lean_object* x_1164; lean_object* x_1165; lean_object* x_1166; lean_object* x_1167; lean_object* x_1168; lean_object* x_1169; lean_object* x_1170; lean_object* x_1171; lean_object* x_1172; lean_object* x_1173; lean_object* x_1174; lean_object* x_1175; lean_object* x_1176; lean_object* x_1177; lean_object* x_1178; lean_object* x_1179; lean_object* x_1180; lean_object* x_1181; lean_object* x_1182; lean_object* x_1183; lean_object* x_1184; lean_object* x_1185; lean_object* x_1186; lean_object* x_1187; lean_object* x_1188; lean_object* x_1189; lean_object* x_1190; lean_object* x_1191; lean_object* x_1192; lean_object* x_1193; lean_object* x_1194; lean_object* x_1195; lean_object* x_1196; lean_object* x_1197; lean_object* x_1198; lean_object* x_1199; lean_object* x_1200; lean_object* x_1201; lean_object* x_1202; lean_object* x_1203; lean_object* x_1204; lean_object* x_1205; lean_object* x_1206; lean_object* x_1207; lean_object* x_1208; lean_object* x_1209; lean_object* x_1210; lean_object* x_1211; lean_object* x_1212; lean_object* x_1213; lean_object* x_1214; lean_object* x_1215; lean_object* x_1216; lean_object* x_1217; lean_object* x_1218; lean_object* x_1219; lean_object* x_1220; lean_object* x_1221; lean_object* x_1222; lean_object* x_1223; lean_object* x_1224; lean_object* x_1225; lean_object* x_1226; lean_object* x_1227; lean_object* x_1228; lean_object* x_1229; lean_object* x_1230; lean_object* x_1231; lean_object* x_1232; lean_object* x_1233; lean_object* x_1234; lean_object* x_1235; lean_object* x_1236; lean_object* x_1237; lean_object* x_1238; lean_object* x_1239; lean_object* x_1240; lean_object* x_1241; lean_object* x_1242; lean_object* x_1243; lean_object* x_1244; lean_object* x_1245; lean_object* x_1246; lean_object* x_1247; lean_object* x_1248; lean_object* x_1249; lean_object* x_1250; lean_object* x_1251; lean_object* x_1252; lean_object* x_1253; lean_object* x_1254; lean_object* x_1255; lean_object* x_1256; lean_object* x_1257; lean_object* x_1258; lean_object* x_1259; lean_object* x_1260; lean_object* x_1261; lean_object* x_1262; lean_object* x_1263; lean_object* x_1264; lean_object* x_1265; lean_object* x_1266; lean_object* x_1267; lean_object* x_1268; lean_object* x_1269; lean_object* x_1270; lean_object* x_1271; lean_object* x_1272; lean_object* x_1273; lean_object* x_1274; lean_object* x_1275; lean_object* x_1276; lean_object* x_1277; lean_object* x_1278; lean_object* x_1279; lean_object* x_1280; lean_object* x_1281; lean_object* x_1282; lean_object* x_1283; lean_object* x_1284; lean_object* x_1285; lean_object* x_1286; lean_object* x_1287; lean_object* x_1288; lean_object* x_1289; lean_object* x_1290; lean_object* x_1291; lean_object* x_1292; lean_object* x_1293; lean_object* x_1294; lean_object* x_1295; lean_object* x_1296; lean_object* x_1297; lean_object* x_1298; lean_object* x_1299; lean_object* x_1300; lean_object* x_1301; lean_object* x_1302; lean_object* x_1303; lean_object* x_1304; lean_object* x_1305; lean_object* x_1306; lean_object* x_1307; lean_object* x_1308; lean_object* x_1309; lean_object* x_1310; lean_object* x_1311; lean_object* x_1312; lean_object* x_1313; lean_object* x_1314; lean_object* x_1315; lean_object* x_1316; lean_object* x_1317; lean_object* x_1318; lean_object* x_1319; lean_object* x_1320; lean_object* x_1321; lean_object* x_1322; lean_object* x_1323; lean_object* x_1324; lean_object* x_1325; lean_object* x_1326; lean_object* x_1327; lean_object* x_1328; +x_1141 = lean_ctor_get(x_625, 0); +x_1142 = lean_ctor_get(x_625, 1); +x_1143 = lean_ctor_get(x_625, 2); +x_1144 = lean_ctor_get(x_625, 3); +lean_inc(x_1144); +lean_inc(x_1143); +lean_inc(x_1142); +lean_inc(x_1141); +lean_dec(x_625); +x_1145 = lean_unsigned_to_nat(1u); +x_1146 = lean_nat_add(x_1142, x_1145); +x_1147 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_1147, 0, x_1141); +lean_ctor_set(x_1147, 1, x_1146); +lean_ctor_set(x_1147, 2, x_1143); +lean_ctor_set(x_1147, 3, x_1144); +x_1148 = lean_st_ref_set(x_8, x_1147, x_626); +x_1149 = lean_ctor_get(x_1148, 1); +lean_inc(x_1149); +lean_dec(x_1148); +x_1150 = lean_ctor_get(x_3, 0); +lean_inc(x_1150); +x_1151 = lean_ctor_get(x_3, 1); +lean_inc(x_1151); +x_1152 = lean_ctor_get(x_3, 2); +lean_inc(x_1152); +x_1153 = lean_ctor_get(x_3, 3); +lean_inc(x_1153); +x_1154 = lean_ctor_get_uint8(x_3, sizeof(void*)*6); +x_1155 = lean_ctor_get_uint8(x_3, sizeof(void*)*6 + 1); +x_1156 = lean_ctor_get_uint8(x_3, sizeof(void*)*6 + 2); +x_1157 = lean_ctor_get(x_3, 5); +lean_inc(x_1157); +if (lean_is_exclusive(x_3)) { + lean_ctor_release(x_3, 0); + lean_ctor_release(x_3, 1); + lean_ctor_release(x_3, 2); + lean_ctor_release(x_3, 3); + lean_ctor_release(x_3, 4); + lean_ctor_release(x_3, 5); + x_1158 = x_3; +} else { + lean_dec_ref(x_3); + x_1158 = lean_box(0); +} +if (lean_is_scalar(x_1158)) { + x_1159 = lean_alloc_ctor(0, 6, 3); +} else { + x_1159 = x_1158; +} +lean_ctor_set(x_1159, 0, x_1150); +lean_ctor_set(x_1159, 1, x_1151); +lean_ctor_set(x_1159, 2, x_1152); +lean_ctor_set(x_1159, 3, x_1153); +lean_ctor_set(x_1159, 4, x_1142); +lean_ctor_set(x_1159, 5, x_1157); +lean_ctor_set_uint8(x_1159, sizeof(void*)*6, x_1154); +lean_ctor_set_uint8(x_1159, sizeof(void*)*6 + 1, x_1155); +lean_ctor_set_uint8(x_1159, sizeof(void*)*6 + 2, x_1156); +lean_inc(x_1159); +lean_inc(x_1); +x_1160 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(x_1, x_621, x_1159, x_4, x_5, x_6, x_7, x_8, x_1149); +x_1161 = lean_ctor_get(x_1160, 0); +lean_inc(x_1161); +x_1162 = lean_ctor_get(x_1160, 1); +lean_inc(x_1162); +lean_dec(x_1160); +x_1163 = l_Lean_Elab_Term_getCurrMacroScope(x_1159, x_4, x_5, x_6, x_7, x_8, x_1162); +lean_dec(x_1159); +x_1164 = lean_ctor_get(x_1163, 0); +lean_inc(x_1164); +x_1165 = lean_ctor_get(x_1163, 1); +lean_inc(x_1165); +lean_dec(x_1163); +x_1166 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_1165); +x_1167 = lean_ctor_get(x_1166, 0); +lean_inc(x_1167); +x_1168 = lean_ctor_get(x_1166, 1); +lean_inc(x_1168); +if (lean_is_exclusive(x_1166)) { + lean_ctor_release(x_1166, 0); + lean_ctor_release(x_1166, 1); + x_1169 = x_1166; +} else { + lean_dec_ref(x_1166); + x_1169 = lean_box(0); +} +x_1170 = l_myMacro____x40_Init_Notation___hyg_11187____closed__4; +lean_inc(x_1164); +lean_inc(x_1167); +x_1171 = l_Lean_addMacroScope(x_1167, x_1170, x_1164); +x_1172 = lean_box(0); +x_1173 = l_Lean_instInhabitedSourceInfo___closed__1; +x_1174 = l_myMacro____x40_Init_Notation___hyg_11187____closed__3; +x_1175 = l_myMacro____x40_Init_Notation___hyg_11187____closed__6; +x_1176 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_1176, 0, x_1173); +lean_ctor_set(x_1176, 1, x_1174); +lean_ctor_set(x_1176, 2, x_1171); +lean_ctor_set(x_1176, 3, x_1175); +x_1177 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__47; +x_1178 = lean_array_push(x_1177, x_1176); +x_1179 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__44; +x_1180 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1180, 0, x_1179); +lean_ctor_set(x_1180, 1, x_1178); +x_1181 = l_Array_empty___closed__1; +x_1182 = lean_array_push(x_1181, x_1180); +x_1183 = lean_mk_syntax_ident(x_1); +x_1184 = lean_array_push(x_1181, x_1183); +x_1185 = lean_array_push(x_1181, x_622); +x_1186 = lean_array_push(x_1185, x_623); +x_1187 = l_Lean_nullKind___closed__2; +x_1188 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1188, 0, x_1187); +lean_ctor_set(x_1188, 1, x_1186); +x_1189 = lean_array_push(x_1184, x_1188); +x_1190 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_1191 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1191, 0, x_1190); +lean_ctor_set(x_1191, 1, x_1189); +x_1192 = lean_array_push(x_1181, x_1191); +x_1193 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_1194 = lean_array_push(x_1192, x_1193); +x_1195 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1195, 0, x_1187); +lean_ctor_set(x_1195, 1, x_1194); +x_1196 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +x_1197 = lean_array_push(x_1196, x_1195); +x_1198 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_1199 = lean_array_push(x_1197, x_1198); +x_1200 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_1201 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1201, 0, x_1200); +lean_ctor_set(x_1201, 1, x_1199); +x_1202 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__36; +x_1203 = lean_array_push(x_1202, x_1201); +x_1204 = l_Lean_Elab_Tactic_evalIntro___closed__4; +lean_inc(x_1164); +lean_inc(x_1167); +x_1205 = l_Lean_addMacroScope(x_1167, x_1204, x_1164); +x_1206 = l_Lean_Elab_Tactic_evalIntro___closed__3; +x_1207 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_1207, 0, x_1173); +lean_ctor_set(x_1207, 1, x_1206); +lean_ctor_set(x_1207, 2, x_1205); +lean_ctor_set(x_1207, 3, x_1172); +x_1208 = lean_array_push(x_1181, x_1207); +lean_inc(x_1208); +x_1209 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1209, 0, x_1187); +lean_ctor_set(x_1209, 1, x_1208); +lean_inc(x_1209); +x_1210 = lean_array_push(x_1181, x_1209); +x_1211 = l_myMacro____x40_Init_Notation___hyg_11187____closed__17; +x_1212 = lean_array_push(x_1210, x_1211); +x_1213 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16; +x_1214 = lean_array_push(x_1213, x_1209); +x_1215 = l_Lean_Parser_Tactic_subst___closed__2; +x_1216 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1216, 0, x_1215); +lean_ctor_set(x_1216, 1, x_1214); +x_1217 = lean_array_push(x_1181, x_1216); +x_1218 = l_myMacro____x40_Init_Notation___hyg_12942____closed__18; +x_1219 = lean_array_push(x_1217, x_1218); +x_1220 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1220, 0, x_1187); +lean_ctor_set(x_1220, 1, x_1219); +x_1221 = lean_array_push(x_1181, x_1220); +x_1222 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14290____closed__2; +x_1223 = lean_array_push(x_1222, x_1161); +x_1224 = l_Lean_Parser_Tactic_exact___closed__2; +x_1225 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1225, 0, x_1224); +lean_ctor_set(x_1225, 1, x_1223); +x_1226 = lean_array_push(x_1181, x_1225); +x_1227 = lean_array_push(x_1226, x_1193); +x_1228 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1228, 0, x_1187); +lean_ctor_set(x_1228, 1, x_1227); +x_1229 = lean_array_push(x_1221, x_1228); +x_1230 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1230, 0, x_1187); +lean_ctor_set(x_1230, 1, x_1229); +x_1231 = lean_array_push(x_1181, x_1230); +x_1232 = l___private_Init_Notation_0__Lean_Parser_Tactic_withCheapRefl___closed__5; +x_1233 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1233, 0, x_1232); +lean_ctor_set(x_1233, 1, x_1231); +x_1234 = lean_array_push(x_1181, x_1233); +x_1235 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14110____closed__3; +x_1236 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1236, 0, x_1235); +lean_ctor_set(x_1236, 1, x_1234); +x_1237 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14; +x_1238 = lean_array_push(x_1237, x_1236); +x_1239 = l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__2; +x_1240 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1240, 0, x_1239); +lean_ctor_set(x_1240, 1, x_1238); +lean_inc(x_1212); +x_1241 = lean_array_push(x_1212, x_1240); +x_1242 = l_myMacro____x40_Init_Notation___hyg_11187____closed__15; +x_1243 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1243, 0, x_1242); +lean_ctor_set(x_1243, 1, x_1241); +x_1244 = l_myMacro____x40_Init_Notation___hyg_11187____closed__13; +x_1245 = lean_array_push(x_1244, x_1243); +x_1246 = l_myMacro____x40_Init_Notation___hyg_11187____closed__11; +x_1247 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1247, 0, x_1246); +lean_ctor_set(x_1247, 1, x_1245); +x_1248 = lean_array_push(x_1181, x_1247); +x_1249 = lean_array_push(x_1248, x_1193); +x_1250 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1250, 0, x_1187); +lean_ctor_set(x_1250, 1, x_1249); +x_1251 = lean_array_push(x_1196, x_1250); +x_1252 = lean_array_push(x_1251, x_1198); +x_1253 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1253, 0, x_1200); +lean_ctor_set(x_1253, 1, x_1252); +x_1254 = lean_array_push(x_1203, x_1253); +x_1255 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21; +lean_inc(x_1164); +lean_inc(x_1167); +x_1256 = l_Lean_addMacroScope(x_1167, x_1255, x_1164); +x_1257 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20; +x_1258 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23; +x_1259 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_1259, 0, x_1173); +lean_ctor_set(x_1259, 1, x_1257); +lean_ctor_set(x_1259, 2, x_1256); +lean_ctor_set(x_1259, 3, x_1258); +x_1260 = lean_array_push(x_1181, x_1259); +x_1261 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27; +x_1262 = l_Lean_addMacroScope(x_1167, x_1261, x_1164); +x_1263 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26; +x_1264 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_1264, 0, x_1173); +lean_ctor_set(x_1264, 1, x_1263); +lean_ctor_set(x_1264, 2, x_1262); +lean_ctor_set(x_1264, 3, x_1172); +lean_inc(x_1264); +x_1265 = lean_array_push(x_1181, x_1264); +x_1266 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1266, 0, x_1187); +lean_ctor_set(x_1266, 1, x_1265); +x_1267 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__10; +x_1268 = lean_array_push(x_1267, x_1266); +x_1269 = l_Lean_Parser_Tactic_intro___closed__4; +x_1270 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1270, 0, x_1269); +lean_ctor_set(x_1270, 1, x_1268); +x_1271 = lean_array_push(x_1181, x_1270); +x_1272 = lean_array_push(x_1271, x_1218); +x_1273 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1273, 0, x_1187); +lean_ctor_set(x_1273, 1, x_1272); +x_1274 = lean_array_push(x_1181, x_1273); +x_1275 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29; +x_1276 = lean_array_push(x_1275, x_1264); +x_1277 = lean_array_push(x_1276, x_1193); +x_1278 = l_Lean_Parser_Tactic_injection___closed__2; +x_1279 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1279, 0, x_1278); +lean_ctor_set(x_1279, 1, x_1277); +x_1280 = lean_array_push(x_1181, x_1279); +x_1281 = lean_array_push(x_1280, x_1218); +x_1282 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1282, 0, x_1187); +lean_ctor_set(x_1282, 1, x_1281); +x_1283 = lean_array_push(x_1274, x_1282); +x_1284 = l_Lean_expandExplicitBindersAux_loop___closed__2; +x_1285 = lean_array_push(x_1208, x_1284); +x_1286 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1286, 0, x_1190); +lean_ctor_set(x_1286, 1, x_1285); +x_1287 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__2; +x_1288 = lean_array_push(x_1287, x_1286); +x_1289 = l_Lean_Parser_Tactic_apply___closed__2; +x_1290 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1290, 0, x_1289); +lean_ctor_set(x_1290, 1, x_1288); +x_1291 = lean_array_push(x_1181, x_1290); +x_1292 = lean_array_push(x_1291, x_1218); +x_1293 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1293, 0, x_1187); +lean_ctor_set(x_1293, 1, x_1292); +x_1294 = lean_array_push(x_1283, x_1293); +x_1295 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35; +x_1296 = lean_array_push(x_1294, x_1295); +x_1297 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1297, 0, x_1187); +lean_ctor_set(x_1297, 1, x_1296); +x_1298 = lean_array_push(x_1181, x_1297); +x_1299 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1299, 0, x_1232); +lean_ctor_set(x_1299, 1, x_1298); +x_1300 = lean_array_push(x_1181, x_1299); +x_1301 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1301, 0, x_1235); +lean_ctor_set(x_1301, 1, x_1300); +x_1302 = lean_array_push(x_1237, x_1301); +x_1303 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1303, 0, x_1239); +lean_ctor_set(x_1303, 1, x_1302); +x_1304 = lean_array_push(x_1181, x_1303); +x_1305 = lean_array_push(x_1304, x_1193); +x_1306 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1306, 0, x_1187); +lean_ctor_set(x_1306, 1, x_1305); +x_1307 = lean_array_push(x_1196, x_1306); +x_1308 = lean_array_push(x_1307, x_1198); +x_1309 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1309, 0, x_1200); +lean_ctor_set(x_1309, 1, x_1308); +x_1310 = lean_array_push(x_1181, x_1309); +x_1311 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1311, 0, x_1187); +lean_ctor_set(x_1311, 1, x_1310); +x_1312 = lean_array_push(x_1260, x_1311); +x_1313 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1313, 0, x_1190); +lean_ctor_set(x_1313, 1, x_1312); +x_1314 = lean_array_push(x_1212, x_1313); +x_1315 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1315, 0, x_1242); +lean_ctor_set(x_1315, 1, x_1314); +x_1316 = lean_array_push(x_1244, x_1315); +x_1317 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1317, 0, x_1246); +lean_ctor_set(x_1317, 1, x_1316); +x_1318 = lean_array_push(x_1181, x_1317); +x_1319 = lean_array_push(x_1318, x_1193); +x_1320 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1320, 0, x_1187); +lean_ctor_set(x_1320, 1, x_1319); +x_1321 = lean_array_push(x_1196, x_1320); +x_1322 = lean_array_push(x_1321, x_1198); +x_1323 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1323, 0, x_1200); +lean_ctor_set(x_1323, 1, x_1322); +x_1324 = lean_array_push(x_1254, x_1323); +x_1325 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1325, 0, x_1187); +lean_ctor_set(x_1325, 1, x_1324); +x_1326 = lean_array_push(x_1182, x_1325); +x_1327 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1327, 0, x_1190); +lean_ctor_set(x_1327, 1, x_1326); +if (lean_is_scalar(x_1169)) { + x_1328 = lean_alloc_ctor(0, 2, 0); +} else { + x_1328 = x_1169; +} +lean_ctor_set(x_1328, 0, x_1327); +lean_ctor_set(x_1328, 1, x_1168); +return x_1328; +} +} +} +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; +x_10 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +return x_10; +} +} +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_9 = lean_ctor_get(x_6, 3); +x_10 = lean_ctor_get(x_2, 3); +lean_inc(x_10); +lean_inc(x_10); +x_11 = l_Lean_Elab_getBetterRef(x_9, x_10); +x_12 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_4, x_5, x_6, x_7, x_8); +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_12, 1); +lean_inc(x_14); +lean_dec(x_12); +x_15 = l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageContextTermElabM___spec__1(x_13, x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_14); +lean_dec(x_2); +lean_dec(x_10); +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; +x_17 = lean_ctor_get(x_15, 0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_11); +lean_ctor_set(x_18, 1, x_17); +lean_ctor_set_tag(x_15, 1); +lean_ctor_set(x_15, 0, x_18); +return x_15; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_19 = lean_ctor_get(x_15, 0); +x_20 = lean_ctor_get(x_15, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_15); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_11); +lean_ctor_set(x_21, 1, x_19); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_20); +return x_22; +} +} +} +lean_object* l_Lean_getConstInfoCtor___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +lean_inc(x_2); +lean_inc(x_1); +x_9 = l_Lean_getConstInfo___at_Lean_Elab_Term_mkConst___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +if (lean_obj_tag(x_10) == 6) +{ +uint8_t x_11; +lean_dec(x_2); +lean_dec(x_1); +x_11 = !lean_is_exclusive(x_9); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_9, 0); +lean_dec(x_12); +x_13 = lean_ctor_get(x_10, 0); +lean_inc(x_13); +lean_dec(x_10); +lean_ctor_set(x_9, 0, x_13); +return x_9; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_9, 1); +lean_inc(x_14); +lean_dec(x_9); +x_15 = lean_ctor_get(x_10, 0); +lean_inc(x_15); +lean_dec(x_10); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_14); +return x_16; +} +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +lean_dec(x_10); +x_17 = lean_ctor_get(x_9, 1); +lean_inc(x_17); +lean_dec(x_9); +x_18 = lean_box(0); +x_19 = l_Lean_mkConst(x_1, x_18); +x_20 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_20, 0, x_19); +x_21 = l_Lean_KernelException_toMessageData___closed__3; +x_22 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_20); +x_23 = l_Lean_getConstInfoCtor___rarg___lambda__1___closed__2; +x_24 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_23); +x_25 = l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__2(x_24, x_2, x_3, x_4, x_5, x_6, x_7, x_17); +return x_25; +} +} +else +{ +uint8_t x_26; +lean_dec(x_2); +lean_dec(x_1); +x_26 = !lean_is_exclusive(x_9); +if (x_26 == 0) +{ +return x_9; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_9, 0); +x_28 = lean_ctor_get(x_9, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_9); +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +return x_29; +} +} +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +_start: +{ +lean_object* x_13; uint8_t x_14; +x_13 = lean_ctor_get(x_2, 1); +x_14 = lean_nat_dec_le(x_13, x_4); +if (x_14 == 0) +{ +lean_object* x_15; uint8_t x_16; +x_15 = lean_unsigned_to_nat(0u); +x_16 = lean_nat_dec_eq(x_3, x_15); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_17 = lean_unsigned_to_nat(1u); +x_18 = lean_nat_sub(x_3, x_17); +lean_dec(x_3); +x_19 = l_Lean_Elab_Term_getCurrMacroScope(x_6, x_7, x_8, x_9, x_10, x_11, x_12); +x_20 = lean_ctor_get(x_19, 1); +lean_inc(x_20); +lean_dec(x_19); +x_21 = l_Lean_Elab_Term_getMainModule___rarg(x_11, x_20); +x_22 = lean_ctor_get(x_21, 1); +lean_inc(x_22); +lean_dec(x_21); +x_23 = l_myMacro____x40_Init_Notation___hyg_12315____closed__15; +lean_inc(x_1); +x_24 = lean_array_push(x_1, x_23); +x_25 = l_myMacro____x40_Init_Notation___hyg_12315____closed__13; +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_24); +x_27 = lean_array_push(x_5, x_26); +x_28 = lean_ctor_get(x_2, 2); +x_29 = lean_nat_add(x_4, x_28); +lean_dec(x_4); +x_3 = x_18; +x_4 = x_29; +x_5 = x_27; +x_12 = x_22; +goto _start; +} +else +{ +lean_object* x_31; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_5); +lean_ctor_set(x_31, 1, x_12); +return x_31; +} +} +else +{ +lean_object* x_32; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_5); +lean_ctor_set(x_32, 1, x_12); +return x_32; +} +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +_start: +{ +lean_object* x_13; uint8_t x_14; +x_13 = lean_ctor_get(x_2, 1); +x_14 = lean_nat_dec_le(x_13, x_4); +if (x_14 == 0) +{ +lean_object* x_15; uint8_t x_16; +x_15 = lean_unsigned_to_nat(0u); +x_16 = lean_nat_dec_eq(x_3, x_15); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_17 = lean_unsigned_to_nat(1u); +x_18 = lean_nat_sub(x_3, x_17); +lean_dec(x_3); +x_19 = !lean_is_exclusive(x_5); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_20 = lean_ctor_get(x_5, 0); +x_21 = lean_ctor_get(x_5, 1); +x_22 = l_Lean_Elab_Term_getCurrMacroScope(x_6, x_7, x_8, x_9, x_10, x_11, x_12); +x_23 = lean_ctor_get(x_22, 1); +lean_inc(x_23); +lean_dec(x_22); +x_24 = l_Lean_Elab_Term_getMainModule___rarg(x_11, x_23); +x_25 = lean_ctor_get(x_24, 1); +lean_inc(x_25); +lean_dec(x_24); +x_26 = l_myMacro____x40_Init_Notation___hyg_12315____closed__15; +lean_inc(x_1); +x_27 = lean_array_push(x_1, x_26); +x_28 = l_myMacro____x40_Init_Notation___hyg_12315____closed__13; +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_27); +lean_inc(x_29); +x_30 = lean_array_push(x_20, x_29); +x_31 = l_Lean_Elab_Term_getCurrMacroScope(x_6, x_7, x_8, x_9, x_10, x_11, x_25); +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +x_33 = l_Lean_Elab_Term_getMainModule___rarg(x_11, x_32); +x_34 = lean_ctor_get(x_33, 1); +lean_inc(x_34); +lean_dec(x_33); +x_35 = lean_array_push(x_21, x_29); +lean_ctor_set(x_5, 1, x_35); +lean_ctor_set(x_5, 0, x_30); +x_36 = lean_ctor_get(x_2, 2); +x_37 = lean_nat_add(x_4, x_36); +lean_dec(x_4); +x_3 = x_18; +x_4 = x_37; +x_12 = x_34; +goto _start; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_39 = lean_ctor_get(x_5, 0); +x_40 = lean_ctor_get(x_5, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_5); +x_41 = l_Lean_Elab_Term_getCurrMacroScope(x_6, x_7, x_8, x_9, x_10, x_11, x_12); +x_42 = lean_ctor_get(x_41, 1); +lean_inc(x_42); +lean_dec(x_41); +x_43 = l_Lean_Elab_Term_getMainModule___rarg(x_11, x_42); +x_44 = lean_ctor_get(x_43, 1); +lean_inc(x_44); +lean_dec(x_43); +x_45 = l_myMacro____x40_Init_Notation___hyg_12315____closed__15; +lean_inc(x_1); +x_46 = lean_array_push(x_1, x_45); +x_47 = l_myMacro____x40_Init_Notation___hyg_12315____closed__13; +x_48 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_46); +lean_inc(x_48); +x_49 = lean_array_push(x_39, x_48); +x_50 = l_Lean_Elab_Term_getCurrMacroScope(x_6, x_7, x_8, x_9, x_10, x_11, x_44); +x_51 = lean_ctor_get(x_50, 1); +lean_inc(x_51); +lean_dec(x_50); +x_52 = l_Lean_Elab_Term_getMainModule___rarg(x_11, x_51); +x_53 = lean_ctor_get(x_52, 1); +lean_inc(x_53); +lean_dec(x_52); +x_54 = lean_array_push(x_40, x_48); +x_55 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_55, 0, x_49); +lean_ctor_set(x_55, 1, x_54); +x_56 = lean_ctor_get(x_2, 2); +x_57 = lean_nat_add(x_4, x_56); +lean_dec(x_4); +x_3 = x_18; +x_4 = x_57; +x_5 = x_55; +x_12 = x_53; +goto _start; +} +} +else +{ +lean_object* x_59; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_59 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_59, 0, x_5); +lean_ctor_set(x_59, 1, x_12); +return x_59; +} +} +else +{ +lean_object* x_60; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_5); +lean_ctor_set(x_60, 1, x_12); +return x_60; +} +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_IO_Prim_fopenFlags___closed__4; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +_start: +{ +lean_object* x_17; uint8_t x_18; +x_17 = lean_ctor_get(x_6, 1); +x_18 = lean_nat_dec_le(x_17, x_8); +if (x_18 == 0) +{ +lean_object* x_19; uint8_t x_20; +x_19 = lean_unsigned_to_nat(0u); +x_20 = lean_nat_dec_eq(x_7, x_19); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_30; +x_21 = lean_unsigned_to_nat(1u); +x_22 = lean_nat_sub(x_7, x_21); +lean_dec(x_7); +x_30 = !lean_is_exclusive(x_9); +if (x_30 == 0) +{ +lean_object* x_31; uint8_t x_32; +x_31 = lean_ctor_get(x_9, 1); +x_32 = !lean_is_exclusive(x_31); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_33 = lean_ctor_get(x_9, 0); +x_34 = lean_ctor_get(x_31, 0); +x_35 = lean_ctor_get(x_31, 1); +x_36 = lean_nat_add(x_5, x_8); +x_37 = l_Lean_instInhabitedExpr; +x_38 = lean_array_get(x_37, x_3, x_36); +lean_dec(x_36); +x_39 = l_Lean_Expr_fvarId_x21(x_38); +x_40 = l_Lean_Expr_hasAnyFVar_visit___at_Lean_Expr_containsFVar___spec__1(x_39, x_4); +lean_dec(x_39); +if (x_40 == 0) +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_41 = l_Array_myMacro____x40_Init_Data_Array_Subarray___hyg_905____closed__4; +x_42 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_41, x_14, x_15, x_16); +x_43 = lean_ctor_get(x_42, 0); +lean_inc(x_43); +x_44 = lean_ctor_get(x_42, 1); +lean_inc(x_44); +lean_dec(x_42); +x_45 = lean_mk_syntax_ident(x_43); +x_46 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5___closed__1; +x_47 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_46, x_14, x_15, x_44); +x_48 = lean_ctor_get(x_47, 0); +lean_inc(x_48); +x_49 = lean_ctor_get(x_47, 1); +lean_inc(x_49); +lean_dec(x_47); +x_50 = lean_mk_syntax_ident(x_48); +lean_inc(x_45); +x_51 = lean_array_push(x_33, x_45); +lean_inc(x_50); +x_52 = lean_array_push(x_34, x_50); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +x_53 = l_Lean_Meta_inferType(x_38, x_12, x_13, x_14, x_15, x_49); +if (lean_obj_tag(x_53) == 0) +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; uint8_t x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_54 = lean_ctor_get(x_53, 0); +lean_inc(x_54); +x_55 = lean_ctor_get(x_53, 1); +lean_inc(x_55); +lean_dec(x_53); +x_56 = lean_ctor_get(x_1, 0); +x_57 = lean_ctor_get(x_56, 0); +x_58 = l_Lean_Expr_isAppOf(x_54, x_57); +lean_dec(x_54); +x_59 = lean_box(x_58); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_50); +lean_ctor_set(x_60, 1, x_59); +x_61 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_61, 0, x_45); +lean_ctor_set(x_61, 1, x_60); +x_62 = lean_array_push(x_35, x_61); +lean_ctor_set(x_31, 1, x_62); +lean_ctor_set(x_31, 0, x_52); +lean_ctor_set(x_9, 0, x_51); +x_63 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_63, 0, x_9); +x_23 = x_63; +x_24 = x_55; +goto block_29; +} +else +{ +uint8_t x_64; +lean_dec(x_52); +lean_dec(x_51); +lean_dec(x_50); +lean_dec(x_45); +lean_free_object(x_31); +lean_dec(x_35); +lean_free_object(x_9); +lean_dec(x_22); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_2); +x_64 = !lean_is_exclusive(x_53); +if (x_64 == 0) +{ +return x_53; +} +else +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_65 = lean_ctor_get(x_53, 0); +x_66 = lean_ctor_get(x_53, 1); +lean_inc(x_66); +lean_inc(x_65); +lean_dec(x_53); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_65); +lean_ctor_set(x_67, 1, x_66); +return x_67; +} +} +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +lean_dec(x_38); +x_68 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_16); +x_69 = lean_ctor_get(x_68, 1); +lean_inc(x_69); +lean_dec(x_68); +x_70 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_69); +x_71 = lean_ctor_get(x_70, 1); +lean_inc(x_71); +lean_dec(x_70); +x_72 = l_myMacro____x40_Init_Notation___hyg_12315____closed__15; +lean_inc(x_2); +x_73 = lean_array_push(x_2, x_72); +x_74 = l_myMacro____x40_Init_Notation___hyg_12315____closed__13; +x_75 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_75, 1, x_73); +lean_inc(x_75); +x_76 = lean_array_push(x_33, x_75); +x_77 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_71); +x_78 = lean_ctor_get(x_77, 1); +lean_inc(x_78); +lean_dec(x_77); +x_79 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_78); +x_80 = lean_ctor_get(x_79, 1); +lean_inc(x_80); +lean_dec(x_79); +x_81 = lean_array_push(x_34, x_75); +lean_ctor_set(x_31, 0, x_81); +lean_ctor_set(x_9, 0, x_76); +x_82 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_82, 0, x_9); +x_23 = x_82; +x_24 = x_80; +goto block_29; +} +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; +x_83 = lean_ctor_get(x_9, 0); +x_84 = lean_ctor_get(x_31, 0); +x_85 = lean_ctor_get(x_31, 1); +lean_inc(x_85); +lean_inc(x_84); +lean_dec(x_31); +x_86 = lean_nat_add(x_5, x_8); +x_87 = l_Lean_instInhabitedExpr; +x_88 = lean_array_get(x_87, x_3, x_86); +lean_dec(x_86); +x_89 = l_Lean_Expr_fvarId_x21(x_88); +x_90 = l_Lean_Expr_hasAnyFVar_visit___at_Lean_Expr_containsFVar___spec__1(x_89, x_4); +lean_dec(x_89); +if (x_90 == 0) +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_91 = l_Array_myMacro____x40_Init_Data_Array_Subarray___hyg_905____closed__4; +x_92 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_91, x_14, x_15, x_16); +x_93 = lean_ctor_get(x_92, 0); +lean_inc(x_93); +x_94 = lean_ctor_get(x_92, 1); +lean_inc(x_94); +lean_dec(x_92); +x_95 = lean_mk_syntax_ident(x_93); +x_96 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5___closed__1; +x_97 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_96, x_14, x_15, x_94); +x_98 = lean_ctor_get(x_97, 0); +lean_inc(x_98); +x_99 = lean_ctor_get(x_97, 1); +lean_inc(x_99); +lean_dec(x_97); +x_100 = lean_mk_syntax_ident(x_98); +lean_inc(x_95); +x_101 = lean_array_push(x_83, x_95); +lean_inc(x_100); +x_102 = lean_array_push(x_84, x_100); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +x_103 = l_Lean_Meta_inferType(x_88, x_12, x_13, x_14, x_15, x_99); +if (lean_obj_tag(x_103) == 0) +{ +lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; uint8_t x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_104 = lean_ctor_get(x_103, 0); +lean_inc(x_104); +x_105 = lean_ctor_get(x_103, 1); +lean_inc(x_105); +lean_dec(x_103); +x_106 = lean_ctor_get(x_1, 0); +x_107 = lean_ctor_get(x_106, 0); +x_108 = l_Lean_Expr_isAppOf(x_104, x_107); +lean_dec(x_104); +x_109 = lean_box(x_108); +x_110 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_110, 0, x_100); +lean_ctor_set(x_110, 1, x_109); +x_111 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_111, 0, x_95); +lean_ctor_set(x_111, 1, x_110); +x_112 = lean_array_push(x_85, x_111); +x_113 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_113, 0, x_102); +lean_ctor_set(x_113, 1, x_112); +lean_ctor_set(x_9, 1, x_113); +lean_ctor_set(x_9, 0, x_101); +x_114 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_114, 0, x_9); +x_23 = x_114; +x_24 = x_105; +goto block_29; +} +else +{ +lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; +lean_dec(x_102); +lean_dec(x_101); +lean_dec(x_100); +lean_dec(x_95); +lean_dec(x_85); +lean_free_object(x_9); +lean_dec(x_22); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_2); +x_115 = lean_ctor_get(x_103, 0); +lean_inc(x_115); +x_116 = lean_ctor_get(x_103, 1); +lean_inc(x_116); +if (lean_is_exclusive(x_103)) { + lean_ctor_release(x_103, 0); + lean_ctor_release(x_103, 1); + x_117 = x_103; +} else { + lean_dec_ref(x_103); + x_117 = lean_box(0); +} +if (lean_is_scalar(x_117)) { + x_118 = lean_alloc_ctor(1, 2, 0); +} else { + x_118 = x_117; +} +lean_ctor_set(x_118, 0, x_115); +lean_ctor_set(x_118, 1, x_116); +return x_118; +} +} +else +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; +lean_dec(x_88); +x_119 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_16); +x_120 = lean_ctor_get(x_119, 1); +lean_inc(x_120); +lean_dec(x_119); +x_121 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_120); +x_122 = lean_ctor_get(x_121, 1); +lean_inc(x_122); +lean_dec(x_121); +x_123 = l_myMacro____x40_Init_Notation___hyg_12315____closed__15; +lean_inc(x_2); +x_124 = lean_array_push(x_2, x_123); +x_125 = l_myMacro____x40_Init_Notation___hyg_12315____closed__13; +x_126 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_126, 0, x_125); +lean_ctor_set(x_126, 1, x_124); +lean_inc(x_126); +x_127 = lean_array_push(x_83, x_126); +x_128 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_122); +x_129 = lean_ctor_get(x_128, 1); +lean_inc(x_129); +lean_dec(x_128); +x_130 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_129); +x_131 = lean_ctor_get(x_130, 1); +lean_inc(x_131); +lean_dec(x_130); +x_132 = lean_array_push(x_84, x_126); +x_133 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_133, 0, x_132); +lean_ctor_set(x_133, 1, x_85); +lean_ctor_set(x_9, 1, x_133); +lean_ctor_set(x_9, 0, x_127); +x_134 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_134, 0, x_9); +x_23 = x_134; +x_24 = x_131; +goto block_29; +} +} +} +else +{ +lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; uint8_t x_144; +x_135 = lean_ctor_get(x_9, 1); +x_136 = lean_ctor_get(x_9, 0); +lean_inc(x_135); +lean_inc(x_136); +lean_dec(x_9); +x_137 = lean_ctor_get(x_135, 0); +lean_inc(x_137); +x_138 = lean_ctor_get(x_135, 1); +lean_inc(x_138); +if (lean_is_exclusive(x_135)) { + lean_ctor_release(x_135, 0); + lean_ctor_release(x_135, 1); + x_139 = x_135; +} else { + lean_dec_ref(x_135); + x_139 = lean_box(0); +} +x_140 = lean_nat_add(x_5, x_8); +x_141 = l_Lean_instInhabitedExpr; +x_142 = lean_array_get(x_141, x_3, x_140); +lean_dec(x_140); +x_143 = l_Lean_Expr_fvarId_x21(x_142); +x_144 = l_Lean_Expr_hasAnyFVar_visit___at_Lean_Expr_containsFVar___spec__1(x_143, x_4); +lean_dec(x_143); +if (x_144 == 0) +{ +lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; +x_145 = l_Array_myMacro____x40_Init_Data_Array_Subarray___hyg_905____closed__4; +x_146 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_145, x_14, x_15, x_16); +x_147 = lean_ctor_get(x_146, 0); +lean_inc(x_147); +x_148 = lean_ctor_get(x_146, 1); +lean_inc(x_148); +lean_dec(x_146); +x_149 = lean_mk_syntax_ident(x_147); +x_150 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5___closed__1; +x_151 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_150, x_14, x_15, x_148); +x_152 = lean_ctor_get(x_151, 0); +lean_inc(x_152); +x_153 = lean_ctor_get(x_151, 1); +lean_inc(x_153); +lean_dec(x_151); +x_154 = lean_mk_syntax_ident(x_152); +lean_inc(x_149); +x_155 = lean_array_push(x_136, x_149); +lean_inc(x_154); +x_156 = lean_array_push(x_137, x_154); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +x_157 = l_Lean_Meta_inferType(x_142, x_12, x_13, x_14, x_15, x_153); +if (lean_obj_tag(x_157) == 0) +{ +lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; uint8_t x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; +x_158 = lean_ctor_get(x_157, 0); +lean_inc(x_158); +x_159 = lean_ctor_get(x_157, 1); +lean_inc(x_159); +lean_dec(x_157); +x_160 = lean_ctor_get(x_1, 0); +x_161 = lean_ctor_get(x_160, 0); +x_162 = l_Lean_Expr_isAppOf(x_158, x_161); +lean_dec(x_158); +x_163 = lean_box(x_162); +x_164 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_164, 0, x_154); +lean_ctor_set(x_164, 1, x_163); +x_165 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_165, 0, x_149); +lean_ctor_set(x_165, 1, x_164); +x_166 = lean_array_push(x_138, x_165); +if (lean_is_scalar(x_139)) { + x_167 = lean_alloc_ctor(0, 2, 0); +} else { + x_167 = x_139; +} +lean_ctor_set(x_167, 0, x_156); +lean_ctor_set(x_167, 1, x_166); +x_168 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_168, 0, x_155); +lean_ctor_set(x_168, 1, x_167); +x_169 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_169, 0, x_168); +x_23 = x_169; +x_24 = x_159; +goto block_29; +} +else +{ +lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; +lean_dec(x_156); +lean_dec(x_155); +lean_dec(x_154); +lean_dec(x_149); +lean_dec(x_139); +lean_dec(x_138); +lean_dec(x_22); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_2); +x_170 = lean_ctor_get(x_157, 0); +lean_inc(x_170); +x_171 = lean_ctor_get(x_157, 1); +lean_inc(x_171); +if (lean_is_exclusive(x_157)) { + lean_ctor_release(x_157, 0); + lean_ctor_release(x_157, 1); + x_172 = x_157; +} else { + lean_dec_ref(x_157); + x_172 = lean_box(0); +} +if (lean_is_scalar(x_172)) { + x_173 = lean_alloc_ctor(1, 2, 0); +} else { + x_173 = x_172; +} +lean_ctor_set(x_173, 0, x_170); +lean_ctor_set(x_173, 1, x_171); +return x_173; +} +} +else +{ +lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; +lean_dec(x_142); +x_174 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_16); +x_175 = lean_ctor_get(x_174, 1); +lean_inc(x_175); +lean_dec(x_174); +x_176 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_175); +x_177 = lean_ctor_get(x_176, 1); +lean_inc(x_177); +lean_dec(x_176); +x_178 = l_myMacro____x40_Init_Notation___hyg_12315____closed__15; +lean_inc(x_2); +x_179 = lean_array_push(x_2, x_178); +x_180 = l_myMacro____x40_Init_Notation___hyg_12315____closed__13; +x_181 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_181, 0, x_180); +lean_ctor_set(x_181, 1, x_179); +lean_inc(x_181); +x_182 = lean_array_push(x_136, x_181); +x_183 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_177); +x_184 = lean_ctor_get(x_183, 1); +lean_inc(x_184); +lean_dec(x_183); +x_185 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_184); +x_186 = lean_ctor_get(x_185, 1); +lean_inc(x_186); +lean_dec(x_185); +x_187 = lean_array_push(x_137, x_181); +if (lean_is_scalar(x_139)) { + x_188 = lean_alloc_ctor(0, 2, 0); +} else { + x_188 = x_139; +} +lean_ctor_set(x_188, 0, x_187); +lean_ctor_set(x_188, 1, x_138); +x_189 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_189, 0, x_182); +lean_ctor_set(x_189, 1, x_188); +x_190 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_190, 0, x_189); +x_23 = x_190; +x_24 = x_186; +goto block_29; +} +} +block_29: +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_23, 0); +lean_inc(x_25); +lean_dec(x_23); +x_26 = lean_ctor_get(x_6, 2); +x_27 = lean_nat_add(x_8, x_26); +lean_dec(x_8); +x_7 = x_22; +x_8 = x_27; +x_9 = x_25; +x_16 = x_24; +goto _start; +} +} +else +{ +lean_object* x_191; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +x_191 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_191, 0, x_9); +lean_ctor_set(x_191, 1, x_16); +return x_191; +} +} +else +{ +lean_object* x_192; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +x_192 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_192, 0, x_9); +lean_ctor_set(x_192, 1, x_16); +return x_192; +} +} +} +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +_start: +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = l_Lean_Core_betaReduce___closed__1; +x_18 = l_Lean_Core_betaReduce___closed__2; +lean_inc(x_15); +lean_inc(x_14); +x_19 = l_Lean_Core_transform___at_Lean_Core_betaReduce___spec__1(x_9, x_17, x_18, x_14, x_15, x_16); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = lean_unsigned_to_nat(0u); +x_23 = lean_unsigned_to_nat(1u); +lean_inc(x_1); +x_24 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_1); +lean_ctor_set(x_24, 2, x_23); +lean_inc_n(x_2, 2); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_2); +lean_ctor_set(x_25, 1, x_2); +lean_inc(x_1); +lean_inc(x_2); +x_26 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__4(x_2, x_24, x_1, x_22, x_25, x_10, x_11, x_12, x_13, x_14, x_15, x_21); +lean_dec(x_24); +x_27 = lean_ctor_get(x_26, 0); +lean_inc(x_27); +x_28 = lean_ctor_get(x_26, 1); +lean_inc(x_28); +lean_dec(x_26); +x_29 = !lean_is_exclusive(x_27); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_30 = lean_ctor_get(x_27, 0); +x_31 = lean_ctor_get(x_27, 1); +x_32 = lean_ctor_get(x_3, 4); +lean_inc(x_32); +lean_dec(x_3); +lean_inc(x_32); +x_33 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_33, 0, x_22); +lean_ctor_set(x_33, 1, x_32); +lean_ctor_set(x_33, 2, x_23); +x_34 = l_Array_empty___closed__1; +lean_ctor_set(x_27, 1, x_34); +lean_ctor_set(x_27, 0, x_31); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_30); +lean_ctor_set(x_35, 1, x_27); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_2); +x_36 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5(x_4, x_2, x_8, x_20, x_1, x_33, x_32, x_22, x_35, x_10, x_11, x_12, x_13, x_14, x_15, x_28); +lean_dec(x_33); +lean_dec(x_1); +lean_dec(x_20); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; uint8_t x_77; +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_37, 1); +lean_inc(x_38); +x_39 = lean_ctor_get(x_36, 1); +lean_inc(x_39); +lean_dec(x_36); +x_40 = lean_ctor_get(x_37, 0); +lean_inc(x_40); +lean_dec(x_37); +x_41 = lean_ctor_get(x_38, 0); +lean_inc(x_41); +x_42 = lean_ctor_get(x_38, 1); +lean_inc(x_42); +lean_dec(x_38); +x_43 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_39); +x_44 = lean_ctor_get(x_43, 1); +lean_inc(x_44); +lean_dec(x_43); +x_45 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_44); +x_46 = lean_ctor_get(x_45, 1); +lean_inc(x_46); +lean_dec(x_45); +x_47 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__46; +lean_inc(x_2); +x_48 = lean_array_push(x_2, x_47); +x_49 = lean_mk_syntax_ident(x_5); +x_50 = lean_array_push(x_48, x_49); +x_51 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__44; +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +lean_inc(x_2); +x_53 = lean_array_push(x_2, x_52); +lean_inc(x_2); +x_54 = l_Array_appendCore___rarg(x_2, x_40); +lean_dec(x_40); +x_55 = l_Lean_nullKind___closed__2; +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_55); +lean_ctor_set(x_56, 1, x_54); +lean_inc(x_53); +x_57 = lean_array_push(x_53, x_56); +x_58 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_58); +lean_ctor_set(x_59, 1, x_57); +x_60 = lean_array_push(x_6, x_59); +x_61 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_46); +x_62 = lean_ctor_get(x_61, 1); +lean_inc(x_62); +lean_dec(x_61); +x_63 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_62); +x_64 = lean_ctor_get(x_63, 1); +lean_inc(x_64); +lean_dec(x_63); +lean_inc(x_2); +x_65 = l_Array_appendCore___rarg(x_2, x_41); +lean_dec(x_41); +x_66 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_66, 0, x_55); +lean_ctor_set(x_66, 1, x_65); +x_67 = lean_array_push(x_53, x_66); +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_58); +lean_ctor_set(x_68, 1, x_67); +x_69 = lean_array_push(x_60, x_68); +x_70 = lean_array_to_list(lean_box(0), x_42); +lean_inc(x_10); +x_71 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(x_7, x_70, x_10, x_11, x_12, x_13, x_14, x_15, x_64); +x_72 = lean_ctor_get(x_71, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_71, 1); +lean_inc(x_73); +lean_dec(x_71); +x_74 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_73); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_10); +x_75 = lean_ctor_get(x_74, 1); +lean_inc(x_75); +lean_dec(x_74); +x_76 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_75); +lean_dec(x_15); +x_77 = !lean_is_exclusive(x_76); +if (x_77 == 0) +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; size_t x_82; size_t x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_78 = lean_ctor_get(x_76, 0); +lean_dec(x_78); +x_79 = l_Lean_myMacro____x40_Init_Notation___hyg_13175____closed__3; +lean_inc(x_2); +x_80 = lean_array_push(x_2, x_79); +x_81 = lean_array_get_size(x_69); +x_82 = lean_usize_of_nat(x_81); +lean_dec(x_81); +x_83 = 0; +x_84 = x_69; +x_85 = l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(x_82, x_83, x_84); +x_86 = x_85; +x_87 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; +x_88 = l_Lean_mkSepArray(x_86, x_87); +lean_dec(x_86); +x_89 = l_Array_appendCore___rarg(x_2, x_88); +lean_dec(x_88); +x_90 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_90, 0, x_55); +lean_ctor_set(x_90, 1, x_89); +x_91 = lean_array_push(x_80, x_90); +x_92 = l_myMacro____x40_Init_Notation___hyg_11187____closed__17; +x_93 = lean_array_push(x_91, x_92); +x_94 = lean_array_push(x_93, x_72); +x_95 = l_Lean_Parser_Term_matchAlt___closed__1; +x_96 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_96, 0, x_95); +lean_ctor_set(x_96, 1, x_94); +lean_ctor_set(x_76, 0, x_96); +return x_76; +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; size_t x_101; size_t x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; +x_97 = lean_ctor_get(x_76, 1); +lean_inc(x_97); +lean_dec(x_76); +x_98 = l_Lean_myMacro____x40_Init_Notation___hyg_13175____closed__3; +lean_inc(x_2); +x_99 = lean_array_push(x_2, x_98); +x_100 = lean_array_get_size(x_69); +x_101 = lean_usize_of_nat(x_100); +lean_dec(x_100); +x_102 = 0; +x_103 = x_69; +x_104 = l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(x_101, x_102, x_103); +x_105 = x_104; +x_106 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; +x_107 = l_Lean_mkSepArray(x_105, x_106); +lean_dec(x_105); +x_108 = l_Array_appendCore___rarg(x_2, x_107); +lean_dec(x_107); +x_109 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_109, 0, x_55); +lean_ctor_set(x_109, 1, x_108); +x_110 = lean_array_push(x_99, x_109); +x_111 = l_myMacro____x40_Init_Notation___hyg_11187____closed__17; +x_112 = lean_array_push(x_110, x_111); +x_113 = lean_array_push(x_112, x_72); +x_114 = l_Lean_Parser_Term_matchAlt___closed__1; +x_115 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_115, 0, x_114); +lean_ctor_set(x_115, 1, x_113); +x_116 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_116, 0, x_115); +lean_ctor_set(x_116, 1, x_97); +return x_116; +} +} +else +{ +uint8_t x_117; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +x_117 = !lean_is_exclusive(x_36); +if (x_117 == 0) +{ +return x_36; +} +else +{ +lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_118 = lean_ctor_get(x_36, 0); +x_119 = lean_ctor_get(x_36, 1); +lean_inc(x_119); +lean_inc(x_118); +lean_dec(x_36); +x_120 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_120, 0, x_118); +lean_ctor_set(x_120, 1, x_119); +return x_120; +} +} +} +else +{ +lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; +x_121 = lean_ctor_get(x_27, 0); +x_122 = lean_ctor_get(x_27, 1); +lean_inc(x_122); +lean_inc(x_121); +lean_dec(x_27); +x_123 = lean_ctor_get(x_3, 4); +lean_inc(x_123); +lean_dec(x_3); +lean_inc(x_123); +x_124 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_124, 0, x_22); +lean_ctor_set(x_124, 1, x_123); +lean_ctor_set(x_124, 2, x_23); +x_125 = l_Array_empty___closed__1; +x_126 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_126, 0, x_122); +lean_ctor_set(x_126, 1, x_125); +x_127 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_127, 0, x_121); +lean_ctor_set(x_127, 1, x_126); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_2); +x_128 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5(x_4, x_2, x_8, x_20, x_1, x_124, x_123, x_22, x_127, x_10, x_11, x_12, x_13, x_14, x_15, x_28); +lean_dec(x_124); +lean_dec(x_1); +lean_dec(x_20); +if (lean_obj_tag(x_128) == 0) +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; size_t x_174; size_t x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; +x_129 = lean_ctor_get(x_128, 0); +lean_inc(x_129); +x_130 = lean_ctor_get(x_129, 1); +lean_inc(x_130); +x_131 = lean_ctor_get(x_128, 1); +lean_inc(x_131); +lean_dec(x_128); +x_132 = lean_ctor_get(x_129, 0); +lean_inc(x_132); +lean_dec(x_129); +x_133 = lean_ctor_get(x_130, 0); +lean_inc(x_133); +x_134 = lean_ctor_get(x_130, 1); +lean_inc(x_134); +lean_dec(x_130); +x_135 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_131); +x_136 = lean_ctor_get(x_135, 1); +lean_inc(x_136); +lean_dec(x_135); +x_137 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_136); +x_138 = lean_ctor_get(x_137, 1); +lean_inc(x_138); +lean_dec(x_137); +x_139 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__46; +lean_inc(x_2); +x_140 = lean_array_push(x_2, x_139); +x_141 = lean_mk_syntax_ident(x_5); +x_142 = lean_array_push(x_140, x_141); +x_143 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__44; +x_144 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_144, 0, x_143); +lean_ctor_set(x_144, 1, x_142); +lean_inc(x_2); +x_145 = lean_array_push(x_2, x_144); +lean_inc(x_2); +x_146 = l_Array_appendCore___rarg(x_2, x_132); +lean_dec(x_132); +x_147 = l_Lean_nullKind___closed__2; +x_148 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_148, 0, x_147); +lean_ctor_set(x_148, 1, x_146); +lean_inc(x_145); +x_149 = lean_array_push(x_145, x_148); +x_150 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_151 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_151, 0, x_150); +lean_ctor_set(x_151, 1, x_149); +x_152 = lean_array_push(x_6, x_151); +x_153 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_138); +x_154 = lean_ctor_get(x_153, 1); +lean_inc(x_154); +lean_dec(x_153); +x_155 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_154); +x_156 = lean_ctor_get(x_155, 1); +lean_inc(x_156); +lean_dec(x_155); +lean_inc(x_2); +x_157 = l_Array_appendCore___rarg(x_2, x_133); +lean_dec(x_133); +x_158 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_158, 0, x_147); +lean_ctor_set(x_158, 1, x_157); +x_159 = lean_array_push(x_145, x_158); +x_160 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_160, 0, x_150); +lean_ctor_set(x_160, 1, x_159); +x_161 = lean_array_push(x_152, x_160); +x_162 = lean_array_to_list(lean_box(0), x_134); +lean_inc(x_10); +x_163 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs(x_7, x_162, x_10, x_11, x_12, x_13, x_14, x_15, x_156); +x_164 = lean_ctor_get(x_163, 0); +lean_inc(x_164); +x_165 = lean_ctor_get(x_163, 1); +lean_inc(x_165); +lean_dec(x_163); +x_166 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_165); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_10); +x_167 = lean_ctor_get(x_166, 1); +lean_inc(x_167); +lean_dec(x_166); +x_168 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_167); +lean_dec(x_15); +x_169 = lean_ctor_get(x_168, 1); +lean_inc(x_169); +if (lean_is_exclusive(x_168)) { + lean_ctor_release(x_168, 0); + lean_ctor_release(x_168, 1); + x_170 = x_168; +} else { + lean_dec_ref(x_168); + x_170 = lean_box(0); +} +x_171 = l_Lean_myMacro____x40_Init_Notation___hyg_13175____closed__3; +lean_inc(x_2); +x_172 = lean_array_push(x_2, x_171); +x_173 = lean_array_get_size(x_161); +x_174 = lean_usize_of_nat(x_173); +lean_dec(x_173); +x_175 = 0; +x_176 = x_161; +x_177 = l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(x_174, x_175, x_176); +x_178 = x_177; +x_179 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; +x_180 = l_Lean_mkSepArray(x_178, x_179); +lean_dec(x_178); +x_181 = l_Array_appendCore___rarg(x_2, x_180); +lean_dec(x_180); +x_182 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_182, 0, x_147); +lean_ctor_set(x_182, 1, x_181); +x_183 = lean_array_push(x_172, x_182); +x_184 = l_myMacro____x40_Init_Notation___hyg_11187____closed__17; +x_185 = lean_array_push(x_183, x_184); +x_186 = lean_array_push(x_185, x_164); +x_187 = l_Lean_Parser_Term_matchAlt___closed__1; +x_188 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_188, 0, x_187); +lean_ctor_set(x_188, 1, x_186); +if (lean_is_scalar(x_170)) { + x_189 = lean_alloc_ctor(0, 2, 0); +} else { + x_189 = x_170; +} +lean_ctor_set(x_189, 0, x_188); +lean_ctor_set(x_189, 1, x_169); +return x_189; +} +else +{ +lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +x_190 = lean_ctor_get(x_128, 0); +lean_inc(x_190); +x_191 = lean_ctor_get(x_128, 1); +lean_inc(x_191); +if (lean_is_exclusive(x_128)) { + lean_ctor_release(x_128, 0); + lean_ctor_release(x_128, 1); + x_192 = x_128; +} else { + lean_dec_ref(x_128); + x_192 = lean_box(0); +} +if (lean_is_scalar(x_192)) { + x_193 = lean_alloc_ctor(1, 2, 0); +} else { + x_193 = x_192; +} +lean_ctor_set(x_193, 0, x_190); +lean_ctor_set(x_193, 1, x_191); +return x_193; +} +} +} +else +{ +uint8_t x_194; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_194 = !lean_is_exclusive(x_19); +if (x_194 == 0) +{ +return x_19; +} +else +{ +lean_object* x_195; lean_object* x_196; lean_object* x_197; +x_195 = lean_ctor_get(x_19, 0); +x_196 = lean_ctor_get(x_19, 1); +lean_inc(x_196); +lean_inc(x_195); +lean_dec(x_19); +x_197 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_197, 0, x_195); +lean_ctor_set(x_197, 1, x_196); +return x_197; +} +} +} +} +static lean_object* _init_l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instInhabitedSourceInfo___closed__1; +x_2 = l_Lean_getBuiltinSearchPath___closed__1; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_mkDecIsFalse___closed__2; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__2; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +_start: +{ +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_15; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_7); +lean_ctor_set(x_15, 1, x_14); +return x_15; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +x_16 = lean_ctor_get(x_6, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_6, 1); +lean_inc(x_17); +lean_dec(x_6); +x_23 = lean_ctor_get(x_1, 1); +lean_inc(x_23); +x_24 = lean_ctor_get(x_1, 2); +lean_inc(x_24); +x_25 = lean_unsigned_to_nat(0u); +x_26 = lean_unsigned_to_nat(1u); +lean_inc(x_24); +x_27 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_24); +lean_ctor_set(x_27, 2, x_26); +lean_inc_n(x_3, 2); +x_28 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__3(x_3, x_27, x_24, x_25, x_3, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +lean_dec(x_27); +x_29 = lean_ctor_get(x_28, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_28, 1); +lean_inc(x_30); +lean_dec(x_28); +x_31 = lean_name_eq(x_4, x_16); +if (x_31 == 0) +{ +lean_object* x_32; +lean_dec(x_23); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_16); +lean_inc(x_4); +x_32 = l_Lean_Meta_compatibleCtors(x_4, x_16, x_10, x_11, x_12, x_13, x_30); +if (lean_obj_tag(x_32) == 0) +{ +lean_object* x_33; uint8_t x_34; +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +x_34 = lean_unbox(x_33); +lean_dec(x_33); +if (x_34 == 0) +{ +lean_object* x_35; lean_object* x_36; +lean_dec(x_29); +lean_dec(x_16); +x_35 = lean_ctor_get(x_32, 1); +lean_inc(x_35); +lean_dec(x_32); +x_36 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_36, 0, x_7); +x_18 = x_36; +x_19 = x_35; +goto block_22; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; size_t x_142; size_t x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; +x_37 = lean_ctor_get(x_32, 1); +lean_inc(x_37); +lean_dec(x_32); +x_38 = l_Lean_Elab_Term_getCurrMacroScope(x_8, x_9, x_10, x_11, x_12, x_13, x_37); +x_39 = lean_ctor_get(x_38, 1); +lean_inc(x_39); +lean_dec(x_38); +x_40 = l_Lean_Elab_Term_getMainModule___rarg(x_13, x_39); +x_41 = lean_ctor_get(x_40, 1); +lean_inc(x_41); +lean_dec(x_40); +lean_inc(x_4); +x_42 = lean_mk_syntax_ident(x_4); +lean_inc(x_3); +x_43 = lean_array_push(x_3, x_42); +x_44 = l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__1; +lean_inc(x_3); +x_45 = lean_array_push(x_3, x_44); +x_46 = l_Lean_Parser_Term_ellipsis___elambda__1___closed__2; +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_45); +lean_inc(x_3); +x_48 = lean_array_push(x_3, x_47); +x_49 = l_Lean_nullKind___closed__2; +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_48); +lean_inc(x_50); +x_51 = lean_array_push(x_43, x_50); +x_52 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_51); +x_54 = l_Lean_Elab_Term_getCurrMacroScope(x_8, x_9, x_10, x_11, x_12, x_13, x_41); +x_55 = lean_ctor_get(x_54, 1); +lean_inc(x_55); +lean_dec(x_54); +x_56 = l_Lean_Elab_Term_getMainModule___rarg(x_13, x_55); +x_57 = lean_ctor_get(x_56, 1); +lean_inc(x_57); +lean_dec(x_56); +x_58 = lean_mk_syntax_ident(x_16); +lean_inc(x_3); +x_59 = lean_array_push(x_3, x_58); +x_60 = lean_array_push(x_59, x_50); +x_61 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_61, 0, x_52); +lean_ctor_set(x_61, 1, x_60); +x_62 = l_Lean_Syntax_mkApp___closed__1; +x_63 = lean_array_push(x_62, x_53); +x_64 = lean_array_push(x_63, x_61); +x_65 = l_Array_append___rarg(x_29, x_64); +lean_dec(x_64); +x_66 = l_Lean_Elab_Term_getCurrMacroScope(x_8, x_9, x_10, x_11, x_12, x_13, x_57); +x_67 = lean_ctor_get(x_66, 0); +lean_inc(x_67); +x_68 = lean_ctor_get(x_66, 1); +lean_inc(x_68); +lean_dec(x_66); +x_69 = l_Lean_Elab_Term_getMainModule___rarg(x_13, x_68); +x_70 = lean_ctor_get(x_69, 0); +lean_inc(x_70); +x_71 = lean_ctor_get(x_69, 1); +lean_inc(x_71); +lean_dec(x_69); +x_72 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21; +lean_inc(x_67); +lean_inc(x_70); +x_73 = l_Lean_addMacroScope(x_70, x_72, x_67); +x_74 = lean_box(0); +x_75 = l_Lean_instInhabitedSourceInfo___closed__1; +x_76 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20; +x_77 = l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__3; +x_78 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_78, 0, x_75); +lean_ctor_set(x_78, 1, x_76); +lean_ctor_set(x_78, 2, x_73); +lean_ctor_set(x_78, 3, x_77); +lean_inc(x_3); +x_79 = lean_array_push(x_3, x_78); +x_80 = l_myMacro____x40_Init_Notation___hyg_658____closed__7; +lean_inc(x_3); +x_81 = lean_array_push(x_3, x_80); +x_82 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__13; +lean_inc(x_3); +x_83 = lean_array_push(x_3, x_82); +x_84 = l_myMacro____x40_Init_NotationExtra___hyg_2680____closed__9; +lean_inc(x_3); +x_85 = lean_array_push(x_3, x_84); +x_86 = l_Lean_Elab_Tactic_evalIntro___closed__4; +x_87 = l_Lean_addMacroScope(x_70, x_86, x_67); +x_88 = l_Lean_Elab_Tactic_evalIntro___closed__3; +x_89 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_89, 0, x_75); +lean_ctor_set(x_89, 1, x_88); +lean_ctor_set(x_89, 2, x_87); +lean_ctor_set(x_89, 3, x_74); +lean_inc(x_89); +lean_inc(x_3); +x_90 = lean_array_push(x_3, x_89); +x_91 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_91, 0, x_49); +lean_ctor_set(x_91, 1, x_90); +x_92 = lean_array_push(x_85, x_91); +x_93 = l_Lean_Parser_Tactic_intro___closed__4; +x_94 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_94, 0, x_93); +lean_ctor_set(x_94, 1, x_92); +lean_inc(x_3); +x_95 = lean_array_push(x_3, x_94); +x_96 = l_myMacro____x40_Init_Notation___hyg_12942____closed__16; +lean_inc(x_3); +x_97 = lean_array_push(x_3, x_96); +x_98 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_98, 0, x_49); +lean_ctor_set(x_98, 1, x_97); +x_99 = lean_array_push(x_95, x_98); +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_49); +lean_ctor_set(x_100, 1, x_99); +lean_inc(x_3); +x_101 = lean_array_push(x_3, x_100); +x_102 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__28; +lean_inc(x_3); +x_103 = lean_array_push(x_3, x_102); +x_104 = lean_array_push(x_103, x_89); +lean_inc(x_3); +x_105 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_105, 0, x_49); +lean_ctor_set(x_105, 1, x_3); +lean_inc(x_105); +x_106 = lean_array_push(x_104, x_105); +x_107 = l_Lean_Parser_Tactic_injection___closed__2; +x_108 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_108, 0, x_107); +lean_ctor_set(x_108, 1, x_106); +lean_inc(x_3); +x_109 = lean_array_push(x_3, x_108); +lean_inc(x_105); +x_110 = lean_array_push(x_109, x_105); +x_111 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_111, 0, x_49); +lean_ctor_set(x_111, 1, x_110); +x_112 = lean_array_push(x_101, x_111); +x_113 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_113, 0, x_49); +lean_ctor_set(x_113, 1, x_112); +lean_inc(x_3); +x_114 = lean_array_push(x_3, x_113); +x_115 = l___private_Init_Notation_0__Lean_Parser_Tactic_withCheapRefl___closed__5; +x_116 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_116, 0, x_115); +lean_ctor_set(x_116, 1, x_114); +lean_inc(x_3); +x_117 = lean_array_push(x_3, x_116); +x_118 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_14110____closed__3; +x_119 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_119, 0, x_118); +lean_ctor_set(x_119, 1, x_117); +x_120 = lean_array_push(x_83, x_119); +x_121 = l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__2; +x_122 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_122, 0, x_121); +lean_ctor_set(x_122, 1, x_120); +lean_inc(x_3); +x_123 = lean_array_push(x_3, x_122); +x_124 = lean_array_push(x_123, x_105); +x_125 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_125, 0, x_49); +lean_ctor_set(x_125, 1, x_124); +x_126 = lean_array_push(x_81, x_125); +x_127 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_128 = lean_array_push(x_126, x_127); +x_129 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_130 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_130, 0, x_129); +lean_ctor_set(x_130, 1, x_128); +lean_inc(x_3); +x_131 = lean_array_push(x_3, x_130); +x_132 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_132, 0, x_49); +lean_ctor_set(x_132, 1, x_131); +x_133 = lean_array_push(x_79, x_132); +x_134 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_134, 0, x_52); +lean_ctor_set(x_134, 1, x_133); +x_135 = l_Lean_Elab_Term_getCurrMacroScope(x_8, x_9, x_10, x_11, x_12, x_13, x_71); +x_136 = lean_ctor_get(x_135, 1); +lean_inc(x_136); +lean_dec(x_135); +x_137 = l_Lean_Elab_Term_getMainModule___rarg(x_13, x_136); +x_138 = lean_ctor_get(x_137, 1); +lean_inc(x_138); +lean_dec(x_137); +x_139 = l_Lean_myMacro____x40_Init_Notation___hyg_13175____closed__3; +lean_inc(x_3); +x_140 = lean_array_push(x_3, x_139); +x_141 = lean_array_get_size(x_65); +x_142 = lean_usize_of_nat(x_141); +lean_dec(x_141); +x_143 = 0; +x_144 = x_65; +x_145 = l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(x_142, x_143, x_144); +x_146 = x_145; +x_147 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; +x_148 = l_Lean_mkSepArray(x_146, x_147); +lean_dec(x_146); +lean_inc(x_3); +x_149 = l_Array_appendCore___rarg(x_3, x_148); +lean_dec(x_148); +x_150 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_150, 0, x_49); +lean_ctor_set(x_150, 1, x_149); +x_151 = lean_array_push(x_140, x_150); +x_152 = l_myMacro____x40_Init_Notation___hyg_11187____closed__17; +x_153 = lean_array_push(x_151, x_152); +x_154 = lean_array_push(x_153, x_134); +x_155 = l_Lean_Parser_Term_matchAlt___closed__1; +x_156 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_156, 0, x_155); +lean_ctor_set(x_156, 1, x_154); +x_157 = lean_array_push(x_7, x_156); +x_158 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_158, 0, x_157); +x_18 = x_158; +x_19 = x_138; +goto block_22; +} +} +else +{ +uint8_t x_159; +lean_dec(x_29); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_159 = !lean_is_exclusive(x_32); +if (x_159 == 0) +{ +return x_32; +} +else +{ +lean_object* x_160; lean_object* x_161; lean_object* x_162; +x_160 = lean_ctor_get(x_32, 0); +x_161 = lean_ctor_get(x_32, 1); +lean_inc(x_161); +lean_inc(x_160); +lean_dec(x_32); +x_162 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_162, 0, x_160); +lean_ctor_set(x_162, 1, x_161); +return x_162; +} +} +} +else +{ +lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; +lean_dec(x_16); +x_163 = lean_ctor_get(x_5, 0); +lean_inc(x_163); +x_164 = lean_ctor_get(x_163, 2); +lean_inc(x_164); +lean_dec(x_163); +lean_inc(x_2); +lean_inc(x_4); +lean_inc(x_1); +lean_inc(x_5); +lean_inc(x_3); +x_165 = lean_alloc_closure((void*)(l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___lambda__1___boxed), 16, 7); +lean_closure_set(x_165, 0, x_23); +lean_closure_set(x_165, 1, x_3); +lean_closure_set(x_165, 2, x_5); +lean_closure_set(x_165, 3, x_1); +lean_closure_set(x_165, 4, x_4); +lean_closure_set(x_165, 5, x_29); +lean_closure_set(x_165, 6, x_2); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_166 = l_Lean_Meta_forallTelescopeReducing___at_Lean_Elab_Deriving_mkInductArgNames___spec__3___rarg(x_164, x_165, x_8, x_9, x_10, x_11, x_12, x_13, x_30); +if (lean_obj_tag(x_166) == 0) +{ +lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; +x_167 = lean_ctor_get(x_166, 0); +lean_inc(x_167); +x_168 = lean_ctor_get(x_166, 1); +lean_inc(x_168); +lean_dec(x_166); +x_169 = lean_array_push(x_7, x_167); +x_170 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_170, 0, x_169); +x_18 = x_170; +x_19 = x_168; +goto block_22; +} +else +{ +uint8_t x_171; +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_171 = !lean_is_exclusive(x_166); +if (x_171 == 0) +{ +return x_166; +} +else +{ +lean_object* x_172; lean_object* x_173; lean_object* x_174; +x_172 = lean_ctor_get(x_166, 0); +x_173 = lean_ctor_get(x_166, 1); +lean_inc(x_173); +lean_inc(x_172); +lean_dec(x_166); +x_174 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_174, 0, x_172); +lean_ctor_set(x_174, 1, x_173); +return x_174; +} +} +} +block_22: +{ +lean_object* x_20; +x_20 = lean_ctor_get(x_18, 0); +lean_inc(x_20); +lean_dec(x_18); +x_6 = x_17; +x_7 = x_20; +x_14 = x_19; +goto _start; +} +} +} +} +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_14; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_6); +lean_ctor_set(x_14, 1, x_13); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_5, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_5, 1); +lean_inc(x_16); +lean_dec(x_5); +lean_inc(x_7); +lean_inc(x_15); +x_17 = l_Lean_getConstInfoCtor___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__1(x_15, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_dec(x_17); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_20 = l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6(x_1, x_2, x_3, x_15, x_18, x_4, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_19); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +x_5 = x_16; +x_6 = x_21; +x_13 = x_22; +goto _start; +} +else +{ +uint8_t x_24; +lean_dec(x_16); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_24 = !lean_is_exclusive(x_20); +if (x_24 == 0) +{ +return x_20; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_20, 0); +x_26 = lean_ctor_get(x_20, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_20); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_26); +return x_27; +} +} +} +else +{ +uint8_t x_28; +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_28 = !lean_is_exclusive(x_17); +if (x_28 == 0) +{ +return x_17; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_17, 0); +x_30 = lean_ctor_get(x_17, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_17); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_ctor_get(x_1, 4); +lean_inc(x_10); +x_11 = l_Array_empty___closed__1; +lean_inc(x_10); +x_12 = l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__7(x_1, x_2, x_11, x_10, x_10, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +return x_12; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_12, 0); +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_12); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +else +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_12); +if (x_17 == 0) +{ +return x_12; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_12, 0); +x_19 = lean_ctor_get(x_12, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_12); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; +} +} +} +} +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_9; +} +} +lean_object* l_Lean_getConstInfoCtor___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_getConstInfoCtor___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_9; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +_start: +{ +lean_object* x_13; +x_13 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_2); +return x_13; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +_start: +{ +lean_object* x_13; +x_13 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__4(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_2); +return x_13; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +_start: +{ +lean_object* x_17; +x_17 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_17; +} +} +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +_start: +{ +lean_object* x_17; +x_17 = l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_4); +return x_17; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +lean_inc(x_2); +x_12 = l_Lean_Elab_Deriving_Binary_mkDiscrs(x_1, x_2, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_12, 1); +lean_inc(x_14); +lean_dec(x_12); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_15 = l_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts(x_2, x_3, x_5, x_6, x_7, x_8, x_9, x_10, x_14); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = l_Lean_Elab_Term_getCurrMacroScope(x_5, x_6, x_7, x_8, x_9, x_10, x_17); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_19 = lean_ctor_get(x_18, 1); +lean_inc(x_19); +lean_dec(x_18); +x_20 = l_Lean_Elab_Term_getMainModule___rarg(x_10, x_19); +lean_dec(x_10); +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; size_t x_24; size_t x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_22 = lean_ctor_get(x_20, 0); +lean_dec(x_22); +x_23 = lean_array_get_size(x_13); +x_24 = lean_usize_of_nat(x_23); +lean_dec(x_23); +x_25 = 0; +x_26 = x_13; +x_27 = l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(x_24, x_25, x_26); +x_28 = x_27; +x_29 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; +x_30 = l_Lean_mkSepArray(x_28, x_29); +lean_dec(x_28); +x_31 = l_Array_empty___closed__1; +x_32 = l_Array_appendCore___rarg(x_31, x_30); +lean_dec(x_30); +x_33 = l_Lean_nullKind___closed__2; +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_33); +lean_ctor_set(x_34, 1, x_32); +x_35 = l_Lean_Elab_Term_expandFunBinders_loop___closed__2; +x_36 = lean_array_push(x_35, x_34); +x_37 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_38 = lean_array_push(x_36, x_37); +x_39 = l_Lean_Elab_Term_expandFunBinders_loop___closed__4; +x_40 = lean_array_push(x_38, x_39); +x_41 = l_Array_appendCore___rarg(x_31, x_16); +lean_dec(x_16); +x_42 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_42, 0, x_33); +lean_ctor_set(x_42, 1, x_41); +x_43 = lean_array_push(x_31, x_42); +x_44 = l_Lean_Parser_Term_matchAlts___elambda__1___closed__1; +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_43); +x_46 = lean_array_push(x_40, x_45); +x_47 = l_Lean_Parser_Term_match___elambda__1___closed__1; +x_48 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_46); +lean_ctor_set(x_20, 0, x_48); +return x_20; +} +else +{ +lean_object* x_49; lean_object* x_50; size_t x_51; size_t x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_49 = lean_ctor_get(x_20, 1); +lean_inc(x_49); +lean_dec(x_20); +x_50 = lean_array_get_size(x_13); +x_51 = lean_usize_of_nat(x_50); +lean_dec(x_50); +x_52 = 0; +x_53 = x_13; +x_54 = l_Array_mapMUnsafe_map___at_myMacro____x40_Init_NotationExtra___hyg_2986____spec__3(x_51, x_52, x_53); +x_55 = x_54; +x_56 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__6; +x_57 = l_Lean_mkSepArray(x_55, x_56); +lean_dec(x_55); +x_58 = l_Array_empty___closed__1; +x_59 = l_Array_appendCore___rarg(x_58, x_57); +lean_dec(x_57); +x_60 = l_Lean_nullKind___closed__2; +x_61 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_61, 0, x_60); +lean_ctor_set(x_61, 1, x_59); +x_62 = l_Lean_Elab_Term_expandFunBinders_loop___closed__2; +x_63 = lean_array_push(x_62, x_61); +x_64 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_65 = lean_array_push(x_63, x_64); +x_66 = l_Lean_Elab_Term_expandFunBinders_loop___closed__4; +x_67 = lean_array_push(x_65, x_66); +x_68 = l_Array_appendCore___rarg(x_58, x_16); +lean_dec(x_16); +x_69 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_69, 0, x_60); +lean_ctor_set(x_69, 1, x_68); +x_70 = lean_array_push(x_58, x_69); +x_71 = l_Lean_Parser_Term_matchAlts___elambda__1___closed__1; +x_72 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_72, 0, x_71); +lean_ctor_set(x_72, 1, x_70); +x_73 = lean_array_push(x_67, x_72); +x_74 = l_Lean_Parser_Term_match___elambda__1___closed__1; +x_75 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_75, 1, x_73); +x_76 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_49); +return x_76; +} +} +else +{ +uint8_t x_77; +lean_dec(x_13); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_77 = !lean_is_exclusive(x_15); +if (x_77 == 0) +{ +return x_15; +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = lean_ctor_get(x_15, 0); +x_79 = lean_ctor_get(x_15, 1); +lean_inc(x_79); +lean_inc(x_78); +lean_dec(x_15); +x_80 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_80, 0, x_78); +lean_ctor_set(x_80, 1, x_79); +return x_80; +} +} +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_DecEq_mkMatch___rarg___boxed), 11, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +lean_object* x_12; +x_12 = l_Lean_Elab_Deriving_DecEq_mkMatch___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_4); +return x_12; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkMatch___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_Deriving_DecEq_mkMatch(x_1); +lean_dec(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_mkDecIsTrue___closed__1; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_mkDecIsTrue___closed__1; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__1; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_mkDecIsTrue___closed__2; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__3; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_261____closed__19; +x_2 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instInhabitedSourceInfo___closed__1; +x_2 = l_Lean_Elab_instToStringVisibility___closed__2; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__6; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_elabModifiers___rarg___lambda__3___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__7; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__8; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_nullKind___closed__2; +x_2 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__9; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__5; +x_2 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__10; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__12() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__11; +x_2 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__13() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__12; +x_2 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__14() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__13; +x_2 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__15() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__7; +x_2 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__14; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__16() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__15; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_9 = lean_ctor_get(x_1, 1); +x_10 = l_Lean_instInhabitedName; +x_11 = lean_unsigned_to_nat(0u); +x_12 = lean_array_get(x_10, x_9, x_11); +x_13 = lean_ctor_get(x_1, 0); +x_14 = l_Lean_instInhabitedInductiveVal; +x_15 = lean_array_get(x_14, x_13, x_11); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_15); +x_16 = l_Lean_Elab_Deriving_DecEq_mkHeader___rarg(x_15, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_16) == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_ctor_get(x_16, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_16, 1); +lean_inc(x_18); +lean_dec(x_16); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_12); +lean_inc(x_17); +x_20 = l_Lean_Elab_Deriving_DecEq_mkMatch___rarg(x_17, x_15, x_12, x_19, x_2, x_3, x_4, x_5, x_6, x_7, x_18); +lean_dec(x_19); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; uint8_t x_67; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +x_23 = lean_ctor_get(x_17, 0); +lean_inc(x_23); +x_24 = l_Lean_Elab_Term_getCurrMacroScope(x_2, x_3, x_4, x_5, x_6, x_7, x_22); +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +x_27 = l_Lean_Elab_Term_getMainModule___rarg(x_7, x_26); +x_28 = lean_ctor_get(x_27, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +x_30 = l_Lean_mkDecIsTrue___closed__2; +x_31 = l_Lean_addMacroScope(x_28, x_30, x_25); +x_32 = l_Lean_instInhabitedSourceInfo___closed__1; +x_33 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__2; +x_34 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__4; +x_35 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_35, 0, x_32); +lean_ctor_set(x_35, 1, x_33); +lean_ctor_set(x_35, 2, x_31); +lean_ctor_set(x_35, 3, x_34); +x_36 = l_Array_empty___closed__1; +x_37 = lean_array_push(x_36, x_35); +x_38 = lean_ctor_get(x_17, 2); +lean_inc(x_38); +x_39 = lean_mk_syntax_ident(x_38); +x_40 = lean_array_push(x_36, x_39); +x_41 = l___private_Init_NotationExtra_0__Lean_mkHintBody___closed__2; +x_42 = lean_array_push(x_40, x_41); +x_43 = lean_ctor_get(x_17, 3); +lean_inc(x_43); +lean_dec(x_17); +x_44 = lean_mk_syntax_ident(x_43); +x_45 = lean_array_push(x_42, x_44); +x_46 = l_term___x3d_____closed__2; +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_45); +x_48 = lean_array_push(x_36, x_47); +x_49 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_50 = lean_array_push(x_48, x_49); +x_51 = l_Lean_nullKind___closed__2; +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +x_53 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +x_54 = lean_array_push(x_53, x_52); +x_55 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_56 = lean_array_push(x_54, x_55); +x_57 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_56); +x_59 = lean_array_push(x_36, x_58); +x_60 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_60, 0, x_51); +lean_ctor_set(x_60, 1, x_59); +x_61 = lean_array_push(x_37, x_60); +x_62 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_63 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_61); +x_64 = l_Lean_Elab_Term_getCurrMacroScope(x_2, x_3, x_4, x_5, x_6, x_7, x_29); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +lean_dec(x_64); +x_66 = l_Lean_Elab_Term_getMainModule___rarg(x_7, x_65); +lean_dec(x_7); +x_67 = !lean_is_exclusive(x_66); +if (x_67 == 0) +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_68 = lean_ctor_get(x_66, 0); +lean_dec(x_68); +x_69 = lean_mk_syntax_ident(x_12); +x_70 = lean_array_push(x_36, x_69); +x_71 = lean_array_push(x_70, x_49); +x_72 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__29; +x_73 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_73, 0, x_72); +lean_ctor_set(x_73, 1, x_71); +x_74 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__27; +x_75 = lean_array_push(x_74, x_73); +x_76 = l_Array_appendCore___rarg(x_36, x_23); +lean_dec(x_23); +x_77 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_77, 0, x_51); +lean_ctor_set(x_77, 1, x_76); +x_78 = lean_array_push(x_36, x_77); +x_79 = l_myMacro____x40_Init_Notation___hyg_12315____closed__11; +x_80 = lean_array_push(x_79, x_63); +x_81 = l_Lean_expandExplicitBindersAux_loop___closed__8; +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_80); +x_83 = lean_array_push(x_36, x_82); +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_51); +lean_ctor_set(x_84, 1, x_83); +x_85 = lean_array_push(x_78, x_84); +x_86 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__31; +x_87 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_85); +x_88 = lean_array_push(x_75, x_87); +x_89 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_16099____closed__5; +x_90 = lean_array_push(x_89, x_21); +x_91 = lean_array_push(x_90, x_49); +x_92 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__50; +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_92); +lean_ctor_set(x_93, 1, x_91); +x_94 = lean_array_push(x_88, x_93); +x_95 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__25; +x_96 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_96, 0, x_95); +lean_ctor_set(x_96, 1, x_94); +x_97 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__16; +x_98 = lean_array_push(x_97, x_96); +x_99 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__5; +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_99); +lean_ctor_set(x_100, 1, x_98); +lean_ctor_set(x_66, 0, x_100); +return x_66; +} +else +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; +x_101 = lean_ctor_get(x_66, 1); +lean_inc(x_101); +lean_dec(x_66); +x_102 = lean_mk_syntax_ident(x_12); +x_103 = lean_array_push(x_36, x_102); +x_104 = lean_array_push(x_103, x_49); +x_105 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__29; +x_106 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_106, 0, x_105); +lean_ctor_set(x_106, 1, x_104); +x_107 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__27; +x_108 = lean_array_push(x_107, x_106); +x_109 = l_Array_appendCore___rarg(x_36, x_23); +lean_dec(x_23); +x_110 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_110, 0, x_51); +lean_ctor_set(x_110, 1, x_109); +x_111 = lean_array_push(x_36, x_110); +x_112 = l_myMacro____x40_Init_Notation___hyg_12315____closed__11; +x_113 = lean_array_push(x_112, x_63); +x_114 = l_Lean_expandExplicitBindersAux_loop___closed__8; +x_115 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_115, 0, x_114); +lean_ctor_set(x_115, 1, x_113); +x_116 = lean_array_push(x_36, x_115); +x_117 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_117, 0, x_51); +lean_ctor_set(x_117, 1, x_116); +x_118 = lean_array_push(x_111, x_117); +x_119 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__31; +x_120 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_120, 0, x_119); +lean_ctor_set(x_120, 1, x_118); +x_121 = lean_array_push(x_108, x_120); +x_122 = l_Lean_Parser_Tactic_myMacro____x40_Init_Notation___hyg_16099____closed__5; +x_123 = lean_array_push(x_122, x_21); +x_124 = lean_array_push(x_123, x_49); +x_125 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__50; +x_126 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_126, 0, x_125); +lean_ctor_set(x_126, 1, x_124); +x_127 = lean_array_push(x_121, x_126); +x_128 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__25; +x_129 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_129, 0, x_128); +lean_ctor_set(x_129, 1, x_127); +x_130 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__16; +x_131 = lean_array_push(x_130, x_129); +x_132 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__5; +x_133 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_133, 0, x_132); +lean_ctor_set(x_133, 1, x_131); +x_134 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_134, 0, x_133); +lean_ctor_set(x_134, 1, x_101); +return x_134; +} +} +else +{ +uint8_t x_135; +lean_dec(x_17); +lean_dec(x_12); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_135 = !lean_is_exclusive(x_20); +if (x_135 == 0) +{ +return x_20; +} +else +{ +lean_object* x_136; lean_object* x_137; lean_object* x_138; +x_136 = lean_ctor_get(x_20, 0); +x_137 = lean_ctor_get(x_20, 1); +lean_inc(x_137); +lean_inc(x_136); +lean_dec(x_20); +x_138 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_138, 0, x_136); +lean_ctor_set(x_138, 1, x_137); +return x_138; +} +} +} +else +{ +uint8_t x_139; +lean_dec(x_15); +lean_dec(x_12); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_139 = !lean_is_exclusive(x_16); +if (x_139 == 0) +{ +return x_16; +} +else +{ +lean_object* x_140; lean_object* x_141; lean_object* x_142; +x_140 = lean_ctor_get(x_16, 0); +x_141 = lean_ctor_get(x_16, 1); +lean_inc(x_141); +lean_inc(x_140); +lean_dec(x_16); +x_142 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_142, 0, x_140); +lean_ctor_set(x_142, 1, x_141); +return x_142; +} +} +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkAuxFunction___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_1); +return x_9; +} +} +lean_object* l_List_map___at_Lean_Elab_Deriving_DecEq_mkDecEqCmds___spec__1(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_2; +x_2 = lean_box(0); +return x_2; +} +else +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_6, 0, x_4); +x_7 = l_List_map___at_Lean_Elab_Deriving_DecEq_mkDecEqCmds___spec__1(x_5); +lean_ctor_set(x_1, 1, x_7); +lean_ctor_set(x_1, 0, x_6); +return x_1; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_ctor_get(x_1, 0); +x_9 = lean_ctor_get(x_1, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_1); +x_10 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_10, 0, x_8); +x_11 = l_List_map___at_Lean_Elab_Deriving_DecEq_mkDecEqCmds___spec__1(x_9); +x_12 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_12, 0, x_10); +lean_ctor_set(x_12, 1, x_11); +return x_12; +} +} +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("decEq"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Deriving_mkContext___closed__2; +x_2 = l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkDecEqCmds(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_1, 0); +lean_inc(x_9); +lean_dec(x_1); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +lean_dec(x_9); +x_11 = l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__1; +lean_inc(x_2); +lean_inc(x_10); +x_12 = l_Lean_Elab_Deriving_mkContext(x_11, x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_12, 1); +lean_inc(x_14); +lean_dec(x_12); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +x_15 = l_Lean_Elab_Deriving_DecEq_mkAuxFunction(x_13, x_2, x_3, x_4, x_5, x_6, x_7, x_14); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = l_Lean_mkOptionalNode___closed__2; +x_19 = lean_array_push(x_18, x_10); +x_20 = l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__2; +x_21 = 0; +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +x_22 = l_Lean_Elab_Deriving_mkInstanceCmds(x_13, x_20, x_19, x_21, x_2, x_3, x_4, x_5, x_6, x_7, x_17); +lean_dec(x_19); +lean_dec(x_13); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; lean_object* x_29; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +if (lean_is_exclusive(x_22)) { + lean_ctor_release(x_22, 0); + lean_ctor_release(x_22, 1); + x_25 = x_22; +} else { + lean_dec_ref(x_22); + x_25 = lean_box(0); +} +x_26 = lean_array_push(x_18, x_16); +x_27 = l_Array_append___rarg(x_26, x_23); +lean_dec(x_23); +x_45 = lean_st_ref_get(x_7, x_24); +x_46 = lean_ctor_get(x_45, 0); +lean_inc(x_46); +x_47 = lean_ctor_get(x_46, 3); +lean_inc(x_47); +lean_dec(x_46); +x_48 = lean_ctor_get_uint8(x_47, sizeof(void*)*1); +lean_dec(x_47); +if (x_48 == 0) +{ +lean_object* x_49; +x_49 = lean_ctor_get(x_45, 1); +lean_inc(x_49); +lean_dec(x_45); +x_28 = x_21; +x_29 = x_49; +goto block_44; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; +x_50 = lean_ctor_get(x_45, 1); +lean_inc(x_50); +lean_dec(x_45); +x_51 = l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__2; +x_52 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_51, x_2, x_3, x_4, x_5, x_6, x_7, x_50); +x_53 = lean_ctor_get(x_52, 0); +lean_inc(x_53); +x_54 = lean_ctor_get(x_52, 1); +lean_inc(x_54); +lean_dec(x_52); +x_55 = lean_unbox(x_53); +lean_dec(x_53); +x_28 = x_55; +x_29 = x_54; +goto block_44; +} +block_44: +{ +if (x_28 == 0) +{ +lean_object* x_30; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +if (lean_is_scalar(x_25)) { + x_30 = lean_alloc_ctor(0, 2, 0); +} else { + x_30 = x_25; +} +lean_ctor_set(x_30, 0, x_27); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; +lean_dec(x_25); +lean_inc(x_27); +x_31 = lean_array_to_list(lean_box(0), x_27); +x_32 = l_List_map___at_Lean_Elab_Deriving_DecEq_mkDecEqCmds___spec__1(x_31); +x_33 = l_Lean_MessageData_ofList(x_32); +lean_dec(x_32); +x_34 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; +x_35 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +x_36 = l_Lean_KernelException_toMessageData___closed__15; +x_37 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_37, 0, x_35); +lean_ctor_set(x_37, 1, x_36); +x_38 = l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__2; +x_39 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_38, x_37, x_2, x_3, x_4, x_5, x_6, x_7, x_29); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_40 = !lean_is_exclusive(x_39); +if (x_40 == 0) +{ +lean_object* x_41; +x_41 = lean_ctor_get(x_39, 0); +lean_dec(x_41); +lean_ctor_set(x_39, 0, x_27); +return x_39; +} +else +{ +lean_object* x_42; lean_object* x_43; +x_42 = lean_ctor_get(x_39, 1); +lean_inc(x_42); +lean_dec(x_39); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_27); +lean_ctor_set(x_43, 1, x_42); +return x_43; +} +} +} +} +else +{ +uint8_t x_56; +lean_dec(x_16); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_56 = !lean_is_exclusive(x_22); +if (x_56 == 0) +{ +return x_22; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_22, 0); +x_58 = lean_ctor_get(x_22, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_22); +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_57); +lean_ctor_set(x_59, 1, x_58); +return x_59; +} +} +} +else +{ +uint8_t x_60; +lean_dec(x_13); +lean_dec(x_10); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_60 = !lean_is_exclusive(x_15); +if (x_60 == 0) +{ +return x_15; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_15, 0); +x_62 = lean_ctor_get(x_15, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_15); +x_63 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_63, 0, x_61); +lean_ctor_set(x_63, 1, x_62); +return x_63; +} +} +} +else +{ +uint8_t x_64; +lean_dec(x_10); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_64 = !lean_is_exclusive(x_12); +if (x_64 == 0) +{ +return x_12; +} +else +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_65 = lean_ctor_get(x_12, 0); +x_66 = lean_ctor_get(x_12, 1); +lean_inc(x_66); +lean_inc(x_65); +lean_dec(x_12); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_65); +lean_ctor_set(x_67, 1, x_66); +return x_67; +} +} +} +} +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_5 = l_Lean_Elab_Command_getRef(x_2, x_3, x_4); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_ctor_get(x_2, 4); +lean_inc(x_8); +lean_inc(x_8); +x_9 = l_Lean_Elab_getBetterRef(x_6, x_8); +lean_dec(x_6); +x_10 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1(x_1, x_2, x_3, x_7); +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l_Lean_Elab_addMacroStack___at_Lean_Elab_Command_instAddErrorMessageContextCommandElabM___spec__1(x_11, x_8, x_2, x_3, x_12); +lean_dec(x_2); +lean_dec(x_8); +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_ctor_get(x_13, 0); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_9); +lean_ctor_set(x_16, 1, x_15); +lean_ctor_set_tag(x_13, 1); +lean_ctor_set(x_13, 0, x_16); +return x_13; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_ctor_get(x_13, 0); +x_18 = lean_ctor_get(x_13, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_13); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_9); +lean_ctor_set(x_19, 1, x_17); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_18); +return x_20; +} +} +} +lean_object* l_Lean_getConstInfo___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_st_ref_get(x_3, x_4); +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_7 = lean_ctor_get(x_5, 0); +x_8 = lean_ctor_get(x_5, 1); +x_9 = lean_ctor_get(x_7, 0); +lean_inc(x_9); +lean_dec(x_7); +lean_inc(x_1); +x_10 = lean_environment_find(x_9, x_1); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +lean_free_object(x_5); +x_11 = lean_box(0); +x_12 = l_Lean_mkConst(x_1, x_11); +x_13 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_13, 0, x_12); +x_14 = l_Lean_throwUnknownConstant___rarg___closed__2; +x_15 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_13); +x_16 = l_Lean_KernelException_toMessageData___closed__3; +x_17 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +x_18 = l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__3(x_17, x_2, x_3, x_8); +return x_18; +} +else +{ +lean_object* x_19; +lean_dec(x_2); +lean_dec(x_1); +x_19 = lean_ctor_get(x_10, 0); +lean_inc(x_19); +lean_dec(x_10); +lean_ctor_set(x_5, 0, x_19); +return x_5; +} +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_20 = lean_ctor_get(x_5, 0); +x_21 = lean_ctor_get(x_5, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_5); +x_22 = lean_ctor_get(x_20, 0); +lean_inc(x_22); +lean_dec(x_20); +lean_inc(x_1); +x_23 = lean_environment_find(x_22, x_1); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_24 = lean_box(0); +x_25 = l_Lean_mkConst(x_1, x_24); +x_26 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_26, 0, x_25); +x_27 = l_Lean_throwUnknownConstant___rarg___closed__2; +x_28 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_26); +x_29 = l_Lean_KernelException_toMessageData___closed__3; +x_30 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +x_31 = l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__3(x_30, x_2, x_3, x_21); +return x_31; +} +else +{ +lean_object* x_32; lean_object* x_33; +lean_dec(x_2); +lean_dec(x_1); +x_32 = lean_ctor_get(x_23, 0); +lean_inc(x_32); +lean_dec(x_23); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_21); +return x_33; +} +} +} +} +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_5 = l_Lean_Elab_Command_getRef(x_2, x_3, x_4); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_ctor_get(x_2, 4); +lean_inc(x_8); +lean_inc(x_8); +x_9 = l_Lean_Elab_getBetterRef(x_6, x_8); +lean_dec(x_6); +x_10 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1(x_1, x_2, x_3, x_7); +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l_Lean_Elab_addMacroStack___at_Lean_Elab_Command_instAddErrorMessageContextCommandElabM___spec__1(x_11, x_8, x_2, x_3, x_12); +lean_dec(x_2); +lean_dec(x_8); +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_ctor_get(x_13, 0); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_9); +lean_ctor_set(x_16, 1, x_15); +lean_ctor_set_tag(x_13, 1); +lean_ctor_set(x_13, 0, x_16); +return x_13; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_ctor_get(x_13, 0); +x_18 = lean_ctor_get(x_13, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_13); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_9); +lean_ctor_set(x_19, 1, x_17); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_18); +return x_20; +} +} +} +lean_object* l_Lean_getConstInfoInduct___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +lean_inc(x_2); +lean_inc(x_1); +x_5 = l_Lean_getConstInfo___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__2(x_1, x_2, x_3, x_4); +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_6; +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 5) +{ +uint8_t x_7; +lean_dec(x_2); +lean_dec(x_1); +x_7 = !lean_is_exclusive(x_5); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; +x_8 = lean_ctor_get(x_5, 0); +lean_dec(x_8); +x_9 = lean_ctor_get(x_6, 0); +lean_inc(x_9); +lean_dec(x_6); +lean_ctor_set(x_5, 0, x_9); +return x_5; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_ctor_get(x_5, 1); +lean_inc(x_10); +lean_dec(x_5); +x_11 = lean_ctor_get(x_6, 0); +lean_inc(x_11); +lean_dec(x_6); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +return x_12; +} +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +lean_dec(x_6); +x_13 = lean_ctor_get(x_5, 1); +lean_inc(x_13); +lean_dec(x_5); +x_14 = lean_box(0); +x_15 = l_Lean_mkConst(x_1, x_14); +x_16 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_16, 0, x_15); +x_17 = l_Lean_KernelException_toMessageData___closed__3; +x_18 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +x_19 = l_Lean_getConstInfoInduct___rarg___lambda__1___closed__2; +x_20 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +x_21 = l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__4(x_20, x_2, x_3, x_13); +return x_21; +} +} +else +{ +uint8_t x_22; +lean_dec(x_2); +lean_dec(x_1); +x_22 = !lean_is_exclusive(x_5); +if (x_22 == 0) +{ +return x_5; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +return x_25; +} +} +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = lean_array_get_size(x_1); +x_6 = lean_unsigned_to_nat(1u); +x_7 = lean_nat_dec_eq(x_5, x_6); +lean_dec(x_5); +if (x_7 == 0) +{ +uint8_t x_8; lean_object* x_9; lean_object* x_10; +lean_dec(x_3); +lean_dec(x_2); +x_8 = 0; +x_9 = lean_box(x_8); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_4); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_11 = l_Lean_instInhabitedName; +x_12 = lean_unsigned_to_nat(0u); +x_13 = lean_array_get(x_11, x_1, x_12); +lean_inc(x_2); +x_14 = l_Lean_getConstInfoInduct___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__1(x_13, x_2, x_3, x_4); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; uint8_t x_16; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get_uint8(x_15, sizeof(void*)*5 + 3); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_ctor_get(x_14, 1); +lean_inc(x_17); +lean_dec(x_14); +x_18 = lean_box(0); +x_19 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_DecEq_mkDecEqCmds), 8, 1); +lean_closure_set(x_19, 0, x_15); +lean_inc(x_2); +x_20 = l_Lean_Elab_Command_liftTermElabM___rarg(x_18, x_19, x_2, x_3, x_17); +if (lean_obj_tag(x_20) == 0) +{ +uint8_t x_21; +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; +x_22 = lean_ctor_get(x_20, 0); +x_23 = lean_ctor_get(x_20, 1); +x_24 = lean_array_get_size(x_22); +x_25 = lean_nat_dec_lt(x_12, x_24); +if (x_25 == 0) +{ +uint8_t x_26; lean_object* x_27; +lean_dec(x_24); +lean_dec(x_22); +lean_dec(x_3); +lean_dec(x_2); +x_26 = 1; +x_27 = lean_box(x_26); +lean_ctor_set(x_20, 0, x_27); +return x_20; +} +else +{ +uint8_t x_28; +x_28 = lean_nat_dec_le(x_24, x_24); +if (x_28 == 0) +{ +uint8_t x_29; lean_object* x_30; +lean_dec(x_24); +lean_dec(x_22); +lean_dec(x_3); +lean_dec(x_2); +x_29 = 1; +x_30 = lean_box(x_29); +lean_ctor_set(x_20, 0, x_30); +return x_20; +} +else +{ +size_t x_31; size_t x_32; lean_object* x_33; lean_object* x_34; +lean_free_object(x_20); +x_31 = 0; +x_32 = lean_usize_of_nat(x_24); +lean_dec(x_24); +x_33 = lean_box(0); +x_34 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Command_elabCommand___spec__11(x_22, x_31, x_32, x_33, x_2, x_3, x_23); +lean_dec(x_2); +lean_dec(x_22); +if (lean_obj_tag(x_34) == 0) +{ +uint8_t x_35; +x_35 = !lean_is_exclusive(x_34); +if (x_35 == 0) +{ +lean_object* x_36; uint8_t x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_34, 0); +lean_dec(x_36); +x_37 = 1; +x_38 = lean_box(x_37); +lean_ctor_set(x_34, 0, x_38); +return x_34; +} +else +{ +lean_object* x_39; uint8_t x_40; lean_object* x_41; lean_object* x_42; +x_39 = lean_ctor_get(x_34, 1); +lean_inc(x_39); +lean_dec(x_34); +x_40 = 1; +x_41 = lean_box(x_40); +x_42 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_39); +return x_42; +} +} +else +{ +uint8_t x_43; +x_43 = !lean_is_exclusive(x_34); +if (x_43 == 0) +{ +return x_34; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_34, 0); +x_45 = lean_ctor_get(x_34, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_34); +x_46 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_46, 0, x_44); +lean_ctor_set(x_46, 1, x_45); +return x_46; +} +} +} +} +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; +x_47 = lean_ctor_get(x_20, 0); +x_48 = lean_ctor_get(x_20, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_20); +x_49 = lean_array_get_size(x_47); +x_50 = lean_nat_dec_lt(x_12, x_49); +if (x_50 == 0) +{ +uint8_t x_51; lean_object* x_52; lean_object* x_53; +lean_dec(x_49); +lean_dec(x_47); +lean_dec(x_3); +lean_dec(x_2); +x_51 = 1; +x_52 = lean_box(x_51); +x_53 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_48); +return x_53; +} +else +{ +uint8_t x_54; +x_54 = lean_nat_dec_le(x_49, x_49); +if (x_54 == 0) +{ +uint8_t x_55; lean_object* x_56; lean_object* x_57; +lean_dec(x_49); +lean_dec(x_47); +lean_dec(x_3); +lean_dec(x_2); +x_55 = 1; +x_56 = lean_box(x_55); +x_57 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_57, 0, x_56); +lean_ctor_set(x_57, 1, x_48); +return x_57; +} +else +{ +size_t x_58; size_t x_59; lean_object* x_60; lean_object* x_61; +x_58 = 0; +x_59 = lean_usize_of_nat(x_49); +lean_dec(x_49); +x_60 = lean_box(0); +x_61 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Command_elabCommand___spec__11(x_47, x_58, x_59, x_60, x_2, x_3, x_48); +lean_dec(x_2); +lean_dec(x_47); +if (lean_obj_tag(x_61) == 0) +{ +lean_object* x_62; lean_object* x_63; uint8_t x_64; lean_object* x_65; lean_object* x_66; +x_62 = lean_ctor_get(x_61, 1); +lean_inc(x_62); +if (lean_is_exclusive(x_61)) { + lean_ctor_release(x_61, 0); + lean_ctor_release(x_61, 1); + x_63 = x_61; +} else { + lean_dec_ref(x_61); + x_63 = lean_box(0); +} +x_64 = 1; +x_65 = lean_box(x_64); +if (lean_is_scalar(x_63)) { + x_66 = lean_alloc_ctor(0, 2, 0); +} else { + x_66 = x_63; +} +lean_ctor_set(x_66, 0, x_65); +lean_ctor_set(x_66, 1, x_62); +return x_66; +} +else +{ +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_67 = lean_ctor_get(x_61, 0); +lean_inc(x_67); +x_68 = lean_ctor_get(x_61, 1); +lean_inc(x_68); +if (lean_is_exclusive(x_61)) { + lean_ctor_release(x_61, 0); + lean_ctor_release(x_61, 1); + x_69 = x_61; +} else { + lean_dec_ref(x_61); + x_69 = lean_box(0); +} +if (lean_is_scalar(x_69)) { + x_70 = lean_alloc_ctor(1, 2, 0); +} else { + x_70 = x_69; +} +lean_ctor_set(x_70, 0, x_67); +lean_ctor_set(x_70, 1, x_68); +return x_70; +} +} +} +} +} +else +{ +uint8_t x_71; +lean_dec(x_3); +lean_dec(x_2); +x_71 = !lean_is_exclusive(x_20); +if (x_71 == 0) +{ +return x_20; +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_20, 0); +x_73 = lean_ctor_get(x_20, 1); +lean_inc(x_73); +lean_inc(x_72); +lean_dec(x_20); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_72); +lean_ctor_set(x_74, 1, x_73); +return x_74; +} +} +} +else +{ +uint8_t x_75; +lean_dec(x_15); +lean_dec(x_3); +lean_dec(x_2); +x_75 = !lean_is_exclusive(x_14); +if (x_75 == 0) +{ +lean_object* x_76; uint8_t x_77; lean_object* x_78; +x_76 = lean_ctor_get(x_14, 0); +lean_dec(x_76); +x_77 = 0; +x_78 = lean_box(x_77); +lean_ctor_set(x_14, 0, x_78); +return x_14; +} +else +{ +lean_object* x_79; uint8_t x_80; lean_object* x_81; lean_object* x_82; +x_79 = lean_ctor_get(x_14, 1); +lean_inc(x_79); +lean_dec(x_14); +x_80 = 0; +x_81 = lean_box(x_80); +x_82 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_79); +return x_82; +} +} +} +else +{ +uint8_t x_83; +lean_dec(x_3); +lean_dec(x_2); +x_83 = !lean_is_exclusive(x_14); +if (x_83 == 0) +{ +return x_14; +} +else +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; +x_84 = lean_ctor_get(x_14, 0); +x_85 = lean_ctor_get(x_14, 1); +lean_inc(x_85); +lean_inc(x_84); +lean_dec(x_14); +x_86 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_86, 0, x_84); +lean_ctor_set(x_86, 1, x_85); +return x_86; +} +} +} +} +} +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__3(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Lean_getConstInfo___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_getConstInfo___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__2(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_throwError___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__4(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Lean_getConstInfoInduct___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_getConstInfoInduct___at_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___spec__1(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler(x_1, x_2, x_3, x_4); +lean_dec(x_1); +return x_5; +} +} +static lean_object* _init_l_Lean_Elab_Deriving_DecEq_initFn____x40_Lean_Elab_Deriving_DecEq___hyg_3673____closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_DecEq_mkDecEqInstanceHandler___boxed), 4, 0); +return x_1; +} +} +lean_object* l_Lean_Elab_Deriving_DecEq_initFn____x40_Lean_Elab_Deriving_DecEq___hyg_3673_(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_2 = l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__2; +x_3 = l_Lean_Elab_Deriving_DecEq_initFn____x40_Lean_Elab_Deriving_DecEq___hyg_3673____closed__1; +x_4 = l_Lean_Elab_registerBuiltinDerivingHandler(x_2, x_3, x_1); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_4, 1); +lean_inc(x_5); +lean_dec(x_4); +x_6 = l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__2; +x_7 = l_Lean_registerTraceClass(x_6, x_5); +return x_7; +} +else +{ +uint8_t x_8; +x_8 = !lean_is_exclusive(x_4); +if (x_8 == 0) +{ +return x_4; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_4, 0); +x_10 = lean_ctor_get(x_4, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_4); +x_11 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_11, 0, x_9); +lean_ctor_set(x_11, 1, x_10); +return x_11; +} +} +} +} +lean_object* initialize_Init(lean_object*); +lean_object* initialize_Lean_Meta_Transform(lean_object*); +lean_object* initialize_Lean_Meta_Inductive(lean_object*); +lean_object* initialize_Lean_Elab_Deriving_Basic(lean_object*); +lean_object* initialize_Lean_Elab_Deriving_Util(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Lean_Elab_Deriving_DecEq(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Meta_Transform(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Meta_Inductive(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Elab_Deriving_Basic(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Elab_Deriving_Util(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__1 = _init_l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__1(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__1); +l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__2 = _init_l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__2(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkHeader___rarg___closed__2); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__1 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__1(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__1); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__2 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__2(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__2); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__3 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__3(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__3); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__4 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__4(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__4); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__5 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__5(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__5); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__6 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__6(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__6); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__7 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__7(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__7); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__8 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__8(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__8); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__9 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__9(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__9); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__10 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__10(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__10); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__11 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__11(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__11); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__12 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__12(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__12); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__13 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__13(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__13); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__14); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__15 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__15(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__15); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__16); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__17 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__17(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__17); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__18 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__18(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__18); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__19 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__19(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__19); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__20); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__21); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__22 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__22(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__22); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__23); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__24 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__24(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__24); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__25 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__25(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__25); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__26); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__27); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__28 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__28(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__28); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__29); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__30 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__30(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__30); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__31 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__31(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__31); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__32 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__32(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__32); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__33 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__33(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__33); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__34 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__34(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__34); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__35); +l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__36 = _init_l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__36(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkMatch_mkSameCtorRhs___closed__36); +l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5___closed__1 = _init_l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5___closed__1(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__5___closed__1); +l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__1 = _init_l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__1(); +lean_mark_persistent(l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__1); +l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__2 = _init_l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__2(); +lean_mark_persistent(l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__2); +l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__3 = _init_l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__3(); +lean_mark_persistent(l_List_forIn_loop___at_Lean_Elab_Deriving_DecEq_mkMatch_mkAlts___spec__6___closed__3); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__1 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__1(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__1); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__2 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__2(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__2); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__3 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__3(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__3); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__4 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__4(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__4); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__5 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__5(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__5); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__6 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__6(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__6); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__7 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__7(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__7); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__8 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__8(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__8); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__9 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__9(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__9); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__10 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__10(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__10); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__11 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__11(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__11); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__12 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__12(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__12); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__13 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__13(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__13); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__14 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__14(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__14); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__15 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__15(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__15); +l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__16 = _init_l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__16(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkAuxFunction___closed__16); +l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__1 = _init_l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__1(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__1); +l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__2 = _init_l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__2(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_mkDecEqCmds___closed__2); +l_Lean_Elab_Deriving_DecEq_initFn____x40_Lean_Elab_Deriving_DecEq___hyg_3673____closed__1 = _init_l_Lean_Elab_Deriving_DecEq_initFn____x40_Lean_Elab_Deriving_DecEq___hyg_3673____closed__1(); +lean_mark_persistent(l_Lean_Elab_Deriving_DecEq_initFn____x40_Lean_Elab_Deriving_DecEq___hyg_3673____closed__1); +res = l_Lean_Elab_Deriving_DecEq_initFn____x40_Lean_Elab_Deriving_DecEq___hyg_3673_(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Lean/Elab/Deriving/Inhabited.c b/stage0/stdlib/Lean/Elab/Deriving/Inhabited.c index 59f3dd8e85..8a972216ed 100644 --- a/stage0/stdlib/Lean/Elab/Deriving/Inhabited.c +++ b/stage0/stdlib/Lean/Elab/Deriving/Inhabited.c @@ -13,8 +13,8 @@ #ifdef __cplusplus extern "C" { #endif -lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11; lean_object* l_Lean_getConstInfo___at_Lean_Elab_Term_mkConst___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4; lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmdWith(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -109,7 +109,6 @@ lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedIn extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__7; lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstance___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12; lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_addLocalInstancesForParamsAux_match__1(lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); @@ -5940,7 +5939,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Derivi _start: { lean_object* x_1; -x_1 = lean_mk_string("' "); +x_1 = lean_mk_string(" because of field with type"); return x_1; } } @@ -5957,7 +5956,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Derivi _start: { lean_object* x_1; -x_1 = lean_mk_string(" because of field with type"); +x_1 = lean_mk_string("(assuming parameters are inhabited)"); return x_1; } } @@ -5974,7 +5973,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Derivi _start: { lean_object* x_1; -x_1 = lean_mk_string("(assuming parameters are inhabited)"); +x_1 = lean_mk_string("checking "); return x_1; } } @@ -5991,7 +5990,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Derivi _start: { lean_object* x_1; -x_1 = lean_mk_string("checking "); +x_1 = lean_mk_string(" for '"); return x_1; } } @@ -6004,23 +6003,6 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string(" for '"); -return x_1; -} -} -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { _start: { @@ -6238,7 +6220,7 @@ x_71 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lea x_72 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_72, 0, x_71); lean_ctor_set(x_72, 1, x_70); -x_73 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4; +x_73 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4; x_74 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_74, 0, x_72); lean_ctor_set(x_74, 1, x_73); @@ -6250,7 +6232,7 @@ x_76 = l_Lean_KernelException_toMessageData___closed__15; x_77 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_77, 0, x_74); lean_ctor_set(x_77, 1, x_76); -x_78 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6; +x_78 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4; x_79 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_79, 0, x_77); lean_ctor_set(x_79, 1, x_78); @@ -6310,11 +6292,11 @@ goto block_39; else { lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; uint8_t x_105; -x_96 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__8; +x_96 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6; x_97 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_97, 0, x_74); lean_ctor_set(x_97, 1, x_96); -x_98 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6; +x_98 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4; x_99 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_99, 0, x_97); lean_ctor_set(x_99, 1, x_98); @@ -6560,7 +6542,7 @@ x_159 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Le x_160 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_160, 0, x_159); lean_ctor_set(x_160, 1, x_158); -x_161 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4; +x_161 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4; x_162 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_162, 0, x_160); lean_ctor_set(x_162, 1, x_161); @@ -6572,7 +6554,7 @@ x_164 = l_Lean_KernelException_toMessageData___closed__15; x_165 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_165, 0, x_162); lean_ctor_set(x_165, 1, x_164); -x_166 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6; +x_166 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4; x_167 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_167, 0, x_165); lean_ctor_set(x_167, 1, x_166); @@ -6632,11 +6614,11 @@ goto block_39; else { lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; uint8_t x_193; -x_184 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__8; +x_184 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6; x_185 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_185, 0, x_162); lean_ctor_set(x_185, 1, x_184); -x_186 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6; +x_186 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4; x_187 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_187, 0, x_185); lean_ctor_set(x_187, 1, x_186); @@ -6768,11 +6750,11 @@ lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_inc(x_52); x_229 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_229, 0, x_52); -x_230 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__10; +x_230 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__8; x_231 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_231, 0, x_230); lean_ctor_set(x_231, 1, x_229); -x_232 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12; +x_232 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__10; x_233 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_233, 0, x_231); lean_ctor_set(x_233, 1, x_232); @@ -7452,7 +7434,7 @@ x_73 = l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstance x_74 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_74, 0, x_73); lean_ctor_set(x_74, 1, x_72); -x_75 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4; +x_75 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4; x_76 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_76, 0, x_74); lean_ctor_set(x_76, 1, x_75); @@ -7488,7 +7470,7 @@ goto block_69; else { lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; -x_89 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__8; +x_89 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6; x_90 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_90, 0, x_76); lean_ctor_set(x_90, 1, x_89); @@ -9449,10 +9431,6 @@ l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_ lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__9); l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__10 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__10(); lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__10); -l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11); -l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12); l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___lambda__1___closed__1 = _init_l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___lambda__1___closed__1(); lean_mark_persistent(l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___lambda__1___closed__1); l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___lambda__1___closed__2 = _init_l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___lambda__1___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Deriving/Util.c b/stage0/stdlib/Lean/Elab/Deriving/Util.c index 8e295354d1..98814bde80 100644 --- a/stage0/stdlib/Lean/Elab/Deriving/Util.c +++ b/stage0/stdlib/Lean/Elab/Deriving/Util.c @@ -14,24 +14,31 @@ extern "C" { #endif lean_object* l_Lean_getConstInfo___at_Lean_Elab_Term_mkConst___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_2022____closed__2; size_t l_USize_add(size_t, size_t); +extern lean_object* l_Lean_Parser_Syntax_addPrec___closed__4; lean_object* lean_erase_macro_scopes(lean_object*); +lean_object* l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_Binary_mkDiscrs___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_instReprSigma___rarg___closed__2; lean_object* l_Lean_Elab_Deriving_mkInstImplicitBinders___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_userName(lean_object*); extern lean_object* l_Lean_Parser_Term_instBinder; extern lean_object* l_myMacro____x40_Init_Notation___hyg_12942____closed__2; +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_mkContext___closed__2; -lean_object* l_Lean_Elab_Deriving_mkContext___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_mkContext___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__2; lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Deriving_mkInstImplicitBinders___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_2022____closed__4; lean_object* lean_name_mk_string(lean_object*, lean_object*); uint8_t l_USize_decEq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_Lean_Elab_Deriving_Binary_mkHeader___boxed(lean_object*); lean_object* l_Array_foldrMUnsafe_fold___at_Lean_Elab_Deriving_mkLet___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_append___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_getConstInfoInduct___rarg___lambda__1___closed__2; extern lean_object* l_Std_Range_myMacro____x40_Init_Data_Range___hyg_261____closed__4; +extern lean_object* l_Lean_command__Unif__hint______Where___x7c_x2d_u22a2_____closed__3; extern lean_object* l_myMacro____x40_Init_Data_Array_Basic___hyg_3404____closed__8; extern lean_object* l_Std_Range_myMacro____x40_Init_Data_Range___hyg_261____closed__27; lean_object* l_Lean_Elab_Deriving_mkContext___closed__1; @@ -43,6 +50,8 @@ lean_object* l_Lean_Elab_Deriving_mkInductArgNames___lambda__1(lean_object*, lea extern lean_object* l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; size_t l_USize_sub(size_t, size_t); extern lean_object* l_Array_empty___closed__1; +extern lean_object* l_Std_Range_myMacro____x40_Init_Data_Range___hyg_261____closed__19; +uint8_t l_Lean_checkTraceOption(lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_6100____closed__6; lean_object* l_Lean_Elab_Deriving_mkContext_match__1(lean_object*); @@ -50,7 +59,6 @@ extern lean_object* l_Lean_Parser_Term_funImplicitBinder___elambda__1___closed__ lean_object* l_Lean_Elab_Deriving_implicitBinderF; extern lean_object* l_instReprSigma___rarg___closed__1; lean_object* l_Lean_Elab_Deriving_mkLocalInstanceLetDecls___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__35; lean_object* l_Array_toSubarray___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); @@ -62,10 +70,14 @@ lean_object* l_Lean_throwError___at_Lean_Elab_Deriving_mkContext___spec__2(lean_ lean_object* l_Lean_getConstInfoInduct___at_Lean_Elab_Deriving_mkContext___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getMainModule___rarg(lean_object*, lean_object*); uint8_t l_USize_decLt(size_t, size_t); +lean_object* l_Lean_addTrace___at_Lean_Elab_Deriving_mkInstanceCmds___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Core_mkFreshUserName___at_Lean_Elab_Deriving_mkInductArgNames___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_mkLocalInstanceLetDecls(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_Binary_mkHeader(lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Init_Notation___hyg_13175____closed__11; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_12315____closed__11; +lean_object* l_Lean_Elab_Deriving_Binary_mkDiscr___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Deriving_mkInductArgNames___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_instBinderF; lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4___closed__2; @@ -73,27 +85,32 @@ lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstImplicitBinder lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkLocalInstanceLetDecls___spec__1___closed__3; lean_object* l_Lean_Elab_Deriving_mkInductArgNames(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4___closed__1; -lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___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* l_Lean_Elab_Deriving_mkInstImplicitBinders___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Deriving_mkInductiveApp___spec__1___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_12942____closed__4; lean_object* l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Meta_forallTelescopeReducing___at_Lean_Elab_Deriving_mkInductArgNames___spec__3(lean_object*); -lean_object* l_Lean_Elab_Deriving_mkInstanceCmds(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_st_ref_take(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_mkInstanceCmds(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_implicitBinder___elambda__1___closed__1; lean_object* l_Lean_Elab_Deriving_mkInstImplicitBinders(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldrMUnsafe_fold___at_Lean_Elab_Deriving_mkLet___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* l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__7; lean_object* l_Lean_Elab_Deriving_mkLet___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__49; +extern lean_object* l_Lean_Meta_mkArrow___closed__2; lean_object* l_Lean_Elab_Deriving_mkLet(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); -lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstImplicitBinders___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_object*, lean_object*); lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Deriving_mkInstImplicitBinders___spec__2(lean_object*); +extern lean_object* l_Lean_expandExplicitBindersAux_loop___closed__7; +extern lean_object* l_Lean_Parser_Term_matchDiscr___elambda__1___closed__1; lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedSourceInfo___closed__1; lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageContextTermElabM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -106,24 +123,24 @@ lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean lean_object* lean_array_to_list(lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedExpr; extern lean_object* l_Lean_KernelException_toMessageData___closed__15; -lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___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_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_explicitBinder(uint8_t); -extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__50; extern lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Util___hyg_870____closed__1; -lean_object* l_Lean_Elab_Deriving_mkContext(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_mkContext(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__3; lean_object* l_Lean_Elab_Deriving_mkInductArgNames___closed__1; size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_mkImplicitBinders___boxed__const__1; -extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__1; extern lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__4; +extern lean_object* l_myMacro____x40_Init_Notation___hyg_658____closed__8; extern lean_object* l_Lean_nullKind___closed__2; -lean_object* l_Lean_Elab_Deriving_mkInstanceCmds___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_mkInstanceCmds___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_mkContext_match__1___rarg(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Syntax_mkApp___closed__1; lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkLocalInstanceLetDecls___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_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__6; +lean_object* l_Std_PersistentArray_push___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__42; extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_12942____closed__6; @@ -132,17 +149,28 @@ uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_explicitBinderF; lean_object* l_Lean_getConstInfoInduct___at_Lean_Elab_Deriving_mkContext___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_12942____closed__18; +lean_object* l_Lean_addTrace___at_Lean_Elab_Deriving_mkInstanceCmds___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_Binary_mkDiscrs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_appendCore___rarg(lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_12942____closed__14; -lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___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_object*, lean_object*, lean_object*); lean_object* l_Array_ofSubarray___rarg(lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Deriving_mkImplicitBinders___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__5; +lean_object* l_Lean_Elab_Deriving_Binary_mkHeader___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__41; lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Deriving_mkImplicitBinders(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedName; lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Elab_Deriving_mkInstanceCmds___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +extern lean_object* l_Lean_Elab_Term_mkExplicitBinder___closed__1; +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__5; +lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Elab_Deriving_mkInstanceCmds___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_Binary_mkDiscrs___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*); extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__47; +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__34; lean_object* l_Lean_Meta_mkAppM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_isMonad_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Core_mkFreshUserName___at_Lean_Elab_Deriving_mkInductArgNames___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_mk_syntax_ident(lean_object*); @@ -157,10 +185,14 @@ lean_object* l_Lean_Elab_Deriving_mkInductArgNames___lambda__1___boxed(lean_obje lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkLocalInstanceLetDecls___spec__1___closed__4; +lean_object* l_Lean_Elab_Deriving_Binary_mkDiscrs___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_forallTelescopeReducing___at_Lean_Elab_Deriving_mkInductArgNames___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Deriving_Binary_mkDiscr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_1130____closed__23; lean_object* l_Lean_mkConst(lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3___boxed(lean_object**); lean_object* l_Lean_Elab_Deriving_mkInductiveApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__4; extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__38; extern lean_object* l_myMacro____x40_Init_Notation___hyg_12942____closed__8; lean_object* l_Lean_Elab_getBetterRef(lean_object*, lean_object*); @@ -1288,64 +1320,65 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -if (lean_obj_tag(x_1) == 0) +if (lean_obj_tag(x_2) == 0) { -lean_object* x_10; -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_2); -lean_ctor_set(x_10, 1, x_9); -return x_10; +lean_object* x_11; +lean_dec(x_1); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_3); +lean_ctor_set(x_11, 1, x_10); +return x_11; } else { -lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = lean_ctor_get(x_1, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_1, 1); +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_2, 0); lean_inc(x_12); -lean_dec(x_1); -x_13 = lean_erase_macro_scopes(x_11); -if (lean_obj_tag(x_13) == 1) +x_13 = lean_ctor_get(x_2, 1); +lean_inc(x_13); +lean_dec(x_2); +x_14 = lean_erase_macro_scopes(x_12); +if (lean_obj_tag(x_14) == 1) { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_14 = lean_ctor_get(x_13, 1); -lean_inc(x_14); -lean_dec(x_13); -x_15 = l_myMacro____x40_Init_Notation___hyg_6100____closed__6; -x_16 = lean_string_append(x_15, x_14); +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); lean_dec(x_14); +lean_inc(x_1); +x_16 = lean_string_append(x_1, x_15); +lean_dec(x_15); x_17 = lean_box(0); x_18 = lean_name_mk_string(x_17, x_16); -x_19 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_18, x_7, x_8, x_9); +x_19 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_18, x_8, x_9, x_10); x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); -x_22 = lean_array_push(x_2, x_20); -x_1 = x_12; -x_2 = x_22; -x_9 = x_21; +x_22 = lean_array_push(x_3, x_20); +x_2 = x_13; +x_3 = x_22; +x_10 = x_21; goto _start; } else { lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; -lean_dec(x_13); +lean_dec(x_14); x_24 = l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4___closed__2; -x_25 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_24, x_7, x_8, x_9); +x_25 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_24, x_8, x_9, x_10); x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); x_27 = lean_ctor_get(x_25, 1); lean_inc(x_27); lean_dec(x_25); -x_28 = lean_array_push(x_2, x_26); -x_1 = x_12; -x_2 = x_28; -x_9 = x_27; +x_28 = lean_array_push(x_3, x_26); +x_2 = x_13; +x_3 = x_28; +x_10 = x_27; goto _start; } } @@ -1423,224 +1456,224 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l_Lean_Elab_Deriving_mkContext(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +lean_object* l_Lean_Elab_Deriving_mkContext(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { -lean_object* x_9; -lean_inc(x_2); -x_9 = l_Lean_getConstInfoInduct___at_Lean_Elab_Deriving_mkContext___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_9) == 0) +lean_object* x_10; +lean_inc(x_3); +x_10 = l_Lean_getConstInfoInduct___at_Lean_Elab_Deriving_mkContext___spec__1(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_10) == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_9, 1); +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); -lean_dec(x_9); -x_12 = lean_ctor_get(x_10, 3); +x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); -x_13 = l_Array_empty___closed__1; -lean_inc(x_2); -lean_inc(x_12); -x_14 = l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__3(x_12, x_13, x_2, x_3, x_4, x_5, x_6, x_7, x_11); -if (lean_obj_tag(x_14) == 0) -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_62; lean_object* x_63; lean_object* x_64; uint8_t x_65; -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); -lean_inc(x_16); -lean_dec(x_14); -x_17 = l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4(x_12, x_13, x_2, x_3, x_4, x_5, x_6, x_7, x_16); -x_18 = lean_ctor_get(x_17, 0); -lean_inc(x_18); -x_19 = lean_ctor_get(x_17, 1); -lean_inc(x_19); -if (lean_is_exclusive(x_17)) { - lean_ctor_release(x_17, 0); - lean_ctor_release(x_17, 1); - x_20 = x_17; -} else { - lean_dec_ref(x_17); - x_20 = lean_box(0); -} -x_62 = lean_st_ref_get(x_7, x_19); -x_63 = lean_ctor_get(x_62, 0); -lean_inc(x_63); -x_64 = lean_ctor_get(x_63, 3); -lean_inc(x_64); -lean_dec(x_63); -x_65 = lean_ctor_get_uint8(x_64, sizeof(void*)*1); -lean_dec(x_64); -if (x_65 == 0) -{ -lean_object* x_66; uint8_t x_67; -x_66 = lean_ctor_get(x_62, 1); -lean_inc(x_66); -lean_dec(x_62); -x_67 = 0; -x_21 = x_67; -x_22 = x_66; -goto block_61; -} -else -{ -lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73; -x_68 = lean_ctor_get(x_62, 1); -lean_inc(x_68); -lean_dec(x_62); -x_69 = l_Lean_Elab_Deriving_mkContext___closed__3; -x_70 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_69, x_2, x_3, x_4, x_5, x_6, x_7, x_68); -x_71 = lean_ctor_get(x_70, 0); -lean_inc(x_71); -x_72 = lean_ctor_get(x_70, 1); -lean_inc(x_72); -lean_dec(x_70); -x_73 = lean_unbox(x_71); -lean_dec(x_71); -x_21 = x_73; -x_22 = x_72; -goto block_61; -} -block_61: -{ -if (x_21 == 0) -{ -uint8_t x_23; -lean_dec(x_2); -x_23 = lean_ctor_get_uint8(x_10, sizeof(void*)*5 + 3); lean_dec(x_10); -if (x_23 == 0) +x_13 = lean_ctor_get(x_11, 3); +lean_inc(x_13); +x_14 = l_Array_empty___closed__1; +lean_inc(x_3); +lean_inc(x_13); +x_15 = l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__3(x_13, x_14, x_3, x_4, x_5, x_6, x_7, x_8, x_12); +if (lean_obj_tag(x_15) == 0) { -lean_object* x_24; lean_object* x_25; uint8_t x_26; lean_object* x_27; lean_object* x_28; -x_24 = lean_array_get_size(x_15); -x_25 = lean_unsigned_to_nat(1u); -x_26 = lean_nat_dec_lt(x_25, x_24); -lean_dec(x_24); -x_27 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_27, 0, x_15); -lean_ctor_set(x_27, 1, x_18); -lean_ctor_set_uint8(x_27, sizeof(void*)*2, x_26); -if (lean_is_scalar(x_20)) { - x_28 = lean_alloc_ctor(0, 2, 0); +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_63; lean_object* x_64; lean_object* x_65; uint8_t x_66; +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4(x_1, x_13, x_14, x_3, x_4, x_5, x_6, x_7, x_8, x_17); +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +if (lean_is_exclusive(x_18)) { + lean_ctor_release(x_18, 0); + lean_ctor_release(x_18, 1); + x_21 = x_18; } else { - x_28 = x_20; + lean_dec_ref(x_18); + x_21 = lean_box(0); } -lean_ctor_set(x_28, 0, x_27); -lean_ctor_set(x_28, 1, x_22); -return x_28; +x_63 = lean_st_ref_get(x_8, x_20); +x_64 = lean_ctor_get(x_63, 0); +lean_inc(x_64); +x_65 = lean_ctor_get(x_64, 3); +lean_inc(x_65); +lean_dec(x_64); +x_66 = lean_ctor_get_uint8(x_65, sizeof(void*)*1); +lean_dec(x_65); +if (x_66 == 0) +{ +lean_object* x_67; uint8_t x_68; +x_67 = lean_ctor_get(x_63, 1); +lean_inc(x_67); +lean_dec(x_63); +x_68 = 0; +x_22 = x_68; +x_23 = x_67; +goto block_62; } else { -uint8_t x_29; lean_object* x_30; lean_object* x_31; -x_29 = 1; -x_30 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_30, 0, x_15); -lean_ctor_set(x_30, 1, x_18); -lean_ctor_set_uint8(x_30, sizeof(void*)*2, x_29); -if (lean_is_scalar(x_20)) { - x_31 = lean_alloc_ctor(0, 2, 0); -} else { - x_31 = x_20; +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; uint8_t x_74; +x_69 = lean_ctor_get(x_63, 1); +lean_inc(x_69); +lean_dec(x_63); +x_70 = l_Lean_Elab_Deriving_mkContext___closed__3; +x_71 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_70, x_3, x_4, x_5, x_6, x_7, x_8, x_69); +x_72 = lean_ctor_get(x_71, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_71, 1); +lean_inc(x_73); +lean_dec(x_71); +x_74 = lean_unbox(x_72); +lean_dec(x_72); +x_22 = x_74; +x_23 = x_73; +goto block_62; } -lean_ctor_set(x_31, 0, x_30); -lean_ctor_set(x_31, 1, x_22); -return x_31; +block_62: +{ +if (x_22 == 0) +{ +uint8_t x_24; +lean_dec(x_3); +x_24 = lean_ctor_get_uint8(x_11, sizeof(void*)*5 + 3); +lean_dec(x_11); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; uint8_t x_27; lean_object* x_28; lean_object* x_29; +x_25 = lean_array_get_size(x_16); +x_26 = lean_unsigned_to_nat(1u); +x_27 = lean_nat_dec_lt(x_26, x_25); +lean_dec(x_25); +x_28 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_28, 0, x_16); +lean_ctor_set(x_28, 1, x_19); +lean_ctor_set_uint8(x_28, sizeof(void*)*2, x_27); +if (lean_is_scalar(x_21)) { + x_29 = lean_alloc_ctor(0, 2, 0); +} else { + x_29 = x_21; +} +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_23); +return x_29; +} +else +{ +uint8_t x_30; lean_object* x_31; lean_object* x_32; +x_30 = 1; +x_31 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_31, 0, x_16); +lean_ctor_set(x_31, 1, x_19); +lean_ctor_set_uint8(x_31, sizeof(void*)*2, x_30); +if (lean_is_scalar(x_21)) { + x_32 = lean_alloc_ctor(0, 2, 0); +} else { + x_32 = x_21; +} +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_23); +return x_32; } } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; -lean_dec(x_20); -lean_inc(x_18); -x_32 = lean_array_to_list(lean_box(0), x_18); -x_33 = l_List_map___at_Lean_Elab_Deriving_mkContext___spec__5(x_32); -x_34 = l_Lean_MessageData_ofList(x_33); -lean_dec(x_33); -x_35 = l_Lean_KernelException_toMessageData___closed__15; -x_36 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_34); +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; +lean_dec(x_21); +lean_inc(x_19); +x_33 = lean_array_to_list(lean_box(0), x_19); +x_34 = l_List_map___at_Lean_Elab_Deriving_mkContext___spec__5(x_33); +x_35 = l_Lean_MessageData_ofList(x_34); +lean_dec(x_34); +x_36 = l_Lean_KernelException_toMessageData___closed__15; x_37 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_35); -x_38 = l_Lean_Elab_Deriving_mkContext___closed__3; -x_39 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_38, x_37, x_2, x_3, x_4, x_5, x_6, x_7, x_22); -lean_dec(x_2); -x_40 = lean_ctor_get_uint8(x_10, sizeof(void*)*5 + 3); -lean_dec(x_10); -if (x_40 == 0) -{ -uint8_t x_41; -x_41 = !lean_is_exclusive(x_39); +x_38 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_36); +x_39 = l_Lean_Elab_Deriving_mkContext___closed__3; +x_40 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_39, x_38, x_3, x_4, x_5, x_6, x_7, x_8, x_23); +lean_dec(x_3); +x_41 = lean_ctor_get_uint8(x_11, sizeof(void*)*5 + 3); +lean_dec(x_11); if (x_41 == 0) { -lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; lean_object* x_46; -x_42 = lean_ctor_get(x_39, 0); -lean_dec(x_42); -x_43 = lean_array_get_size(x_15); -x_44 = lean_unsigned_to_nat(1u); -x_45 = lean_nat_dec_lt(x_44, x_43); +uint8_t x_42; +x_42 = !lean_is_exclusive(x_40); +if (x_42 == 0) +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; lean_object* x_47; +x_43 = lean_ctor_get(x_40, 0); lean_dec(x_43); -x_46 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_46, 0, x_15); -lean_ctor_set(x_46, 1, x_18); -lean_ctor_set_uint8(x_46, sizeof(void*)*2, x_45); -lean_ctor_set(x_39, 0, x_46); -return x_39; +x_44 = lean_array_get_size(x_16); +x_45 = lean_unsigned_to_nat(1u); +x_46 = lean_nat_dec_lt(x_45, x_44); +lean_dec(x_44); +x_47 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_47, 0, x_16); +lean_ctor_set(x_47, 1, x_19); +lean_ctor_set_uint8(x_47, sizeof(void*)*2, x_46); +lean_ctor_set(x_40, 0, x_47); +return x_40; } else { -lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; lean_object* x_51; lean_object* x_52; -x_47 = lean_ctor_get(x_39, 1); -lean_inc(x_47); -lean_dec(x_39); -x_48 = lean_array_get_size(x_15); -x_49 = lean_unsigned_to_nat(1u); -x_50 = lean_nat_dec_lt(x_49, x_48); -lean_dec(x_48); -x_51 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_51, 0, x_15); -lean_ctor_set(x_51, 1, x_18); -lean_ctor_set_uint8(x_51, sizeof(void*)*2, x_50); -x_52 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_52, 0, x_51); -lean_ctor_set(x_52, 1, x_47); -return x_52; +lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51; lean_object* x_52; lean_object* x_53; +x_48 = lean_ctor_get(x_40, 1); +lean_inc(x_48); +lean_dec(x_40); +x_49 = lean_array_get_size(x_16); +x_50 = lean_unsigned_to_nat(1u); +x_51 = lean_nat_dec_lt(x_50, x_49); +lean_dec(x_49); +x_52 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_52, 0, x_16); +lean_ctor_set(x_52, 1, x_19); +lean_ctor_set_uint8(x_52, sizeof(void*)*2, x_51); +x_53 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_48); +return x_53; } } else { -uint8_t x_53; -x_53 = !lean_is_exclusive(x_39); -if (x_53 == 0) +uint8_t x_54; +x_54 = !lean_is_exclusive(x_40); +if (x_54 == 0) { -lean_object* x_54; uint8_t x_55; lean_object* x_56; -x_54 = lean_ctor_get(x_39, 0); -lean_dec(x_54); -x_55 = 1; -x_56 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_56, 0, x_15); -lean_ctor_set(x_56, 1, x_18); -lean_ctor_set_uint8(x_56, sizeof(void*)*2, x_55); -lean_ctor_set(x_39, 0, x_56); -return x_39; +lean_object* x_55; uint8_t x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_40, 0); +lean_dec(x_55); +x_56 = 1; +x_57 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_57, 0, x_16); +lean_ctor_set(x_57, 1, x_19); +lean_ctor_set_uint8(x_57, sizeof(void*)*2, x_56); +lean_ctor_set(x_40, 0, x_57); +return x_40; } else { -lean_object* x_57; uint8_t x_58; lean_object* x_59; lean_object* x_60; -x_57 = lean_ctor_get(x_39, 1); -lean_inc(x_57); -lean_dec(x_39); -x_58 = 1; -x_59 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_59, 0, x_15); -lean_ctor_set(x_59, 1, x_18); -lean_ctor_set_uint8(x_59, sizeof(void*)*2, x_58); -x_60 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_60, 0, x_59); -lean_ctor_set(x_60, 1, x_57); -return x_60; +lean_object* x_58; uint8_t x_59; lean_object* x_60; lean_object* x_61; +x_58 = lean_ctor_get(x_40, 1); +lean_inc(x_58); +lean_dec(x_40); +x_59 = 1; +x_60 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_60, 0, x_16); +lean_ctor_set(x_60, 1, x_19); +lean_ctor_set_uint8(x_60, sizeof(void*)*2, x_59); +x_61 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_61, 0, x_60); +lean_ctor_set(x_61, 1, x_58); +return x_61; } } } @@ -1648,51 +1681,53 @@ return x_60; } else { -uint8_t x_74; -lean_dec(x_12); -lean_dec(x_10); -lean_dec(x_2); -x_74 = !lean_is_exclusive(x_14); -if (x_74 == 0) +uint8_t x_75; +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_3); +lean_dec(x_1); +x_75 = !lean_is_exclusive(x_15); +if (x_75 == 0) { -return x_14; +return x_15; } else { -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_14, 0); -x_76 = lean_ctor_get(x_14, 1); +lean_object* x_76; lean_object* x_77; lean_object* x_78; +x_76 = lean_ctor_get(x_15, 0); +x_77 = lean_ctor_get(x_15, 1); +lean_inc(x_77); lean_inc(x_76); -lean_inc(x_75); -lean_dec(x_14); -x_77 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_77, 0, x_75); -lean_ctor_set(x_77, 1, x_76); -return x_77; +lean_dec(x_15); +x_78 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_78, 0, x_76); +lean_ctor_set(x_78, 1, x_77); +return x_78; } } } else { -uint8_t x_78; -lean_dec(x_2); -x_78 = !lean_is_exclusive(x_9); -if (x_78 == 0) +uint8_t x_79; +lean_dec(x_3); +lean_dec(x_1); +x_79 = !lean_is_exclusive(x_10); +if (x_79 == 0) { -return x_9; +return x_10; } else { -lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_79 = lean_ctor_get(x_9, 0); -x_80 = lean_ctor_get(x_9, 1); +lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_80 = lean_ctor_get(x_10, 0); +x_81 = lean_ctor_get(x_10, 1); +lean_inc(x_81); lean_inc(x_80); -lean_inc(x_79); -lean_dec(x_9); -x_81 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_81, 0, x_79); -lean_ctor_set(x_81, 1, x_80); -return x_81; +lean_dec(x_10); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_80); +lean_ctor_set(x_82, 1, x_81); +return x_82; } } } @@ -1736,31 +1771,31 @@ lean_dec(x_4); return x_10; } } -lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +lean_object* l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_10; -x_10 = l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_object* x_11; +x_11 = l_List_forIn_loop___at_Lean_Elab_Deriving_mkContext___spec__4(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -return x_10; +return x_11; } } -lean_object* l_Lean_Elab_Deriving_mkContext___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +lean_object* l_Lean_Elab_Deriving_mkContext___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { -lean_object* x_9; -x_9 = l_Lean_Elab_Deriving_mkContext(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_object* x_10; +x_10 = l_Lean_Elab_Deriving_mkContext(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -return x_9; +return x_10; } } static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkLocalInstanceLetDecls___spec__1___closed__1() { @@ -2290,395 +2325,587 @@ lean_dec(x_1); return x_10; } } -lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +lean_object* l_Lean_addTrace___at_Lean_Elab_Deriving_mkInstanceCmds___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { -lean_object* x_17; uint8_t x_18; -x_17 = lean_ctor_get(x_6, 1); -x_18 = lean_nat_dec_le(x_17, x_8); +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; +x_10 = lean_ctor_get(x_7, 3); +x_11 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_2, x_5, x_6, x_7, x_8, x_9); +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +lean_dec(x_11); +x_14 = lean_st_ref_take(x_8, x_13); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_15, 3); +lean_inc(x_16); +x_17 = lean_ctor_get(x_14, 1); +lean_inc(x_17); +lean_dec(x_14); +x_18 = !lean_is_exclusive(x_15); if (x_18 == 0) { lean_object* x_19; uint8_t x_20; -x_19 = lean_unsigned_to_nat(0u); -x_20 = lean_nat_dec_eq(x_7, x_19); +x_19 = lean_ctor_get(x_15, 3); +lean_dec(x_19); +x_20 = !lean_is_exclusive(x_16); if (x_20 == 0) { -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; -x_21 = lean_unsigned_to_nat(1u); -x_22 = lean_nat_sub(x_7, x_21); -lean_dec(x_7); -x_30 = l_Lean_instInhabitedInductiveVal; -x_31 = lean_array_get(x_30, x_5, x_8); -x_32 = lean_ctor_get(x_31, 0); -lean_inc(x_32); -x_33 = lean_ctor_get(x_32, 0); +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; +x_21 = lean_ctor_get(x_16, 0); +x_22 = lean_alloc_ctor(11, 2, 0); +lean_ctor_set(x_22, 0, x_1); +lean_ctor_set(x_22, 1, x_12); +lean_inc(x_10); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_10); +lean_ctor_set(x_23, 1, x_22); +x_24 = l_Std_PersistentArray_push___rarg(x_21, x_23); +lean_ctor_set(x_16, 0, x_24); +x_25 = lean_st_ref_set(x_8, x_15, x_17); +x_26 = !lean_is_exclusive(x_25); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_25, 0); +lean_dec(x_27); +x_28 = lean_box(0); +lean_ctor_set(x_25, 0, x_28); +return x_25; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_25, 1); +lean_inc(x_29); +lean_dec(x_25); +x_30 = lean_box(0); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +return x_31; +} +} +else +{ +uint8_t x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_32 = lean_ctor_get_uint8(x_16, sizeof(void*)*1); +x_33 = lean_ctor_get(x_16, 0); lean_inc(x_33); -lean_dec(x_32); -x_34 = l_Array_contains___at_Lean_findField_x3f___spec__1(x_3, x_33); -lean_dec(x_33); -if (x_34 == 0) -{ -lean_object* x_35; -lean_dec(x_31); -x_35 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_35, 0, x_9); -x_23 = x_35; -x_24 = x_16; -goto block_29; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_36 = lean_ctor_get(x_1, 1); -x_37 = l_Lean_instInhabitedName; -x_38 = lean_array_get(x_37, x_36, x_8); -lean_inc(x_15); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_12); -lean_inc(x_11); +lean_dec(x_16); +x_34 = lean_alloc_ctor(11, 2, 0); +lean_ctor_set(x_34, 0, x_1); +lean_ctor_set(x_34, 1, x_12); lean_inc(x_10); -lean_inc(x_31); -x_39 = l_Lean_Elab_Deriving_mkInductArgNames(x_31, x_10, x_11, x_12, x_13, x_14, x_15, x_16); -if (lean_obj_tag(x_39) == 0) -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_39, 0); -lean_inc(x_40); -x_41 = lean_ctor_get(x_39, 1); -lean_inc(x_41); -lean_dec(x_39); -lean_inc(x_15); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_40); -x_42 = l_Lean_Elab_Deriving_mkImplicitBinders(x_40, x_10, x_11, x_12, x_13, x_14, x_15, x_41); -if (lean_obj_tag(x_42) == 0) -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_42, 0); -lean_inc(x_43); -x_44 = lean_ctor_get(x_42, 1); -lean_inc(x_44); -lean_dec(x_42); -lean_inc(x_15); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_40); -lean_inc(x_31); -lean_inc(x_2); -x_45 = l_Lean_Elab_Deriving_mkInstImplicitBinders(x_2, x_31, x_40, x_10, x_11, x_12, x_13, x_14, x_15, x_44); -if (lean_obj_tag(x_45) == 0) -{ -lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; uint8_t x_122; lean_object* x_123; lean_object* x_137; lean_object* x_138; lean_object* x_139; uint8_t x_140; -x_46 = lean_ctor_get(x_45, 0); -lean_inc(x_46); -x_47 = lean_ctor_get(x_45, 1); -lean_inc(x_47); -lean_dec(x_45); -x_48 = l_Array_append___rarg(x_43, x_46); -lean_dec(x_46); -x_49 = l_Lean_Elab_Deriving_mkInductiveApp(x_31, x_40, x_10, x_11, x_12, x_13, x_14, x_15, x_47); -x_50 = lean_ctor_get(x_49, 0); -lean_inc(x_50); -x_51 = lean_ctor_get(x_49, 1); -lean_inc(x_51); -lean_dec(x_49); -x_52 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_51); -x_53 = lean_ctor_get(x_52, 1); -lean_inc(x_53); -lean_dec(x_52); -x_54 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_53); -x_55 = lean_ctor_get(x_54, 1); -lean_inc(x_55); -lean_dec(x_54); -lean_inc(x_2); -x_56 = lean_mk_syntax_ident(x_2); -lean_inc(x_4); -x_57 = lean_array_push(x_4, x_56); -lean_inc(x_4); -x_58 = lean_array_push(x_4, x_50); -x_59 = l_Lean_nullKind___closed__2; -x_60 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_60, 0, x_59); -lean_ctor_set(x_60, 1, x_58); -x_61 = lean_array_push(x_57, x_60); -x_62 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; -x_63 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_63, 0, x_62); -lean_ctor_set(x_63, 1, x_61); -x_64 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_55); -x_65 = lean_ctor_get(x_64, 1); -lean_inc(x_65); -lean_dec(x_64); -x_66 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_65); -x_67 = lean_ctor_get(x_66, 1); -lean_inc(x_67); -lean_dec(x_66); -x_68 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkLocalInstanceLetDecls___spec__1___closed__1; -lean_inc(x_4); -x_69 = lean_array_push(x_4, x_68); -x_70 = lean_mk_syntax_ident(x_38); -lean_inc(x_4); -x_71 = lean_array_push(x_4, x_70); -x_72 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_72, 0, x_59); -lean_ctor_set(x_72, 1, x_71); -x_73 = lean_array_push(x_69, x_72); -x_74 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkLocalInstanceLetDecls___spec__1___closed__2; -x_75 = lean_array_push(x_73, x_74); -x_76 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; -x_77 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_77, 0, x_76); -lean_ctor_set(x_77, 1, x_75); -x_78 = l_Lean_Elab_Term_getCurrMacroScope(x_10, x_11, x_12, x_13, x_14, x_15, x_67); -x_79 = lean_ctor_get(x_78, 1); -lean_inc(x_79); -lean_dec(x_78); -x_80 = l_Lean_Elab_Term_getMainModule___rarg(x_15, x_79); -x_81 = lean_ctor_get(x_80, 1); -lean_inc(x_81); -lean_dec(x_80); -lean_inc(x_4); -x_82 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_82, 0, x_59); -lean_ctor_set(x_82, 1, x_4); -lean_inc(x_82); -lean_inc(x_4); -x_83 = lean_array_push(x_4, x_82); -lean_inc(x_82); -lean_inc(x_83); -x_84 = lean_array_push(x_83, x_82); -lean_inc(x_82); -x_85 = lean_array_push(x_84, x_82); -lean_inc(x_82); -x_86 = lean_array_push(x_85, x_82); -lean_inc(x_82); -x_87 = lean_array_push(x_86, x_82); -lean_inc(x_82); -x_88 = lean_array_push(x_87, x_82); -x_89 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__7; -x_90 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_90, 0, x_89); -lean_ctor_set(x_90, 1, x_88); -lean_inc(x_4); -x_91 = lean_array_push(x_4, x_90); -x_92 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__1; -x_93 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_93, 0, x_92); -lean_ctor_set(x_93, 1, x_83); -lean_inc(x_4); -x_94 = lean_array_push(x_4, x_93); -x_95 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__38; -x_96 = lean_array_push(x_94, x_95); -lean_inc(x_82); -x_97 = lean_array_push(x_96, x_82); -lean_inc(x_4); -x_98 = l_Array_appendCore___rarg(x_4, x_48); -lean_dec(x_48); -x_99 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_99, 0, x_59); -lean_ctor_set(x_99, 1, x_98); -lean_inc(x_4); -x_100 = lean_array_push(x_4, x_99); -x_101 = l_myMacro____x40_Init_Notation___hyg_12315____closed__10; -lean_inc(x_4); -x_102 = lean_array_push(x_4, x_101); -x_103 = lean_array_push(x_102, x_63); -x_104 = l_Lean_expandExplicitBindersAux_loop___closed__8; -x_105 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_105, 0, x_104); -lean_ctor_set(x_105, 1, x_103); -x_106 = lean_array_push(x_100, x_105); -x_107 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__42; -x_108 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_108, 0, x_107); -lean_ctor_set(x_108, 1, x_106); -x_109 = lean_array_push(x_97, x_108); -x_110 = l_myMacro____x40_Init_Notation___hyg_12942____closed__14; -lean_inc(x_4); -x_111 = lean_array_push(x_4, x_110); -x_112 = lean_array_push(x_111, x_77); -x_113 = lean_array_push(x_112, x_82); -x_114 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__50; -x_115 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_115, 0, x_114); -lean_ctor_set(x_115, 1, x_113); -x_116 = lean_array_push(x_109, x_115); -x_117 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__35; -x_118 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_118, 0, x_117); -lean_ctor_set(x_118, 1, x_116); -x_119 = lean_array_push(x_91, x_118); -x_120 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__5; -x_121 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_121, 0, x_120); -lean_ctor_set(x_121, 1, x_119); -x_137 = lean_st_ref_get(x_15, x_81); -x_138 = lean_ctor_get(x_137, 0); -lean_inc(x_138); -x_139 = lean_ctor_get(x_138, 3); -lean_inc(x_139); -lean_dec(x_138); -x_140 = lean_ctor_get_uint8(x_139, sizeof(void*)*1); -lean_dec(x_139); -if (x_140 == 0) -{ -lean_object* x_141; uint8_t x_142; -x_141 = lean_ctor_get(x_137, 1); -lean_inc(x_141); -lean_dec(x_137); -x_142 = 0; -x_122 = x_142; -x_123 = x_141; -goto block_136; +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_10); +lean_ctor_set(x_35, 1, x_34); +x_36 = l_Std_PersistentArray_push___rarg(x_33, x_35); +x_37 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set_uint8(x_37, sizeof(void*)*1, x_32); +lean_ctor_set(x_15, 3, x_37); +x_38 = lean_st_ref_set(x_8, x_15, x_17); +x_39 = lean_ctor_get(x_38, 1); +lean_inc(x_39); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + x_40 = x_38; +} else { + lean_dec_ref(x_38); + x_40 = lean_box(0); } -else -{ -lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; uint8_t x_148; -x_143 = lean_ctor_get(x_137, 1); -lean_inc(x_143); -lean_dec(x_137); -x_144 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__4; -x_145 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_144, x_10, x_11, x_12, x_13, x_14, x_15, x_143); -x_146 = lean_ctor_get(x_145, 0); -lean_inc(x_146); -x_147 = lean_ctor_get(x_145, 1); -lean_inc(x_147); -lean_dec(x_145); -x_148 = lean_unbox(x_146); -lean_dec(x_146); -x_122 = x_148; -x_123 = x_147; -goto block_136; +x_41 = lean_box(0); +if (lean_is_scalar(x_40)) { + x_42 = lean_alloc_ctor(0, 2, 0); +} else { + x_42 = x_40; } -block_136: -{ -if (x_122 == 0) -{ -lean_object* x_124; lean_object* x_125; -x_124 = lean_array_push(x_9, x_121); -x_125 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_125, 0, x_124); -x_23 = x_125; -x_24 = x_123; -goto block_29; -} -else -{ -lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; -lean_inc(x_121); -x_126 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_126, 0, x_121); -x_127 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; -x_128 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_128, 0, x_127); -lean_ctor_set(x_128, 1, x_126); -x_129 = l_Lean_KernelException_toMessageData___closed__15; -x_130 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_130, 0, x_128); -lean_ctor_set(x_130, 1, x_129); -x_131 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__4; -x_132 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_131, x_130, x_10, x_11, x_12, x_13, x_14, x_15, x_123); -x_133 = lean_ctor_get(x_132, 1); -lean_inc(x_133); -lean_dec(x_132); -x_134 = lean_array_push(x_9, x_121); -x_135 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_135, 0, x_134); -x_23 = x_135; -x_24 = x_133; -goto block_29; -} -} -} -else -{ -uint8_t x_149; -lean_dec(x_43); -lean_dec(x_40); -lean_dec(x_38); -lean_dec(x_31); -lean_dec(x_22); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_4); -lean_dec(x_2); -x_149 = !lean_is_exclusive(x_45); -if (x_149 == 0) -{ -return x_45; -} -else -{ -lean_object* x_150; lean_object* x_151; lean_object* x_152; -x_150 = lean_ctor_get(x_45, 0); -x_151 = lean_ctor_get(x_45, 1); -lean_inc(x_151); -lean_inc(x_150); -lean_dec(x_45); -x_152 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_152, 0, x_150); -lean_ctor_set(x_152, 1, x_151); -return x_152; -} -} -} -else -{ -uint8_t x_153; -lean_dec(x_40); -lean_dec(x_38); -lean_dec(x_31); -lean_dec(x_22); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_4); -lean_dec(x_2); -x_153 = !lean_is_exclusive(x_42); -if (x_153 == 0) -{ +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_39); return x_42; } +} else { -lean_object* x_154; lean_object* x_155; lean_object* x_156; -x_154 = lean_ctor_get(x_42, 0); -x_155 = lean_ctor_get(x_42, 1); -lean_inc(x_155); -lean_inc(x_154); -lean_dec(x_42); -x_156 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_156, 0, x_154); -lean_ctor_set(x_156, 1, x_155); -return x_156; +lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_43 = lean_ctor_get(x_15, 0); +x_44 = lean_ctor_get(x_15, 1); +x_45 = lean_ctor_get(x_15, 2); +lean_inc(x_45); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_15); +x_46 = lean_ctor_get_uint8(x_16, sizeof(void*)*1); +x_47 = lean_ctor_get(x_16, 0); +lean_inc(x_47); +if (lean_is_exclusive(x_16)) { + lean_ctor_release(x_16, 0); + x_48 = x_16; +} else { + lean_dec_ref(x_16); + x_48 = lean_box(0); } +x_49 = lean_alloc_ctor(11, 2, 0); +lean_ctor_set(x_49, 0, x_1); +lean_ctor_set(x_49, 1, x_12); +lean_inc(x_10); +x_50 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_50, 0, x_10); +lean_ctor_set(x_50, 1, x_49); +x_51 = l_Std_PersistentArray_push___rarg(x_47, x_50); +if (lean_is_scalar(x_48)) { + x_52 = lean_alloc_ctor(0, 1, 1); +} else { + x_52 = x_48; +} +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set_uint8(x_52, sizeof(void*)*1, x_46); +x_53 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_53, 0, x_43); +lean_ctor_set(x_53, 1, x_44); +lean_ctor_set(x_53, 2, x_45); +lean_ctor_set(x_53, 3, x_52); +x_54 = lean_st_ref_set(x_8, x_53, x_17); +x_55 = lean_ctor_get(x_54, 1); +lean_inc(x_55); +if (lean_is_exclusive(x_54)) { + lean_ctor_release(x_54, 0); + lean_ctor_release(x_54, 1); + x_56 = x_54; +} else { + lean_dec_ref(x_54); + x_56 = lean_box(0); +} +x_57 = lean_box(0); +if (lean_is_scalar(x_56)) { + x_58 = lean_alloc_ctor(0, 2, 0); +} else { + x_58 = x_56; +} +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_55); +return x_58; +} +} +} +lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Elab_Deriving_mkInstanceCmds___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_6, 0); +x_10 = l_Lean_checkTraceOption(x_9, x_1); +x_11 = lean_box(x_10); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_8); +return x_12; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { +_start: +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; lean_object* x_71; lean_object* x_91; lean_object* x_92; lean_object* x_93; uint8_t x_94; +x_16 = l_Lean_Elab_Term_getCurrMacroScope(x_9, x_10, x_11, x_12, x_13, x_14, x_15); +x_17 = lean_ctor_get(x_16, 1); +lean_inc(x_17); +lean_dec(x_16); +x_18 = l_Lean_Elab_Term_getMainModule___rarg(x_14, x_17); +x_19 = lean_ctor_get(x_18, 1); +lean_inc(x_19); +if (lean_is_exclusive(x_18)) { + lean_ctor_release(x_18, 0); + lean_ctor_release(x_18, 1); + x_20 = x_18; +} else { + lean_dec_ref(x_18); + x_20 = lean_box(0); +} +x_21 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__2; +x_22 = lean_name_mk_string(x_1, x_21); +x_23 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__4; +lean_inc(x_22); +x_24 = lean_name_mk_string(x_22, x_23); +x_25 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__6; +lean_inc(x_22); +x_26 = lean_name_mk_string(x_22, x_25); +lean_inc(x_3); +lean_inc(x_2); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_2); +lean_ctor_set(x_27, 1, x_3); +lean_inc(x_27); +lean_inc(x_3); +x_28 = lean_array_push(x_3, x_27); +lean_inc(x_27); +lean_inc(x_28); +x_29 = lean_array_push(x_28, x_27); +lean_inc(x_27); +x_30 = lean_array_push(x_29, x_27); +lean_inc(x_27); +x_31 = lean_array_push(x_30, x_27); +lean_inc(x_27); +x_32 = lean_array_push(x_31, x_27); +lean_inc(x_27); +x_33 = lean_array_push(x_32, x_27); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_26); +lean_ctor_set(x_34, 1, x_33); +lean_inc(x_3); +x_35 = lean_array_push(x_3, x_34); +x_36 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__34; +lean_inc(x_22); +x_37 = lean_name_mk_string(x_22, x_36); +x_38 = l_Lean_command__Unif__hint______Where___x7c_x2d_u22a2_____closed__3; +lean_inc(x_4); +x_39 = lean_name_mk_string(x_4, x_38); +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_28); +lean_inc(x_3); +x_41 = lean_array_push(x_3, x_40); +x_42 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__38; +x_43 = lean_array_push(x_41, x_42); +lean_inc(x_27); +x_44 = lean_array_push(x_43, x_27); +x_45 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__41; +lean_inc(x_22); +x_46 = lean_name_mk_string(x_22, x_45); +lean_inc(x_3); +x_47 = l_Array_appendCore___rarg(x_3, x_5); +x_48 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_48, 0, x_2); +lean_ctor_set(x_48, 1, x_47); +lean_inc(x_3); +x_49 = lean_array_push(x_3, x_48); +x_50 = l_Lean_expandExplicitBindersAux_loop___closed__7; +x_51 = lean_name_mk_string(x_4, x_50); +x_52 = l_myMacro____x40_Init_Notation___hyg_12315____closed__10; +lean_inc(x_3); +x_53 = lean_array_push(x_3, x_52); +x_54 = lean_array_push(x_53, x_6); +x_55 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_55, 0, x_51); +lean_ctor_set(x_55, 1, x_54); +x_56 = lean_array_push(x_49, x_55); +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_46); +lean_ctor_set(x_57, 1, x_56); +x_58 = lean_array_push(x_44, x_57); +x_59 = l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__49; +x_60 = lean_name_mk_string(x_22, x_59); +x_61 = l_myMacro____x40_Init_Notation___hyg_12942____closed__14; +x_62 = lean_array_push(x_3, x_61); +x_63 = lean_array_push(x_62, x_8); +x_64 = lean_array_push(x_63, x_27); +x_65 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_65, 0, x_60); +lean_ctor_set(x_65, 1, x_64); +x_66 = lean_array_push(x_58, x_65); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_37); +lean_ctor_set(x_67, 1, x_66); +x_68 = lean_array_push(x_35, x_67); +x_69 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_69, 0, x_24); +lean_ctor_set(x_69, 1, x_68); +x_91 = lean_st_ref_get(x_14, x_19); +x_92 = lean_ctor_get(x_91, 0); +lean_inc(x_92); +x_93 = lean_ctor_get(x_92, 3); +lean_inc(x_93); +lean_dec(x_92); +x_94 = lean_ctor_get_uint8(x_93, sizeof(void*)*1); +lean_dec(x_93); +if (x_94 == 0) +{ +lean_object* x_95; uint8_t x_96; +x_95 = lean_ctor_get(x_91, 1); +lean_inc(x_95); +lean_dec(x_91); +x_96 = 0; +x_70 = x_96; +x_71 = x_95; +goto block_90; +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; uint8_t x_102; +x_97 = lean_ctor_get(x_91, 1); +lean_inc(x_97); +lean_dec(x_91); +x_98 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__4; +x_99 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Elab_Deriving_mkInstanceCmds___spec__2(x_98, x_9, x_10, x_11, x_12, x_13, x_14, x_97); +x_100 = lean_ctor_get(x_99, 0); +lean_inc(x_100); +x_101 = lean_ctor_get(x_99, 1); +lean_inc(x_101); +lean_dec(x_99); +x_102 = lean_unbox(x_100); +lean_dec(x_100); +x_70 = x_102; +x_71 = x_101; +goto block_90; +} +block_90: +{ +if (x_70 == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_array_push(x_7, x_69); +x_73 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_73, 0, x_72); +if (lean_is_scalar(x_20)) { + x_74 = lean_alloc_ctor(0, 2, 0); +} else { + x_74 = x_20; +} +lean_ctor_set(x_74, 0, x_73); +lean_ctor_set(x_74, 1, x_71); +return x_74; +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; +lean_dec(x_20); +lean_inc(x_69); +x_75 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_75, 0, x_69); +x_76 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; +x_77 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_75); +x_78 = l_Lean_KernelException_toMessageData___closed__15; +x_79 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +x_80 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__4; +x_81 = l_Lean_addTrace___at_Lean_Elab_Deriving_mkInstanceCmds___spec__1(x_80, x_79, x_9, x_10, x_11, x_12, x_13, x_14, x_71); +x_82 = !lean_is_exclusive(x_81); +if (x_82 == 0) +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_83 = lean_ctor_get(x_81, 0); +lean_dec(x_83); +x_84 = lean_array_push(x_7, x_69); +x_85 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_85, 0, x_84); +lean_ctor_set(x_81, 0, x_85); +return x_81; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_86 = lean_ctor_get(x_81, 1); +lean_inc(x_86); +lean_dec(x_81); +x_87 = lean_array_push(x_7, x_69); +x_88 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_88, 0, x_87); +x_89 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_89, 0, x_88); +lean_ctor_set(x_89, 1, x_86); +return x_89; +} +} +} +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16, lean_object* x_17) { +_start: +{ +lean_object* x_18; uint8_t x_19; +x_18 = lean_ctor_get(x_7, 1); +x_19 = lean_nat_dec_le(x_18, x_9); +if (x_19 == 0) +{ +lean_object* x_20; uint8_t x_21; +x_20 = lean_unsigned_to_nat(0u); +x_21 = lean_nat_dec_eq(x_8, x_20); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; +x_22 = lean_unsigned_to_nat(1u); +x_23 = lean_nat_sub(x_8, x_22); +lean_dec(x_8); +x_31 = l_Lean_instInhabitedInductiveVal; +x_32 = lean_array_get(x_31, x_6, x_9); +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +lean_dec(x_33); +x_35 = l_Array_contains___at_Lean_findField_x3f___spec__1(x_3, x_34); +lean_dec(x_34); +if (x_35 == 0) +{ +lean_object* x_36; +lean_dec(x_32); +x_36 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_36, 0, x_10); +x_24 = x_36; +x_25 = x_17; +goto block_30; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_37 = lean_ctor_get(x_1, 1); +x_38 = l_Lean_instInhabitedName; +x_39 = lean_array_get(x_38, x_37, x_9); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_32); +x_40 = l_Lean_Elab_Deriving_mkInductArgNames(x_32, x_11, x_12, x_13, x_14, x_15, x_16, x_17); +if (lean_obj_tag(x_40) == 0) +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_40, 0); +lean_inc(x_41); +x_42 = lean_ctor_get(x_40, 1); +lean_inc(x_42); +lean_dec(x_40); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_41); +x_43 = l_Lean_Elab_Deriving_mkImplicitBinders(x_41, x_11, x_12, x_13, x_14, x_15, x_16, x_42); +if (lean_obj_tag(x_43) == 0) +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_43, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_43, 1); +lean_inc(x_45); +lean_dec(x_43); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_41); +lean_inc(x_32); +lean_inc(x_2); +x_46 = l_Lean_Elab_Deriving_mkInstImplicitBinders(x_2, x_32, x_41, x_11, x_12, x_13, x_14, x_15, x_16, x_45); +if (lean_obj_tag(x_46) == 0) +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_47 = lean_ctor_get(x_46, 0); +lean_inc(x_47); +x_48 = lean_ctor_get(x_46, 1); +lean_inc(x_48); +lean_dec(x_46); +x_49 = l_Array_append___rarg(x_44, x_47); +lean_dec(x_47); +x_50 = l_Lean_Elab_Deriving_mkInductiveApp(x_32, x_41, x_11, x_12, x_13, x_14, x_15, x_16, x_48); +x_51 = lean_ctor_get(x_50, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_50, 1); +lean_inc(x_52); +lean_dec(x_50); +x_53 = l_Lean_Elab_Term_getCurrMacroScope(x_11, x_12, x_13, x_14, x_15, x_16, x_52); +x_54 = lean_ctor_get(x_53, 1); +lean_inc(x_54); +lean_dec(x_53); +x_55 = l_Lean_Elab_Term_getMainModule___rarg(x_16, x_54); +x_56 = lean_ctor_get(x_55, 1); +lean_inc(x_56); +lean_dec(x_55); +lean_inc(x_2); +x_57 = lean_mk_syntax_ident(x_2); +lean_inc(x_5); +x_58 = lean_array_push(x_5, x_57); +lean_inc(x_5); +x_59 = lean_array_push(x_5, x_51); +x_60 = l_Lean_nullKind___closed__2; +x_61 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_61, 0, x_60); +lean_ctor_set(x_61, 1, x_59); +x_62 = lean_array_push(x_58, x_61); +x_63 = l_myMacro____x40_Init_Notation___hyg_2022____closed__4; +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_63); +lean_ctor_set(x_64, 1, x_62); +if (x_4 == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_65 = lean_mk_syntax_ident(x_39); +x_66 = l_Lean_Parser_Syntax_addPrec___closed__4; +x_67 = l_myMacro____x40_Init_Notation___hyg_2022____closed__2; +lean_inc(x_5); +x_68 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3___lambda__1(x_66, x_60, x_5, x_67, x_49, x_64, x_10, x_65, x_11, x_12, x_13, x_14, x_15, x_16, x_56); +lean_dec(x_49); +x_69 = lean_ctor_get(x_68, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_68, 1); +lean_inc(x_70); +lean_dec(x_68); +x_24 = x_69; +x_25 = x_70; +goto block_30; +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_71 = l_Lean_Elab_Term_getCurrMacroScope(x_11, x_12, x_13, x_14, x_15, x_16, x_56); +x_72 = lean_ctor_get(x_71, 1); +lean_inc(x_72); +lean_dec(x_71); +x_73 = l_Lean_Elab_Term_getMainModule___rarg(x_16, x_72); +x_74 = lean_ctor_get(x_73, 1); +lean_inc(x_74); +lean_dec(x_73); +x_75 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkLocalInstanceLetDecls___spec__1___closed__1; +lean_inc(x_5); +x_76 = lean_array_push(x_5, x_75); +x_77 = lean_mk_syntax_ident(x_39); +lean_inc(x_5); +x_78 = lean_array_push(x_5, x_77); +x_79 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_79, 0, x_60); +lean_ctor_set(x_79, 1, x_78); +x_80 = lean_array_push(x_76, x_79); +x_81 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkLocalInstanceLetDecls___spec__1___closed__2; +x_82 = lean_array_push(x_80, x_81); +x_83 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_83); +lean_ctor_set(x_84, 1, x_82); +x_85 = l_Lean_Parser_Syntax_addPrec___closed__4; +x_86 = l_myMacro____x40_Init_Notation___hyg_2022____closed__2; +lean_inc(x_5); +x_87 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3___lambda__1(x_85, x_60, x_5, x_86, x_49, x_64, x_10, x_84, x_11, x_12, x_13, x_14, x_15, x_16, x_74); +lean_dec(x_49); +x_88 = lean_ctor_get(x_87, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_87, 1); +lean_inc(x_89); +lean_dec(x_87); +x_24 = x_88; +x_25 = x_89; +goto block_30; } } else { -uint8_t x_157; -lean_dec(x_38); -lean_dec(x_31); -lean_dec(x_22); +uint8_t x_90; +lean_dec(x_44); +lean_dec(x_41); +lean_dec(x_39); +lean_dec(x_32); +lean_dec(x_23); +lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); @@ -2686,166 +2913,802 @@ lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_4); +lean_dec(x_5); lean_dec(x_2); -x_157 = !lean_is_exclusive(x_39); -if (x_157 == 0) +x_90 = !lean_is_exclusive(x_46); +if (x_90 == 0) { -return x_39; +return x_46; } else { -lean_object* x_158; lean_object* x_159; lean_object* x_160; -x_158 = lean_ctor_get(x_39, 0); -x_159 = lean_ctor_get(x_39, 1); -lean_inc(x_159); -lean_inc(x_158); -lean_dec(x_39); -x_160 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_160, 0, x_158); -lean_ctor_set(x_160, 1, x_159); -return x_160; +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_46, 0); +x_92 = lean_ctor_get(x_46, 1); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_46); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; } } } -block_29: +else { -lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_25 = lean_ctor_get(x_23, 0); -lean_inc(x_25); +uint8_t x_94; +lean_dec(x_41); +lean_dec(x_39); +lean_dec(x_32); lean_dec(x_23); -x_26 = lean_ctor_get(x_6, 2); -x_27 = lean_nat_add(x_8, x_26); -lean_dec(x_8); -x_7 = x_22; -x_8 = x_27; -x_9 = x_25; -x_16 = x_24; +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_5); +lean_dec(x_2); +x_94 = !lean_is_exclusive(x_43); +if (x_94 == 0) +{ +return x_43; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_95 = lean_ctor_get(x_43, 0); +x_96 = lean_ctor_get(x_43, 1); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_43); +x_97 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_97, 0, x_95); +lean_ctor_set(x_97, 1, x_96); +return x_97; +} +} +} +else +{ +uint8_t x_98; +lean_dec(x_39); +lean_dec(x_32); +lean_dec(x_23); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_5); +lean_dec(x_2); +x_98 = !lean_is_exclusive(x_40); +if (x_98 == 0) +{ +return x_40; +} +else +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_99 = lean_ctor_get(x_40, 0); +x_100 = lean_ctor_get(x_40, 1); +lean_inc(x_100); +lean_inc(x_99); +lean_dec(x_40); +x_101 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_101, 0, x_99); +lean_ctor_set(x_101, 1, x_100); +return x_101; +} +} +} +block_30: +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_24, 0); +lean_inc(x_26); +lean_dec(x_24); +x_27 = lean_ctor_get(x_7, 2); +x_28 = lean_nat_add(x_9, x_27); +lean_dec(x_9); +x_8 = x_23; +x_9 = x_28; +x_10 = x_26; +x_17 = x_25; goto _start; } } else { -lean_object* x_161; +lean_object* x_102; +lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); -lean_dec(x_10); +lean_dec(x_9); lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_4); +lean_dec(x_5); lean_dec(x_2); -x_161 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_161, 0, x_9); -lean_ctor_set(x_161, 1, x_16); -return x_161; +x_102 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_102, 0, x_10); +lean_ctor_set(x_102, 1, x_17); +return x_102; } } else { -lean_object* x_162; +lean_object* x_103; +lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); -lean_dec(x_10); +lean_dec(x_9); lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_4); +lean_dec(x_5); lean_dec(x_2); -x_162 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_162, 0, x_9); -lean_ctor_set(x_162, 1, x_16); -return x_162; +x_103 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_103, 0, x_10); +lean_ctor_set(x_103, 1, x_17); +return x_103; } } } -lean_object* l_Lean_Elab_Deriving_mkInstanceCmds(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_Elab_Deriving_mkInstanceCmds(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_11 = lean_ctor_get(x_1, 0); -x_12 = lean_array_get_size(x_11); -x_13 = lean_unsigned_to_nat(0u); -x_14 = lean_unsigned_to_nat(1u); -lean_inc(x_12); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_13); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Array_empty___closed__1; -x_17 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__1(x_1, x_2, x_3, x_16, x_11, x_15, x_12, x_13, x_16, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -lean_dec(x_15); -if (lean_obj_tag(x_17) == 0) +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_12 = lean_ctor_get(x_1, 0); +x_13 = lean_array_get_size(x_12); +x_14 = lean_unsigned_to_nat(0u); +x_15 = lean_unsigned_to_nat(1u); +lean_inc(x_13); +x_16 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_13); +lean_ctor_set(x_16, 2, x_15); +x_17 = l_Array_empty___closed__1; +x_18 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3(x_1, x_2, x_3, x_4, x_17, x_12, x_16, x_13, x_14, x_17, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_16); +if (lean_obj_tag(x_18) == 0) { -uint8_t x_18; -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) +uint8_t x_19; +x_19 = !lean_is_exclusive(x_18); +if (x_19 == 0) { -return x_17; +return x_18; } else { -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_18, 0); +x_21 = lean_ctor_get(x_18, 1); +lean_inc(x_21); lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; +lean_dec(x_18); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; } } else { -uint8_t x_22; -x_22 = !lean_is_exclusive(x_17); -if (x_22 == 0) +uint8_t x_23; +x_23 = !lean_is_exclusive(x_18); +if (x_23 == 0) { -return x_17; +return x_18; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_17, 0); -x_24 = lean_ctor_get(x_17, 1); +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_18, 0); +x_25 = lean_ctor_get(x_18, 1); +lean_inc(x_25); lean_inc(x_24); -lean_inc(x_23); +lean_dec(x_18); +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +} +} +lean_object* l_Lean_addTrace___at_Lean_Elab_Deriving_mkInstanceCmds___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; +x_10 = l_Lean_addTrace___at_Lean_Elab_Deriving_mkInstanceCmds___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_10; +} +} +lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Elab_Deriving_mkInstanceCmds___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Elab_Deriving_mkInstanceCmds___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_9; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { +_start: +{ +lean_object* x_16; +x_16 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_5); +return x_16; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3___boxed(lean_object** _args) { +lean_object* x_1 = _args[0]; +lean_object* x_2 = _args[1]; +lean_object* x_3 = _args[2]; +lean_object* x_4 = _args[3]; +lean_object* x_5 = _args[4]; +lean_object* x_6 = _args[5]; +lean_object* x_7 = _args[6]; +lean_object* x_8 = _args[7]; +lean_object* x_9 = _args[8]; +lean_object* x_10 = _args[9]; +lean_object* x_11 = _args[10]; +lean_object* x_12 = _args[11]; +lean_object* x_13 = _args[12]; +lean_object* x_14 = _args[13]; +lean_object* x_15 = _args[14]; +lean_object* x_16 = _args[15]; +lean_object* x_17 = _args[16]; +_start: +{ +uint8_t x_18; lean_object* x_19; +x_18 = lean_unbox(x_4); +lean_dec(x_4); +x_19 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__3(x_1, x_2, x_3, x_18, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_1); +return x_19; +} +} +lean_object* l_Lean_Elab_Deriving_mkInstanceCmds___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +uint8_t x_12; lean_object* x_13; +x_12 = lean_unbox(x_4); +lean_dec(x_4); +x_13 = l_Lean_Elab_Deriving_mkInstanceCmds(x_1, x_2, x_3, x_12, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_3); +lean_dec(x_1); +return x_13; +} +} +lean_object* l_Lean_Elab_Deriving_Binary_mkHeader___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +x_10 = l_Lean_Elab_Deriving_mkInductArgNames(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_11); +x_13 = l_Lean_Elab_Deriving_mkImplicitBinders(x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_12); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +lean_inc(x_11); +lean_inc(x_2); +x_16 = l_Lean_Elab_Deriving_mkInductiveApp(x_2, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_15); +x_17 = lean_ctor_get(x_16, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_16, 1); +lean_inc(x_18); +lean_dec(x_16); +x_19 = l_Lean_Meta_mkArrow___closed__2; +x_20 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_19, x_7, x_8, x_18); +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +x_23 = l_myMacro____x40_Init_NotationExtra___hyg_2986____closed__5; +x_24 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_23, x_7, x_8, x_22); +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_11); +x_27 = l_Lean_Elab_Deriving_mkInstImplicitBinders(x_1, x_2, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; +x_28 = lean_ctor_get(x_27, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +x_30 = l_Array_append___rarg(x_14, x_28); +lean_dec(x_28); +x_31 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_29); +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +x_33 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_32); +x_34 = lean_ctor_get(x_33, 1); +lean_inc(x_34); +lean_dec(x_33); +lean_inc(x_21); +x_35 = lean_mk_syntax_ident(x_21); +x_36 = l_Array_empty___closed__1; +x_37 = lean_array_push(x_36, x_35); +x_38 = l_Lean_nullKind___closed__2; +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_38); +lean_ctor_set(x_39, 1, x_37); +x_40 = l_myMacro____x40_Init_Notation___hyg_11187____closed__9; +x_41 = lean_array_push(x_40, x_39); +x_42 = l_myMacro____x40_Init_Notation___hyg_12315____closed__11; +x_43 = lean_array_push(x_42, x_17); +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_38); +lean_ctor_set(x_44, 1, x_43); +lean_inc(x_44); +x_45 = lean_array_push(x_41, x_44); +x_46 = l_myMacro____x40_Init_Notation___hyg_1130____closed__23; +x_47 = lean_array_push(x_45, x_46); +x_48 = l_myMacro____x40_Init_Notation___hyg_658____closed__8; +x_49 = lean_array_push(x_47, x_48); +x_50 = l_Lean_Elab_Term_mkExplicitBinder___closed__1; +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_49); +x_52 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_34); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_53 = lean_ctor_get(x_52, 1); +lean_inc(x_53); +lean_dec(x_52); +x_54 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_53); +lean_dec(x_8); +x_55 = !lean_is_exclusive(x_54); +if (x_55 == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_56 = lean_ctor_get(x_54, 0); +lean_dec(x_56); +lean_inc(x_25); +x_57 = lean_mk_syntax_ident(x_25); +x_58 = lean_array_push(x_36, x_57); +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_38); +lean_ctor_set(x_59, 1, x_58); +x_60 = lean_array_push(x_40, x_59); +x_61 = lean_array_push(x_60, x_44); +x_62 = lean_array_push(x_61, x_46); +x_63 = lean_array_push(x_62, x_48); +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_50); +lean_ctor_set(x_64, 1, x_63); +x_65 = l_Lean_Syntax_mkApp___closed__1; +x_66 = lean_array_push(x_65, x_51); +x_67 = lean_array_push(x_66, x_64); +x_68 = l_Array_append___rarg(x_30, x_67); +lean_dec(x_67); +x_69 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_69, 0, x_68); +lean_ctor_set(x_69, 1, x_11); +lean_ctor_set(x_69, 2, x_21); +lean_ctor_set(x_69, 3, x_25); +lean_ctor_set(x_54, 0, x_69); +return x_54; +} +else +{ +lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_70 = lean_ctor_get(x_54, 1); +lean_inc(x_70); +lean_dec(x_54); +lean_inc(x_25); +x_71 = lean_mk_syntax_ident(x_25); +x_72 = lean_array_push(x_36, x_71); +x_73 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_73, 0, x_38); +lean_ctor_set(x_73, 1, x_72); +x_74 = lean_array_push(x_40, x_73); +x_75 = lean_array_push(x_74, x_44); +x_76 = lean_array_push(x_75, x_46); +x_77 = lean_array_push(x_76, x_48); +x_78 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_78, 0, x_50); +lean_ctor_set(x_78, 1, x_77); +x_79 = l_Lean_Syntax_mkApp___closed__1; +x_80 = lean_array_push(x_79, x_51); +x_81 = lean_array_push(x_80, x_78); +x_82 = l_Array_append___rarg(x_30, x_81); +lean_dec(x_81); +x_83 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_83, 0, x_82); +lean_ctor_set(x_83, 1, x_11); +lean_ctor_set(x_83, 2, x_21); +lean_ctor_set(x_83, 3, x_25); +x_84 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_84, 0, x_83); +lean_ctor_set(x_84, 1, x_70); +return x_84; +} +} +else +{ +uint8_t x_85; +lean_dec(x_25); +lean_dec(x_21); lean_dec(x_17); -x_25 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); +lean_dec(x_14); +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_85 = !lean_is_exclusive(x_27); +if (x_85 == 0) +{ +return x_27; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_27, 0); +x_87 = lean_ctor_get(x_27, 1); +lean_inc(x_87); +lean_inc(x_86); +lean_dec(x_27); +x_88 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_88, 0, x_86); +lean_ctor_set(x_88, 1, x_87); +return x_88; +} +} +} +else +{ +uint8_t x_89; +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_89 = !lean_is_exclusive(x_13); +if (x_89 == 0) +{ +return x_13; +} +else +{ +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_13, 0); +x_91 = lean_ctor_get(x_13, 1); +lean_inc(x_91); +lean_inc(x_90); +lean_dec(x_13); +x_92 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_92, 0, x_90); +lean_ctor_set(x_92, 1, x_91); +return x_92; +} +} +} +else +{ +uint8_t x_93; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_93 = !lean_is_exclusive(x_10); +if (x_93 == 0) +{ +return x_10; +} +else +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_94 = lean_ctor_get(x_10, 0); +x_95 = lean_ctor_get(x_10, 1); +lean_inc(x_95); +lean_inc(x_94); +lean_dec(x_10); +x_96 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_96, 0, x_94); +lean_ctor_set(x_96, 1, x_95); +return x_96; +} +} +} +} +lean_object* l_Lean_Elab_Deriving_Binary_mkHeader(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Deriving_Binary_mkHeader___rarg), 9, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Deriving_Binary_mkHeader___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_Deriving_Binary_mkHeader(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Deriving_Binary_mkDiscr(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_9 = l_Lean_Elab_Term_getCurrMacroScope(x_2, x_3, x_4, x_5, x_6, x_7, x_8); +x_10 = lean_ctor_get(x_9, 1); +lean_inc(x_10); +lean_dec(x_9); +x_11 = l_Lean_Elab_Term_getMainModule___rarg(x_7, x_10); +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_13 = lean_ctor_get(x_11, 0); +lean_dec(x_13); +x_14 = lean_mk_syntax_ident(x_1); +x_15 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_261____closed__19; +x_16 = lean_array_push(x_15, x_14); +x_17 = l_Lean_Parser_Term_matchDiscr___elambda__1___closed__1; +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +lean_ctor_set(x_11, 0, x_18); +return x_11; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_19 = lean_ctor_get(x_11, 1); +lean_inc(x_19); +lean_dec(x_11); +x_20 = lean_mk_syntax_ident(x_1); +x_21 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_261____closed__19; +x_22 = lean_array_push(x_21, x_20); +x_23 = l_Lean_Parser_Term_matchDiscr___elambda__1___closed__1; +x_24 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_22); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_19); return x_25; } } } -} -lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +lean_object* l_Lean_Elab_Deriving_Binary_mkDiscr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_17; -x_17 = l_Std_Range_forIn_loop___at_Lean_Elab_Deriving_mkInstanceCmds___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); +lean_object* x_9; +x_9 = l_Lean_Elab_Deriving_Binary_mkDiscr(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); +lean_dec(x_4); lean_dec(x_3); -lean_dec(x_1); -return x_17; +lean_dec(x_2); +return x_9; } } -lean_object* l_Lean_Elab_Deriving_mkInstanceCmds___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_Binary_mkDiscrs___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { -lean_object* x_11; -x_11 = l_Lean_Elab_Deriving_mkInstanceCmds(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -lean_dec(x_3); +uint8_t x_12; +x_12 = x_3 < x_2; +if (x_12 == 0) +{ +lean_object* x_13; +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_4); +lean_ctor_set(x_13, 1, x_11); +return x_13; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; size_t x_20; size_t x_21; +x_14 = lean_ctor_get(x_1, 0); +x_15 = lean_array_uget(x_14, x_3); +x_16 = l_Lean_Elab_Deriving_Binary_mkDiscr(x_15, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +x_17 = lean_ctor_get(x_16, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_16, 1); +lean_inc(x_18); +lean_dec(x_16); +x_19 = lean_array_push(x_4, x_17); +x_20 = 1; +x_21 = x_3 + x_20; +x_3 = x_21; +x_4 = x_19; +x_11 = x_18; +goto _start; +} +} +} +lean_object* l_Lean_Elab_Deriving_Binary_mkDiscrs(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; lean_object* x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +x_11 = lean_ctor_get(x_2, 1); +lean_inc(x_11); +lean_dec(x_2); +x_12 = lean_array_get_size(x_10); +x_13 = l_Array_toSubarray___rarg(x_10, x_11, x_12); +x_14 = lean_ctor_get(x_13, 2); +lean_inc(x_14); +x_15 = lean_usize_of_nat(x_14); +lean_dec(x_14); +x_16 = lean_ctor_get(x_13, 1); +lean_inc(x_16); +x_17 = lean_usize_of_nat(x_16); +lean_dec(x_16); +x_18 = l_Array_empty___closed__1; +x_19 = l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_Binary_mkDiscrs___spec__1(x_13, x_15, x_17, x_18, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_13); +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = lean_ctor_get(x_1, 2); +lean_inc(x_22); +x_23 = l_Lean_Elab_Deriving_Binary_mkDiscr(x_22, x_3, x_4, x_5, x_6, x_7, x_8, x_21); +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +x_26 = lean_ctor_get(x_1, 3); +lean_inc(x_26); lean_dec(x_1); -return x_11; +x_27 = l_Lean_Elab_Deriving_Binary_mkDiscr(x_26, x_3, x_4, x_5, x_6, x_7, x_8, x_25); +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_29 = lean_ctor_get(x_27, 0); +x_30 = l_Lean_Syntax_mkApp___closed__1; +x_31 = lean_array_push(x_30, x_24); +x_32 = lean_array_push(x_31, x_29); +x_33 = l_Array_append___rarg(x_20, x_32); +lean_dec(x_32); +lean_ctor_set(x_27, 0, x_33); +return x_27; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_34 = lean_ctor_get(x_27, 0); +x_35 = lean_ctor_get(x_27, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_27); +x_36 = l_Lean_Syntax_mkApp___closed__1; +x_37 = lean_array_push(x_36, x_24); +x_38 = lean_array_push(x_37, x_34); +x_39 = l_Array_append___rarg(x_20, x_38); +lean_dec(x_38); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_35); +return x_40; +} +} +} +lean_object* l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_Binary_mkDiscrs___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +size_t x_12; size_t x_13; lean_object* x_14; +x_12 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_13 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_14 = l_Subarray_forInUnsafe_loop___at_Lean_Elab_Deriving_Binary_mkDiscrs___spec__1(x_1, x_12, x_13, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_1); +return x_14; +} +} +lean_object* l_Lean_Elab_Deriving_Binary_mkDiscrs___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; +x_10 = l_Lean_Elab_Deriving_Binary_mkDiscrs(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_10; } } lean_object* initialize_Init(lean_object*); diff --git a/stage0/stdlib/Lean/Elab/Inductive.c b/stage0/stdlib/Lean/Elab/Inductive.c index ee612d5886..eff12583e2 100644 --- a/stage0/stdlib/Lean/Elab/Inductive.c +++ b/stage0/stdlib/Lean/Elab/Inductive.c @@ -16,7 +16,7 @@ extern "C" { lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_reverse___rarg(lean_object*); lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___rarg___closed__3; -extern lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4; +lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4; lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_elabCtors(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_5846____closed__4; lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_elabHeaderAux___lambda__2___closed__1; @@ -382,6 +382,7 @@ lean_object* l_Lean_Elab_Command_elabInductiveViews___lambda__2(lean_object*, le uint8_t lean_expr_eqv(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_updateResultingUniverse___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkIndFVar2Const___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3; lean_object* l_List_mapM___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_elabCtors___spec__2___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_List_mapM___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_replaceIndFVarsWithConsts___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -2856,6 +2857,23 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } +static lean_object* _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("\nexpected type"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { @@ -2887,7 +2905,7 @@ x_16 = l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResult x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); -x_18 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4; +x_18 = l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4; x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); @@ -17097,6 +17115,10 @@ l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___ lean_mark_persistent(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__1); l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__2 = _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__2(); lean_mark_persistent(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__2); +l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3 = _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3(); +lean_mark_persistent(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3); +l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4 = _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4(); +lean_mark_persistent(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4); l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___closed__1 = _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___closed__1(); lean_mark_persistent(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___closed__1); l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___closed__2 = _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Tactic/Induction.c b/stage0/stdlib/Lean/Elab/Tactic/Induction.c index 2dce5a3599..ffc94b7c2d 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Induction.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Induction.c @@ -31,7 +31,7 @@ lean_object* lean_erase_macro_scopes(lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_evalInduction___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_checkCasesResult_loop___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_Array_forInUnsafe_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___spec__2___closed__1; -lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438_(lean_object*); +lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437_(lean_object*); lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Tactic_ElimApp_evalAlts___spec__6___lambda__1___closed__5; lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getGeneralizingFVarIds___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -211,7 +211,6 @@ lean_object* l_Lean_Meta_intro1Core(lean_object*, uint8_t, lean_object*, lean_ob lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecFromUsingLoop___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_pure___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecInfoDefault_match__4(lean_object*); -lean_object* l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4; lean_object* l_Lean_Elab_Tactic_ElimApp_evalAlts_match__8___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecFromUsingLoop___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields_match__2(lean_object*); @@ -241,6 +240,7 @@ uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Elab_Tactic_Induction_0__Lean lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecInfo___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalInduction_match__2(lean_object*); +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_tryClear(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Elab_Tactic_getRecFromUsing___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* l___private_Lean_Meta_WHNF_0__Lean_Meta_whnfEasyCases___at_Lean_Meta_whnfCore___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -367,12 +367,12 @@ lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_evalCasesUsing___spec_ lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_checkAltNames___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* l_Lean_Elab_Tactic_ElimApp_mkElimApp_loop(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_Elab_Tactic_evalCasesUsing___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1; lean_object* l_Lean_Elab_Tactic_ElimApp_mkElimApp_loop___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecInfoDefault___spec__1___closed__1; extern lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__4; lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getBindingName(lean_object*); +lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1; lean_object* l_Lean_Elab_Tactic_evalInduction___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkConst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Tactic_getRecFromUsing___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -423,6 +423,7 @@ lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Elab_Tactic_Induction_0_ lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecFromUsingLoop_match__2___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2; lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecInfo_match__2___rarg(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; lean_object* l_Lean_Expr_bindingName_x21(lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecInfoDefault___spec__1(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* l_Lean_Elab_Tactic_evalCasesOn___closed__2; @@ -455,7 +456,6 @@ lean_object* l_Lean_Elab_Tactic_evalAlt___boxed(lean_object*, lean_object*, lean uint8_t l_Lean_Name_isSuffixOf(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_saveBacktrackableState___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Elab_Tactic_getRecFromUsing___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3; lean_object* l_Lean_Elab_Tactic_evalInduction(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_setGoals(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_evalCasesOn___spec__3___boxed(lean_object*, lean_object*, lean_object*); @@ -604,7 +604,6 @@ lean_object* l_Lean_Elab_Tactic_elabTerm___boxed(lean_object*, lean_object*, lea lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_processResult_match__1(lean_object*); lean_object* l_Lean_Elab_Tactic_ElimApp_evalAlts_match__3___rarg(lean_object*, lean_object*); lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Tactic_ElimApp_evalAlts___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__8; lean_object* l_Lean_Elab_Tactic_ElimApp_evalAlts_match__9___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_liftMetaTacticAux___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_findSomeM_x3f___rarg___closed__1; @@ -3164,23 +3163,6 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("\nexpected type"); -return x_1; -} -} -static lean_object* _init_l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} lean_object* l_Lean_Elab_Tactic_ElimApp_setMotiveArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { @@ -3261,79 +3243,80 @@ x_31 = lean_unbox(x_30); lean_dec(x_30); if (x_31 == 0) { -lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; lean_dec(x_2); x_32 = lean_ctor_get(x_29, 1); lean_inc(x_32); lean_dec(x_29); -x_33 = l_Lean_indentExpr(x_20); -x_34 = l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__2; -x_35 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_35, 0, x_34); -lean_ctor_set(x_35, 1, x_33); -x_36 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__8; -x_37 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_37, 0, x_35); -lean_ctor_set(x_37, 1, x_36); -x_38 = l_Lean_indentExpr(x_23); -x_39 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_39, 0, x_37); -lean_ctor_set(x_39, 1, x_38); -x_40 = l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4; +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_33 = l_Lean_Meta_mkHasTypeButIsExpectedMsg(x_23, x_27, x_4, x_5, x_6, x_7, x_32); +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_33, 1); +lean_inc(x_35); +lean_dec(x_33); +x_36 = l_Lean_indentExpr(x_20); +x_37 = l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__2; +x_38 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_36); +x_39 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; +x_40 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); x_41 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_41, 0, x_39); -lean_ctor_set(x_41, 1, x_40); -x_42 = l_Lean_indentExpr(x_27); +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_41, 1, x_34); +x_42 = l_Lean_KernelException_toMessageData___closed__15; x_43 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_43, 0, x_41); lean_ctor_set(x_43, 1, x_42); -x_44 = l_Lean_KernelException_toMessageData___closed__15; -x_45 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_45, 0, x_43); -lean_ctor_set(x_45, 1, x_44); -x_46 = l_Lean_throwError___at_Lean_Meta_whnf___spec__1(x_45, x_4, x_5, x_6, x_7, x_32); +x_44 = l_Lean_throwError___at_Lean_Meta_whnf___spec__1(x_43, x_4, x_5, x_6, x_7, x_35); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -x_47 = !lean_is_exclusive(x_46); -if (x_47 == 0) +x_45 = !lean_is_exclusive(x_44); +if (x_45 == 0) { -return x_46; +return x_44; } else { -lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_48 = lean_ctor_get(x_46, 0); -x_49 = lean_ctor_get(x_46, 1); +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_44, 0); +x_47 = lean_ctor_get(x_44, 1); +lean_inc(x_47); +lean_inc(x_46); +lean_dec(x_44); +x_48 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_48, 0, x_46); +lean_ctor_set(x_48, 1, x_47); +return x_48; +} +} +else +{ +lean_object* x_49; lean_object* x_50; +lean_dec(x_27); +lean_dec(x_23); +x_49 = lean_ctor_get(x_29, 1); lean_inc(x_49); -lean_inc(x_48); -lean_dec(x_46); -x_50 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_50, 0, x_48); -lean_ctor_set(x_50, 1, x_49); +lean_dec(x_29); +x_50 = l_Lean_Meta_assignExprMVar(x_2, x_20, x_4, x_5, x_6, x_7, x_49); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); return x_50; } } else { -lean_object* x_51; lean_object* x_52; -lean_dec(x_27); -lean_dec(x_23); -x_51 = lean_ctor_get(x_29, 1); -lean_inc(x_51); -lean_dec(x_29); -x_52 = l_Lean_Meta_assignExprMVar(x_2, x_20, x_4, x_5, x_6, x_7, x_51); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -return x_52; -} -} -else -{ -uint8_t x_53; +uint8_t x_51; lean_dec(x_27); lean_dec(x_23); lean_dec(x_20); @@ -3342,29 +3325,29 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -x_53 = !lean_is_exclusive(x_29); -if (x_53 == 0) +x_51 = !lean_is_exclusive(x_29); +if (x_51 == 0) { return x_29; } else { -lean_object* x_54; lean_object* x_55; lean_object* x_56; -x_54 = lean_ctor_get(x_29, 0); -x_55 = lean_ctor_get(x_29, 1); -lean_inc(x_55); -lean_inc(x_54); +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_29, 0); +x_53 = lean_ctor_get(x_29, 1); +lean_inc(x_53); +lean_inc(x_52); lean_dec(x_29); -x_56 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_56, 0, x_54); -lean_ctor_set(x_56, 1, x_55); -return x_56; +x_54 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_53); +return x_54; } } } else { -uint8_t x_57; +uint8_t x_55; lean_dec(x_23); lean_dec(x_20); lean_dec(x_7); @@ -3372,109 +3355,109 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -x_57 = !lean_is_exclusive(x_26); -if (x_57 == 0) +x_55 = !lean_is_exclusive(x_26); +if (x_55 == 0) { return x_26; } else { -lean_object* x_58; lean_object* x_59; lean_object* x_60; -x_58 = lean_ctor_get(x_26, 0); -x_59 = lean_ctor_get(x_26, 1); -lean_inc(x_59); -lean_inc(x_58); +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_26, 0); +x_57 = lean_ctor_get(x_26, 1); +lean_inc(x_57); +lean_inc(x_56); lean_dec(x_26); -x_60 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_60, 0, x_58); -lean_ctor_set(x_60, 1, x_59); -return x_60; +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_57); +return x_58; } } } else { -uint8_t x_61; +uint8_t x_59; lean_dec(x_20); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -x_61 = !lean_is_exclusive(x_22); -if (x_61 == 0) +x_59 = !lean_is_exclusive(x_22); +if (x_59 == 0) { return x_22; } else { -lean_object* x_62; lean_object* x_63; lean_object* x_64; -x_62 = lean_ctor_get(x_22, 0); -x_63 = lean_ctor_get(x_22, 1); -lean_inc(x_63); -lean_inc(x_62); +lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_60 = lean_ctor_get(x_22, 0); +x_61 = lean_ctor_get(x_22, 1); +lean_inc(x_61); +lean_inc(x_60); lean_dec(x_22); -x_64 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_64, 0, x_62); -lean_ctor_set(x_64, 1, x_63); -return x_64; +x_62 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_62, 0, x_60); +lean_ctor_set(x_62, 1, x_61); +return x_62; } } } else { -uint8_t x_65; +uint8_t x_63; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -x_65 = !lean_is_exclusive(x_19); -if (x_65 == 0) +x_63 = !lean_is_exclusive(x_19); +if (x_63 == 0) { return x_19; } else { -lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_66 = lean_ctor_get(x_19, 0); -x_67 = lean_ctor_get(x_19, 1); -lean_inc(x_67); -lean_inc(x_66); +lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_64 = lean_ctor_get(x_19, 0); +x_65 = lean_ctor_get(x_19, 1); +lean_inc(x_65); +lean_inc(x_64); lean_dec(x_19); -x_68 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_68, 0, x_66); -lean_ctor_set(x_68, 1, x_67); -return x_68; +x_66 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_66, 0, x_64); +lean_ctor_set(x_66, 1, x_65); +return x_66; } } } else { -uint8_t x_69; +uint8_t x_67; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_69 = !lean_is_exclusive(x_10); -if (x_69 == 0) +x_67 = !lean_is_exclusive(x_10); +if (x_67 == 0) { return x_10; } else { -lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_70 = lean_ctor_get(x_10, 0); -x_71 = lean_ctor_get(x_10, 1); -lean_inc(x_71); -lean_inc(x_70); +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_10, 0); +x_69 = lean_ctor_get(x_10, 1); +lean_inc(x_69); +lean_inc(x_68); lean_dec(x_10); -x_72 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_72, 0, x_70); -lean_ctor_set(x_72, 1, x_71); -return x_72; +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 1, x_69); +return x_70; } } } @@ -17430,7 +17413,7 @@ x_15 = l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_elabTargets___spec__1(x_13, return x_15; } } -static lean_object* _init_l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1() { +static lean_object* _init_l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -17440,11 +17423,11 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438_(lean_object* x_1) { +lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1; +x_2 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1; x_3 = l_Lean_registerTraceClass(x_2, x_1); return x_3; } @@ -17879,7 +17862,7 @@ lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; x_110 = lean_ctor_get(x_105, 1); lean_inc(x_110); lean_dec(x_105); -x_111 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1; +x_111 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1; x_112 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_checkAltCtorNames___spec__3(x_111, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_110); x_113 = lean_ctor_get(x_112, 0); lean_inc(x_113); @@ -18004,7 +17987,7 @@ x_66 = l_Lean_KernelException_toMessageData___closed__15; x_67 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_67, 0, x_65); lean_ctor_set(x_67, 1, x_66); -x_68 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1; +x_68 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1; x_69 = l_Lean_addTrace___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_checkAltCtorNames___spec__2(x_68, x_67, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_58); x_70 = lean_ctor_get(x_69, 1); lean_inc(x_70); @@ -18040,7 +18023,7 @@ lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean x_78 = lean_ctor_get(x_73, 1); lean_inc(x_78); lean_dec(x_73); -x_79 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1; +x_79 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1; x_80 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_checkAltCtorNames___spec__3(x_79, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_78); x_81 = lean_ctor_get(x_80, 0); lean_inc(x_81); @@ -18090,7 +18073,7 @@ x_99 = l_Lean_KernelException_toMessageData___closed__15; x_100 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_100, 0, x_98); lean_ctor_set(x_100, 1, x_99); -x_101 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1; +x_101 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1; x_102 = l_Lean_addTrace___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_checkAltCtorNames___spec__2(x_101, x_100, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_86); x_103 = lean_ctor_get(x_102, 1); lean_inc(x_103); @@ -19218,10 +19201,6 @@ l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__1 = _init_l_Lean_Elab_Tactic_E lean_mark_persistent(l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__1); l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__2 = _init_l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__2(); lean_mark_persistent(l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__2); -l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3 = _init_l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3(); -lean_mark_persistent(l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3); -l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4 = _init_l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4(); -lean_mark_persistent(l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4); l_Array_forInUnsafe_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___spec__2___closed__1 = _init_l_Array_forInUnsafe_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___spec__2___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___spec__2___closed__1); l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___lambda__1___closed__1 = _init_l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___lambda__1___closed__1(); @@ -19349,9 +19328,9 @@ l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_elabTaggedTerm___lamb lean_mark_persistent(l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_elabTaggedTerm___lambda__1___closed__3); l_Lean_Elab_Tactic_elabTargets___boxed__const__1 = _init_l_Lean_Elab_Tactic_elabTargets___boxed__const__1(); lean_mark_persistent(l_Lean_Elab_Tactic_elabTargets___boxed__const__1); -l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1 = _init_l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1(); -lean_mark_persistent(l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1); -res = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438_(lean_io_mk_world()); +l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1 = _init_l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1(); +lean_mark_persistent(l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1); +res = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Elab_Tactic_evalCasesOn___closed__1 = _init_l_Lean_Elab_Tactic_evalCasesOn___closed__1(); diff --git a/stage0/stdlib/Lean/Elab/Term.c b/stage0/stdlib/Lean/Elab/Term.c index 8a133f8e08..16a7bee3b0 100644 --- a/stage0/stdlib/Lean/Elab/Term.c +++ b/stage0/stdlib/Lean/Elab/Term.c @@ -80,7 +80,6 @@ lean_object* l_Std_RBNode_insert___at_Lean_NameSet_insert___spec__1(lean_object* lean_object* l_List_foldl___at_Lean_Elab_addMacroStack___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getLetRecsToLift___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instMonadMacroAdapterTermElabM___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1; extern lean_object* l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___closed__9; extern lean_object* l_Lean_nullKind; @@ -92,6 +91,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_exceptionToSorry_match extern lean_object* l_term_x5b___x5d___closed__9; lean_object* l_Lean_Elab_Term_resolveName___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabProp___closed__3; +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1; lean_object* l_List_toString___at_Lean_resolveGlobalConstNoOverload___spec__2(lean_object*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_2022____closed__4; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_exceptionToSorry___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -139,8 +139,8 @@ lean_object* l_Lean_Elab_log___at___private_Lean_Elab_Term_0__Lean_Elab_Term_exc lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureTypeOf___closed__1; lean_object* l_Lean_Elab_Term_elabNumLit___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeStx___closed__3; -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_mkFreshTypeMVarFor___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4; lean_object* l_Lean_Elab_Term_registerCustomErrorIfMVar_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkTermElabAttributeUnsafe___closed__1; lean_object* l_Lean_Elab_throwIllFormedSyntax___at_Lean_Elab_Term_elabNumLit___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -242,10 +242,10 @@ lean_object* l_List_map___at_Lean_resolveGlobalConst___spec__2(lean_object*); lean_object* l_Lean_Elab_Term_applyAttributesAt(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabDoubleQuotedName___closed__1; lean_object* l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3; lean_object* l_Lean_Elab_Term_instInhabitedTermElabResult___closed__1; extern lean_object* l_Lean_Expr_getAppArgs___closed__1; lean_object* l_Lean_Elab_Term_registerCustomErrorIfMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_CheckAssignment_addAssignmentInfo___rarg___closed__3; lean_object* l_Lean_Elab_Term_instMonadMacroAdapterTermElabM___closed__3; lean_object* l_Lean_Elab_Term_elabTypeWithAutoBoundImplicit_loop_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Level_elabLevel(lean_object*, lean_object*, lean_object*); @@ -283,7 +283,6 @@ lean_object* l_Lean_Elab_Term_getMainModule___rarg(lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Term_instMetaEvalTermElabM___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* l_Lean_Elab_Term_instMonadMacroAdapterTermElabM___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_USize_decLt(size_t, size_t); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5; lean_object* l_Lean_Elab_Term_elabScientificLit___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instMonadMacroAdapterTermElabM___closed__5; lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabNumLit___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -299,6 +298,7 @@ lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabNumLit___spec__2___boxed( lean_object* l___regBuiltin_Lean_Elab_Term_elabDoubleQuotedName___closed__2; lean_object* l_Lean_Elab_Term_elabNumLit_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabTypeWithAutoBoundImplicit___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2; extern lean_object* l_Lean_levelZero; lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabStrLit___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -412,7 +412,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryCoeSort(lean_object lean_object* l_Lean_Elab_Term_TermElabM_run(lean_object*); uint8_t l_Array_contains___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__1; -lean_object* l_Lean_Elab_Term_mkTypeMismatchError___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_mkTypeMismatchError___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_isExprMVarAssigned___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabProp___rarg(lean_object*); lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambdaAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -426,8 +426,8 @@ lean_object* l_Lean_Elab_Term_tryPostponeIfHasMVars_match__1___rarg(lean_object* lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureTypeOf___closed__3; uint8_t l_Lean_KVMap_getBool(lean_object*, lean_object*, uint8_t); lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore___closed__3; +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__2; -extern lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10; lean_object* l_Lean_Elab_Term_withMacroExpansion___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabByTactic___closed__2; lean_object* l_Lean_Elab_Term_mkExplicitBinder___closed__3; @@ -441,6 +441,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda(lea lean_object* l_Lean_Meta_mkAppOptM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_tryPureCoe_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabQuotedName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_liftAttrM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___lambda__4___closed__1; extern lean_object* l_Lean_Meta_instMetaEvalMetaM___rarg___closed__2; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___lambda__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*); @@ -455,7 +456,6 @@ uint8_t l_Lean_Expr_hasExprMVar(lean_object*); lean_object* l_Lean_Elab_Term_getFVarLocalDecl_x21(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_replaceRef(lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_mkTypeMismatchError___closed__3; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_isTypeApp_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_levelMVarToParam___lambda__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda___spec__1(lean_object*); @@ -527,14 +527,14 @@ lean_object* l_Lean_Elab_Term_mkTypeMismatchError_match__1___rarg(lean_object*, lean_object* l___regBuiltin_Lean_Elab_Term_elabCharLit(lean_object*); lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabOptLevel___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabUsingElabFnsAux_match__2___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862_(lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430_(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879_(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447_(lean_object*); lean_object* l_Lean_mkAuxName___at_Lean_Elab_Term_mkAuxName___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_setElabConfig(lean_object*); lean_object* l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__4; lean_object* l_Lean_Elab_Term_getLetRecsToLift(lean_object*); lean_object* l_Lean_Elab_Term_liftLevelM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036_(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035_(lean_object*); lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_797_(lean_object*); lean_object* l_Std_PersistentArray_forMAux___at_Lean_Elab_Term_instMetaEvalTermElabM___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getId(lean_object*); @@ -544,7 +544,7 @@ lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageCo lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_mkFreshTypeMVarFor_match__1(lean_object*); lean_object* l_Lean_Elab_Term_mkTermElabAttributeUnsafe___closed__6; lean_object* l_Lean_Elab_Term_elabSyntheticHole_match__2___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_mkTypeMismatchError(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_mkTypeMismatchError(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_Elab_throwPostpone___at_Lean_Elab_Term_tryPostpone___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_State_levelNames___default; lean_object* l_Std_PersistentHashMap_findAtAux___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabUsingElabFns___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -561,6 +561,7 @@ lean_object* l_Lean_Elab_Term_instInhabitedTermElabResult; lean_object* l_Lean_Elab_Term_resolveName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryCoe___closed__2; lean_object* l_Lean_Elab_Term_instMonadMacroAdapterTermElabM___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1; lean_object* l_Lean_Elab_Term_elabProp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instMonadLiftTMetaMTermElabM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -607,6 +608,7 @@ lean_object* l_Lean_Elab_Term_elabProp(lean_object*, lean_object*, lean_object*, lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_addAutoBoundImplicits___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__5; lean_object* l_Lean_LocalDecl_toExpr(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5; extern lean_object* l_Lean_firstFrontendMacroScope; lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeOf___closed__3; lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -670,6 +672,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___closed lean_object* l_Lean_Elab_Term_tryPostponeIfHasMVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_resolveLocalName_loop_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3; size_t l_USize_land(size_t, size_t); lean_object* l_Lean_Elab_Term_mkConst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_mkSomeContext___closed__2; @@ -678,6 +681,7 @@ lean_object* l_Lean_Elab_Term_mkConst___closed__3; lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withMVarContextImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_resolveName___closed__4; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryCoe_match__2(lean_object*); +lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1; extern lean_object* l_Lean_nullKind___closed__2; lean_object* l_Lean_Elab_Term_instMonadLogTermElabM___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___spec__3___rarg(lean_object*); @@ -745,6 +749,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___closed lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambdaAux___closed__1; extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2; lean_object* l___regBuiltin_Lean_Elab_Term_elabNumLit___closed__1; +extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; lean_object* l_Lean_Elab_Term_isLetRecAuxMVar___closed__1; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambdaAux___closed__2; lean_object* l_Lean_mkLevelSucc(lean_object*); @@ -765,7 +770,6 @@ uint8_t l_Lean_Expr_isMVar(lean_object*); lean_object* l_Lean_Elab_Term_mkFreshIdent___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_addAutoBoundImplicits___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* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Term_elabDoubleQuotedName___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1; lean_object* l_Lean_Elab_Term_logUnassignedUsingErrorInfos___closed__1; lean_object* l_Lean_Elab_Term_elabScientificLit___closed__4; lean_object* l_Lean_Elab_Term_resetMessageLog___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -890,7 +894,6 @@ extern lean_object* l_Lean_Meta_evalNat_visit___closed__3; extern lean_object* l_Lean_Meta_mkSorry___rarg___lambda__1___closed__4; lean_object* l_Lean_Elab_Term_tryCoeThunk_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instMonadLogTermElabM___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2; lean_object* l_List_foldlM___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__5___lambda__2(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* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_synthesizeInst_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -903,7 +906,6 @@ lean_object* l_Lean_Elab_Term_withFreshMacroScope___rarg(lean_object*, lean_obje lean_object* l_Lean_Elab_Term_TermElabM_toIO_match__1(lean_object*, lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1; lean_object* l_Lean_Elab_Term_elabDoubleQuotedName_match__1___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_mkSorry___rarg___lambda__1___closed__2; extern lean_object* l_Lean_instInhabitedMessageData___closed__1; @@ -928,7 +930,6 @@ lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Elab_Term_0__Lean_Elab_T lean_object* l_Lean_Elab_Term_liftCoreM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_evalNat_visit___closed__2; lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1; extern size_t l_Std_PersistentHashMap_insertAux___rarg___closed__2; lean_object* l_Lean_Elab_Term_mkExplicitBinder___closed__1; uint8_t l___private_Lean_Elab_Term_0__Lean_Elab_Term_getAutoBoundImplicitLocalOption(lean_object*); @@ -938,7 +939,6 @@ lean_object* l_Lean_Elab_Term_logUnassignedUsingErrorInfos(lean_object*, lean_ob lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryCoeSort___closed__8; uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4; lean_object* l_Lean_Elab_Term_elabByTactic___closed__3; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_useImplicitLambda_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getLetRecsToLift___boxed(lean_object*); @@ -985,7 +985,7 @@ lean_object* l_IO_println___at_Lean_instEval___spec__1(lean_object*, lean_object lean_object* l_Lean_Elab_Term_logUnassignedUsingErrorInfos_match__2___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_throwErrorIfErrors(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*); -lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623_(lean_object*); +lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640_(lean_object*); lean_object* l_Lean_Elab_Term_elabByTactic_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_addAutoBoundImplicits(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withAutoBoundImplicitLocal___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1090,10 +1090,9 @@ lean_object* l_Lean_Elab_Term_tryPostponeIfNoneOrMVar___boxed(lean_object*, lean uint8_t l_Lean_Elab_getMacroStackOption(lean_object*); lean_object* lean_uint32_to_nat(uint32_t); lean_object* l___regBuiltin_Lean_Elab_Term_elabSyntheticHole___closed__1; -lean_object* l_Lean_Elab_Term_mkTypeMismatchError___closed__4; lean_object* l_Lean_Elab_Term_elabScientificLit_match__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3; lean_object* l_Lean_Elab_Term_elabByTactic_match__1(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3; extern lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Util___hyg_870____closed__2; lean_object* l_Lean_Elab_Term_elabTypeWithAutoBoundImplicit(lean_object*); lean_object* l_Lean_Elab_Term_throwTypeMismatchError___rarg___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*); @@ -1103,7 +1102,6 @@ lean_object* l_Lean_Elab_Term_elabBadCDot___rarg___boxed(lean_object*, lean_obje lean_object* l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getAttributeImpl(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkAppOptM___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__8; lean_object* l_Lean_throwError___at_Lean_Elab_Term_synthesizeInstMVarCore___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_saveAllState___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__8; @@ -1130,6 +1128,7 @@ lean_object* l_Lean_Elab_Term_elabRawNatLit___boxed(lean_object*, lean_object*, lean_object* l_Lean_Elab_Term_isMonadApp_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___closed__7; lean_object* l_Lean_Elab_Term_elabTermWithoutImplicitLambdas___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabUsingElabFns___closed__2; lean_object* l_Lean_mkApp3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withAutoBoundImplicitLocal___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1157,13 +1156,13 @@ lean_object* l_Lean_Elab_Term_elabNumLit(lean_object*, lean_object*, lean_object uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAtAux___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabUsingElabFns___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabCharLit_match__1(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___closed__1; uint8_t l_Lean_Syntax_isIdent(lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Elab_Term_Context_mayPostpone___default; lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeOf___closed__1; -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2; lean_object* l_Lean_Elab_Term_setElabConfig(lean_object* x_1) { _start: { @@ -4388,7 +4387,7 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_withoutErrToSorry___rarg), 8, return x_2; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1() { _start: { lean_object* x_1; @@ -4396,17 +4395,17 @@ x_1 = lean_mk_string("autoBoundImplicitLocal"); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3() { _start: { lean_object* x_1; @@ -4414,13 +4413,13 @@ x_1 = lean_mk_string("Unbound local variables in declaration headers become impl return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_initFn____x40_Lean_Data_Options___hyg_487____closed__3; x_2 = l_Lean_instInhabitedParserDescr___closed__1; -x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3; +x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); @@ -4428,12 +4427,12 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036_(lean_object* x_1) { +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2; -x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2; +x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4; x_4 = lean_register_option(x_2, x_3, x_1); return x_4; } @@ -4442,7 +4441,7 @@ uint8_t l___private_Lean_Elab_Term_0__Lean_Elab_Term_getAutoBoundImplicitLocalOp _start: { lean_object* x_2; uint8_t x_3; uint8_t x_4; -x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2; x_3 = 1; x_4 = l_Lean_KVMap_getBool(x_1, x_2, x_3); return x_4; @@ -8482,107 +8481,161 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Elab_Term_mkTypeMismatchError___closed__3() { +lean_object* l_Lean_Elab_Term_mkTypeMismatchError(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { -lean_object* x_1; -x_1 = lean_mk_string(" has type"); -return x_1; -} -} -static lean_object* _init_l_Lean_Elab_Term_mkTypeMismatchError___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_mkTypeMismatchError___closed__3; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} -lean_object* l_Lean_Elab_Term_mkTypeMismatchError(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; -x_5 = l_Lean_indentExpr(x_3); -x_6 = l_Lean_indentExpr(x_4); +lean_object* x_12; +x_12 = l_Lean_Meta_mkHasTypeButIsExpectedMsg(x_3, x_4, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_1) == 0) { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_7 = l_Lean_indentExpr(x_2); -x_8 = l_Lean_Elab_Term_mkTypeMismatchError___closed__2; -x_9 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -x_10 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__8; -x_11 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_11, 0, x_9); -lean_ctor_set(x_11, 1, x_10); -x_12 = l_Lean_KernelException_toMessageData___closed__15; -x_13 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_13, 0, x_12); -lean_ctor_set(x_13, 1, x_11); -x_14 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_12); -x_15 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_5); -x_16 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10; +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_14 = lean_ctor_get(x_12, 0); +x_15 = l_Lean_indentExpr(x_2); +x_16 = l_Lean_Elab_Term_mkTypeMismatchError___closed__2; x_17 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_16); -x_18 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_6); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_15); +x_18 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; x_19 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_19, 0, x_18); -lean_ctor_set(x_19, 1, x_12); -return x_19; +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +x_20 = l_Lean_KernelException_toMessageData___closed__15; +x_21 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_19); +x_22 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_20); +x_23 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_14); +x_24 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_20); +lean_ctor_set(x_12, 0, x_24); +return x_12; } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -lean_dec(x_2); -x_20 = lean_ctor_get(x_1, 0); -x_21 = l_Lean_stringToMessageData(x_20); -x_22 = l_Lean_KernelException_toMessageData___closed__15; -x_23 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_21); -x_24 = l_Lean_Elab_Term_mkTypeMismatchError___closed__4; -x_25 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); -x_26 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_26, 0, x_22); -lean_ctor_set(x_26, 1, x_25); -x_27 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_22); -x_28 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_28, 0, x_27); -lean_ctor_set(x_28, 1, x_5); -x_29 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10; -x_30 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_25 = lean_ctor_get(x_12, 0); +x_26 = lean_ctor_get(x_12, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_12); +x_27 = l_Lean_indentExpr(x_2); +x_28 = l_Lean_Elab_Term_mkTypeMismatchError___closed__2; +x_29 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_27); +x_30 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; x_31 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_31, 0, x_30); -lean_ctor_set(x_31, 1, x_6); -x_32 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_22); -return x_32; +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +x_32 = l_Lean_KernelException_toMessageData___closed__15; +x_33 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_31); +x_34 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_34, 0, x_33); +lean_ctor_set(x_34, 1, x_32); +x_35 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_25); +x_36 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_32); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_26); +return x_37; +} +} +else +{ +uint8_t x_38; +lean_dec(x_2); +x_38 = !lean_is_exclusive(x_12); +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_39 = lean_ctor_get(x_1, 0); +x_40 = lean_ctor_get(x_12, 0); +x_41 = l_Lean_stringToMessageData(x_39); +x_42 = l_Lean_KernelException_toMessageData___closed__15; +x_43 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_41); +x_44 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_CheckAssignment_addAssignmentInfo___rarg___closed__3; +x_45 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +x_46 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_46, 0, x_42); +lean_ctor_set(x_46, 1, x_45); +x_47 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_42); +x_48 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_40); +x_49 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_42); +lean_ctor_set(x_12, 0, x_49); +return x_12; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_50 = lean_ctor_get(x_1, 0); +x_51 = lean_ctor_get(x_12, 0); +x_52 = lean_ctor_get(x_12, 1); +lean_inc(x_52); +lean_inc(x_51); +lean_dec(x_12); +x_53 = l_Lean_stringToMessageData(x_50); +x_54 = l_Lean_KernelException_toMessageData___closed__15; +x_55 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_55, 0, x_54); +lean_ctor_set(x_55, 1, x_53); +x_56 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_CheckAssignment_addAssignmentInfo___rarg___closed__3; +x_57 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_57, 0, x_55); +lean_ctor_set(x_57, 1, x_56); +x_58 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_58, 0, x_54); +lean_ctor_set(x_58, 1, x_57); +x_59 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_59, 0, x_58); +lean_ctor_set(x_59, 1, x_54); +x_60 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_51); +x_61 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_61, 0, x_60); +lean_ctor_set(x_61, 1, x_54); +x_62 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_62, 0, x_61); +lean_ctor_set(x_62, 1, x_52); +return x_62; } } } -lean_object* l_Lean_Elab_Term_mkTypeMismatchError___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +} +lean_object* l_Lean_Elab_Term_mkTypeMismatchError___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { -lean_object* x_5; -x_5 = l_Lean_Elab_Term_mkTypeMismatchError(x_1, x_2, x_3, x_4); +lean_object* x_12; +x_12 = l_Lean_Elab_Term_mkTypeMismatchError(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_1); -return x_5; +return x_12; } } lean_object* l_Lean_Elab_Term_throwTypeMismatchError_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -8677,31 +8730,40 @@ _start: { if (lean_obj_tag(x_5) == 0) { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_14 = l_Lean_Elab_Term_mkTypeMismatchError(x_1, x_4, x_3, x_2); -x_15 = l_Lean_instInhabitedMessageData___closed__1; -x_16 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_16, 0, x_14); -lean_ctor_set(x_16, 1, x_15); -x_17 = l_Lean_throwError___at_Lean_Elab_Term_throwTypeMismatchError___spec__1___rarg(x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +x_14 = l_Lean_Elab_Term_mkTypeMismatchError(x_1, x_4, x_3, x_2, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +x_17 = l_Lean_instInhabitedMessageData___closed__1; +x_18 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_18, 0, x_15); +lean_ctor_set(x_18, 1, x_17); +x_19 = l_Lean_throwError___at_Lean_Elab_Term_throwTypeMismatchError___spec__1___rarg(x_18, x_7, x_8, x_9, x_10, x_11, x_12, x_16); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); -return x_17; +return x_19; } else { -lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_dec(x_7); lean_dec(x_3); lean_dec(x_2); -x_18 = lean_ctor_get(x_5, 0); -lean_inc(x_18); +x_20 = lean_ctor_get(x_5, 0); +lean_inc(x_20); lean_dec(x_5); -x_19 = l_Lean_instInhabitedMessageData___closed__1; -x_20 = l_Lean_Meta_throwAppTypeMismatch___rarg(x_18, x_4, x_19, x_9, x_10, x_11, x_12, x_13); -return x_20; +x_21 = l_Lean_instInhabitedMessageData___closed__1; +x_22 = l_Lean_Meta_throwAppTypeMismatch___rarg(x_20, x_4, x_21, x_9, x_10, x_11, x_12, x_13); +return x_22; } } } @@ -9338,7 +9400,7 @@ x_1 = lean_unsigned_to_nat(16u); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1() { _start: { lean_object* x_1; @@ -9346,17 +9408,17 @@ x_1 = lean_mk_string("maxCoeSize"); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3() { _start: { lean_object* x_1; lean_object* x_2; @@ -9366,7 +9428,7 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4() { _start: { lean_object* x_1; @@ -9374,13 +9436,13 @@ x_1 = lean_mk_string("maximum number of instances used to construct an automatic return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3; +x_1 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3; x_2 = l_Lean_instInhabitedParserDescr___closed__1; -x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4; +x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); @@ -9388,12 +9450,12 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430_(lean_object* x_1) { +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2; -x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2; +x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5; x_4 = lean_register_option(x_2, x_3, x_1); return x_4; } @@ -9402,7 +9464,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_getCoeMaxSize(lean_obj _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2; x_3 = l_Lean_Elab_Term_maxCoeSizeDefault; x_4 = l_Lean_KVMap_getNat(x_1, x_2, x_3); return x_4; @@ -28255,7 +28317,7 @@ lean_dec(x_3); return x_9; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -28265,11 +28327,11 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862_(lean_object* x_1) { +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1; x_3 = l_Lean_registerTraceClass(x_2, x_1); return x_3; } @@ -28440,7 +28502,7 @@ lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lea x_97 = lean_ctor_get(x_91, 1); lean_inc(x_97); lean_dec(x_91); -x_98 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1; +x_98 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1; x_99 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_98, x_2, x_3, x_4, x_5, x_6, x_7, x_97); x_100 = lean_ctor_get(x_99, 0); lean_inc(x_100); @@ -28482,7 +28544,7 @@ lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean x_53 = lean_ctor_get(x_47, 1); lean_inc(x_53); lean_dec(x_47); -x_54 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1; +x_54 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1; x_55 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_54, x_2, x_3, x_4, x_5, x_6, x_7, x_53); x_56 = lean_ctor_get(x_55, 0); lean_inc(x_56); @@ -28563,7 +28625,7 @@ x_41 = l_Lean_KernelException_toMessageData___closed__15; x_42 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_42, 0, x_40); lean_ctor_set(x_42, 1, x_41); -x_43 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1; +x_43 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1; x_44 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_43, x_42, x_2, x_3, x_4, x_5, x_6, x_7, x_36); x_45 = lean_ctor_get(x_44, 1); lean_inc(x_45); @@ -28625,7 +28687,7 @@ x_79 = l_Lean_KernelException_toMessageData___closed__15; x_80 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_80, 0, x_78); lean_ctor_set(x_80, 1, x_79); -x_81 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1; +x_81 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1; x_82 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_81, x_80, x_2, x_3, x_4, x_5, x_6, x_7, x_61); x_83 = lean_ctor_get(x_82, 1); lean_inc(x_83); @@ -37268,7 +37330,7 @@ x_8 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg(x_1, x_2, x_3, x_4, x_7, x_6 return x_8; } } -static lean_object* _init_l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1() { +static lean_object* _init_l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -37278,7 +37340,7 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623_(lean_object* x_1) { +lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -37290,7 +37352,7 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_dec(x_3); -x_5 = l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1; +x_5 = l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1; x_6 = l_Lean_registerTraceClass(x_5, x_4); if (lean_obj_tag(x_6) == 0) { @@ -37508,15 +37570,15 @@ if (lean_io_result_is_error(res)) return res; l_Lean_Elab_Term_termElabAttribute = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_Elab_Term_termElabAttribute); lean_dec_ref(res); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4); -res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036_(lean_io_mk_world()); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4); +res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Elab_Term_throwErrorIfErrors___closed__1 = _init_l_Lean_Elab_Term_throwErrorIfErrors___closed__1(); @@ -37559,10 +37621,6 @@ l_Lean_Elab_Term_mkTypeMismatchError___closed__1 = _init_l_Lean_Elab_Term_mkType lean_mark_persistent(l_Lean_Elab_Term_mkTypeMismatchError___closed__1); l_Lean_Elab_Term_mkTypeMismatchError___closed__2 = _init_l_Lean_Elab_Term_mkTypeMismatchError___closed__2(); lean_mark_persistent(l_Lean_Elab_Term_mkTypeMismatchError___closed__2); -l_Lean_Elab_Term_mkTypeMismatchError___closed__3 = _init_l_Lean_Elab_Term_mkTypeMismatchError___closed__3(); -lean_mark_persistent(l_Lean_Elab_Term_mkTypeMismatchError___closed__3); -l_Lean_Elab_Term_mkTypeMismatchError___closed__4 = _init_l_Lean_Elab_Term_mkTypeMismatchError___closed__4(); -lean_mark_persistent(l_Lean_Elab_Term_mkTypeMismatchError___closed__4); l_Lean_Elab_Term_synthesizeInstMVarCore___closed__1 = _init_l_Lean_Elab_Term_synthesizeInstMVarCore___closed__1(); lean_mark_persistent(l_Lean_Elab_Term_synthesizeInstMVarCore___closed__1); l_Lean_Elab_Term_synthesizeInstMVarCore___closed__2 = _init_l_Lean_Elab_Term_synthesizeInstMVarCore___closed__2(); @@ -37579,17 +37637,17 @@ l_Lean_Elab_Term_synthesizeInstMVarCore___closed__7 = _init_l_Lean_Elab_Term_syn lean_mark_persistent(l_Lean_Elab_Term_synthesizeInstMVarCore___closed__7); l_Lean_Elab_Term_maxCoeSizeDefault = _init_l_Lean_Elab_Term_maxCoeSizeDefault(); lean_mark_persistent(l_Lean_Elab_Term_maxCoeSizeDefault); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5); -res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430_(lean_io_mk_world()); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5); +res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Elab_Term_tryCoeThunk_x3f_match__1___rarg___closed__1 = _init_l_Lean_Elab_Term_tryCoeThunk_x3f_match__1___rarg___closed__1(); @@ -37706,9 +37764,9 @@ l_Lean_Elab_Term_mkAuxName___closed__2 = _init_l_Lean_Elab_Term_mkAuxName___clos lean_mark_persistent(l_Lean_Elab_Term_mkAuxName___closed__2); l_Lean_Elab_Term_mkAuxName___closed__3 = _init_l_Lean_Elab_Term_mkAuxName___closed__3(); lean_mark_persistent(l_Lean_Elab_Term_mkAuxName___closed__3); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1); -res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862_(lean_io_mk_world()); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1); +res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Elab_Term_isLetRecAuxMVar___closed__1 = _init_l_Lean_Elab_Term_isLetRecAuxMVar___closed__1(); @@ -37916,9 +37974,9 @@ l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__4 = _init_l_Lean_Elab_Te lean_mark_persistent(l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__4); l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__5 = _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__5(); lean_mark_persistent(l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__5); -l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1 = _init_l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1(); -lean_mark_persistent(l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1); -res = l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623_(lean_io_mk_world()); +l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1 = _init_l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1(); +lean_mark_persistent(l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1); +res = l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Meta.c b/stage0/stdlib/Lean/Meta.c index 525552b7dd..5f405810be 100644 --- a/stage0/stdlib/Lean/Meta.c +++ b/stage0/stdlib/Lean/Meta.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Meta -// Imports: Init Lean.Meta.Basic Lean.Meta.LevelDefEq Lean.Meta.WHNF Lean.Meta.InferType Lean.Meta.FunInfo Lean.Meta.ExprDefEq Lean.Meta.DiscrTree Lean.Meta.Reduce Lean.Meta.Instances Lean.Meta.AbstractMVars Lean.Meta.SynthInstance Lean.Meta.AppBuilder Lean.Meta.Tactic Lean.Meta.KAbstract Lean.Meta.RecursorInfo Lean.Meta.GeneralizeTelescope Lean.Meta.Match Lean.Meta.ReduceEval Lean.Meta.Closure Lean.Meta.AbstractNestedProofs Lean.Meta.ForEachExpr Lean.Meta.Transform Lean.Meta.PPGoal Lean.Meta.UnificationHint +// Imports: Init Lean.Meta.Basic Lean.Meta.LevelDefEq Lean.Meta.WHNF Lean.Meta.InferType Lean.Meta.FunInfo Lean.Meta.ExprDefEq Lean.Meta.DiscrTree Lean.Meta.Reduce Lean.Meta.Instances Lean.Meta.AbstractMVars Lean.Meta.SynthInstance Lean.Meta.AppBuilder Lean.Meta.Tactic Lean.Meta.KAbstract Lean.Meta.RecursorInfo Lean.Meta.GeneralizeTelescope Lean.Meta.Match Lean.Meta.ReduceEval Lean.Meta.Closure Lean.Meta.AbstractNestedProofs Lean.Meta.ForEachExpr Lean.Meta.Transform Lean.Meta.PPGoal Lean.Meta.UnificationHint Lean.Meta.Inductive #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -38,6 +38,7 @@ lean_object* initialize_Lean_Meta_ForEachExpr(lean_object*); lean_object* initialize_Lean_Meta_Transform(lean_object*); lean_object* initialize_Lean_Meta_PPGoal(lean_object*); lean_object* initialize_Lean_Meta_UnificationHint(lean_object*); +lean_object* initialize_Lean_Meta_Inductive(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Meta(lean_object* w) { lean_object * res; @@ -118,6 +119,9 @@ lean_dec_ref(res); res = initialize_Lean_Meta_UnificationHint(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Meta_Inductive(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Meta/Check.c b/stage0/stdlib/Lean/Meta/Check.c index f31422f230..bf616e70b6 100644 --- a/stage0/stdlib/Lean/Meta/Check.c +++ b/stage0/stdlib/Lean/Meta/Check.c @@ -13,81 +13,128 @@ #ifdef __cplusplus extern "C" { #endif +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__4(lean_object*); +lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwAppTypeMismatch_match__1(lean_object*); size_t l_USize_add(size_t, size_t); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__6; extern lean_object* l_Lean_Syntax_strLitToAtom___closed__3; lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*); +lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2(lean_object*); lean_object* l_Lean_Meta_check___closed__1; lean_object* l_Lean_Meta_throwLetTypeMismatchMessage_match__1(lean_object*); lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkLambdaLet___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg_match__1(lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); uint8_t l_USize_decEq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__1(lean_object*); lean_object* l_Lean_Meta_whnfD___at_Lean_Meta_getLevel___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkLambdaLet___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_isLevelDefEqAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkForall___closed__1; +uint8_t l_Lean_Expr_isApp(lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___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_object*); lean_object* l_Lean_Meta_checkApp_match__1(lean_object*); lean_object* l_Lean_Meta_throwFunctionExpected___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Meta_throwLetTypeMismatchMessage_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__1___rarg(lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkLambdaLet___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isTypeCorrect(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkLambdaLet___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_check___closed__2; +lean_object* l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Expr_getAppArgs___closed__1; lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_getFunctionDomain_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkLambdaLet___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff_match__1(lean_object*); lean_object* l_Lean_Meta_checkApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkAppN(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_match__1(lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff_match__1___rarg(lean_object*, lean_object*); +lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__3(lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkLambdaLet_match__1(lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__4___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwLetTypeMismatchMessage(lean_object*); +extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__43; lean_object* l_Lean_Meta_lambdaLetTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___closed__2; +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff___closed__2; lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkLambdaLet___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkForall___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_0__Lean_addNode___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___closed__1; +lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_addTrace___at_Lean_Meta_isLevelDefEqAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff___closed__1; extern lean_object* l_Lean_KernelException_toMessageData___closed__29; lean_object* l_Lean_Meta_isTypeCorrect___closed__1; lean_object* l_Lean_Meta_isTypeCorrect___closed__2; lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___private_Lean_Meta_LevelDefEq_0__Lean_Meta_processPostponedStep___spec__6___rarg(lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_throwAppTypeMismatch___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_KVMap_getBool(lean_object*, lean_object*, uint8_t); +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10; extern lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__2; +lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkForall___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__2___rarg(lean_object*, lean_object*); +lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_LocalDecl_binderInfo(lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwAppTypeMismatch(lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkLambdaLet_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff___closed__3; +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___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*); +extern lean_object* l_Lean_instInhabitedExpr; lean_object* l_Lean_throwError___at_Lean_Meta_throwAppTypeMismatch___spec__1(lean_object*); lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__15; lean_object* l_Lean_Meta_whnf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__1; uint8_t l_Lean_Expr_Data_binderInfo(uint64_t); size_t lean_usize_of_nat(lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getConstInfo___at_Lean_Meta_getParamNames___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_getFunctionDomain(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_forallTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_setAppPPExplicit(lean_object*); lean_object* l_Lean_LocalDecl_type(lean_object*); lean_object* l_Lean_ConstantInfo_lparams(lean_object*); +lean_object* l_Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*); +extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__2; uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_mkApp(lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_throwLetTypeMismatchMessage___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_BinderInfo_isExplicit(uint8_t); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkConstant___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_getSanitizeNames___closed__2; lean_object* lean_panic_fn(lean_object*, lean_object*); +lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkForall(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwAppTypeMismatch_match__1___rarg(lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff_match__2(lean_object*); lean_object* l_Lean_Meta_getLevel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_getFunctionDomain_match__1(lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); @@ -97,34 +144,46 @@ lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lea extern lean_object* l_Lean_instInhabitedMessageData___closed__1; lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__5; +lean_object* lean_mk_array(lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkForall___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__3; lean_object* l_Lean_throwError___at_Lean_Meta_throwLetTypeMismatchMessage___spec__1(lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_ensureType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_throwAppTypeMismatch___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__1; lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkConstant(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_getLocalDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_getAppFn(lean_object*); +lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__1; lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__2; lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkLambdaLet(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_lengthAux___rarg(lean_object*, lean_object*); lean_object* lean_local_ctx_find(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkForall___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwIncorrectNumberOfLevels___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__2; lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__9; lean_object* l_Lean_throwError___at_Lean_Meta_throwLetTypeMismatchMessage___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_indentExpr(lean_object*); -lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Check___hyg_947_(lean_object*); +lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Check___hyg_1490_(lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__4; lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__2(lean_object*); lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__8; +extern lean_object* l_Array_findSomeM_x3f___rarg___closed__1; lean_object* l_Lean_Meta_instInhabitedMetaM___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_checkApp_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__3; lean_object* l_Lean_Meta_check(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Exception_toMessageData(lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Meta_getFVarLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_checkAux_checkLambdaLet___closed__1; +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__3___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Check_0__Lean_Meta_ensureType(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { @@ -806,6 +865,1477 @@ return x_35; } } } +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__1___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__1___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__2___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__2___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__3___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__3(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__3___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__4___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +lean_dec(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_1, 1); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_2(x_2, x_4, x_5); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +lean_dec(x_2); +x_7 = lean_ctor_get(x_1, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_1, 1); +lean_inc(x_8); +lean_dec(x_1); +x_9 = lean_apply_2(x_3, x_7, x_8); +return x_9; +} +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_addPPExplicitToExposeDiff_visit_match__4___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff_match__1___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_dec(x_1); +x_4 = lean_apply_1(x_2, x_3); +return x_4; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff_match__1___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; lean_object* x_5; +lean_dec(x_3); +x_4 = lean_box(0); +x_5 = lean_apply_1(x_2, x_4); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_2); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_apply_1(x_3, x_6); +return x_7; +} +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff_match__2___rarg), 3, 0); +return x_2; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__1() { +_start: +{ +uint8_t x_1; lean_object* x_2; lean_object* x_3; +x_1 = 1; +x_2 = lean_box(x_1); +x_3 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_3, 0, x_2); +return x_3; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__1; +x_2 = lean_box(0); +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +uint8_t x_11; uint8_t x_12; +x_11 = l_Lean_LocalDecl_binderInfo(x_5); +x_12 = l_Lean_BinderInfo_isExplicit(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_13 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_13, 0, x_1); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_10); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = l_Lean_instInhabitedExpr; +x_16 = lean_array_get(x_15, x_2, x_3); +x_17 = lean_array_get(x_15, x_4, x_3); +x_18 = l_Lean_Meta_isExprDefEq(x_16, x_17, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; uint8_t x_20; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_unbox(x_19); +lean_dec(x_19); +if (x_20 == 0) +{ +uint8_t x_21; +lean_dec(x_1); +x_21 = !lean_is_exclusive(x_18); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; +x_22 = lean_ctor_get(x_18, 0); +lean_dec(x_22); +x_23 = l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__3; +lean_ctor_set(x_18, 0, x_23); +return x_18; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_18, 1); +lean_inc(x_24); +lean_dec(x_18); +x_25 = l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__3; +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_24); +return x_26; +} +} +else +{ +uint8_t x_27; +x_27 = !lean_is_exclusive(x_18); +if (x_27 == 0) +{ +lean_object* x_28; lean_object* x_29; +x_28 = lean_ctor_get(x_18, 0); +lean_dec(x_28); +x_29 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_29, 0, x_1); +lean_ctor_set(x_18, 0, x_29); +return x_18; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_18, 1); +lean_inc(x_30); +lean_dec(x_18); +x_31 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_31, 0, x_1); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_30); +return x_32; +} +} +} +else +{ +uint8_t x_33; +lean_dec(x_1); +x_33 = !lean_is_exclusive(x_18); +if (x_33 == 0) +{ +return x_18; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_18, 0); +x_35 = lean_ctor_get(x_18, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_18); +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +} +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; uint8_t x_15; +x_14 = lean_ctor_get(x_5, 1); +x_15 = lean_nat_dec_le(x_14, x_7); +if (x_15 == 0) +{ +lean_object* x_16; uint8_t x_17; +x_16 = lean_unsigned_to_nat(0u); +x_17 = lean_nat_dec_eq(x_6, x_16); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +lean_dec(x_8); +x_18 = lean_unsigned_to_nat(1u); +x_19 = lean_nat_sub(x_6, x_18); +lean_dec(x_6); +x_20 = l_Lean_instInhabitedExpr; +x_21 = lean_array_get(x_20, x_1, x_7); +x_22 = l_Lean_Expr_fvarId_x21(x_21); +lean_dec(x_21); +x_23 = lean_alloc_closure((void*)(l_Lean_Meta_getLocalDecl___boxed), 6, 1); +lean_closure_set(x_23, 0, x_22); +lean_inc(x_3); +lean_inc(x_7); +lean_inc(x_2); +lean_inc(x_4); +x_24 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___boxed), 10, 4); +lean_closure_set(x_24, 0, x_4); +lean_closure_set(x_24, 1, x_2); +lean_closure_set(x_24, 2, x_7); +lean_closure_set(x_24, 3, x_3); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +x_25 = l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(x_23, x_24, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +if (lean_obj_tag(x_26) == 0) +{ +uint8_t x_27; +lean_dec(x_19); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_27 = !lean_is_exclusive(x_25); +if (x_27 == 0) +{ +lean_object* x_28; lean_object* x_29; +x_28 = lean_ctor_get(x_25, 0); +lean_dec(x_28); +x_29 = lean_ctor_get(x_26, 0); +lean_inc(x_29); +lean_dec(x_26); +lean_ctor_set(x_25, 0, x_29); +return x_25; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_25, 1); +lean_inc(x_30); +lean_dec(x_25); +x_31 = lean_ctor_get(x_26, 0); +lean_inc(x_31); +lean_dec(x_26); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_30); +return x_32; +} +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_33 = lean_ctor_get(x_25, 1); +lean_inc(x_33); +lean_dec(x_25); +x_34 = lean_ctor_get(x_26, 0); +lean_inc(x_34); +lean_dec(x_26); +x_35 = lean_ctor_get(x_5, 2); +x_36 = lean_nat_add(x_7, x_35); +lean_dec(x_7); +x_6 = x_19; +x_7 = x_36; +x_8 = x_34; +x_13 = x_33; +goto _start; +} +} +else +{ +uint8_t x_38; +lean_dec(x_19); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_38 = !lean_is_exclusive(x_25); +if (x_38 == 0) +{ +return x_25; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_25, 0); +x_40 = lean_ctor_get(x_25, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_25); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +return x_41; +} +} +} +else +{ +lean_object* x_42; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_42 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_42, 0, x_8); +lean_ctor_set(x_42, 1, x_13); +return x_42; +} +} +else +{ +lean_object* x_43; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_8); +lean_ctor_set(x_43, 1, x_13); +return x_43; +} +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_9 = lean_array_get_size(x_1); +x_10 = lean_unsigned_to_nat(0u); +x_11 = lean_unsigned_to_nat(1u); +lean_inc(x_9); +x_12 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_12, 0, x_10); +lean_ctor_set(x_12, 1, x_9); +lean_ctor_set(x_12, 2, x_11); +x_13 = l_Array_findSomeM_x3f___rarg___closed__1; +x_14 = l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1(x_1, x_2, x_3, x_13, x_12, x_9, x_10, x_13, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_12); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +lean_dec(x_15); +if (lean_obj_tag(x_16) == 0) +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_14); +if (x_17 == 0) +{ +lean_object* x_18; uint8_t x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_14, 0); +lean_dec(x_18); +x_19 = 0; +x_20 = lean_box(x_19); +lean_ctor_set(x_14, 0, x_20); +return x_14; +} +else +{ +lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_24; +x_21 = lean_ctor_get(x_14, 1); +lean_inc(x_21); +lean_dec(x_14); +x_22 = 0; +x_23 = lean_box(x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_21); +return x_24; +} +} +else +{ +uint8_t x_25; +x_25 = !lean_is_exclusive(x_14); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; +x_26 = lean_ctor_get(x_14, 0); +lean_dec(x_26); +x_27 = lean_ctor_get(x_16, 0); +lean_inc(x_27); +lean_dec(x_16); +lean_ctor_set(x_14, 0, x_27); +return x_14; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_14, 1); +lean_inc(x_28); +lean_dec(x_14); +x_29 = lean_ctor_get(x_16, 0); +lean_inc(x_29); +lean_dec(x_16); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_28); +return x_30; +} +} +} +else +{ +uint8_t x_31; +x_31 = !lean_is_exclusive(x_14); +if (x_31 == 0) +{ +return x_14; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_14, 0); +x_33 = lean_ctor_get(x_14, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_14); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; +} +} +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; +x_14 = l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_5); +lean_dec(x_1); +return x_14; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_1); +return x_9; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; uint8_t x_11; +x_10 = lean_ctor_get(x_1, 1); +x_11 = lean_nat_dec_le(x_10, x_3); +if (x_11 == 0) +{ +lean_object* x_12; uint8_t x_13; +x_12 = lean_unsigned_to_nat(0u); +x_13 = lean_nat_dec_eq(x_2, x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_14 = lean_unsigned_to_nat(1u); +x_15 = lean_nat_sub(x_2, x_14); +lean_dec(x_2); +x_16 = !lean_is_exclusive(x_4); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_17 = lean_ctor_get(x_4, 0); +x_18 = lean_ctor_get(x_4, 1); +x_19 = l_Lean_instInhabitedExpr; +x_20 = lean_array_get(x_19, x_18, x_3); +x_21 = lean_array_get(x_19, x_17, x_3); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_22 = l_Lean_Meta_addPPExplicitToExposeDiff_visit(x_20, x_21, x_5, x_6, x_7, x_8, x_9); +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +x_25 = lean_ctor_get(x_23, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_23, 1); +lean_inc(x_26); +lean_dec(x_23); +x_27 = lean_array_set(x_18, x_3, x_25); +x_28 = lean_array_set(x_17, x_3, x_26); +lean_ctor_set(x_4, 1, x_27); +lean_ctor_set(x_4, 0, x_28); +x_29 = lean_ctor_get(x_1, 2); +x_30 = lean_nat_add(x_3, x_29); +lean_dec(x_3); +x_2 = x_15; +x_3 = x_30; +x_9 = x_24; +goto _start; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_32 = lean_ctor_get(x_4, 0); +x_33 = lean_ctor_get(x_4, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_4); +x_34 = l_Lean_instInhabitedExpr; +x_35 = lean_array_get(x_34, x_33, x_3); +x_36 = lean_array_get(x_34, x_32, x_3); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_37 = l_Lean_Meta_addPPExplicitToExposeDiff_visit(x_35, x_36, x_5, x_6, x_7, x_8, x_9); +x_38 = lean_ctor_get(x_37, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_37, 1); +lean_inc(x_39); +lean_dec(x_37); +x_40 = lean_ctor_get(x_38, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_38, 1); +lean_inc(x_41); +lean_dec(x_38); +x_42 = lean_array_set(x_33, x_3, x_40); +x_43 = lean_array_set(x_32, x_3, x_41); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_43); +lean_ctor_set(x_44, 1, x_42); +x_45 = lean_ctor_get(x_1, 2); +x_46 = lean_nat_add(x_3, x_45); +lean_dec(x_3); +x_2 = x_15; +x_3 = x_46; +x_4 = x_44; +x_9 = x_39; +goto _start; +} +} +else +{ +lean_object* x_48; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_4); +lean_ctor_set(x_48, 1, x_9); +return x_48; +} +} +else +{ +lean_object* x_49; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_4); +lean_ctor_set(x_49, 1, x_9); +return x_49; +} +} +} +lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAux___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_9) == 0) +{ +uint8_t x_10; +x_10 = !lean_is_exclusive(x_9); +if (x_10 == 0) +{ +return x_9; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_9, 0); +x_12 = lean_ctor_get(x_9, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_9); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_11); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +} +else +{ +uint8_t x_14; +x_14 = !lean_is_exclusive(x_9); +if (x_14 == 0) +{ +return x_9; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_9, 0); +x_16 = lean_ctor_get(x_9, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_9); +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +return x_17; +} +} +} +} +lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg), 8, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_14 = l_Lean_Expr_getAppArgs___closed__1; +lean_inc(x_1); +x_15 = lean_mk_array(x_1, x_14); +x_16 = lean_unsigned_to_nat(1u); +x_17 = lean_nat_sub(x_1, x_16); +lean_dec(x_1); +lean_inc(x_2); +x_18 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_2, x_15, x_17); +lean_inc(x_3); +x_19 = lean_mk_array(x_3, x_14); +x_20 = lean_nat_sub(x_3, x_16); +lean_dec(x_3); +lean_inc(x_4); +x_21 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_4, x_19, x_20); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_21); +lean_inc(x_18); +x_22 = l_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff(x_7, x_18, x_21, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; uint8_t x_24; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_unbox(x_23); +lean_dec(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +lean_dec(x_4); +lean_dec(x_2); +x_25 = lean_ctor_get(x_22, 1); +lean_inc(x_25); +lean_dec(x_22); +x_26 = lean_array_get_size(x_18); +x_27 = lean_unsigned_to_nat(0u); +lean_inc(x_26); +x_28 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_26); +lean_ctor_set(x_28, 2, x_16); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_21); +lean_ctor_set(x_29, 1, x_18); +x_30 = l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__1(x_28, x_26, x_27, x_29, x_9, x_10, x_11, x_12, x_25); +lean_dec(x_28); +x_31 = !lean_is_exclusive(x_30); +if (x_31 == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_32 = lean_ctor_get(x_30, 0); +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_32, 1); +lean_inc(x_34); +lean_dec(x_32); +x_35 = l_Lean_mkAppN(x_5, x_34); +lean_dec(x_34); +x_36 = l_Lean_mkAppN(x_6, x_33); +lean_dec(x_33); +x_37 = l_Lean_Expr_setAppPPExplicit(x_35); +x_38 = l_Lean_Expr_setAppPPExplicit(x_36); +x_39 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +lean_ctor_set(x_30, 0, x_39); +return x_30; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_40 = lean_ctor_get(x_30, 0); +x_41 = lean_ctor_get(x_30, 1); +lean_inc(x_41); +lean_inc(x_40); +lean_dec(x_30); +x_42 = lean_ctor_get(x_40, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_43); +lean_dec(x_40); +x_44 = l_Lean_mkAppN(x_5, x_43); +lean_dec(x_43); +x_45 = l_Lean_mkAppN(x_6, x_42); +lean_dec(x_42); +x_46 = l_Lean_Expr_setAppPPExplicit(x_44); +x_47 = l_Lean_Expr_setAppPPExplicit(x_45); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_46); +lean_ctor_set(x_48, 1, x_47); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_41); +return x_49; +} +} +else +{ +uint8_t x_50; +lean_dec(x_21); +lean_dec(x_18); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_5); +x_50 = !lean_is_exclusive(x_22); +if (x_50 == 0) +{ +lean_object* x_51; lean_object* x_52; +x_51 = lean_ctor_get(x_22, 0); +lean_dec(x_51); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_2); +lean_ctor_set(x_52, 1, x_4); +lean_ctor_set(x_22, 0, x_52); +return x_22; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_22, 1); +lean_inc(x_53); +lean_dec(x_22); +x_54 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_54, 0, x_2); +lean_ctor_set(x_54, 1, x_4); +x_55 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_55, 0, x_54); +lean_ctor_set(x_55, 1, x_53); +return x_55; +} +} +} +else +{ +uint8_t x_56; +lean_dec(x_21); +lean_dec(x_18); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_56 = !lean_is_exclusive(x_22); +if (x_56 == 0) +{ +return x_22; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_22, 0); +x_58 = lean_ctor_get(x_22, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_22); +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_57); +lean_ctor_set(x_59, 1, x_58); +return x_59; +} +} +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; +x_8 = l_Lean_Expr_isApp(x_1); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_1); +lean_ctor_set(x_9, 1, x_2); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_7); +return x_10; +} +else +{ +uint8_t x_11; +x_11 = l_Lean_Expr_isApp(x_2); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_1); +lean_ctor_set(x_12, 1, x_2); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_7); +return x_13; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_14 = lean_unsigned_to_nat(0u); +x_15 = l_Lean_Expr_getAppNumArgsAux(x_1, x_14); +x_16 = l_Lean_Expr_getAppNumArgsAux(x_2, x_14); +x_17 = lean_nat_dec_eq(x_15, x_16); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_1); +lean_ctor_set(x_18, 1, x_2); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_7); +return x_19; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = l_Lean_Expr_getAppFn(x_1); +x_21 = l_Lean_Expr_getAppFn(x_2); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_21); +lean_inc(x_20); +x_22 = l_Lean_Meta_isExprDefEq(x_20, x_21, x_3, x_4, x_5, x_6, x_7); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; uint8_t x_24; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_unbox(x_23); +lean_dec(x_23); +if (x_24 == 0) +{ +uint8_t x_25; +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_25 = !lean_is_exclusive(x_22); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; +x_26 = lean_ctor_get(x_22, 0); +lean_dec(x_26); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_1); +lean_ctor_set(x_27, 1, x_2); +lean_ctor_set(x_22, 0, x_27); +return x_22; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_22, 1); +lean_inc(x_28); +lean_dec(x_22); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_1); +lean_ctor_set(x_29, 1, x_2); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_28); +return x_30; +} +} +else +{ +lean_object* x_31; lean_object* x_32; +x_31 = lean_ctor_get(x_22, 1); +lean_inc(x_31); +lean_dec(x_22); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_20); +x_32 = l_Lean_Meta_inferType(x_20, x_3, x_4, x_5, x_6, x_31); +if (lean_obj_tag(x_32) == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_32, 1); +lean_inc(x_34); +lean_dec(x_32); +lean_inc(x_15); +x_35 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_35, 0, x_15); +lean_inc(x_2); +lean_inc(x_1); +x_36 = lean_alloc_closure((void*)(l_Lean_Meta_addPPExplicitToExposeDiff_visit___lambda__1___boxed), 13, 6); +lean_closure_set(x_36, 0, x_15); +lean_closure_set(x_36, 1, x_1); +lean_closure_set(x_36, 2, x_16); +lean_closure_set(x_36, 3, x_2); +lean_closure_set(x_36, 4, x_20); +lean_closure_set(x_36, 5, x_21); +x_37 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(x_33, x_35, x_36, x_3, x_4, x_5, x_6, x_34); +if (lean_obj_tag(x_37) == 0) +{ +uint8_t x_38; +lean_dec(x_2); +lean_dec(x_1); +x_38 = !lean_is_exclusive(x_37); +if (x_38 == 0) +{ +return x_37; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_37, 0); +x_40 = lean_ctor_get(x_37, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_37); +x_41 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +return x_41; +} +} +else +{ +uint8_t x_42; +x_42 = !lean_is_exclusive(x_37); +if (x_42 == 0) +{ +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_37, 0); +lean_dec(x_43); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_1); +lean_ctor_set(x_44, 1, x_2); +lean_ctor_set_tag(x_37, 0); +lean_ctor_set(x_37, 0, x_44); +return x_37; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_37, 1); +lean_inc(x_45); +lean_dec(x_37); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_1); +lean_ctor_set(x_46, 1, x_2); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_45); +return x_47; +} +} +} +else +{ +uint8_t x_48; +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_48 = !lean_is_exclusive(x_32); +if (x_48 == 0) +{ +lean_object* x_49; lean_object* x_50; +x_49 = lean_ctor_get(x_32, 0); +lean_dec(x_49); +x_50 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_50, 0, x_1); +lean_ctor_set(x_50, 1, x_2); +lean_ctor_set_tag(x_32, 0); +lean_ctor_set(x_32, 0, x_50); +return x_32; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_51 = lean_ctor_get(x_32, 1); +lean_inc(x_51); +lean_dec(x_32); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_1); +lean_ctor_set(x_52, 1, x_2); +x_53 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_51); +return x_53; +} +} +} +} +else +{ +uint8_t x_54; +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_54 = !lean_is_exclusive(x_22); +if (x_54 == 0) +{ +lean_object* x_55; lean_object* x_56; +x_55 = lean_ctor_get(x_22, 0); +lean_dec(x_55); +x_56 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_56, 0, x_1); +lean_ctor_set(x_56, 1, x_2); +lean_ctor_set_tag(x_22, 0); +lean_ctor_set(x_22, 0, x_56); +return x_22; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_22, 1); +lean_inc(x_57); +lean_dec(x_22); +x_58 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_58, 0, x_1); +lean_ctor_set(x_58, 1, x_2); +x_59 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_59, 0, x_58); +lean_ctor_set(x_59, 1, x_57); +return x_59; +} +} +} +} +} +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; +x_10 = l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_1); +return x_10; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff_visit___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; +x_14 = l_Lean_Meta_addPPExplicitToExposeDiff_visit___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_8); +lean_dec(x_7); +return x_14; +} +} +static lean_object* _init_l_Lean_Meta_addPPExplicitToExposeDiff___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("all"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_addPPExplicitToExposeDiff___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_getSanitizeNames___closed__2; +x_2 = l_Lean_Meta_addPPExplicitToExposeDiff___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Meta_addPPExplicitToExposeDiff___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_getSanitizeNames___closed__2; +x_2 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__43; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; +x_8 = lean_ctor_get(x_5, 0); +lean_inc(x_8); +x_9 = l_Lean_Meta_addPPExplicitToExposeDiff___closed__2; +x_10 = 0; +x_11 = l_Lean_KVMap_getBool(x_8, x_9, x_10); +if (x_11 == 0) +{ +lean_object* x_12; uint8_t x_13; +x_12 = l_Lean_Meta_addPPExplicitToExposeDiff___closed__3; +x_13 = l_Lean_KVMap_getBool(x_8, x_12, x_10); +lean_dec(x_8); +if (x_13 == 0) +{ +lean_object* x_14; +x_14 = l_Lean_Meta_addPPExplicitToExposeDiff_visit(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_1); +lean_ctor_set(x_15, 1, x_2); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_7); +return x_16; +} +} +else +{ +lean_object* x_17; lean_object* x_18; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_1); +lean_ctor_set(x_17, 1, x_2); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_7); +return x_18; +} +} +} +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg_match__1___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_mkHasTypeButIsExpectedMsg_match__1___rarg), 2, 0); +return x_2; +} +} +static lean_object* _init_l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("has type"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; uint8_t x_9; +x_8 = l_Lean_Meta_addPPExplicitToExposeDiff(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_10 = lean_ctor_get(x_8, 0); +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l_Lean_indentExpr(x_11); +x_14 = l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__2; +x_15 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_13); +x_16 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10; +x_17 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +x_18 = l_Lean_indentExpr(x_12); +x_19 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +x_20 = l_Lean_KernelException_toMessageData___closed__15; +x_21 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +lean_ctor_set(x_8, 0, x_21); +return x_8; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_22 = lean_ctor_get(x_8, 0); +x_23 = lean_ctor_get(x_8, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_8); +x_24 = lean_ctor_get(x_22, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_22, 1); +lean_inc(x_25); +lean_dec(x_22); +x_26 = l_Lean_indentExpr(x_24); +x_27 = l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__2; +x_28 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_26); +x_29 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10; +x_30 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +x_31 = l_Lean_indentExpr(x_25); +x_32 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_32, 0, x_30); +lean_ctor_set(x_32, 1, x_31); +x_33 = l_Lean_KernelException_toMessageData___closed__15; +x_34 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_23); +return x_35; +} +} +} lean_object* l_Lean_Meta_throwAppTypeMismatch_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { @@ -890,98 +2420,92 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { -lean_object* x_11; -lean_inc(x_9); +lean_object* x_10; lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); +lean_inc(x_5); lean_inc(x_1); -x_11 = l_Lean_Meta_inferType(x_1, x_6, x_7, x_8, x_9, x_10); -if (lean_obj_tag(x_11) == 0) +x_10 = l_Lean_Meta_inferType(x_1, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_10) == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_12 = lean_ctor_get(x_11, 0); +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); -x_13 = lean_ctor_get(x_11, 1); -lean_inc(x_13); -lean_dec(x_11); -x_14 = l_Lean_indentExpr(x_4); -x_15 = l_Lean_KernelException_toMessageData___closed__29; -x_16 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_16, 0, x_15); -lean_ctor_set(x_16, 1, x_14); -x_17 = l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___closed__2; +lean_dec(x_10); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_13 = l_Lean_Meta_mkHasTypeButIsExpectedMsg(x_11, x_2, x_5, x_6, x_7, x_8, x_12); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = l_Lean_indentExpr(x_3); +x_17 = l_Lean_KernelException_toMessageData___closed__29; x_18 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_18, 0, x_16); -lean_ctor_set(x_18, 1, x_17); -x_19 = l_Lean_indentExpr(x_1); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +x_19 = l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___closed__2; x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); -x_21 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__8; +x_21 = l_Lean_indentExpr(x_1); x_22 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_22, 0, x_20); lean_ctor_set(x_22, 1, x_21); -x_23 = l_Lean_indentExpr(x_12); +x_23 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; x_24 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_24, 0, x_22); lean_ctor_set(x_24, 1, x_23); -x_25 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10; -x_26 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_26, 0, x_24); -lean_ctor_set(x_26, 1, x_25); -x_27 = l_Lean_indentExpr(x_2); -x_28 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_28, 0, x_26); -lean_ctor_set(x_28, 1, x_27); -x_29 = l_Lean_KernelException_toMessageData___closed__15; -x_30 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); -x_31 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_31, 0, x_30); -lean_ctor_set(x_31, 1, x_3); -x_32 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_29); -x_33 = l_Lean_throwError___at_Lean_Meta_throwAppTypeMismatch___spec__1___rarg(x_32, x_6, x_7, x_8, x_9, x_13); -lean_dec(x_9); +x_25 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_14); +x_26 = l_Lean_KernelException_toMessageData___closed__15; +x_27 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_26); +x_28 = l_Lean_throwError___at_Lean_Meta_throwAppTypeMismatch___spec__1___rarg(x_27, x_5, x_6, x_7, x_8, x_15); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); -return x_33; +lean_dec(x_5); +return x_28; } else { -uint8_t x_34; -lean_dec(x_9); +uint8_t x_29; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); -lean_dec(x_4); +lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_34 = !lean_is_exclusive(x_11); -if (x_34 == 0) +x_29 = !lean_is_exclusive(x_10); +if (x_29 == 0) { -return x_11; +return x_10; } else { -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_11, 0); -x_36 = lean_ctor_get(x_11, 1); -lean_inc(x_36); -lean_inc(x_35); -lean_dec(x_11); -x_37 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_37, 0, x_35); -lean_ctor_set(x_37, 1, x_36); -return x_37; +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_10, 0); +x_31 = lean_ctor_get(x_10, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_10); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_30); +lean_ctor_set(x_32, 1, x_31); +return x_32; } } } @@ -1019,14 +2543,14 @@ if (x_16 == 0) lean_object* x_17; lean_object* x_18; lean_object* x_19; x_17 = l_Lean_Expr_setAppPPExplicit(x_14); x_18 = lean_box(0); -x_19 = l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1(x_2, x_12, x_3, x_17, x_18, x_4, x_5, x_6, x_7, x_11); +x_19 = l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1(x_2, x_12, x_17, x_18, x_4, x_5, x_6, x_7, x_11); return x_19; } else { lean_object* x_20; lean_object* x_21; x_20 = lean_box(0); -x_21 = l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1(x_2, x_12, x_3, x_14, x_20, x_4, x_5, x_6, x_7, x_11); +x_21 = l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1(x_2, x_12, x_14, x_20, x_4, x_5, x_6, x_7, x_11); return x_21; } } @@ -1037,7 +2561,6 @@ lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_22 = !lean_is_exclusive(x_9); @@ -1065,7 +2588,7 @@ lean_object* l_Lean_Meta_throwAppTypeMismatch(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Meta_throwAppTypeMismatch___rarg), 8, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_throwAppTypeMismatch___rarg___boxed), 8, 0); return x_2; } } @@ -1081,13 +2604,22 @@ lean_dec(x_2); return x_7; } } -lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { -lean_object* x_11; -x_11 = l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -lean_dec(x_5); -return x_11; +lean_object* x_10; +x_10 = l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_4); +return x_10; +} +} +lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Meta_throwAppTypeMismatch___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_3); +return x_9; } } lean_object* l_Lean_Meta_checkApp_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -4461,7 +5993,7 @@ return x_53; } } } -lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Check___hyg_947_(lean_object* x_1) { +lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Check___hyg_1490_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -4538,6 +6070,22 @@ l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__9 = _init_l_Lean_Meta_t lean_mark_persistent(l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__9); l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10 = _init_l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10(); lean_mark_persistent(l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10); +l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__1 = _init_l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__1(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__1); +l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__2 = _init_l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__2(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__2); +l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__3 = _init_l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__3(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Meta_addPPExplicitToExposeDiff_hasExplicitDiff___spec__1___lambda__1___closed__3); +l_Lean_Meta_addPPExplicitToExposeDiff___closed__1 = _init_l_Lean_Meta_addPPExplicitToExposeDiff___closed__1(); +lean_mark_persistent(l_Lean_Meta_addPPExplicitToExposeDiff___closed__1); +l_Lean_Meta_addPPExplicitToExposeDiff___closed__2 = _init_l_Lean_Meta_addPPExplicitToExposeDiff___closed__2(); +lean_mark_persistent(l_Lean_Meta_addPPExplicitToExposeDiff___closed__2); +l_Lean_Meta_addPPExplicitToExposeDiff___closed__3 = _init_l_Lean_Meta_addPPExplicitToExposeDiff___closed__3(); +lean_mark_persistent(l_Lean_Meta_addPPExplicitToExposeDiff___closed__3); +l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__1 = _init_l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__1(); +lean_mark_persistent(l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__1); +l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__2 = _init_l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__2(); +lean_mark_persistent(l_Lean_Meta_mkHasTypeButIsExpectedMsg___closed__2); l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___closed__1 = _init_l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___closed__1); l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___closed__2 = _init_l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___closed__2(); @@ -4554,7 +6102,7 @@ l_Lean_Meta_isTypeCorrect___closed__1 = _init_l_Lean_Meta_isTypeCorrect___closed lean_mark_persistent(l_Lean_Meta_isTypeCorrect___closed__1); l_Lean_Meta_isTypeCorrect___closed__2 = _init_l_Lean_Meta_isTypeCorrect___closed__2(); lean_mark_persistent(l_Lean_Meta_isTypeCorrect___closed__2); -res = l_Lean_Meta_initFn____x40_Lean_Meta_Check___hyg_947_(lean_io_mk_world()); +res = l_Lean_Meta_initFn____x40_Lean_Meta_Check___hyg_1490_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Meta/ExprDefEq.c b/stage0/stdlib/Lean/Meta/ExprDefEq.c index e789ba8ef3..4d5698494a 100644 --- a/stage0/stdlib/Lean/Meta/ExprDefEq.c +++ b/stage0/stdlib/Lean/Meta/ExprDefEq.c @@ -565,6 +565,7 @@ lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unfoldDefEq___boxed(le lean_object* l_Lean_Meta_CheckAssignment_run(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitMain___at_Lean_Meta_CheckAssignment_check___spec__37(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___spec__1(lean_object*, lean_object*, size_t, size_t); +lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Std_PersistentArray_anyM___at_Lean_Meta_CheckAssignment_check___spec__45(lean_object*, lean_object*); lean_object* l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_check___spec__27___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_synthPending(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -725,7 +726,6 @@ uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignmentQuick_check_visit__ lean_object* l_Lean_Meta_getConfig(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_check___spec__33___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_check___spec__28(lean_object*, lean_object*, size_t, size_t); -lean_object* l_Lean_Meta_forallBoundedTelescope___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_sameHeadSymbol_match__1(lean_object*); lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visit___at_Lean_Meta_CheckAssignment_check___spec__15(lean_object*, lean_object*, lean_object*, lean_object*); @@ -15549,7 +15549,7 @@ x_13 = lean_alloc_closure((void*)(l_Lean_Meta_CheckAssignment_assignToConstFun__ lean_closure_set(x_13, 0, x_2); lean_closure_set(x_13, 1, x_3); lean_closure_set(x_13, 2, x_1); -x_14 = l_Lean_Meta_forallBoundedTelescope___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__2___rarg(x_10, x_12, x_13, x_4, x_5, x_6, x_7, x_11); +x_14 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(x_10, x_12, x_13, x_4, x_5, x_6, x_7, x_11); return x_14; } else @@ -41250,7 +41250,7 @@ x_15 = lean_alloc_closure((void*)(l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_a lean_closure_set(x_15, 0, x_2); lean_closure_set(x_15, 1, x_3); lean_closure_set(x_15, 2, x_1); -x_16 = l_Lean_Meta_forallBoundedTelescope___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__2___rarg(x_13, x_14, x_15, x_4, x_5, x_6, x_7, x_12); +x_16 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(x_13, x_14, x_15, x_4, x_5, x_6, x_7, x_12); return x_16; } else diff --git a/stage0/stdlib/Lean/Meta/Inductive.c b/stage0/stdlib/Lean/Meta/Inductive.c new file mode 100644 index 0000000000..b18b09c633 --- /dev/null +++ b/stage0/stdlib/Lean/Meta/Inductive.c @@ -0,0 +1,620 @@ +// Lean compiler output +// Module: Lean.Meta.Inductive +// Imports: Init Lean.Meta.ExprDefEq +#include +#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_compatibleCtors_match__2(lean_object*); +lean_object* l_Lean_Meta_compatibleCtors(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_name_eq(lean_object*, lean_object*); +lean_object* l_Lean_Meta_compatibleCtors_match__1(lean_object*); +lean_object* l_Lean_Meta_compatibleCtors_match__1___rarg(lean_object*, lean_object*); +lean_object* l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_KernelException_toMessageData___closed__3; +lean_object* l_Lean_getConstInfo___at_Lean_Meta_getParamNames___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_getConstInfoCtor___rarg___lambda__1___closed__2; +lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_forallMetaTelescope(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkConst(lean_object*, lean_object*); +lean_object* l_Lean_Meta_compatibleCtors_match__2___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Meta_compatibleCtors_match__1___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_3 = lean_ctor_get(x_1, 1); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +lean_dec(x_3); +x_7 = lean_apply_3(x_2, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_Meta_compatibleCtors_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_compatibleCtors_match__1___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_compatibleCtors_match__2___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_3 = lean_ctor_get(x_1, 1); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +lean_dec(x_3); +x_7 = lean_apply_3(x_2, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_Meta_compatibleCtors_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_compatibleCtors_match__2___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; uint8_t x_9; +x_7 = lean_ctor_get(x_4, 3); +x_8 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_ctor_get(x_8, 0); +lean_inc(x_7); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_7); +lean_ctor_set(x_11, 1, x_10); +lean_ctor_set_tag(x_8, 1); +lean_ctor_set(x_8, 0, x_11); +return x_8; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_12 = lean_ctor_get(x_8, 0); +x_13 = lean_ctor_get(x_8, 1); +lean_inc(x_13); +lean_inc(x_12); +lean_dec(x_8); +lean_inc(x_7); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_7); +lean_ctor_set(x_14, 1, x_12); +x_15 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_13); +return x_15; +} +} +} +lean_object* l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +lean_inc(x_1); +x_7 = l_Lean_getConstInfo___at_Lean_Meta_getParamNames___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +if (lean_obj_tag(x_8) == 6) +{ +uint8_t x_9; +lean_dec(x_1); +x_9 = !lean_is_exclusive(x_7); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_ctor_get(x_7, 0); +lean_dec(x_10); +x_11 = lean_ctor_get(x_8, 0); +lean_inc(x_11); +lean_dec(x_8); +lean_ctor_set(x_7, 0, x_11); +return x_7; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_7, 1); +lean_inc(x_12); +lean_dec(x_7); +x_13 = lean_ctor_get(x_8, 0); +lean_inc(x_13); +lean_dec(x_8); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_12); +return x_14; +} +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +lean_dec(x_8); +x_15 = lean_ctor_get(x_7, 1); +lean_inc(x_15); +lean_dec(x_7); +x_16 = lean_box(0); +x_17 = l_Lean_mkConst(x_1, x_16); +x_18 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_18, 0, x_17); +x_19 = l_Lean_KernelException_toMessageData___closed__3; +x_20 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_18); +x_21 = l_Lean_getConstInfoCtor___rarg___lambda__1___closed__2; +x_22 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +x_23 = l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2(x_22, x_2, x_3, x_4, x_5, x_15); +return x_23; +} +} +else +{ +uint8_t x_24; +lean_dec(x_1); +x_24 = !lean_is_exclusive(x_7); +if (x_24 == 0) +{ +return x_7; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_7, 0); +x_26 = lean_ctor_get(x_7, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_7); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_26); +return x_27; +} +} +} +} +lean_object* l_Lean_Meta_compatibleCtors(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1(x_1, x_3, x_4, x_5, x_6, x_7); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +x_11 = l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1(x_2, x_3, x_4, x_5, x_6, x_10); +if (lean_obj_tag(x_11) == 0) +{ +uint8_t x_12; +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_13 = lean_ctor_get(x_11, 0); +x_14 = lean_ctor_get(x_11, 1); +x_15 = lean_ctor_get(x_9, 1); +lean_inc(x_15); +x_16 = lean_ctor_get(x_13, 1); +lean_inc(x_16); +x_17 = lean_name_eq(x_15, x_16); +lean_dec(x_16); +lean_dec(x_15); +if (x_17 == 0) +{ +uint8_t x_18; lean_object* x_19; +lean_dec(x_13); +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_18 = 0; +x_19 = lean_box(x_18); +lean_ctor_set(x_11, 0, x_19); +return x_11; +} +else +{ +lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; +lean_free_object(x_11); +x_20 = lean_ctor_get(x_9, 0); +lean_inc(x_20); +lean_dec(x_9); +x_21 = lean_ctor_get(x_20, 2); +lean_inc(x_21); +lean_dec(x_20); +x_22 = 0; +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_23 = l_Lean_Meta_forallMetaTelescope(x_21, x_22, x_3, x_4, x_5, x_6, x_14); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_24, 1); +lean_inc(x_25); +lean_dec(x_24); +x_26 = lean_ctor_get(x_23, 1); +lean_inc(x_26); +lean_dec(x_23); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +x_28 = lean_ctor_get(x_13, 0); +lean_inc(x_28); +lean_dec(x_13); +x_29 = lean_ctor_get(x_28, 2); +lean_inc(x_29); +lean_dec(x_28); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_30 = l_Lean_Meta_forallMetaTelescope(x_29, x_22, x_3, x_4, x_5, x_6, x_26); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +x_33 = lean_ctor_get(x_30, 1); +lean_inc(x_33); +lean_dec(x_30); +x_34 = lean_ctor_get(x_32, 1); +lean_inc(x_34); +lean_dec(x_32); +x_35 = l_Lean_Meta_isExprDefEq(x_27, x_34, x_3, x_4, x_5, x_6, x_33); +return x_35; +} +else +{ +uint8_t x_36; +lean_dec(x_27); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_36 = !lean_is_exclusive(x_30); +if (x_36 == 0) +{ +return x_30; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_30, 0); +x_38 = lean_ctor_get(x_30, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_30); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +return x_39; +} +} +} +else +{ +uint8_t x_40; +lean_dec(x_13); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_40 = !lean_is_exclusive(x_23); +if (x_40 == 0) +{ +return x_23; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_23, 0); +x_42 = lean_ctor_get(x_23, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_23); +x_43 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +return x_43; +} +} +} +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; +x_44 = lean_ctor_get(x_11, 0); +x_45 = lean_ctor_get(x_11, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_11); +x_46 = lean_ctor_get(x_9, 1); +lean_inc(x_46); +x_47 = lean_ctor_get(x_44, 1); +lean_inc(x_47); +x_48 = lean_name_eq(x_46, x_47); +lean_dec(x_47); +lean_dec(x_46); +if (x_48 == 0) +{ +uint8_t x_49; lean_object* x_50; lean_object* x_51; +lean_dec(x_44); +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_49 = 0; +x_50 = lean_box(x_49); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_45); +return x_51; +} +else +{ +lean_object* x_52; lean_object* x_53; uint8_t x_54; lean_object* x_55; +x_52 = lean_ctor_get(x_9, 0); +lean_inc(x_52); +lean_dec(x_9); +x_53 = lean_ctor_get(x_52, 2); +lean_inc(x_53); +lean_dec(x_52); +x_54 = 0; +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_55 = l_Lean_Meta_forallMetaTelescope(x_53, x_54, x_3, x_4, x_5, x_6, x_45); +if (lean_obj_tag(x_55) == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_56 = lean_ctor_get(x_55, 0); +lean_inc(x_56); +x_57 = lean_ctor_get(x_56, 1); +lean_inc(x_57); +lean_dec(x_56); +x_58 = lean_ctor_get(x_55, 1); +lean_inc(x_58); +lean_dec(x_55); +x_59 = lean_ctor_get(x_57, 1); +lean_inc(x_59); +lean_dec(x_57); +x_60 = lean_ctor_get(x_44, 0); +lean_inc(x_60); +lean_dec(x_44); +x_61 = lean_ctor_get(x_60, 2); +lean_inc(x_61); +lean_dec(x_60); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_62 = l_Lean_Meta_forallMetaTelescope(x_61, x_54, x_3, x_4, x_5, x_6, x_58); +if (lean_obj_tag(x_62) == 0) +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_63 = lean_ctor_get(x_62, 0); +lean_inc(x_63); +x_64 = lean_ctor_get(x_63, 1); +lean_inc(x_64); +lean_dec(x_63); +x_65 = lean_ctor_get(x_62, 1); +lean_inc(x_65); +lean_dec(x_62); +x_66 = lean_ctor_get(x_64, 1); +lean_inc(x_66); +lean_dec(x_64); +x_67 = l_Lean_Meta_isExprDefEq(x_59, x_66, x_3, x_4, x_5, x_6, x_65); +return x_67; +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +lean_dec(x_59); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_68 = lean_ctor_get(x_62, 0); +lean_inc(x_68); +x_69 = lean_ctor_get(x_62, 1); +lean_inc(x_69); +if (lean_is_exclusive(x_62)) { + lean_ctor_release(x_62, 0); + lean_ctor_release(x_62, 1); + x_70 = x_62; +} else { + lean_dec_ref(x_62); + x_70 = lean_box(0); +} +if (lean_is_scalar(x_70)) { + x_71 = lean_alloc_ctor(1, 2, 0); +} else { + x_71 = x_70; +} +lean_ctor_set(x_71, 0, x_68); +lean_ctor_set(x_71, 1, x_69); +return x_71; +} +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +lean_dec(x_44); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_72 = lean_ctor_get(x_55, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_55, 1); +lean_inc(x_73); +if (lean_is_exclusive(x_55)) { + lean_ctor_release(x_55, 0); + lean_ctor_release(x_55, 1); + x_74 = x_55; +} else { + lean_dec_ref(x_55); + x_74 = lean_box(0); +} +if (lean_is_scalar(x_74)) { + x_75 = lean_alloc_ctor(1, 2, 0); +} else { + x_75 = x_74; +} +lean_ctor_set(x_75, 0, x_72); +lean_ctor_set(x_75, 1, x_73); +return x_75; +} +} +} +} +else +{ +uint8_t x_76; +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_76 = !lean_is_exclusive(x_11); +if (x_76 == 0) +{ +return x_11; +} +else +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_11, 0); +x_78 = lean_ctor_get(x_11, 1); +lean_inc(x_78); +lean_inc(x_77); +lean_dec(x_11); +x_79 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +return x_79; +} +} +} +else +{ +uint8_t x_80; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_80 = !lean_is_exclusive(x_8); +if (x_80 == 0) +{ +return x_8; +} +else +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_81 = lean_ctor_get(x_8, 0); +x_82 = lean_ctor_get(x_8, 1); +lean_inc(x_82); +lean_inc(x_81); +lean_dec(x_8); +x_83 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_83, 0, x_81); +lean_ctor_set(x_83, 1, x_82); +return x_83; +} +} +} +} +lean_object* l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +lean_object* l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +lean_object* initialize_Init(lean_object*); +lean_object* initialize_Lean_Meta_ExprDefEq(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Lean_Meta_Inductive(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Meta_ExprDefEq(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Lean/Meta/Match/Basic.c b/stage0/stdlib/Lean/Meta/Match/Basic.c index fee34d025c..72f2ac3172 100644 --- a/stage0/stdlib/Lean/Meta/Match/Basic.c +++ b/stage0/stdlib/Lean/Meta/Match/Basic.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Meta.Match.Basic -// Imports: Init Lean.Meta.Match.MatcherInfo Lean.Meta.Match.CaseArraySizes +// Imports: Init Lean.Meta.Check Lean.Meta.Match.MatcherInfo Lean.Meta.Match.CaseArraySizes #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -21,6 +21,7 @@ lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit___boxed(lean_object*, lean_o lean_object* l_List_mapM___at_Lean_Meta_Match_instantiatePatternMVars___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit___closed__2; lean_object* l_List_mapM___at_Lean_Meta_Match_instantiatePatternMVars___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_addPPExplicitToExposeDiff(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___at_Lean_Meta_Match_Example_applyFVarSubst___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_toMessageData___closed__7; lean_object* l_List_map___at_Lean_Meta_Match_Example_toMessageData___spec__2(lean_object*); @@ -57,6 +58,7 @@ lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit___closed__4; lean_object* l_Lean_MessageData_ofList(lean_object*); lean_object* l_Lean_Meta_Match_Example_applyFVarSubst_match__1(lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__2(lean_object*); lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_FVarSubst_find_x3f___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Alt_applyFVarSubst___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -85,6 +87,7 @@ lean_object* l_Lean_Meta_Match_Example_varsToUnderscore(lean_object*); lean_object* l_Lean_Meta_Match_Example_applyFVarSubst_match__2(lean_object*); lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4; lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mapM___at_Lean_Meta_Match_Problem_toMessageData___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_hasExprMVar_match__1(lean_object*); @@ -97,6 +100,7 @@ uint8_t l_Lean_Expr_hasExprMVar(lean_object*); lean_object* l_Lean_replaceRef(lean_object*, lean_object*); lean_object* l_List_filterAux___at_Lean_Meta_Match_Alt_replaceFVarId___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_List_foldl___at_Lean_Meta_Match_Example_toMessageData___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2; lean_object* l_Lean_Meta_instantiateLocalDeclMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst_match__3(lean_object*); lean_object* l_Lean_Meta_Match_Pattern_toMessageData___closed__4; @@ -118,6 +122,7 @@ lean_object* l_List_map___at_Lean_Meta_Match_Example_applyFVarSubst___spec__1(le lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1___closed__3; lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst_match__1(lean_object*); +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6; lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst_match__2___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__15; lean_object* l_Lean_Meta_Match_Alt_toMessageData___closed__1; @@ -125,10 +130,12 @@ lean_object* l_Lean_LocalDecl_toExpr(lean_object*); lean_object* l_Lean_Meta_Match_instantiateAltLHSMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1___closed__5; extern lean_object* l_instReprIterator___closed__2; +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___at_Lean_Meta_Match_Example_replaceFVarId___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkFVar(lean_object*); extern lean_object* l_Lean_MessageData_arrayExpr_toMessageData___closed__2; lean_object* l_Lean_replaceFVarIdAtLocalDecl(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1; lean_object* l_Lean_Meta_Match_counterExampleToMessageData(lean_object*); lean_object* l_Lean_Expr_replaceFVarId(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit___closed__3; @@ -146,7 +153,6 @@ lean_object* l_Lean_Meta_Match_Example_applyFVarSubst___boxed(lean_object*, lean lean_object* l_Lean_Meta_Match_Pattern_toMessageData___closed__2; lean_object* l_List_mapM___at_Lean_Meta_Match_Pattern_toExpr_visit___spec__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_redLength___rarg(lean_object*); -lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6; lean_object* l_Lean_Meta_Match_instInhabitedPattern; lean_object* l_List_find_x3f___rarg(lean_object*, lean_object*); extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1; @@ -154,10 +160,10 @@ lean_object* l_Lean_Meta_Match_Alt_toMessageData(lean_object*, lean_object*, lea lean_object* l_List_map___at_Lean_Meta_Match_Alt_replaceFVarId___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_List_foldl___at_Lean_Meta_Match_Example_toMessageData___spec__1___closed__1; lean_object* l_List_map___at_Lean_Meta_Match_Alt_applyFVarSubst___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4; lean_object* l_Lean_Meta_Match_Problem_toMessageData(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst(lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit_match__1(lean_object*); +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_Meta_FVarSubst_insert(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Alt_replaceFVarId(lean_object*, lean_object*, lean_object*); @@ -167,6 +173,7 @@ lean_object* l_List_map___at_Lean_Meta_Match_Example_replaceFVarId___spec__2(lea lean_object* l_Lean_Meta_Match_instInhabitedPattern___closed__1; lean_object* l_Lean_Meta_Match_Example_applyFVarSubst_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_instantiatePatternMVars_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5; lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Meta_Match_Pattern_hasExprMVar(lean_object*); lean_object* l_List_map___at_Lean_Meta_Match_Pattern_toMessageData___spec__2(lean_object*); @@ -193,20 +200,19 @@ extern lean_object* l_prec_x28___x29___closed__7; lean_object* l_List_map___at_Lean_Meta_Match_Alt_applyFVarSubst___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_indentD(lean_object*); lean_object* l_Lean_Meta_Match_examplesToMessageData(lean_object*); -lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9; lean_object* l_Lean_Meta_withExistingLocalDecls___at_Lean_Meta_Match_Alt_toMessageData___spec__3(lean_object*); -lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8; extern lean_object* l_prec_x28___x29___closed__3; lean_object* l_List_map___at_Lean_Meta_Match_Pattern_applyFVarSubst___spec__3(lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Meta_Match_Alt_checkAndReplaceFVarId___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3; lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1___closed__1; -lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7; +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst_match__2(lean_object*); lean_object* l_List_map___at_Lean_Meta_Match_Alt_replaceFVarId___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1___closed__6; extern lean_object* l_Lean_MessageData_formatAux___closed__3; -lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_indentExpr(lean_object*); lean_object* l_Lean_Meta_Match_instInhabitedProblem; lean_object* l_List_foldl___at_Lean_Meta_Match_Pattern_toMessageData___spec__1___closed__1; @@ -217,7 +223,6 @@ lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__2; lean_object* l_Lean_Meta_Match_counterExamplesToMessageData(lean_object*); lean_object* l_Lean_Meta_Match_Example_toMessageData___closed__1; lean_object* l_List_foldr___at_Lean_Meta_Match_Pattern_hasExprMVar___spec__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5; lean_object* l_Lean_Meta_Match_Alt_applyFVarSubst(lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__3; lean_object* l_List_map___at_Lean_Meta_Match_Example_replaceFVarId___spec__2___boxed(lean_object*, lean_object*, lean_object*); @@ -4948,7 +4953,28 @@ lean_dec(x_2); return x_4; } } -lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 0) @@ -4971,11 +4997,11 @@ return x_7; } } } -lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1(lean_object* x_1) { +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__2(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg), 3, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__2___rarg), 3, 0); return x_2; } } @@ -5132,6 +5158,99 @@ lean_ctor_set(x_11, 1, x_9); return x_11; } } +static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("type mismatch during dependent match-elimination at pattern variable '"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("' with type"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("\nexpected type"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_9 = lean_ctor_get(x_3, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_3, 1); +lean_inc(x_10); +lean_dec(x_3); +x_11 = lean_ctor_get(x_1, 0); +x_12 = l_Lean_LocalDecl_fvarId(x_2); +x_13 = l_Lean_mkFVar(x_12); +x_14 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_14, 0, x_13); +x_15 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2; +x_16 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_14); +x_17 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4; +x_18 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +x_19 = l_Lean_indentExpr(x_10); +x_20 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +x_21 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6; +x_22 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +x_23 = l_Lean_indentExpr(x_9); +x_24 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_23); +x_25 = l_Lean_KernelException_toMessageData___closed__15; +x_26 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +x_27 = l_Lean_throwErrorAt___at_Lean_Meta_Match_Alt_checkAndReplaceFVarId___spec__3(x_11, x_26, x_4, x_5, x_6, x_7, x_8); +return x_27; +} +} static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__1() { _start: { @@ -5160,57 +5279,6 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("type mismatch during dependent match-elimination at pattern variable '"); -return x_1; -} -} -static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} -static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("' with type"); -return x_1; -} -} -static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} -static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("\nexpected type"); -return x_1; -} -} -static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { @@ -5276,68 +5344,44 @@ x_22 = lean_unbox(x_21); lean_dec(x_21); if (x_22 == 0) { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_23 = lean_ctor_get(x_20, 1); lean_inc(x_23); lean_dec(x_20); -x_24 = lean_ctor_get(x_3, 0); -lean_inc(x_24); -x_25 = l_Lean_LocalDecl_fvarId(x_15); -lean_dec(x_15); -x_26 = l_Lean_mkFVar(x_25); -x_27 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_27, 0, x_26); -x_28 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5; -x_29 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_29, 0, x_28); -lean_ctor_set(x_29, 1, x_27); -x_30 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7; -x_31 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -x_32 = l_Lean_indentExpr(x_19); -x_33 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_32); -x_34 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9; -x_35 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_35, 0, x_33); -lean_ctor_set(x_35, 1, x_34); -x_36 = l_Lean_indentExpr(x_17); -x_37 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_37, 0, x_35); -lean_ctor_set(x_37, 1, x_36); -x_38 = l_Lean_KernelException_toMessageData___closed__15; -x_39 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_39, 0, x_37); -lean_ctor_set(x_39, 1, x_38); -x_40 = lean_alloc_closure((void*)(l_Lean_throwErrorAt___at_Lean_Meta_Match_Alt_checkAndReplaceFVarId___spec__3___boxed), 7, 2); -lean_closure_set(x_40, 0, x_24); -lean_closure_set(x_40, 1, x_39); +x_24 = lean_alloc_closure((void*)(l_Lean_Meta_addPPExplicitToExposeDiff), 7, 2); +lean_closure_set(x_24, 0, x_17); +lean_closure_set(x_24, 1, x_19); +lean_inc(x_3); +x_25 = lean_alloc_closure((void*)(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___boxed), 8, 2); +lean_closure_set(x_25, 0, x_3); +lean_closure_set(x_25, 1, x_15); +x_26 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); +lean_closure_set(x_26, 0, x_24); +lean_closure_set(x_26, 1, x_25); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_41 = l_Lean_Meta_withExistingLocalDecls___at_Lean_Meta_Match_Alt_toMessageData___spec__3___rarg(x_10, x_40, x_4, x_5, x_6, x_7, x_23); -if (lean_obj_tag(x_41) == 0) +x_27 = l_Lean_Meta_withExistingLocalDecls___at_Lean_Meta_Match_Alt_toMessageData___spec__3___rarg(x_10, x_26, x_4, x_5, x_6, x_7, x_23); +if (lean_obj_tag(x_27) == 0) { -lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_41, 0); -lean_inc(x_42); -x_43 = lean_ctor_get(x_41, 1); -lean_inc(x_43); -lean_dec(x_41); -x_44 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2(x_1, x_2, x_3, x_42, x_4, x_5, x_6, x_7, x_43); +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_27, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +x_30 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2(x_1, x_2, x_3, x_28, x_4, x_5, x_6, x_7, x_29); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_42); -return x_44; +lean_dec(x_28); +return x_30; } else { -uint8_t x_45; +uint8_t x_31; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); @@ -5345,48 +5389,48 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_45 = !lean_is_exclusive(x_41); -if (x_45 == 0) +x_31 = !lean_is_exclusive(x_27); +if (x_31 == 0) { -return x_41; +return x_27; } else { -lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_46 = lean_ctor_get(x_41, 0); -x_47 = lean_ctor_get(x_41, 1); -lean_inc(x_47); -lean_inc(x_46); -lean_dec(x_41); -x_48 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_48, 0, x_46); -lean_ctor_set(x_48, 1, x_47); -return x_48; +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_27, 0); +x_33 = lean_ctor_get(x_27, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_27); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; } } } else { -lean_object* x_49; lean_object* x_50; lean_object* x_51; +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_dec(x_19); lean_dec(x_17); lean_dec(x_15); lean_dec(x_10); -x_49 = lean_ctor_get(x_20, 1); -lean_inc(x_49); +x_35 = lean_ctor_get(x_20, 1); +lean_inc(x_35); lean_dec(x_20); -x_50 = lean_box(0); -x_51 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2(x_1, x_2, x_3, x_50, x_4, x_5, x_6, x_7, x_49); +x_36 = lean_box(0); +x_37 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2(x_1, x_2, x_3, x_36, x_4, x_5, x_6, x_7, x_35); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -return x_51; +return x_37; } } else { -uint8_t x_52; +uint8_t x_38; lean_dec(x_19); lean_dec(x_17); lean_dec(x_15); @@ -5398,29 +5442,29 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_52 = !lean_is_exclusive(x_20); -if (x_52 == 0) +x_38 = !lean_is_exclusive(x_20); +if (x_38 == 0) { return x_20; } else { -lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_53 = lean_ctor_get(x_20, 0); -x_54 = lean_ctor_get(x_20, 1); -lean_inc(x_54); -lean_inc(x_53); +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_20, 0); +x_40 = lean_ctor_get(x_20, 1); +lean_inc(x_40); +lean_inc(x_39); lean_dec(x_20); -x_55 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_55, 0, x_53); -lean_ctor_set(x_55, 1, x_54); -return x_55; +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +return x_41; } } } else { -uint8_t x_56; +uint8_t x_42; lean_dec(x_15); lean_dec(x_10); lean_dec(x_7); @@ -5430,23 +5474,23 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_56 = !lean_is_exclusive(x_16); -if (x_56 == 0) +x_42 = !lean_is_exclusive(x_16); +if (x_42 == 0) { return x_16; } else { -lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_57 = lean_ctor_get(x_16, 0); -x_58 = lean_ctor_get(x_16, 1); -lean_inc(x_58); -lean_inc(x_57); +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_16, 0); +x_44 = lean_ctor_get(x_16, 1); +lean_inc(x_44); +lean_inc(x_43); lean_dec(x_16); -x_59 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_59, 0, x_57); -lean_ctor_set(x_59, 1, x_58); -return x_59; +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; } } } @@ -5512,6 +5556,19 @@ lean_dec(x_4); return x_10; } } +lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_9; +} +} lean_object* l_Lean_Meta_Match_Example_replaceFVarId_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { @@ -7459,6 +7516,7 @@ return x_4; } } lean_object* initialize_Init(lean_object*); +lean_object* initialize_Lean_Meta_Check(lean_object*); lean_object* initialize_Lean_Meta_Match_MatcherInfo(lean_object*); lean_object* initialize_Lean_Meta_Match_CaseArraySizes(lean_object*); static bool _G_initialized = false; @@ -7469,6 +7527,9 @@ _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Meta_Check(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Lean_Meta_Match_MatcherInfo(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -7517,24 +7578,24 @@ l_Lean_Meta_Match_Alt_toMessageData___closed__2 = _init_l_Lean_Meta_Match_Alt_to lean_mark_persistent(l_Lean_Meta_Match_Alt_toMessageData___closed__2); l_Lean_Meta_Match_Alt_toMessageData___closed__3 = _init_l_Lean_Meta_Match_Alt_toMessageData___closed__3(); lean_mark_persistent(l_Lean_Meta_Match_Alt_toMessageData___closed__3); +l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1(); +lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1); +l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2(); +lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2); +l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3(); +lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3); +l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4(); +lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4); +l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5(); +lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5); +l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6(); +lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6); l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__1 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__1(); lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__1); l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__2 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__2(); lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__2); l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__3 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__3(); lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__3); -l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4(); -lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4); -l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5(); -lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5); -l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6(); -lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6); -l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7(); -lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7); -l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8(); -lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8); -l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9(); -lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9); l_List_foldl___at_Lean_Meta_Match_Example_toMessageData___spec__1___closed__1 = _init_l_List_foldl___at_Lean_Meta_Match_Example_toMessageData___spec__1___closed__1(); lean_mark_persistent(l_List_foldl___at_Lean_Meta_Match_Example_toMessageData___spec__1___closed__1); l_Lean_Meta_Match_Example_toMessageData___closed__1 = _init_l_Lean_Meta_Match_Example_toMessageData___closed__1(); diff --git a/stage0/stdlib/Lean/Meta/Tactic/Injection.c b/stage0/stdlib/Lean/Meta/Tactic/Injection.c index 335f48ad0f..48124920ad 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Injection.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Injection.c @@ -19,6 +19,7 @@ extern lean_object* l_myMacro____x40_Init_Notation___hyg_5846____closed__4; lean_object* l_Lean_Meta_injectionCore___closed__1; lean_object* l_Lean_Meta_injectionCore_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_mvarId_x21(lean_object*); +lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_userName(lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); @@ -27,6 +28,7 @@ lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__6; extern lean_object* l_myMacro____x40_Init_Notation___hyg_6358____closed__4; lean_object* l_Lean_Meta_injectionCore_match__2(lean_object*); lean_object* l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqOfHEqImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_isLevelDefEqAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* l_Lean_Meta_injectionIntro_match__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Tactic_Injection_0__Lean_Meta_heqToEq_match__2(lean_object*); @@ -48,6 +50,7 @@ lean_object* l___private_Lean_Meta_Tactic_Injection_0__Lean_Meta_heqToEq___lambd uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); +lean_object* l_Lean_addTrace___at_Lean_Meta_isLevelDefEqAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_tryClear(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_headBeta(lean_object*); lean_object* l_Lean_Meta_injection_match__1(lean_object*); @@ -60,10 +63,14 @@ lean_object* l___private_Lean_Meta_Tactic_Injection_0__Lean_Meta_heqToEq_match__ uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionIntro_match__3___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkEqOfHEq___at___private_Lean_Meta_Tactic_Injection_0__Lean_Meta_heqToEq___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_KernelException_toMessageData___closed__15; lean_object* l_Lean_Meta_injectionIntro_match__5(lean_object*); lean_object* l_Lean_Meta_whnf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkFVar(lean_object*); +extern lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__4; +lean_object* l_Lean_Meta_injection___closed__1; lean_object* l_Lean_LocalDecl_type(lean_object*); +lean_object* l_Lean_Meta_injection___closed__2; lean_object* l_Lean_Meta_throwTacticEx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -76,6 +83,7 @@ lean_object* l___private_Lean_Meta_Tactic_Injection_0__Lean_Meta_heqToEq_match__ lean_object* l_Lean_Meta_injection_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__3; lean_object* l_Lean_Meta_injectionCore_match__1(lean_object*); lean_object* l___private_Lean_Meta_Tactic_Injection_0__Lean_Meta_heqToEq_match__2___rarg(lean_object*, lean_object*, lean_object*); @@ -1075,587 +1083,764 @@ return x_10; } else { -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_free_object(x_10); x_18 = l_Lean_Expr_appFn_x21(x_12); x_19 = l_Lean_Expr_appFn_x21(x_18); -lean_dec(x_18); -x_20 = l_Lean_Expr_appArg_x21(x_19); +x_20 = l_Lean_Expr_appFn_x21(x_19); +x_21 = l_Lean_Expr_appArg_x21(x_20); +lean_dec(x_20); +x_22 = l_Lean_Expr_appArg_x21(x_19); lean_dec(x_19); -x_21 = l_Lean_Expr_appArg_x21(x_12); +x_23 = l_Lean_Expr_appArg_x21(x_18); +lean_dec(x_18); +x_24 = l_Lean_Expr_appArg_x21(x_12); lean_dec(x_12); -lean_inc(x_1); -x_22 = l_Lean_mkFVar(x_1); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_23 = l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqOfHEqImp(x_22, x_4, x_5, x_6, x_7, x_13); -if (lean_obj_tag(x_23) == 0) +x_25 = l_Lean_Meta_isExprDefEq(x_21, x_23, x_4, x_5, x_6, x_7, x_13); +if (lean_obj_tag(x_25) == 0) { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_23, 0); -lean_inc(x_24); -x_25 = lean_ctor_get(x_23, 1); -lean_inc(x_25); -lean_dec(x_23); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_26 = l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqImp(x_20, x_21, x_4, x_5, x_6, x_7, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_27 = lean_ctor_get(x_26, 0); -lean_inc(x_27); -x_28 = lean_ctor_get(x_26, 1); -lean_inc(x_28); +lean_object* x_26; uint8_t x_27; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_unbox(x_26); lean_dec(x_26); -x_29 = l_Lean_LocalDecl_userName(x_3); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_30 = l_Lean_Meta_assert(x_2, x_29, x_27, x_24, x_4, x_5, x_6, x_7, x_28); -if (lean_obj_tag(x_30) == 0) +if (x_27 == 0) +{ +uint8_t x_28; +lean_dec(x_24); +lean_dec(x_22); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_28 = !lean_is_exclusive(x_25); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; +x_29 = lean_ctor_get(x_25, 0); +lean_dec(x_29); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_1); +lean_ctor_set(x_30, 1, x_2); +lean_ctor_set(x_25, 0, x_30); +return x_25; +} +else { lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_30, 0); +x_31 = lean_ctor_get(x_25, 1); lean_inc(x_31); -x_32 = lean_ctor_get(x_30, 1); -lean_inc(x_32); -lean_dec(x_30); +lean_dec(x_25); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_1); +lean_ctor_set(x_32, 1, x_2); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_31); +return x_33; +} +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_25, 1); +lean_inc(x_34); +lean_dec(x_25); +lean_inc(x_1); +x_35 = l_Lean_mkFVar(x_1); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_33 = l_Lean_Meta_clear(x_31, x_1, x_4, x_5, x_6, x_7, x_32); -if (lean_obj_tag(x_33) == 0) +x_36 = l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqOfHEqImp(x_35, x_4, x_5, x_6, x_7, x_34); +if (lean_obj_tag(x_36) == 0) { -lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; -x_34 = lean_ctor_get(x_33, 0); -lean_inc(x_34); -x_35 = lean_ctor_get(x_33, 1); -lean_inc(x_35); -lean_dec(x_33); -x_36 = 1; -x_37 = l_Lean_Meta_intro1Core(x_34, x_36, x_4, x_5, x_6, x_7, x_35); -if (lean_obj_tag(x_37) == 0) +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_36, 1); +lean_inc(x_38); +lean_dec(x_36); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_39 = l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqImp(x_22, x_24, x_4, x_5, x_6, x_7, x_38); +if (lean_obj_tag(x_39) == 0) { -uint8_t x_38; -x_38 = !lean_is_exclusive(x_37); -if (x_38 == 0) -{ -lean_object* x_39; uint8_t x_40; -x_39 = lean_ctor_get(x_37, 0); -x_40 = !lean_is_exclusive(x_39); -if (x_40 == 0) -{ -return x_37; -} -else -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_41 = lean_ctor_get(x_39, 0); -x_42 = lean_ctor_get(x_39, 1); -lean_inc(x_42); +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_40 = lean_ctor_get(x_39, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_39, 1); lean_inc(x_41); lean_dec(x_39); -x_43 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_43, 0, x_41); -lean_ctor_set(x_43, 1, x_42); -lean_ctor_set(x_37, 0, x_43); -return x_37; -} +x_42 = l_Lean_LocalDecl_userName(x_3); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_43 = l_Lean_Meta_assert(x_2, x_42, x_40, x_37, x_4, x_5, x_6, x_7, x_41); +if (lean_obj_tag(x_43) == 0) +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_43, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_43, 1); +lean_inc(x_45); +lean_dec(x_43); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_46 = l_Lean_Meta_clear(x_44, x_1, x_4, x_5, x_6, x_7, x_45); +if (lean_obj_tag(x_46) == 0) +{ +lean_object* x_47; lean_object* x_48; uint8_t x_49; lean_object* x_50; +x_47 = lean_ctor_get(x_46, 0); +lean_inc(x_47); +x_48 = lean_ctor_get(x_46, 1); +lean_inc(x_48); +lean_dec(x_46); +x_49 = 1; +x_50 = l_Lean_Meta_intro1Core(x_47, x_49, x_4, x_5, x_6, x_7, x_48); +if (lean_obj_tag(x_50) == 0) +{ +uint8_t x_51; +x_51 = !lean_is_exclusive(x_50); +if (x_51 == 0) +{ +lean_object* x_52; uint8_t x_53; +x_52 = lean_ctor_get(x_50, 0); +x_53 = !lean_is_exclusive(x_52); +if (x_53 == 0) +{ +return x_50; } else { -lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_44 = lean_ctor_get(x_37, 0); -x_45 = lean_ctor_get(x_37, 1); -lean_inc(x_45); -lean_inc(x_44); -lean_dec(x_37); -x_46 = lean_ctor_get(x_44, 0); -lean_inc(x_46); -x_47 = lean_ctor_get(x_44, 1); -lean_inc(x_47); -if (lean_is_exclusive(x_44)) { - lean_ctor_release(x_44, 0); - lean_ctor_release(x_44, 1); - x_48 = x_44; -} else { - lean_dec_ref(x_44); - x_48 = lean_box(0); -} -if (lean_is_scalar(x_48)) { - x_49 = lean_alloc_ctor(0, 2, 0); -} else { - x_49 = x_48; -} -lean_ctor_set(x_49, 0, x_46); -lean_ctor_set(x_49, 1, x_47); -x_50 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_50, 0, x_49); -lean_ctor_set(x_50, 1, x_45); +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_52, 0); +x_55 = lean_ctor_get(x_52, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_52); +x_56 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +lean_ctor_set(x_50, 0, x_56); return x_50; } } else { -uint8_t x_51; -x_51 = !lean_is_exclusive(x_37); -if (x_51 == 0) -{ -return x_37; -} -else -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_52 = lean_ctor_get(x_37, 0); -x_53 = lean_ctor_get(x_37, 1); -lean_inc(x_53); -lean_inc(x_52); -lean_dec(x_37); -x_54 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_54, 0, x_52); -lean_ctor_set(x_54, 1, x_53); -return x_54; -} -} -} -else -{ -uint8_t x_55; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_55 = !lean_is_exclusive(x_33); -if (x_55 == 0) -{ -return x_33; -} -else -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_56 = lean_ctor_get(x_33, 0); -x_57 = lean_ctor_get(x_33, 1); +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_57 = lean_ctor_get(x_50, 0); +x_58 = lean_ctor_get(x_50, 1); +lean_inc(x_58); lean_inc(x_57); -lean_inc(x_56); -lean_dec(x_33); -x_58 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_58, 0, x_56); -lean_ctor_set(x_58, 1, x_57); -return x_58; -} -} -} -else -{ -uint8_t x_59; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -x_59 = !lean_is_exclusive(x_30); -if (x_59 == 0) -{ -return x_30; -} -else -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_60 = lean_ctor_get(x_30, 0); -x_61 = lean_ctor_get(x_30, 1); -lean_inc(x_61); +lean_dec(x_50); +x_59 = lean_ctor_get(x_57, 0); +lean_inc(x_59); +x_60 = lean_ctor_get(x_57, 1); lean_inc(x_60); -lean_dec(x_30); -x_62 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_62, 0, x_60); -lean_ctor_set(x_62, 1, x_61); -return x_62; +if (lean_is_exclusive(x_57)) { + lean_ctor_release(x_57, 0); + lean_ctor_release(x_57, 1); + x_61 = x_57; +} else { + lean_dec_ref(x_57); + x_61 = lean_box(0); } +if (lean_is_scalar(x_61)) { + x_62 = lean_alloc_ctor(0, 2, 0); +} else { + x_62 = x_61; +} +lean_ctor_set(x_62, 0, x_59); +lean_ctor_set(x_62, 1, x_60); +x_63 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_58); +return x_63; } } else { -uint8_t x_63; -lean_dec(x_24); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_63 = !lean_is_exclusive(x_26); -if (x_63 == 0) +uint8_t x_64; +x_64 = !lean_is_exclusive(x_50); +if (x_64 == 0) { -return x_26; +return x_50; } else { -lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_64 = lean_ctor_get(x_26, 0); -x_65 = lean_ctor_get(x_26, 1); +lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_65 = lean_ctor_get(x_50, 0); +x_66 = lean_ctor_get(x_50, 1); +lean_inc(x_66); lean_inc(x_65); -lean_inc(x_64); -lean_dec(x_26); -x_66 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_66, 0, x_64); -lean_ctor_set(x_66, 1, x_65); -return x_66; +lean_dec(x_50); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_65); +lean_ctor_set(x_67, 1, x_66); +return x_67; } } } else { -uint8_t x_67; -lean_dec(x_21); -lean_dec(x_20); +uint8_t x_68; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_67 = !lean_is_exclusive(x_23); -if (x_67 == 0) +x_68 = !lean_is_exclusive(x_46); +if (x_68 == 0) { -return x_23; +return x_46; } else { -lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_68 = lean_ctor_get(x_23, 0); -x_69 = lean_ctor_get(x_23, 1); +lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_69 = lean_ctor_get(x_46, 0); +x_70 = lean_ctor_get(x_46, 1); +lean_inc(x_70); lean_inc(x_69); -lean_inc(x_68); -lean_dec(x_23); -x_70 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_70, 0, x_68); -lean_ctor_set(x_70, 1, x_69); -return x_70; -} +lean_dec(x_46); +x_71 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_71, 0, x_69); +lean_ctor_set(x_71, 1, x_70); +return x_71; } } } else { -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; -x_71 = lean_ctor_get(x_10, 0); -x_72 = lean_ctor_get(x_10, 1); -lean_inc(x_72); -lean_inc(x_71); -lean_dec(x_10); -x_73 = l_myMacro____x40_Init_Notation___hyg_6358____closed__4; -x_74 = lean_unsigned_to_nat(4u); -x_75 = l_Lean_Expr_isAppOfArity(x_71, x_73, x_74); -if (x_75 == 0) -{ -lean_object* x_76; lean_object* x_77; -lean_dec(x_71); +uint8_t x_72; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -x_76 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_76, 0, x_1); -lean_ctor_set(x_76, 1, x_2); -x_77 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_77, 0, x_76); -lean_ctor_set(x_77, 1, x_72); -return x_77; +lean_dec(x_1); +x_72 = !lean_is_exclusive(x_43); +if (x_72 == 0) +{ +return x_43; } else { -lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_78 = l_Lean_Expr_appFn_x21(x_71); -x_79 = l_Lean_Expr_appFn_x21(x_78); -lean_dec(x_78); -x_80 = l_Lean_Expr_appArg_x21(x_79); -lean_dec(x_79); -x_81 = l_Lean_Expr_appArg_x21(x_71); -lean_dec(x_71); -lean_inc(x_1); -x_82 = l_Lean_mkFVar(x_1); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_83 = l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqOfHEqImp(x_82, x_4, x_5, x_6, x_7, x_72); -if (lean_obj_tag(x_83) == 0) +lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_73 = lean_ctor_get(x_43, 0); +x_74 = lean_ctor_get(x_43, 1); +lean_inc(x_74); +lean_inc(x_73); +lean_dec(x_43); +x_75 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_75, 0, x_73); +lean_ctor_set(x_75, 1, x_74); +return x_75; +} +} +} +else { -lean_object* x_84; lean_object* x_85; lean_object* x_86; -x_84 = lean_ctor_get(x_83, 0); -lean_inc(x_84); -x_85 = lean_ctor_get(x_83, 1); +uint8_t x_76; +lean_dec(x_37); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_76 = !lean_is_exclusive(x_39); +if (x_76 == 0) +{ +return x_39; +} +else +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_39, 0); +x_78 = lean_ctor_get(x_39, 1); +lean_inc(x_78); +lean_inc(x_77); +lean_dec(x_39); +x_79 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +return x_79; +} +} +} +else +{ +uint8_t x_80; +lean_dec(x_24); +lean_dec(x_22); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_80 = !lean_is_exclusive(x_36); +if (x_80 == 0) +{ +return x_36; +} +else +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_81 = lean_ctor_get(x_36, 0); +x_82 = lean_ctor_get(x_36, 1); +lean_inc(x_82); +lean_inc(x_81); +lean_dec(x_36); +x_83 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_83, 0, x_81); +lean_ctor_set(x_83, 1, x_82); +return x_83; +} +} +} +} +else +{ +uint8_t x_84; +lean_dec(x_24); +lean_dec(x_22); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_84 = !lean_is_exclusive(x_25); +if (x_84 == 0) +{ +return x_25; +} +else +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_25, 0); +x_86 = lean_ctor_get(x_25, 1); +lean_inc(x_86); lean_inc(x_85); -lean_dec(x_83); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_86 = l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqImp(x_80, x_81, x_4, x_5, x_6, x_7, x_85); -if (lean_obj_tag(x_86) == 0) +lean_dec(x_25); +x_87 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_87, 0, x_85); +lean_ctor_set(x_87, 1, x_86); +return x_87; +} +} +} +} +else { -lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; -x_87 = lean_ctor_get(x_86, 0); -lean_inc(x_87); -x_88 = lean_ctor_get(x_86, 1); +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; uint8_t x_92; +x_88 = lean_ctor_get(x_10, 0); +x_89 = lean_ctor_get(x_10, 1); +lean_inc(x_89); lean_inc(x_88); -lean_dec(x_86); -x_89 = l_Lean_LocalDecl_userName(x_3); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_90 = l_Lean_Meta_assert(x_2, x_89, x_87, x_84, x_4, x_5, x_6, x_7, x_88); -if (lean_obj_tag(x_90) == 0) +lean_dec(x_10); +x_90 = l_myMacro____x40_Init_Notation___hyg_6358____closed__4; +x_91 = lean_unsigned_to_nat(4u); +x_92 = l_Lean_Expr_isAppOfArity(x_88, x_90, x_91); +if (x_92 == 0) { -lean_object* x_91; lean_object* x_92; lean_object* x_93; -x_91 = lean_ctor_get(x_90, 0); -lean_inc(x_91); -x_92 = lean_ctor_get(x_90, 1); -lean_inc(x_92); -lean_dec(x_90); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_93 = l_Lean_Meta_clear(x_91, x_1, x_4, x_5, x_6, x_7, x_92); -if (lean_obj_tag(x_93) == 0) -{ -lean_object* x_94; lean_object* x_95; uint8_t x_96; lean_object* x_97; -x_94 = lean_ctor_get(x_93, 0); -lean_inc(x_94); -x_95 = lean_ctor_get(x_93, 1); -lean_inc(x_95); -lean_dec(x_93); -x_96 = 1; -x_97 = l_Lean_Meta_intro1Core(x_94, x_96, x_4, x_5, x_6, x_7, x_95); -if (lean_obj_tag(x_97) == 0) -{ -lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; -x_98 = lean_ctor_get(x_97, 0); -lean_inc(x_98); -x_99 = lean_ctor_get(x_97, 1); -lean_inc(x_99); -if (lean_is_exclusive(x_97)) { - lean_ctor_release(x_97, 0); - lean_ctor_release(x_97, 1); - x_100 = x_97; -} else { - lean_dec_ref(x_97); - x_100 = lean_box(0); -} -x_101 = lean_ctor_get(x_98, 0); -lean_inc(x_101); -x_102 = lean_ctor_get(x_98, 1); -lean_inc(x_102); -if (lean_is_exclusive(x_98)) { - lean_ctor_release(x_98, 0); - lean_ctor_release(x_98, 1); - x_103 = x_98; -} else { - lean_dec_ref(x_98); - x_103 = lean_box(0); -} -if (lean_is_scalar(x_103)) { - x_104 = lean_alloc_ctor(0, 2, 0); -} else { - x_104 = x_103; -} -lean_ctor_set(x_104, 0, x_101); -lean_ctor_set(x_104, 1, x_102); -if (lean_is_scalar(x_100)) { - x_105 = lean_alloc_ctor(0, 2, 0); -} else { - x_105 = x_100; -} -lean_ctor_set(x_105, 0, x_104); -lean_ctor_set(x_105, 1, x_99); -return x_105; -} -else -{ -lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; -x_106 = lean_ctor_get(x_97, 0); -lean_inc(x_106); -x_107 = lean_ctor_get(x_97, 1); -lean_inc(x_107); -if (lean_is_exclusive(x_97)) { - lean_ctor_release(x_97, 0); - lean_ctor_release(x_97, 1); - x_108 = x_97; -} else { - lean_dec_ref(x_97); - x_108 = lean_box(0); -} -if (lean_is_scalar(x_108)) { - x_109 = lean_alloc_ctor(1, 2, 0); -} else { - x_109 = x_108; -} -lean_ctor_set(x_109, 0, x_106); -lean_ctor_set(x_109, 1, x_107); -return x_109; -} -} -else -{ -lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; +lean_object* x_93; lean_object* x_94; +lean_dec(x_88); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -x_110 = lean_ctor_get(x_93, 0); -lean_inc(x_110); -x_111 = lean_ctor_get(x_93, 1); -lean_inc(x_111); -if (lean_is_exclusive(x_93)) { - lean_ctor_release(x_93, 0); - lean_ctor_release(x_93, 1); - x_112 = x_93; -} else { - lean_dec_ref(x_93); - x_112 = lean_box(0); -} -if (lean_is_scalar(x_112)) { - x_113 = lean_alloc_ctor(1, 2, 0); -} else { - x_113 = x_112; -} -lean_ctor_set(x_113, 0, x_110); -lean_ctor_set(x_113, 1, x_111); -return x_113; -} +x_93 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_93, 0, x_1); +lean_ctor_set(x_93, 1, x_2); +x_94 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_94, 0, x_93); +lean_ctor_set(x_94, 1, x_89); +return x_94; } else { -lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; +lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_95 = l_Lean_Expr_appFn_x21(x_88); +x_96 = l_Lean_Expr_appFn_x21(x_95); +x_97 = l_Lean_Expr_appFn_x21(x_96); +x_98 = l_Lean_Expr_appArg_x21(x_97); +lean_dec(x_97); +x_99 = l_Lean_Expr_appArg_x21(x_96); +lean_dec(x_96); +x_100 = l_Lean_Expr_appArg_x21(x_95); +lean_dec(x_95); +x_101 = l_Lean_Expr_appArg_x21(x_88); +lean_dec(x_88); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_102 = l_Lean_Meta_isExprDefEq(x_98, x_100, x_4, x_5, x_6, x_7, x_89); +if (lean_obj_tag(x_102) == 0) +{ +lean_object* x_103; uint8_t x_104; +x_103 = lean_ctor_get(x_102, 0); +lean_inc(x_103); +x_104 = lean_unbox(x_103); +lean_dec(x_103); +if (x_104 == 0) +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; +lean_dec(x_101); +lean_dec(x_99); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_1); -x_114 = lean_ctor_get(x_90, 0); -lean_inc(x_114); -x_115 = lean_ctor_get(x_90, 1); +x_105 = lean_ctor_get(x_102, 1); +lean_inc(x_105); +if (lean_is_exclusive(x_102)) { + lean_ctor_release(x_102, 0); + lean_ctor_release(x_102, 1); + x_106 = x_102; +} else { + lean_dec_ref(x_102); + x_106 = lean_box(0); +} +x_107 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_107, 0, x_1); +lean_ctor_set(x_107, 1, x_2); +if (lean_is_scalar(x_106)) { + x_108 = lean_alloc_ctor(0, 2, 0); +} else { + x_108 = x_106; +} +lean_ctor_set(x_108, 0, x_107); +lean_ctor_set(x_108, 1, x_105); +return x_108; +} +else +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_109 = lean_ctor_get(x_102, 1); +lean_inc(x_109); +lean_dec(x_102); +lean_inc(x_1); +x_110 = l_Lean_mkFVar(x_1); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_111 = l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqOfHEqImp(x_110, x_4, x_5, x_6, x_7, x_109); +if (lean_obj_tag(x_111) == 0) +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_112 = lean_ctor_get(x_111, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_111, 1); +lean_inc(x_113); +lean_dec(x_111); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_114 = l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqImp(x_99, x_101, x_4, x_5, x_6, x_7, x_113); +if (lean_obj_tag(x_114) == 0) +{ +lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; +x_115 = lean_ctor_get(x_114, 0); lean_inc(x_115); -if (lean_is_exclusive(x_90)) { - lean_ctor_release(x_90, 0); - lean_ctor_release(x_90, 1); - x_116 = x_90; -} else { - lean_dec_ref(x_90); - x_116 = lean_box(0); -} -if (lean_is_scalar(x_116)) { - x_117 = lean_alloc_ctor(1, 2, 0); -} else { - x_117 = x_116; -} -lean_ctor_set(x_117, 0, x_114); -lean_ctor_set(x_117, 1, x_115); -return x_117; -} -} -else +x_116 = lean_ctor_get(x_114, 1); +lean_inc(x_116); +lean_dec(x_114); +x_117 = l_Lean_LocalDecl_userName(x_3); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_118 = l_Lean_Meta_assert(x_2, x_117, x_115, x_112, x_4, x_5, x_6, x_7, x_116); +if (lean_obj_tag(x_118) == 0) { -lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; -lean_dec(x_84); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_118 = lean_ctor_get(x_86, 0); -lean_inc(x_118); -x_119 = lean_ctor_get(x_86, 1); +lean_object* x_119; lean_object* x_120; lean_object* x_121; +x_119 = lean_ctor_get(x_118, 0); lean_inc(x_119); -if (lean_is_exclusive(x_86)) { - lean_ctor_release(x_86, 0); - lean_ctor_release(x_86, 1); - x_120 = x_86; -} else { - lean_dec_ref(x_86); - x_120 = lean_box(0); -} -if (lean_is_scalar(x_120)) { - x_121 = lean_alloc_ctor(1, 2, 0); -} else { - x_121 = x_120; -} -lean_ctor_set(x_121, 0, x_118); -lean_ctor_set(x_121, 1, x_119); -return x_121; -} -} -else +x_120 = lean_ctor_get(x_118, 1); +lean_inc(x_120); +lean_dec(x_118); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_121 = l_Lean_Meta_clear(x_119, x_1, x_4, x_5, x_6, x_7, x_120); +if (lean_obj_tag(x_121) == 0) { -lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; -lean_dec(x_81); -lean_dec(x_80); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_122 = lean_ctor_get(x_83, 0); +lean_object* x_122; lean_object* x_123; uint8_t x_124; lean_object* x_125; +x_122 = lean_ctor_get(x_121, 0); lean_inc(x_122); -x_123 = lean_ctor_get(x_83, 1); +x_123 = lean_ctor_get(x_121, 1); lean_inc(x_123); -if (lean_is_exclusive(x_83)) { - lean_ctor_release(x_83, 0); - lean_ctor_release(x_83, 1); - x_124 = x_83; +lean_dec(x_121); +x_124 = 1; +x_125 = l_Lean_Meta_intro1Core(x_122, x_124, x_4, x_5, x_6, x_7, x_123); +if (lean_obj_tag(x_125) == 0) +{ +lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; +x_126 = lean_ctor_get(x_125, 0); +lean_inc(x_126); +x_127 = lean_ctor_get(x_125, 1); +lean_inc(x_127); +if (lean_is_exclusive(x_125)) { + lean_ctor_release(x_125, 0); + lean_ctor_release(x_125, 1); + x_128 = x_125; } else { - lean_dec_ref(x_83); - x_124 = lean_box(0); + lean_dec_ref(x_125); + x_128 = lean_box(0); } -if (lean_is_scalar(x_124)) { - x_125 = lean_alloc_ctor(1, 2, 0); +x_129 = lean_ctor_get(x_126, 0); +lean_inc(x_129); +x_130 = lean_ctor_get(x_126, 1); +lean_inc(x_130); +if (lean_is_exclusive(x_126)) { + lean_ctor_release(x_126, 0); + lean_ctor_release(x_126, 1); + x_131 = x_126; } else { - x_125 = x_124; + lean_dec_ref(x_126); + x_131 = lean_box(0); } -lean_ctor_set(x_125, 0, x_122); -lean_ctor_set(x_125, 1, x_123); -return x_125; +if (lean_is_scalar(x_131)) { + x_132 = lean_alloc_ctor(0, 2, 0); +} else { + x_132 = x_131; } +lean_ctor_set(x_132, 0, x_129); +lean_ctor_set(x_132, 1, x_130); +if (lean_is_scalar(x_128)) { + x_133 = lean_alloc_ctor(0, 2, 0); +} else { + x_133 = x_128; } +lean_ctor_set(x_133, 0, x_132); +lean_ctor_set(x_133, 1, x_127); +return x_133; +} +else +{ +lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; +x_134 = lean_ctor_get(x_125, 0); +lean_inc(x_134); +x_135 = lean_ctor_get(x_125, 1); +lean_inc(x_135); +if (lean_is_exclusive(x_125)) { + lean_ctor_release(x_125, 0); + lean_ctor_release(x_125, 1); + x_136 = x_125; +} else { + lean_dec_ref(x_125); + x_136 = lean_box(0); +} +if (lean_is_scalar(x_136)) { + x_137 = lean_alloc_ctor(1, 2, 0); +} else { + x_137 = x_136; +} +lean_ctor_set(x_137, 0, x_134); +lean_ctor_set(x_137, 1, x_135); +return x_137; } } else { -uint8_t x_126; +lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_138 = lean_ctor_get(x_121, 0); +lean_inc(x_138); +x_139 = lean_ctor_get(x_121, 1); +lean_inc(x_139); +if (lean_is_exclusive(x_121)) { + lean_ctor_release(x_121, 0); + lean_ctor_release(x_121, 1); + x_140 = x_121; +} else { + lean_dec_ref(x_121); + x_140 = lean_box(0); +} +if (lean_is_scalar(x_140)) { + x_141 = lean_alloc_ctor(1, 2, 0); +} else { + x_141 = x_140; +} +lean_ctor_set(x_141, 0, x_138); +lean_ctor_set(x_141, 1, x_139); +return x_141; +} +} +else +{ +lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +x_142 = lean_ctor_get(x_118, 0); +lean_inc(x_142); +x_143 = lean_ctor_get(x_118, 1); +lean_inc(x_143); +if (lean_is_exclusive(x_118)) { + lean_ctor_release(x_118, 0); + lean_ctor_release(x_118, 1); + x_144 = x_118; +} else { + lean_dec_ref(x_118); + x_144 = lean_box(0); +} +if (lean_is_scalar(x_144)) { + x_145 = lean_alloc_ctor(1, 2, 0); +} else { + x_145 = x_144; +} +lean_ctor_set(x_145, 0, x_142); +lean_ctor_set(x_145, 1, x_143); +return x_145; +} +} +else +{ +lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; +lean_dec(x_112); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_126 = !lean_is_exclusive(x_10); -if (x_126 == 0) +x_146 = lean_ctor_get(x_114, 0); +lean_inc(x_146); +x_147 = lean_ctor_get(x_114, 1); +lean_inc(x_147); +if (lean_is_exclusive(x_114)) { + lean_ctor_release(x_114, 0); + lean_ctor_release(x_114, 1); + x_148 = x_114; +} else { + lean_dec_ref(x_114); + x_148 = lean_box(0); +} +if (lean_is_scalar(x_148)) { + x_149 = lean_alloc_ctor(1, 2, 0); +} else { + x_149 = x_148; +} +lean_ctor_set(x_149, 0, x_146); +lean_ctor_set(x_149, 1, x_147); +return x_149; +} +} +else +{ +lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; +lean_dec(x_101); +lean_dec(x_99); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_150 = lean_ctor_get(x_111, 0); +lean_inc(x_150); +x_151 = lean_ctor_get(x_111, 1); +lean_inc(x_151); +if (lean_is_exclusive(x_111)) { + lean_ctor_release(x_111, 0); + lean_ctor_release(x_111, 1); + x_152 = x_111; +} else { + lean_dec_ref(x_111); + x_152 = lean_box(0); +} +if (lean_is_scalar(x_152)) { + x_153 = lean_alloc_ctor(1, 2, 0); +} else { + x_153 = x_152; +} +lean_ctor_set(x_153, 0, x_150); +lean_ctor_set(x_153, 1, x_151); +return x_153; +} +} +} +else +{ +lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; +lean_dec(x_101); +lean_dec(x_99); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_154 = lean_ctor_get(x_102, 0); +lean_inc(x_154); +x_155 = lean_ctor_get(x_102, 1); +lean_inc(x_155); +if (lean_is_exclusive(x_102)) { + lean_ctor_release(x_102, 0); + lean_ctor_release(x_102, 1); + x_156 = x_102; +} else { + lean_dec_ref(x_102); + x_156 = lean_box(0); +} +if (lean_is_scalar(x_156)) { + x_157 = lean_alloc_ctor(1, 2, 0); +} else { + x_157 = x_156; +} +lean_ctor_set(x_157, 0, x_154); +lean_ctor_set(x_157, 1, x_155); +return x_157; +} +} +} +} +else +{ +uint8_t x_158; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_158 = !lean_is_exclusive(x_10); +if (x_158 == 0) { return x_10; } else { -lean_object* x_127; lean_object* x_128; lean_object* x_129; -x_127 = lean_ctor_get(x_10, 0); -x_128 = lean_ctor_get(x_10, 1); -lean_inc(x_128); -lean_inc(x_127); +lean_object* x_159; lean_object* x_160; lean_object* x_161; +x_159 = lean_ctor_get(x_10, 0); +x_160 = lean_ctor_get(x_10, 1); +lean_inc(x_160); +lean_inc(x_159); lean_dec(x_10); -x_129 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_129, 0, x_127); -lean_ctor_set(x_129, 1, x_128); -return x_129; +x_161 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_161, 0, x_159); +lean_ctor_set(x_161, 1, x_160); +return x_161; } } } @@ -2114,6 +2299,23 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Meta_injection_match__1___rarg), 3, 0); return x_2; } } +static lean_object* _init_l_Lean_Meta_injection___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("before injectionIntro\n"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_injection___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Meta_injection___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} lean_object* l_Lean_Meta_injection(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { @@ -2161,7 +2363,7 @@ return x_17; } else { -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; x_18 = lean_ctor_get(x_10, 1); lean_inc(x_18); lean_dec(x_10); @@ -2170,36 +2372,104 @@ lean_inc(x_19); x_20 = lean_ctor_get(x_11, 1); lean_inc(x_20); lean_dec(x_11); -x_21 = l_Array_empty___closed__1; -x_22 = l_Lean_Meta_injectionIntro(x_20, x_19, x_21, x_3, x_5, x_6, x_7, x_8, x_18); -return x_22; +x_36 = lean_st_ref_get(x_8, x_18); +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_37, 3); +lean_inc(x_38); +lean_dec(x_37); +x_39 = lean_ctor_get_uint8(x_38, sizeof(void*)*1); +lean_dec(x_38); +if (x_39 == 0) +{ +lean_object* x_40; uint8_t x_41; +x_40 = lean_ctor_get(x_36, 1); +lean_inc(x_40); +lean_dec(x_36); +x_41 = 0; +x_21 = x_41; +x_22 = x_40; +goto block_35; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; +x_42 = lean_ctor_get(x_36, 1); +lean_inc(x_42); +lean_dec(x_36); +x_43 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__4; +x_44 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_isLevelDefEqAux___spec__2(x_43, x_5, x_6, x_7, x_8, x_42); +x_45 = lean_ctor_get(x_44, 0); +lean_inc(x_45); +x_46 = lean_ctor_get(x_44, 1); +lean_inc(x_46); +lean_dec(x_44); +x_47 = lean_unbox(x_45); +lean_dec(x_45); +x_21 = x_47; +x_22 = x_46; +goto block_35; +} +block_35: +{ +if (x_21 == 0) +{ +lean_object* x_23; lean_object* x_24; +x_23 = l_Array_empty___closed__1; +x_24 = l_Lean_Meta_injectionIntro(x_20, x_19, x_23, x_3, x_5, x_6, x_7, x_8, x_22); +return x_24; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +lean_inc(x_19); +x_25 = lean_alloc_ctor(5, 1, 0); +lean_ctor_set(x_25, 0, x_19); +x_26 = l_Lean_Meta_injection___closed__2; +x_27 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_25); +x_28 = l_Lean_KernelException_toMessageData___closed__15; +x_29 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +x_30 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__4; +x_31 = l_Lean_addTrace___at_Lean_Meta_isLevelDefEqAux___spec__1(x_30, x_29, x_5, x_6, x_7, x_8, x_22); +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +x_33 = l_Array_empty___closed__1; +x_34 = l_Lean_Meta_injectionIntro(x_20, x_19, x_33, x_3, x_5, x_6, x_7, x_8, x_32); +return x_34; +} +} } } else { -uint8_t x_23; +uint8_t x_48; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); -x_23 = !lean_is_exclusive(x_10); -if (x_23 == 0) +x_48 = !lean_is_exclusive(x_10); +if (x_48 == 0) { return x_10; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_10, 0); -x_25 = lean_ctor_get(x_10, 1); -lean_inc(x_25); -lean_inc(x_24); +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_10, 0); +x_50 = lean_ctor_get(x_10, 1); +lean_inc(x_50); +lean_inc(x_49); lean_dec(x_10); -x_26 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_26, 0, x_24); -lean_ctor_set(x_26, 1, x_25); -return x_26; +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; } } } @@ -2253,6 +2523,10 @@ l_Lean_Meta_injectionCore___lambda__1___closed__6 = _init_l_Lean_Meta_injectionC lean_mark_persistent(l_Lean_Meta_injectionCore___lambda__1___closed__6); l_Lean_Meta_injectionCore___closed__1 = _init_l_Lean_Meta_injectionCore___closed__1(); lean_mark_persistent(l_Lean_Meta_injectionCore___closed__1); +l_Lean_Meta_injection___closed__1 = _init_l_Lean_Meta_injection___closed__1(); +lean_mark_persistent(l_Lean_Meta_injection___closed__1); +l_Lean_Meta_injection___closed__2 = _init_l_Lean_Meta_injection___closed__2(); +lean_mark_persistent(l_Lean_Meta_injection___closed__2); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Meta/Tactic/Subst.c b/stage0/stdlib/Lean/Meta/Tactic/Subst.c index 3463e5e4b0..c1a8387389 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Subst.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Subst.c @@ -15,6 +15,7 @@ extern "C" { #endif lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_substCore___spec__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__4(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_substCore___lambda__14___closed__13; size_t l_USize_add(size_t, size_t); lean_object* l_Lean_Meta_substCore___lambda__3___boxed(lean_object**); lean_object* l_Lean_Expr_mvarId_x21(lean_object*); @@ -24,34 +25,37 @@ lean_object* l_Lean_Meta_withMVarContext___at_Lean_Meta_substCore___spec__11___r lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* l_Lean_Meta_substCore___lambda__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__21; lean_object* l_Lean_Meta_subst___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__23; uint8_t l_Lean_LocalDecl_isAuxDecl(lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__7___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__2; lean_object* l_Lean_Meta_subst_match__1(lean_object*); lean_object* l_Lean_Meta_substCore___lambda__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___at_Lean_Meta_substCore___spec__12(lean_object*); lean_object* l_Lean_Meta_subst___lambda__1___closed__4; lean_object* l_Lean_Meta_substCore___lambda__7___boxed(lean_object**); lean_object* l_Lean_Meta_substCore_match__6(lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__11; lean_object* l_Std_PersistentArray_findSomeM_x3f___at_Lean_Meta_subst___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__1; lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_substCore___spec__14(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_subst___lambda__1___closed__2; lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_isLevelDefEqAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withMVarContext___at_Lean_Meta_substCore___spec__11(lean_object*); lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withLocalDeclImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkEqSymm___at_Lean_Meta_substCore___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__12; uint8_t l_Lean_checkTraceOption(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqSymmImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__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_object*); +lean_object* l_Lean_Meta_substCore___lambda__12___boxed(lean_object**); lean_object* l_Lean_Meta_substCore___lambda__2___boxed(lean_object**); uint8_t lean_name_eq(lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__12___closed__1; lean_object* l_Std_PersistentArray_findSomeMAux___at_Lean_Meta_subst___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__6; lean_object* l_Lean_Meta_subst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); @@ -61,36 +65,37 @@ lean_object* l_Lean_MessageData_ofList(lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_subst_match__2(lean_object*); lean_object* l_Lean_Meta_substCore___lambda__8(lean_object*, lean_object*, 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* l_Lean_Meta_substCore___lambda__14___closed__5; lean_object* l_Lean_Meta_substCore_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_subst___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqReflImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_findDeclM_x3f___at_Lean_Meta_subst___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__12___closed__2; -lean_object* l_Lean_Meta_substCore___lambda__13___closed__9; uint8_t l_USize_decLt(size_t, size_t); lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_subst___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_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Meta_subst_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_subst_match__2___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__3; +lean_object* l_Lean_Meta_substCore___lambda__14___closed__19; lean_object* l_Lean_LocalContext_findDeclM_x3f___at_Lean_Meta_subst___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Tactic_subst___closed__1; lean_object* l_Lean_addTrace___at_Lean_Meta_substCore___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__20; +lean_object* l_Lean_Meta_substCore___lambda__14___closed__11; lean_object* l_Nat_foldM_loop___at_Lean_Meta_substCore___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* l_Lean_Meta_substCore___lambda__13___closed__10; lean_object* l_Lean_Meta_substCore(lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_foldM_loop___at_Lean_Meta_substCore___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* l_Lean_Meta_getMVarType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addTrace___at_Lean_Meta_substCore___spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkEq___at_Lean_Meta_substCore___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_addTrace___at_Lean_Meta_isLevelDefEqAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__4; lean_object* l_Lean_Expr_replaceFVar(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__16; lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_subst___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* l_Lean_Meta_substCore___lambda__14___closed__8; +lean_object* l_Lean_Meta_substCore___lambda__14___closed__17; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkLambdaFVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); @@ -98,6 +103,7 @@ lean_object* l_Lean_Meta_subst_match__3___rarg(lean_object*, lean_object*, lean_ lean_object* l_Lean_Meta_clear(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore_match__3(lean_object*); lean_object* l_Std_PersistentArray_findSomeMAux___at_Lean_Meta_subst___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__9; lean_object* l_Lean_Meta_substCore___lambda__1(lean_object*, lean_object*, 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* l_Array_forInUnsafe_loop___at_Lean_Meta_subst___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_AppBuilder_0__Lean_Meta_mkEqNDRecImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -107,32 +113,28 @@ lean_object* l_Lean_Meta_withMVarContext___at_Lean_Meta_admit___spec__2___rarg(l lean_object* lean_array_to_list(lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__10___boxed(lean_object**); lean_object* l_Lean_Meta_substCore___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__21; -lean_object* l_Lean_Meta_substCore___lambda__13___closed__23; lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__15; -lean_object* l_Lean_Meta_substCore___lambda__13___closed__13; lean_object* l_Lean_Meta_introNCore(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__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* l_Lean_Meta_substCore___lambda__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_object*, lean_object*); lean_object* l_Lean_Meta_subst_match__3(lean_object*); lean_object* l_Lean_Meta_whnf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__13___closed__1; lean_object* l_Lean_mkFVar(lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__3; +lean_object* l_Lean_Meta_substCore___lambda__14___closed__10; size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_Meta_substCore___lambda__6___boxed(lean_object**); lean_object* l_Lean_Meta_getMVarDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__22; lean_object* l_Nat_foldM_loop___at_Lean_Meta_substCore___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_fvarId(lean_object*); lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withMVarContextImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_matchEq_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__5; -lean_object* l_Lean_Meta_substCore___lambda__13___closed__14; lean_object* l_Lean_LocalDecl_type(lean_object*); lean_object* l_Lean_MetavarContext_exprDependsOn(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwTacticEx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__20; lean_object* l_Lean_Meta_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkEqNDRec___at_Lean_Meta_substCore___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -146,48 +148,50 @@ lean_object* l_Lean_Meta_checkNotAssigned(lean_object*, lean_object*, lean_objec lean_object* l_Lean_Meta_mkEqRefl___at_Lean_Meta_substCore___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__12; lean_object* l_Lean_Meta_FVarSubst_insert(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_foldM_loop___at_Lean_Meta_substCore___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_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__7; lean_object* l_Lean_Meta_subst___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__11___boxed(lean_object**); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__18; -lean_object* l_Lean_Meta_substCore___lambda__13___closed__24; lean_object* l_Lean_Meta_substCore_match__6___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__9___boxed(lean_object**); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__15; lean_object* l_Lean_Meta_mkEqRec___at_Lean_Meta_substCore___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__19; lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore_match__1(lean_object*); uint8_t l_Lean_Expr_isFVar(lean_object*); lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore_match__1___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedName; +lean_object* l_Lean_Meta_substCore___lambda__14___closed__14; +lean_object* l_Lean_Meta_substCore___lambda__14(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_subst___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_object* l_Lean_Meta_substCore___lambda__11___closed__1; lean_object* l_Lean_Meta_substCore___lambda__11___closed__4; -lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_Subst___hyg_1132_(lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__15; +lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_Subst___hyg_1231_(lean_object*); lean_object* l_Lean_Meta_substCore___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__7___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__11___closed__2; -lean_object* l_Lean_Meta_substCore___lambda__13(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__18; +lean_object* l_Lean_Meta_substCore___lambda__14___closed__3; +lean_object* l_Lean_Meta_substCore___lambda__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__13___closed__2; lean_object* l_Lean_Meta_substCore_match__4(lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__24; extern lean_object* l_Lean_Parser_Tactic_changeWith___closed__3; extern lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__1; lean_object* l_Std_PersistentArray_findSomeM_x3f___at_Lean_Meta_subst___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_mkOptionalNode___closed__2; lean_object* l_Lean_Meta_substCore___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getLocalDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__4; +lean_object* l_Lean_Meta_substCore___lambda__14___closed__22; lean_object* l_Nat_foldM_loop___at_Lean_Meta_substCore___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__16; lean_object* l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_substCore___lambda__13___closed__17; -lean_object* l_Lean_Meta_substCore___lambda__13___closed__8; lean_object* l_Lean_Meta_substCore_match__2(lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__14___closed__7; lean_object* l_Lean_Meta_subst___lambda__1___closed__1; lean_object* l_Lean_Meta_substCore_match__3___rarg(lean_object*, lean_object*); lean_object* l_Lean_indentExpr(lean_object*); @@ -197,9 +201,8 @@ extern lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_Util___hyg_212___ lean_object* l_Lean_Meta_substCore_match__5___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__5(lean_object*, lean_object*, 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* l_Lean_Meta_substCore___lambda__11___closed__5; -lean_object* l_Lean_Meta_substCore___lambda__13___closed__6; extern lean_object* l_Array_findSomeM_x3f___rarg___closed__1; -lean_object* l_Lean_Meta_substCore___lambda__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_substCore___lambda__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__11___closed__3; lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_substCore___spec__7(lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_subst___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -2193,8 +2196,8 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Meta_substCore___lambda__11___closed__3; x_2 = l_Lean_Meta_substCore___lambda__11___closed__4; -x_3 = lean_unsigned_to_nat(48u); -x_4 = lean_unsigned_to_nat(20u); +x_3 = lean_unsigned_to_nat(65u); +x_4 = lean_unsigned_to_nat(22u); x_5 = l_Lean_Syntax_strLitToAtom___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); return x_6; @@ -2813,7 +2816,175 @@ return x_117; } } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__12___closed__1() { +lean_object* l_Lean_Meta_substCore___lambda__12(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, uint8_t x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, uint8_t x_13, lean_object* x_14, lean_object* x_15, uint8_t x_16, lean_object* x_17, lean_object* x_18, lean_object* x_19, lean_object* x_20, lean_object* x_21) { +_start: +{ +if (x_16 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +lean_dec(x_15); +lean_inc(x_1); +x_22 = lean_alloc_closure((void*)(l_Lean_Meta_getMVarDecl___boxed), 6, 1); +lean_closure_set(x_22, 0, x_1); +x_23 = lean_box(x_8); +x_24 = lean_box(x_13); +lean_inc(x_1); +x_25 = lean_alloc_closure((void*)(l_Lean_Meta_substCore___lambda__11___boxed), 20, 14); +lean_closure_set(x_25, 0, x_2); +lean_closure_set(x_25, 1, x_3); +lean_closure_set(x_25, 2, x_4); +lean_closure_set(x_25, 3, x_1); +lean_closure_set(x_25, 4, x_5); +lean_closure_set(x_25, 5, x_6); +lean_closure_set(x_25, 6, x_7); +lean_closure_set(x_25, 7, x_23); +lean_closure_set(x_25, 8, x_9); +lean_closure_set(x_25, 9, x_10); +lean_closure_set(x_25, 10, x_11); +lean_closure_set(x_25, 11, x_12); +lean_closure_set(x_25, 12, x_24); +lean_closure_set(x_25, 13, x_14); +x_26 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); +lean_closure_set(x_26, 0, x_22); +lean_closure_set(x_26, 1, x_25); +x_27 = l_Lean_Meta_withMVarContext___at_Lean_Meta_substCore___spec__11___rarg(x_1, x_26, x_17, x_18, x_19, x_20, x_21); +return x_27; +} +else +{ +lean_dec(x_14); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +if (x_8 == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_12); +lean_dec(x_2); +x_28 = lean_box(0); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_15); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_21); +return x_30; +} +else +{ +lean_object* x_31; +lean_inc(x_20); +lean_inc(x_19); +lean_inc(x_18); +lean_inc(x_17); +x_31 = l_Lean_Meta_clear(x_15, x_2, x_17, x_18, x_19, x_20, x_21); +if (lean_obj_tag(x_31) == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +lean_dec(x_31); +x_34 = l_Lean_Meta_clear(x_32, x_12, x_17, x_18, x_19, x_20, x_33); +if (lean_obj_tag(x_34) == 0) +{ +uint8_t x_35; +x_35 = !lean_is_exclusive(x_34); +if (x_35 == 0) +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_34, 0); +x_37 = lean_box(0); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_36); +lean_ctor_set(x_34, 0, x_38); +return x_34; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_39 = lean_ctor_get(x_34, 0); +x_40 = lean_ctor_get(x_34, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_34); +x_41 = lean_box(0); +x_42 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_39); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_40); +return x_43; +} +} +else +{ +uint8_t x_44; +x_44 = !lean_is_exclusive(x_34); +if (x_44 == 0) +{ +return x_34; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_34, 0); +x_46 = lean_ctor_get(x_34, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_34); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +return x_47; +} +} +} +else +{ +uint8_t x_48; +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_12); +x_48 = !lean_is_exclusive(x_31); +if (x_48 == 0) +{ +return x_31; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_31, 0); +x_50 = lean_ctor_get(x_31, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_31); +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; +} +} +} +} +} +} +static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__1() { _start: { lean_object* x_1; @@ -2821,16 +2992,16 @@ x_1 = lean_mk_string("reverted variables "); return x_1; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__12___closed__2() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_substCore___lambda__12___closed__1; +x_1 = l_Lean_Meta_substCore___lambda__13___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -lean_object* l_Lean_Meta_substCore___lambda__12(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, uint8_t x_6, uint8_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +lean_object* l_Lean_Meta_substCore___lambda__13(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, uint8_t x_6, uint8_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { lean_object* x_15; @@ -2853,6 +3024,7 @@ lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); +lean_inc(x_3); x_21 = l_Lean_Meta_revert(x_3, x_19, x_20, x_10, x_11, x_12, x_13, x_16); if (lean_obj_tag(x_21) == 0) { @@ -2876,7 +3048,7 @@ lean_inc(x_10); x_28 = l_Lean_Meta_introNCore(x_25, x_27, x_26, x_20, x_10, x_11, x_12, x_13, x_23); if (lean_obj_tag(x_28) == 0) { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_48; lean_object* x_49; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_68; lean_object* x_69; lean_object* x_80; lean_object* x_81; lean_object* x_82; uint8_t x_83; x_29 = lean_ctor_get(x_28, 0); lean_inc(x_29); x_30 = lean_ctor_get(x_28, 1); @@ -2887,47 +3059,47 @@ lean_inc(x_31); x_32 = lean_ctor_get(x_29, 1); lean_inc(x_32); lean_dec(x_29); -x_60 = lean_st_ref_get(x_13, x_30); -x_61 = lean_ctor_get(x_60, 0); -lean_inc(x_61); -x_62 = lean_ctor_get(x_61, 3); -lean_inc(x_62); -lean_dec(x_61); -x_63 = lean_ctor_get_uint8(x_62, sizeof(void*)*1); -lean_dec(x_62); -if (x_63 == 0) +x_80 = lean_st_ref_get(x_13, x_30); +x_81 = lean_ctor_get(x_80, 0); +lean_inc(x_81); +x_82 = lean_ctor_get(x_81, 3); +lean_inc(x_82); +lean_dec(x_81); +x_83 = lean_ctor_get_uint8(x_82, sizeof(void*)*1); +lean_dec(x_82); +if (x_83 == 0) { -lean_object* x_64; uint8_t x_65; -x_64 = lean_ctor_get(x_60, 1); -lean_inc(x_64); -lean_dec(x_60); -x_65 = 0; -x_48 = x_65; -x_49 = x_64; -goto block_59; +lean_object* x_84; uint8_t x_85; +x_84 = lean_ctor_get(x_80, 1); +lean_inc(x_84); +lean_dec(x_80); +x_85 = 0; +x_68 = x_85; +x_69 = x_84; +goto block_79; } else { -lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; -x_66 = lean_ctor_get(x_60, 1); -lean_inc(x_66); -lean_dec(x_60); +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; +x_86 = lean_ctor_get(x_80, 1); +lean_inc(x_86); +lean_dec(x_80); lean_inc(x_8); -x_67 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_substCore___spec__14(x_8, x_10, x_11, x_12, x_13, x_66); -x_68 = lean_ctor_get(x_67, 0); -lean_inc(x_68); -x_69 = lean_ctor_get(x_67, 1); -lean_inc(x_69); -lean_dec(x_67); -x_70 = lean_unbox(x_68); -lean_dec(x_68); -x_48 = x_70; -x_49 = x_69; -goto block_59; +x_87 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_substCore___spec__14(x_8, x_10, x_11, x_12, x_13, x_86); +x_88 = lean_ctor_get(x_87, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_87, 1); +lean_inc(x_89); +lean_dec(x_87); +x_90 = lean_unbox(x_88); +lean_dec(x_88); +x_68 = x_90; +x_69 = x_89; +goto block_79; } -block_47: +block_67: { -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; x_34 = l_Lean_instInhabitedName; x_35 = lean_unsigned_to_nat(0u); x_36 = lean_array_get(x_34, x_31, x_35); @@ -2938,134 +3110,153 @@ x_39 = lean_array_get(x_34, x_31, x_38); lean_dec(x_31); lean_inc(x_39); x_40 = l_Lean_mkFVar(x_39); -lean_inc(x_32); -x_41 = lean_alloc_closure((void*)(l_Lean_Meta_getMVarDecl___boxed), 6, 1); -lean_closure_set(x_41, 0, x_32); -x_42 = lean_box(x_6); -x_43 = lean_box(x_7); -lean_inc(x_32); -x_44 = lean_alloc_closure((void*)(l_Lean_Meta_substCore___lambda__11___boxed), 20, 14); -lean_closure_set(x_44, 0, x_39); -lean_closure_set(x_44, 1, x_37); -lean_closure_set(x_44, 2, x_4); -lean_closure_set(x_44, 3, x_32); -lean_closure_set(x_44, 4, x_24); -lean_closure_set(x_44, 5, x_26); -lean_closure_set(x_44, 6, x_5); -lean_closure_set(x_44, 7, x_42); -lean_closure_set(x_44, 8, x_1); -lean_closure_set(x_44, 9, x_2); -lean_closure_set(x_44, 10, x_40); -lean_closure_set(x_44, 11, x_36); -lean_closure_set(x_44, 12, x_43); -lean_closure_set(x_44, 13, x_17); -x_45 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2); -lean_closure_set(x_45, 0, x_41); -lean_closure_set(x_45, 1, x_44); -x_46 = l_Lean_Meta_withMVarContext___at_Lean_Meta_substCore___spec__11___rarg(x_32, x_45, x_10, x_11, x_12, x_13, x_33); -return x_46; -} -block_59: +x_41 = lean_array_get_size(x_24); +x_42 = lean_nat_dec_eq(x_41, x_27); +lean_dec(x_41); +if (x_42 == 0) { -if (x_48 == 0) +lean_object* x_43; +lean_inc(x_32); +x_43 = l_Lean_Meta_getMVarType(x_32, x_10, x_11, x_12, x_13, x_33); +if (lean_obj_tag(x_43) == 0) { -lean_dec(x_8); -x_33 = x_49; -goto block_47; +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; +x_44 = lean_ctor_get(x_43, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_43, 1); +lean_inc(x_45); +lean_dec(x_43); +x_46 = lean_st_ref_get(x_13, x_45); +x_47 = lean_ctor_get(x_46, 1); +lean_inc(x_47); +lean_dec(x_46); +x_48 = lean_st_ref_get(x_11, x_47); +x_49 = lean_ctor_get(x_48, 0); +lean_inc(x_49); +x_50 = lean_ctor_get(x_48, 1); +lean_inc(x_50); +lean_dec(x_48); +x_51 = lean_ctor_get(x_49, 0); +lean_inc(x_51); +lean_dec(x_49); +lean_inc(x_44); +lean_inc(x_51); +x_52 = l_Lean_MetavarContext_exprDependsOn(x_51, x_44, x_36); +x_53 = lean_unbox(x_52); +lean_dec(x_52); +if (x_53 == 0) +{ +lean_object* x_54; uint8_t x_55; +x_54 = l_Lean_MetavarContext_exprDependsOn(x_51, x_44, x_39); +x_55 = lean_unbox(x_54); +lean_dec(x_54); +if (x_55 == 0) +{ +lean_object* x_56; +x_56 = l_Lean_Meta_substCore___lambda__12(x_32, x_39, x_37, x_4, x_24, x_26, x_5, x_6, x_1, x_2, x_40, x_36, x_7, x_17, x_3, x_20, x_10, x_11, x_12, x_13, x_50); +return x_56; } else { -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; -lean_inc(x_24); -x_50 = lean_array_to_list(lean_box(0), x_24); -x_51 = l_List_map___at_Lean_Meta_substCore___spec__12(x_50); -x_52 = l_Lean_MessageData_ofList(x_51); +uint8_t x_57; lean_object* x_58; +x_57 = 0; +x_58 = l_Lean_Meta_substCore___lambda__12(x_32, x_39, x_37, x_4, x_24, x_26, x_5, x_6, x_1, x_2, x_40, x_36, x_7, x_17, x_3, x_57, x_10, x_11, x_12, x_13, x_50); +return x_58; +} +} +else +{ +uint8_t x_59; lean_object* x_60; lean_dec(x_51); -x_53 = l_Lean_Meta_substCore___lambda__12___closed__2; -x_54 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_54, 0, x_53); -lean_ctor_set(x_54, 1, x_52); -x_55 = l_Lean_KernelException_toMessageData___closed__15; -x_56 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_56, 0, x_54); -lean_ctor_set(x_56, 1, x_55); -x_57 = l_Lean_addTrace___at_Lean_Meta_substCore___spec__13(x_8, x_56, x_10, x_11, x_12, x_13, x_49); -x_58 = lean_ctor_get(x_57, 1); -lean_inc(x_58); -lean_dec(x_57); -x_33 = x_58; -goto block_47; -} +lean_dec(x_44); +x_59 = 0; +x_60 = l_Lean_Meta_substCore___lambda__12(x_32, x_39, x_37, x_4, x_24, x_26, x_5, x_6, x_1, x_2, x_40, x_36, x_7, x_17, x_3, x_59, x_10, x_11, x_12, x_13, x_50); +return x_60; } } else { -uint8_t x_71; +uint8_t x_61; +lean_dec(x_40); +lean_dec(x_39); +lean_dec(x_37); +lean_dec(x_36); +lean_dec(x_32); lean_dec(x_24); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); -lean_dec(x_8); lean_dec(x_5); lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_71 = !lean_is_exclusive(x_28); -if (x_71 == 0) +x_61 = !lean_is_exclusive(x_43); +if (x_61 == 0) { -return x_28; +return x_43; } else { -lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_72 = lean_ctor_get(x_28, 0); -x_73 = lean_ctor_get(x_28, 1); -lean_inc(x_73); -lean_inc(x_72); -lean_dec(x_28); -x_74 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_74, 0, x_72); -lean_ctor_set(x_74, 1, x_73); -return x_74; +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_43, 0); +x_63 = lean_ctor_get(x_43, 1); +lean_inc(x_63); +lean_inc(x_62); +lean_dec(x_43); +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_62); +lean_ctor_set(x_64, 1, x_63); +return x_64; } } } else { -uint8_t x_75; -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); +uint8_t x_65; lean_object* x_66; +x_65 = 0; +x_66 = l_Lean_Meta_substCore___lambda__12(x_32, x_39, x_37, x_4, x_24, x_26, x_5, x_6, x_1, x_2, x_40, x_36, x_7, x_17, x_3, x_65, x_10, x_11, x_12, x_13, x_33); +return x_66; +} +} +block_79: +{ +if (x_68 == 0) +{ lean_dec(x_8); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_75 = !lean_is_exclusive(x_21); -if (x_75 == 0) -{ -return x_21; +x_33 = x_69; +goto block_67; } else { -lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_76 = lean_ctor_get(x_21, 0); -x_77 = lean_ctor_get(x_21, 1); -lean_inc(x_77); -lean_inc(x_76); -lean_dec(x_21); -x_78 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_78, 0, x_76); -lean_ctor_set(x_78, 1, x_77); -return x_78; +lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; +lean_inc(x_24); +x_70 = lean_array_to_list(lean_box(0), x_24); +x_71 = l_List_map___at_Lean_Meta_substCore___spec__12(x_70); +x_72 = l_Lean_MessageData_ofList(x_71); +lean_dec(x_71); +x_73 = l_Lean_Meta_substCore___lambda__13___closed__2; +x_74 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_74, 0, x_73); +lean_ctor_set(x_74, 1, x_72); +x_75 = l_Lean_KernelException_toMessageData___closed__15; +x_76 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_76, 0, x_74); +lean_ctor_set(x_76, 1, x_75); +x_77 = l_Lean_addTrace___at_Lean_Meta_substCore___spec__13(x_8, x_76, x_10, x_11, x_12, x_13, x_69); +x_78 = lean_ctor_get(x_77, 1); +lean_inc(x_78); +lean_dec(x_77); +x_33 = x_78; +goto block_67; } } } else { -uint8_t x_79; +uint8_t x_91; +lean_dec(x_24); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); @@ -3076,28 +3267,94 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_79 = !lean_is_exclusive(x_15); -if (x_79 == 0) +x_91 = !lean_is_exclusive(x_28); +if (x_91 == 0) +{ +return x_28; +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; +x_92 = lean_ctor_get(x_28, 0); +x_93 = lean_ctor_get(x_28, 1); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_28); +x_94 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_94, 0, x_92); +lean_ctor_set(x_94, 1, x_93); +return x_94; +} +} +} +else +{ +uint8_t x_95; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_95 = !lean_is_exclusive(x_21); +if (x_95 == 0) +{ +return x_21; +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_96 = lean_ctor_get(x_21, 0); +x_97 = lean_ctor_get(x_21, 1); +lean_inc(x_97); +lean_inc(x_96); +lean_dec(x_21); +x_98 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_98, 0, x_96); +lean_ctor_set(x_98, 1, x_97); +return x_98; +} +} +} +else +{ +uint8_t x_99; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_99 = !lean_is_exclusive(x_15); +if (x_99 == 0) { return x_15; } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; -x_80 = lean_ctor_get(x_15, 0); -x_81 = lean_ctor_get(x_15, 1); -lean_inc(x_81); -lean_inc(x_80); +lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_100 = lean_ctor_get(x_15, 0); +x_101 = lean_ctor_get(x_15, 1); +lean_inc(x_101); +lean_inc(x_100); lean_dec(x_15); -x_82 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_82, 0, x_80); -lean_ctor_set(x_82, 1, x_81); -return x_82; +x_102 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_102, 0, x_100); +lean_ctor_set(x_102, 1, x_101); +return x_102; } } } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__1() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -3107,7 +3364,7 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__2() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__2() { _start: { lean_object* x_1; @@ -3115,27 +3372,27 @@ x_1 = lean_mk_string("argument must be an equality proof"); return x_1; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__3() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__3() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__2; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__2; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__4() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__4() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__3; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__3; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__5() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__5() { _start: { lean_object* x_1; @@ -3143,16 +3400,16 @@ x_1 = lean_mk_string("invalid equality proof, it is not of the form "); return x_1; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__6() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__6() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__5; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__5; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__7() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__7() { _start: { lean_object* x_1; @@ -3160,16 +3417,16 @@ x_1 = lean_mk_string("\nafter WHNF, variable expected, but obtained"); return x_1; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__8() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__8() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__7; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__7; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__9() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__9() { _start: { lean_object* x_1; @@ -3177,32 +3434,32 @@ x_1 = lean_mk_string("(x = t)"); return x_1; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__10() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__10() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__9; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__9; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__11() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__6; -x_2 = l_Lean_Meta_substCore___lambda__13___closed__10; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__6; +x_2 = l_Lean_Meta_substCore___lambda__14___closed__10; x_3 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__12() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__12() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__11; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__11; x_2 = l_Lean_KernelException_toMessageData___closed__15; x_3 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_3, 0, x_1); @@ -3210,7 +3467,7 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__13() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__13() { _start: { lean_object* x_1; @@ -3218,32 +3475,32 @@ x_1 = lean_mk_string("(t = x)"); return x_1; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__14() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__14() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__13; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__13; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__15() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__15() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__6; -x_2 = l_Lean_Meta_substCore___lambda__13___closed__14; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__6; +x_2 = l_Lean_Meta_substCore___lambda__14___closed__14; x_3 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__16() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__16() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__15; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__15; x_2 = l_Lean_KernelException_toMessageData___closed__15; x_3 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_3, 0, x_1); @@ -3251,7 +3508,7 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__17() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__17() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -3261,7 +3518,7 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__18() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__18() { _start: { lean_object* x_1; @@ -3269,16 +3526,16 @@ x_1 = lean_mk_string("' occurs at"); return x_1; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__19() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__19() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__18; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__18; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__20() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__20() { _start: { lean_object* x_1; @@ -3286,16 +3543,16 @@ x_1 = lean_mk_string("substituting "); return x_1; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__21() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__21() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__20; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__20; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__22() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__22() { _start: { lean_object* x_1; @@ -3303,16 +3560,16 @@ x_1 = lean_mk_string(" (id: "); return x_1; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__23() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__23() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_substCore___lambda__13___closed__22; +x_1 = l_Lean_Meta_substCore___lambda__14___closed__22; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_substCore___lambda__13___closed__24() { +static lean_object* _init_l_Lean_Meta_substCore___lambda__14___closed__24() { _start: { lean_object* x_1; lean_object* x_2; @@ -3321,11 +3578,11 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -lean_object* l_Lean_Meta_substCore___lambda__13(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +lean_object* l_Lean_Meta_substCore___lambda__14(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; lean_object* x_13; -x_12 = l_Lean_Meta_substCore___lambda__13___closed__1; +x_12 = l_Lean_Meta_substCore___lambda__14___closed__1; lean_inc(x_1); x_13 = l_Lean_Meta_checkNotAssigned(x_1, x_12, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_13) == 0) @@ -3368,7 +3625,7 @@ lean_dec(x_2); x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); -x_22 = l_Lean_Meta_substCore___lambda__13___closed__4; +x_22 = l_Lean_Meta_substCore___lambda__14___closed__4; x_23 = lean_box(0); x_24 = l_Lean_Meta_throwTacticEx___rarg(x_12, x_1, x_22, x_23, x_7, x_8, x_9, x_10, x_21); lean_dec(x_10); @@ -3485,7 +3742,7 @@ lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean x_90 = lean_ctor_get(x_84, 1); lean_inc(x_90); lean_dec(x_84); -x_91 = l_Lean_Meta_substCore___lambda__13___closed__17; +x_91 = l_Lean_Meta_substCore___lambda__14___closed__17; x_92 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_isLevelDefEqAux___spec__2(x_91, x_7, x_8, x_9, x_10, x_90); x_93 = lean_ctor_get(x_92, 0); lean_inc(x_93); @@ -3523,9 +3780,9 @@ if (x_45 == 0) lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_dec(x_34); lean_dec(x_32); -x_46 = l_Lean_Meta_substCore___lambda__13___closed__17; +x_46 = l_Lean_Meta_substCore___lambda__14___closed__17; x_47 = lean_box(0); -x_48 = l_Lean_Meta_substCore___lambda__12(x_36, x_2, x_1, x_6, x_3, x_4, x_30, x_46, x_47, x_7, x_8, x_9, x_10, x_42); +x_48 = l_Lean_Meta_substCore___lambda__13(x_36, x_2, x_1, x_6, x_3, x_4, x_30, x_46, x_47, x_7, x_8, x_9, x_10, x_42); return x_48; } else @@ -3541,7 +3798,7 @@ x_50 = l_Lean_KernelException_toMessageData___closed__3; x_51 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_51, 0, x_50); lean_ctor_set(x_51, 1, x_49); -x_52 = l_Lean_Meta_substCore___lambda__13___closed__19; +x_52 = l_Lean_Meta_substCore___lambda__14___closed__19; x_53 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_53, 0, x_51); lean_ctor_set(x_53, 1, x_52); @@ -3592,11 +3849,11 @@ lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean lean_inc(x_34); x_67 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_67, 0, x_34); -x_68 = l_Lean_Meta_substCore___lambda__13___closed__21; +x_68 = l_Lean_Meta_substCore___lambda__14___closed__21; x_69 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_69, 0, x_68); lean_ctor_set(x_69, 1, x_67); -x_70 = l_Lean_Meta_substCore___lambda__13___closed__23; +x_70 = l_Lean_Meta_substCore___lambda__14___closed__23; x_71 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_71, 0, x_69); lean_ctor_set(x_71, 1, x_70); @@ -3606,7 +3863,7 @@ lean_ctor_set(x_72, 0, x_36); x_73 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_73, 0, x_71); lean_ctor_set(x_73, 1, x_72); -x_74 = l_Lean_Meta_substCore___lambda__13___closed__24; +x_74 = l_Lean_Meta_substCore___lambda__14___closed__24; x_75 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_75, 0, x_73); lean_ctor_set(x_75, 1, x_74); @@ -3620,7 +3877,7 @@ x_78 = l_Lean_KernelException_toMessageData___closed__15; x_79 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_79, 0, x_77); lean_ctor_set(x_79, 1, x_78); -x_80 = l_Lean_Meta_substCore___lambda__13___closed__17; +x_80 = l_Lean_Meta_substCore___lambda__14___closed__17; x_81 = l_Lean_addTrace___at_Lean_Meta_isLevelDefEqAux___spec__1(x_80, x_79, x_7, x_8, x_9, x_10, x_66); x_82 = lean_ctor_get(x_81, 1); lean_inc(x_82); @@ -3645,11 +3902,11 @@ x_98 = l_Lean_indentExpr(x_34); if (x_30 == 0) { lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; -x_99 = l_Lean_Meta_substCore___lambda__13___closed__12; +x_99 = l_Lean_Meta_substCore___lambda__14___closed__12; x_100 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_100, 0, x_99); lean_ctor_set(x_100, 1, x_97); -x_101 = l_Lean_Meta_substCore___lambda__13___closed__8; +x_101 = l_Lean_Meta_substCore___lambda__14___closed__8; x_102 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_102, 0, x_100); lean_ctor_set(x_102, 1, x_101); @@ -3671,11 +3928,11 @@ return x_107; else { lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; -x_108 = l_Lean_Meta_substCore___lambda__13___closed__16; +x_108 = l_Lean_Meta_substCore___lambda__14___closed__16; x_109 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_109, 0, x_108); lean_ctor_set(x_109, 1, x_97); -x_110 = l_Lean_Meta_substCore___lambda__13___closed__8; +x_110 = l_Lean_Meta_substCore___lambda__14___closed__8; x_111 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_111, 0, x_109); lean_ctor_set(x_111, 1, x_110); @@ -3838,7 +4095,7 @@ lean_closure_set(x_11, 0, x_1); x_12 = lean_box(x_5); x_13 = lean_box(x_3); lean_inc(x_1); -x_14 = lean_alloc_closure((void*)(l_Lean_Meta_substCore___lambda__13___boxed), 11, 5); +x_14 = lean_alloc_closure((void*)(l_Lean_Meta_substCore___lambda__14___boxed), 11, 5); lean_closure_set(x_14, 0, x_1); lean_closure_set(x_14, 1, x_2); lean_closure_set(x_14, 2, x_4); @@ -4194,7 +4451,42 @@ lean_dec(x_5); return x_23; } } -lean_object* l_Lean_Meta_substCore___lambda__12___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +lean_object* l_Lean_Meta_substCore___lambda__12___boxed(lean_object** _args) { +lean_object* x_1 = _args[0]; +lean_object* x_2 = _args[1]; +lean_object* x_3 = _args[2]; +lean_object* x_4 = _args[3]; +lean_object* x_5 = _args[4]; +lean_object* x_6 = _args[5]; +lean_object* x_7 = _args[6]; +lean_object* x_8 = _args[7]; +lean_object* x_9 = _args[8]; +lean_object* x_10 = _args[9]; +lean_object* x_11 = _args[10]; +lean_object* x_12 = _args[11]; +lean_object* x_13 = _args[12]; +lean_object* x_14 = _args[13]; +lean_object* x_15 = _args[14]; +lean_object* x_16 = _args[15]; +lean_object* x_17 = _args[16]; +lean_object* x_18 = _args[17]; +lean_object* x_19 = _args[18]; +lean_object* x_20 = _args[19]; +lean_object* x_21 = _args[20]; +_start: +{ +uint8_t x_22; uint8_t x_23; uint8_t x_24; lean_object* x_25; +x_22 = lean_unbox(x_8); +lean_dec(x_8); +x_23 = lean_unbox(x_13); +lean_dec(x_13); +x_24 = lean_unbox(x_16); +lean_dec(x_16); +x_25 = l_Lean_Meta_substCore___lambda__12(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_22, x_9, x_10, x_11, x_12, x_23, x_14, x_15, x_24, x_17, x_18, x_19, x_20, x_21); +return x_25; +} +} +lean_object* l_Lean_Meta_substCore___lambda__13___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { uint8_t x_15; uint8_t x_16; lean_object* x_17; @@ -4202,12 +4494,12 @@ x_15 = lean_unbox(x_6); lean_dec(x_6); x_16 = lean_unbox(x_7); lean_dec(x_7); -x_17 = l_Lean_Meta_substCore___lambda__12(x_1, x_2, x_3, x_4, x_5, x_15, x_16, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +x_17 = l_Lean_Meta_substCore___lambda__13(x_1, x_2, x_3, x_4, x_5, x_15, x_16, x_8, x_9, x_10, x_11, x_12, x_13, x_14); lean_dec(x_9); return x_17; } } -lean_object* l_Lean_Meta_substCore___lambda__13___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +lean_object* l_Lean_Meta_substCore___lambda__14___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { uint8_t x_12; uint8_t x_13; lean_object* x_14; @@ -4215,7 +4507,7 @@ x_12 = lean_unbox(x_4); lean_dec(x_4); x_13 = lean_unbox(x_5); lean_dec(x_5); -x_14 = l_Lean_Meta_substCore___lambda__13(x_1, x_2, x_3, x_12, x_13, x_6, x_7, x_8, x_9, x_10, x_11); +x_14 = l_Lean_Meta_substCore___lambda__14(x_1, x_2, x_3, x_12, x_13, x_6, x_7, x_8, x_9, x_10, x_11); return x_14; } } @@ -6679,7 +6971,7 @@ x_27 = l_Lean_KernelException_toMessageData___closed__3; x_28 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); -x_29 = l_Lean_Meta_substCore___lambda__13___closed__1; +x_29 = l_Lean_Meta_substCore___lambda__14___closed__1; x_30 = lean_box(0); x_31 = l_Lean_Meta_throwTacticEx___rarg(x_29, x_2, x_28, x_30, x_4, x_5, x_6, x_7, x_22); lean_dec(x_7); @@ -6855,7 +7147,7 @@ x_71 = l_Lean_KernelException_toMessageData___closed__15; x_72 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_72, 0, x_70); lean_ctor_set(x_72, 1, x_71); -x_73 = l_Lean_Meta_substCore___lambda__13___closed__1; +x_73 = l_Lean_Meta_substCore___lambda__14___closed__1; x_74 = lean_box(0); x_75 = l_Lean_Meta_throwTacticEx___rarg(x_73, x_2, x_72, x_74, x_4, x_5, x_6, x_7, x_66); lean_dec(x_7); @@ -7182,11 +7474,11 @@ lean_dec(x_3); return x_9; } } -lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_Subst___hyg_1132_(lean_object* x_1) { +lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_Subst___hyg_1231_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Meta_substCore___lambda__13___closed__17; +x_2 = l_Lean_Meta_substCore___lambda__14___closed__17; x_3 = l_Lean_registerTraceClass(x_2, x_1); return x_3; } @@ -7238,58 +7530,58 @@ l_Lean_Meta_substCore___lambda__11___closed__4 = _init_l_Lean_Meta_substCore___l lean_mark_persistent(l_Lean_Meta_substCore___lambda__11___closed__4); l_Lean_Meta_substCore___lambda__11___closed__5 = _init_l_Lean_Meta_substCore___lambda__11___closed__5(); lean_mark_persistent(l_Lean_Meta_substCore___lambda__11___closed__5); -l_Lean_Meta_substCore___lambda__12___closed__1 = _init_l_Lean_Meta_substCore___lambda__12___closed__1(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__12___closed__1); -l_Lean_Meta_substCore___lambda__12___closed__2 = _init_l_Lean_Meta_substCore___lambda__12___closed__2(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__12___closed__2); l_Lean_Meta_substCore___lambda__13___closed__1 = _init_l_Lean_Meta_substCore___lambda__13___closed__1(); lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__1); l_Lean_Meta_substCore___lambda__13___closed__2 = _init_l_Lean_Meta_substCore___lambda__13___closed__2(); lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__2); -l_Lean_Meta_substCore___lambda__13___closed__3 = _init_l_Lean_Meta_substCore___lambda__13___closed__3(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__3); -l_Lean_Meta_substCore___lambda__13___closed__4 = _init_l_Lean_Meta_substCore___lambda__13___closed__4(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__4); -l_Lean_Meta_substCore___lambda__13___closed__5 = _init_l_Lean_Meta_substCore___lambda__13___closed__5(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__5); -l_Lean_Meta_substCore___lambda__13___closed__6 = _init_l_Lean_Meta_substCore___lambda__13___closed__6(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__6); -l_Lean_Meta_substCore___lambda__13___closed__7 = _init_l_Lean_Meta_substCore___lambda__13___closed__7(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__7); -l_Lean_Meta_substCore___lambda__13___closed__8 = _init_l_Lean_Meta_substCore___lambda__13___closed__8(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__8); -l_Lean_Meta_substCore___lambda__13___closed__9 = _init_l_Lean_Meta_substCore___lambda__13___closed__9(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__9); -l_Lean_Meta_substCore___lambda__13___closed__10 = _init_l_Lean_Meta_substCore___lambda__13___closed__10(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__10); -l_Lean_Meta_substCore___lambda__13___closed__11 = _init_l_Lean_Meta_substCore___lambda__13___closed__11(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__11); -l_Lean_Meta_substCore___lambda__13___closed__12 = _init_l_Lean_Meta_substCore___lambda__13___closed__12(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__12); -l_Lean_Meta_substCore___lambda__13___closed__13 = _init_l_Lean_Meta_substCore___lambda__13___closed__13(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__13); -l_Lean_Meta_substCore___lambda__13___closed__14 = _init_l_Lean_Meta_substCore___lambda__13___closed__14(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__14); -l_Lean_Meta_substCore___lambda__13___closed__15 = _init_l_Lean_Meta_substCore___lambda__13___closed__15(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__15); -l_Lean_Meta_substCore___lambda__13___closed__16 = _init_l_Lean_Meta_substCore___lambda__13___closed__16(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__16); -l_Lean_Meta_substCore___lambda__13___closed__17 = _init_l_Lean_Meta_substCore___lambda__13___closed__17(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__17); -l_Lean_Meta_substCore___lambda__13___closed__18 = _init_l_Lean_Meta_substCore___lambda__13___closed__18(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__18); -l_Lean_Meta_substCore___lambda__13___closed__19 = _init_l_Lean_Meta_substCore___lambda__13___closed__19(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__19); -l_Lean_Meta_substCore___lambda__13___closed__20 = _init_l_Lean_Meta_substCore___lambda__13___closed__20(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__20); -l_Lean_Meta_substCore___lambda__13___closed__21 = _init_l_Lean_Meta_substCore___lambda__13___closed__21(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__21); -l_Lean_Meta_substCore___lambda__13___closed__22 = _init_l_Lean_Meta_substCore___lambda__13___closed__22(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__22); -l_Lean_Meta_substCore___lambda__13___closed__23 = _init_l_Lean_Meta_substCore___lambda__13___closed__23(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__23); -l_Lean_Meta_substCore___lambda__13___closed__24 = _init_l_Lean_Meta_substCore___lambda__13___closed__24(); -lean_mark_persistent(l_Lean_Meta_substCore___lambda__13___closed__24); +l_Lean_Meta_substCore___lambda__14___closed__1 = _init_l_Lean_Meta_substCore___lambda__14___closed__1(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__1); +l_Lean_Meta_substCore___lambda__14___closed__2 = _init_l_Lean_Meta_substCore___lambda__14___closed__2(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__2); +l_Lean_Meta_substCore___lambda__14___closed__3 = _init_l_Lean_Meta_substCore___lambda__14___closed__3(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__3); +l_Lean_Meta_substCore___lambda__14___closed__4 = _init_l_Lean_Meta_substCore___lambda__14___closed__4(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__4); +l_Lean_Meta_substCore___lambda__14___closed__5 = _init_l_Lean_Meta_substCore___lambda__14___closed__5(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__5); +l_Lean_Meta_substCore___lambda__14___closed__6 = _init_l_Lean_Meta_substCore___lambda__14___closed__6(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__6); +l_Lean_Meta_substCore___lambda__14___closed__7 = _init_l_Lean_Meta_substCore___lambda__14___closed__7(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__7); +l_Lean_Meta_substCore___lambda__14___closed__8 = _init_l_Lean_Meta_substCore___lambda__14___closed__8(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__8); +l_Lean_Meta_substCore___lambda__14___closed__9 = _init_l_Lean_Meta_substCore___lambda__14___closed__9(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__9); +l_Lean_Meta_substCore___lambda__14___closed__10 = _init_l_Lean_Meta_substCore___lambda__14___closed__10(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__10); +l_Lean_Meta_substCore___lambda__14___closed__11 = _init_l_Lean_Meta_substCore___lambda__14___closed__11(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__11); +l_Lean_Meta_substCore___lambda__14___closed__12 = _init_l_Lean_Meta_substCore___lambda__14___closed__12(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__12); +l_Lean_Meta_substCore___lambda__14___closed__13 = _init_l_Lean_Meta_substCore___lambda__14___closed__13(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__13); +l_Lean_Meta_substCore___lambda__14___closed__14 = _init_l_Lean_Meta_substCore___lambda__14___closed__14(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__14); +l_Lean_Meta_substCore___lambda__14___closed__15 = _init_l_Lean_Meta_substCore___lambda__14___closed__15(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__15); +l_Lean_Meta_substCore___lambda__14___closed__16 = _init_l_Lean_Meta_substCore___lambda__14___closed__16(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__16); +l_Lean_Meta_substCore___lambda__14___closed__17 = _init_l_Lean_Meta_substCore___lambda__14___closed__17(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__17); +l_Lean_Meta_substCore___lambda__14___closed__18 = _init_l_Lean_Meta_substCore___lambda__14___closed__18(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__18); +l_Lean_Meta_substCore___lambda__14___closed__19 = _init_l_Lean_Meta_substCore___lambda__14___closed__19(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__19); +l_Lean_Meta_substCore___lambda__14___closed__20 = _init_l_Lean_Meta_substCore___lambda__14___closed__20(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__20); +l_Lean_Meta_substCore___lambda__14___closed__21 = _init_l_Lean_Meta_substCore___lambda__14___closed__21(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__21); +l_Lean_Meta_substCore___lambda__14___closed__22 = _init_l_Lean_Meta_substCore___lambda__14___closed__22(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__22); +l_Lean_Meta_substCore___lambda__14___closed__23 = _init_l_Lean_Meta_substCore___lambda__14___closed__23(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__23); +l_Lean_Meta_substCore___lambda__14___closed__24 = _init_l_Lean_Meta_substCore___lambda__14___closed__24(); +lean_mark_persistent(l_Lean_Meta_substCore___lambda__14___closed__24); l_Lean_Meta_subst___lambda__1___closed__1 = _init_l_Lean_Meta_subst___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Meta_subst___lambda__1___closed__1); l_Lean_Meta_subst___lambda__1___closed__2 = _init_l_Lean_Meta_subst___lambda__1___closed__2(); @@ -7298,7 +7590,7 @@ l_Lean_Meta_subst___lambda__1___closed__3 = _init_l_Lean_Meta_subst___lambda__1_ lean_mark_persistent(l_Lean_Meta_subst___lambda__1___closed__3); l_Lean_Meta_subst___lambda__1___closed__4 = _init_l_Lean_Meta_subst___lambda__1___closed__4(); lean_mark_persistent(l_Lean_Meta_subst___lambda__1___closed__4); -res = l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_Subst___hyg_1132_(lean_io_mk_world()); +res = l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_Subst___hyg_1231_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Parser/Transform.c b/stage0/stdlib/Lean/Parser/Transform.c new file mode 100644 index 0000000000..1f8ef18c68 --- /dev/null +++ b/stage0/stdlib/Lean/Parser/Transform.c @@ -0,0 +1,1586 @@ +// Lean compiler output +// Module: Lean.Parser.Transform +// Imports: Init Lean.Parser.Basic +#include +#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* lean_array_set(lean_object*, lean_object*, lean_object*); +lean_object* l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_name_eq(lean_object*, lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* lean_array_get_size(lean_object*); +lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_setTailInfo(lean_object*, lean_object*); +lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); +lean_object* lean_string_utf8_byte_size(lean_object*); +lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_removeParen_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_manyToSepBy_match__1(lean_object*); +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* lean_nat_sub(lean_object*, lean_object*); +lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_instInhabitedSourceInfo___closed__1; +lean_object* l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_instInhabitedSyntax; +lean_object* l_Lean_Syntax_manyToSepBy(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getNumArgs(lean_object*); +uint8_t lean_nat_dec_le(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_manyToSepBy_match__2(lean_object*); +extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Environment_displayStats___spec__8___closed__3; +lean_object* l_Lean_Syntax_removeParen(lean_object*); +extern lean_object* l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +uint8_t l_Lean_Syntax_isNone(lean_object*); +lean_object* l_Lean_Syntax_getTailInfo(lean_object*); +extern lean_object* l_prec_x28___x29___closed__7; +lean_object* l_Lean_Syntax_manyToSepBy_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +extern lean_object* l_Lean_mkOptionalNode___closed__2; +lean_object* l_Lean_Syntax_removeParen_match__1(lean_object*); +lean_object* l_Array_back___at_Lean_Syntax_Traverser_up___spec__2(lean_object*); +lean_object* l_Lean_Syntax_manyToSepBy_match__2___rarg(lean_object*, lean_object*, lean_object*); +uint8_t lean_string_dec_eq(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_manyToSepBy_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; lean_object* x_5; +lean_dec(x_2); +x_4 = lean_box(0); +x_5 = lean_apply_1(x_3, x_4); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_3); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_apply_1(x_2, x_6); +return x_7; +} +} +} +lean_object* l_Lean_Syntax_manyToSepBy_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Syntax_manyToSepBy_match__1___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Syntax_manyToSepBy_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +lean_dec(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_1, 1); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_2(x_2, x_4, x_5); +return x_6; +} +else +{ +lean_object* x_7; +lean_dec(x_2); +x_7 = lean_apply_1(x_3, x_1); +return x_7; +} +} +} +lean_object* l_Lean_Syntax_manyToSepBy_match__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Syntax_manyToSepBy_match__2___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_ctor_get(x_3, 1); +x_8 = lean_nat_dec_le(x_7, x_5); +if (x_8 == 0) +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_unsigned_to_nat(0u); +x_10 = lean_nat_dec_eq(x_4, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_sub(x_4, x_11); +lean_dec(x_4); +x_13 = l_Lean_instInhabitedSyntax; +x_14 = lean_array_get(x_13, x_2, x_5); +x_15 = l_Array_back___at_Lean_Syntax_Traverser_up___spec__2(x_6); +x_16 = l_Lean_Syntax_getTailInfo(x_15); +if (lean_obj_tag(x_16) == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_dec(x_15); +x_17 = l_Lean_instInhabitedSourceInfo___closed__1; +lean_inc(x_1); +x_18 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_1); +x_19 = lean_array_push(x_6, x_18); +x_20 = lean_array_push(x_19, x_14); +x_21 = lean_ctor_get(x_3, 2); +x_22 = lean_nat_add(x_5, x_21); +lean_dec(x_5); +x_4 = x_12; +x_5 = x_22; +x_6 = x_20; +goto _start; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_24 = lean_ctor_get(x_16, 0); +lean_inc(x_24); +lean_dec(x_16); +x_25 = lean_array_get_size(x_6); +x_26 = lean_nat_sub(x_25, x_11); +lean_dec(x_25); +x_27 = lean_array_set(x_6, x_26, x_15); +lean_dec(x_26); +lean_inc(x_1); +x_28 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_28, 0, x_24); +lean_ctor_set(x_28, 1, x_1); +x_29 = lean_array_push(x_27, x_28); +x_30 = lean_array_push(x_29, x_14); +x_31 = lean_ctor_get(x_3, 2); +x_32 = lean_nat_add(x_5, x_31); +lean_dec(x_5); +x_4 = x_12; +x_5 = x_32; +x_6 = x_30; +goto _start; +} +} +else +{ +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_6; +} +} +else +{ +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_6; +} +} +} +lean_object* l_Lean_Syntax_manyToSepBy(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +x_5 = lean_array_get_size(x_4); +x_6 = lean_unsigned_to_nat(0u); +x_7 = lean_nat_dec_eq(x_5, x_6); +if (x_7 == 0) +{ +uint8_t x_8; +x_8 = !lean_is_exclusive(x_1); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_9 = lean_ctor_get(x_1, 1); +lean_dec(x_9); +x_10 = lean_ctor_get(x_1, 0); +lean_dec(x_10); +x_11 = l_Lean_instInhabitedSyntax; +x_12 = lean_array_get(x_11, x_4, x_6); +x_13 = l_Lean_mkOptionalNode___closed__2; +x_14 = lean_array_push(x_13, x_12); +x_15 = lean_unsigned_to_nat(1u); +lean_inc(x_5); +x_16 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_5); +lean_ctor_set(x_16, 2, x_15); +x_17 = l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1(x_2, x_4, x_16, x_5, x_15, x_14); +lean_dec(x_16); +lean_dec(x_4); +lean_ctor_set(x_1, 1, x_17); +return x_1; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +lean_dec(x_1); +x_18 = l_Lean_instInhabitedSyntax; +x_19 = lean_array_get(x_18, x_4, x_6); +x_20 = l_Lean_mkOptionalNode___closed__2; +x_21 = lean_array_push(x_20, x_19); +x_22 = lean_unsigned_to_nat(1u); +lean_inc(x_5); +x_23 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_5); +lean_ctor_set(x_23, 2, x_22); +x_24 = l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1(x_2, x_4, x_23, x_5, x_22, x_21); +lean_dec(x_23); +lean_dec(x_4); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_3); +lean_ctor_set(x_25, 1, x_24); +return x_25; +} +} +else +{ +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_1; +} +} +else +{ +lean_dec(x_2); +return x_1; +} +} +} +lean_object* l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Std_Range_forIn_loop___at_Lean_Syntax_manyToSepBy___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +lean_object* l_Lean_Syntax_removeParen_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_1) == 2) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; +x_8 = lean_ctor_get(x_5, 2); +lean_inc(x_8); +if (lean_obj_tag(x_8) == 0) +{ +uint8_t x_9; +lean_dec(x_3); +x_9 = !lean_is_exclusive(x_5); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_10 = lean_ctor_get(x_5, 2); +lean_dec(x_10); +x_11 = lean_ctor_get(x_5, 1); +lean_dec(x_11); +x_12 = lean_ctor_get(x_5, 0); +lean_dec(x_12); +x_13 = !lean_is_exclusive(x_1); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_1, 0); +lean_dec(x_14); +lean_ctor_set(x_5, 0, x_8); +x_15 = lean_apply_2(x_4, x_1, x_2); +return x_15; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_1, 1); +lean_inc(x_16); +lean_dec(x_1); +lean_ctor_set(x_5, 0, x_8); +x_17 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_17, 0, x_5); +lean_ctor_set(x_17, 1, x_16); +x_18 = lean_apply_2(x_4, x_17, x_2); +return x_18; +} +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +lean_dec(x_5); +x_19 = lean_ctor_get(x_1, 1); +lean_inc(x_19); +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + lean_ctor_release(x_1, 1); + x_20 = x_1; +} else { + lean_dec_ref(x_1); + x_20 = lean_box(0); +} +x_21 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_21, 0, x_8); +lean_ctor_set(x_21, 1, x_7); +lean_ctor_set(x_21, 2, x_8); +if (lean_is_scalar(x_20)) { + x_22 = lean_alloc_ctor(2, 2, 0); +} else { + x_22 = x_20; +} +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_19); +x_23 = lean_apply_2(x_4, x_22, x_2); +return x_23; +} +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; +x_24 = lean_ctor_get(x_1, 1); +lean_inc(x_24); +x_25 = lean_ctor_get(x_8, 0); +lean_inc(x_25); +x_26 = l_prec_x28___x29___closed__7; +x_27 = lean_string_dec_eq(x_24, x_26); +lean_dec(x_24); +if (x_27 == 0) +{ +lean_object* x_28; +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_3); +x_28 = lean_apply_2(x_4, x_1, x_2); +return x_28; +} +else +{ +uint8_t x_29; +x_29 = !lean_is_exclusive(x_1); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_1, 1); +lean_dec(x_30); +x_31 = lean_ctor_get(x_1, 0); +lean_dec(x_31); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_32; +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_3); +lean_ctor_set(x_1, 1, x_26); +x_32 = lean_apply_2(x_4, x_1, x_2); +return x_32; +} +else +{ +lean_object* x_33; lean_object* x_34; +x_33 = lean_ctor_get(x_2, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +if (lean_obj_tag(x_34) == 0) +{ +uint8_t x_35; +x_35 = !lean_is_exclusive(x_5); +if (x_35 == 0) +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_36 = lean_ctor_get(x_5, 2); +lean_dec(x_36); +x_37 = lean_ctor_get(x_5, 1); +lean_dec(x_37); +x_38 = lean_ctor_get(x_5, 0); +lean_dec(x_38); +x_39 = lean_ctor_get(x_33, 1); +lean_inc(x_39); +if (lean_obj_tag(x_39) == 0) +{ +uint8_t x_40; +x_40 = !lean_is_exclusive(x_2); +if (x_40 == 0) +{ +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_2, 0); +lean_dec(x_41); +x_42 = lean_ctor_get(x_33, 2); +lean_inc(x_42); +if (lean_obj_tag(x_42) == 0) +{ +uint8_t x_43; +lean_dec(x_25); +lean_dec(x_3); +x_43 = !lean_is_exclusive(x_33); +if (x_43 == 0) +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_44 = lean_ctor_get(x_33, 2); +lean_dec(x_44); +x_45 = lean_ctor_get(x_33, 1); +lean_dec(x_45); +x_46 = lean_ctor_get(x_33, 0); +lean_dec(x_46); +lean_ctor_set(x_33, 2, x_8); +lean_ctor_set(x_33, 0, x_42); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_33); +lean_ctor_set(x_5, 2, x_42); +lean_ctor_set(x_5, 1, x_39); +lean_ctor_set(x_5, 0, x_42); +lean_ctor_set(x_2, 0, x_5); +x_47 = lean_apply_2(x_4, x_1, x_2); +return x_47; +} +else +{ +lean_object* x_48; lean_object* x_49; +lean_dec(x_33); +x_48 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_48, 0, x_42); +lean_ctor_set(x_48, 1, x_39); +lean_ctor_set(x_48, 2, x_8); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_48); +lean_ctor_set(x_5, 2, x_42); +lean_ctor_set(x_5, 1, x_39); +lean_ctor_set(x_5, 0, x_42); +lean_ctor_set(x_2, 0, x_5); +x_49 = lean_apply_2(x_4, x_1, x_2); +return x_49; +} +} +else +{ +lean_object* x_50; lean_object* x_51; +lean_free_object(x_2); +lean_free_object(x_5); +lean_free_object(x_1); +lean_dec(x_8); +lean_dec(x_4); +x_50 = lean_ctor_get(x_42, 0); +lean_inc(x_50); +lean_dec(x_42); +x_51 = lean_apply_3(x_3, x_25, x_33, x_50); +return x_51; +} +} +else +{ +lean_object* x_52; +lean_dec(x_2); +x_52 = lean_ctor_get(x_33, 2); +lean_inc(x_52); +if (lean_obj_tag(x_52) == 0) +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +lean_dec(x_25); +lean_dec(x_3); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + lean_ctor_release(x_33, 2); + x_53 = x_33; +} else { + lean_dec_ref(x_33); + x_53 = lean_box(0); +} +if (lean_is_scalar(x_53)) { + x_54 = lean_alloc_ctor(0, 3, 0); +} else { + x_54 = x_53; +} +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_39); +lean_ctor_set(x_54, 2, x_8); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_54); +lean_ctor_set(x_5, 2, x_52); +lean_ctor_set(x_5, 1, x_39); +lean_ctor_set(x_5, 0, x_52); +x_55 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_55, 0, x_5); +x_56 = lean_apply_2(x_4, x_1, x_55); +return x_56; +} +else +{ +lean_object* x_57; lean_object* x_58; +lean_free_object(x_5); +lean_free_object(x_1); +lean_dec(x_8); +lean_dec(x_4); +x_57 = lean_ctor_get(x_52, 0); +lean_inc(x_57); +lean_dec(x_52); +x_58 = lean_apply_3(x_3, x_25, x_33, x_57); +return x_58; +} +} +} +else +{ +uint8_t x_59; +lean_dec(x_39); +lean_free_object(x_5); +lean_dec(x_25); +lean_dec(x_3); +x_59 = !lean_is_exclusive(x_33); +if (x_59 == 0) +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_60 = lean_ctor_get(x_33, 2); +lean_dec(x_60); +x_61 = lean_ctor_get(x_33, 1); +lean_dec(x_61); +x_62 = lean_ctor_get(x_33, 0); +lean_dec(x_62); +lean_ctor_set(x_33, 2, x_8); +lean_ctor_set(x_33, 1, x_7); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_33); +x_63 = lean_apply_2(x_4, x_1, x_2); +return x_63; +} +else +{ +lean_object* x_64; lean_object* x_65; +lean_dec(x_33); +x_64 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_64, 0, x_34); +lean_ctor_set(x_64, 1, x_7); +lean_ctor_set(x_64, 2, x_8); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_64); +x_65 = lean_apply_2(x_4, x_1, x_2); +return x_65; +} +} +} +else +{ +lean_object* x_66; +lean_dec(x_5); +x_66 = lean_ctor_get(x_33, 1); +lean_inc(x_66); +if (lean_obj_tag(x_66) == 0) +{ +lean_object* x_67; lean_object* x_68; +if (lean_is_exclusive(x_2)) { + lean_ctor_release(x_2, 0); + x_67 = x_2; +} else { + lean_dec_ref(x_2); + x_67 = lean_box(0); +} +x_68 = lean_ctor_get(x_33, 2); +lean_inc(x_68); +if (lean_obj_tag(x_68) == 0) +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +lean_dec(x_25); +lean_dec(x_3); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + lean_ctor_release(x_33, 2); + x_69 = x_33; +} else { + lean_dec_ref(x_33); + x_69 = lean_box(0); +} +if (lean_is_scalar(x_69)) { + x_70 = lean_alloc_ctor(0, 3, 0); +} else { + x_70 = x_69; +} +lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 1, x_66); +lean_ctor_set(x_70, 2, x_8); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_70); +x_71 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_71, 0, x_68); +lean_ctor_set(x_71, 1, x_66); +lean_ctor_set(x_71, 2, x_68); +if (lean_is_scalar(x_67)) { + x_72 = lean_alloc_ctor(1, 1, 0); +} else { + x_72 = x_67; +} +lean_ctor_set(x_72, 0, x_71); +x_73 = lean_apply_2(x_4, x_1, x_72); +return x_73; +} +else +{ +lean_object* x_74; lean_object* x_75; +lean_dec(x_67); +lean_free_object(x_1); +lean_dec(x_8); +lean_dec(x_4); +x_74 = lean_ctor_get(x_68, 0); +lean_inc(x_74); +lean_dec(x_68); +x_75 = lean_apply_3(x_3, x_25, x_33, x_74); +return x_75; +} +} +else +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; +lean_dec(x_66); +lean_dec(x_25); +lean_dec(x_3); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + lean_ctor_release(x_33, 2); + x_76 = x_33; +} else { + lean_dec_ref(x_33); + x_76 = lean_box(0); +} +if (lean_is_scalar(x_76)) { + x_77 = lean_alloc_ctor(0, 3, 0); +} else { + x_77 = x_76; +} +lean_ctor_set(x_77, 0, x_34); +lean_ctor_set(x_77, 1, x_7); +lean_ctor_set(x_77, 2, x_8); +lean_ctor_set(x_1, 1, x_26); +lean_ctor_set(x_1, 0, x_77); +x_78 = lean_apply_2(x_4, x_1, x_2); +return x_78; +} +} +} +else +{ +lean_object* x_79; +lean_dec(x_34); +lean_dec(x_33); +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_3); +lean_ctor_set(x_1, 1, x_26); +x_79 = lean_apply_2(x_4, x_1, x_2); +return x_79; +} +} +} +else +{ +lean_dec(x_1); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_80; lean_object* x_81; +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_3); +x_80 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_80, 0, x_5); +lean_ctor_set(x_80, 1, x_26); +x_81 = lean_apply_2(x_4, x_80, x_2); +return x_81; +} +else +{ +lean_object* x_82; lean_object* x_83; +x_82 = lean_ctor_get(x_2, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_82, 0); +lean_inc(x_83); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; +if (lean_is_exclusive(x_5)) { + lean_ctor_release(x_5, 0); + lean_ctor_release(x_5, 1); + lean_ctor_release(x_5, 2); + x_84 = x_5; +} else { + lean_dec_ref(x_5); + x_84 = lean_box(0); +} +x_85 = lean_ctor_get(x_82, 1); +lean_inc(x_85); +if (lean_obj_tag(x_85) == 0) +{ +lean_object* x_86; lean_object* x_87; +if (lean_is_exclusive(x_2)) { + lean_ctor_release(x_2, 0); + x_86 = x_2; +} else { + lean_dec_ref(x_2); + x_86 = lean_box(0); +} +x_87 = lean_ctor_get(x_82, 2); +lean_inc(x_87); +if (lean_obj_tag(x_87) == 0) +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; +lean_dec(x_25); +lean_dec(x_3); +if (lean_is_exclusive(x_82)) { + lean_ctor_release(x_82, 0); + lean_ctor_release(x_82, 1); + lean_ctor_release(x_82, 2); + x_88 = x_82; +} else { + lean_dec_ref(x_82); + x_88 = lean_box(0); +} +if (lean_is_scalar(x_88)) { + x_89 = lean_alloc_ctor(0, 3, 0); +} else { + x_89 = x_88; +} +lean_ctor_set(x_89, 0, x_87); +lean_ctor_set(x_89, 1, x_85); +lean_ctor_set(x_89, 2, x_8); +x_90 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_26); +if (lean_is_scalar(x_84)) { + x_91 = lean_alloc_ctor(0, 3, 0); +} else { + x_91 = x_84; +} +lean_ctor_set(x_91, 0, x_87); +lean_ctor_set(x_91, 1, x_85); +lean_ctor_set(x_91, 2, x_87); +if (lean_is_scalar(x_86)) { + x_92 = lean_alloc_ctor(1, 1, 0); +} else { + x_92 = x_86; +} +lean_ctor_set(x_92, 0, x_91); +x_93 = lean_apply_2(x_4, x_90, x_92); +return x_93; +} +else +{ +lean_object* x_94; lean_object* x_95; +lean_dec(x_86); +lean_dec(x_84); +lean_dec(x_8); +lean_dec(x_4); +x_94 = lean_ctor_get(x_87, 0); +lean_inc(x_94); +lean_dec(x_87); +x_95 = lean_apply_3(x_3, x_25, x_82, x_94); +return x_95; +} +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; +lean_dec(x_85); +lean_dec(x_84); +lean_dec(x_25); +lean_dec(x_3); +if (lean_is_exclusive(x_82)) { + lean_ctor_release(x_82, 0); + lean_ctor_release(x_82, 1); + lean_ctor_release(x_82, 2); + x_96 = x_82; +} else { + lean_dec_ref(x_82); + x_96 = lean_box(0); +} +if (lean_is_scalar(x_96)) { + x_97 = lean_alloc_ctor(0, 3, 0); +} else { + x_97 = x_96; +} +lean_ctor_set(x_97, 0, x_83); +lean_ctor_set(x_97, 1, x_7); +lean_ctor_set(x_97, 2, x_8); +x_98 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_98, 0, x_97); +lean_ctor_set(x_98, 1, x_26); +x_99 = lean_apply_2(x_4, x_98, x_2); +return x_99; +} +} +else +{ +lean_object* x_100; lean_object* x_101; +lean_dec(x_83); +lean_dec(x_82); +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_3); +x_100 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_100, 0, x_5); +lean_ctor_set(x_100, 1, x_26); +x_101 = lean_apply_2(x_4, x_100, x_2); +return x_101; +} +} +} +} +} +} +else +{ +lean_object* x_102; +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_3); +x_102 = lean_apply_2(x_4, x_1, x_2); +return x_102; +} +} +else +{ +lean_object* x_103; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_103 = lean_apply_2(x_4, x_1, x_2); +return x_103; +} +} +else +{ +lean_object* x_104; +lean_dec(x_3); +x_104 = lean_apply_2(x_4, x_1, x_2); +return x_104; +} +} +} +lean_object* l_Lean_Syntax_removeParen_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Syntax_removeParen_match__1___rarg), 4, 0); +return x_2; +} +} +lean_object* l_Lean_Syntax_removeParen(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = lean_ctor_get(x_1, 1); +lean_inc(x_3); +x_4 = l_myMacro____x40_Init_Notation___hyg_11187____closed__8; +x_5 = lean_name_eq(x_2, x_4); +if (x_5 == 0) +{ +lean_dec(x_3); +lean_dec(x_2); +return x_1; +} +else +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_1); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_7 = lean_ctor_get(x_1, 1); +lean_dec(x_7); +x_8 = lean_ctor_get(x_1, 0); +lean_dec(x_8); +lean_inc(x_3); +x_9 = l_Lean_instInhabitedSyntax; +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_array_get(x_9, x_3, x_10); +x_12 = l_Lean_Syntax_getNumArgs(x_11); +x_13 = lean_unsigned_to_nat(2u); +x_14 = lean_nat_dec_eq(x_12, x_13); +lean_dec(x_12); +if (x_14 == 0) +{ +lean_dec(x_11); +lean_dec(x_3); +return x_1; +} +else +{ +lean_object* x_15; uint8_t x_16; +x_15 = l_Lean_Syntax_getArg(x_11, x_10); +x_16 = l_Lean_Syntax_isNone(x_15); +lean_dec(x_15); +if (x_16 == 0) +{ +lean_dec(x_11); +lean_dec(x_3); +return x_1; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_unsigned_to_nat(0u); +x_18 = l_Lean_Syntax_getArg(x_11, x_17); +lean_dec(x_11); +x_19 = lean_array_get(x_9, x_3, x_13); +lean_dec(x_3); +if (lean_obj_tag(x_19) == 2) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = l_Lean_Syntax_getTailInfo(x_18); +x_23 = lean_ctor_get(x_20, 0); +lean_inc(x_23); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; +x_24 = lean_ctor_get(x_20, 1); +lean_inc(x_24); +if (lean_obj_tag(x_24) == 0) +{ +lean_object* x_25; +x_25 = lean_ctor_get(x_20, 2); +lean_inc(x_25); +lean_dec(x_20); +if (lean_obj_tag(x_25) == 0) +{ +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_18); +return x_1; +} +else +{ +lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +lean_dec(x_25); +x_27 = l_prec_x28___x29___closed__7; +x_28 = lean_string_dec_eq(x_21, x_27); +lean_dec(x_21); +if (x_28 == 0) +{ +lean_dec(x_26); +lean_dec(x_22); +lean_dec(x_18); +return x_1; +} +else +{ +if (lean_obj_tag(x_22) == 0) +{ +lean_dec(x_26); +lean_dec(x_18); +return x_1; +} +else +{ +lean_object* x_29; lean_object* x_30; +x_29 = lean_ctor_get(x_22, 0); +lean_inc(x_29); +lean_dec(x_22); +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +if (lean_obj_tag(x_31) == 0) +{ +uint8_t x_32; +x_32 = !lean_is_exclusive(x_29); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_29, 2); +x_34 = lean_ctor_get(x_29, 1); +lean_dec(x_34); +x_35 = lean_ctor_get(x_29, 0); +lean_dec(x_35); +if (lean_obj_tag(x_33) == 0) +{ +lean_free_object(x_29); +lean_dec(x_26); +lean_dec(x_18); +return x_1; +} +else +{ +uint8_t x_36; +lean_dec(x_1); +x_36 = !lean_is_exclusive(x_33); +if (x_36 == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_44; +x_37 = lean_ctor_get(x_33, 0); +x_38 = lean_ctor_get(x_37, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_37, 1); +lean_inc(x_39); +x_40 = lean_ctor_get(x_37, 2); +lean_inc(x_40); +lean_dec(x_37); +x_41 = lean_string_utf8_extract(x_38, x_39, x_40); +lean_dec(x_40); +lean_dec(x_39); +lean_dec(x_38); +x_42 = l_Array_foldlMUnsafe_fold___at_Lean_Environment_displayStats___spec__8___closed__3; +x_43 = lean_string_append(x_41, x_42); +x_44 = !lean_is_exclusive(x_26); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_45 = lean_ctor_get(x_26, 0); +x_46 = lean_ctor_get(x_26, 1); +x_47 = lean_ctor_get(x_26, 2); +x_48 = lean_string_utf8_extract(x_45, x_46, x_47); +lean_dec(x_47); +lean_dec(x_46); +lean_dec(x_45); +x_49 = lean_string_append(x_43, x_48); +lean_dec(x_48); +x_50 = lean_string_utf8_byte_size(x_49); +lean_ctor_set(x_26, 2, x_50); +lean_ctor_set(x_26, 1, x_17); +lean_ctor_set(x_26, 0, x_49); +lean_ctor_set(x_33, 0, x_26); +x_51 = l_Lean_Syntax_setTailInfo(x_18, x_29); +return x_51; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_52 = lean_ctor_get(x_26, 0); +x_53 = lean_ctor_get(x_26, 1); +x_54 = lean_ctor_get(x_26, 2); +lean_inc(x_54); +lean_inc(x_53); +lean_inc(x_52); +lean_dec(x_26); +x_55 = lean_string_utf8_extract(x_52, x_53, x_54); +lean_dec(x_54); +lean_dec(x_53); +lean_dec(x_52); +x_56 = lean_string_append(x_43, x_55); +lean_dec(x_55); +x_57 = lean_string_utf8_byte_size(x_56); +x_58 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_17); +lean_ctor_set(x_58, 2, x_57); +lean_ctor_set(x_33, 0, x_58); +x_59 = l_Lean_Syntax_setTailInfo(x_18, x_29); +return x_59; +} +} +else +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_60 = lean_ctor_get(x_33, 0); +lean_inc(x_60); +lean_dec(x_33); +x_61 = lean_ctor_get(x_60, 0); +lean_inc(x_61); +x_62 = lean_ctor_get(x_60, 1); +lean_inc(x_62); +x_63 = lean_ctor_get(x_60, 2); +lean_inc(x_63); +lean_dec(x_60); +x_64 = lean_string_utf8_extract(x_61, x_62, x_63); +lean_dec(x_63); +lean_dec(x_62); +lean_dec(x_61); +x_65 = l_Array_foldlMUnsafe_fold___at_Lean_Environment_displayStats___spec__8___closed__3; +x_66 = lean_string_append(x_64, x_65); +x_67 = lean_ctor_get(x_26, 0); +lean_inc(x_67); +x_68 = lean_ctor_get(x_26, 1); +lean_inc(x_68); +x_69 = lean_ctor_get(x_26, 2); +lean_inc(x_69); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + lean_ctor_release(x_26, 2); + x_70 = x_26; +} else { + lean_dec_ref(x_26); + x_70 = lean_box(0); +} +x_71 = lean_string_utf8_extract(x_67, x_68, x_69); +lean_dec(x_69); +lean_dec(x_68); +lean_dec(x_67); +x_72 = lean_string_append(x_66, x_71); +lean_dec(x_71); +x_73 = lean_string_utf8_byte_size(x_72); +if (lean_is_scalar(x_70)) { + x_74 = lean_alloc_ctor(0, 3, 0); +} else { + x_74 = x_70; +} +lean_ctor_set(x_74, 0, x_72); +lean_ctor_set(x_74, 1, x_17); +lean_ctor_set(x_74, 2, x_73); +x_75 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_29, 2, x_75); +x_76 = l_Lean_Syntax_setTailInfo(x_18, x_29); +return x_76; +} +} +} +else +{ +lean_object* x_77; +x_77 = lean_ctor_get(x_29, 2); +lean_inc(x_77); +lean_dec(x_29); +if (lean_obj_tag(x_77) == 0) +{ +lean_dec(x_26); +lean_dec(x_18); +return x_1; +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +lean_dec(x_1); +x_78 = lean_ctor_get(x_77, 0); +lean_inc(x_78); +if (lean_is_exclusive(x_77)) { + lean_ctor_release(x_77, 0); + x_79 = x_77; +} else { + lean_dec_ref(x_77); + x_79 = lean_box(0); +} +x_80 = lean_ctor_get(x_78, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_78, 1); +lean_inc(x_81); +x_82 = lean_ctor_get(x_78, 2); +lean_inc(x_82); +lean_dec(x_78); +x_83 = lean_string_utf8_extract(x_80, x_81, x_82); +lean_dec(x_82); +lean_dec(x_81); +lean_dec(x_80); +x_84 = l_Array_foldlMUnsafe_fold___at_Lean_Environment_displayStats___spec__8___closed__3; +x_85 = lean_string_append(x_83, x_84); +x_86 = lean_ctor_get(x_26, 0); +lean_inc(x_86); +x_87 = lean_ctor_get(x_26, 1); +lean_inc(x_87); +x_88 = lean_ctor_get(x_26, 2); +lean_inc(x_88); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + lean_ctor_release(x_26, 2); + x_89 = x_26; +} else { + lean_dec_ref(x_26); + x_89 = lean_box(0); +} +x_90 = lean_string_utf8_extract(x_86, x_87, x_88); +lean_dec(x_88); +lean_dec(x_87); +lean_dec(x_86); +x_91 = lean_string_append(x_85, x_90); +lean_dec(x_90); +x_92 = lean_string_utf8_byte_size(x_91); +if (lean_is_scalar(x_89)) { + x_93 = lean_alloc_ctor(0, 3, 0); +} else { + x_93 = x_89; +} +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_17); +lean_ctor_set(x_93, 2, x_92); +if (lean_is_scalar(x_79)) { + x_94 = lean_alloc_ctor(1, 1, 0); +} else { + x_94 = x_79; +} +lean_ctor_set(x_94, 0, x_93); +x_95 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_95, 0, x_30); +lean_ctor_set(x_95, 1, x_31); +lean_ctor_set(x_95, 2, x_94); +x_96 = l_Lean_Syntax_setTailInfo(x_18, x_95); +return x_96; +} +} +} +else +{ +lean_dec(x_31); +lean_dec(x_29); +lean_dec(x_26); +lean_dec(x_18); +return x_1; +} +} +else +{ +lean_dec(x_30); +lean_dec(x_29); +lean_dec(x_26); +lean_dec(x_18); +return x_1; +} +} +} +} +} +else +{ +lean_dec(x_24); +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_18); +return x_1; +} +} +else +{ +lean_dec(x_23); +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_18); +return x_1; +} +} +else +{ +lean_dec(x_19); +lean_dec(x_18); +return x_1; +} +} +} +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; +lean_dec(x_1); +lean_inc(x_3); +x_97 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_97, 0, x_2); +lean_ctor_set(x_97, 1, x_3); +x_98 = l_Lean_instInhabitedSyntax; +x_99 = lean_unsigned_to_nat(1u); +x_100 = lean_array_get(x_98, x_3, x_99); +x_101 = l_Lean_Syntax_getNumArgs(x_100); +x_102 = lean_unsigned_to_nat(2u); +x_103 = lean_nat_dec_eq(x_101, x_102); +lean_dec(x_101); +if (x_103 == 0) +{ +lean_dec(x_100); +lean_dec(x_3); +return x_97; +} +else +{ +lean_object* x_104; uint8_t x_105; +x_104 = l_Lean_Syntax_getArg(x_100, x_99); +x_105 = l_Lean_Syntax_isNone(x_104); +lean_dec(x_104); +if (x_105 == 0) +{ +lean_dec(x_100); +lean_dec(x_3); +return x_97; +} +else +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; +x_106 = lean_unsigned_to_nat(0u); +x_107 = l_Lean_Syntax_getArg(x_100, x_106); +lean_dec(x_100); +x_108 = lean_array_get(x_98, x_3, x_102); +lean_dec(x_3); +if (lean_obj_tag(x_108) == 2) +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_109 = lean_ctor_get(x_108, 0); +lean_inc(x_109); +x_110 = lean_ctor_get(x_108, 1); +lean_inc(x_110); +lean_dec(x_108); +x_111 = l_Lean_Syntax_getTailInfo(x_107); +x_112 = lean_ctor_get(x_109, 0); +lean_inc(x_112); +if (lean_obj_tag(x_112) == 0) +{ +lean_object* x_113; +x_113 = lean_ctor_get(x_109, 1); +lean_inc(x_113); +if (lean_obj_tag(x_113) == 0) +{ +lean_object* x_114; +x_114 = lean_ctor_get(x_109, 2); +lean_inc(x_114); +lean_dec(x_109); +if (lean_obj_tag(x_114) == 0) +{ +lean_dec(x_111); +lean_dec(x_110); +lean_dec(x_107); +return x_97; +} +else +{ +lean_object* x_115; lean_object* x_116; uint8_t x_117; +x_115 = lean_ctor_get(x_114, 0); +lean_inc(x_115); +lean_dec(x_114); +x_116 = l_prec_x28___x29___closed__7; +x_117 = lean_string_dec_eq(x_110, x_116); +lean_dec(x_110); +if (x_117 == 0) +{ +lean_dec(x_115); +lean_dec(x_111); +lean_dec(x_107); +return x_97; +} +else +{ +if (lean_obj_tag(x_111) == 0) +{ +lean_dec(x_115); +lean_dec(x_107); +return x_97; +} +else +{ +lean_object* x_118; lean_object* x_119; +x_118 = lean_ctor_get(x_111, 0); +lean_inc(x_118); +lean_dec(x_111); +x_119 = lean_ctor_get(x_118, 0); +lean_inc(x_119); +if (lean_obj_tag(x_119) == 0) +{ +lean_object* x_120; +x_120 = lean_ctor_get(x_118, 1); +lean_inc(x_120); +if (lean_obj_tag(x_120) == 0) +{ +lean_object* x_121; lean_object* x_122; +x_121 = lean_ctor_get(x_118, 2); +lean_inc(x_121); +if (lean_is_exclusive(x_118)) { + lean_ctor_release(x_118, 0); + lean_ctor_release(x_118, 1); + lean_ctor_release(x_118, 2); + x_122 = x_118; +} else { + lean_dec_ref(x_118); + x_122 = lean_box(0); +} +if (lean_obj_tag(x_121) == 0) +{ +lean_dec(x_122); +lean_dec(x_115); +lean_dec(x_107); +return x_97; +} +else +{ +lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; +lean_dec(x_97); +x_123 = lean_ctor_get(x_121, 0); +lean_inc(x_123); +if (lean_is_exclusive(x_121)) { + lean_ctor_release(x_121, 0); + x_124 = x_121; +} else { + lean_dec_ref(x_121); + x_124 = lean_box(0); +} +x_125 = lean_ctor_get(x_123, 0); +lean_inc(x_125); +x_126 = lean_ctor_get(x_123, 1); +lean_inc(x_126); +x_127 = lean_ctor_get(x_123, 2); +lean_inc(x_127); +lean_dec(x_123); +x_128 = lean_string_utf8_extract(x_125, x_126, x_127); +lean_dec(x_127); +lean_dec(x_126); +lean_dec(x_125); +x_129 = l_Array_foldlMUnsafe_fold___at_Lean_Environment_displayStats___spec__8___closed__3; +x_130 = lean_string_append(x_128, x_129); +x_131 = lean_ctor_get(x_115, 0); +lean_inc(x_131); +x_132 = lean_ctor_get(x_115, 1); +lean_inc(x_132); +x_133 = lean_ctor_get(x_115, 2); +lean_inc(x_133); +if (lean_is_exclusive(x_115)) { + lean_ctor_release(x_115, 0); + lean_ctor_release(x_115, 1); + lean_ctor_release(x_115, 2); + x_134 = x_115; +} else { + lean_dec_ref(x_115); + x_134 = lean_box(0); +} +x_135 = lean_string_utf8_extract(x_131, x_132, x_133); +lean_dec(x_133); +lean_dec(x_132); +lean_dec(x_131); +x_136 = lean_string_append(x_130, x_135); +lean_dec(x_135); +x_137 = lean_string_utf8_byte_size(x_136); +if (lean_is_scalar(x_134)) { + x_138 = lean_alloc_ctor(0, 3, 0); +} else { + x_138 = x_134; +} +lean_ctor_set(x_138, 0, x_136); +lean_ctor_set(x_138, 1, x_106); +lean_ctor_set(x_138, 2, x_137); +if (lean_is_scalar(x_124)) { + x_139 = lean_alloc_ctor(1, 1, 0); +} else { + x_139 = x_124; +} +lean_ctor_set(x_139, 0, x_138); +if (lean_is_scalar(x_122)) { + x_140 = lean_alloc_ctor(0, 3, 0); +} else { + x_140 = x_122; +} +lean_ctor_set(x_140, 0, x_119); +lean_ctor_set(x_140, 1, x_120); +lean_ctor_set(x_140, 2, x_139); +x_141 = l_Lean_Syntax_setTailInfo(x_107, x_140); +return x_141; +} +} +else +{ +lean_dec(x_120); +lean_dec(x_118); +lean_dec(x_115); +lean_dec(x_107); +return x_97; +} +} +else +{ +lean_dec(x_119); +lean_dec(x_118); +lean_dec(x_115); +lean_dec(x_107); +return x_97; +} +} +} +} +} +else +{ +lean_dec(x_113); +lean_dec(x_111); +lean_dec(x_110); +lean_dec(x_109); +lean_dec(x_107); +return x_97; +} +} +else +{ +lean_dec(x_112); +lean_dec(x_111); +lean_dec(x_110); +lean_dec(x_109); +lean_dec(x_107); +return x_97; +} +} +else +{ +lean_dec(x_108); +lean_dec(x_107); +return x_97; +} +} +} +} +} +} +else +{ +return x_1; +} +} +} +lean_object* initialize_Init(lean_object*); +lean_object* initialize_Lean_Parser_Basic(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Lean_Parser_Transform(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Parser_Basic(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Lean/PrettyPrinter/Delaborator/Basic.c b/stage0/stdlib/Lean/PrettyPrinter/Delaborator/Basic.c index f8c05ab1d1..8c2bbc7815 100644 --- a/stage0/stdlib/Lean/PrettyPrinter/Delaborator/Basic.c +++ b/stage0/stdlib/Lean/PrettyPrinter/Delaborator/Basic.c @@ -119,11 +119,11 @@ lean_object* l_Lean_PrettyPrinter_Delaborator_instMonadQuotationDelabM___closed_ lean_object* l_Lean_PrettyPrinter_Delaborator_failure(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Delaborator_withBindingDomain___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__43; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); extern lean_object* l_Lean_PrettyPrinter_Formatter_categoryParser_formatter___lambda__2___closed__4; lean_object* l_Lean_PrettyPrinter_Delaborator_annotateCurPos(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Delaborator_Context_pos___default; +extern lean_object* l_Lean_Meta_addPPExplicitToExposeDiff___closed__2; lean_object* l_Lean_Level_quote___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Level_LevelToFormat_Result_format___closed__3; extern lean_object* l_Lean_numLitKind; @@ -183,6 +183,7 @@ lean_object* l_Lean_PrettyPrinter_Delaborator_initFn____x40_Lean_PrettyPrinter_D lean_object* l_Lean_PrettyPrinter_Delaborator_getExprKind___closed__3; lean_object* l_Lean_PrettyPrinter_Delaborator_mkDelabAttribute___closed__9; extern lean_object* l_Lean_Unhygienic_instMonadQuotationUnhygienic___closed__4; +extern lean_object* l_Lean_Meta_addPPExplicitToExposeDiff___closed__3; lean_object* l_Lean_PrettyPrinter_Delaborator_withAppFnArgs_match__2(lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Delaborator_getExprKind_match__2(lean_object*); lean_object* l_Lean_PrettyPrinter_Delaborator_withMDataExpr___rarg___closed__2; @@ -204,7 +205,6 @@ extern lean_object* l_Lean_Format_getUnicode___closed__1; lean_object* l_Lean_Level_quote___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Delaborator_withAppArg_match__1(lean_object*); lean_object* l_Lean_PrettyPrinter_Delaborator_descend___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3; extern lean_object* l_Lean_PrettyPrinter_mkFormatterAttribute___closed__6; uint8_t l_Lean_getPPStructureInstances(lean_object*); lean_object* l_Lean_PrettyPrinter_Delaborator_getExprKind___closed__10; @@ -275,7 +275,6 @@ lean_object* l_Lean_Level_quote___lambda__1(lean_object*, lean_object*, lean_obj lean_object* lean_register_option(lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_PrettyPrinter_Parenthesizer_term_parenthesizer___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAtAux___at_Lean_PrettyPrinter_Delaborator_delabFor___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_getPPAll___closed__1; lean_object* l_Lean_getPPStructureInstances___boxed(lean_object*); lean_object* l_Lean_getPPUniverses___closed__1; lean_object* l_Lean_getPPUniverses___boxed(lean_object*); @@ -300,7 +299,6 @@ lean_object* l_Lean_PrettyPrinter_Delaborator_appUnexpanderAttribute; lean_object* l_Lean_PrettyPrinter_Delaborator_withAppFnArgs(lean_object*); lean_object* l_Lean_getPPNotation___closed__2; lean_object* l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__2; -lean_object* l_Lean_getPPExplicit___closed__1; lean_object* l_Std_PersistentHashMap_findAtAux___at_Lean_PrettyPrinter_Delaborator_delabFor___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__1; lean_object* l_Lean_PrettyPrinter_Delaborator_instInhabitedDelabM(lean_object*); @@ -1153,21 +1151,11 @@ x_3 = lean_box(x_2); return x_3; } } -static lean_object* _init_l_Lean_getPPExplicit___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_getSanitizeNames___closed__2; -x_2 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__43; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} uint8_t l_Lean_getPPExplicit(lean_object* x_1) { _start: { lean_object* x_2; uint8_t x_3; uint8_t x_4; -x_2 = l_Lean_getPPExplicit___closed__1; +x_2 = l_Lean_Meta_addPPExplicitToExposeDiff___closed__3; x_3 = 0; x_4 = l_Lean_KVMap_getBool(x_1, x_2, x_3); return x_4; @@ -1479,21 +1467,11 @@ x_3 = lean_box(x_2); return x_3; } } -static lean_object* _init_l_Lean_getPPAll___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_getSanitizeNames___closed__2; -x_2 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} uint8_t l_Lean_getPPAll(lean_object* x_1) { _start: { lean_object* x_2; uint8_t x_3; uint8_t x_4; -x_2 = l_Lean_getPPAll___closed__1; +x_2 = l_Lean_Meta_addPPExplicitToExposeDiff___closed__2; x_3 = 0; x_4 = l_Lean_KVMap_getBool(x_1, x_2, x_3); return x_4; @@ -1557,7 +1535,7 @@ lean_object* l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554 _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = l_Lean_getPPExplicit___closed__1; +x_2 = l_Lean_Meta_addPPExplicitToExposeDiff___closed__3; x_3 = l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__2; x_4 = lean_register_option(x_2, x_3, x_1); if (lean_obj_tag(x_4) == 0) @@ -10504,8 +10482,6 @@ l_Lean_getPPCoercions___closed__1 = _init_l_Lean_getPPCoercions___closed__1(); lean_mark_persistent(l_Lean_getPPCoercions___closed__1); l_Lean_getPPCoercions___closed__2 = _init_l_Lean_getPPCoercions___closed__2(); lean_mark_persistent(l_Lean_getPPCoercions___closed__2); -l_Lean_getPPExplicit___closed__1 = _init_l_Lean_getPPExplicit___closed__1(); -lean_mark_persistent(l_Lean_getPPExplicit___closed__1); l_Lean_getPPNotation___closed__1 = _init_l_Lean_getPPNotation___closed__1(); lean_mark_persistent(l_Lean_getPPNotation___closed__1); l_Lean_getPPNotation___closed__2 = _init_l_Lean_getPPNotation___closed__2(); @@ -10536,8 +10512,6 @@ l_Lean_getPPPrivateNames___closed__2 = _init_l_Lean_getPPPrivateNames___closed__ lean_mark_persistent(l_Lean_getPPPrivateNames___closed__2); l_Lean_getPPUnicode___closed__1 = _init_l_Lean_getPPUnicode___closed__1(); lean_mark_persistent(l_Lean_getPPUnicode___closed__1); -l_Lean_getPPAll___closed__1 = _init_l_Lean_getPPAll___closed__1(); -lean_mark_persistent(l_Lean_getPPAll___closed__1); l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__1 = _init_l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__1(); lean_mark_persistent(l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__1); l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__2 = _init_l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__2(); diff --git a/stage0/stdlib/Lean/Server/ServerBin.c b/stage0/stdlib/Lean/Server/ServerBin.c new file mode 100644 index 0000000000..edda8e79fa --- /dev/null +++ b/stage0/stdlib/Lean/Server/ServerBin.c @@ -0,0 +1,330 @@ +// Lean compiler output +// Module: Lean.Server.ServerBin +// Imports: Init Init.System.IO Lean.Server +#include +#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* lean_get_stdin(lean_object*); +lean_object* lean_io_error_to_string(lean_object*); +lean_object* _lean_main(lean_object*, lean_object*); +lean_object* lean_get_stderr(lean_object*); +lean_object* l_main___boxed__const__1; +lean_object* l_IO_getStdin___at_main___spec__1(lean_object*); +lean_object* lean_init_search_path(lean_object*, lean_object*); +lean_object* lean_get_stdout(lean_object*); +lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_Test_runWithInputFile___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_initAndRunServer(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_getStdin___at_main___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_get_stdin(x_1); +return x_2; +} +} +static lean_object* _init_l_main___boxed__const__1() { +_start: +{ +uint32_t x_1; lean_object* x_2; +x_1 = 0; +x_2 = lean_box_uint32(x_1); +return x_2; +} +} +lean_object* _lean_main(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +lean_dec(x_1); +x_3 = lean_get_stdin(x_2); +if (lean_obj_tag(x_3) == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_3, 1); +lean_inc(x_5); +lean_dec(x_3); +x_6 = lean_get_stdout(x_5); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +x_9 = lean_get_stderr(x_8); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_box(0); +x_13 = lean_init_search_path(x_12, x_11); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_13, 1); +lean_inc(x_14); +lean_dec(x_13); +x_15 = l_Lean_Server_initAndRunServer(x_4, x_7, x_14); +if (lean_obj_tag(x_15) == 0) +{ +uint8_t x_16; +lean_dec(x_10); +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; +x_17 = lean_ctor_get(x_15, 0); +lean_dec(x_17); +x_18 = l_main___boxed__const__1; +lean_ctor_set(x_15, 0, x_18); +return x_15; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_15, 1); +lean_inc(x_19); +lean_dec(x_15); +x_20 = l_main___boxed__const__1; +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_19); +return x_21; +} +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_22 = lean_ctor_get(x_15, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_15, 1); +lean_inc(x_23); +lean_dec(x_15); +x_24 = lean_io_error_to_string(x_22); +x_25 = l_IO_FS_Stream_putStrLn___at_Lean_Server_Test_runWithInputFile___spec__1(x_10, x_24, x_23); +if (lean_obj_tag(x_25) == 0) +{ +uint8_t x_26; +x_26 = !lean_is_exclusive(x_25); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_25, 0); +lean_dec(x_27); +x_28 = l_main___boxed__const__1; +lean_ctor_set(x_25, 0, x_28); +return x_25; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_25, 1); +lean_inc(x_29); +lean_dec(x_25); +x_30 = l_main___boxed__const__1; +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +return x_31; +} +} +else +{ +uint8_t x_32; +x_32 = !lean_is_exclusive(x_25); +if (x_32 == 0) +{ +return x_25; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_25, 0); +x_34 = lean_ctor_get(x_25, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_25); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; +} +} +} +} +else +{ +uint8_t x_36; +lean_dec(x_10); +lean_dec(x_7); +lean_dec(x_4); +x_36 = !lean_is_exclusive(x_13); +if (x_36 == 0) +{ +return x_13; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_13, 0); +x_38 = lean_ctor_get(x_13, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_13); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +return x_39; +} +} +} +else +{ +uint8_t x_40; +lean_dec(x_7); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_9); +if (x_40 == 0) +{ +return x_9; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_9, 0); +x_42 = lean_ctor_get(x_9, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_9); +x_43 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +return x_43; +} +} +} +else +{ +uint8_t x_44; +lean_dec(x_4); +x_44 = !lean_is_exclusive(x_6); +if (x_44 == 0) +{ +return x_6; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_6, 0); +x_46 = lean_ctor_get(x_6, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_6); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +return x_47; +} +} +} +else +{ +uint8_t x_48; +x_48 = !lean_is_exclusive(x_3); +if (x_48 == 0) +{ +return x_3; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_3, 0); +x_50 = lean_ctor_get(x_3, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_3); +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; +} +} +} +} +lean_object* initialize_Init(lean_object*); +lean_object* initialize_Init_System_IO(lean_object*); +lean_object* initialize_Lean_Server(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Lean_Server_ServerBin(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Init_System_IO(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Server(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_main___boxed__const__1 = _init_l_main___boxed__const__1(); +lean_mark_persistent(l_main___boxed__const__1); +return lean_io_result_mk_ok(lean_box(0)); +} +void lean_initialize(); + + #if defined(WIN32) || defined(_WIN32) + #include + #endif + + int main(int argc, char ** argv) { + #if defined(WIN32) || defined(_WIN32) + SetErrorMode(SEM_FAILCRITICALERRORS); + #endif + lean_object* in; lean_object* res; +lean_initialize(); +res = initialize_Lean_Server_ServerBin(lean_io_mk_world()); +lean_io_mark_end_initialization(); +if (lean_io_result_is_ok(res)) { +lean_dec_ref(res); +lean_init_task_manager(); +in = lean_box(0); +int i = argc; +while (i > 1) { + lean_object* n; + i--; + n = lean_alloc_ctor(1,2,0); lean_ctor_set(n, 0, lean_mk_string(argv[i])); lean_ctor_set(n, 1, in); + in = n; +} +res = _lean_main(in, lean_io_mk_world()); +} +if (lean_io_result_is_ok(res)) { + int ret = lean_unbox(lean_io_result_get_value(res)); + lean_dec_ref(res); + return ret; +} else { + lean_io_result_show_error(res); + lean_dec_ref(res); + return 1; +} +} +#ifdef __cplusplus +} +#endif