From 7a13eaea8da4886ec385ddb7c574ce5da45f070b Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sat, 19 Feb 2022 08:11:17 -0800 Subject: [PATCH] chore: update stage0 --- stage0/src/Init/Data/Array/Basic.lean | 23 + stage0/src/Lean/Elab/Match.lean | 10 +- .../src/Lean/Elab/PreDefinition/WF/Fix.lean | 31 +- .../src/Lean/Elab/PreDefinition/WF/Main.lean | 71 +- .../Elab/PreDefinition/WF/PackDomain.lean | 34 +- .../Elab/PreDefinition/WF/PackMutual.lean | 140 +- .../src/Lean/Elab/PreDefinition/WF/Rel.lean | 23 +- stage0/src/Lean/Meta/ExprDefEq.lean | 58 +- stage0/stdlib/Init/Data/Array/Basic.c | 145 +- stage0/stdlib/Lean/Elab/Match.c | 797 +- .../stdlib/Lean/Elab/PreDefinition/WF/Fix.c | 6772 +++++++++-------- .../stdlib/Lean/Elab/PreDefinition/WF/Main.c | 4789 +++++++++--- .../Lean/Elab/PreDefinition/WF/PackDomain.c | 2139 +++--- .../Lean/Elab/PreDefinition/WF/PackMutual.c | 2963 ++++---- .../stdlib/Lean/Elab/PreDefinition/WF/Rel.c | 4896 ++++++++---- stage0/stdlib/Lean/Meta/ExprDefEq.c | 2815 +++++-- 16 files changed, 16609 insertions(+), 9097 deletions(-) diff --git a/stage0/src/Init/Data/Array/Basic.lean b/stage0/src/Init/Data/Array/Basic.lean index 63460d9559..a255b22f29 100644 --- a/stage0/src/Init/Data/Array/Basic.lean +++ b/stage0/src/Init/Data/Array/Basic.lean @@ -633,6 +633,29 @@ def indexOf? [BEq α] (a : Array α) (v : α) : Option (Fin a.size) := @[simp] theorem size_pop (a : Array α) : a.pop.size = a.size - 1 := List.length_dropLast .. +def popWhile (p : α → Bool) (as : Array α) : Array α := + if h : as.size > 0 then + if p (as.get ⟨as.size - 1, Nat.sub_lt h (by decide)⟩) then + popWhile p as.pop + else + as + else + as +termination_by popWhile as => as.size + +def takeWhile (p : α → Bool) (as : Array α) : Array α := + let rec go (i : Nat) (r : Array α) : Array α := + if h : i < as.size then + let a := as.get ⟨i, h⟩ + if p a then + go (i+1) (r.push a) + else + r + else + r + go 0 #[] +termination_by go i r => as.size - i + def eraseIdxAux (i : Nat) (a : Array α) : Array α := if h : i < a.size then let idx : Fin a.size := ⟨i, h⟩; diff --git a/stage0/src/Lean/Elab/Match.lean b/stage0/src/Lean/Elab/Match.lean index 043ae36824..376861d9c2 100644 --- a/stage0/src/Lean/Elab/Match.lean +++ b/stage0/src/Lean/Elab/Match.lean @@ -568,7 +568,15 @@ private def elabMatchAltView (alt : MatchAltView) (matchType : Expr) : ExceptT P withPatternVars patternVars fun patternVarDecls => do withElaboratedLHS alt.ref patternVarDecls alt.patterns matchType fun altLHS matchType => do withLocalInstances altLHS.fvarDecls do - let rhs ← elabTermEnsuringType alt.rhs matchType + trace[Elab.match] "elabMatchAltView: {matchType}" + let matchType ← instantiateMVars matchType + -- If `matchType` is of the form `@m ...`, we create a new metavariable with the current scope. + -- This improves the effectiveness of the `isDefEq` default approximations + let matchType' ← if matchType.getAppFn.isMVar then mkFreshTypeMVar else pure matchType + let rhs ← elabTermEnsuringType alt.rhs matchType' + -- We use all approximations to ensure the auxiliary type is defeq to the original one. + unless (← fullApproxDefEq <| isDefEq matchType' matchType) do + throwError "type mistmatch, alternative {← mkHasTypeButIsExpectedMsg matchType' matchType}" let xs := altLHS.fvarDecls.toArray.map LocalDecl.toExpr let rhs ← if xs.isEmpty then pure <| mkSimpleThunk rhs else mkLambdaFVars xs rhs trace[Elab.match] "rhs: {rhs}" diff --git a/stage0/src/Lean/Elab/PreDefinition/WF/Fix.lean b/stage0/src/Lean/Elab/PreDefinition/WF/Fix.lean index 5a482d4aa2..c0be3fbe90 100644 --- a/stage0/src/Lean/Elab/PreDefinition/WF/Fix.lean +++ b/stage0/src/Lean/Elab/PreDefinition/WF/Fix.lean @@ -29,7 +29,7 @@ private def mkDecreasingProof (decreasingProp : Expr) (decrTactic? : Option Synt | some decrTactic => Term.runTactic mvarId decrTactic instantiateMVars mvar -private partial def replaceRecApps (recFnName : Name) (decrTactic? : Option Syntax) (F : Expr) (e : Expr) : TermElabM Expr := +private partial def replaceRecApps (recFnName : Name) (fixedPrefixSize : Nat) (decrTactic? : Option Syntax) (F : Expr) (e : Expr) : TermElabM Expr := let rec loop (F : Expr) (e : Expr) : TermElabM Expr := do match e with | Expr.lam n d b c => @@ -50,8 +50,8 @@ private partial def replaceRecApps (recFnName : Name) (decrTactic? : Option Synt | Expr.app _ _ _ => let processApp (e : Expr) : TermElabM Expr := e.withApp fun f args => do - if f.isConstOf recFnName && args.size == 1 then - let r := mkApp F (← loop F args[0]) + if f.isConstOf recFnName && args.size == fixedPrefixSize + 1 then + let r := mkApp F (← loop F args.back) let decreasingProp := (← whnf (← inferType r)).bindingDomain! return mkApp r (← mkDecreasingProof decreasingProp decrTactic?) else @@ -59,7 +59,7 @@ private partial def replaceRecApps (recFnName : Name) (decrTactic? : Option Synt let matcherApp? ← matchMatcherApp? e match matcherApp? with | some matcherApp => - if !Structural.recArgHasLooseBVarsAt recFnName 0 e then + if !Structural.recArgHasLooseBVarsAt recFnName fixedPrefixSize e then processApp e else let matcherApp ← mapError (matcherApp.addArg F) (fun msg => "failed to add functional argument to 'matcher' application" ++ indentD msg) @@ -77,9 +77,9 @@ private partial def replaceRecApps (recFnName : Name) (decrTactic? : Option Synt | e => ensureNoRecFn recFnName e loop F e -/-- Refine `F` over `Sum.casesOn` -/ +/-- Refine `F` over `PSum.casesOn` -/ private partial def processSumCasesOn (x F val : Expr) (k : (x : Expr) → (F : Expr) → (val : Expr) → TermElabM Expr) : TermElabM Expr := do - if x.isFVar && val.isAppOfArity ``Sum.casesOn 6 && val.getArg! 3 == x && (val.getArg! 4).isLambda && (val.getArg! 5).isLambda then + if x.isFVar && val.isAppOfArity ``PSum.casesOn 6 && val.getArg! 3 == x && (val.getArg! 4).isLambda && (val.getArg! 5).isLambda then let args := val.getAppArgs let α := args[0] let β := args[1] @@ -94,9 +94,9 @@ private partial def processSumCasesOn (x F val : Expr) (k : (x : Expr) → (F : let FTypeNew := FDecl.type.replaceFVar x (← mkAppOptM ctorName #[α, β, xNew]) withLocalDeclD FDecl.userName FTypeNew fun FNew => do mkLambdaFVars #[xNew, FNew] (← processSumCasesOn xNew FNew valNew k) - let minorLeft ← mkMinorNew ``Sum.inl args[4] - let minorRight ← mkMinorNew ``Sum.inr args[5] - let result := mkAppN (mkConst ``Sum.casesOn [u, (← getDecLevel α), (← getDecLevel β)]) #[α, β, motiveNew, x, minorLeft, minorRight, F] + let minorLeft ← mkMinorNew ``PSum.inl args[4] + let minorRight ← mkMinorNew ``PSum.inr args[5] + let result := mkAppN (mkConst ``PSum.casesOn [u, (← getLevel α), (← getLevel β)]) #[α, β, motiveNew, x, minorLeft, minorRight, F] return result else k x F val @@ -124,8 +124,9 @@ private partial def processPSigmaCasesOn (x F val : Expr) (k : (F : Expr) → (v else k F val -def mkFix (preDef : PreDefinition) (wfRel : Expr) (decrTactic? : Option Syntax) : TermElabM PreDefinition := do - let wfFix ← forallBoundedTelescope preDef.type (some 1) fun x type => do +def mkFix (preDef : PreDefinition) (prefixArgs : Array Expr) (wfRel : Expr) (decrTactic? : Option Syntax) : TermElabM Expr := do + let type ← instantiateForall preDef.type prefixArgs + let wfFix ← forallBoundedTelescope type (some 1) fun x type => do let x := x[0] let α ← inferType x let u ← getLevel α @@ -137,8 +138,10 @@ def mkFix (preDef : PreDefinition) (wfRel : Expr) (decrTactic? : Option Syntax) forallBoundedTelescope (← whnf (← inferType wfFix)).bindingDomain! (some 2) fun xs _ => do let x := xs[0] let F := xs[1] - let val := preDef.value.betaRev #[x] - let val ← processSumCasesOn x F val fun x F val => processPSigmaCasesOn x F val (replaceRecApps preDef.declName decrTactic?) - return { preDef with value := mkApp wfFix (← mkLambdaFVars #[x, F] val) } + let val := preDef.value.beta (prefixArgs.push x) + trace[Elab.definition.wf] ">> val: {val}" + let val ← processSumCasesOn x F val fun x F val => do + processPSigmaCasesOn x F val (replaceRecApps preDef.declName prefixArgs.size decrTactic?) + mkLambdaFVars prefixArgs (mkApp wfFix (← mkLambdaFVars #[x, F] val)) end Lean.Elab.WF diff --git a/stage0/src/Lean/Elab/PreDefinition/WF/Main.lean b/stage0/src/Lean/Elab/PreDefinition/WF/Main.lean index dadd2ecd46..4eac26e007 100644 --- a/stage0/src/Lean/Elab/PreDefinition/WF/Main.lean +++ b/stage0/src/Lean/Elab/PreDefinition/WF/Main.lean @@ -15,22 +15,22 @@ namespace Lean.Elab open WF open Meta -private def isOnlyOneUnaryDef (preDefs : Array PreDefinition) : MetaM Bool := do +private def isOnlyOneUnaryDef (preDefs : Array PreDefinition) (fixedPrefixSize : Nat) : MetaM Bool := do if preDefs.size == 1 then - lambdaTelescope preDefs[0].value fun xs _ => return xs.size == 1 + lambdaTelescope preDefs[0].value fun xs _ => return xs.size == fixedPrefixSize + 1 else return false -private partial def addNonRecPreDefs (preDefs : Array PreDefinition) (preDefNonRec : PreDefinition) : TermElabM Unit := do - if (← isOnlyOneUnaryDef preDefs) then +private partial def addNonRecPreDefs (preDefs : Array PreDefinition) (preDefNonRec : PreDefinition) (fixedPrefixSize : Nat) : TermElabM Unit := do + if (← isOnlyOneUnaryDef preDefs fixedPrefixSize) then return () - let Expr.forallE _ domain _ _ := preDefNonRec.type | unreachable! let us := preDefNonRec.levelParams.map mkLevelParam for fidx in [:preDefs.size] do let preDef := preDefs[fidx] let value ← lambdaTelescope preDef.value fun xs _ => do + let packedArgs : Array Expr := xs[fixedPrefixSize:] let mkProd (type : Expr) : MetaM Expr := do - mkUnaryArg type xs + mkUnaryArg type packedArgs let rec mkSum (i : Nat) (type : Expr) : MetaM Expr := do if i == preDefs.size - 1 then mkProd type @@ -38,30 +38,67 @@ private partial def addNonRecPreDefs (preDefs : Array PreDefinition) (preDefNonR (← whnfD type).withApp fun f args => do assert! args.size == 2 if i == fidx then - return mkApp3 (mkConst ``Sum.inl f.constLevels!) args[0] args[1] (← mkProd args[0]) + return mkApp3 (mkConst ``PSum.inl f.constLevels!) args[0] args[1] (← mkProd args[0]) else let r ← mkSum (i+1) args[1] - return mkApp3 (mkConst ``Sum.inr f.constLevels!) args[0] args[1] r + return mkApp3 (mkConst ``PSum.inr f.constLevels!) args[0] args[1] r + let Expr.forallE _ domain _ _ := (← instantiateForall preDefNonRec.type xs[:fixedPrefixSize]) | unreachable! let arg ← mkSum 0 domain - mkLambdaFVars xs (mkApp (mkConst preDefNonRec.declName us) arg) + mkLambdaFVars xs (mkApp (mkAppN (mkConst preDefNonRec.declName us) xs[:fixedPrefixSize]) arg) trace[Elab.definition.wf] "{preDef.declName} := {value}" addNonRec { preDef with value } (applyAttrAfterCompilation := false) +partial def withCommonTelescope (preDefs : Array PreDefinition) (k : Array Expr → Array Expr → TermElabM α) : TermElabM α := + go #[] (preDefs.map (·.value)) +where + go (fvars : Array Expr) (vals : Array Expr) : TermElabM α := do + if !(vals.all fun val => val.isLambda) then + k fvars vals + else if !(← vals.allM fun val => return val.bindingName! == vals[0].bindingName! && val.binderInfo == vals[0].binderInfo && (← isDefEq val.bindingDomain! vals[0].bindingDomain!)) then + k fvars vals + else + withLocalDecl vals[0].bindingName! vals[0].binderInfo vals[0].bindingDomain! fun x => + go (fvars.push x) (vals.map fun val => val.bindingBody!.instantiate1 x) + +def getFixedPrefix (preDefs : Array PreDefinition) : TermElabM Nat := + withCommonTelescope preDefs fun xs vals => do + let resultRef ← IO.mkRef xs.size + for val in vals do + if (← resultRef.get) == 0 then return 0 + forEachExpr' val fun e => do + if preDefs.any fun preDef => e.isAppOf preDef.declName then + let args := e.getAppArgs + resultRef.modify (min args.size .) + for arg in args, x in xs do + if !(← withoutProofIrrelevance <| withReducible <| isDefEq arg x) then + -- We continue searching if e's arguments are not a prefix of `xs` + return true + return false + else + return true + resultRef.get + def wfRecursion (preDefs : Array PreDefinition) (wf? : Option TerminationWF) (decrTactic? : Option Syntax) : TermElabM Unit := do + let fixedPrefixSize ← getFixedPrefix preDefs + trace[Elab.definition.wf] "fixed prefix: {fixedPrefixSize}" let unaryPreDef ← withoutModifyingEnv do for preDef in preDefs do addAsAxiom preDef - let unaryPreDefs ← packDomain preDefs - packMutual unaryPreDefs - let wfRel ← elabWFRel preDefs unaryPreDef wf? - let preDefNonRec ← withoutModifyingEnv do - addAsAxiom unaryPreDef - mkFix unaryPreDef wfRel decrTactic? - let preDefNonRec ← eraseRecAppSyntax preDefNonRec + let unaryPreDefs ← packDomain fixedPrefixSize preDefs + packMutual fixedPrefixSize unaryPreDefs + let preDefNonRec ← forallBoundedTelescope unaryPreDef.type fixedPrefixSize fun prefixArgs type => do + let packedArgType := type.bindingDomain! + let wfRel ← elabWFRel preDefs unaryPreDef.declName fixedPrefixSize packedArgType wf? + trace[Elab.definition.wf] "wfRel: {wfRel}" + withoutModifyingEnv do + addAsAxiom unaryPreDef + let value ← mkFix unaryPreDef prefixArgs wfRel decrTactic? + let value ← eraseRecAppSyntaxExpr value + return { unaryPreDef with value } trace[Elab.definition.wf] ">> {preDefNonRec.declName} :=\n{preDefNonRec.value}" let preDefs ← preDefs.mapM fun d => eraseRecAppSyntax d addNonRec preDefNonRec - addNonRecPreDefs preDefs preDefNonRec + addNonRecPreDefs preDefs preDefNonRec fixedPrefixSize registerEqnsInfo preDefs preDefNonRec.declName for preDef in preDefs do applyAttributesOf #[preDef] AttributeApplicationTime.afterCompilation diff --git a/stage0/src/Lean/Elab/PreDefinition/WF/PackDomain.lean b/stage0/src/Lean/Elab/PreDefinition/WF/PackDomain.lean index 2fef718ac9..d291c0b1e6 100644 --- a/stage0/src/Lean/Elab/PreDefinition/WF/PackDomain.lean +++ b/stage0/src/Lean/Elab/PreDefinition/WF/PackDomain.lean @@ -57,17 +57,20 @@ private partial def mkPSigmaCasesOn (y : Expr) (codomain : Expr) (xs : Array Exp Convert the given pre-definitions into unary functions. We "pack" the arguments using `PSigma`. -/ -partial def packDomain (preDefs : Array PreDefinition) : MetaM (Array PreDefinition) := do +partial def packDomain (fixedPrefix : Nat) (preDefs : Array PreDefinition) : MetaM (Array PreDefinition) := do let mut preDefsNew := #[] let mut arities := #[] let mut modified := false for preDef in preDefs do let (preDefNew, arity, modifiedCurr) ← lambdaTelescope preDef.value fun xs body => do - if xs.size == 0 then - throwError "well-founded recursion cannot be used, '{preDef.declName}' does not take any arguments" - if xs.size > 1 then + if xs.size == fixedPrefix then + throwError "well-founded recursion cannot be used, '{preDef.declName}' does not take any (non-fixed) arguments" + let arity := xs.size + if arity > fixedPrefix + 1 then let bodyType ← instantiateForall preDef.type xs let mut d ← inferType xs.back + let ys : Array Expr := xs[:fixedPrefix] + let xs : Array Expr := xs[fixedPrefix:] for x in xs.pop.reverse do d ← mkAppOptM ``PSigma #[some (← inferType x), some (← mkLambdaFVars #[x] d)] withLocalDeclD (← mkFreshUserName `_x) d fun tuple => do @@ -75,12 +78,12 @@ partial def packDomain (preDefs : Array PreDefinition) : MetaM (Array PreDefinit let codomain := bodyType.replaceFVars xs elems let preDefNew:= { preDef with declName := preDef.declName ++ `_unary - type := (← mkForallFVars #[tuple] codomain) + type := (← mkForallFVars (ys.push tuple) codomain) } addAsAxiom preDefNew - return (preDefNew, xs.size, true) + return (preDefNew, arity, true) else - return (preDef, 1, false) + return (preDef, arity, false) modified := modified || modifiedCurr arities := arities.push arity preDefsNew := preDefsNew.push preDefNew @@ -92,14 +95,17 @@ partial def packDomain (preDefs : Array PreDefinition) : MetaM (Array PreDefinit let preDefNew := preDefsNew[i] let arity := arities[i] let valueNew ← lambdaTelescope preDef.value fun xs body => do - forallBoundedTelescope preDefNew.type (some 1) fun y codomain => do - let y := y[0] - let newBody ← mkPSigmaCasesOn y codomain xs body - mkLambdaFVars #[y] (← packApplications newBody arities preDefsNew) + let ys : Array Expr := xs[:fixedPrefix] + let xs : Array Expr := xs[fixedPrefix:] + let type ← instantiateForall preDefNew.type ys + forallBoundedTelescope type (some 1) fun z codomain => do + let z := z[0] + let newBody ← mkPSigmaCasesOn z codomain xs body + mkLambdaFVars (ys.push z) (← packApplications newBody arities preDefsNew) let isBad (e : Expr) : Bool := match isAppOfPreDef? e with | none => false - | some i => e.getAppNumArgs > 1 || preDefsNew[i].declName != preDefs[i].declName + | some i => e.getAppNumArgs > fixedPrefix + 1 || preDefsNew[i].declName != preDefs[i].declName if let some bad := valueNew.find? isBad then if let some i := isAppOfPreDef? bad then throwErrorAt preDef.ref "well-founded recursion cannot be used, function '{preDef.declName}' contains application of function '{preDefs[i].declName}' with #{bad.getAppNumArgs} argument(s), but function has arity {arities[i]}" @@ -115,9 +121,11 @@ where packApplications (e : Expr) (arities : Array Nat) (preDefsNew : Array PreDefinition) : MetaM Expr := do let pack (e : Expr) (funIdx : Nat) : MetaM Expr := do let f := e.getAppFn + let args := e.getAppArgs let fNew := mkConst preDefsNew[funIdx].declName f.constLevels! + let fNew := mkAppN fNew args[:fixedPrefix] let Expr.forallE _ d .. ← inferType fNew | unreachable! - let argNew ← mkUnaryArg d e.getAppArgs + let argNew ← mkUnaryArg d args[fixedPrefix:] return mkApp fNew argNew let rec visit (e : Expr) : MonadCacheT ExprStructEq Expr MetaM Expr := do diff --git a/stage0/src/Lean/Elab/PreDefinition/WF/PackMutual.lean b/stage0/src/Lean/Elab/PreDefinition/WF/PackMutual.lean index d2cc4577fe..6c2012a88d 100644 --- a/stage0/src/Lean/Elab/PreDefinition/WF/PackMutual.lean +++ b/stage0/src/Lean/Elab/PreDefinition/WF/PackMutual.lean @@ -8,81 +8,78 @@ import Lean.Elab.PreDefinition.Basic namespace Lean.Elab.WF open Meta -private def getDomains (preDefs : Array PreDefinition) : Array Expr := - preDefs.map fun preDef => preDef.type.bindingDomain! - -/-- Combine different function domains `ds` using `Sum`s -/ +/-- Combine different function domains `ds` using `PSum`s -/ private def mkNewDomain (ds : Array Expr) : MetaM Expr := do let mut r := ds.back for d in ds.pop.reverse do - r ← mkAppM ``Sum #[d, r] + r ← mkAppM ``PSum #[d, r] return r -private def getCodomainLevel (preDef : PreDefinition) : MetaM Level := - forallBoundedTelescope preDef.type (some 1) fun _ body => getLevel body +private def getCodomainLevel (preDefType : Expr) : MetaM Level := + forallBoundedTelescope preDefType (some 1) fun _ body => getLevel body /-- Return the universe level for the codomain of the given definitions. This method produces an error if the codomains are in different universe levels. -/ -private def getCodomainsLevel (preDefs : Array PreDefinition) : MetaM Level := do - let r ← getCodomainLevel preDefs[0] - for preDef in preDefs[1:] do +private def getCodomainsLevel (preDefTypes : Array Expr) : MetaM Level := do + let r ← getCodomainLevel preDefTypes[0] + for preDef in preDefTypes[1:] do unless (← isLevelDefEq r (← getCodomainLevel preDef)) do throwError "invalid mutual definition, result types must be in the same universe level" return r /-- - Create the codomain for the new function that "combines" different `preDefs` + Create the codomain for the new function that "combines" different `preDef` types See: `packMutual` -/ -private partial def mkNewCoDomain (x : Expr) (preDefs : Array PreDefinition) : MetaM Expr := do - let u ← getCodomainsLevel preDefs +private partial def mkNewCoDomain (x : Expr) (preDefTypes : Array Expr) : MetaM Expr := do + let u ← getCodomainsLevel preDefTypes let rec go (x : Expr) (i : Nat) : MetaM Expr := do - if i < preDefs.size - 1 then + if i < preDefTypes.size - 1 then let xType ← whnfD (← inferType x) - assert! xType.isAppOfArity ``Sum 2 + assert! xType.isAppOfArity ``PSum 2 let xTypeArgs := xType.getAppArgs - let casesOn := mkConst (mkCasesOnName ``Sum) (mkLevelSucc u :: xType.getAppFn.constLevels!) + let casesOn := mkConst (mkCasesOnName ``PSum) (mkLevelSucc u :: xType.getAppFn.constLevels!) let casesOn := mkAppN casesOn xTypeArgs -- parameters let casesOn := mkApp casesOn (← mkLambdaFVars #[x] (mkSort u)) -- motive let casesOn := mkApp casesOn x -- major let minor1 ← withLocalDeclD (← mkFreshUserName `_x) xTypeArgs[0] fun x => - mkLambdaFVars #[x] (preDefs[i].type.bindingBody!.instantiate1 x) + mkLambdaFVars #[x] (preDefTypes[i].bindingBody!.instantiate1 x) let minor2 ← withLocalDeclD (← mkFreshUserName `_x) xTypeArgs[1] fun x => do mkLambdaFVars #[x] (← go x (i+1)) return mkApp2 casesOn minor1 minor2 else - return preDefs[i].type.bindingBody!.instantiate1 x + return preDefTypes[i].bindingBody!.instantiate1 x go x 0 /-- Combine/pack the values of the different definitions in a single value - `x` is `Sum`, and we use `Sum.casesOn` to select the appropriate `preDefs.value`. + `x` is `PSum`, and we use `PSum.casesOn` to select the appropriate `preDefs.value`. See: `packMutual`. - Remark: this method does not replace the nested recursive `preDefs` applications. + Remark: this method does not replace the nested recursive `preDefValues` applications. This step is performed by `transform` with the following `post` method. -/ -private partial def packValues (x : Expr) (codomain : Expr) (preDefs : Array PreDefinition) : MetaM Expr := do - let varNames := preDefs.map fun preDef => - assert! preDef.value.isLambda - preDef.value.bindingName! +private partial def packValues (x : Expr) (codomain : Expr) (preDefValues : Array Expr) : MetaM Expr := do + let varNames := preDefValues.map fun val => + assert! val.isLambda + val.bindingName! let mvar ← mkFreshExprSyntheticOpaqueMVar codomain let rec go (mvarId : MVarId) (x : FVarId) (i : Nat) : MetaM Unit := do - if i < preDefs.size - 1 then + if i < preDefValues.size - 1 then /- Names for the `cases` tactics. The names are important to preserve the user provided names (unary functions). -/ let givenNames : Array AltVarNames := - if i == preDefs.size - 2 then + if i == preDefValues.size - 2 then #[{ varNames := [varNames[i]] }, { varNames := [varNames[i+1]] }] else #[{ varNames := [varNames[i]] }] let #[s₁, s₂] ← cases mvarId x (givenNames := givenNames) | unreachable! - assignExprMVar s₁.mvarId (mkApp preDefs[i].value s₁.fields[0]).headBeta + assignExprMVar s₁.mvarId (mkApp preDefValues[i] s₁.fields[0]).headBeta go s₂.mvarId s₂.fields[0].fvarId! (i+1) else - assignExprMVar mvarId (mkApp preDefs[i].value (mkFVar x)).headBeta + assignExprMVar mvarId (mkApp preDefValues[i] (mkFVar x)).headBeta go mvar.mvarId! x.fvarId! 0 instantiateMVars mvar @@ -90,25 +87,44 @@ private partial def packValues (x : Expr) (codomain : Expr) (preDefs : Array Pre Auxiliary function for replacing nested `preDefs` recursive calls in `e` with the new function `newFn`. See: `packMutual` -/ -private partial def post (preDefs : Array PreDefinition) (domain : Expr) (newFn : Name) (e : Expr) : MetaM TransformStep := do - if let Expr.app (Expr.const declName us _) arg _ := e then - if let some fidx := preDefs.findIdx? (·.declName == declName) then - let rec mkNewArg (i : Nat) (type : Expr) : MetaM Expr := do - if i == preDefs.size - 1 then - return arg - else - (← whnfD type).withApp fun f args => do - assert! args.size == 2 - if i == fidx then - return mkApp3 (mkConst ``Sum.inl f.constLevels!) args[0] args[1] arg - else - let r ← mkNewArg (i+1) args[1] - return mkApp3 (mkConst ``Sum.inr f.constLevels!) args[0] args[1] r - return TransformStep.done <| mkApp (mkConst newFn us) (← mkNewArg 0 domain) +private partial def post (fixedPrefix : Nat) (preDefs : Array PreDefinition) (domain : Expr) (newFn : Name) (e : Expr) : MetaM TransformStep := do + if e.getAppNumArgs != fixedPrefix + 1 then + return TransformStep.done e + let f := e.getAppFn + if !f.isConst then + return TransformStep.done e + let declName := f.constName! + let us := f.constLevels! + if let some fidx := preDefs.findIdx? (·.declName == declName) then + let args := e.getAppArgs + let fixedArgs := args[:fixedPrefix] + let arg := args.back + let rec mkNewArg (i : Nat) (type : Expr) : MetaM Expr := do + if i == preDefs.size - 1 then + return arg + else + (← whnfD type).withApp fun f args => do + assert! args.size == 2 + if i == fidx then + return mkApp3 (mkConst ``PSum.inl f.constLevels!) args[0] args[1] arg + else + let r ← mkNewArg (i+1) args[1] + return mkApp3 (mkConst ``PSum.inr f.constLevels!) args[0] args[1] r + return TransformStep.done <| mkApp (mkAppN (mkConst newFn us) fixedArgs) (← mkNewArg 0 domain) return TransformStep.done e +partial def withFixedPrefix (fixedPrefix : Nat) (preDefs : Array PreDefinition) (k : Array Expr → Array Expr → Array Expr → MetaM α) : MetaM α := + go fixedPrefix #[] (preDefs.map (·.value)) +where + go (i : Nat) (fvars : Array Expr) (vals : Array Expr) : MetaM α := do + match i with + | 0 => k fvars (← preDefs.mapM fun preDef => instantiateForall preDef.type fvars) vals + | i+1 => + withLocalDecl vals[0].bindingName! vals[0].binderInfo vals[0].bindingDomain! fun x => + go i (fvars.push x) (vals.map fun val => val.bindingBody!.instantiate1 x) + /-- - If `preDefs.size > 1`, combine different functions in a single one using `Sum`. + If `preDefs.size > 1`, combine different functions in a single one using `PSum`. This method assumes all `preDefs` have arity 1, and have already been processed using `packDomain`. Here is a small example. Suppose the input is ``` @@ -128,36 +144,38 @@ private partial def post (preDefs : Array PreDefinition) (domain : Expr) (newFn this method produces the following pre definition ``` f._mutual x := - Sum.casesOn x + PSum.casesOn x (fun val => match val.2.1, val.2.2.1, val.2.2.2 with | 0, a, b => a - | Nat.succ n, a, b => (f._mutual (Sum.inr (Sum.inl ⟨val.1, n, a, b⟩))).fst + | Nat.succ n, a, b => (f._mutual (PSum.inr (PSum.inl ⟨val.1, n, a, b⟩))).fst fun val => - Sum.casesOn val + PSum.casesOn val (fun val => match val.2.1, val.2.2.1, val.2.2.2 with | 0, a, b => (a, b) - | Nat.succ n, a, b => (f._mutual (Sum.inr (Sum.inr ⟨val.1, n, a, b⟩)), a) + | Nat.succ n, a, b => (f._mutual (PSum.inr (PSum.inr ⟨val.1, n, a, b⟩)), a) fun val => match val.2.1, val.2.2.1, val.2.2.2 with | 0, a, b => b | Nat.succ n, a, b => - f._mutual (Sum.inl ⟨val.1, n, a, b⟩) + f._mutual (PSum.inl ⟨val.1, n, a, b⟩) ``` -/ -def packMutual (preDefs : Array PreDefinition) : MetaM PreDefinition := do +def packMutual (fixedPrefix : Nat) (preDefs : Array PreDefinition) : MetaM PreDefinition := do if preDefs.size == 1 then return preDefs[0] - let domain ← mkNewDomain (getDomains preDefs) - withLocalDeclD (← mkFreshUserName `_x) domain fun x => do - let codomain ← mkNewCoDomain x preDefs - let type ← mkForallFVars #[x] codomain - let value ← packValues x codomain preDefs - let newFn := preDefs[0].declName ++ `_mutual - let preDefNew := { preDefs[0] with declName := newFn, type, value } - addAsAxiom preDefNew - let value ← transform value (post := post preDefs domain newFn) - let value ← mkLambdaFVars #[x] value - return { preDefNew with value } + withFixedPrefix fixedPrefix preDefs fun ys types vals => do + let domains := types.map fun type => type.bindingDomain! + let domain ← mkNewDomain domains + withLocalDeclD (← mkFreshUserName `_x) domain fun x => do + let codomain ← mkNewCoDomain x types + let type ← mkForallFVars (ys.push x) codomain + let value ← packValues x codomain vals + let newFn := preDefs[0].declName ++ `_mutual + let preDefNew := { preDefs[0] with declName := newFn, type, value } + addAsAxiom preDefNew + let value ← transform value (post := post fixedPrefix preDefs domain newFn) + let value ← mkLambdaFVars (ys.push x) value + return { preDefNew with value } end Lean.Elab.WF diff --git a/stage0/src/Lean/Elab/PreDefinition/WF/Rel.lean b/stage0/src/Lean/Elab/PreDefinition/WF/Rel.lean index 488cec2f4a..0219da3aeb 100644 --- a/stage0/src/Lean/Elab/PreDefinition/WF/Rel.lean +++ b/stage0/src/Lean/Elab/PreDefinition/WF/Rel.lean @@ -29,7 +29,7 @@ private partial def unpackMutual (preDefs : Array PreDefinition) (mvarId : MVarI return result.push (fvarId, mvarId) go 0 mvarId fvarId #[] -private partial def unpackUnary (preDef : PreDefinition) (mvarId : MVarId) (fvarId : FVarId) (element : TerminationByElement) : TermElabM MVarId := do +private partial def unpackUnary (preDef : PreDefinition) (prefixSize : Nat) (mvarId : MVarId) (fvarId : FVarId) (element : TerminationByElement) : TermElabM MVarId := do let varNames ← lambdaTelescope preDef.value fun xs body => do let mut varNames ← xs.mapM fun x => return (← getLocalDecl x.fvarId!).userName if element.vars.size > varNames.size then @@ -39,31 +39,38 @@ private partial def unpackUnary (preDef : PreDefinition) (mvarId : MVarId) (fvar if varStx.isIdent then varNames := varNames.set! (varNames.size - element.vars.size + i) varStx.getId return varNames + let mut mvarId := mvarId + for localDecl in (← Term.getMVarDecl mvarId).lctx, varName in varNames[:prefixSize] do + unless localDecl.userName == varName do + mvarId ← rename mvarId localDecl.fvarId varName + let numPackedArgs := varNames.size - prefixSize let rec go (i : Nat) (mvarId : MVarId) (fvarId : FVarId) : TermElabM MVarId := do - if i < varNames.size - 1 then - let #[s] ← cases mvarId fvarId #[{ varNames := [varNames[i]] }] | unreachable! + trace[Elab.definition.wf] "i: {i}, varNames: {varNames}, goal: {mvarId}" + if i < numPackedArgs - 1 then + let #[s] ← cases mvarId fvarId #[{ varNames := [varNames[prefixSize + i]] }] | unreachable! go (i+1) s.mvarId s.fields[1].fvarId! else rename mvarId fvarId varNames.back go 0 mvarId fvarId -def elabWFRel (preDefs : Array PreDefinition) (unaryPreDef : PreDefinition) (wf? : Option TerminationWF) : TermElabM Expr := do - let α := unaryPreDef.type.bindingDomain! +def elabWFRel (preDefs : Array PreDefinition) (unaryPreDefName : Name) (fixedPrefixSize : Nat) (argType : Expr) (wf? : Option TerminationWF) : TermElabM Expr := do + let α := argType let u ← getLevel α let expectedType := mkApp (mkConst ``WellFoundedRelation [u]) α + trace[Elab.definition.wf] "elabWFRel start: {(← mkFreshTypeMVar).mvarId!}" match wf? with - | some (TerminationWF.core wfStx) => withDeclName unaryPreDef.declName do + | some (TerminationWF.core wfStx) => withDeclName unaryPreDefName do let wfRel ← instantiateMVars (← withSynthesize <| elabTermEnsuringType wfStx expectedType) let pendingMVarIds ← getMVars wfRel discard <| logUnassignedUsingErrorInfos pendingMVarIds return wfRel - | some (TerminationWF.ext elements) => withDeclName unaryPreDef.declName <| withRef (getRefFromElems elements) do + | some (TerminationWF.ext elements) => withDeclName unaryPreDefName <| withRef (getRefFromElems elements) do let mainMVarId := (← mkFreshExprSyntheticOpaqueMVar expectedType).mvarId! let [fMVarId, wfRelMVarId, _] ← apply mainMVarId (← mkConstWithFreshMVarLevels ``invImage) | throwError "failed to apply 'invImage'" let (d, fMVarId) ← intro1 fMVarId let subgoals ← unpackMutual preDefs fMVarId d for (d, mvarId) in subgoals, element in elements, preDef in preDefs do - let mvarId ← unpackUnary preDef mvarId d element + let mvarId ← unpackUnary preDef fixedPrefixSize mvarId d element withMVarContext mvarId do let value ← Term.withSynthesize <| elabTermEnsuringType element.body (← getMVarType mvarId) assignExprMVar mvarId value diff --git a/stage0/src/Lean/Meta/ExprDefEq.lean b/stage0/src/Lean/Meta/ExprDefEq.lean index 19550af0eb..5f38f7974e 100644 --- a/stage0/src/Lean/Meta/ExprDefEq.lean +++ b/stage0/src/Lean/Meta/ExprDefEq.lean @@ -920,14 +920,60 @@ private def assignConst (mvar : Expr) (numArgs : Nat) (v : Expr) : MetaM Bool := trace[Meta.isDefEq.constApprox] "{mvar} := {v}" checkTypesAndAssign mvar v -private def processConstApprox (mvar : Expr) (numArgs : Nat) (v : Expr) : MetaM Bool := do +/-- + Auxiliary procedure for solving `?m args =?= v` when `args[:patternVarPrefix]` contains + only pairwise distinct free variables. + Let `args[:patternVarPrefix] = #[a₁, ..., aₙ]`, and `args[patternVarPrefix:] = #[b₁, ..., bᵢ]`, + this procedure first reduces the constraint to + ``` + ?m a₁ ... aₙ =?= fun x₁ ... xᵢ => v + ``` + where the left-hand-side is a constant function. + Then, it tries to find the longest prefix `#[a₁, ..., aⱼ]` of `#[a₁, ..., aₙ]` such that the following assignment is valid. + ``` + ?m := fun y₁ ... y‌ⱼ => (fun y_{j+1} ... yₙ x₁ ... xᵢ => v)[a₁/y₁, .., aⱼ/yⱼ] + ``` + That is, after the longest prefix is found, we solve the contraint as the lhs was a pattern. See the definition of "pattern" above. +-/ +private partial def processConstApprox (mvar : Expr) (args : Array Expr) (patternVarPrefix : Nat) (v : Expr) : MetaM Bool := do + trace[Meta.isDefEq.constApprox] "{mvar} {args} := {v}" + let rec defaultCase : MetaM Bool := assignConst mvar args.size v let cfg ← getConfig let mvarId := mvar.mvarId! let mvarDecl ← getMVarDecl mvarId - if mvarDecl.numScopeArgs == numArgs || cfg.constApprox then - assignConst mvar numArgs v + let numArgs := args.size + if mvarDecl.numScopeArgs != numArgs && !cfg.constApprox then + return false + else if patternVarPrefix == 0 then + defaultCase else - pure false + let argsPrefix : Array Expr := args[:patternVarPrefix] + let type ← instantiateForall mvarDecl.type argsPrefix + let suffixSize := numArgs - argsPrefix.size + forallBoundedTelescope type suffixSize fun xs _ => do + if xs.size != suffixSize then + defaultCase + else + let some v ← mkLambdaFVarsWithLetDeps xs v | defaultCase + let rec go (argsPrefix : Array Expr) (v : Expr) : MetaM Bool := do + trace[Meta.isDefEq] "processConstApprox.go {mvar} {argsPrefix} := {v}" + let rec cont : MetaM Bool := do + if argsPrefix.isEmpty then + defaultCase + else + let some v ← mkLambdaFVarsWithLetDeps #[argsPrefix.back] v | defaultCase + go argsPrefix.pop v + match (← checkAssignment mvarId argsPrefix v) with + | none => cont + | some vNew => + let some vNew ← mkLambdaFVarsWithLetDeps argsPrefix vNew | cont + if argsPrefix.any (fun arg => mvarDecl.lctx.containsFVar arg) then + /- We need to type check `vNew` because abstraction using `mkLambdaFVars` may have produced + a type incorrect term. See discussion at A2 -/ + (isTypeCorrect vNew <&&> checkTypesAndAssign mvar vNew) <||> cont + else + checkTypesAndAssign mvar vNew <||> cont + go argsPrefix v /-- Tries to solve `?m a₁ ... aₙ =?= v` by assigning `?m`. It assumes `?m` is unassigned. -/ @@ -939,7 +985,7 @@ private partial def processAssignment (mvarApp : Expr) (v : Expr) : MetaM Bool : let rec process (i : Nat) (args : Array Expr) (v : Expr) := do let cfg ← getConfig let useFOApprox (args : Array Expr) : MetaM Bool := - processAssignmentFOApprox mvar args v <||> processConstApprox mvar args.size v + processAssignmentFOApprox mvar args v <||> processConstApprox mvar args i v if h : i < args.size then let arg := args.get ⟨i, h⟩ let arg ← simpAssignmentArg arg @@ -1273,7 +1319,7 @@ private def isDefEqProofIrrel (t s : Expr) : MetaM LBool := do /- Try to solve constraint of the form `?m args₁ =?= ?m args₂`. - First try to unify `args₁` and `args₂`, and return true if successful - Otherwise, try to assign `?m` to a constant function of the form `fun x_1 ... x_n => ?n` - where `?n` is a fresh metavariable. See `processConstApprox`. -/ + where `?n` is a fresh metavariable. See `assignConst`. -/ private def isDefEqMVarSelf (mvar : Expr) (args₁ args₂ : Array Expr) : MetaM Bool := do if args₁.size != args₂.size then pure false diff --git a/stage0/stdlib/Init/Data/Array/Basic.c b/stage0/stdlib/Init/Data/Array/Basic.c index 921e35c52d..8d0e4dd016 100644 --- a/stage0/stdlib/Init/Data/Array/Basic.c +++ b/stage0/stdlib/Init/Data/Array/Basic.c @@ -19,6 +19,7 @@ LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_concatMap___spec__ LEAN_EXPORT lean_object* l_Array_forM(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_findM_x3f(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_findSomeRevM_x3f_find___at_Array_findRevM_x3f___spec__1___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_takeWhile___rarg___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_getEvenElems___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_getMax_x3f___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Array_findIdxM_x3f___spec__1___rarg___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -163,7 +164,9 @@ LEAN_EXPORT lean_object* l_Array_zip___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_partition(lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_zipWithAux___at_Array_zip___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_popWhile___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapIdx___rarg(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_takeWhile(lean_object*); LEAN_EXPORT lean_object* l_Array_getMax_x3f___rarg___lambda__1(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_swap___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___aux__Init__Data__Array__Basic______macroRules__term_x23_x5b___x2c_x5d__1___closed__12; @@ -199,9 +202,11 @@ LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_allDiffAuxAu LEAN_EXPORT lean_object* l_Array_forInUnsafe(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_findSomeM_x3f___rarg___lambda__1(lean_object*, lean_object*, lean_object*); static lean_object* l_Array_instAppendArray___closed__1; +LEAN_EXPORT lean_object* l_Array_takeWhile_go___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___aux__Init__Data__Array__Basic______macroRules__term_x23_x5b___x2c_x5d__1___closed__16; LEAN_EXPORT lean_object* l_Array_toArrayLit___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_takeWhile___rarg(lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Array_all___rarg(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_filter___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_eraseIdx_x27___rarg___boxed(lean_object*, lean_object*); @@ -340,6 +345,7 @@ LEAN_EXPORT lean_object* l_Array_foldrMUnsafe_fold___at_Array_toList___spec__1(l LEAN_EXPORT lean_object* l_Array_findSome_x21___rarg___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Array_map___spec__1(lean_object*, lean_object*); static lean_object* l_Array_findSome_x21___rarg___closed__1; +LEAN_EXPORT lean_object* l_Array_takeWhile_go___rarg(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_insertAt___rarg___closed__2; LEAN_EXPORT lean_object* l_Array_modifyMUnsafe___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*); @@ -349,6 +355,7 @@ LEAN_EXPORT lean_object* l_Array_findSomeRevM_x3f_find___at_Array_findSomeRev_x3 LEAN_EXPORT lean_object* l_Array_zipWith___rarg___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldrMUnsafe_fold___at_Array_foldr___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapIdxM_map(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_takeWhile_go(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Array_partition___spec__1___rarg(lean_object*, lean_object*, size_t, size_t, lean_object*); LEAN_EXPORT lean_object* l_Array_swapAt___rarg___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_feraseIdx___rarg(lean_object*, lean_object*); @@ -444,6 +451,7 @@ LEAN_EXPORT lean_object* l_Array_foldrMUnsafe_fold___at_Array_forRevM___spec__2_ LEAN_EXPORT lean_object* l_Array_eraseIdx___rarg___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_findSomeRevM_x3f_find___at_Array_findSomeRev_x3f___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_filterM___spec__1___rarg___lambda__2(size_t, lean_object*, lean_object*, lean_object*, size_t, lean_object*); +LEAN_EXPORT lean_object* l_Array_popWhile(lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_append___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_modifyMUnsafe___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_concatMapM___rarg(lean_object*, lean_object*, lean_object*); @@ -8466,6 +8474,141 @@ lean_dec(x_2); return x_4; } } +LEAN_EXPORT lean_object* l_Array_popWhile___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_3 = lean_array_get_size(x_2); +x_4 = lean_unsigned_to_nat(0u); +x_5 = lean_nat_dec_lt(x_4, x_3); +if (x_5 == 0) +{ +lean_dec(x_3); +lean_dec(x_1); +return x_2; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_6 = lean_unsigned_to_nat(1u); +x_7 = lean_nat_sub(x_3, x_6); +lean_dec(x_3); +x_8 = lean_array_fget(x_2, x_7); +lean_dec(x_7); +lean_inc(x_1); +x_9 = lean_apply_1(x_1, x_8); +x_10 = lean_unbox(x_9); +lean_dec(x_9); +if (x_10 == 0) +{ +lean_dec(x_1); +return x_2; +} +else +{ +lean_object* x_11; +x_11 = lean_array_pop(x_2); +x_2 = x_11; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_popWhile(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Array_popWhile___rarg), 2, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Array_takeWhile_go___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_array_get_size(x_2); +x_6 = lean_nat_dec_lt(x_3, x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +lean_dec(x_3); +lean_dec(x_1); +return x_4; +} +else +{ +lean_object* x_7; lean_object* x_8; uint8_t x_9; +x_7 = lean_array_fget(x_2, x_3); +lean_inc(x_1); +lean_inc(x_7); +x_8 = lean_apply_1(x_1, x_7); +x_9 = lean_unbox(x_8); +lean_dec(x_8); +if (x_9 == 0) +{ +lean_dec(x_7); +lean_dec(x_3); +lean_dec(x_1); +return x_4; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_3, x_10); +lean_dec(x_3); +x_12 = lean_array_push(x_4, x_7); +x_3 = x_11; +x_4 = x_12; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_takeWhile_go(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Array_takeWhile_go___rarg___boxed), 4, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Array_takeWhile_go___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Array_takeWhile_go___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_2); +return x_5; +} +} +LEAN_EXPORT lean_object* l_Array_takeWhile___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_unsigned_to_nat(0u); +x_4 = l_Array_instEmptyCollectionArray___closed__1; +x_5 = l_Array_takeWhile_go___rarg(x_1, x_2, x_3, x_4); +return x_5; +} +} +LEAN_EXPORT lean_object* l_Array_takeWhile(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Array_takeWhile___rarg___boxed), 2, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Array_takeWhile___rarg___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Array_takeWhile___rarg(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} LEAN_EXPORT lean_object* l_Array_eraseIdxAux___rarg(lean_object* x_1, lean_object* x_2) { _start: { @@ -8753,7 +8896,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_Array_swapAt_x21___rarg___closed__3; x_2 = l_Array_insertAt___rarg___closed__1; -x_3 = lean_unsigned_to_nat(682u); +x_3 = lean_unsigned_to_nat(705u); x_4 = lean_unsigned_to_nat(22u); x_5 = l_Array_insertAt___rarg___closed__2; 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/Match.c b/stage0/stdlib/Lean/Elab/Match.c index 97590002ea..49bd4bf87f 100644 --- a/stage0/stdlib/Lean/Elab/Match.c +++ b/stage0/stdlib/Lean/Elab/Match.c @@ -53,11 +53,13 @@ static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltVi LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_getIndexToInclude_x3f_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_findDiscrRefinementPath_goIndex___closed__1; static lean_object* l_Lean_Elab_Term_ToDepElimPattern_main___closed__4; +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_userName(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabPatterns___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabPatterns___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabMatch(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_nullKind; +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___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_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_finalizePatternDecls___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*); static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_finalizePatternDecls___spec__1___closed__1; @@ -111,8 +113,8 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabMVarWithIdKind(lean_object*, lean_ lean_object* lean_local_ctx_erase(lean_object*, lean_object*); uint8_t l_Lean_Meta_isMatchValue(lean_object*); lean_object* l_Lean_mkMVar(lean_object*); +static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__1; size_t lean_usize_sub(size_t, size_t); -LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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*); static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_throwInvalidPattern___rarg___closed__2; static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrsWitMatchType___spec__1___closed__10; lean_object* lean_environment_find(lean_object*, lean_object*); @@ -124,13 +126,14 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatch uint8_t l_Lean_checkTraceOption(lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabNoMatch_declRange___closed__5; LEAN_EXPORT lean_object* l_List_mapTRAux___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__2; lean_object* lean_st_ref_get(lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___lambda__2___closed__1; static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabPatterns___spec__7___closed__3; LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_markIsDep(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_withExistingLocalDecls___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__7(lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabMatch_docString___closed__1; static lean_object* l_Lean_Elab_Term_mkFreshBinderName___at___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_mkLocalDeclFor___spec__3___rarg___closed__1; lean_object* l_List_toString___at_Lean_Meta_RecursorInfo_instToStringRecursorInfo___spec__5(lean_object*); @@ -152,6 +155,7 @@ static lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Elab_Match_0__ static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_expandSimpleMatch___closed__1; lean_object* l_Lean_Elab_Term_getMVarDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__5; +static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__4; LEAN_EXPORT lean_object* l_Array_sequenceMap_loop___at_Lean_Elab_Term_precheckMatch___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__11___boxed(lean_object*, lean_object*); lean_object* lean_expr_instantiate1(lean_object*, lean_object*); @@ -312,6 +316,7 @@ static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_finalizePattern static lean_object* l_Lean_Elab_Term_isAuxDiscrName___closed__1; static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMatchGeneralizing_x3f___closed__11; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_collectDeps___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_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_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_EXPORT lean_object* l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_collectDeps___spec__5(lean_object*, lean_object*, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_collectDeps___closed__1; @@ -360,6 +365,7 @@ uint8_t l_Lean_Option_get___at_Lean_ppExpr___spec__1(lean_object*, lean_object*) static lean_object* l_Lean_addTrace___at___private_Lean_Elab_Match_0__Lean_Elab_Term_findDiscrRefinementPath_goIndex___spec__3___closed__1; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__6___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Term_elabMatch_elabMatchDefault___closed__1; +static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__2; static lean_object* l___regBuiltin_Lean_Elab_Term_elabNoMatch___closed__2; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_panic___at___private_Lean_Meta_WHNF_0__Lean_Meta_cached_x3f___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -397,6 +403,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatch static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_tryPostponeIfDiscrTypeIsMVar___spec__1___lambda__1___closed__1; static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrsWitMatchType___spec__1___closed__7; lean_object* l_Lean_Elab_Term_mkFreshBinderName___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderIdent___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__1; static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_expandSimpleMatch___closed__17; static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMatchGeneralizing_x3f___closed__6; static lean_object* l___regBuiltin_Lean_Elab_Term_elabInaccessible_declRange___closed__1; @@ -407,6 +414,7 @@ LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Elab_Match_0 LEAN_EXPORT lean_object* l_List_mapTRAux___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___spec__2___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabMatch_declRange___closed__4; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___spec__3(lean_object*, size_t, size_t, lean_object*); +static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__2; LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_findDiscrRefinementPath_goType___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_alreadyVisited(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -446,11 +454,13 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatch lean_object* l_Lean_Meta_isProof(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_Term_elabMatch_elabMatchDefault___spec__1___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_expandNonAtomicDiscrs_x3f_loop___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*, lean_object*); +static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__5; lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_throwInvalidPattern___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabMVarWithIdKind___closed__6; lean_object* l_Lean_Elab_Term_elabTermEnsuringType___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_whnf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__3; LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_Term_elabMatch_elabMatchDefault___spec__1(lean_object*, size_t, size_t); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabPatterns___spec__7___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkFVar(lean_object*); @@ -487,6 +497,7 @@ static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMatchGenera static lean_object* l_Lean_Elab_Term_elabMatch___closed__2; static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_tryPostponeIfDiscrTypeIsMVar___spec__1___closed__1; extern lean_object* l_Lean_Elab_Term_termElabAttribute; +static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__1; static lean_object* l___regBuiltin_Lean_Elab_Term_precheckMatch___closed__1; LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabPatterns___spec__7___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrs___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*); @@ -501,7 +512,6 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabMVarWithIdKind_declRange__ LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__2(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_getMVarSyntaxMVarId(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_finalizePatternDecls___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_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___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*); uint8_t l_Lean_Syntax_isMissing(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__8___lambda__1___closed__1; @@ -513,11 +523,11 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabMVarWithIdKind_declRange__ lean_object* l_Lean_Meta_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrs___spec__1(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabMatch_declRange___closed__3; -static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__5; LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_throwAbortTerm___at_Lean_Elab_Term_isAtomicDiscr_x3f___spec__1___rarg(lean_object*); uint8_t l_Array_contains___at___private_Lean_Meta_Match_Value_0__Lean_Meta_isUIntTypeName___spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrs___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Elab_Match_0__Lean_Elab_Term_generalize___spec__2(lean_object*, lean_object*, size_t, size_t); LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Match_0__Lean_Elab_Term_findDiscrRefinementPath_goIndex___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_filterMapM___at___private_Lean_Elab_Match_0__Lean_Elab_Term_getMatchAlts___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -551,7 +561,6 @@ lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*, static lean_object* l_Lean_Elab_Term_precheckMatch___closed__2; static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_precheckMatch___spec__5___closed__2; lean_object* lean_environment_main_module(lean_object*); -static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__3; uint8_t lean_expr_eqv(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_finalizePatternDecls___spec__1___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_EXPORT lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Elab_Match_0__Lean_Elab_Term_expandNonAtomicDiscrs_x3f___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -646,6 +655,7 @@ LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Match_0 static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrsWitMatchType___spec__1___closed__13; lean_object* l_Lean_Elab_Term_elabType(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*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isFVar(lean_object*); static lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__5___rarg___closed__2; LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -670,9 +680,9 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0 LEAN_EXPORT lean_object* l_Lean_Meta_withLocalInstances___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_mkFreshBinderName___at___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_mkLocalDeclFor___spec__3___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isPatternVar___closed__2; -static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__4; lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_List_forIn_loop___at_Lean_Elab_Term_reportMatcherResultErrors___spec__1___closed__2; +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_arrayLit_x3f(lean_object*); LEAN_EXPORT lean_object* l_List_mapM___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_precheckMatch___closed__3; @@ -693,7 +703,6 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatch static lean_object* l_Lean_Elab_throwAbortTerm___at_Lean_Elab_Term_isAtomicDiscr_x3f___spec__1___rarg___closed__1; uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_precheckMatch___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__1; static lean_object* l_Lean_addTrace___at___private_Lean_Elab_Match_0__Lean_Elab_Term_findDiscrRefinementPath_goIndex___spec__3___closed__4; static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_finalizePatternDecls___spec__1___closed__3; LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_findDiscrRefinementPath_goIndex___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -706,7 +715,6 @@ LEAN_EXPORT lean_object* l_Lean_Elab_throwAbortTerm___at_Lean_Elab_Term_isAtomic LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_Term_ToDepElimPattern_main___spec__5(lean_object*, lean_object*, size_t, size_t); LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___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*); static lean_object* l_Lean_Elab_Term_precheckMatch___lambda__3___closed__1; -static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__2; static lean_object* l___regBuiltin_Lean_Elab_Term_elabMVarWithIdKind___closed__4; LEAN_EXPORT uint8_t l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_containsFVar(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_List_forIn_loop___at_Lean_Elab_Term_reportMatcherResultErrors___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -764,7 +772,7 @@ lean_object* l_Lean_Meta_mkEq(lean_object*, lean_object*, lean_object*, lean_obj static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrsWitMatchType___spec__1___closed__9; static lean_object* l_Lean_Elab_Term_reportMatcherResultErrors___closed__2; static lean_object* l___regBuiltin_Lean_Elab_Term_elabMVarWithIdKind___closed__1; -LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0__Lean_Elab_Term_generalize___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_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___lambda__2___boxed(lean_object**); LEAN_EXPORT lean_object* l_Lean_Elab_Term_mkFreshBinderName___at___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_mkLocalDeclFor___spec__3___boxed(lean_object*); @@ -786,8 +794,8 @@ LEAN_EXPORT lean_object* l_Lean_addTrace___at___private_Lean_Elab_Match_0__Lean_ lean_object* l_Lean_Elab_Term_isLocalIdent_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__1___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(size_t, size_t, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897_(lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_13118_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_13375_(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_2426_(lean_object*); lean_object* l_Lean_mkSimpleThunk(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_isAtomicDiscr_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -815,7 +823,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatch LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_withElaboratedLHS(lean_object*); LEAN_EXPORT uint8_t l___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_mkLocalDeclFor___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_mkInaccessible(lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___lambda__1(lean_object*, size_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* l_Array_foldlMUnsafe_fold___at_Lean_Syntax_SepArray_getElems___spec__1(lean_object*, size_t, size_t, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_withDepElimPatterns___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -840,6 +848,7 @@ uint8_t lean_nat_dec_lt(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabPatterns___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Term_reportMatcherResultErrors___closed__1; static lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_expandSimpleMatch___closed__16; +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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_matchPatternAttr; uint8_t l_Lean_Syntax_isIdent(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrs___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*); @@ -19114,108 +19123,239 @@ return x_23; } } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { -uint8_t x_14; lean_object* x_15; -x_14 = 1; +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; uint8_t x_20; +x_13 = l_List_redLength___rarg(x_1); +x_14 = lean_mk_empty_array_with_capacity(x_13); +lean_dec(x_13); +x_15 = l_List_toArrayAux___rarg(x_1, x_14); +x_16 = lean_array_get_size(x_15); +x_17 = lean_usize_of_nat(x_16); +lean_dec(x_16); +x_18 = 0; +x_19 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(x_17, x_18, x_15); +x_20 = l_Array_isEmpty___rarg(x_19); +if (x_20 == 0) +{ +uint8_t x_21; uint8_t x_22; lean_object* x_23; +x_21 = 0; +x_22 = 1; +lean_inc(x_8); +x_23 = l_Lean_Meta_mkLambdaFVars(x_19, x_4, x_21, x_22, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +x_26 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__2(x_2, x_3, x_24, x_6, x_7, x_8, x_9, x_10, x_11, x_25); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +return x_26; +} +else +{ +uint8_t x_27; +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_2); +x_27 = !lean_is_exclusive(x_23); +if (x_27 == 0) +{ +return x_23; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_23, 0); +x_29 = lean_ctor_get(x_23, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_23); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +else +{ +lean_object* x_31; lean_object* x_32; +lean_dec(x_19); +x_31 = l_Lean_mkSimpleThunk(x_4); +x_32 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__2(x_2, x_3, x_31, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +return x_32; +} +} +} +static lean_object* _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("type mistmatch, alternative "); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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, lean_object* x_13) { +_start: +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; +x_14 = lean_ctor_get(x_1, 2); +lean_inc(x_14); +lean_dec(x_1); +lean_inc(x_6); +x_15 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_15, 0, x_6); +x_16 = lean_box(0); +x_17 = 1; lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); -x_15 = l_Lean_Elab_Term_elabTermEnsuringType(x_1, x_2, x_14, x_14, x_3, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_15) == 0) +x_18 = l_Lean_Elab_Term_elabTermEnsuringType(x_14, x_15, x_17, x_17, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_18) == 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; size_t x_22; size_t x_23; lean_object* x_24; uint8_t x_25; -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_redLength___rarg(x_4); -x_19 = lean_mk_empty_array_with_capacity(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; uint8_t x_27; +x_19 = lean_ctor_get(x_9, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_18, 1); +lean_inc(x_21); lean_dec(x_18); -x_20 = l_List_toArrayAux___rarg(x_4, x_19); -x_21 = lean_array_get_size(x_20); -x_22 = lean_usize_of_nat(x_21); -lean_dec(x_21); -x_23 = 0; -x_24 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(x_22, x_23, x_20); -x_25 = l_Array_isEmpty___rarg(x_24); -if (x_25 == 0) +x_22 = lean_ctor_get(x_9, 1); +lean_inc(x_22); +x_23 = lean_ctor_get(x_9, 2); +lean_inc(x_23); +x_24 = lean_ctor_get(x_9, 3); +lean_inc(x_24); +x_25 = lean_ctor_get(x_9, 4); +lean_inc(x_25); +x_26 = lean_ctor_get(x_9, 5); +lean_inc(x_26); +x_27 = !lean_is_exclusive(x_19); +if (x_27 == 0) { -uint8_t x_26; lean_object* x_27; -x_26 = 0; -lean_inc(x_9); -x_27 = l_Lean_Meta_mkLambdaFVars(x_24, x_16, x_26, x_14, x_9, x_10, x_11, x_12, x_17); -if (lean_obj_tag(x_27) == 0) +lean_object* x_28; lean_object* x_29; +lean_ctor_set_uint8(x_19, 0, x_17); +lean_ctor_set_uint8(x_19, 1, x_17); +lean_ctor_set_uint8(x_19, 2, x_17); +lean_ctor_set_uint8(x_19, 3, x_17); +x_28 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_28, 0, x_19); +lean_ctor_set(x_28, 1, x_22); +lean_ctor_set(x_28, 2, x_23); +lean_ctor_set(x_28, 3, x_24); +lean_ctor_set(x_28, 4, x_25); +lean_ctor_set(x_28, 5, x_26); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_2); +lean_inc(x_6); +x_29 = l_Lean_Meta_isExprDefEq(x_6, x_2, x_28, x_10, x_11, x_12, x_21); +if (lean_obj_tag(x_29) == 0) { -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___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__2(x_5, x_6, x_28, x_7, x_8, x_9, x_10, x_11, x_12, x_29); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -return x_30; -} -else -{ -uint8_t x_31; -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_5); -x_31 = !lean_is_exclusive(x_27); +lean_object* x_30; uint8_t x_31; +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +x_31 = lean_unbox(x_30); +lean_dec(x_30); if (x_31 == 0) { -return x_27; -} -else -{ -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_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; uint8_t x_41; +lean_dec(x_20); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_32 = lean_ctor_get(x_29, 1); 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_35; lean_object* x_36; -lean_dec(x_24); -x_35 = l_Lean_mkSimpleThunk(x_16); -x_36 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__2(x_5, x_6, x_35, x_7, x_8, x_9, x_10, x_11, x_12, x_17); +lean_dec(x_29); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +x_33 = l_Lean_Meta_mkHasTypeButIsExpectedMsg(x_6, x_2, x_9, x_10, x_11, x_12, 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___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__2; +x_37 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_34); +x_38 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrsWitMatchType___spec__1___closed__16; +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_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(x_39, x_7, x_8, x_9, x_10, x_11, x_12, x_35); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); -lean_dec(x_7); -return x_36; +x_41 = !lean_is_exclusive(x_40); +if (x_41 == 0) +{ +return x_40; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_40, 0); +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_40); +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +return x_44; } } else { -uint8_t x_37; +lean_object* x_45; lean_object* x_46; lean_object* x_47; +lean_dec(x_6); +lean_dec(x_2); +x_45 = lean_ctor_get(x_29, 1); +lean_inc(x_45); +lean_dec(x_29); +x_46 = lean_box(0); +x_47 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__3(x_3, x_4, x_5, x_20, x_46, x_7, x_8, x_9, x_10, x_11, x_12, x_45); +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_8); +return x_47; +} +} +else +{ +uint8_t x_48; +lean_dec(x_20); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); @@ -19225,53 +19365,374 @@ lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -x_37 = !lean_is_exclusive(x_15); -if (x_37 == 0) +lean_dec(x_3); +lean_dec(x_2); +x_48 = !lean_is_exclusive(x_29); +if (x_48 == 0) { -return x_15; +return x_29; } else { -lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_38 = lean_ctor_get(x_15, 0); -x_39 = lean_ctor_get(x_15, 1); -lean_inc(x_39); -lean_inc(x_38); -lean_dec(x_15); -x_40 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_40, 0, x_38); -lean_ctor_set(x_40, 1, x_39); -return x_40; +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_29, 0); +x_50 = lean_ctor_get(x_29, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_29); +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; +} +} +} +else +{ +uint8_t x_52; uint8_t x_53; uint8_t x_54; uint8_t x_55; uint8_t x_56; uint8_t x_57; uint8_t x_58; uint8_t x_59; uint8_t x_60; uint8_t x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_52 = lean_ctor_get_uint8(x_19, 4); +x_53 = lean_ctor_get_uint8(x_19, 5); +x_54 = lean_ctor_get_uint8(x_19, 6); +x_55 = lean_ctor_get_uint8(x_19, 7); +x_56 = lean_ctor_get_uint8(x_19, 8); +x_57 = lean_ctor_get_uint8(x_19, 9); +x_58 = lean_ctor_get_uint8(x_19, 10); +x_59 = lean_ctor_get_uint8(x_19, 11); +x_60 = lean_ctor_get_uint8(x_19, 12); +x_61 = lean_ctor_get_uint8(x_19, 13); +lean_dec(x_19); +x_62 = lean_alloc_ctor(0, 0, 14); +lean_ctor_set_uint8(x_62, 0, x_17); +lean_ctor_set_uint8(x_62, 1, x_17); +lean_ctor_set_uint8(x_62, 2, x_17); +lean_ctor_set_uint8(x_62, 3, x_17); +lean_ctor_set_uint8(x_62, 4, x_52); +lean_ctor_set_uint8(x_62, 5, x_53); +lean_ctor_set_uint8(x_62, 6, x_54); +lean_ctor_set_uint8(x_62, 7, x_55); +lean_ctor_set_uint8(x_62, 8, x_56); +lean_ctor_set_uint8(x_62, 9, x_57); +lean_ctor_set_uint8(x_62, 10, x_58); +lean_ctor_set_uint8(x_62, 11, x_59); +lean_ctor_set_uint8(x_62, 12, x_60); +lean_ctor_set_uint8(x_62, 13, x_61); +x_63 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_22); +lean_ctor_set(x_63, 2, x_23); +lean_ctor_set(x_63, 3, x_24); +lean_ctor_set(x_63, 4, x_25); +lean_ctor_set(x_63, 5, x_26); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_2); +lean_inc(x_6); +x_64 = l_Lean_Meta_isExprDefEq(x_6, x_2, x_63, x_10, x_11, x_12, x_21); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; uint8_t x_66; +x_65 = lean_ctor_get(x_64, 0); +lean_inc(x_65); +x_66 = lean_unbox(x_65); +lean_dec(x_65); +if (x_66 == 0) +{ +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_dec(x_20); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_67 = lean_ctor_get(x_64, 1); +lean_inc(x_67); +lean_dec(x_64); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +x_68 = l_Lean_Meta_mkHasTypeButIsExpectedMsg(x_6, x_2, x_9, x_10, x_11, x_12, x_67); +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_71 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__2; +x_72 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_72, 0, x_71); +lean_ctor_set(x_72, 1, x_69); +x_73 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrsWitMatchType___spec__1___closed__16; +x_74 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_74, 0, x_72); +lean_ctor_set(x_74, 1, x_73); +x_75 = l_Lean_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(x_74, x_7, x_8, x_9, x_10, x_11, x_12, x_70); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +x_76 = lean_ctor_get(x_75, 0); +lean_inc(x_76); +x_77 = lean_ctor_get(x_75, 1); +lean_inc(x_77); +if (lean_is_exclusive(x_75)) { + lean_ctor_release(x_75, 0); + lean_ctor_release(x_75, 1); + x_78 = x_75; +} else { + lean_dec_ref(x_75); + x_78 = lean_box(0); +} +if (lean_is_scalar(x_78)) { + x_79 = lean_alloc_ctor(1, 2, 0); +} else { + x_79 = x_78; +} +lean_ctor_set(x_79, 0, x_76); +lean_ctor_set(x_79, 1, x_77); +return x_79; +} +else +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; +lean_dec(x_6); +lean_dec(x_2); +x_80 = lean_ctor_get(x_64, 1); +lean_inc(x_80); +lean_dec(x_64); +x_81 = lean_box(0); +x_82 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__3(x_3, x_4, x_5, x_20, x_81, x_7, x_8, x_9, x_10, x_11, x_12, x_80); +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_8); +return x_82; +} +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; +lean_dec(x_20); +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_83 = lean_ctor_get(x_64, 0); +lean_inc(x_83); +x_84 = lean_ctor_get(x_64, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_85 = x_64; +} else { + lean_dec_ref(x_64); + x_85 = lean_box(0); +} +if (lean_is_scalar(x_85)) { + x_86 = lean_alloc_ctor(1, 2, 0); +} else { + x_86 = x_85; +} +lean_ctor_set(x_86, 0, x_83); +lean_ctor_set(x_86, 1, x_84); +return x_86; +} +} +} +else +{ +uint8_t x_87; +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_87 = !lean_is_exclusive(x_18); +if (x_87 == 0) +{ +return x_18; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_88 = lean_ctor_get(x_18, 0); +x_89 = lean_ctor_get(x_18, 1); +lean_inc(x_89); +lean_inc(x_88); +lean_dec(x_18); +x_90 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_90, 0, x_88); +lean_ctor_set(x_90, 1, x_89); +return x_90; } } } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { -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_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; +lean_dec(x_6); +lean_inc(x_10); +x_14 = l_Lean_Meta_instantiateMVars(x_1, 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_Expr_getAppFn(x_15); +x_18 = l_Lean_Expr_isMVar(x_17); +lean_dec(x_17); +if (x_18 == 0) +{ +lean_object* x_19; +lean_inc(x_15); +x_19 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4(x_2, x_15, x_3, x_4, x_5, x_15, x_7, x_8, x_9, x_10, x_11, x_12, x_16); +return x_19; +} +else +{ +uint8_t x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_20 = 0; +x_21 = lean_box(0); +lean_inc(x_9); +x_22 = l_Lean_Meta_mkFreshTypeMVar(x_20, x_21, x_9, x_10, x_11, x_12, x_16); +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 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4(x_2, x_15, x_3, x_4, x_5, x_23, x_7, x_8, x_9, x_10, x_11, x_12, x_24); +return x_25; +} +} +} +static lean_object* _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("elabMatchAltView: "); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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) { +_start: +{ +uint8_t x_13; lean_object* x_14; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_27 = lean_st_ref_get(x_11, x_12); +x_28 = lean_ctor_get(x_27, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_28, 3); +lean_inc(x_29); +lean_dec(x_28); +x_30 = lean_ctor_get_uint8(x_29, sizeof(void*)*1); +lean_dec(x_29); +if (x_30 == 0) +{ +lean_object* x_31; uint8_t x_32; +x_31 = lean_ctor_get(x_27, 1); +lean_inc(x_31); +lean_dec(x_27); +x_32 = 0; +x_13 = x_32; +x_14 = x_31; +goto block_26; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; +x_33 = lean_ctor_get(x_27, 1); +lean_inc(x_33); +lean_dec(x_27); +lean_inc(x_5); +x_34 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_33); +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_34, 1); +lean_inc(x_36); +lean_dec(x_34); +x_37 = lean_unbox(x_35); +lean_dec(x_35); +x_13 = x_37; +x_14 = x_36; +goto block_26; +} +block_26: +{ +if (x_13 == 0) +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_box(0); +x_16 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__5(x_1, x_2, x_3, x_4, x_5, x_15, x_6, x_7, x_8, x_9, x_10, x_11, 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_inc(x_1); +x_17 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_17, 0, x_1); +x_18 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__2; +x_19 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_17); +x_20 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrsWitMatchType___spec__1___closed__16; +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_inc(x_5); +x_22 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_5, x_21, x_6, x_7, x_8, x_9, x_10, x_11, x_14); +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 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__5(x_1, x_2, x_3, x_4, x_5, x_23, x_6, x_7, x_8, x_9, x_10, x_11, x_24); +return x_25; +} +} +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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) { +_start: +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; x_12 = lean_ctor_get(x_3, 1); lean_inc(x_12); -x_13 = lean_ctor_get(x_1, 2); -lean_inc(x_13); -lean_dec(x_1); -x_14 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_14, 0, x_4); -x_15 = lean_box(0); lean_inc(x_12); -x_16 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__3), 13, 6); -lean_closure_set(x_16, 0, x_13); -lean_closure_set(x_16, 1, x_14); -lean_closure_set(x_16, 2, x_15); -lean_closure_set(x_16, 3, x_12); -lean_closure_set(x_16, 4, x_3); -lean_closure_set(x_16, 5, x_2); -x_17 = l_Lean_Meta_withLocalInstances___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___spec__1___rarg(x_12, x_16, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +x_13 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6), 12, 5); +lean_closure_set(x_13, 0, x_4); +lean_closure_set(x_13, 1, x_1); +lean_closure_set(x_13, 2, x_12); +lean_closure_set(x_13, 3, x_3); +lean_closure_set(x_13, 4, x_2); +x_14 = l_Lean_Meta_withLocalInstances___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___spec__1___rarg(x_12, x_13, x_5, x_6, x_7, x_8, x_9, x_10, x_11); lean_dec(x_12); -return x_17; +return x_14; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__8(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; @@ -19279,18 +19740,18 @@ x_12 = lean_ctor_get(x_1, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_1, 1); lean_inc(x_13); -x_14 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4), 11, 2); +x_14 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__7), 11, 2); lean_closure_set(x_14, 0, x_1); lean_closure_set(x_14, 1, x_2); x_15 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_withElaboratedLHS___rarg(x_12, x_4, x_13, x_3, x_14, x_5, x_6, x_7, x_8, x_9, x_10, x_11); return x_15; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__9(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; lean_object* x_14; -x_13 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__5___boxed), 11, 3); +x_13 = lean_alloc_closure((void*)(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__8___boxed), 11, 3); lean_closure_set(x_13, 0, x_1); lean_closure_set(x_13, 1, x_2); lean_closure_set(x_13, 2, x_3); @@ -19398,7 +19859,7 @@ if (x_23 == 0) { lean_object* x_24; lean_object* x_25; x_24 = lean_box(0); -x_25 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6(x_18, x_19, x_2, x_17, x_24, x_3, x_4, x_5, x_6, x_7, x_8, x_21); +x_25 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__9(x_18, x_19, x_2, x_17, x_24, x_3, x_4, x_5, x_6, x_7, x_8, x_21); return x_25; } else @@ -19427,7 +19888,7 @@ lean_dec(x_34); x_37 = lean_ctor_get(x_35, 0); lean_inc(x_37); lean_dec(x_35); -x_38 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6(x_18, x_19, x_2, x_17, x_37, x_3, x_4, x_5, x_6, x_7, x_8, x_36); +x_38 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__9(x_18, x_19, x_2, x_17, x_37, x_3, x_4, x_5, x_6, x_7, x_8, x_36); lean_dec(x_37); return x_38; } @@ -19563,7 +20024,7 @@ if (x_73 == 0) { lean_object* x_74; lean_object* x_75; x_74 = lean_box(0); -x_75 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6(x_68, x_69, x_2, x_67, x_74, x_3, x_4, x_5, x_6, x_63, x_8, x_71); +x_75 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__9(x_68, x_69, x_2, x_67, x_74, x_3, x_4, x_5, x_6, x_63, x_8, x_71); return x_75; } else @@ -19592,7 +20053,7 @@ lean_dec(x_84); x_87 = lean_ctor_get(x_85, 0); lean_inc(x_87); lean_dec(x_85); -x_88 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6(x_68, x_69, x_2, x_67, x_87, x_3, x_4, x_5, x_6, x_63, x_8, x_86); +x_88 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__9(x_68, x_69, x_2, x_67, x_87, x_3, x_4, x_5, x_6, x_63, x_8, x_86); lean_dec(x_87); return x_88; } @@ -19670,20 +20131,32 @@ lean_dec(x_4); return x_11; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +_start: +{ +lean_object* x_13; +x_13 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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_9); +lean_dec(x_7); +lean_dec(x_5); +return x_13; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__8___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___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__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 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__8(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_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___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_EXPORT lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__9___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___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6(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 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__9(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_5); return x_13; } @@ -25008,7 +25481,7 @@ lean_dec(x_2); return x_9; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__1() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -25018,7 +25491,7 @@ 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_Match___hyg_9897____closed__2() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__2() { _start: { lean_object* x_1; @@ -25026,17 +25499,17 @@ x_1 = lean_mk_string("ignoreUnusedAlts"); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__3() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__1; -x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__2; +x_1 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__1; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__2; 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_Match___hyg_9897____closed__4() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__4() { _start: { lean_object* x_1; @@ -25044,13 +25517,13 @@ x_1 = lean_mk_string("if true, do not generate error if an alternative is not us return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__5() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__5() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = 0; x_2 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_elabDiscrsWitMatchType___spec__1___closed__15; -x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__4; +x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__4; x_4 = lean_box(x_1); x_5 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_5, 0, x_4); @@ -25059,12 +25532,12 @@ lean_ctor_set(x_5, 2, x_3); return x_5; } } -LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154_(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_Match___hyg_9897____closed__3; -x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__5; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__3; +x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__5; x_4 = l_Lean_Option_register___at_Lean_Elab_initFn____x40_Lean_Elab_AutoBound___hyg_6____spec__1(x_2, x_3, x_1); return x_4; } @@ -25705,7 +26178,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___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__4; x_2 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__5; -x_3 = lean_unsigned_to_nat(765u); +x_3 = lean_unsigned_to_nat(773u); x_4 = lean_unsigned_to_nat(2u); x_5 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -28209,7 +28682,7 @@ if (lean_obj_tag(x_28) == 0) lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_dec(x_21); x_30 = lean_array_get_size(x_22); -x_31 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__1; +x_31 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__1; lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); @@ -31703,7 +32176,7 @@ x_4 = l_Lean_addBuiltinDeclarationRanges(x_2, x_3, x_1); return x_4; } } -LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_13118_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_13375_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -32480,6 +32953,14 @@ l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__2___clo lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__2___closed__1); l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__2___closed__2 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__2___closed__2(); lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__2___closed__2); +l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__1 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__1); +l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__2 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__2(); +lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__4___closed__2); +l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__1 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__1); +l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__2 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__2(); +lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___lambda__6___closed__2); l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___closed__1 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___closed__1(); lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___closed__1); l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___closed__2 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___closed__2(); @@ -32508,17 +32989,17 @@ l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___closed__1 lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___closed__1); l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___closed__2 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___closed__2(); lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___closed__2); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__1(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__1); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__2(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__2); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__3(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__3); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__4(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__4); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__5 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__5(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897____closed__5); -if (builtin) {res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9897_(lean_io_mk_world()); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__1); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__2); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__3(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__3); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__4(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__4); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__5 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__5(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154____closed__5); +if (builtin) {res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_10154_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_Elab_Term_match_ignoreUnusedAlts = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_Elab_Term_match_ignoreUnusedAlts); @@ -32646,7 +33127,7 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabMatch_declRange___closed_ res = l___regBuiltin_Lean_Elab_Term_elabMatch_declRange(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_13118_(lean_io_mk_world()); +res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_13375_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Elab_Term_elabNoMatch___closed__1 = _init_l_Lean_Elab_Term_elabNoMatch___closed__1(); diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/WF/Fix.c b/stage0/stdlib/Lean/Elab/PreDefinition/WF/Fix.c index d04de4b6d6..fbb57970eb 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/WF/Fix.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/WF/Fix.c @@ -14,10 +14,11 @@ extern "C" { #endif static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__4; -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___closed__1; -LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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_array_set(lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_WF_mkFix___lambda__4___closed__3; static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___closed__8; size_t lean_usize_add(size_t, size_t); static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__2; @@ -27,12 +28,12 @@ lean_object* lean_mk_empty_array_with_capacity(lean_object*); static lean_object* l_Lean_Elab_WF_mkFix___lambda__1___closed__1; lean_object* l_Lean_mkSort(lean_object*); lean_object* l_Lean_Meta_mkForallFVars(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn(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*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___lambda__2___closed__1; lean_object* lean_name_mk_string(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_getMatcherInfo_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); @@ -40,12 +41,13 @@ static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinitio static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___closed__5; static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__2; lean_object* l_Lean_Expr_bindingDomain_x21(lean_object*); -LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SourceInfo_fromRef(lean_object*); lean_object* l_Lean_Meta_MatcherApp_addArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___closed__4; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +static lean_object* l_Lean_Elab_WF_mkFix___lambda__4___closed__5; lean_object* l_Array_extract___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getRecAppSyntax_x3f(lean_object*); lean_object* l_Lean_Elab_Tactic_evalTacticAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -53,7 +55,7 @@ static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_p static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__1; lean_object* lean_st_ref_get(lean_object*, lean_object*); uint8_t l_Lean_Elab_Structural_recArgHasLooseBVarsAt(lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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*, lean_object*); static lean_object* l_Lean_Elab_WF_mkFix___lambda__1___closed__6; static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__6; static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___closed__7; @@ -62,25 +64,26 @@ 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*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__1___closed__3; -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__10(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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_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*); +static lean_object* l_Lean_Elab_WF_mkFix___lambda__4___closed__7; +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__10(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*); static lean_object* l_Lean_Elab_WF_mkFix___lambda__1___closed__2; -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___closed__3; LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getRevArg_x21(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6(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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6(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_instInhabitedTermElabM(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_mkDecreasingProof(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getMainModule___rarg(lean_object*, lean_object*); uint8_t lean_usize_dec_lt(size_t, size_t); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__1; lean_object* l_Lean_Meta_mkAppOptM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___closed__5; -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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*); static lean_object* l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1___closed__1; extern lean_object* l_Lean_levelZero; lean_object* lean_nat_add(lean_object*, lean_object*); @@ -89,20 +92,20 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab lean_object* l_Array_zip___rarg(lean_object*, lean_object*); lean_object* l_Lean_mkAppN(lean_object*, lean_object*); lean_object* l_Lean_mkMData(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_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*); lean_object* l_Lean_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_cleanup(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___closed__6; lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___closed__1; -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkProj(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__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*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__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*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___closed__2; lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda_loop___spec__1___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_mkDecreasingProof___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___lambda__3___closed__1; @@ -116,28 +119,29 @@ lean_object* l_Lean_replaceRef(lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___closed__8; lean_object* l_Lean_Meta_mkLambdaFVars(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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_Lean_Expr_fvarId_x21(lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13(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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13(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*); static lean_object* l_Lean_Elab_WF_mkFix___closed__1; static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___closed__4; static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__3; lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withLetDecl___at_Lean_Elab_Term_elabLetDeclAux___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__3(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_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__5; static lean_object* l_Lean_Elab_WF_mkFix___lambda__1___closed__4; -lean_object* l_Lean_Meta_getDecLevel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___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*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___closed__7; LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___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*, lean_object*); +lean_object* l_Array_back___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1(lean_object*, 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*); LEAN_EXPORT lean_object* l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___closed__1; uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__3(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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__3(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*); extern lean_object* l_Lean_instInhabitedExpr; -LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___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_EXPORT lean_object* l_Lean_Elab_WF_mkFix___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* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isConstOf(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_run(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -147,36 +151,42 @@ lean_object* l_Lean_Meta_mapErrorImp___rarg(lean_object*, lean_object*, lean_obj lean_object* lean_whnf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_Data_binderInfo(uint64_t); size_t lean_usize_of_nat(lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7(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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7(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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__1(lean_object*); uint8_t l_Lean_Expr_isLambda(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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__12___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_Elab_Term_runTactic(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_type(lean_object*); static lean_object* l_Lean_Elab_WF_mkFix___lambda__1___closed__3; -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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* l_List_redLength___rarg(lean_object*); +static lean_object* l_Lean_Elab_WF_mkFix___lambda__4___closed__8; lean_object* l_Lean_Expr_getAppNumArgsAux(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*); lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___lambda__2___closed__2; +static lean_object* l_Lean_Elab_WF_mkFix___lambda__4___closed__1; static lean_object* l_Lean_Elab_WF_mkFix___closed__2; uint8_t lean_nat_dec_le(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__4(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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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_Expr_beta(lean_object*, lean_object*); lean_object* l_Lean_mkApp(lean_object*, lean_object*); -lean_object* l_Lean_Expr_betaRev(lean_object*, lean_object*, uint8_t); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___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* l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_MatcherApp_toExpr(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_WF_mkFix___lambda__4___closed__4; static lean_object* l_Lean_Elab_WF_mkFix___lambda__1___closed__5; LEAN_EXPORT lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_ofSubarray___rarg(lean_object*); lean_object* l_Lean_mkApp4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getLevel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___spec__1___rarg(lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__14(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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__14(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_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__12___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isFVar(lean_object*); lean_object* l_Lean_Meta_mkArrow(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -186,15 +196,16 @@ lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_MatcherInfo_arity(lean_object*); lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_reportUnsolvedGoals(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__3___boxed(lean_object**); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___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* lean_mk_array(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_indentD(lean_object*); lean_object* l_Lean_Elab_ensureNoRecFn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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*); +static lean_object* l_Lean_Elab_WF_mkFix___lambda__4___closed__2; +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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* l_Lean_Expr_getAppFn(lean_object*); lean_object* l_Lean_Meta_Match_MatcherInfo_numAlts(lean_object*); lean_object* l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -202,22 +213,24 @@ static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_p LEAN_EXPORT lean_object* l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__3; lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__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*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___closed__2; lean_object* l_Lean_Meta_Match_Extension_getMatcherInfo_x3f(lean_object*, lean_object*); lean_object* l_Lean_indentExpr(lean_object*); lean_object* l_Lean_Expr_bindingBody_x21(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkConst(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_WF_mkFix___lambda__4___closed__6; lean_object* l_Lean_Elab_Structural_refinedArgType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___spec__1___closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_getMatcherInfo_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9(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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9(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*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___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_EXPORT lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: @@ -1105,1901 +1118,1934 @@ return x_129; } } } -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_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* x_12, lean_object* x_13) { +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t 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_14; -x_14 = lean_usize_dec_lt(x_5, x_4); -if (x_14 == 0) +uint8_t x_15; +x_15 = lean_usize_dec_lt(x_6, x_5); +if (x_15 == 0) { -lean_object* x_15; +lean_object* 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_3); -lean_dec(x_2); -lean_dec(x_1); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_6); -lean_ctor_set(x_15, 1, x_13); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_array_uget(x_6, x_5); -x_17 = lean_unsigned_to_nat(0u); -x_18 = lean_array_uset(x_6, x_5, 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_3); -lean_inc(x_2); -lean_inc(x_1); -x_19 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; -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 = 1; -x_23 = lean_usize_add(x_5, x_22); -x_24 = lean_array_uset(x_18, x_5, x_20); -x_5 = x_23; -x_6 = x_24; -x_13 = x_21; -goto _start; -} -else -{ -uint8_t x_26; -lean_dec(x_18); -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_26 = !lean_is_exclusive(x_19); -if (x_26 == 0) -{ -return x_19; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_19, 0); -x_28 = lean_ctor_get(x_19, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_19); -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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_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* x_12, lean_object* x_13) { -_start: -{ -uint8_t x_14; -x_14 = lean_usize_dec_lt(x_5, x_4); -if (x_14 == 0) -{ -lean_object* 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_3); -lean_dec(x_2); -lean_dec(x_1); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_6); -lean_ctor_set(x_15, 1, x_13); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_array_uget(x_6, x_5); -x_17 = lean_unsigned_to_nat(0u); -x_18 = lean_array_uset(x_6, x_5, 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_3); -lean_inc(x_2); -lean_inc(x_1); -x_19 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; -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 = 1; -x_23 = lean_usize_add(x_5, x_22); -x_24 = lean_array_uset(x_18, x_5, x_20); -x_5 = x_23; -x_6 = x_24; -x_13 = x_21; -goto _start; -} -else -{ -uint8_t x_26; -lean_dec(x_18); -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_26 = !lean_is_exclusive(x_19); -if (x_26 == 0) -{ -return x_19; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_19, 0); -x_28 = lean_ctor_get(x_19, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_19); -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_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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) { -_start: -{ -if (lean_obj_tag(x_4) == 5) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_14 = lean_ctor_get(x_4, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_4, 1); -lean_inc(x_15); lean_dec(x_4); -x_16 = lean_array_set(x_5, x_6, x_15); -x_17 = lean_unsigned_to_nat(1u); -x_18 = lean_nat_sub(x_6, x_17); -lean_dec(x_6); -x_4 = x_14; -x_5 = x_16; -x_6 = x_18; -goto _start; +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_7); +lean_ctor_set(x_16, 1, x_14); +return x_16; } else { -uint8_t x_20; -lean_dec(x_6); -x_20 = l_Lean_Expr_isConstOf(x_4, x_1); -if (x_20 == 0) -{ -lean_object* x_21; +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_array_uget(x_7, x_6); +x_18 = lean_unsigned_to_nat(0u); +x_19 = lean_array_uset(x_7, x_6, x_18); +lean_inc(x_13); 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_21 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_21) == 0) +x_20 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_17, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_20) == 0) { -lean_object* x_22; lean_object* x_23; lean_object* x_24; size_t x_25; size_t x_26; lean_object* x_27; -x_22 = lean_ctor_get(x_21, 0); +lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); -x_23 = lean_ctor_get(x_21, 1); -lean_inc(x_23); -lean_dec(x_21); -x_24 = lean_array_get_size(x_5); -x_25 = lean_usize_of_nat(x_24); -lean_dec(x_24); -x_26 = 0; -x_27 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__3(x_1, x_2, x_3, x_25, x_26, x_5, x_7, x_8, x_9, x_10, x_11, x_12, x_23); -if (lean_obj_tag(x_27) == 0) -{ -uint8_t x_28; -x_28 = !lean_is_exclusive(x_27); -if (x_28 == 0) -{ -lean_object* x_29; lean_object* x_30; -x_29 = lean_ctor_get(x_27, 0); -x_30 = l_Lean_mkAppN(x_22, x_29); -lean_ctor_set(x_27, 0, x_30); -return x_27; -} -else -{ -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_31 = lean_ctor_get(x_27, 0); -x_32 = lean_ctor_get(x_27, 1); -lean_inc(x_32); -lean_inc(x_31); -lean_dec(x_27); -x_33 = l_Lean_mkAppN(x_22, x_31); -x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_32); -return x_34; -} -} -else -{ -uint8_t x_35; -lean_dec(x_22); -x_35 = !lean_is_exclusive(x_27); -if (x_35 == 0) -{ -return x_27; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_27, 0); -x_37 = lean_ctor_get(x_27, 1); -lean_inc(x_37); -lean_inc(x_36); -lean_dec(x_27); -x_38 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_38, 0, x_36); -lean_ctor_set(x_38, 1, x_37); -return x_38; -} -} -} -else -{ -uint8_t x_39; -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_39 = !lean_is_exclusive(x_21); -if (x_39 == 0) -{ -return x_21; -} -else -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_21, 0); -x_41 = lean_ctor_get(x_21, 1); -lean_inc(x_41); -lean_inc(x_40); -lean_dec(x_21); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_40); -lean_ctor_set(x_42, 1, x_41); -return x_42; -} -} -} -else -{ -lean_object* x_43; lean_object* x_44; uint8_t x_45; -x_43 = lean_array_get_size(x_5); -x_44 = lean_unsigned_to_nat(1u); -x_45 = lean_nat_dec_eq(x_43, x_44); -if (x_45 == 0) -{ -lean_object* x_46; -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_3); -lean_inc(x_2); -lean_inc(x_1); -x_46 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_46) == 0) -{ -lean_object* x_47; lean_object* x_48; size_t x_49; size_t x_50; lean_object* x_51; -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 = lean_usize_of_nat(x_43); -lean_dec(x_43); -x_50 = 0; -x_51 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__4(x_1, x_2, x_3, x_49, x_50, x_5, x_7, x_8, x_9, x_10, x_11, x_12, x_48); -if (lean_obj_tag(x_51) == 0) -{ -uint8_t x_52; -x_52 = !lean_is_exclusive(x_51); -if (x_52 == 0) -{ -lean_object* x_53; lean_object* x_54; -x_53 = lean_ctor_get(x_51, 0); -x_54 = l_Lean_mkAppN(x_47, x_53); -lean_ctor_set(x_51, 0, x_54); -return x_51; -} -else -{ -lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_55 = lean_ctor_get(x_51, 0); -x_56 = lean_ctor_get(x_51, 1); -lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_51); -x_57 = l_Lean_mkAppN(x_47, x_55); -x_58 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_58, 0, x_57); -lean_ctor_set(x_58, 1, x_56); -return x_58; -} -} -else -{ -uint8_t x_59; -lean_dec(x_47); -x_59 = !lean_is_exclusive(x_51); -if (x_59 == 0) -{ -return x_51; -} -else -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_60 = lean_ctor_get(x_51, 0); -x_61 = lean_ctor_get(x_51, 1); -lean_inc(x_61); -lean_inc(x_60); -lean_dec(x_51); -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_43); -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_63 = !lean_is_exclusive(x_46); -if (x_63 == 0) -{ -return x_46; -} -else -{ -lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_64 = lean_ctor_get(x_46, 0); -x_65 = lean_ctor_get(x_46, 1); -lean_inc(x_65); -lean_inc(x_64); -lean_dec(x_46); -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 -{ -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -lean_dec(x_43); -lean_dec(x_4); -x_67 = l_Lean_instInhabitedExpr; -x_68 = lean_unsigned_to_nat(0u); -x_69 = lean_array_get(x_67, x_5, x_68); -lean_dec(x_5); -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_3); -lean_inc(x_2); -x_70 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_69, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_70) == 0) -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; -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 = l_Lean_mkApp(x_3, x_71); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_73); -x_74 = lean_infer_type(x_73, x_9, x_10, x_11, x_12, x_72); -if (lean_obj_tag(x_74) == 0) -{ -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_74, 0); -lean_inc(x_75); -x_76 = lean_ctor_get(x_74, 1); -lean_inc(x_76); -lean_dec(x_74); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -x_77 = lean_whnf(x_75, x_9, x_10, x_11, x_12, x_76); -if (lean_obj_tag(x_77) == 0) -{ -lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_78 = lean_ctor_get(x_77, 0); -lean_inc(x_78); -x_79 = lean_ctor_get(x_77, 1); -lean_inc(x_79); -lean_dec(x_77); -x_80 = l_Lean_Expr_bindingDomain_x21(x_78); -lean_dec(x_78); -x_81 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_mkDecreasingProof(x_80, x_2, x_7, x_8, x_9, x_10, x_11, x_12, x_79); -if (lean_obj_tag(x_81) == 0) -{ -uint8_t x_82; -x_82 = !lean_is_exclusive(x_81); -if (x_82 == 0) -{ -lean_object* x_83; lean_object* x_84; -x_83 = lean_ctor_get(x_81, 0); -x_84 = l_Lean_mkApp(x_73, x_83); -lean_ctor_set(x_81, 0, x_84); -return x_81; -} -else -{ -lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_85 = lean_ctor_get(x_81, 0); -x_86 = lean_ctor_get(x_81, 1); -lean_inc(x_86); -lean_inc(x_85); -lean_dec(x_81); -x_87 = l_Lean_mkApp(x_73, x_85); -x_88 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_88, 0, x_87); -lean_ctor_set(x_88, 1, x_86); -return x_88; -} -} -else -{ -uint8_t x_89; -lean_dec(x_73); -x_89 = !lean_is_exclusive(x_81); -if (x_89 == 0) -{ -return x_81; -} -else -{ -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_81, 0); -x_91 = lean_ctor_get(x_81, 1); -lean_inc(x_91); -lean_inc(x_90); -lean_dec(x_81); -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_73); -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_2); -x_93 = !lean_is_exclusive(x_77); -if (x_93 == 0) -{ -return x_77; -} -else -{ -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_77, 0); -x_95 = lean_ctor_get(x_77, 1); -lean_inc(x_95); -lean_inc(x_94); -lean_dec(x_77); -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; -} -} -} -else -{ -uint8_t x_97; -lean_dec(x_73); -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_2); -x_97 = !lean_is_exclusive(x_74); -if (x_97 == 0) -{ -return x_74; -} -else -{ -lean_object* x_98; lean_object* x_99; lean_object* x_100; -x_98 = lean_ctor_get(x_74, 0); -x_99 = lean_ctor_get(x_74, 1); -lean_inc(x_99); -lean_inc(x_98); -lean_dec(x_74); -x_100 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_100, 0, x_98); -lean_ctor_set(x_100, 1, x_99); -return x_100; -} -} -} -else -{ -uint8_t x_101; -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_3); -lean_dec(x_2); -x_101 = !lean_is_exclusive(x_70); -if (x_101 == 0) -{ -return x_70; -} -else -{ -lean_object* x_102; lean_object* x_103; lean_object* x_104; -x_102 = lean_ctor_get(x_70, 0); -x_103 = lean_ctor_get(x_70, 1); -lean_inc(x_103); -lean_inc(x_102); -lean_dec(x_70); -x_104 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_104, 0, x_102); -lean_ctor_set(x_104, 1, x_103); -return x_104; -} -} -} -} -} -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_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* x_12, lean_object* x_13) { -_start: -{ -uint8_t x_14; -x_14 = lean_usize_dec_lt(x_5, x_4); -if (x_14 == 0) -{ -lean_object* 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_3); -lean_dec(x_2); -lean_dec(x_1); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_6); -lean_ctor_set(x_15, 1, x_13); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_array_uget(x_6, x_5); -x_17 = lean_unsigned_to_nat(0u); -x_18 = lean_array_uset(x_6, x_5, 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_3); -lean_inc(x_2); -lean_inc(x_1); -x_19 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; -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 = 1; -x_23 = lean_usize_add(x_5, x_22); -x_24 = lean_array_uset(x_18, x_5, x_20); -x_5 = x_23; +lean_dec(x_20); +x_23 = 1; +x_24 = lean_usize_add(x_6, x_23); +x_25 = lean_array_uset(x_19, x_6, x_21); x_6 = x_24; -x_13 = x_21; +x_7 = x_25; +x_14 = x_22; goto _start; } else { -uint8_t x_26; -lean_dec(x_18); +uint8_t x_27; +lean_dec(x_19); +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_3); -lean_dec(x_2); -lean_dec(x_1); -x_26 = !lean_is_exclusive(x_19); -if (x_26 == 0) -{ -return x_19; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_19, 0); -x_28 = lean_ctor_get(x_19, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_19); -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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_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* x_12, lean_object* x_13) { -_start: -{ -uint8_t x_14; -x_14 = lean_usize_dec_lt(x_5, x_4); -if (x_14 == 0) -{ -lean_object* 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_3); -lean_dec(x_2); -lean_dec(x_1); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_6); -lean_ctor_set(x_15, 1, x_13); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_array_uget(x_6, x_5); -x_17 = lean_unsigned_to_nat(0u); -x_18 = lean_array_uset(x_6, x_5, 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_3); -lean_inc(x_2); -lean_inc(x_1); -x_19 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; -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 = 1; -x_23 = lean_usize_add(x_5, x_22); -x_24 = lean_array_uset(x_18, x_5, x_20); -x_5 = x_23; -x_6 = x_24; -x_13 = x_21; -goto _start; -} -else -{ -uint8_t x_26; -lean_dec(x_18); -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_26 = !lean_is_exclusive(x_19); -if (x_26 == 0) -{ -return x_19; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_19, 0); -x_28 = lean_ctor_get(x_19, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_19); -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_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__8(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_4) == 5) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_14 = lean_ctor_get(x_4, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_4, 1); -lean_inc(x_15); lean_dec(x_4); -x_16 = lean_array_set(x_5, x_6, x_15); -x_17 = lean_unsigned_to_nat(1u); -x_18 = lean_nat_sub(x_6, x_17); -lean_dec(x_6); -x_4 = x_14; -x_5 = x_16; -x_6 = x_18; -goto _start; +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_27 = !lean_is_exclusive(x_20); +if (x_27 == 0) +{ +return x_20; } else { -uint8_t x_20; -lean_dec(x_6); -x_20 = l_Lean_Expr_isConstOf(x_4, x_1); -if (x_20 == 0) +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_20, 0); +x_29 = lean_ctor_get(x_20, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_20); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t 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: { -lean_object* x_21; +uint8_t x_15; +x_15 = lean_usize_dec_lt(x_6, x_5); +if (x_15 == 0) +{ +lean_object* 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_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_7); +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; +x_17 = lean_array_uget(x_7, x_6); +x_18 = lean_unsigned_to_nat(0u); +x_19 = lean_array_uset(x_7, x_6, x_18); +lean_inc(x_13); 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_21 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_21) == 0) +x_20 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_17, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_20) == 0) { -lean_object* x_22; lean_object* x_23; lean_object* x_24; size_t x_25; size_t x_26; lean_object* x_27; -x_22 = lean_ctor_get(x_21, 0); +lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); -x_23 = lean_ctor_get(x_21, 1); -lean_inc(x_23); -lean_dec(x_21); -x_24 = lean_array_get_size(x_5); -x_25 = lean_usize_of_nat(x_24); -lean_dec(x_24); -x_26 = 0; -x_27 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6(x_1, x_2, x_3, x_25, x_26, x_5, x_7, x_8, x_9, x_10, x_11, x_12, x_23); -if (lean_obj_tag(x_27) == 0) -{ -uint8_t x_28; -x_28 = !lean_is_exclusive(x_27); -if (x_28 == 0) -{ -lean_object* x_29; lean_object* x_30; -x_29 = lean_ctor_get(x_27, 0); -x_30 = l_Lean_mkAppN(x_22, x_29); -lean_ctor_set(x_27, 0, x_30); -return x_27; +lean_dec(x_20); +x_23 = 1; +x_24 = lean_usize_add(x_6, x_23); +x_25 = lean_array_uset(x_19, x_6, x_21); +x_6 = x_24; +x_7 = x_25; +x_14 = x_22; +goto _start; } else { -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_31 = lean_ctor_get(x_27, 0); -x_32 = lean_ctor_get(x_27, 1); -lean_inc(x_32); -lean_inc(x_31); -lean_dec(x_27); -x_33 = l_Lean_mkAppN(x_22, x_31); -x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_32); -return x_34; -} -} -else -{ -uint8_t x_35; -lean_dec(x_22); -x_35 = !lean_is_exclusive(x_27); -if (x_35 == 0) -{ -return x_27; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_27, 0); -x_37 = lean_ctor_get(x_27, 1); -lean_inc(x_37); -lean_inc(x_36); -lean_dec(x_27); -x_38 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_38, 0, x_36); -lean_ctor_set(x_38, 1, x_37); -return x_38; -} -} -} -else -{ -uint8_t x_39; +uint8_t x_27; +lean_dec(x_19); +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_3); -lean_dec(x_2); -lean_dec(x_1); -x_39 = !lean_is_exclusive(x_21); -if (x_39 == 0) -{ -return x_21; -} -else -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_21, 0); -x_41 = lean_ctor_get(x_21, 1); -lean_inc(x_41); -lean_inc(x_40); -lean_dec(x_21); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_40); -lean_ctor_set(x_42, 1, x_41); -return x_42; -} -} -} -else -{ -lean_object* x_43; lean_object* x_44; uint8_t x_45; -x_43 = lean_array_get_size(x_5); -x_44 = lean_unsigned_to_nat(1u); -x_45 = lean_nat_dec_eq(x_43, x_44); -if (x_45 == 0) -{ -lean_object* x_46; -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_3); -lean_inc(x_2); -lean_inc(x_1); -x_46 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_46) == 0) -{ -lean_object* x_47; lean_object* x_48; size_t x_49; size_t x_50; lean_object* x_51; -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 = lean_usize_of_nat(x_43); -lean_dec(x_43); -x_50 = 0; -x_51 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7(x_1, x_2, x_3, x_49, x_50, x_5, x_7, x_8, x_9, x_10, x_11, x_12, x_48); -if (lean_obj_tag(x_51) == 0) -{ -uint8_t x_52; -x_52 = !lean_is_exclusive(x_51); -if (x_52 == 0) -{ -lean_object* x_53; lean_object* x_54; -x_53 = lean_ctor_get(x_51, 0); -x_54 = l_Lean_mkAppN(x_47, x_53); -lean_ctor_set(x_51, 0, x_54); -return x_51; -} -else -{ -lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_55 = lean_ctor_get(x_51, 0); -x_56 = lean_ctor_get(x_51, 1); -lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_51); -x_57 = l_Lean_mkAppN(x_47, x_55); -x_58 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_58, 0, x_57); -lean_ctor_set(x_58, 1, x_56); -return x_58; -} -} -else -{ -uint8_t x_59; -lean_dec(x_47); -x_59 = !lean_is_exclusive(x_51); -if (x_59 == 0) -{ -return x_51; -} -else -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_60 = lean_ctor_get(x_51, 0); -x_61 = lean_ctor_get(x_51, 1); -lean_inc(x_61); -lean_inc(x_60); -lean_dec(x_51); -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_43); -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_63 = !lean_is_exclusive(x_46); -if (x_63 == 0) -{ -return x_46; -} -else -{ -lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_64 = lean_ctor_get(x_46, 0); -x_65 = lean_ctor_get(x_46, 1); -lean_inc(x_65); -lean_inc(x_64); -lean_dec(x_46); -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 -{ -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -lean_dec(x_43); lean_dec(x_4); -x_67 = l_Lean_instInhabitedExpr; -x_68 = lean_unsigned_to_nat(0u); -x_69 = lean_array_get(x_67, x_5, x_68); -lean_dec(x_5); -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_3); -lean_inc(x_2); -x_70 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_69, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_70) == 0) -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; -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 = l_Lean_mkApp(x_3, x_71); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_73); -x_74 = lean_infer_type(x_73, x_9, x_10, x_11, x_12, x_72); -if (lean_obj_tag(x_74) == 0) -{ -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_74, 0); -lean_inc(x_75); -x_76 = lean_ctor_get(x_74, 1); -lean_inc(x_76); -lean_dec(x_74); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -x_77 = lean_whnf(x_75, x_9, x_10, x_11, x_12, x_76); -if (lean_obj_tag(x_77) == 0) -{ -lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_78 = lean_ctor_get(x_77, 0); -lean_inc(x_78); -x_79 = lean_ctor_get(x_77, 1); -lean_inc(x_79); -lean_dec(x_77); -x_80 = l_Lean_Expr_bindingDomain_x21(x_78); -lean_dec(x_78); -x_81 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_mkDecreasingProof(x_80, x_2, x_7, x_8, x_9, x_10, x_11, x_12, x_79); -if (lean_obj_tag(x_81) == 0) -{ -uint8_t x_82; -x_82 = !lean_is_exclusive(x_81); -if (x_82 == 0) -{ -lean_object* x_83; lean_object* x_84; -x_83 = lean_ctor_get(x_81, 0); -x_84 = l_Lean_mkApp(x_73, x_83); -lean_ctor_set(x_81, 0, x_84); -return x_81; -} -else -{ -lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_85 = lean_ctor_get(x_81, 0); -x_86 = lean_ctor_get(x_81, 1); -lean_inc(x_86); -lean_inc(x_85); -lean_dec(x_81); -x_87 = l_Lean_mkApp(x_73, x_85); -x_88 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_88, 0, x_87); -lean_ctor_set(x_88, 1, x_86); -return x_88; -} -} -else -{ -uint8_t x_89; -lean_dec(x_73); -x_89 = !lean_is_exclusive(x_81); -if (x_89 == 0) -{ -return x_81; -} -else -{ -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_81, 0); -x_91 = lean_ctor_get(x_81, 1); -lean_inc(x_91); -lean_inc(x_90); -lean_dec(x_81); -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_73); -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_2); -x_93 = !lean_is_exclusive(x_77); -if (x_93 == 0) -{ -return x_77; -} -else -{ -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_77, 0); -x_95 = lean_ctor_get(x_77, 1); -lean_inc(x_95); -lean_inc(x_94); -lean_dec(x_77); -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; -} -} -} -else -{ -uint8_t x_97; -lean_dec(x_73); -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_2); -x_97 = !lean_is_exclusive(x_74); -if (x_97 == 0) -{ -return x_74; -} -else -{ -lean_object* x_98; lean_object* x_99; lean_object* x_100; -x_98 = lean_ctor_get(x_74, 0); -x_99 = lean_ctor_get(x_74, 1); -lean_inc(x_99); -lean_inc(x_98); -lean_dec(x_74); -x_100 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_100, 0, x_98); -lean_ctor_set(x_100, 1, x_99); -return x_100; -} -} -} -else -{ -uint8_t x_101; -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_3); -lean_dec(x_2); -x_101 = !lean_is_exclusive(x_70); -if (x_101 == 0) -{ -return x_70; -} -else -{ -lean_object* x_102; lean_object* x_103; lean_object* x_104; -x_102 = lean_ctor_get(x_70, 0); -x_103 = lean_ctor_get(x_70, 1); -lean_inc(x_103); -lean_inc(x_102); -lean_dec(x_70); -x_104 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_104, 0, x_102); -lean_ctor_set(x_104, 1, x_103); -return x_104; -} -} -} -} -} -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_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* x_12, lean_object* x_13) { -_start: -{ -uint8_t x_14; -x_14 = lean_usize_dec_lt(x_5, x_4); -if (x_14 == 0) -{ -lean_object* 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_3); lean_dec(x_2); lean_dec(x_1); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_6); -lean_ctor_set(x_15, 1, x_13); -return x_15; +x_27 = !lean_is_exclusive(x_20); +if (x_27 == 0) +{ +return x_20; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_array_uget(x_6, x_5); -x_17 = lean_unsigned_to_nat(0u); -x_18 = lean_array_uset(x_6, x_5, 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_3); -lean_inc(x_2); -lean_inc(x_1); -x_19 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; -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 = 1; -x_23 = lean_usize_add(x_5, x_22); -x_24 = lean_array_uset(x_18, x_5, x_20); -x_5 = x_23; -x_6 = x_24; -x_13 = x_21; -goto _start; -} -else -{ -uint8_t x_26; -lean_dec(x_18); -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_26 = !lean_is_exclusive(x_19); -if (x_26 == 0) -{ -return x_19; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_19, 0); -x_28 = lean_ctor_get(x_19, 1); +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_20, 0); +x_29 = lean_ctor_get(x_20, 1); +lean_inc(x_29); lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_19); -x_29 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -return x_29; +lean_dec(x_20); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; } } } } } -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__10(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_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* x_12, lean_object* x_13) { +LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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) { _start: { -uint8_t x_14; -x_14 = lean_usize_dec_lt(x_5, x_4); -if (x_14 == 0) +if (lean_obj_tag(x_5) == 5) { -lean_object* 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_3); -lean_dec(x_2); -lean_dec(x_1); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_6); -lean_ctor_set(x_15, 1, x_13); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_array_uget(x_6, x_5); -x_17 = lean_unsigned_to_nat(0u); -x_18 = lean_array_uset(x_6, x_5, 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_3); -lean_inc(x_2); -lean_inc(x_1); -x_19 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; -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 = 1; -x_23 = lean_usize_add(x_5, x_22); -x_24 = lean_array_uset(x_18, x_5, x_20); -x_5 = x_23; -x_6 = x_24; -x_13 = x_21; -goto _start; -} -else -{ -uint8_t x_26; -lean_dec(x_18); -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_26 = !lean_is_exclusive(x_19); -if (x_26 == 0) -{ -return x_19; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_19, 0); -x_28 = lean_ctor_get(x_19, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_19); -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_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__11(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_4) == 5) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_14 = lean_ctor_get(x_4, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_4, 1); +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_15 = lean_ctor_get(x_5, 0); lean_inc(x_15); -lean_dec(x_4); -x_16 = lean_array_set(x_5, x_6, x_15); -x_17 = lean_unsigned_to_nat(1u); -x_18 = lean_nat_sub(x_6, x_17); -lean_dec(x_6); -x_4 = x_14; -x_5 = x_16; -x_6 = x_18; +x_16 = lean_ctor_get(x_5, 1); +lean_inc(x_16); +lean_dec(x_5); +x_17 = lean_array_set(x_6, x_7, x_16); +x_18 = lean_unsigned_to_nat(1u); +x_19 = lean_nat_sub(x_7, x_18); +lean_dec(x_7); +x_5 = x_15; +x_6 = x_17; +x_7 = x_19; goto _start; } else { -uint8_t x_20; -lean_dec(x_6); -x_20 = l_Lean_Expr_isConstOf(x_4, x_1); -if (x_20 == 0) +uint8_t x_21; +lean_dec(x_7); +x_21 = l_Lean_Expr_isConstOf(x_5, x_1); +if (x_21 == 0) { -lean_object* x_21; +lean_object* x_22; +lean_inc(x_13); 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_21 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_21) == 0) +x_22 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_22) == 0) { -lean_object* x_22; lean_object* x_23; lean_object* x_24; size_t x_25; size_t x_26; lean_object* x_27; -x_22 = lean_ctor_get(x_21, 0); -lean_inc(x_22); -x_23 = lean_ctor_get(x_21, 1); +lean_object* x_23; lean_object* x_24; lean_object* x_25; size_t x_26; size_t x_27; lean_object* x_28; +x_23 = lean_ctor_get(x_22, 0); lean_inc(x_23); -lean_dec(x_21); -x_24 = lean_array_get_size(x_5); -x_25 = lean_usize_of_nat(x_24); -lean_dec(x_24); -x_26 = 0; -x_27 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9(x_1, x_2, x_3, x_25, x_26, x_5, x_7, x_8, x_9, x_10, x_11, x_12, x_23); -if (lean_obj_tag(x_27) == 0) -{ -uint8_t x_28; -x_28 = !lean_is_exclusive(x_27); -if (x_28 == 0) -{ -lean_object* x_29; lean_object* x_30; -x_29 = lean_ctor_get(x_27, 0); -x_30 = l_Lean_mkAppN(x_22, x_29); -lean_ctor_set(x_27, 0, x_30); -return x_27; -} -else -{ -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_31 = lean_ctor_get(x_27, 0); -x_32 = lean_ctor_get(x_27, 1); -lean_inc(x_32); -lean_inc(x_31); -lean_dec(x_27); -x_33 = l_Lean_mkAppN(x_22, x_31); -x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_32); -return x_34; -} -} -else -{ -uint8_t x_35; +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); lean_dec(x_22); -x_35 = !lean_is_exclusive(x_27); -if (x_35 == 0) +x_25 = lean_array_get_size(x_6); +x_26 = lean_usize_of_nat(x_25); +lean_dec(x_25); +x_27 = 0; +x_28 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__3(x_1, x_2, x_3, x_4, x_26, x_27, x_6, x_8, x_9, x_10, x_11, x_12, x_13, x_24); +if (lean_obj_tag(x_28) == 0) { -return x_27; +uint8_t x_29; +x_29 = !lean_is_exclusive(x_28); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_28, 0); +x_31 = l_Lean_mkAppN(x_23, x_30); +lean_ctor_set(x_28, 0, x_31); +return x_28; } else { -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_27, 0); -x_37 = lean_ctor_get(x_27, 1); +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_32 = lean_ctor_get(x_28, 0); +x_33 = lean_ctor_get(x_28, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_28); +x_34 = l_Lean_mkAppN(x_23, x_32); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +return x_35; +} +} +else +{ +uint8_t x_36; +lean_dec(x_23); +x_36 = !lean_is_exclusive(x_28); +if (x_36 == 0) +{ +return x_28; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_28, 0); +x_38 = lean_ctor_get(x_28, 1); +lean_inc(x_38); lean_inc(x_37); -lean_inc(x_36); -lean_dec(x_27); -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_dec(x_28); +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_39; +uint8_t x_40; +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_6); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_39 = !lean_is_exclusive(x_21); -if (x_39 == 0) +x_40 = !lean_is_exclusive(x_22); +if (x_40 == 0) { -return x_21; +return x_22; } else { -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_21, 0); -x_41 = lean_ctor_get(x_21, 1); +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_22, 0); +x_42 = lean_ctor_get(x_22, 1); +lean_inc(x_42); lean_inc(x_41); -lean_inc(x_40); -lean_dec(x_21); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_40); -lean_ctor_set(x_42, 1, x_41); -return x_42; +lean_dec(x_22); +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_43; lean_object* x_44; uint8_t x_45; -x_43 = lean_array_get_size(x_5); -x_44 = lean_unsigned_to_nat(1u); -x_45 = lean_nat_dec_eq(x_43, x_44); -if (x_45 == 0) +lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; +x_44 = lean_array_get_size(x_6); +x_45 = lean_unsigned_to_nat(1u); +x_46 = lean_nat_add(x_2, x_45); +x_47 = lean_nat_dec_eq(x_44, x_46); +lean_dec(x_46); +if (x_47 == 0) { -lean_object* x_46; +lean_object* x_48; +lean_inc(x_13); 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_46 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_46) == 0) +x_48 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_48) == 0) { -lean_object* x_47; lean_object* x_48; size_t x_49; size_t x_50; lean_object* x_51; -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 = lean_usize_of_nat(x_43); -lean_dec(x_43); -x_50 = 0; -x_51 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__10(x_1, x_2, x_3, x_49, x_50, x_5, x_7, x_8, x_9, x_10, x_11, x_12, x_48); -if (lean_obj_tag(x_51) == 0) +lean_object* x_49; lean_object* x_50; size_t x_51; size_t x_52; lean_object* x_53; +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_usize_of_nat(x_44); +lean_dec(x_44); +x_52 = 0; +x_53 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__4(x_1, x_2, x_3, x_4, x_51, x_52, x_6, x_8, x_9, x_10, x_11, x_12, x_13, x_50); +if (lean_obj_tag(x_53) == 0) { -uint8_t x_52; -x_52 = !lean_is_exclusive(x_51); -if (x_52 == 0) +uint8_t x_54; +x_54 = !lean_is_exclusive(x_53); +if (x_54 == 0) { -lean_object* x_53; lean_object* x_54; -x_53 = lean_ctor_get(x_51, 0); -x_54 = l_Lean_mkAppN(x_47, x_53); -lean_ctor_set(x_51, 0, x_54); -return x_51; +lean_object* x_55; lean_object* x_56; +x_55 = lean_ctor_get(x_53, 0); +x_56 = l_Lean_mkAppN(x_49, x_55); +lean_ctor_set(x_53, 0, x_56); +return x_53; } else { -lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_55 = lean_ctor_get(x_51, 0); -x_56 = lean_ctor_get(x_51, 1); -lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_51); -x_57 = l_Lean_mkAppN(x_47, x_55); -x_58 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_58, 0, x_57); -lean_ctor_set(x_58, 1, x_56); -return x_58; +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_57 = lean_ctor_get(x_53, 0); +x_58 = lean_ctor_get(x_53, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_53); +x_59 = l_Lean_mkAppN(x_49, x_57); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_58); +return x_60; } } else { -uint8_t x_59; -lean_dec(x_47); -x_59 = !lean_is_exclusive(x_51); -if (x_59 == 0) +uint8_t x_61; +lean_dec(x_49); +x_61 = !lean_is_exclusive(x_53); +if (x_61 == 0) { -return x_51; +return x_53; } else { -lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_60 = lean_ctor_get(x_51, 0); -x_61 = lean_ctor_get(x_51, 1); -lean_inc(x_61); -lean_inc(x_60); -lean_dec(x_51); -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; +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_53, 0); +x_63 = lean_ctor_get(x_53, 1); +lean_inc(x_63); +lean_inc(x_62); +lean_dec(x_53); +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_63; -lean_dec(x_43); +uint8_t x_65; +lean_dec(x_44); +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_6); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_63 = !lean_is_exclusive(x_46); -if (x_63 == 0) +x_65 = !lean_is_exclusive(x_48); +if (x_65 == 0) { -return x_46; +return x_48; } else { -lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_64 = lean_ctor_get(x_46, 0); -x_65 = lean_ctor_get(x_46, 1); -lean_inc(x_65); -lean_inc(x_64); -lean_dec(x_46); -x_66 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_66, 0, x_64); -lean_ctor_set(x_66, 1, x_65); -return x_66; +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_48, 0); +x_67 = lean_ctor_get(x_48, 1); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_48); +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_66); +lean_ctor_set(x_68, 1, x_67); +return x_68; } } } else { -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -lean_dec(x_43); -lean_dec(x_4); -x_67 = l_Lean_instInhabitedExpr; -x_68 = lean_unsigned_to_nat(0u); -x_69 = lean_array_get(x_67, x_5, x_68); +lean_object* x_69; lean_object* x_70; lean_object* x_71; +lean_dec(x_44); lean_dec(x_5); +x_69 = l_Lean_instInhabitedExpr; +x_70 = l_Array_back___rarg(x_69, x_6); +lean_dec(x_6); +lean_inc(x_13); 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); -x_70 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_69, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_70) == 0) +x_71 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_70, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_71) == 0) { -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_71 = lean_ctor_get(x_70, 0); -lean_inc(x_71); -x_72 = lean_ctor_get(x_70, 1); +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_72 = lean_ctor_get(x_71, 0); lean_inc(x_72); -lean_dec(x_70); -x_73 = l_Lean_mkApp(x_3, x_71); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); +x_73 = lean_ctor_get(x_71, 1); lean_inc(x_73); -x_74 = lean_infer_type(x_73, x_9, x_10, x_11, x_12, x_72); -if (lean_obj_tag(x_74) == 0) -{ -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_74, 0); -lean_inc(x_75); -x_76 = lean_ctor_get(x_74, 1); -lean_inc(x_76); -lean_dec(x_74); +lean_dec(x_71); +x_74 = l_Lean_mkApp(x_4, x_72); +lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); -lean_inc(x_9); -x_77 = lean_whnf(x_75, x_9, x_10, x_11, x_12, x_76); -if (lean_obj_tag(x_77) == 0) +lean_inc(x_74); +x_75 = lean_infer_type(x_74, x_10, x_11, x_12, x_13, x_73); +if (lean_obj_tag(x_75) == 0) { -lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_78 = lean_ctor_get(x_77, 0); -lean_inc(x_78); -x_79 = lean_ctor_get(x_77, 1); +lean_object* x_76; lean_object* x_77; lean_object* x_78; +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); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +x_78 = lean_whnf(x_76, x_10, x_11, x_12, x_13, x_77); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_79 = lean_ctor_get(x_78, 0); lean_inc(x_79); -lean_dec(x_77); -x_80 = l_Lean_Expr_bindingDomain_x21(x_78); +x_80 = lean_ctor_get(x_78, 1); +lean_inc(x_80); lean_dec(x_78); -x_81 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_mkDecreasingProof(x_80, x_2, x_7, x_8, x_9, x_10, x_11, x_12, x_79); -if (lean_obj_tag(x_81) == 0) +x_81 = l_Lean_Expr_bindingDomain_x21(x_79); +lean_dec(x_79); +x_82 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_mkDecreasingProof(x_81, x_3, x_8, x_9, x_10, x_11, x_12, x_13, x_80); +if (lean_obj_tag(x_82) == 0) { -uint8_t x_82; -x_82 = !lean_is_exclusive(x_81); -if (x_82 == 0) +uint8_t x_83; +x_83 = !lean_is_exclusive(x_82); +if (x_83 == 0) { -lean_object* x_83; lean_object* x_84; -x_83 = lean_ctor_get(x_81, 0); -x_84 = l_Lean_mkApp(x_73, x_83); -lean_ctor_set(x_81, 0, x_84); -return x_81; +lean_object* x_84; lean_object* x_85; +x_84 = lean_ctor_get(x_82, 0); +x_85 = l_Lean_mkApp(x_74, x_84); +lean_ctor_set(x_82, 0, x_85); +return x_82; } else { -lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_85 = lean_ctor_get(x_81, 0); -x_86 = lean_ctor_get(x_81, 1); +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_86 = lean_ctor_get(x_82, 0); +x_87 = lean_ctor_get(x_82, 1); +lean_inc(x_87); lean_inc(x_86); -lean_inc(x_85); -lean_dec(x_81); -x_87 = l_Lean_mkApp(x_73, x_85); -x_88 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_88, 0, x_87); -lean_ctor_set(x_88, 1, x_86); -return x_88; +lean_dec(x_82); +x_88 = l_Lean_mkApp(x_74, x_86); +x_89 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_89, 0, x_88); +lean_ctor_set(x_89, 1, x_87); +return x_89; } } else { -uint8_t x_89; -lean_dec(x_73); -x_89 = !lean_is_exclusive(x_81); -if (x_89 == 0) -{ -return x_81; -} -else -{ -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_81, 0); -x_91 = lean_ctor_get(x_81, 1); -lean_inc(x_91); -lean_inc(x_90); -lean_dec(x_81); -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_73); -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_2); -x_93 = !lean_is_exclusive(x_77); -if (x_93 == 0) -{ -return x_77; -} -else -{ -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_77, 0); -x_95 = lean_ctor_get(x_77, 1); -lean_inc(x_95); -lean_inc(x_94); -lean_dec(x_77); -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; -} -} -} -else -{ -uint8_t x_97; -lean_dec(x_73); -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_2); -x_97 = !lean_is_exclusive(x_74); -if (x_97 == 0) -{ -return x_74; -} -else -{ -lean_object* x_98; lean_object* x_99; lean_object* x_100; -x_98 = lean_ctor_get(x_74, 0); -x_99 = lean_ctor_get(x_74, 1); -lean_inc(x_99); -lean_inc(x_98); +uint8_t x_90; lean_dec(x_74); -x_100 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_100, 0, x_98); -lean_ctor_set(x_100, 1, x_99); -return x_100; +x_90 = !lean_is_exclusive(x_82); +if (x_90 == 0) +{ +return x_82; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_82, 0); +x_92 = lean_ctor_get(x_82, 1); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_82); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; } } } else { -uint8_t x_101; +uint8_t x_94; +lean_dec(x_74); +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_3); +x_94 = !lean_is_exclusive(x_78); +if (x_94 == 0) +{ +return x_78; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_95 = lean_ctor_get(x_78, 0); +x_96 = lean_ctor_get(x_78, 1); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_78); +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_74); +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_3); +x_98 = !lean_is_exclusive(x_75); +if (x_98 == 0) +{ +return x_75; +} +else +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_99 = lean_ctor_get(x_75, 0); +x_100 = lean_ctor_get(x_75, 1); +lean_inc(x_100); +lean_inc(x_99); +lean_dec(x_75); +x_101 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_101, 0, x_99); +lean_ctor_set(x_101, 1, x_100); +return x_101; +} +} +} +else +{ +uint8_t x_102; +lean_dec(x_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_3); +x_102 = !lean_is_exclusive(x_71); +if (x_102 == 0) +{ +return x_71; +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_103 = lean_ctor_get(x_71, 0); +x_104 = lean_ctor_get(x_71, 1); +lean_inc(x_104); +lean_inc(x_103); +lean_dec(x_71); +x_105 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_105, 0, x_103); +lean_ctor_set(x_105, 1, x_104); +return x_105; +} +} +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t 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; +x_15 = lean_usize_dec_lt(x_6, x_5); +if (x_15 == 0) +{ +lean_object* 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_4); lean_dec(x_3); lean_dec(x_2); -x_101 = !lean_is_exclusive(x_70); -if (x_101 == 0) -{ -return x_70; +lean_dec(x_1); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_7); +lean_ctor_set(x_16, 1, x_14); +return x_16; } else { -lean_object* x_102; lean_object* x_103; lean_object* x_104; -x_102 = lean_ctor_get(x_70, 0); -x_103 = lean_ctor_get(x_70, 1); +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_array_uget(x_7, x_6); +x_18 = lean_unsigned_to_nat(0u); +x_19 = lean_array_uset(x_7, x_6, x_18); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_20 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_17, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; +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 = 1; +x_24 = lean_usize_add(x_6, x_23); +x_25 = lean_array_uset(x_19, x_6, x_21); +x_6 = x_24; +x_7 = x_25; +x_14 = x_22; +goto _start; +} +else +{ +uint8_t x_27; +lean_dec(x_19); +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_3); +lean_dec(x_2); +lean_dec(x_1); +x_27 = !lean_is_exclusive(x_20); +if (x_27 == 0) +{ +return x_20; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_20, 0); +x_29 = lean_ctor_get(x_20, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_20); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t 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; +x_15 = lean_usize_dec_lt(x_6, x_5); +if (x_15 == 0) +{ +lean_object* 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_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_7); +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; +x_17 = lean_array_uget(x_7, x_6); +x_18 = lean_unsigned_to_nat(0u); +x_19 = lean_array_uset(x_7, x_6, x_18); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_20 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_17, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; +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 = 1; +x_24 = lean_usize_add(x_6, x_23); +x_25 = lean_array_uset(x_19, x_6, x_21); +x_6 = x_24; +x_7 = x_25; +x_14 = x_22; +goto _start; +} +else +{ +uint8_t x_27; +lean_dec(x_19); +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_3); +lean_dec(x_2); +lean_dec(x_1); +x_27 = !lean_is_exclusive(x_20); +if (x_27 == 0) +{ +return x_20; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_20, 0); +x_29 = lean_ctor_get(x_20, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_20); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__8(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_5) == 5) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_15 = lean_ctor_get(x_5, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_5, 1); +lean_inc(x_16); +lean_dec(x_5); +x_17 = lean_array_set(x_6, x_7, x_16); +x_18 = lean_unsigned_to_nat(1u); +x_19 = lean_nat_sub(x_7, x_18); +lean_dec(x_7); +x_5 = x_15; +x_6 = x_17; +x_7 = x_19; +goto _start; +} +else +{ +uint8_t x_21; +lean_dec(x_7); +x_21 = l_Lean_Expr_isConstOf(x_5, x_1); +if (x_21 == 0) +{ +lean_object* x_22; +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_22 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; size_t x_26; size_t x_27; lean_object* x_28; +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_array_get_size(x_6); +x_26 = lean_usize_of_nat(x_25); +lean_dec(x_25); +x_27 = 0; +x_28 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6(x_1, x_2, x_3, x_4, x_26, x_27, x_6, x_8, x_9, x_10, x_11, x_12, x_13, x_24); +if (lean_obj_tag(x_28) == 0) +{ +uint8_t x_29; +x_29 = !lean_is_exclusive(x_28); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_28, 0); +x_31 = l_Lean_mkAppN(x_23, x_30); +lean_ctor_set(x_28, 0, x_31); +return x_28; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_32 = lean_ctor_get(x_28, 0); +x_33 = lean_ctor_get(x_28, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_28); +x_34 = l_Lean_mkAppN(x_23, x_32); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +return x_35; +} +} +else +{ +uint8_t x_36; +lean_dec(x_23); +x_36 = !lean_is_exclusive(x_28); +if (x_36 == 0) +{ +return x_28; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_28, 0); +x_38 = lean_ctor_get(x_28, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_28); +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_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_40 = !lean_is_exclusive(x_22); +if (x_40 == 0) +{ +return x_22; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_22, 0); +x_42 = lean_ctor_get(x_22, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_22); +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; uint8_t x_47; +x_44 = lean_array_get_size(x_6); +x_45 = lean_unsigned_to_nat(1u); +x_46 = lean_nat_add(x_2, x_45); +x_47 = lean_nat_dec_eq(x_44, x_46); +lean_dec(x_46); +if (x_47 == 0) +{ +lean_object* x_48; +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_48 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_48) == 0) +{ +lean_object* x_49; lean_object* x_50; size_t x_51; size_t x_52; lean_object* x_53; +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_usize_of_nat(x_44); +lean_dec(x_44); +x_52 = 0; +x_53 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7(x_1, x_2, x_3, x_4, x_51, x_52, x_6, x_8, x_9, x_10, x_11, x_12, x_13, x_50); +if (lean_obj_tag(x_53) == 0) +{ +uint8_t x_54; +x_54 = !lean_is_exclusive(x_53); +if (x_54 == 0) +{ +lean_object* x_55; lean_object* x_56; +x_55 = lean_ctor_get(x_53, 0); +x_56 = l_Lean_mkAppN(x_49, x_55); +lean_ctor_set(x_53, 0, x_56); +return x_53; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_57 = lean_ctor_get(x_53, 0); +x_58 = lean_ctor_get(x_53, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_53); +x_59 = l_Lean_mkAppN(x_49, x_57); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_58); +return x_60; +} +} +else +{ +uint8_t x_61; +lean_dec(x_49); +x_61 = !lean_is_exclusive(x_53); +if (x_61 == 0) +{ +return x_53; +} +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_53, 0); +x_63 = lean_ctor_get(x_53, 1); +lean_inc(x_63); +lean_inc(x_62); +lean_dec(x_53); +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_44); +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_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_65 = !lean_is_exclusive(x_48); +if (x_65 == 0) +{ +return x_48; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_48, 0); +x_67 = lean_ctor_get(x_48, 1); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_48); +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_66); +lean_ctor_set(x_68, 1, x_67); +return x_68; +} +} +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; +lean_dec(x_44); +lean_dec(x_5); +x_69 = l_Lean_instInhabitedExpr; +x_70 = l_Array_back___rarg(x_69, x_6); +lean_dec(x_6); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +x_71 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_70, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_71) == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +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_mkApp(x_4, x_72); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_74); +x_75 = lean_infer_type(x_74, x_10, x_11, x_12, x_13, x_73); +if (lean_obj_tag(x_75) == 0) +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; +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); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +x_78 = lean_whnf(x_76, x_10, x_11, x_12, x_13, x_77); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +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_Expr_bindingDomain_x21(x_79); +lean_dec(x_79); +x_82 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_mkDecreasingProof(x_81, x_3, x_8, x_9, x_10, x_11, x_12, x_13, x_80); +if (lean_obj_tag(x_82) == 0) +{ +uint8_t x_83; +x_83 = !lean_is_exclusive(x_82); +if (x_83 == 0) +{ +lean_object* x_84; lean_object* x_85; +x_84 = lean_ctor_get(x_82, 0); +x_85 = l_Lean_mkApp(x_74, x_84); +lean_ctor_set(x_82, 0, x_85); +return x_82; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_86 = lean_ctor_get(x_82, 0); +x_87 = lean_ctor_get(x_82, 1); +lean_inc(x_87); +lean_inc(x_86); +lean_dec(x_82); +x_88 = l_Lean_mkApp(x_74, x_86); +x_89 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_89, 0, x_88); +lean_ctor_set(x_89, 1, x_87); +return x_89; +} +} +else +{ +uint8_t x_90; +lean_dec(x_74); +x_90 = !lean_is_exclusive(x_82); +if (x_90 == 0) +{ +return x_82; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_82, 0); +x_92 = lean_ctor_get(x_82, 1); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_82); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; +} +} +} +else +{ +uint8_t x_94; +lean_dec(x_74); +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_3); +x_94 = !lean_is_exclusive(x_78); +if (x_94 == 0) +{ +return x_78; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_95 = lean_ctor_get(x_78, 0); +x_96 = lean_ctor_get(x_78, 1); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_78); +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_74); +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_3); +x_98 = !lean_is_exclusive(x_75); +if (x_98 == 0) +{ +return x_75; +} +else +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_99 = lean_ctor_get(x_75, 0); +x_100 = lean_ctor_get(x_75, 1); +lean_inc(x_100); +lean_inc(x_99); +lean_dec(x_75); +x_101 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_101, 0, x_99); +lean_ctor_set(x_101, 1, x_100); +return x_101; +} +} +} +else +{ +uint8_t x_102; +lean_dec(x_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_3); +x_102 = !lean_is_exclusive(x_71); +if (x_102 == 0) +{ +return x_71; +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_103 = lean_ctor_get(x_71, 0); +x_104 = lean_ctor_get(x_71, 1); +lean_inc(x_104); lean_inc(x_103); -lean_inc(x_102); -lean_dec(x_70); -x_104 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_104, 0, x_102); -lean_ctor_set(x_104, 1, x_103); -return x_104; +lean_dec(x_71); +x_105 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_105, 0, x_103); +lean_ctor_set(x_105, 1, x_104); +return x_105; +} +} +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t 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; +x_15 = lean_usize_dec_lt(x_6, x_5); +if (x_15 == 0) +{ +lean_object* 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_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_7); +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; +x_17 = lean_array_uget(x_7, x_6); +x_18 = lean_unsigned_to_nat(0u); +x_19 = lean_array_uset(x_7, x_6, x_18); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_20 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_17, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; +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 = 1; +x_24 = lean_usize_add(x_6, x_23); +x_25 = lean_array_uset(x_19, x_6, x_21); +x_6 = x_24; +x_7 = x_25; +x_14 = x_22; +goto _start; +} +else +{ +uint8_t x_27; +lean_dec(x_19); +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_3); +lean_dec(x_2); +lean_dec(x_1); +x_27 = !lean_is_exclusive(x_20); +if (x_27 == 0) +{ +return x_20; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_20, 0); +x_29 = lean_ctor_get(x_20, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_20); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__10(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t 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; +x_15 = lean_usize_dec_lt(x_6, x_5); +if (x_15 == 0) +{ +lean_object* 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_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_7); +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; +x_17 = lean_array_uget(x_7, x_6); +x_18 = lean_unsigned_to_nat(0u); +x_19 = lean_array_uset(x_7, x_6, x_18); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_20 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_17, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; +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 = 1; +x_24 = lean_usize_add(x_6, x_23); +x_25 = lean_array_uset(x_19, x_6, x_21); +x_6 = x_24; +x_7 = x_25; +x_14 = x_22; +goto _start; +} +else +{ +uint8_t x_27; +lean_dec(x_19); +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_3); +lean_dec(x_2); +lean_dec(x_1); +x_27 = !lean_is_exclusive(x_20); +if (x_27 == 0) +{ +return x_20; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_20, 0); +x_29 = lean_ctor_get(x_20, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_20); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__11(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_5) == 5) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_15 = lean_ctor_get(x_5, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_5, 1); +lean_inc(x_16); +lean_dec(x_5); +x_17 = lean_array_set(x_6, x_7, x_16); +x_18 = lean_unsigned_to_nat(1u); +x_19 = lean_nat_sub(x_7, x_18); +lean_dec(x_7); +x_5 = x_15; +x_6 = x_17; +x_7 = x_19; +goto _start; +} +else +{ +uint8_t x_21; +lean_dec(x_7); +x_21 = l_Lean_Expr_isConstOf(x_5, x_1); +if (x_21 == 0) +{ +lean_object* x_22; +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_22 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; size_t x_26; size_t x_27; lean_object* x_28; +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_array_get_size(x_6); +x_26 = lean_usize_of_nat(x_25); +lean_dec(x_25); +x_27 = 0; +x_28 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9(x_1, x_2, x_3, x_4, x_26, x_27, x_6, x_8, x_9, x_10, x_11, x_12, x_13, x_24); +if (lean_obj_tag(x_28) == 0) +{ +uint8_t x_29; +x_29 = !lean_is_exclusive(x_28); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_28, 0); +x_31 = l_Lean_mkAppN(x_23, x_30); +lean_ctor_set(x_28, 0, x_31); +return x_28; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_32 = lean_ctor_get(x_28, 0); +x_33 = lean_ctor_get(x_28, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_28); +x_34 = l_Lean_mkAppN(x_23, x_32); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +return x_35; +} +} +else +{ +uint8_t x_36; +lean_dec(x_23); +x_36 = !lean_is_exclusive(x_28); +if (x_36 == 0) +{ +return x_28; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_28, 0); +x_38 = lean_ctor_get(x_28, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_28); +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_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_40 = !lean_is_exclusive(x_22); +if (x_40 == 0) +{ +return x_22; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_22, 0); +x_42 = lean_ctor_get(x_22, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_22); +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; uint8_t x_47; +x_44 = lean_array_get_size(x_6); +x_45 = lean_unsigned_to_nat(1u); +x_46 = lean_nat_add(x_2, x_45); +x_47 = lean_nat_dec_eq(x_44, x_46); +lean_dec(x_46); +if (x_47 == 0) +{ +lean_object* x_48; +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_48 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_5, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_48) == 0) +{ +lean_object* x_49; lean_object* x_50; size_t x_51; size_t x_52; lean_object* x_53; +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_usize_of_nat(x_44); +lean_dec(x_44); +x_52 = 0; +x_53 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__10(x_1, x_2, x_3, x_4, x_51, x_52, x_6, x_8, x_9, x_10, x_11, x_12, x_13, x_50); +if (lean_obj_tag(x_53) == 0) +{ +uint8_t x_54; +x_54 = !lean_is_exclusive(x_53); +if (x_54 == 0) +{ +lean_object* x_55; lean_object* x_56; +x_55 = lean_ctor_get(x_53, 0); +x_56 = l_Lean_mkAppN(x_49, x_55); +lean_ctor_set(x_53, 0, x_56); +return x_53; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_57 = lean_ctor_get(x_53, 0); +x_58 = lean_ctor_get(x_53, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_53); +x_59 = l_Lean_mkAppN(x_49, x_57); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_58); +return x_60; +} +} +else +{ +uint8_t x_61; +lean_dec(x_49); +x_61 = !lean_is_exclusive(x_53); +if (x_61 == 0) +{ +return x_53; +} +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_53, 0); +x_63 = lean_ctor_get(x_53, 1); +lean_inc(x_63); +lean_inc(x_62); +lean_dec(x_53); +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_44); +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_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_65 = !lean_is_exclusive(x_48); +if (x_65 == 0) +{ +return x_48; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_48, 0); +x_67 = lean_ctor_get(x_48, 1); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_48); +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_66); +lean_ctor_set(x_68, 1, x_67); +return x_68; +} +} +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; +lean_dec(x_44); +lean_dec(x_5); +x_69 = l_Lean_instInhabitedExpr; +x_70 = l_Array_back___rarg(x_69, x_6); +lean_dec(x_6); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +x_71 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_70, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_71) == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +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_mkApp(x_4, x_72); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_74); +x_75 = lean_infer_type(x_74, x_10, x_11, x_12, x_13, x_73); +if (lean_obj_tag(x_75) == 0) +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; +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); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +x_78 = lean_whnf(x_76, x_10, x_11, x_12, x_13, x_77); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +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_Expr_bindingDomain_x21(x_79); +lean_dec(x_79); +x_82 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_mkDecreasingProof(x_81, x_3, x_8, x_9, x_10, x_11, x_12, x_13, x_80); +if (lean_obj_tag(x_82) == 0) +{ +uint8_t x_83; +x_83 = !lean_is_exclusive(x_82); +if (x_83 == 0) +{ +lean_object* x_84; lean_object* x_85; +x_84 = lean_ctor_get(x_82, 0); +x_85 = l_Lean_mkApp(x_74, x_84); +lean_ctor_set(x_82, 0, x_85); +return x_82; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_86 = lean_ctor_get(x_82, 0); +x_87 = lean_ctor_get(x_82, 1); +lean_inc(x_87); +lean_inc(x_86); +lean_dec(x_82); +x_88 = l_Lean_mkApp(x_74, x_86); +x_89 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_89, 0, x_88); +lean_ctor_set(x_89, 1, x_87); +return x_89; +} +} +else +{ +uint8_t x_90; +lean_dec(x_74); +x_90 = !lean_is_exclusive(x_82); +if (x_90 == 0) +{ +return x_82; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_82, 0); +x_92 = lean_ctor_get(x_82, 1); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_82); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; +} +} +} +else +{ +uint8_t x_94; +lean_dec(x_74); +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_3); +x_94 = !lean_is_exclusive(x_78); +if (x_94 == 0) +{ +return x_78; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_95 = lean_ctor_get(x_78, 0); +x_96 = lean_ctor_get(x_78, 1); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_78); +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_74); +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_3); +x_98 = !lean_is_exclusive(x_75); +if (x_98 == 0) +{ +return x_75; +} +else +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_99 = lean_ctor_get(x_75, 0); +x_100 = lean_ctor_get(x_75, 1); +lean_inc(x_100); +lean_inc(x_99); +lean_dec(x_75); +x_101 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_101, 0, x_99); +lean_ctor_set(x_101, 1, x_100); +return x_101; +} +} +} +else +{ +uint8_t x_102; +lean_dec(x_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_3); +x_102 = !lean_is_exclusive(x_71); +if (x_102 == 0) +{ +return x_71; +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_103 = lean_ctor_get(x_71, 0); +x_104 = lean_ctor_get(x_71, 1); +lean_inc(x_104); +lean_inc(x_103); +lean_dec(x_71); +x_105 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_105, 0, x_103); +lean_ctor_set(x_105, 1, x_104); +return x_105; } } } @@ -3079,61 +3125,61 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaTelescope___at___private_Lean return x_2; } } -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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) { _start: { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_14 = lean_unsigned_to_nat(1u); -x_15 = lean_nat_sub(x_1, x_14); -x_16 = l_Lean_instInhabitedExpr; -x_17 = lean_array_get(x_16, x_2, x_15); -lean_dec(x_15); +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_sub(x_1, x_15); +x_17 = l_Lean_instInhabitedExpr; +x_18 = lean_array_get(x_17, x_2, x_16); +lean_dec(x_16); +lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); -lean_inc(x_9); -x_18 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_3, x_4, x_17, x_5, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_18) == 0) +x_19 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_3, x_4, x_5, x_18, x_6, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_19) == 0) { -lean_object* x_19; lean_object* x_20; uint8_t x_21; uint8_t x_22; lean_object* x_23; -x_19 = lean_ctor_get(x_18, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_18, 1); +lean_object* x_20; lean_object* x_21; uint8_t x_22; uint8_t x_23; lean_object* x_24; +x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); -lean_dec(x_18); -x_21 = 0; -x_22 = 1; -x_23 = l_Lean_Meta_mkLambdaFVars(x_2, x_19, x_21, x_22, x_9, x_10, x_11, x_12, x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = 0; +x_23 = 1; +x_24 = l_Lean_Meta_mkLambdaFVars(x_2, x_20, x_22, x_23, x_10, x_11, x_12, x_13, x_21); +lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); -lean_dec(x_10); -return x_23; +return x_24; } else { -uint8_t x_24; +uint8_t x_25; +lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); -lean_dec(x_9); lean_dec(x_2); -x_24 = !lean_is_exclusive(x_18); -if (x_24 == 0) +x_25 = !lean_is_exclusive(x_19); +if (x_25 == 0) { -return x_18; +return x_19; } else { -lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_25 = lean_ctor_get(x_18, 0); -x_26 = lean_ctor_get(x_18, 1); +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_19, 0); +x_27 = lean_ctor_get(x_19, 1); +lean_inc(x_27); lean_inc(x_26); -lean_inc(x_25); -lean_dec(x_18); -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_dec(x_19); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; } } } @@ -3189,260 +3235,268 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__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, 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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__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, 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_15; uint8_t x_16; -x_15 = lean_array_get_size(x_6); -x_16 = lean_nat_dec_le(x_1, x_15); -lean_dec(x_15); -if (x_16 == 0) +lean_object* x_16; uint8_t x_17; +x_16 = lean_array_get_size(x_7); +x_17 = lean_nat_dec_le(x_1, x_16); +lean_dec(x_16); +if (x_17 == 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; uint8_t x_27; +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; +lean_dec(x_8); lean_dec(x_7); -lean_dec(x_6); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_17 = l_Lean_indentExpr(x_4); -x_18 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__2; -x_19 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_19, 0, x_18); -lean_ctor_set(x_19, 1, x_17); -x_20 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__4; -x_21 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -x_22 = l_Lean_indentExpr(x_5); -x_23 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_23, 0, x_21); -lean_ctor_set(x_23, 1, x_22); -x_24 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__6; -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_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(x_25, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +x_18 = l_Lean_indentExpr(x_5); +x_19 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__2; +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_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__4; +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_6); +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_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__6; +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_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(x_26, 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); +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +return x_27; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_27, 0); +x_30 = lean_ctor_get(x_27, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_27); +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; +} +} +else +{ +lean_object* x_32; lean_object* x_33; +lean_dec(x_6); +lean_dec(x_5); +x_32 = lean_box(0); +x_33 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__1(x_1, x_7, x_2, x_3, x_4, x_8, x_32, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +return x_33; +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t 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; +x_15 = lean_usize_dec_lt(x_6, x_5); +if (x_15 == 0) +{ +lean_object* x_16; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); -x_27 = !lean_is_exclusive(x_26); +lean_dec(x_8); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_7); +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; +x_17 = lean_array_uget(x_7, x_6); +x_18 = lean_unsigned_to_nat(0u); +x_19 = lean_array_uset(x_7, x_6, x_18); +x_20 = lean_ctor_get(x_17, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_17, 1); +lean_inc(x_21); +lean_dec(x_17); +lean_inc(x_4); +lean_inc(x_20); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_22 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___boxed), 15, 6); +lean_closure_set(x_22, 0, x_21); +lean_closure_set(x_22, 1, x_1); +lean_closure_set(x_22, 2, x_2); +lean_closure_set(x_22, 3, x_3); +lean_closure_set(x_22, 4, x_20); +lean_closure_set(x_22, 5, x_4); +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_23 = l_Lean_Meta_lambdaTelescope___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__12___rarg(x_20, x_22, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; size_t x_26; size_t x_27; lean_object* x_28; +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 = 1; +x_27 = lean_usize_add(x_6, x_26); +x_28 = lean_array_uset(x_19, x_6, x_24); +x_6 = x_27; +x_7 = x_28; +x_14 = x_25; +goto _start; +} +else +{ +uint8_t x_30; +lean_dec(x_19); +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_3); +lean_dec(x_2); +lean_dec(x_1); +x_30 = !lean_is_exclusive(x_23); +if (x_30 == 0) +{ +return x_23; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_23, 0); +x_32 = lean_ctor_get(x_23, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_23); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__14(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t 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; +x_15 = lean_usize_dec_lt(x_6, x_5); +if (x_15 == 0) +{ +lean_object* 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_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_7); +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; +x_17 = lean_array_uget(x_7, x_6); +x_18 = lean_unsigned_to_nat(0u); +x_19 = lean_array_uset(x_7, x_6, x_18); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_20 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_17, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; +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 = 1; +x_24 = lean_usize_add(x_6, x_23); +x_25 = lean_array_uset(x_19, x_6, x_21); +x_6 = x_24; +x_7 = x_25; +x_14 = x_22; +goto _start; +} +else +{ +uint8_t x_27; +lean_dec(x_19); +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_3); +lean_dec(x_2); +lean_dec(x_1); +x_27 = !lean_is_exclusive(x_20); if (x_27 == 0) { -return x_26; +return x_20; } else { lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_26, 0); -x_29 = lean_ctor_get(x_26, 1); +x_28 = lean_ctor_get(x_20, 0); +x_29 = lean_ctor_get(x_20, 1); lean_inc(x_29); lean_inc(x_28); -lean_dec(x_26); +lean_dec(x_20); x_30 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); return x_30; } } -else -{ -lean_object* x_31; lean_object* x_32; -lean_dec(x_5); -lean_dec(x_4); -x_31 = lean_box(0); -x_32 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__1(x_1, x_6, x_2, x_3, x_7, x_31, x_8, x_9, x_10, x_11, x_12, x_13, x_14); -return x_32; -} -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_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* x_12, lean_object* x_13) { -_start: -{ -uint8_t x_14; -x_14 = lean_usize_dec_lt(x_5, x_4); -if (x_14 == 0) -{ -lean_object* 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_3); -lean_dec(x_2); -lean_dec(x_1); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_6); -lean_ctor_set(x_15, 1, x_13); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_16 = lean_array_uget(x_6, x_5); -x_17 = lean_unsigned_to_nat(0u); -x_18 = lean_array_uset(x_6, x_5, x_17); -x_19 = lean_ctor_get(x_16, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_16, 1); -lean_inc(x_20); -lean_dec(x_16); -lean_inc(x_3); -lean_inc(x_19); -lean_inc(x_2); -lean_inc(x_1); -x_21 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___boxed), 14, 5); -lean_closure_set(x_21, 0, x_20); -lean_closure_set(x_21, 1, x_1); -lean_closure_set(x_21, 2, x_2); -lean_closure_set(x_21, 3, x_19); -lean_closure_set(x_21, 4, x_3); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -x_22 = l_Lean_Meta_lambdaTelescope___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__12___rarg(x_19, x_21, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_22) == 0) -{ -lean_object* x_23; lean_object* x_24; size_t x_25; size_t x_26; lean_object* x_27; -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 = 1; -x_26 = lean_usize_add(x_5, x_25); -x_27 = lean_array_uset(x_18, x_5, x_23); -x_5 = x_26; -x_6 = x_27; -x_13 = x_24; -goto _start; -} -else -{ -uint8_t x_29; -lean_dec(x_18); -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_29 = !lean_is_exclusive(x_22); -if (x_29 == 0) -{ -return x_22; -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_30 = lean_ctor_get(x_22, 0); -x_31 = lean_ctor_get(x_22, 1); -lean_inc(x_31); -lean_inc(x_30); -lean_dec(x_22); -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; -} -} -} -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__14(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_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* x_12, lean_object* x_13) { -_start: -{ -uint8_t x_14; -x_14 = lean_usize_dec_lt(x_5, x_4); -if (x_14 == 0) -{ -lean_object* 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_3); -lean_dec(x_2); -lean_dec(x_1); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_6); -lean_ctor_set(x_15, 1, x_13); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_array_uget(x_6, x_5); -x_17 = lean_unsigned_to_nat(0u); -x_18 = lean_array_uset(x_6, x_5, 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_3); -lean_inc(x_2); -lean_inc(x_1); -x_19 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; -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 = 1; -x_23 = lean_usize_add(x_5, x_22); -x_24 = lean_array_uset(x_18, x_5, x_20); -x_5 = x_23; -x_6 = x_24; -x_13 = x_21; -goto _start; -} -else -{ -uint8_t x_26; -lean_dec(x_18); -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_26 = !lean_is_exclusive(x_19); -if (x_26 == 0) -{ -return x_19; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_19, 0); -x_28 = lean_ctor_get(x_19, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_19); -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; -} -} } } } @@ -3486,55 +3540,168 @@ lean_ctor_set(x_4, 1, x_2); return x_4; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { -lean_object* x_13; lean_object* x_14; -x_13 = lean_expr_instantiate1(x_1, x_5); +lean_object* x_14; lean_object* x_15; +x_14 = lean_expr_instantiate1(x_1, x_6); +lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); -lean_inc(x_8); -x_14 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_2, x_3, x_4, x_13, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -if (lean_obj_tag(x_14) == 0) +x_15 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_2, x_3, x_4, x_5, x_14, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_15) == 0) { -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; uint8_t x_20; lean_object* x_21; -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; uint8_t x_21; lean_object* x_22; +x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); -lean_dec(x_14); -x_17 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__4; -x_18 = lean_array_push(x_17, x_5); -x_19 = 0; -x_20 = 1; -x_21 = l_Lean_Meta_mkLambdaFVars(x_18, x_15, x_19, x_20, x_8, x_9, x_10, x_11, x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__4; +x_19 = lean_array_push(x_18, x_6); +x_20 = 0; +x_21 = 1; +x_22 = l_Lean_Meta_mkLambdaFVars(x_19, x_16, x_20, x_21, x_9, x_10, x_11, x_12, x_17); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +return x_22; +} +else +{ +uint8_t x_23; +lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); +lean_dec(x_6); +x_23 = !lean_is_exclusive(x_15); +if (x_23 == 0) +{ +return x_15; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_15, 0); +x_25 = lean_ctor_get(x_15, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_15); +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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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, 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; +x_14 = lean_expr_instantiate1(x_1, x_6); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +x_15 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_2, x_3, x_4, x_5, x_14, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t 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___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__4; +x_19 = lean_array_push(x_18, x_6); +x_20 = 0; +x_21 = 1; +x_22 = l_Lean_Meta_mkForallFVars(x_19, x_16, x_20, x_21, x_9, x_10, x_11, x_12, x_17); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +return x_22; +} +else +{ +uint8_t x_23; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_6); +x_23 = !lean_is_exclusive(x_15); +if (x_23 == 0) +{ +return x_15; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_15, 0); +x_25 = lean_ctor_get(x_15, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_15); +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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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, lean_object* x_13) { +_start: +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_expr_instantiate1(x_1, x_6); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +x_15 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_2, x_3, x_4, x_5, x_14, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* 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___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__4; +x_19 = lean_array_push(x_18, x_6); +x_20 = 0; +x_21 = l_Lean_Meta_mkLambdaFVars(x_19, x_16, x_20, x_20, x_9, x_10, x_11, x_12, x_17); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); return x_21; } else { uint8_t x_22; +lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_5); -x_22 = !lean_is_exclusive(x_14); +lean_dec(x_6); +x_22 = !lean_is_exclusive(x_15); if (x_22 == 0) { -return x_14; +return x_15; } else { lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_14, 0); -x_24 = lean_ctor_get(x_14, 1); +x_23 = lean_ctor_get(x_15, 0); +x_24 = lean_ctor_get(x_15, 1); lean_inc(x_24); lean_inc(x_23); -lean_dec(x_14); +lean_dec(x_15); x_25 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_25, 0, x_23); lean_ctor_set(x_25, 1, x_24); @@ -3543,119 +3710,6 @@ return x_25; } } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { -_start: -{ -lean_object* x_13; lean_object* x_14; -x_13 = lean_expr_instantiate1(x_1, x_5); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -x_14 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_2, x_3, x_4, x_13, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -if (lean_obj_tag(x_14) == 0) -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; uint8_t x_20; lean_object* x_21; -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___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__4; -x_18 = lean_array_push(x_17, x_5); -x_19 = 0; -x_20 = 1; -x_21 = l_Lean_Meta_mkForallFVars(x_18, x_15, x_19, x_20, x_8, x_9, x_10, x_11, x_16); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -return x_21; -} -else -{ -uint8_t x_22; -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_5); -x_22 = !lean_is_exclusive(x_14); -if (x_22 == 0) -{ -return x_14; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_14, 0); -x_24 = lean_ctor_get(x_14, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_14); -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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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; lean_object* x_14; -x_13 = lean_expr_instantiate1(x_1, x_5); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -x_14 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_2, x_3, x_4, x_13, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -if (lean_obj_tag(x_14) == 0) -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* 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); -lean_dec(x_14); -x_17 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__4; -x_18 = lean_array_push(x_17, x_5); -x_19 = 0; -x_20 = l_Lean_Meta_mkLambdaFVars(x_18, x_15, x_19, x_19, x_8, x_9, x_10, x_11, x_16); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -return x_20; -} -else -{ -uint8_t x_21; -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_5); -x_21 = !lean_is_exclusive(x_14); -if (x_21 == 0) -{ -return x_14; -} -else -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_22 = lean_ctor_get(x_14, 0); -x_23 = lean_ctor_get(x_14, 1); -lean_inc(x_23); -lean_inc(x_22); -lean_dec(x_14); -x_24 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_24, 0, x_22); -lean_ctor_set(x_24, 1, x_23); -return x_24; -} -} -} -} static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___closed__1() { _start: { @@ -3664,275 +3718,281 @@ x_1 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Fix_0__L return x_1; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(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: { -switch (lean_obj_tag(x_4)) { +switch (lean_obj_tag(x_5)) { case 5: { -lean_object* x_12; lean_object* x_13; -lean_inc(x_4); -x_12 = l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1(x_4, 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); -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; -x_14 = lean_ctor_get(x_12, 1); +lean_object* x_13; lean_object* x_14; +lean_inc(x_5); +x_13 = l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1(x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); -lean_dec(x_12); -x_15 = lean_unsigned_to_nat(0u); -x_16 = l_Lean_Expr_getAppNumArgsAux(x_4, x_15); -x_17 = l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1___closed__1; -lean_inc(x_16); -x_18 = lean_mk_array(x_16, x_17); -x_19 = lean_unsigned_to_nat(1u); -x_20 = lean_nat_sub(x_16, x_19); -lean_dec(x_16); -x_21 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__5(x_1, x_2, x_3, x_4, x_18, x_20, x_5, x_6, x_7, x_8, x_9, x_10, x_14); -return x_21; +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_unsigned_to_nat(0u); +x_17 = l_Lean_Expr_getAppNumArgsAux(x_5, x_16); +x_18 = l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1___closed__1; +lean_inc(x_17); +x_19 = lean_mk_array(x_17, x_18); +x_20 = lean_unsigned_to_nat(1u); +x_21 = lean_nat_sub(x_17, x_20); +lean_dec(x_17); +x_22 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__5(x_1, x_2, x_3, x_4, x_5, x_19, x_21, x_6, x_7, x_8, x_9, x_10, x_11, x_15); +return x_22; } else { -lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; -x_22 = lean_ctor_get(x_12, 1); -lean_inc(x_22); -lean_dec(x_12); -x_23 = lean_ctor_get(x_13, 0); +lean_object* x_23; lean_object* x_24; uint8_t x_25; +x_23 = lean_ctor_get(x_13, 1); lean_inc(x_23); lean_dec(x_13); -x_24 = lean_unsigned_to_nat(0u); -lean_inc(x_4); +x_24 = lean_ctor_get(x_14, 0); +lean_inc(x_24); +lean_dec(x_14); +lean_inc(x_5); +lean_inc(x_2); lean_inc(x_1); -x_25 = l_Lean_Elab_Structural_recArgHasLooseBVarsAt(x_1, x_24, x_4); +x_25 = l_Lean_Elab_Structural_recArgHasLooseBVarsAt(x_1, x_2, x_5); if (x_25 == 0) { -lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; -lean_dec(x_23); -x_26 = l_Lean_Expr_getAppNumArgsAux(x_4, x_24); -x_27 = l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1___closed__1; -lean_inc(x_26); -x_28 = lean_mk_array(x_26, x_27); -x_29 = lean_unsigned_to_nat(1u); -x_30 = lean_nat_sub(x_26, x_29); -lean_dec(x_26); -x_31 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__8(x_1, x_2, x_3, x_4, x_28, x_30, x_5, x_6, x_7, x_8, x_9, x_10, x_22); -return x_31; +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_24); +x_26 = lean_unsigned_to_nat(0u); +x_27 = l_Lean_Expr_getAppNumArgsAux(x_5, x_26); +x_28 = l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1___closed__1; +lean_inc(x_27); +x_29 = lean_mk_array(x_27, x_28); +x_30 = lean_unsigned_to_nat(1u); +x_31 = lean_nat_sub(x_27, x_30); +lean_dec(x_27); +x_32 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__8(x_1, x_2, x_3, x_4, x_5, x_29, x_31, x_6, x_7, x_8, x_9, x_10, x_11, x_23); +return x_32; } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; -lean_inc(x_3); -x_32 = lean_alloc_closure((void*)(l_Lean_Meta_MatcherApp_addArg), 7, 2); -lean_closure_set(x_32, 0, x_23); -lean_closure_set(x_32, 1, x_3); -x_33 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___closed__1; +lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_inc(x_4); +x_33 = lean_alloc_closure((void*)(l_Lean_Meta_MatcherApp_addArg), 7, 2); +lean_closure_set(x_33, 0, x_24); +lean_closure_set(x_33, 1, x_4); +x_34 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___closed__1; +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); -lean_inc(x_7); -x_34 = l_Lean_Meta_mapErrorImp___rarg(x_32, x_33, x_7, x_8, x_9, x_10, x_22); -if (lean_obj_tag(x_34) == 0) +x_35 = l_Lean_Meta_mapErrorImp___rarg(x_33, x_34, x_8, x_9, x_10, x_11, x_23); +if (lean_obj_tag(x_35) == 0) { -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_34, 0); -lean_inc(x_35); -x_36 = lean_ctor_get(x_34, 1); +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_35, 0); lean_inc(x_36); -lean_dec(x_34); +x_37 = lean_ctor_get(x_35, 1); +lean_inc(x_37); +lean_dec(x_35); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_3); -lean_inc(x_35); -x_37 = l_Lean_Elab_Structural_refinedArgType(x_35, x_3, x_7, x_8, x_9, x_10, x_36); -if (lean_obj_tag(x_37) == 0) +lean_inc(x_4); +lean_inc(x_36); +x_38 = l_Lean_Elab_Structural_refinedArgType(x_36, x_4, x_8, x_9, x_10, x_11, x_37); +if (lean_obj_tag(x_38) == 0) { -lean_object* x_38; uint8_t x_39; -x_38 = lean_ctor_get(x_37, 0); -lean_inc(x_38); -x_39 = lean_unbox(x_38); -lean_dec(x_38); -if (x_39 == 0) +lean_object* x_39; uint8_t x_40; +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +x_40 = lean_unbox(x_39); +lean_dec(x_39); +if (x_40 == 0) { -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_dec(x_35); -x_40 = lean_ctor_get(x_37, 1); -lean_inc(x_40); -lean_dec(x_37); -x_41 = l_Lean_Expr_getAppNumArgsAux(x_4, x_24); -x_42 = l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1___closed__1; +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_dec(x_36); +x_41 = lean_ctor_get(x_38, 1); lean_inc(x_41); -x_43 = lean_mk_array(x_41, x_42); -x_44 = lean_unsigned_to_nat(1u); -x_45 = lean_nat_sub(x_41, x_44); -lean_dec(x_41); -x_46 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__11(x_1, x_2, x_3, x_4, x_43, x_45, x_5, x_6, x_7, x_8, x_9, x_10, x_40); -return x_46; +lean_dec(x_38); +x_42 = lean_unsigned_to_nat(0u); +x_43 = l_Lean_Expr_getAppNumArgsAux(x_5, x_42); +x_44 = l_Lean_Meta_matchMatcherApp_x3f___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__1___closed__1; +lean_inc(x_43); +x_45 = lean_mk_array(x_43, x_44); +x_46 = lean_unsigned_to_nat(1u); +x_47 = lean_nat_sub(x_43, x_46); +lean_dec(x_43); +x_48 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__11(x_1, x_2, x_3, x_4, x_5, x_45, x_47, x_6, x_7, x_8, x_9, x_10, x_11, x_41); +return x_48; } else { -lean_object* x_47; uint8_t x_48; -x_47 = lean_ctor_get(x_37, 1); -lean_inc(x_47); -lean_dec(x_37); -x_48 = !lean_is_exclusive(x_35); -if (x_48 == 0) +lean_object* x_49; uint8_t x_50; +x_49 = lean_ctor_get(x_38, 1); +lean_inc(x_49); +lean_dec(x_38); +x_50 = !lean_is_exclusive(x_36); +if (x_50 == 0) { -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; size_t x_60; size_t x_61; lean_object* x_62; -x_49 = lean_ctor_get(x_35, 0); -x_50 = lean_ctor_get(x_35, 1); -x_51 = lean_ctor_get(x_35, 2); -x_52 = lean_ctor_get(x_35, 3); -x_53 = lean_ctor_get(x_35, 4); -x_54 = lean_ctor_get(x_35, 5); -x_55 = lean_ctor_get(x_35, 6); -x_56 = lean_ctor_get(x_35, 7); -x_57 = lean_ctor_get(x_35, 8); -x_58 = l_Array_zip___rarg(x_56, x_55); -lean_dec(x_56); -x_59 = lean_array_get_size(x_58); -x_60 = lean_usize_of_nat(x_59); -lean_dec(x_59); -x_61 = 0; +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; size_t x_62; size_t x_63; lean_object* x_64; +x_51 = lean_ctor_get(x_36, 0); +x_52 = lean_ctor_get(x_36, 1); +x_53 = lean_ctor_get(x_36, 2); +x_54 = lean_ctor_get(x_36, 3); +x_55 = lean_ctor_get(x_36, 4); +x_56 = lean_ctor_get(x_36, 5); +x_57 = lean_ctor_get(x_36, 6); +x_58 = lean_ctor_get(x_36, 7); +x_59 = lean_ctor_get(x_36, 8); +x_60 = l_Array_zip___rarg(x_58, x_57); +lean_dec(x_58); +x_61 = lean_array_get_size(x_60); +x_62 = lean_usize_of_nat(x_61); +lean_dec(x_61); +x_63 = 0; +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); +lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); -x_62 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13(x_1, x_2, x_4, x_60, x_61, x_58, x_5, x_6, x_7, x_8, x_9, x_10, x_47); -if (lean_obj_tag(x_62) == 0) +x_64 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13(x_1, x_2, x_3, x_5, x_62, x_63, x_60, x_6, x_7, x_8, x_9, x_10, x_11, x_49); +if (lean_obj_tag(x_64) == 0) { -lean_object* x_63; lean_object* x_64; lean_object* x_65; size_t x_66; lean_object* x_67; -x_63 = lean_ctor_get(x_62, 0); -lean_inc(x_63); -x_64 = lean_ctor_get(x_62, 1); -lean_inc(x_64); -lean_dec(x_62); -x_65 = lean_array_get_size(x_54); -x_66 = lean_usize_of_nat(x_65); +lean_object* x_65; lean_object* x_66; lean_object* x_67; size_t x_68; lean_object* x_69; +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_array_get_size(x_56); +x_68 = lean_usize_of_nat(x_67); +lean_dec(x_67); +x_69 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__14(x_1, x_2, x_3, x_4, x_68, x_63, x_56, x_6, x_7, x_8, x_9, x_10, x_11, x_66); +if (lean_obj_tag(x_69) == 0) +{ +uint8_t x_70; +x_70 = !lean_is_exclusive(x_69); +if (x_70 == 0) +{ +lean_object* x_71; lean_object* x_72; +x_71 = lean_ctor_get(x_69, 0); +lean_ctor_set(x_36, 7, x_65); +lean_ctor_set(x_36, 5, x_71); +x_72 = l_Lean_Meta_MatcherApp_toExpr(x_36); +lean_ctor_set(x_69, 0, x_72); +return x_69; +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_73 = lean_ctor_get(x_69, 0); +x_74 = lean_ctor_get(x_69, 1); +lean_inc(x_74); +lean_inc(x_73); +lean_dec(x_69); +lean_ctor_set(x_36, 7, x_65); +lean_ctor_set(x_36, 5, x_73); +x_75 = l_Lean_Meta_MatcherApp_toExpr(x_36); +x_76 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_74); +return x_76; +} +} +else +{ +uint8_t x_77; lean_dec(x_65); -x_67 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__14(x_1, x_2, x_3, x_66, x_61, x_54, x_5, x_6, x_7, x_8, x_9, x_10, x_64); -if (lean_obj_tag(x_67) == 0) -{ -uint8_t x_68; -x_68 = !lean_is_exclusive(x_67); -if (x_68 == 0) -{ -lean_object* x_69; lean_object* x_70; -x_69 = lean_ctor_get(x_67, 0); -lean_ctor_set(x_35, 7, x_63); -lean_ctor_set(x_35, 5, x_69); -x_70 = l_Lean_Meta_MatcherApp_toExpr(x_35); -lean_ctor_set(x_67, 0, x_70); -return x_67; -} -else -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_71 = lean_ctor_get(x_67, 0); -x_72 = lean_ctor_get(x_67, 1); -lean_inc(x_72); -lean_inc(x_71); -lean_dec(x_67); -lean_ctor_set(x_35, 7, x_63); -lean_ctor_set(x_35, 5, x_71); -x_73 = l_Lean_Meta_MatcherApp_toExpr(x_35); -x_74 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_74, 0, x_73); -lean_ctor_set(x_74, 1, x_72); -return x_74; -} -} -else -{ -uint8_t x_75; -lean_dec(x_63); -lean_free_object(x_35); -lean_dec(x_57); -lean_dec(x_55); -lean_dec(x_53); -lean_dec(x_52); -lean_dec(x_51); -lean_dec(x_50); -lean_dec(x_49); -x_75 = !lean_is_exclusive(x_67); -if (x_75 == 0) -{ -return x_67; -} -else -{ -lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_76 = lean_ctor_get(x_67, 0); -x_77 = lean_ctor_get(x_67, 1); -lean_inc(x_77); -lean_inc(x_76); -lean_dec(x_67); -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_79; -lean_free_object(x_35); +lean_free_object(x_36); +lean_dec(x_59); lean_dec(x_57); lean_dec(x_55); lean_dec(x_54); lean_dec(x_53); lean_dec(x_52); lean_dec(x_51); -lean_dec(x_50); -lean_dec(x_49); +x_77 = !lean_is_exclusive(x_69); +if (x_77 == 0) +{ +return x_69; +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = lean_ctor_get(x_69, 0); +x_79 = lean_ctor_get(x_69, 1); +lean_inc(x_79); +lean_inc(x_78); +lean_dec(x_69); +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; +} +} +} +else +{ +uint8_t x_81; +lean_free_object(x_36); +lean_dec(x_59); +lean_dec(x_57); +lean_dec(x_56); +lean_dec(x_55); +lean_dec(x_54); +lean_dec(x_53); +lean_dec(x_52); +lean_dec(x_51); +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_5); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_79 = !lean_is_exclusive(x_62); -if (x_79 == 0) +x_81 = !lean_is_exclusive(x_64); +if (x_81 == 0) { -return x_62; +return x_64; } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; -x_80 = lean_ctor_get(x_62, 0); -x_81 = lean_ctor_get(x_62, 1); -lean_inc(x_81); -lean_inc(x_80); -lean_dec(x_62); -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; +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_64, 0); +x_83 = lean_ctor_get(x_64, 1); +lean_inc(x_83); +lean_inc(x_82); +lean_dec(x_64); +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +return x_84; } } } 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; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; size_t x_94; size_t x_95; lean_object* x_96; -x_83 = lean_ctor_get(x_35, 0); -x_84 = lean_ctor_get(x_35, 1); -x_85 = lean_ctor_get(x_35, 2); -x_86 = lean_ctor_get(x_35, 3); -x_87 = lean_ctor_get(x_35, 4); -x_88 = lean_ctor_get(x_35, 5); -x_89 = lean_ctor_get(x_35, 6); -x_90 = lean_ctor_get(x_35, 7); -x_91 = lean_ctor_get(x_35, 8); +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; size_t x_96; size_t x_97; lean_object* x_98; +x_85 = lean_ctor_get(x_36, 0); +x_86 = lean_ctor_get(x_36, 1); +x_87 = lean_ctor_get(x_36, 2); +x_88 = lean_ctor_get(x_36, 3); +x_89 = lean_ctor_get(x_36, 4); +x_90 = lean_ctor_get(x_36, 5); +x_91 = lean_ctor_get(x_36, 6); +x_92 = lean_ctor_get(x_36, 7); +x_93 = lean_ctor_get(x_36, 8); +lean_inc(x_93); +lean_inc(x_92); lean_inc(x_91); lean_inc(x_90); lean_inc(x_89); @@ -3940,212 +4000,214 @@ lean_inc(x_88); lean_inc(x_87); lean_inc(x_86); lean_inc(x_85); -lean_inc(x_84); -lean_inc(x_83); -lean_dec(x_35); -x_92 = l_Array_zip___rarg(x_90, x_89); -lean_dec(x_90); -x_93 = lean_array_get_size(x_92); -x_94 = lean_usize_of_nat(x_93); -lean_dec(x_93); -x_95 = 0; +lean_dec(x_36); +x_94 = l_Array_zip___rarg(x_92, x_91); +lean_dec(x_92); +x_95 = lean_array_get_size(x_94); +x_96 = lean_usize_of_nat(x_95); +lean_dec(x_95); +x_97 = 0; +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); +lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); -x_96 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13(x_1, x_2, x_4, x_94, x_95, x_92, x_5, x_6, x_7, x_8, x_9, x_10, x_47); -if (lean_obj_tag(x_96) == 0) +x_98 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13(x_1, x_2, x_3, x_5, x_96, x_97, x_94, x_6, x_7, x_8, x_9, x_10, x_11, x_49); +if (lean_obj_tag(x_98) == 0) { -lean_object* x_97; lean_object* x_98; lean_object* x_99; size_t x_100; lean_object* x_101; -x_97 = lean_ctor_get(x_96, 0); -lean_inc(x_97); -x_98 = lean_ctor_get(x_96, 1); -lean_inc(x_98); -lean_dec(x_96); -x_99 = lean_array_get_size(x_88); -x_100 = lean_usize_of_nat(x_99); +lean_object* x_99; lean_object* x_100; lean_object* x_101; size_t x_102; lean_object* x_103; +x_99 = lean_ctor_get(x_98, 0); +lean_inc(x_99); +x_100 = lean_ctor_get(x_98, 1); +lean_inc(x_100); +lean_dec(x_98); +x_101 = lean_array_get_size(x_90); +x_102 = lean_usize_of_nat(x_101); +lean_dec(x_101); +x_103 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__14(x_1, x_2, x_3, x_4, x_102, x_97, x_90, x_6, x_7, x_8, x_9, x_10, x_11, x_100); +if (lean_obj_tag(x_103) == 0) +{ +lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; +x_104 = lean_ctor_get(x_103, 0); +lean_inc(x_104); +x_105 = lean_ctor_get(x_103, 1); +lean_inc(x_105); +if (lean_is_exclusive(x_103)) { + lean_ctor_release(x_103, 0); + lean_ctor_release(x_103, 1); + x_106 = x_103; +} else { + lean_dec_ref(x_103); + x_106 = lean_box(0); +} +x_107 = lean_alloc_ctor(0, 9, 0); +lean_ctor_set(x_107, 0, x_85); +lean_ctor_set(x_107, 1, x_86); +lean_ctor_set(x_107, 2, x_87); +lean_ctor_set(x_107, 3, x_88); +lean_ctor_set(x_107, 4, x_89); +lean_ctor_set(x_107, 5, x_104); +lean_ctor_set(x_107, 6, x_91); +lean_ctor_set(x_107, 7, x_99); +lean_ctor_set(x_107, 8, x_93); +x_108 = l_Lean_Meta_MatcherApp_toExpr(x_107); +if (lean_is_scalar(x_106)) { + x_109 = lean_alloc_ctor(0, 2, 0); +} else { + x_109 = x_106; +} +lean_ctor_set(x_109, 0, x_108); +lean_ctor_set(x_109, 1, x_105); +return x_109; +} +else +{ +lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_dec(x_99); -x_101 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__14(x_1, x_2, x_3, x_100, x_95, x_88, x_5, x_6, x_7, x_8, x_9, x_10, x_98); -if (lean_obj_tag(x_101) == 0) -{ -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_102 = lean_ctor_get(x_101, 0); -lean_inc(x_102); -x_103 = lean_ctor_get(x_101, 1); -lean_inc(x_103); -if (lean_is_exclusive(x_101)) { - lean_ctor_release(x_101, 0); - lean_ctor_release(x_101, 1); - x_104 = x_101; -} else { - lean_dec_ref(x_101); - x_104 = lean_box(0); -} -x_105 = lean_alloc_ctor(0, 9, 0); -lean_ctor_set(x_105, 0, x_83); -lean_ctor_set(x_105, 1, x_84); -lean_ctor_set(x_105, 2, x_85); -lean_ctor_set(x_105, 3, x_86); -lean_ctor_set(x_105, 4, x_87); -lean_ctor_set(x_105, 5, x_102); -lean_ctor_set(x_105, 6, x_89); -lean_ctor_set(x_105, 7, x_97); -lean_ctor_set(x_105, 8, x_91); -x_106 = l_Lean_Meta_MatcherApp_toExpr(x_105); -if (lean_is_scalar(x_104)) { - x_107 = lean_alloc_ctor(0, 2, 0); -} else { - x_107 = x_104; -} -lean_ctor_set(x_107, 0, x_106); -lean_ctor_set(x_107, 1, x_103); -return x_107; -} -else -{ -lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; -lean_dec(x_97); -lean_dec(x_91); -lean_dec(x_89); -lean_dec(x_87); -lean_dec(x_86); -lean_dec(x_85); -lean_dec(x_84); -lean_dec(x_83); -x_108 = lean_ctor_get(x_101, 0); -lean_inc(x_108); -x_109 = lean_ctor_get(x_101, 1); -lean_inc(x_109); -if (lean_is_exclusive(x_101)) { - lean_ctor_release(x_101, 0); - lean_ctor_release(x_101, 1); - x_110 = x_101; -} else { - lean_dec_ref(x_101); - x_110 = lean_box(0); -} -if (lean_is_scalar(x_110)) { - x_111 = lean_alloc_ctor(1, 2, 0); -} else { - x_111 = x_110; -} -lean_ctor_set(x_111, 0, x_108); -lean_ctor_set(x_111, 1, x_109); -return x_111; -} -} -else -{ -lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +lean_dec(x_93); lean_dec(x_91); lean_dec(x_89); lean_dec(x_88); lean_dec(x_87); lean_dec(x_86); lean_dec(x_85); -lean_dec(x_84); -lean_dec(x_83); +x_110 = lean_ctor_get(x_103, 0); +lean_inc(x_110); +x_111 = lean_ctor_get(x_103, 1); +lean_inc(x_111); +if (lean_is_exclusive(x_103)) { + lean_ctor_release(x_103, 0); + lean_ctor_release(x_103, 1); + x_112 = x_103; +} else { + lean_dec_ref(x_103); + 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; +} +} +else +{ +lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; +lean_dec(x_93); +lean_dec(x_91); +lean_dec(x_90); +lean_dec(x_89); +lean_dec(x_88); +lean_dec(x_87); +lean_dec(x_86); +lean_dec(x_85); +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_5); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_112 = lean_ctor_get(x_96, 0); -lean_inc(x_112); -x_113 = lean_ctor_get(x_96, 1); -lean_inc(x_113); -if (lean_is_exclusive(x_96)) { - lean_ctor_release(x_96, 0); - lean_ctor_release(x_96, 1); - x_114 = x_96; +x_114 = lean_ctor_get(x_98, 0); +lean_inc(x_114); +x_115 = lean_ctor_get(x_98, 1); +lean_inc(x_115); +if (lean_is_exclusive(x_98)) { + lean_ctor_release(x_98, 0); + lean_ctor_release(x_98, 1); + x_116 = x_98; } else { - lean_dec_ref(x_96); - x_114 = lean_box(0); + lean_dec_ref(x_98); + x_116 = lean_box(0); } -if (lean_is_scalar(x_114)) { - x_115 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_116)) { + x_117 = lean_alloc_ctor(1, 2, 0); } else { - x_115 = x_114; + x_117 = x_116; } -lean_ctor_set(x_115, 0, x_112); -lean_ctor_set(x_115, 1, x_113); -return x_115; +lean_ctor_set(x_117, 0, x_114); +lean_ctor_set(x_117, 1, x_115); +return x_117; } } } } else { -uint8_t x_116; +uint8_t x_118; +lean_dec(x_36); +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_118 = !lean_is_exclusive(x_38); +if (x_118 == 0) +{ +return x_38; +} +else +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; +x_119 = lean_ctor_get(x_38, 0); +x_120 = lean_ctor_get(x_38, 1); +lean_inc(x_120); +lean_inc(x_119); +lean_dec(x_38); +x_121 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_121, 0, x_119); +lean_ctor_set(x_121, 1, x_120); +return x_121; +} +} +} +else +{ +uint8_t x_122; +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_122 = !lean_is_exclusive(x_35); +if (x_122 == 0) +{ +return x_35; +} +else +{ +lean_object* x_123; lean_object* x_124; lean_object* x_125; +x_123 = lean_ctor_get(x_35, 0); +x_124 = lean_ctor_get(x_35, 1); +lean_inc(x_124); +lean_inc(x_123); lean_dec(x_35); -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_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_116 = !lean_is_exclusive(x_37); -if (x_116 == 0) -{ -return x_37; -} -else -{ -lean_object* x_117; lean_object* x_118; lean_object* x_119; -x_117 = lean_ctor_get(x_37, 0); -x_118 = lean_ctor_get(x_37, 1); -lean_inc(x_118); -lean_inc(x_117); -lean_dec(x_37); -x_119 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_119, 0, x_117); -lean_ctor_set(x_119, 1, x_118); -return x_119; -} -} -} -else -{ -uint8_t x_120; -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_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_120 = !lean_is_exclusive(x_34); -if (x_120 == 0) -{ -return x_34; -} -else -{ -lean_object* x_121; lean_object* x_122; lean_object* x_123; -x_121 = lean_ctor_get(x_34, 0); -x_122 = lean_ctor_get(x_34, 1); -lean_inc(x_122); -lean_inc(x_121); -lean_dec(x_34); -x_123 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_123, 0, x_121); -lean_ctor_set(x_123, 1, x_122); -return x_123; +x_125 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_125, 0, x_123); +lean_ctor_set(x_125, 1, x_124); +return x_125; } } } @@ -4153,467 +4215,479 @@ return x_123; } case 6: { -lean_object* x_124; lean_object* x_125; lean_object* x_126; uint64_t x_127; lean_object* x_128; -x_124 = lean_ctor_get(x_4, 0); -lean_inc(x_124); -x_125 = lean_ctor_get(x_4, 1); -lean_inc(x_125); -x_126 = lean_ctor_get(x_4, 2); +lean_object* x_126; lean_object* x_127; lean_object* x_128; uint64_t x_129; lean_object* x_130; +x_126 = lean_ctor_get(x_5, 0); lean_inc(x_126); -x_127 = lean_ctor_get_uint64(x_4, sizeof(void*)*3); -lean_dec(x_4); +x_127 = lean_ctor_get(x_5, 1); +lean_inc(x_127); +x_128 = lean_ctor_get(x_5, 2); +lean_inc(x_128); +x_129 = lean_ctor_get_uint64(x_5, sizeof(void*)*3); +lean_dec(x_5); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); +lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); -x_128 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_125, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_128) == 0) +x_130 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_127, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_130) == 0) { -lean_object* x_129; lean_object* x_130; uint8_t x_131; lean_object* x_132; lean_object* x_133; -x_129 = lean_ctor_get(x_128, 0); -lean_inc(x_129); -x_130 = lean_ctor_get(x_128, 1); -lean_inc(x_130); -lean_dec(x_128); -x_131 = (uint8_t)((x_127 << 24) >> 61); -x_132 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__2___boxed), 12, 4); -lean_closure_set(x_132, 0, x_126); -lean_closure_set(x_132, 1, x_1); -lean_closure_set(x_132, 2, x_2); -lean_closure_set(x_132, 3, x_3); -x_133 = l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda_loop___spec__1___rarg(x_124, x_131, x_129, x_132, x_5, x_6, x_7, x_8, x_9, x_10, x_130); -return x_133; +lean_object* x_131; lean_object* x_132; uint8_t x_133; lean_object* x_134; lean_object* x_135; +x_131 = lean_ctor_get(x_130, 0); +lean_inc(x_131); +x_132 = lean_ctor_get(x_130, 1); +lean_inc(x_132); +lean_dec(x_130); +x_133 = (uint8_t)((x_129 << 24) >> 61); +x_134 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__2___boxed), 13, 5); +lean_closure_set(x_134, 0, x_128); +lean_closure_set(x_134, 1, x_1); +lean_closure_set(x_134, 2, x_2); +lean_closure_set(x_134, 3, x_3); +lean_closure_set(x_134, 4, x_4); +x_135 = l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda_loop___spec__1___rarg(x_126, x_133, x_131, x_134, x_6, x_7, x_8, x_9, x_10, x_11, x_132); +return x_135; } else { -uint8_t x_134; +uint8_t x_136; +lean_dec(x_128); lean_dec(x_126); -lean_dec(x_124); +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_5); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_134 = !lean_is_exclusive(x_128); -if (x_134 == 0) +x_136 = !lean_is_exclusive(x_130); +if (x_136 == 0) { -return x_128; +return x_130; } else { -lean_object* x_135; lean_object* x_136; lean_object* x_137; -x_135 = lean_ctor_get(x_128, 0); -x_136 = lean_ctor_get(x_128, 1); -lean_inc(x_136); -lean_inc(x_135); -lean_dec(x_128); -x_137 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_137, 0, x_135); -lean_ctor_set(x_137, 1, x_136); -return x_137; +lean_object* x_137; lean_object* x_138; lean_object* x_139; +x_137 = lean_ctor_get(x_130, 0); +x_138 = lean_ctor_get(x_130, 1); +lean_inc(x_138); +lean_inc(x_137); +lean_dec(x_130); +x_139 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_139, 0, x_137); +lean_ctor_set(x_139, 1, x_138); +return x_139; } } } case 7: { -lean_object* x_138; lean_object* x_139; lean_object* x_140; uint64_t x_141; lean_object* x_142; -x_138 = lean_ctor_get(x_4, 0); -lean_inc(x_138); -x_139 = lean_ctor_get(x_4, 1); -lean_inc(x_139); -x_140 = lean_ctor_get(x_4, 2); +lean_object* x_140; lean_object* x_141; lean_object* x_142; uint64_t x_143; lean_object* x_144; +x_140 = lean_ctor_get(x_5, 0); lean_inc(x_140); -x_141 = lean_ctor_get_uint64(x_4, sizeof(void*)*3); -lean_dec(x_4); +x_141 = lean_ctor_get(x_5, 1); +lean_inc(x_141); +x_142 = lean_ctor_get(x_5, 2); +lean_inc(x_142); +x_143 = lean_ctor_get_uint64(x_5, sizeof(void*)*3); +lean_dec(x_5); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); +lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); -x_142 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_139, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_142) == 0) +x_144 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_141, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_144) == 0) { -lean_object* x_143; lean_object* x_144; uint8_t x_145; lean_object* x_146; lean_object* x_147; -x_143 = lean_ctor_get(x_142, 0); -lean_inc(x_143); -x_144 = lean_ctor_get(x_142, 1); -lean_inc(x_144); -lean_dec(x_142); -x_145 = (uint8_t)((x_141 << 24) >> 61); -x_146 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__3___boxed), 12, 4); -lean_closure_set(x_146, 0, x_140); -lean_closure_set(x_146, 1, x_1); -lean_closure_set(x_146, 2, x_2); -lean_closure_set(x_146, 3, x_3); -x_147 = l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda_loop___spec__1___rarg(x_138, x_145, x_143, x_146, x_5, x_6, x_7, x_8, x_9, x_10, x_144); -return x_147; +lean_object* x_145; lean_object* x_146; uint8_t x_147; lean_object* x_148; lean_object* x_149; +x_145 = lean_ctor_get(x_144, 0); +lean_inc(x_145); +x_146 = lean_ctor_get(x_144, 1); +lean_inc(x_146); +lean_dec(x_144); +x_147 = (uint8_t)((x_143 << 24) >> 61); +x_148 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__3___boxed), 13, 5); +lean_closure_set(x_148, 0, x_142); +lean_closure_set(x_148, 1, x_1); +lean_closure_set(x_148, 2, x_2); +lean_closure_set(x_148, 3, x_3); +lean_closure_set(x_148, 4, x_4); +x_149 = l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda_loop___spec__1___rarg(x_140, x_147, x_145, x_148, x_6, x_7, x_8, x_9, x_10, x_11, x_146); +return x_149; } else { -uint8_t x_148; +uint8_t x_150; +lean_dec(x_142); lean_dec(x_140); -lean_dec(x_138); +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_5); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_148 = !lean_is_exclusive(x_142); -if (x_148 == 0) +x_150 = !lean_is_exclusive(x_144); +if (x_150 == 0) { -return x_142; +return x_144; } else { -lean_object* x_149; lean_object* x_150; lean_object* x_151; -x_149 = lean_ctor_get(x_142, 0); -x_150 = lean_ctor_get(x_142, 1); -lean_inc(x_150); -lean_inc(x_149); -lean_dec(x_142); -x_151 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_151, 0, x_149); -lean_ctor_set(x_151, 1, x_150); -return x_151; +lean_object* x_151; lean_object* x_152; lean_object* x_153; +x_151 = lean_ctor_get(x_144, 0); +x_152 = lean_ctor_get(x_144, 1); +lean_inc(x_152); +lean_inc(x_151); +lean_dec(x_144); +x_153 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_153, 0, x_151); +lean_ctor_set(x_153, 1, x_152); +return x_153; } } } case 8: { -lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; -x_152 = lean_ctor_get(x_4, 0); -lean_inc(x_152); -x_153 = lean_ctor_get(x_4, 1); -lean_inc(x_153); -x_154 = lean_ctor_get(x_4, 2); +lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; +x_154 = lean_ctor_get(x_5, 0); lean_inc(x_154); -x_155 = lean_ctor_get(x_4, 3); +x_155 = lean_ctor_get(x_5, 1); lean_inc(x_155); -lean_dec(x_4); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_1); -x_156 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_153, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_156) == 0) -{ -lean_object* x_157; lean_object* x_158; lean_object* x_159; -x_157 = lean_ctor_get(x_156, 0); +x_156 = lean_ctor_get(x_5, 2); +lean_inc(x_156); +x_157 = lean_ctor_get(x_5, 3); lean_inc(x_157); -x_158 = lean_ctor_get(x_156, 1); -lean_inc(x_158); -lean_dec(x_156); +lean_dec(x_5); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); +lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); -x_159 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_154, x_5, x_6, x_7, x_8, x_9, x_10, x_158); -if (lean_obj_tag(x_159) == 0) +x_158 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_155, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_158) == 0) { -lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; -x_160 = lean_ctor_get(x_159, 0); +lean_object* x_159; lean_object* x_160; lean_object* x_161; +x_159 = lean_ctor_get(x_158, 0); +lean_inc(x_159); +x_160 = lean_ctor_get(x_158, 1); lean_inc(x_160); -x_161 = lean_ctor_get(x_159, 1); -lean_inc(x_161); -lean_dec(x_159); -x_162 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__4___boxed), 12, 4); -lean_closure_set(x_162, 0, x_155); -lean_closure_set(x_162, 1, x_1); -lean_closure_set(x_162, 2, x_2); -lean_closure_set(x_162, 3, x_3); -x_163 = l_Lean_Meta_withLetDecl___at_Lean_Elab_Term_elabLetDeclAux___spec__2___rarg(x_152, x_157, x_160, x_162, x_5, x_6, x_7, x_8, x_9, x_10, x_161); -return x_163; +lean_dec(x_158); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_161 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_156, x_6, x_7, x_8, x_9, x_10, x_11, x_160); +if (lean_obj_tag(x_161) == 0) +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; +x_162 = lean_ctor_get(x_161, 0); +lean_inc(x_162); +x_163 = lean_ctor_get(x_161, 1); +lean_inc(x_163); +lean_dec(x_161); +x_164 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__4___boxed), 13, 5); +lean_closure_set(x_164, 0, x_157); +lean_closure_set(x_164, 1, x_1); +lean_closure_set(x_164, 2, x_2); +lean_closure_set(x_164, 3, x_3); +lean_closure_set(x_164, 4, x_4); +x_165 = l_Lean_Meta_withLetDecl___at_Lean_Elab_Term_elabLetDeclAux___spec__2___rarg(x_154, x_159, x_162, x_164, x_6, x_7, x_8, x_9, x_10, x_11, x_163); +return x_165; } else { -uint8_t x_164; +uint8_t x_166; +lean_dec(x_159); lean_dec(x_157); -lean_dec(x_155); -lean_dec(x_152); -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_3); -lean_dec(x_2); -lean_dec(x_1); -x_164 = !lean_is_exclusive(x_159); -if (x_164 == 0) -{ -return x_159; -} -else -{ -lean_object* x_165; lean_object* x_166; lean_object* x_167; -x_165 = lean_ctor_get(x_159, 0); -x_166 = lean_ctor_get(x_159, 1); -lean_inc(x_166); -lean_inc(x_165); -lean_dec(x_159); -x_167 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_167, 0, x_165); -lean_ctor_set(x_167, 1, x_166); -return x_167; -} -} -} -else -{ -uint8_t x_168; -lean_dec(x_155); lean_dec(x_154); -lean_dec(x_152); +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_5); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_168 = !lean_is_exclusive(x_156); -if (x_168 == 0) +x_166 = !lean_is_exclusive(x_161); +if (x_166 == 0) { -return x_156; +return x_161; } else { -lean_object* x_169; lean_object* x_170; lean_object* x_171; -x_169 = lean_ctor_get(x_156, 0); -x_170 = lean_ctor_get(x_156, 1); -lean_inc(x_170); -lean_inc(x_169); +lean_object* x_167; lean_object* x_168; lean_object* x_169; +x_167 = lean_ctor_get(x_161, 0); +x_168 = lean_ctor_get(x_161, 1); +lean_inc(x_168); +lean_inc(x_167); +lean_dec(x_161); +x_169 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_169, 0, x_167); +lean_ctor_set(x_169, 1, x_168); +return x_169; +} +} +} +else +{ +uint8_t x_170; +lean_dec(x_157); lean_dec(x_156); -x_171 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_171, 0, x_169); -lean_ctor_set(x_171, 1, x_170); -return x_171; +lean_dec(x_154); +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_170 = !lean_is_exclusive(x_158); +if (x_170 == 0) +{ +return x_158; +} +else +{ +lean_object* x_171; lean_object* x_172; lean_object* x_173; +x_171 = lean_ctor_get(x_158, 0); +x_172 = lean_ctor_get(x_158, 1); +lean_inc(x_172); +lean_inc(x_171); +lean_dec(x_158); +x_173 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_173, 0, x_171); +lean_ctor_set(x_173, 1, x_172); +return x_173; } } } case 10: { -lean_object* x_172; lean_object* x_173; lean_object* x_174; -x_172 = lean_ctor_get(x_4, 0); -lean_inc(x_172); -x_173 = lean_ctor_get(x_4, 1); -lean_inc(x_173); -x_174 = l_Lean_getRecAppSyntax_x3f(x_4); -lean_dec(x_4); -if (lean_obj_tag(x_174) == 0) +lean_object* x_174; lean_object* x_175; lean_object* x_176; +x_174 = lean_ctor_get(x_5, 0); +lean_inc(x_174); +x_175 = lean_ctor_get(x_5, 1); +lean_inc(x_175); +x_176 = l_Lean_getRecAppSyntax_x3f(x_5); +lean_dec(x_5); +if (lean_obj_tag(x_176) == 0) { -lean_object* x_175; -x_175 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_173, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_175) == 0) +lean_object* x_177; +x_177 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_175, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_177) == 0) { -uint8_t x_176; -x_176 = !lean_is_exclusive(x_175); -if (x_176 == 0) +uint8_t x_178; +x_178 = !lean_is_exclusive(x_177); +if (x_178 == 0) { -lean_object* x_177; lean_object* x_178; -x_177 = lean_ctor_get(x_175, 0); -x_178 = l_Lean_mkMData(x_172, x_177); -lean_ctor_set(x_175, 0, x_178); -return x_175; +lean_object* x_179; lean_object* x_180; +x_179 = lean_ctor_get(x_177, 0); +x_180 = l_Lean_mkMData(x_174, x_179); +lean_ctor_set(x_177, 0, x_180); +return x_177; } else { -lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; -x_179 = lean_ctor_get(x_175, 0); -x_180 = lean_ctor_get(x_175, 1); -lean_inc(x_180); -lean_inc(x_179); -lean_dec(x_175); -x_181 = l_Lean_mkMData(x_172, x_179); -x_182 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_182, 0, x_181); -lean_ctor_set(x_182, 1, x_180); -return x_182; +lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; +x_181 = lean_ctor_get(x_177, 0); +x_182 = lean_ctor_get(x_177, 1); +lean_inc(x_182); +lean_inc(x_181); +lean_dec(x_177); +x_183 = l_Lean_mkMData(x_174, x_181); +x_184 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_184, 0, x_183); +lean_ctor_set(x_184, 1, x_182); +return x_184; } } else { -uint8_t x_183; -lean_dec(x_172); -x_183 = !lean_is_exclusive(x_175); -if (x_183 == 0) -{ -return x_175; -} -else -{ -lean_object* x_184; lean_object* x_185; lean_object* x_186; -x_184 = lean_ctor_get(x_175, 0); -x_185 = lean_ctor_get(x_175, 1); -lean_inc(x_185); -lean_inc(x_184); -lean_dec(x_175); -x_186 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_186, 0, x_184); -lean_ctor_set(x_186, 1, x_185); -return x_186; -} -} -} -else -{ -lean_object* x_187; uint8_t x_188; -lean_dec(x_172); -x_187 = lean_ctor_get(x_174, 0); -lean_inc(x_187); +uint8_t x_185; lean_dec(x_174); -x_188 = !lean_is_exclusive(x_9); -if (x_188 == 0) +x_185 = !lean_is_exclusive(x_177); +if (x_185 == 0) { -lean_object* x_189; lean_object* x_190; -x_189 = lean_ctor_get(x_9, 3); -x_190 = l_Lean_replaceRef(x_187, x_189); +return x_177; +} +else +{ +lean_object* x_186; lean_object* x_187; lean_object* x_188; +x_186 = lean_ctor_get(x_177, 0); +x_187 = lean_ctor_get(x_177, 1); +lean_inc(x_187); +lean_inc(x_186); +lean_dec(x_177); +x_188 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_188, 0, x_186); +lean_ctor_set(x_188, 1, x_187); +return x_188; +} +} +} +else +{ +lean_object* x_189; uint8_t x_190; +lean_dec(x_174); +x_189 = lean_ctor_get(x_176, 0); +lean_inc(x_189); +lean_dec(x_176); +x_190 = !lean_is_exclusive(x_10); +if (x_190 == 0) +{ +lean_object* x_191; lean_object* x_192; +x_191 = lean_ctor_get(x_10, 3); +x_192 = l_Lean_replaceRef(x_189, x_191); +lean_dec(x_191); lean_dec(x_189); -lean_dec(x_187); -lean_ctor_set(x_9, 3, x_190); -x_4 = x_173; +lean_ctor_set(x_10, 3, x_192); +x_5 = x_175; goto _start; } else { -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; -x_192 = lean_ctor_get(x_9, 0); -x_193 = lean_ctor_get(x_9, 1); -x_194 = lean_ctor_get(x_9, 2); -x_195 = lean_ctor_get(x_9, 3); -x_196 = lean_ctor_get(x_9, 4); -x_197 = lean_ctor_get(x_9, 5); -x_198 = lean_ctor_get(x_9, 6); -x_199 = lean_ctor_get(x_9, 7); +lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; +x_194 = lean_ctor_get(x_10, 0); +x_195 = lean_ctor_get(x_10, 1); +x_196 = lean_ctor_get(x_10, 2); +x_197 = lean_ctor_get(x_10, 3); +x_198 = lean_ctor_get(x_10, 4); +x_199 = lean_ctor_get(x_10, 5); +x_200 = lean_ctor_get(x_10, 6); +x_201 = lean_ctor_get(x_10, 7); +lean_inc(x_201); +lean_inc(x_200); lean_inc(x_199); lean_inc(x_198); lean_inc(x_197); lean_inc(x_196); lean_inc(x_195); lean_inc(x_194); -lean_inc(x_193); -lean_inc(x_192); -lean_dec(x_9); -x_200 = l_Lean_replaceRef(x_187, x_195); -lean_dec(x_195); -lean_dec(x_187); -x_201 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_201, 0, x_192); -lean_ctor_set(x_201, 1, x_193); -lean_ctor_set(x_201, 2, x_194); -lean_ctor_set(x_201, 3, x_200); -lean_ctor_set(x_201, 4, x_196); -lean_ctor_set(x_201, 5, x_197); -lean_ctor_set(x_201, 6, x_198); -lean_ctor_set(x_201, 7, x_199); -x_4 = x_173; -x_9 = x_201; +lean_dec(x_10); +x_202 = l_Lean_replaceRef(x_189, x_197); +lean_dec(x_197); +lean_dec(x_189); +x_203 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_203, 0, x_194); +lean_ctor_set(x_203, 1, x_195); +lean_ctor_set(x_203, 2, x_196); +lean_ctor_set(x_203, 3, x_202); +lean_ctor_set(x_203, 4, x_198); +lean_ctor_set(x_203, 5, x_199); +lean_ctor_set(x_203, 6, x_200); +lean_ctor_set(x_203, 7, x_201); +x_5 = x_175; +x_10 = x_203; goto _start; } } } case 11: { -lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; -x_203 = lean_ctor_get(x_4, 0); -lean_inc(x_203); -x_204 = lean_ctor_get(x_4, 1); -lean_inc(x_204); -x_205 = lean_ctor_get(x_4, 2); +lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; +x_205 = lean_ctor_get(x_5, 0); lean_inc(x_205); -lean_dec(x_4); -x_206 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_205, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_206) == 0) +x_206 = lean_ctor_get(x_5, 1); +lean_inc(x_206); +x_207 = lean_ctor_get(x_5, 2); +lean_inc(x_207); +lean_dec(x_5); +x_208 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_207, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_208) == 0) { -uint8_t x_207; -x_207 = !lean_is_exclusive(x_206); -if (x_207 == 0) +uint8_t x_209; +x_209 = !lean_is_exclusive(x_208); +if (x_209 == 0) { -lean_object* x_208; lean_object* x_209; -x_208 = lean_ctor_get(x_206, 0); -x_209 = l_Lean_mkProj(x_203, x_204, x_208); -lean_ctor_set(x_206, 0, x_209); -return x_206; +lean_object* x_210; lean_object* x_211; +x_210 = lean_ctor_get(x_208, 0); +x_211 = l_Lean_mkProj(x_205, x_206, x_210); +lean_ctor_set(x_208, 0, x_211); +return x_208; } else { -lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; -x_210 = lean_ctor_get(x_206, 0); -x_211 = lean_ctor_get(x_206, 1); -lean_inc(x_211); -lean_inc(x_210); +lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; +x_212 = lean_ctor_get(x_208, 0); +x_213 = lean_ctor_get(x_208, 1); +lean_inc(x_213); +lean_inc(x_212); +lean_dec(x_208); +x_214 = l_Lean_mkProj(x_205, x_206, x_212); +x_215 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_215, 0, x_214); +lean_ctor_set(x_215, 1, x_213); +return x_215; +} +} +else +{ +uint8_t x_216; lean_dec(x_206); -x_212 = l_Lean_mkProj(x_203, x_204, x_210); -x_213 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_213, 0, x_212); -lean_ctor_set(x_213, 1, x_211); -return x_213; -} +lean_dec(x_205); +x_216 = !lean_is_exclusive(x_208); +if (x_216 == 0) +{ +return x_208; } else { -uint8_t x_214; -lean_dec(x_204); -lean_dec(x_203); -x_214 = !lean_is_exclusive(x_206); -if (x_214 == 0) -{ -return x_206; -} -else -{ -lean_object* x_215; lean_object* x_216; lean_object* x_217; -x_215 = lean_ctor_get(x_206, 0); -x_216 = lean_ctor_get(x_206, 1); -lean_inc(x_216); -lean_inc(x_215); -lean_dec(x_206); -x_217 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_217, 0, x_215); -lean_ctor_set(x_217, 1, x_216); -return x_217; +lean_object* x_217; lean_object* x_218; lean_object* x_219; +x_217 = lean_ctor_get(x_208, 0); +x_218 = lean_ctor_get(x_208, 1); +lean_inc(x_218); +lean_inc(x_217); +lean_dec(x_208); +x_219 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_219, 0, x_217); +lean_ctor_set(x_219, 1, x_218); +return x_219; } } } default: { -lean_object* x_218; +lean_object* x_220; +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_218 = l_Lean_Elab_ensureNoRecFn(x_1, x_4, x_7, x_8, x_9, x_10, x_11); -return x_218; +x_220 = l_Lean_Elab_ensureNoRecFn(x_1, x_5, x_8, x_9, x_10, x_11, x_12); +return x_220; } } } @@ -4646,156 +4720,156 @@ lean_dec(x_2); return x_9; } } -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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, lean_object* x_13) { +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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, lean_object* x_13, lean_object* x_14) { _start: { -size_t x_14; size_t x_15; lean_object* x_16; -x_14 = lean_unbox_usize(x_4); -lean_dec(x_4); +size_t x_15; size_t x_16; lean_object* x_17; x_15 = lean_unbox_usize(x_5); lean_dec(x_5); -x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__3(x_1, x_2, x_3, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -return x_16; -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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, lean_object* x_13) { -_start: -{ -size_t x_14; size_t x_15; lean_object* x_16; -x_14 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_15 = lean_unbox_usize(x_5); -lean_dec(x_5); -x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__4(x_1, x_2, x_3, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -return x_16; -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6___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: -{ -size_t x_14; size_t x_15; lean_object* x_16; -x_14 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_15 = lean_unbox_usize(x_5); -lean_dec(x_5); -x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6(x_1, x_2, x_3, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -return x_16; -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7___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: -{ -size_t x_14; size_t x_15; lean_object* x_16; -x_14 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_15 = lean_unbox_usize(x_5); -lean_dec(x_5); -x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7(x_1, x_2, x_3, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -return x_16; -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9___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: -{ -size_t x_14; size_t x_15; lean_object* x_16; -x_14 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_15 = lean_unbox_usize(x_5); -lean_dec(x_5); -x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9(x_1, x_2, x_3, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -return x_16; -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__10___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: -{ -size_t x_14; size_t x_15; lean_object* x_16; -x_14 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_15 = lean_unbox_usize(x_5); -lean_dec(x_5); -x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__10(x_1, x_2, x_3, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -return x_16; -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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_16 = lean_unbox_usize(x_6); lean_dec(x_6); -lean_dec(x_1); -return x_14; +x_17 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__3(x_1, x_2, x_3, x_4, x_15, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +return x_17; } } -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__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, 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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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, lean_object* x_13, lean_object* x_14) { +_start: +{ +size_t x_15; size_t x_16; lean_object* x_17; +x_15 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_16 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_17 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__4(x_1, x_2, x_3, x_4, x_15, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +return x_17; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6___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: +{ +size_t x_15; size_t x_16; lean_object* x_17; +x_15 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_16 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_17 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__6(x_1, x_2, x_3, x_4, x_15, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +return x_17; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7___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: +{ +size_t x_15; size_t x_16; lean_object* x_17; +x_15 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_16 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_17 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__7(x_1, x_2, x_3, x_4, x_15, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +return x_17; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9___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: +{ +size_t x_15; size_t x_16; lean_object* x_17; +x_15 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_16 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_17 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__9(x_1, x_2, x_3, x_4, x_15, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +return x_17; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__10___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: +{ +size_t x_15; size_t x_16; lean_object* x_17; +x_15 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_16 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_17 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__10(x_1, x_2, x_3, x_4, x_15, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +return x_17; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { lean_object* x_15; -x_15 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2(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 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___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); +lean_dec(x_7); lean_dec(x_1); return x_15; } } -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__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_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__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, 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: { -size_t x_14; size_t x_15; lean_object* x_16; -x_14 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_15 = lean_unbox_usize(x_5); -lean_dec(x_5); -x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13(x_1, x_2, x_3, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_object* x_16; +x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2(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_1); return x_16; } } -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__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, lean_object* x_12, lean_object* x_13) { +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__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: { -size_t x_14; size_t x_15; lean_object* x_16; -x_14 = lean_unbox_usize(x_4); -lean_dec(x_4); +size_t x_15; size_t x_16; lean_object* x_17; x_15 = lean_unbox_usize(x_5); lean_dec(x_5); -x_16 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__14(x_1, x_2, x_3, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -return x_16; +x_16 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_17 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13(x_1, x_2, x_3, x_4, x_15, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +return x_17; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__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, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +_start: +{ +size_t x_15; size_t x_16; lean_object* x_17; +x_15 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_16 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_17 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__14(x_1, x_2, x_3, x_4, x_15, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +return x_17; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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, 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___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__2(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_1); +return x_14; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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, 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___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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, x_13); +lean_dec(x_1); +return x_14; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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, lean_object* x_13) { +_start: +{ +lean_object* x_14; +x_14 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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, x_13); +lean_dec(x_1); +return x_14; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps(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___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__2(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_1); +x_13 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); return x_13; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { -_start: -{ -lean_object* x_13; -x_13 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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_1); -return x_13; -} -} -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___lambda__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_1); -return x_13; -} -} -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps(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___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -return x_12; -} -} LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___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) { _start: { @@ -5122,7 +5196,7 @@ static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Ela _start: { lean_object* x_1; -x_1 = lean_mk_string("Sum"); +x_1 = lean_mk_string("PSum"); return x_1; } } @@ -5390,7 +5464,7 @@ lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_44); -x_70 = l_Lean_Meta_getDecLevel(x_44, x_7, x_8, x_9, x_10, x_69); +x_70 = l_Lean_Meta_getLevel(x_44, x_7, x_8, x_9, x_10, x_69); if (lean_obj_tag(x_70) == 0) { lean_object* x_71; lean_object* x_72; lean_object* x_73; @@ -5400,7 +5474,7 @@ x_72 = lean_ctor_get(x_70, 1); lean_inc(x_72); lean_dec(x_70); lean_inc(x_45); -x_73 = l_Lean_Meta_getDecLevel(x_45, x_7, x_8, x_9, x_10, x_72); +x_73 = l_Lean_Meta_getLevel(x_45, x_7, x_8, x_9, x_10, x_72); if (lean_obj_tag(x_73) == 0) { uint8_t x_74; @@ -7483,163 +7557,287 @@ return x_68; } } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { -lean_object* x_13; lean_object* x_14; -x_13 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps), 11, 2); -lean_closure_set(x_13, 0, x_1); -lean_closure_set(x_13, 1, x_2); -x_14 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn(x_3, x_4, x_5, x_13, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -return x_14; -} -} -LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, uint8_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16, lean_object* x_17, lean_object* x_18) { -_start: -{ -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; uint8_t x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_19 = l_Lean_instInhabitedExpr; -x_20 = lean_unsigned_to_nat(0u); -x_21 = lean_array_get(x_19, x_10, x_20); -x_22 = lean_unsigned_to_nat(1u); -x_23 = lean_array_get(x_19, x_10, x_22); -x_24 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_applyDefaultDecrTactic___lambda__1___closed__4; -lean_inc(x_21); -x_25 = lean_array_push(x_24, x_21); -x_26 = 0; -x_27 = l_Lean_Expr_betaRev(x_1, x_25, x_26); -lean_dec(x_25); -lean_inc(x_2); -x_28 = lean_alloc_closure((void*)(l_Lean_Elab_WF_mkFix___lambda__2), 12, 2); -lean_closure_set(x_28, 0, x_2); -lean_closure_set(x_28, 1, x_3); -lean_inc(x_17); -lean_inc(x_16); -lean_inc(x_15); +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_14 = lean_ctor_get(x_1, 3); lean_inc(x_14); -lean_inc(x_23); -lean_inc(x_21); -x_29 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn(x_21, x_23, x_27, x_28, x_12, x_13, x_14, x_15, x_16, x_17, x_18); -if (lean_obj_tag(x_29) == 0) +lean_dec(x_1); +x_15 = lean_array_get_size(x_2); +x_16 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps), 12, 3); +lean_closure_set(x_16, 0, x_14); +lean_closure_set(x_16, 1, x_15); +lean_closure_set(x_16, 2, x_3); +x_17 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn(x_4, x_5, x_6, x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +return x_17; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___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, 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_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; lean_object* x_36; -x_30 = lean_ctor_get(x_29, 0); -lean_inc(x_30); -x_31 = lean_ctor_get(x_29, 1); -lean_inc(x_31); -lean_dec(x_29); -x_32 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___lambda__2___closed__1; -x_33 = lean_array_push(x_32, x_21); -x_34 = lean_array_push(x_33, x_23); -x_35 = 1; -x_36 = l_Lean_Meta_mkLambdaFVars(x_34, x_30, x_26, x_35, x_14, x_15, x_16, x_17, x_31); +lean_object* x_16; lean_object* x_17; +lean_inc(x_2); +x_16 = lean_alloc_closure((void*)(l_Lean_Elab_WF_mkFix___lambda__2___boxed), 13, 3); +lean_closure_set(x_16, 0, x_1); +lean_closure_set(x_16, 1, x_2); +lean_closure_set(x_16, 2, x_3); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_5); +lean_inc(x_4); +x_17 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn(x_4, x_5, x_6, x_16, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; uint8_t x_24; lean_object* x_25; +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_dec(x_16); -lean_dec(x_15); -if (lean_obj_tag(x_36) == 0) +x_20 = l___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processSumCasesOn___lambda__2___closed__1; +x_21 = lean_array_push(x_20, x_4); +x_22 = lean_array_push(x_21, x_5); +x_23 = 0; +x_24 = 1; +lean_inc(x_11); +x_25 = l_Lean_Meta_mkLambdaFVars(x_22, x_18, x_23, x_24, x_11, x_12, x_13, x_14, x_19); +if (lean_obj_tag(x_25) == 0) { -uint8_t x_37; -x_37 = !lean_is_exclusive(x_36); -if (x_37 == 0) -{ -lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_38 = lean_ctor_get(x_36, 0); -x_39 = l_Lean_mkApp(x_4, x_38); -x_40 = lean_alloc_ctor(0, 6, 1); -lean_ctor_set(x_40, 0, x_5); -lean_ctor_set(x_40, 1, x_7); -lean_ctor_set(x_40, 2, x_8); -lean_ctor_set(x_40, 3, x_2); -lean_ctor_set(x_40, 4, x_9); -lean_ctor_set(x_40, 5, x_39); -lean_ctor_set_uint8(x_40, sizeof(void*)*6, x_6); -lean_ctor_set(x_36, 0, x_40); -return x_36; -} -else -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_41 = lean_ctor_get(x_36, 0); -x_42 = lean_ctor_get(x_36, 1); -lean_inc(x_42); -lean_inc(x_41); -lean_dec(x_36); -x_43 = l_Lean_mkApp(x_4, x_41); -x_44 = lean_alloc_ctor(0, 6, 1); -lean_ctor_set(x_44, 0, x_5); -lean_ctor_set(x_44, 1, x_7); -lean_ctor_set(x_44, 2, x_8); -lean_ctor_set(x_44, 3, x_2); -lean_ctor_set(x_44, 4, x_9); -lean_ctor_set(x_44, 5, x_43); -lean_ctor_set_uint8(x_44, sizeof(void*)*6, x_6); -x_45 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_45, 0, x_44); -lean_ctor_set(x_45, 1, x_42); -return x_45; -} -} -else -{ -uint8_t x_46; -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_46 = !lean_is_exclusive(x_36); -if (x_46 == 0) -{ -return x_36; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_36, 0); -x_48 = lean_ctor_get(x_36, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_36); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -else -{ -uint8_t x_50; -lean_dec(x_23); -lean_dec(x_21); -lean_dec(x_17); -lean_dec(x_16); -lean_dec(x_15); +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +x_28 = l_Lean_mkApp(x_7, x_26); +x_29 = l_Lean_Meta_mkLambdaFVars(x_2, x_28, x_23, x_24, x_11, x_12, x_13, x_14, x_27); lean_dec(x_14); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_50 = !lean_is_exclusive(x_29); -if (x_50 == 0) -{ +lean_dec(x_13); +lean_dec(x_12); return x_29; } else { -lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_ctor_get(x_29, 0); -x_52 = lean_ctor_get(x_29, 1); -lean_inc(x_52); -lean_inc(x_51); -lean_dec(x_29); -x_53 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_53, 0, x_51); -lean_ctor_set(x_53, 1, x_52); -return x_53; +uint8_t x_30; +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_7); +lean_dec(x_2); +x_30 = !lean_is_exclusive(x_25); +if (x_30 == 0) +{ +return x_25; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_25, 0); +x_32 = lean_ctor_get(x_25, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_25); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; +} +} +} +else +{ +uint8_t x_34; +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_34 = !lean_is_exclusive(x_17); +if (x_34 == 0) +{ +return x_17; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_17, 0); +x_36 = lean_ctor_get(x_17, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_17); +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; +} +} +} +} +static lean_object* _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Elab"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_WF_mkFix___lambda__4___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_WF_mkFix___lambda__4___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("definition"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_WF_mkFix___lambda__4___closed__2; +x_2 = l_Lean_Elab_WF_mkFix___lambda__4___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("wf"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_WF_mkFix___lambda__4___closed__4; +x_2 = l_Lean_Elab_WF_mkFix___lambda__4___closed__5; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(">> val: "); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_WF_mkFix___lambda__4___closed__7; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__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, 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; uint8_t x_23; lean_object* x_24; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; +lean_dec(x_6); +x_14 = l_Lean_instInhabitedExpr; +x_15 = lean_unsigned_to_nat(0u); +x_16 = lean_array_get(x_14, x_5, x_15); +x_17 = lean_unsigned_to_nat(1u); +x_18 = lean_array_get(x_14, x_5, x_17); +lean_dec(x_5); +x_19 = lean_ctor_get(x_1, 5); +lean_inc(x_19); +lean_inc(x_16); +lean_inc(x_2); +x_20 = lean_array_push(x_2, x_16); +x_21 = l_Lean_Expr_beta(x_19, x_20); +x_22 = l_Lean_Elab_WF_mkFix___lambda__4___closed__6; +x_37 = lean_st_ref_get(x_12, x_13); +x_38 = lean_ctor_get(x_37, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_38, 3); +lean_inc(x_39); +lean_dec(x_38); +x_40 = lean_ctor_get_uint8(x_39, sizeof(void*)*1); +lean_dec(x_39); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_37, 1); +lean_inc(x_41); +lean_dec(x_37); +x_42 = 0; +x_23 = x_42; +x_24 = x_41; +goto block_36; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; +x_43 = lean_ctor_get(x_37, 1); +lean_inc(x_43); +lean_dec(x_37); +x_44 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_22, x_7, x_8, x_9, x_10, x_11, x_12, x_43); +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_23 = x_47; +x_24 = x_46; +goto block_36; +} +block_36: +{ +if (x_23 == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_box(0); +x_26 = l_Lean_Elab_WF_mkFix___lambda__3(x_1, x_2, x_3, x_16, x_18, x_21, x_4, x_25, x_7, x_8, x_9, x_10, x_11, x_12, x_24); +return x_26; +} +else +{ +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_inc(x_21); +x_27 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_27, 0, x_21); +x_28 = l_Lean_Elab_WF_mkFix___lambda__4___closed__8; +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_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__13___lambda__2___closed__6; +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_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_22, x_31, x_7, x_8, x_9, x_10, x_11, x_12, x_24); +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_Elab_WF_mkFix___lambda__3(x_1, x_2, x_3, x_16, x_18, x_21, x_4, x_33, x_7, x_8, x_9, x_10, x_11, x_12, x_34); +lean_dec(x_33); +return x_35; } } } @@ -7664,194 +7862,210 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix(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_11; uint8_t x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_11 = lean_ctor_get(x_1, 0); -lean_inc(x_11); -x_12 = lean_ctor_get_uint8(x_1, sizeof(void*)*6); -x_13 = lean_ctor_get(x_1, 1); -lean_inc(x_13); -x_14 = lean_ctor_get(x_1, 2); -lean_inc(x_14); -x_15 = lean_ctor_get(x_1, 3); +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_1, 4); +lean_inc(x_12); +x_13 = lean_unsigned_to_nat(0u); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_14 = l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(x_2, x_13, x_12, x_7, x_8, x_9, x_10, 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; +x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); -x_16 = lean_ctor_get(x_1, 4); +x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); -x_17 = lean_ctor_get(x_1, 5); -lean_inc(x_17); -lean_dec(x_1); -x_18 = lean_alloc_closure((void*)(l_Lean_Elab_WF_mkFix___lambda__1___boxed), 10, 1); -lean_closure_set(x_18, 0, x_2); -x_19 = l_Lean_Elab_WF_mkFix___closed__1; +lean_dec(x_14); +x_17 = lean_alloc_closure((void*)(l_Lean_Elab_WF_mkFix___lambda__1___boxed), 10, 1); +lean_closure_set(x_17, 0, x_3); +x_18 = l_Lean_Elab_WF_mkFix___closed__1; +lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_16); -x_20 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(x_16, x_19, x_18, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -if (lean_obj_tag(x_20) == 0) +x_19 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(x_15, x_18, x_17, x_5, x_6, x_7, x_8, x_9, x_10, x_16); +if (lean_obj_tag(x_19) == 0) { -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_20, 0); +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); -x_22 = lean_ctor_get(x_20, 1); -lean_inc(x_22); -lean_dec(x_20); +lean_dec(x_19); +lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_21); -x_23 = lean_infer_type(x_21, x_6, x_7, x_8, x_9, x_22); -if (lean_obj_tag(x_23) == 0) +lean_inc(x_20); +x_22 = lean_infer_type(x_20, x_7, x_8, x_9, x_10, x_21); +if (lean_obj_tag(x_22) == 0) { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_23, 0); +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); lean_inc(x_24); -x_25 = lean_ctor_get(x_23, 1); -lean_inc(x_25); -lean_dec(x_23); +lean_dec(x_22); +lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); -lean_inc(x_6); -x_26 = lean_whnf(x_24, x_6, x_7, x_8, x_9, x_25); -if (lean_obj_tag(x_26) == 0) +x_25 = lean_whnf(x_23, x_7, x_8, x_9, x_10, x_24); +if (lean_obj_tag(x_25) == 0) { -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_27 = lean_ctor_get(x_26, 0); +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_25, 1); lean_inc(x_27); -x_28 = lean_ctor_get(x_26, 1); -lean_inc(x_28); +lean_dec(x_25); +x_28 = l_Lean_Expr_bindingDomain_x21(x_26); lean_dec(x_26); -x_29 = l_Lean_Expr_bindingDomain_x21(x_27); -lean_dec(x_27); -x_30 = lean_box(x_12); -x_31 = lean_alloc_closure((void*)(l_Lean_Elab_WF_mkFix___lambda__3___boxed), 18, 9); -lean_closure_set(x_31, 0, x_17); -lean_closure_set(x_31, 1, x_15); -lean_closure_set(x_31, 2, x_3); -lean_closure_set(x_31, 3, x_21); -lean_closure_set(x_31, 4, x_11); -lean_closure_set(x_31, 5, x_30); -lean_closure_set(x_31, 6, x_13); -lean_closure_set(x_31, 7, x_14); -lean_closure_set(x_31, 8, x_16); -x_32 = l_Lean_Elab_WF_mkFix___closed__2; -x_33 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(x_29, x_32, x_31, x_4, x_5, x_6, x_7, x_8, x_9, x_28); -return x_33; +x_29 = lean_alloc_closure((void*)(l_Lean_Elab_WF_mkFix___lambda__4), 13, 4); +lean_closure_set(x_29, 0, x_1); +lean_closure_set(x_29, 1, x_2); +lean_closure_set(x_29, 2, x_4); +lean_closure_set(x_29, 3, x_20); +x_30 = l_Lean_Elab_WF_mkFix___closed__2; +x_31 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(x_28, x_30, x_29, x_5, x_6, x_7, x_8, x_9, x_10, x_27); +return x_31; } else { -uint8_t x_34; -lean_dec(x_21); -lean_dec(x_17); -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_11); -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); -x_34 = !lean_is_exclusive(x_26); -if (x_34 == 0) -{ -return x_26; -} -else -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_26, 0); -x_36 = lean_ctor_get(x_26, 1); -lean_inc(x_36); -lean_inc(x_35); -lean_dec(x_26); -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; -} -} -} -else -{ -uint8_t x_38; -lean_dec(x_21); -lean_dec(x_17); -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_11); -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); -x_38 = !lean_is_exclusive(x_23); -if (x_38 == 0) -{ -return x_23; -} -else -{ -lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_39 = lean_ctor_get(x_23, 0); -x_40 = lean_ctor_get(x_23, 1); -lean_inc(x_40); -lean_inc(x_39); -lean_dec(x_23); -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_42; -lean_dec(x_17); -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_11); -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); -x_42 = !lean_is_exclusive(x_20); -if (x_42 == 0) -{ -return x_20; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_20, 0); -x_44 = lean_ctor_get(x_20, 1); -lean_inc(x_44); -lean_inc(x_43); +uint8_t x_32; lean_dec(x_20); -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; +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_4); +lean_dec(x_2); +lean_dec(x_1); +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_20); +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_4); +lean_dec(x_2); +lean_dec(x_1); +x_36 = !lean_is_exclusive(x_22); +if (x_36 == 0) +{ +return x_22; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_22, 0); +x_38 = lean_ctor_get(x_22, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_22); +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_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_2); +lean_dec(x_1); +x_40 = !lean_is_exclusive(x_19); +if (x_40 == 0) +{ +return x_19; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_19, 0); +x_42 = lean_ctor_get(x_19, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_19); +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_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); +lean_dec(x_2); +lean_dec(x_1); +x_44 = !lean_is_exclusive(x_14); +if (x_44 == 0) +{ +return x_14; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_14, 0); +x_46 = lean_ctor_get(x_14, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_14); +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; } } } @@ -7867,34 +8081,22 @@ lean_dec(x_2); return x_11; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__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]; -lean_object* x_18 = _args[17]; +LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { -uint8_t x_19; lean_object* x_20; -x_19 = lean_unbox(x_6); -lean_dec(x_6); -x_20 = l_Lean_Elab_WF_mkFix___lambda__3(x_1, x_2, x_3, x_4, x_5, x_19, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_18); -lean_dec(x_11); -lean_dec(x_10); -return x_20; +lean_object* x_14; +x_14 = l_Lean_Elab_WF_mkFix___lambda__2(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_2); +return x_14; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkFix___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, 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_Lean_Elab_WF_mkFix___lambda__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, x_13, x_14, x_15); +lean_dec(x_8); +return x_16; } } lean_object* initialize_Init(uint8_t builtin, lean_object*); @@ -8026,6 +8228,22 @@ l_Lean_Elab_WF_mkFix___lambda__1___closed__5 = _init_l_Lean_Elab_WF_mkFix___lamb lean_mark_persistent(l_Lean_Elab_WF_mkFix___lambda__1___closed__5); l_Lean_Elab_WF_mkFix___lambda__1___closed__6 = _init_l_Lean_Elab_WF_mkFix___lambda__1___closed__6(); lean_mark_persistent(l_Lean_Elab_WF_mkFix___lambda__1___closed__6); +l_Lean_Elab_WF_mkFix___lambda__4___closed__1 = _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__1(); +lean_mark_persistent(l_Lean_Elab_WF_mkFix___lambda__4___closed__1); +l_Lean_Elab_WF_mkFix___lambda__4___closed__2 = _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__2(); +lean_mark_persistent(l_Lean_Elab_WF_mkFix___lambda__4___closed__2); +l_Lean_Elab_WF_mkFix___lambda__4___closed__3 = _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__3(); +lean_mark_persistent(l_Lean_Elab_WF_mkFix___lambda__4___closed__3); +l_Lean_Elab_WF_mkFix___lambda__4___closed__4 = _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__4(); +lean_mark_persistent(l_Lean_Elab_WF_mkFix___lambda__4___closed__4); +l_Lean_Elab_WF_mkFix___lambda__4___closed__5 = _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__5(); +lean_mark_persistent(l_Lean_Elab_WF_mkFix___lambda__4___closed__5); +l_Lean_Elab_WF_mkFix___lambda__4___closed__6 = _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__6(); +lean_mark_persistent(l_Lean_Elab_WF_mkFix___lambda__4___closed__6); +l_Lean_Elab_WF_mkFix___lambda__4___closed__7 = _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__7(); +lean_mark_persistent(l_Lean_Elab_WF_mkFix___lambda__4___closed__7); +l_Lean_Elab_WF_mkFix___lambda__4___closed__8 = _init_l_Lean_Elab_WF_mkFix___lambda__4___closed__8(); +lean_mark_persistent(l_Lean_Elab_WF_mkFix___lambda__4___closed__8); l_Lean_Elab_WF_mkFix___closed__1 = _init_l_Lean_Elab_WF_mkFix___closed__1(); lean_mark_persistent(l_Lean_Elab_WF_mkFix___closed__1); l_Lean_Elab_WF_mkFix___closed__2 = _init_l_Lean_Elab_WF_mkFix___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/WF/Main.c b/stage0/stdlib/Lean/Elab/PreDefinition/WF/Main.c index 8a2a0dcb11..45dae83f4c 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/WF/Main.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/WF/Main.c @@ -16,195 +16,261 @@ extern "C" { lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); size_t lean_usize_add(size_t, size_t); lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___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_stringToMessageData(lean_object*); lean_object* l_Lean_Elab_addAsAxiom(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* l_Lean_mkSort(lean_object*); -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__6; static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__12; lean_object* lean_name_mk_string(lean_object*, lean_object*); +uint8_t lean_usize_dec_eq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_Lean_Expr_bindingDomain_x21(lean_object*); +lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix___spec__1(size_t, size_t, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___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*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__3; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___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* lean_array_uset(lean_object*, size_t, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2___closed__1; static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__11; +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___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_st_ref_get(lean_object*, lean_object*); -static lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___closed__1; -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__5; -static lean_object* l_Lean_Elab_wfRecursion___closed__4; -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__3(lean_object*, lean_object*, 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_name_eq(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_wfRecursion___lambda__4___closed__3; static lean_object* l_Lean_Elab_wfRecursion___closed__1; -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__10; +uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*); +lean_object* lean_expr_instantiate1(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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope_go___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); -lean_object* l_Lean_Elab_WF_packMutual(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_eraseRecAppSyntax(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_instInhabitedTermElabM(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__6; +LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_WF_packMutual(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope(lean_object*); +lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_wfRecursion___lambda__1___closed__2; uint8_t lean_usize_dec_lt(size_t, size_t); -LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___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_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withCommonTelescope_go___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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*); +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1; extern lean_object* l_Lean_levelZero; lean_object* lean_nat_add(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope_go___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__7; -static lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__2; -static lean_object* l_Lean_Elab_wfRecursion___closed__3; +lean_object* l_Lean_mkAppN(lean_object*, lean_object*); lean_object* l_Lean_Elab_applyAttributesOf(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__10; lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_addAndCompileUnsafe___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_fget(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__2(lean_object*, lean_object*, size_t, size_t, 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_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda_loop___spec__1___rarg(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_st_ref_take(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_constLevels_x21(lean_object*); -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__3; -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3(lean_object*, 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*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___closed__1; lean_object* l_Lean_Elab_WF_mkUnaryArg_go___boxed(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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkLambdaFVars(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__9; +lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_WF_registerEqnsInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_998_(lean_object*); +lean_object* l_Nat_repr(lean_object*); +lean_object* lean_st_mk_ref(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__3(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_1950_(lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__10; +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_instInhabitedPreDefinition; lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_wfRecursion___lambda__1___closed__1; +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__3; extern lean_object* l_Lean_instInhabitedExpr; -static lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__3; lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___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*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__6; -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2___closed__1; -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__4; -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__9; -LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_WF_elabWFRel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__3(lean_object*, size_t, size_t); +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__5; +lean_object* l_Lean_Core_transform___at_Lean_Core_betaReduce___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_getFixedPrefix___spec__1(lean_object*, lean_object*, size_t, size_t); +lean_object* l_Lean_Elab_WF_elabWFRel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_Elab_addAndCompilePartialRec(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Expr_isLambda(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*); -static lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1; +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withCommonTelescope_go___spec__1(lean_object*, size_t, size_t, lean_object*); lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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_Elab_eraseRecAppSyntaxExpr___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__5; -static lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__1; +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_getFixedPrefix___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppNumArgsAux(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*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__3; +lean_object* l_Lean_Expr_bindingName_x21(lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__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* l_Lean_mkApp(lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__2; -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__1; -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_wfRecursion___closed__2; +lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope_go(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__8; +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___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*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_wfRecursion___lambda__4___closed__1; +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__2; +static lean_object* l_Lean_Elab_wfRecursion___lambda__4___closed__2; +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__1; lean_object* l_List_mapTRAux___at_Lean_mkConstWithLevelParams___spec__1(lean_object*, lean_object*); +lean_object* l_Array_ofSubarray___rarg(lean_object*); +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___closed__1; lean_object* l_Lean_Meta_lambdaTelescope___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_replaceRecApps_loop___spec__12___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*); +static lean_object* l_Lean_Elab_wfRecursion___lambda__2___closed__2; static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__9; -lean_object* lean_panic_fn(lean_object*, lean_object*); +static lean_object* l_Lean_Elab_wfRecursion___lambda__2___closed__1; +lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__2; +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2___closed__1; +lean_object* l_Lean_Meta_forEachExpr_x27(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__1; +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__4; lean_object* lean_mk_array(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__4; -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__7; +uint8_t l___private_Lean_Expr_0__Lean_beqBinderInfo____x40_Lean_Expr___hyg_356_(uint8_t, uint8_t); +uint8_t l_Lean_Expr_binderInfo(lean_object*); +static lean_object* l_Lean_Elab_getFixedPrefix___lambda__2___closed__1; +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__2; +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_wfRecursion___lambda__4___closed__4; lean_object* l_Lean_Meta_whnfD(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_eraseRecAppSyntaxExpr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__3___boxed(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__8; lean_object* l_panic___at_Lean_Meta_whnfCore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_WF_mkFix(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_bindingBody_x21(lean_object*); +lean_object* l_Lean_Elab_WF_mkFix(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkConst(lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__2___closed__1; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__8; +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__7; +LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_withCommonTelescope___rarg___closed__1; lean_object* l_Lean_mkApp3(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__2; static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1; -lean_object* l_Lean_Elab_WF_packDomain(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_WF_packDomain(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; +lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; lean_object* x_13; lean_object* x_14; +x_9 = lean_array_get_size(x_2); +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_1, x_10); +x_12 = lean_nat_dec_eq(x_9, x_11); +lean_dec(x_11); +lean_dec(x_9); +x_13 = lean_box(x_12); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_8); +return x_14; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef(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; x_8 = lean_array_get_size(x_1); x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_dec_eq(x_8, x_9); lean_dec(x_8); -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_7); -return x_12; -} -} -static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___closed__1() { -_start: +if (x_10 == 0) { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1___boxed), 7, 0); -return x_1; -} -} -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef(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_array_get_size(x_1); -x_8 = lean_unsigned_to_nat(1u); -x_9 = lean_nat_dec_eq(x_7, x_8); -lean_dec(x_7); -if (x_9 == 0) -{ -uint8_t x_10; lean_object* x_11; lean_object* x_12; +uint8_t x_11; lean_object* x_12; lean_object* x_13; +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_10 = 0; -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_6); -return x_12; +x_11 = 0; +x_12 = lean_box(x_11); +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_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_13 = l_Lean_Elab_instInhabitedPreDefinition; -x_14 = lean_unsigned_to_nat(0u); -x_15 = lean_array_get(x_13, x_1, x_14); -x_16 = lean_ctor_get(x_15, 5); -lean_inc(x_16); -lean_dec(x_15); -x_17 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___closed__1; -x_18 = l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__2___rarg(x_16, x_17, x_2, x_3, x_4, x_5, x_6); -return x_18; +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_14 = l_Lean_Elab_instInhabitedPreDefinition; +x_15 = lean_unsigned_to_nat(0u); +x_16 = lean_array_get(x_14, x_1, x_15); +x_17 = lean_ctor_get(x_16, 5); +lean_inc(x_17); +lean_dec(x_16); +x_18 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1___boxed), 8, 1); +lean_closure_set(x_18, 0, x_2); +x_19 = l_Lean_Meta_lambdaTelescope___at_Lean_Meta_MatcherApp_addArg___spec__2___rarg(x_17, x_18, x_3, x_4, x_5, x_6, x_7); +return x_19; } } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___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) { _start: { -lean_object* x_8; -x_8 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_object* x_9; +x_9 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___lambda__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); lean_dec(x_2); lean_dec(x_1); -return x_8; +return x_9; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { -lean_object* x_7; -x_7 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef(x_1, x_2, x_3, x_4, x_5, x_6); +lean_object* x_8; +x_8 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_1); -return x_7; +return x_8; } } static lean_object* _init_l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1() { @@ -266,7 +332,7 @@ static lean_object* _init_l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDef _start: { lean_object* x_1; -x_1 = lean_mk_string("Sum"); +x_1 = lean_mk_string("PSum"); return x_1; } } @@ -613,91 +679,185 @@ lean_dec(x_1); return x_11; } } -static lean_object* _init_l_panic___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__1() { _start: { lean_object* x_1; -x_1 = l_Lean_Elab_Term_instInhabitedTermElabM(lean_box(0)); +x_1 = lean_mk_string("_private.Lean.Elab.PreDefinition.WF.Main.0.Lean.Elab.addNonRecPreDefs"); return x_1; } } -LEAN_EXPORT lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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) { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__2() { _start: { -lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_9 = l_panic___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1; -x_10 = lean_panic_fn(x_9, x_1); -x_11 = lean_apply_7(x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -return x_11; +lean_object* x_1; +x_1 = lean_mk_string("unreachable code has been reached"); +return x_1; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___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) { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__3() { _start: { -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_unsigned_to_nat(0u); +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__4; +x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__1; +x_3 = lean_unsigned_to_nat(45u); +x_4 = lean_unsigned_to_nat(102u); +x_5 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__2; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +_start: +{ +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; +x_15 = lean_array_get_size(x_6); +lean_inc(x_1); lean_inc(x_6); -x_16 = lean_alloc_closure((void*)(l_Lean_Elab_WF_mkUnaryArg_go___boxed), 8, 2); -lean_closure_set(x_16, 0, x_6); -lean_closure_set(x_16, 1, x_15); +x_16 = l_Array_toSubarray___rarg(x_6, x_1, x_15); +x_17 = l_Array_ofSubarray___rarg(x_16); +x_18 = lean_unsigned_to_nat(0u); +x_19 = lean_alloc_closure((void*)(l_Lean_Elab_WF_mkUnaryArg_go___boxed), 8, 2); +lean_closure_set(x_19, 0, x_17); +lean_closure_set(x_19, 1, x_18); +x_20 = lean_ctor_get(x_2, 4); +lean_inc(x_20); +lean_inc(x_6); +x_21 = l_Array_toSubarray___rarg(x_6, x_18, x_1); +x_22 = l_Array_ofSubarray___rarg(x_21); lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); -x_17 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum(x_1, x_2, x_16, x_15, x_3, x_10, x_11, x_12, x_13, x_14); -if (lean_obj_tag(x_17) == 0) +x_23 = l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(x_22, x_18, x_20, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_23) == 0) { -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; uint8_t x_24; lean_object* x_25; -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); -x_20 = lean_ctor_get(x_4, 3); -lean_inc(x_20); -lean_dec(x_4); -x_21 = l_Lean_mkConst(x_20, x_5); -x_22 = l_Lean_mkApp(x_21, x_18); -x_23 = 0; -x_24 = 1; -x_25 = l_Lean_Meta_mkLambdaFVars(x_6, x_22, x_23, x_24, x_10, x_11, x_12, x_13, x_19); +lean_object* x_24; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +if (lean_obj_tag(x_24) == 7) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +lean_dec(x_9); +lean_dec(x_8); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +x_27 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum(x_3, x_4, x_19, x_18, x_26, x_10, x_11, x_12, x_13, 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; uint8_t x_34; uint8_t x_35; lean_object* x_36; +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 = lean_ctor_get(x_2, 3); +lean_inc(x_30); +lean_dec(x_2); +x_31 = l_Lean_mkConst(x_30, x_5); +x_32 = l_Lean_mkAppN(x_31, x_22); +x_33 = l_Lean_mkApp(x_32, x_28); +x_34 = 0; +x_35 = 1; +x_36 = l_Lean_Meta_mkLambdaFVars(x_6, x_33, x_34, x_35, x_10, x_11, x_12, x_13, x_29); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); -return x_25; +return x_36; } else { -uint8_t x_26; +uint8_t x_37; +lean_dec(x_22); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_6); lean_dec(x_5); -lean_dec(x_4); -x_26 = !lean_is_exclusive(x_17); -if (x_26 == 0) +lean_dec(x_2); +x_37 = !lean_is_exclusive(x_27); +if (x_37 == 0) { -return x_17; +return x_27; } else { -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_17, 0); -x_28 = lean_ctor_get(x_17, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_17); -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* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_27, 0); +x_39 = lean_ctor_get(x_27, 1); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_27); +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +return x_40; +} +} +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +lean_dec(x_24); +lean_dec(x_22); +lean_dec(x_19); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +x_41 = lean_ctor_get(x_23, 1); +lean_inc(x_41); +lean_dec(x_23); +x_42 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__3; +x_43 = l_panic___at___private_Lean_Elab_PreDefinition_WF_Fix_0__Lean_Elab_WF_processPSigmaCasesOn___spec__1(x_42, x_8, x_9, x_10, x_11, x_12, x_13, x_41); +return x_43; +} +} +else +{ +uint8_t x_44; +lean_dec(x_22); +lean_dec(x_19); +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_6); +lean_dec(x_5); +lean_dec(x_2); +x_44 = !lean_is_exclusive(x_23); +if (x_44 == 0) +{ +return x_23; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_23, 0); +x_46 = lean_ctor_get(x_23, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_23); +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; } } } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2___closed__1() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2___closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -707,7 +867,7 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2(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) { +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2(lean_object* 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: { lean_object* x_16; uint8_t x_17; lean_object* x_18; @@ -730,7 +890,7 @@ if (x_19 == 0) lean_object* x_20; lean_object* x_21; x_20 = lean_ctor_get(x_18, 0); lean_dec(x_20); -x_21 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2___closed__1; +x_21 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2___closed__1; lean_ctor_set(x_18, 0, x_21); return x_18; } @@ -740,7 +900,7 @@ lean_object* x_22; lean_object* x_23; lean_object* x_24; x_22 = lean_ctor_get(x_18, 1); lean_inc(x_22); lean_dec(x_18); -x_23 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2___closed__1; +x_23 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2___closed__1; x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_22); @@ -771,7 +931,7 @@ return x_28; } } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__1() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1() { _start: { lean_object* x_1; @@ -779,17 +939,17 @@ x_1 = lean_mk_string("Elab"); return x_1; } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__2() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__1; +x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__3() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__3() { _start: { lean_object* x_1; @@ -797,17 +957,17 @@ x_1 = lean_mk_string("definition"); return x_1; } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__4() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__2; -x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__3; +x_1 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__2; +x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__3; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__5() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__5() { _start: { lean_object* x_1; @@ -815,17 +975,17 @@ x_1 = lean_mk_string("wf"); return x_1; } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__6() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__4; -x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__5; +x_1 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__4; +x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__5; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__7() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__7() { _start: { lean_object* x_1; @@ -833,16 +993,16 @@ x_1 = lean_mk_string(""); return x_1; } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__8() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__8() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__7; +x_1 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__7; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__9() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__9() { _start: { lean_object* x_1; @@ -850,16 +1010,16 @@ x_1 = lean_mk_string(" := "); return x_1; } } -static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__10() { +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__10() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__9; +x_1 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__9; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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, 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_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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) { _start: { uint8_t x_17; @@ -893,15 +1053,15 @@ x_30 = lean_ctor_get(x_23, 5); lean_inc(x_30); lean_dec(x_23); lean_inc(x_4); -lean_inc(x_2); -lean_inc(x_3); lean_inc(x_6); lean_inc(x_1); -x_31 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__1___boxed), 14, 5); -lean_closure_set(x_31, 0, x_1); -lean_closure_set(x_31, 1, x_6); -lean_closure_set(x_31, 2, x_3); -lean_closure_set(x_31, 3, x_2); +lean_inc(x_2); +lean_inc(x_3); +x_31 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___boxed), 14, 5); +lean_closure_set(x_31, 0, x_3); +lean_closure_set(x_31, 1, x_2); +lean_closure_set(x_31, 2, x_1); +lean_closure_set(x_31, 3, x_6); lean_closure_set(x_31, 4, x_4); lean_inc(x_15); lean_inc(x_14); @@ -918,7 +1078,7 @@ lean_inc(x_33); x_34 = lean_ctor_get(x_32, 1); lean_inc(x_34); lean_dec(x_32); -x_35 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__6; +x_35 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__6; x_83 = lean_st_ref_get(x_15, x_34); x_84 = lean_ctor_get(x_83, 0); lean_inc(x_84); @@ -968,7 +1128,7 @@ lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); -x_39 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2(x_24, x_25, x_26, x_27, x_28, x_29, x_33, x_38, x_10, x_11, x_12, x_13, x_14, x_15, x_37); +x_39 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2(x_24, x_25, x_26, x_27, x_28, x_29, x_33, x_38, x_10, x_11, x_12, x_13, x_14, x_15, x_37); if (lean_obj_tag(x_39) == 0) { lean_object* x_40; @@ -1075,11 +1235,11 @@ lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean lean_inc(x_28); x_55 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_55, 0, x_28); -x_56 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__8; +x_56 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__8; x_57 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_57, 0, x_56); lean_ctor_set(x_57, 1, x_55); -x_58 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__10; +x_58 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__10; x_59 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_59, 0, x_57); lean_ctor_set(x_59, 1, x_58); @@ -1104,7 +1264,7 @@ lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); -x_66 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2(x_24, x_25, x_26, x_27, x_28, x_29, x_33, x_64, x_10, x_11, x_12, x_13, x_14, x_15, x_65); +x_66 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2(x_24, x_25, x_26, x_27, x_28, x_29, x_33, x_64, x_10, x_11, x_12, x_13, x_14, x_15, x_65); lean_dec(x_64); if (lean_obj_tag(x_66) == 0) { @@ -1291,245 +1451,2403 @@ return x_99; } } } -static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__1() { +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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) { _start: { -lean_object* x_1; -x_1 = lean_mk_string("_private.Lean.Elab.PreDefinition.WF.Main.0.Lean.Elab.addNonRecPreDefs"); -return x_1; -} -} -static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__2() { -_start: +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_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +x_13 = lean_box(0); +x_14 = l_List_mapTRAux___at_Lean_mkConstWithLevelParams___spec__1(x_12, x_13); +x_15 = lean_array_get_size(x_2); +x_16 = lean_unsigned_to_nat(0u); +x_17 = lean_unsigned_to_nat(1u); +x_18 = lean_box(0); +lean_inc(x_15); +x_19 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1(x_2, x_1, x_3, x_14, x_15, x_16, x_15, x_17, x_18, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_15); +if (lean_obj_tag(x_19) == 0) { -lean_object* x_1; -x_1 = lean_mk_string("unreachable code has been reached"); -return x_1; -} -} -static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__3() { -_start: +uint8_t x_20; +x_20 = !lean_is_exclusive(x_19); +if (x_20 == 0) { -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_1 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__4; -x_2 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__1; -x_3 = lean_unsigned_to_nat(27u); -x_4 = lean_unsigned_to_nat(55u); -x_5 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__2; -x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); -return x_6; +lean_object* x_21; +x_21 = lean_ctor_get(x_19, 0); +lean_dec(x_21); +lean_ctor_set(x_19, 0, x_18); +return x_19; +} +else +{ +lean_object* x_22; lean_object* x_23; +x_22 = lean_ctor_get(x_19, 1); +lean_inc(x_22); +lean_dec(x_19); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_18); +lean_ctor_set(x_23, 1, x_22); +return x_23; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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) { +else +{ +uint8_t x_24; +x_24 = !lean_is_exclusive(x_19); +if (x_24 == 0) +{ +return x_19; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_19, 0); +x_26 = lean_ctor_get(x_19, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_19); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_26); +return x_27; +} +} +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs(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_dec(x_3); -x_11 = lean_ctor_get(x_1, 4); -lean_inc(x_11); -if (lean_obj_tag(x_11) == 7) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = lean_ctor_get(x_1, 1); -lean_inc(x_13); -x_14 = lean_box(0); -x_15 = l_List_mapTRAux___at_Lean_mkConstWithLevelParams___spec__1(x_13, x_14); -x_16 = lean_array_get_size(x_2); -x_17 = lean_unsigned_to_nat(0u); -x_18 = lean_unsigned_to_nat(1u); -x_19 = lean_box(0); -lean_inc(x_16); -x_20 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2(x_2, x_1, x_12, x_15, x_16, x_17, x_16, x_18, x_19, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -lean_dec(x_16); -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; -x_22 = lean_ctor_get(x_20, 0); -lean_dec(x_22); -lean_ctor_set(x_20, 0, x_19); -return x_20; -} -else -{ -lean_object* x_23; lean_object* x_24; -x_23 = lean_ctor_get(x_20, 1); -lean_inc(x_23); -lean_dec(x_20); -x_24 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_24, 0, x_19); -lean_ctor_set(x_24, 1, x_23); -return x_24; -} -} -else -{ -uint8_t x_25; -x_25 = !lean_is_exclusive(x_20); -if (x_25 == 0) -{ -return x_20; -} -else -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_20, 0); -x_27 = lean_ctor_get(x_20, 1); -lean_inc(x_27); -lean_inc(x_26); -lean_dec(x_20); -x_28 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_28, 0, x_26); -lean_ctor_set(x_28, 1, x_27); -return x_28; -} -} -} -else -{ -lean_object* x_29; lean_object* x_30; -lean_dec(x_11); -lean_dec(x_2); -lean_dec(x_1); -x_29 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__3; -x_30 = l_panic___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1(x_29, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -return x_30; -} -} -} -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs(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_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); -x_10 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef(x_1, x_5, x_6, x_7, x_8, x_9); -if (lean_obj_tag(x_10) == 0) +lean_inc(x_3); +x_11 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef(x_1, x_3, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_11) == 0) { -lean_object* x_11; uint8_t x_12; -x_11 = lean_ctor_get(x_10, 0); -lean_inc(x_11); -x_12 = lean_unbox(x_11); +lean_object* x_12; uint8_t x_13; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_unbox(x_12); +lean_dec(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_11, 1); +lean_inc(x_14); lean_dec(x_11); -if (x_12 == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = lean_ctor_get(x_10, 1); -lean_inc(x_13); -lean_dec(x_10); -x_14 = lean_box(0); -x_15 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1(x_2, x_1, x_14, x_3, x_4, x_5, x_6, x_7, x_8, x_13); -return x_15; +x_15 = lean_box(0); +x_16 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1(x_2, x_1, x_3, x_15, x_4, x_5, x_6, x_7, x_8, x_9, x_14); +return x_16; } else { -uint8_t x_16; -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_16 = !lean_is_exclusive(x_10); -if (x_16 == 0) -{ -lean_object* x_17; lean_object* x_18; -x_17 = lean_ctor_get(x_10, 0); -lean_dec(x_17); -x_18 = lean_box(0); -lean_ctor_set(x_10, 0, x_18); -return x_10; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_10, 1); -lean_inc(x_19); -lean_dec(x_10); -x_20 = lean_box(0); -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 -{ -uint8_t x_22; -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_22 = !lean_is_exclusive(x_10); -if (x_22 == 0) -{ -return x_10; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_10, 0); -x_24 = lean_ctor_get(x_10, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_10); -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_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { -_start: -{ -lean_object* x_15; -x_15 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___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); +uint8_t x_17; 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); lean_dec(x_2); lean_dec(x_1); +x_17 = !lean_is_exclusive(x_11); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; +x_18 = lean_ctor_get(x_11, 0); +lean_dec(x_18); +x_19 = lean_box(0); +lean_ctor_set(x_11, 0, x_19); +return x_11; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_11, 1); +lean_inc(x_20); +lean_dec(x_11); +x_21 = lean_box(0); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_20); +return x_22; +} +} +} +else +{ +uint8_t x_23; +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); +lean_dec(x_2); +lean_dec(x_1); +x_23 = !lean_is_exclusive(x_11); +if (x_23 == 0) +{ +return x_11; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_11, 0); +x_25 = lean_ctor_get(x_11, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_11); +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_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +_start: +{ +lean_object* x_15; +x_15 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___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); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_3); return x_15; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__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, 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_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__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, 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: { uint8_t x_16; lean_object* x_17; x_16 = lean_unbox(x_2); lean_dec(x_2); -x_17 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2(x_1, x_16, 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_17 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2(x_1, x_16, 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_8); return x_17; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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, 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_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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) { _start: { lean_object* x_17; -x_17 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2(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); +x_17 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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_dec(x_8); lean_dec(x_7); return x_17; } } +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___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) { +_start: +{ +lean_object* x_12; +x_12 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1(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_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withCommonTelescope_go___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = lean_usize_dec_lt(x_3, x_2); +if (x_5 == 0) +{ +return x_4; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; size_t x_11; size_t x_12; lean_object* x_13; +x_6 = lean_array_uget(x_4, x_3); +x_7 = lean_unsigned_to_nat(0u); +x_8 = lean_array_uset(x_4, x_3, x_7); +x_9 = l_Lean_Expr_bindingBody_x21(x_6); +lean_dec(x_6); +x_10 = lean_expr_instantiate1(x_9, x_1); +lean_dec(x_9); +x_11 = 1; +x_12 = lean_usize_add(x_3, x_11); +x_13 = lean_array_uset(x_8, x_3, x_10); +x_3 = x_12; +x_4 = x_13; +goto _start; +} +} +} +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__2(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +uint8_t x_12; +x_12 = lean_usize_dec_eq(x_3, x_4); +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; lean_object* x_19; +x_13 = lean_array_uget(x_2, x_3); +x_14 = l_Lean_Expr_bindingDomain_x21(x_13); +x_15 = l_Lean_instInhabitedExpr; +x_16 = lean_unsigned_to_nat(0u); +x_17 = lean_array_get(x_15, x_1, x_16); +x_18 = l_Lean_Expr_bindingDomain_x21(x_17); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_19 = l_Lean_Meta_isExprDefEq(x_14, x_18, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_19) == 0) +{ +uint8_t x_20; +x_20 = !lean_is_exclusive(x_19); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; +x_21 = lean_ctor_get(x_19, 0); +x_22 = lean_ctor_get(x_19, 1); +x_23 = l_Lean_Expr_bindingName_x21(x_13); +x_24 = l_Lean_Expr_bindingName_x21(x_17); +x_25 = lean_name_eq(x_23, x_24); +lean_dec(x_24); +lean_dec(x_23); +if (x_25 == 0) +{ +uint8_t x_26; lean_object* x_27; +lean_dec(x_21); +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_26 = 1; +x_27 = lean_box(x_26); +lean_ctor_set(x_19, 0, x_27); +return x_19; +} +else +{ +uint8_t x_28; uint8_t x_29; uint8_t x_30; +x_28 = l_Lean_Expr_binderInfo(x_13); +lean_dec(x_13); +x_29 = l_Lean_Expr_binderInfo(x_17); +lean_dec(x_17); +x_30 = l___private_Lean_Expr_0__Lean_beqBinderInfo____x40_Lean_Expr___hyg_356_(x_28, x_29); +if (x_30 == 0) +{ +uint8_t x_31; lean_object* x_32; +lean_dec(x_21); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_31 = 1; +x_32 = lean_box(x_31); +lean_ctor_set(x_19, 0, x_32); +return x_19; +} +else +{ +uint8_t x_33; +x_33 = lean_unbox(x_21); +lean_dec(x_21); +if (x_33 == 0) +{ +uint8_t x_34; lean_object* x_35; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_34 = 1; +x_35 = lean_box(x_34); +lean_ctor_set(x_19, 0, x_35); +return x_19; +} +else +{ +size_t x_36; size_t x_37; +lean_free_object(x_19); +x_36 = 1; +x_37 = lean_usize_add(x_3, x_36); +x_3 = x_37; +x_11 = x_22; +goto _start; +} +} +} +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; +x_39 = lean_ctor_get(x_19, 0); +x_40 = lean_ctor_get(x_19, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_19); +x_41 = l_Lean_Expr_bindingName_x21(x_13); +x_42 = l_Lean_Expr_bindingName_x21(x_17); +x_43 = lean_name_eq(x_41, x_42); +lean_dec(x_42); +lean_dec(x_41); +if (x_43 == 0) +{ +uint8_t x_44; lean_object* x_45; lean_object* x_46; +lean_dec(x_39); +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_44 = 1; +x_45 = lean_box(x_44); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_46, 1, x_40); +return x_46; +} +else +{ +uint8_t x_47; uint8_t x_48; uint8_t x_49; +x_47 = l_Lean_Expr_binderInfo(x_13); +lean_dec(x_13); +x_48 = l_Lean_Expr_binderInfo(x_17); +lean_dec(x_17); +x_49 = l___private_Lean_Expr_0__Lean_beqBinderInfo____x40_Lean_Expr___hyg_356_(x_47, x_48); +if (x_49 == 0) +{ +uint8_t x_50; lean_object* x_51; lean_object* x_52; +lean_dec(x_39); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_50 = 1; +x_51 = lean_box(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_40); +return x_52; +} +else +{ +uint8_t x_53; +x_53 = lean_unbox(x_39); +lean_dec(x_39); +if (x_53 == 0) +{ +uint8_t x_54; lean_object* x_55; lean_object* x_56; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_54 = 1; +x_55 = lean_box(x_54); +x_56 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_56, 0, x_55); +lean_ctor_set(x_56, 1, x_40); +return x_56; +} +else +{ +size_t x_57; size_t x_58; +x_57 = 1; +x_58 = lean_usize_add(x_3, x_57); +x_3 = x_58; +x_11 = x_40; +goto _start; +} +} +} +} +} +else +{ +uint8_t x_60; +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_60 = !lean_is_exclusive(x_19); +if (x_60 == 0) +{ +return x_19; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_19, 0); +x_62 = lean_ctor_get(x_19, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_19); +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_object* x_65; lean_object* x_66; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_64 = 0; +x_65 = lean_box(x_64); +x_66 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_66, 0, x_65); +lean_ctor_set(x_66, 1, x_11); +return x_66; +} +} +} +LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__3(lean_object* x_1, size_t x_2, size_t x_3) { +_start: +{ +uint8_t x_4; +x_4 = lean_usize_dec_eq(x_2, x_3); +if (x_4 == 0) +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_array_uget(x_1, x_2); +x_6 = l_Lean_Expr_isLambda(x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +uint8_t x_7; +x_7 = 1; +return x_7; +} +else +{ +size_t x_8; size_t x_9; +x_8 = 1; +x_9 = lean_usize_add(x_2, x_8); +x_2 = x_9; +goto _start; +} +} +else +{ +uint8_t x_11; +x_11 = 0; +return x_11; +} +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope_go___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* x_11, lean_object* x_12) { +_start: +{ +lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; +lean_inc(x_5); +x_13 = lean_array_push(x_1, x_5); +x_14 = lean_usize_of_nat(x_2); +lean_dec(x_2); +x_15 = 0; +x_16 = l_Array_mapMUnsafe_map___at_Lean_Elab_withCommonTelescope_go___spec__1(x_5, x_14, x_15, x_3); +lean_dec(x_5); +x_17 = l_Lean_Elab_withCommonTelescope_go___rarg(x_4, x_13, x_16, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +return x_17; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope_go___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_11; lean_object* x_43; lean_object* x_44; uint8_t x_45; +x_43 = lean_array_get_size(x_3); +x_44 = lean_unsigned_to_nat(0u); +x_45 = lean_nat_dec_lt(x_44, x_43); +if (x_45 == 0) +{ +lean_object* x_46; +lean_dec(x_43); +x_46 = lean_box(0); +x_11 = x_46; +goto block_42; +} +else +{ +uint8_t x_47; +x_47 = lean_nat_dec_le(x_43, x_43); +if (x_47 == 0) +{ +lean_object* x_48; +lean_dec(x_43); +x_48 = lean_box(0); +x_11 = x_48; +goto block_42; +} +else +{ +size_t x_49; size_t x_50; uint8_t x_51; +x_49 = 0; +x_50 = lean_usize_of_nat(x_43); +lean_dec(x_43); +x_51 = l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__3(x_3, x_49, x_50); +if (x_51 == 0) +{ +lean_object* x_52; +x_52 = lean_box(0); +x_11 = x_52; +goto block_42; +} +else +{ +lean_object* x_53; +x_53 = lean_apply_9(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +return x_53; +} +} +} +block_42: +{ +lean_object* x_12; lean_object* x_13; uint8_t x_14; uint8_t x_15; lean_object* x_16; +lean_dec(x_11); +x_12 = lean_array_get_size(x_3); +x_13 = lean_unsigned_to_nat(0u); +x_14 = lean_nat_dec_lt(x_13, x_12); +if (x_14 == 0) +{ +uint8_t x_26; +x_26 = 1; +x_15 = x_26; +x_16 = x_10; +goto block_25; +} +else +{ +uint8_t x_27; +x_27 = lean_nat_dec_le(x_12, x_12); +if (x_27 == 0) +{ +uint8_t x_28; +x_28 = 1; +x_15 = x_28; +x_16 = x_10; +goto block_25; +} +else +{ +size_t x_29; size_t x_30; lean_object* x_31; +x_29 = 0; +x_30 = lean_usize_of_nat(x_12); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_31 = l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__2(x_3, x_3, x_29, x_30, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_31) == 0) +{ +lean_object* x_32; uint8_t x_33; +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +x_33 = lean_unbox(x_32); +lean_dec(x_32); +if (x_33 == 0) +{ +lean_object* x_34; uint8_t x_35; +x_34 = lean_ctor_get(x_31, 1); +lean_inc(x_34); +lean_dec(x_31); +x_35 = 1; +x_15 = x_35; +x_16 = x_34; +goto block_25; +} +else +{ +lean_object* x_36; uint8_t x_37; +x_36 = lean_ctor_get(x_31, 1); +lean_inc(x_36); +lean_dec(x_31); +x_37 = 0; +x_15 = x_37; +x_16 = x_36; +goto block_25; +} +} +else +{ +uint8_t x_38; +lean_dec(x_12); +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); +lean_dec(x_2); +lean_dec(x_1); +x_38 = !lean_is_exclusive(x_31); +if (x_38 == 0) +{ +return x_31; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_31, 0); +x_40 = lean_ctor_get(x_31, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_31); +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; +} +} +} +} +block_25: +{ +if (x_15 == 0) +{ +lean_object* x_17; +lean_dec(x_12); +x_17 = lean_apply_9(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_16); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_18 = l_Lean_instInhabitedExpr; +x_19 = lean_array_get(x_18, x_3, x_13); +x_20 = l_Lean_Expr_bindingName_x21(x_19); +x_21 = l_Lean_Expr_binderInfo(x_19); +x_22 = l_Lean_Expr_bindingDomain_x21(x_19); +lean_dec(x_19); +x_23 = lean_alloc_closure((void*)(l_Lean_Elab_withCommonTelescope_go___rarg___lambda__1), 12, 4); +lean_closure_set(x_23, 0, x_2); +lean_closure_set(x_23, 1, x_12); +lean_closure_set(x_23, 2, x_3); +lean_closure_set(x_23, 3, x_1); +x_24 = l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda_loop___spec__1___rarg(x_20, x_21, x_22, x_23, x_4, x_5, x_6, x_7, x_8, x_9, x_16); +return x_24; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope_go(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_withCommonTelescope_go___rarg), 10, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withCommonTelescope_go___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +size_t x_5; size_t x_6; lean_object* x_7; +x_5 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_6 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_7 = l_Array_mapMUnsafe_map___at_Lean_Elab_withCommonTelescope_go___spec__1(x_1, x_5, x_6, x_4); +lean_dec(x_1); +return x_7; +} +} +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___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, 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_3); +lean_dec(x_3); +x_13 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_14 = l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__2(x_1, x_2, x_12, x_13, 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_2); +lean_dec(x_1); +return x_14; +} +} +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +size_t x_4; size_t x_5; uint8_t x_6; lean_object* x_7; +x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_5 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_6 = l_Array_anyMUnsafe_any___at_Lean_Elab_withCommonTelescope_go___spec__3(x_1, x_4, x_5); +lean_dec(x_1); +x_7 = lean_box(x_6); +return x_7; +} +} +static lean_object* _init_l_Lean_Elab_withCommonTelescope___rarg___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope___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; size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_10 = lean_array_get_size(x_1); +x_11 = lean_usize_of_nat(x_10); +lean_dec(x_10); +x_12 = 0; +x_13 = l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix___spec__1(x_11, x_12, x_1); +x_14 = l_Lean_Elab_withCommonTelescope___rarg___closed__1; +x_15 = l_Lean_Elab_withCommonTelescope_go___rarg(x_2, x_14, x_13, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +return x_15; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_withCommonTelescope(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_withCommonTelescope___rarg), 9, 0); +return x_2; +} +} +LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_getFixedPrefix___spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4) { +_start: +{ +uint8_t x_5; +x_5 = lean_usize_dec_eq(x_3, x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_6 = lean_array_uget(x_2, x_3); +x_7 = lean_ctor_get(x_6, 3); +lean_inc(x_7); +lean_dec(x_6); +x_8 = l_Lean_Expr_isAppOf(x_1, x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +size_t x_9; size_t x_10; +x_9 = 1; +x_10 = lean_usize_add(x_3, x_9); +x_3 = x_10; +goto _start; +} +else +{ +uint8_t x_12; +x_12 = 1; +return x_12; +} +} +else +{ +uint8_t x_13; +x_13 = 0; +return x_13; +} +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___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; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +uint8_t x_11; +x_11 = lean_usize_dec_lt(x_4, x_3); +if (x_11 == 0) +{ +lean_object* x_12; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_5); +lean_ctor_set(x_12, 1, x_10); +return x_12; +} +else +{ +lean_object* x_13; uint8_t x_14; +x_13 = lean_array_uget(x_2, x_4); +x_14 = !lean_is_exclusive(x_5); +if (x_14 == 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_5, 1); +x_16 = lean_ctor_get(x_5, 0); +lean_dec(x_16); +x_17 = lean_ctor_get(x_15, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_15, 1); +lean_inc(x_18); +x_19 = lean_ctor_get(x_15, 2); +lean_inc(x_19); +x_20 = lean_nat_dec_lt(x_18, x_19); +if (x_20 == 0) +{ +lean_object* x_21; +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_ctor_set(x_5, 0, x_1); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_5); +lean_ctor_set(x_21, 1, x_10); +return x_21; +} +else +{ +uint8_t x_22; +x_22 = !lean_is_exclusive(x_15); +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; uint8_t x_35; +x_23 = lean_ctor_get(x_15, 2); +lean_dec(x_23); +x_24 = lean_ctor_get(x_15, 1); +lean_dec(x_24); +x_25 = lean_ctor_get(x_15, 0); +lean_dec(x_25); +x_26 = lean_array_fget(x_17, x_18); +x_27 = lean_unsigned_to_nat(1u); +x_28 = lean_nat_add(x_18, x_27); +lean_dec(x_18); +lean_ctor_set(x_15, 1, x_28); +x_29 = lean_ctor_get(x_6, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_6, 1); +lean_inc(x_30); +x_31 = lean_ctor_get(x_6, 2); +lean_inc(x_31); +x_32 = lean_ctor_get(x_6, 3); +lean_inc(x_32); +x_33 = lean_ctor_get(x_6, 4); +lean_inc(x_33); +x_34 = lean_ctor_get(x_6, 5); +lean_inc(x_34); +x_35 = !lean_is_exclusive(x_29); +if (x_35 == 0) +{ +uint8_t x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; +x_36 = 2; +x_37 = 0; +lean_ctor_set_uint8(x_29, 5, x_36); +lean_ctor_set_uint8(x_29, 9, x_37); +x_38 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_38, 0, x_29); +lean_ctor_set(x_38, 1, x_30); +lean_ctor_set(x_38, 2, x_31); +lean_ctor_set(x_38, 3, x_32); +lean_ctor_set(x_38, 4, x_33); +lean_ctor_set(x_38, 5, x_34); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_39 = l_Lean_Meta_isExprDefEq(x_13, x_26, x_38, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_39) == 0) +{ +lean_object* x_40; uint8_t x_41; +x_40 = lean_ctor_get(x_39, 0); +lean_inc(x_40); +x_41 = lean_unbox(x_40); +lean_dec(x_40); +if (x_41 == 0) +{ +uint8_t x_42; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_42 = !lean_is_exclusive(x_39); +if (x_42 == 0) +{ +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_39, 0); +lean_dec(x_43); +x_44 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___closed__1; +lean_ctor_set(x_5, 0, x_44); +lean_ctor_set(x_39, 0, x_5); +return x_39; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_39, 1); +lean_inc(x_45); +lean_dec(x_39); +x_46 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___closed__1; +lean_ctor_set(x_5, 0, x_46); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_5); +lean_ctor_set(x_47, 1, x_45); +return x_47; +} +} +else +{ +lean_object* x_48; size_t x_49; size_t x_50; +x_48 = lean_ctor_get(x_39, 1); +lean_inc(x_48); +lean_dec(x_39); +lean_inc(x_1); +lean_ctor_set(x_5, 0, x_1); +x_49 = 1; +x_50 = lean_usize_add(x_4, x_49); +x_4 = x_50; +x_10 = x_48; +goto _start; +} +} +else +{ +uint8_t x_52; +lean_dec(x_15); +lean_free_object(x_5); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_52 = !lean_is_exclusive(x_39); +if (x_52 == 0) +{ +return x_39; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_39, 0); +x_54 = lean_ctor_get(x_39, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_39); +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; +} +} +} +else +{ +uint8_t x_56; uint8_t x_57; uint8_t x_58; uint8_t x_59; uint8_t x_60; uint8_t x_61; uint8_t x_62; uint8_t x_63; uint8_t x_64; uint8_t x_65; uint8_t x_66; uint8_t x_67; uint8_t x_68; uint8_t x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_56 = lean_ctor_get_uint8(x_29, 0); +x_57 = lean_ctor_get_uint8(x_29, 1); +x_58 = lean_ctor_get_uint8(x_29, 2); +x_59 = lean_ctor_get_uint8(x_29, 3); +x_60 = lean_ctor_get_uint8(x_29, 4); +x_61 = lean_ctor_get_uint8(x_29, 6); +x_62 = lean_ctor_get_uint8(x_29, 7); +x_63 = lean_ctor_get_uint8(x_29, 8); +x_64 = lean_ctor_get_uint8(x_29, 10); +x_65 = lean_ctor_get_uint8(x_29, 11); +x_66 = lean_ctor_get_uint8(x_29, 12); +x_67 = lean_ctor_get_uint8(x_29, 13); +lean_dec(x_29); +x_68 = 2; +x_69 = 0; +x_70 = lean_alloc_ctor(0, 0, 14); +lean_ctor_set_uint8(x_70, 0, x_56); +lean_ctor_set_uint8(x_70, 1, x_57); +lean_ctor_set_uint8(x_70, 2, x_58); +lean_ctor_set_uint8(x_70, 3, x_59); +lean_ctor_set_uint8(x_70, 4, x_60); +lean_ctor_set_uint8(x_70, 5, x_68); +lean_ctor_set_uint8(x_70, 6, x_61); +lean_ctor_set_uint8(x_70, 7, x_62); +lean_ctor_set_uint8(x_70, 8, x_63); +lean_ctor_set_uint8(x_70, 9, x_69); +lean_ctor_set_uint8(x_70, 10, x_64); +lean_ctor_set_uint8(x_70, 11, x_65); +lean_ctor_set_uint8(x_70, 12, x_66); +lean_ctor_set_uint8(x_70, 13, x_67); +x_71 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_71, 0, x_70); +lean_ctor_set(x_71, 1, x_30); +lean_ctor_set(x_71, 2, x_31); +lean_ctor_set(x_71, 3, x_32); +lean_ctor_set(x_71, 4, x_33); +lean_ctor_set(x_71, 5, x_34); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_72 = l_Lean_Meta_isExprDefEq(x_13, x_26, x_71, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_72) == 0) +{ +lean_object* x_73; uint8_t x_74; +x_73 = lean_ctor_get(x_72, 0); +lean_inc(x_73); +x_74 = lean_unbox(x_73); +lean_dec(x_73); +if (x_74 == 0) +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_75 = lean_ctor_get(x_72, 1); +lean_inc(x_75); +if (lean_is_exclusive(x_72)) { + lean_ctor_release(x_72, 0); + lean_ctor_release(x_72, 1); + x_76 = x_72; +} else { + lean_dec_ref(x_72); + x_76 = lean_box(0); +} +x_77 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___closed__1; +lean_ctor_set(x_5, 0, x_77); +if (lean_is_scalar(x_76)) { + x_78 = lean_alloc_ctor(0, 2, 0); +} else { + x_78 = x_76; +} +lean_ctor_set(x_78, 0, x_5); +lean_ctor_set(x_78, 1, x_75); +return x_78; +} +else +{ +lean_object* x_79; size_t x_80; size_t x_81; +x_79 = lean_ctor_get(x_72, 1); +lean_inc(x_79); +lean_dec(x_72); +lean_inc(x_1); +lean_ctor_set(x_5, 0, x_1); +x_80 = 1; +x_81 = lean_usize_add(x_4, x_80); +x_4 = x_81; +x_10 = x_79; +goto _start; +} +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; +lean_dec(x_15); +lean_free_object(x_5); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_83 = lean_ctor_get(x_72, 0); +lean_inc(x_83); +x_84 = lean_ctor_get(x_72, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_72)) { + lean_ctor_release(x_72, 0); + lean_ctor_release(x_72, 1); + x_85 = x_72; +} else { + lean_dec_ref(x_72); + x_85 = lean_box(0); +} +if (lean_is_scalar(x_85)) { + x_86 = lean_alloc_ctor(1, 2, 0); +} else { + x_86 = x_85; +} +lean_ctor_set(x_86, 0, x_83); +lean_ctor_set(x_86, 1, x_84); +return x_86; +} +} +} +else +{ +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; uint8_t x_97; uint8_t x_98; uint8_t x_99; uint8_t x_100; uint8_t x_101; uint8_t x_102; uint8_t x_103; uint8_t x_104; uint8_t x_105; uint8_t x_106; uint8_t x_107; uint8_t x_108; lean_object* x_109; uint8_t x_110; uint8_t x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; +lean_dec(x_15); +x_87 = lean_array_fget(x_17, x_18); +x_88 = lean_unsigned_to_nat(1u); +x_89 = lean_nat_add(x_18, x_88); +lean_dec(x_18); +x_90 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_90, 0, x_17); +lean_ctor_set(x_90, 1, x_89); +lean_ctor_set(x_90, 2, x_19); +x_91 = lean_ctor_get(x_6, 0); +lean_inc(x_91); +x_92 = lean_ctor_get(x_6, 1); +lean_inc(x_92); +x_93 = lean_ctor_get(x_6, 2); +lean_inc(x_93); +x_94 = lean_ctor_get(x_6, 3); +lean_inc(x_94); +x_95 = lean_ctor_get(x_6, 4); +lean_inc(x_95); +x_96 = lean_ctor_get(x_6, 5); +lean_inc(x_96); +x_97 = lean_ctor_get_uint8(x_91, 0); +x_98 = lean_ctor_get_uint8(x_91, 1); +x_99 = lean_ctor_get_uint8(x_91, 2); +x_100 = lean_ctor_get_uint8(x_91, 3); +x_101 = lean_ctor_get_uint8(x_91, 4); +x_102 = lean_ctor_get_uint8(x_91, 6); +x_103 = lean_ctor_get_uint8(x_91, 7); +x_104 = lean_ctor_get_uint8(x_91, 8); +x_105 = lean_ctor_get_uint8(x_91, 10); +x_106 = lean_ctor_get_uint8(x_91, 11); +x_107 = lean_ctor_get_uint8(x_91, 12); +x_108 = lean_ctor_get_uint8(x_91, 13); +if (lean_is_exclusive(x_91)) { + x_109 = x_91; +} else { + lean_dec_ref(x_91); + x_109 = lean_box(0); +} +x_110 = 2; +x_111 = 0; +if (lean_is_scalar(x_109)) { + x_112 = lean_alloc_ctor(0, 0, 14); +} else { + x_112 = x_109; +} +lean_ctor_set_uint8(x_112, 0, x_97); +lean_ctor_set_uint8(x_112, 1, x_98); +lean_ctor_set_uint8(x_112, 2, x_99); +lean_ctor_set_uint8(x_112, 3, x_100); +lean_ctor_set_uint8(x_112, 4, x_101); +lean_ctor_set_uint8(x_112, 5, x_110); +lean_ctor_set_uint8(x_112, 6, x_102); +lean_ctor_set_uint8(x_112, 7, x_103); +lean_ctor_set_uint8(x_112, 8, x_104); +lean_ctor_set_uint8(x_112, 9, x_111); +lean_ctor_set_uint8(x_112, 10, x_105); +lean_ctor_set_uint8(x_112, 11, x_106); +lean_ctor_set_uint8(x_112, 12, x_107); +lean_ctor_set_uint8(x_112, 13, x_108); +x_113 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_113, 0, x_112); +lean_ctor_set(x_113, 1, x_92); +lean_ctor_set(x_113, 2, x_93); +lean_ctor_set(x_113, 3, x_94); +lean_ctor_set(x_113, 4, x_95); +lean_ctor_set(x_113, 5, x_96); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_114 = l_Lean_Meta_isExprDefEq(x_13, x_87, x_113, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_114) == 0) +{ +lean_object* x_115; uint8_t x_116; +x_115 = lean_ctor_get(x_114, 0); +lean_inc(x_115); +x_116 = lean_unbox(x_115); +lean_dec(x_115); +if (x_116 == 0) +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_117 = lean_ctor_get(x_114, 1); +lean_inc(x_117); +if (lean_is_exclusive(x_114)) { + lean_ctor_release(x_114, 0); + lean_ctor_release(x_114, 1); + x_118 = x_114; +} else { + lean_dec_ref(x_114); + x_118 = lean_box(0); +} +x_119 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___closed__1; +lean_ctor_set(x_5, 1, x_90); +lean_ctor_set(x_5, 0, x_119); +if (lean_is_scalar(x_118)) { + x_120 = lean_alloc_ctor(0, 2, 0); +} else { + x_120 = x_118; +} +lean_ctor_set(x_120, 0, x_5); +lean_ctor_set(x_120, 1, x_117); +return x_120; +} +else +{ +lean_object* x_121; size_t x_122; size_t x_123; +x_121 = lean_ctor_get(x_114, 1); +lean_inc(x_121); +lean_dec(x_114); +lean_inc(x_1); +lean_ctor_set(x_5, 1, x_90); +lean_ctor_set(x_5, 0, x_1); +x_122 = 1; +x_123 = lean_usize_add(x_4, x_122); +x_4 = x_123; +x_10 = x_121; +goto _start; +} +} +else +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; +lean_dec(x_90); +lean_free_object(x_5); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_125 = lean_ctor_get(x_114, 0); +lean_inc(x_125); +x_126 = lean_ctor_get(x_114, 1); +lean_inc(x_126); +if (lean_is_exclusive(x_114)) { + lean_ctor_release(x_114, 0); + lean_ctor_release(x_114, 1); + x_127 = x_114; +} else { + lean_dec_ref(x_114); + x_127 = lean_box(0); +} +if (lean_is_scalar(x_127)) { + x_128 = lean_alloc_ctor(1, 2, 0); +} else { + x_128 = x_127; +} +lean_ctor_set(x_128, 0, x_125); +lean_ctor_set(x_128, 1, x_126); +return x_128; +} +} +} +} +else +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; uint8_t x_133; +x_129 = lean_ctor_get(x_5, 1); +lean_inc(x_129); +lean_dec(x_5); +x_130 = lean_ctor_get(x_129, 0); +lean_inc(x_130); +x_131 = lean_ctor_get(x_129, 1); +lean_inc(x_131); +x_132 = lean_ctor_get(x_129, 2); +lean_inc(x_132); +x_133 = lean_nat_dec_lt(x_131, x_132); +if (x_133 == 0) +{ +lean_object* x_134; lean_object* x_135; +lean_dec(x_132); +lean_dec(x_131); +lean_dec(x_130); +lean_dec(x_13); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_134 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_134, 0, x_1); +lean_ctor_set(x_134, 1, x_129); +x_135 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_135, 0, x_134); +lean_ctor_set(x_135, 1, x_10); +return x_135; +} +else +{ +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; uint8_t x_147; uint8_t x_148; uint8_t x_149; uint8_t x_150; uint8_t x_151; uint8_t x_152; uint8_t x_153; uint8_t x_154; uint8_t x_155; uint8_t x_156; uint8_t x_157; uint8_t x_158; lean_object* x_159; uint8_t x_160; uint8_t x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; +if (lean_is_exclusive(x_129)) { + lean_ctor_release(x_129, 0); + lean_ctor_release(x_129, 1); + lean_ctor_release(x_129, 2); + x_136 = x_129; +} else { + lean_dec_ref(x_129); + x_136 = lean_box(0); +} +x_137 = lean_array_fget(x_130, x_131); +x_138 = lean_unsigned_to_nat(1u); +x_139 = lean_nat_add(x_131, x_138); +lean_dec(x_131); +if (lean_is_scalar(x_136)) { + x_140 = lean_alloc_ctor(0, 3, 0); +} else { + x_140 = x_136; +} +lean_ctor_set(x_140, 0, x_130); +lean_ctor_set(x_140, 1, x_139); +lean_ctor_set(x_140, 2, x_132); +x_141 = lean_ctor_get(x_6, 0); +lean_inc(x_141); +x_142 = lean_ctor_get(x_6, 1); +lean_inc(x_142); +x_143 = lean_ctor_get(x_6, 2); +lean_inc(x_143); +x_144 = lean_ctor_get(x_6, 3); +lean_inc(x_144); +x_145 = lean_ctor_get(x_6, 4); +lean_inc(x_145); +x_146 = lean_ctor_get(x_6, 5); +lean_inc(x_146); +x_147 = lean_ctor_get_uint8(x_141, 0); +x_148 = lean_ctor_get_uint8(x_141, 1); +x_149 = lean_ctor_get_uint8(x_141, 2); +x_150 = lean_ctor_get_uint8(x_141, 3); +x_151 = lean_ctor_get_uint8(x_141, 4); +x_152 = lean_ctor_get_uint8(x_141, 6); +x_153 = lean_ctor_get_uint8(x_141, 7); +x_154 = lean_ctor_get_uint8(x_141, 8); +x_155 = lean_ctor_get_uint8(x_141, 10); +x_156 = lean_ctor_get_uint8(x_141, 11); +x_157 = lean_ctor_get_uint8(x_141, 12); +x_158 = lean_ctor_get_uint8(x_141, 13); +if (lean_is_exclusive(x_141)) { + x_159 = x_141; +} else { + lean_dec_ref(x_141); + x_159 = lean_box(0); +} +x_160 = 2; +x_161 = 0; +if (lean_is_scalar(x_159)) { + x_162 = lean_alloc_ctor(0, 0, 14); +} else { + x_162 = x_159; +} +lean_ctor_set_uint8(x_162, 0, x_147); +lean_ctor_set_uint8(x_162, 1, x_148); +lean_ctor_set_uint8(x_162, 2, x_149); +lean_ctor_set_uint8(x_162, 3, x_150); +lean_ctor_set_uint8(x_162, 4, x_151); +lean_ctor_set_uint8(x_162, 5, x_160); +lean_ctor_set_uint8(x_162, 6, x_152); +lean_ctor_set_uint8(x_162, 7, x_153); +lean_ctor_set_uint8(x_162, 8, x_154); +lean_ctor_set_uint8(x_162, 9, x_161); +lean_ctor_set_uint8(x_162, 10, x_155); +lean_ctor_set_uint8(x_162, 11, x_156); +lean_ctor_set_uint8(x_162, 12, x_157); +lean_ctor_set_uint8(x_162, 13, x_158); +x_163 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_163, 0, x_162); +lean_ctor_set(x_163, 1, x_142); +lean_ctor_set(x_163, 2, x_143); +lean_ctor_set(x_163, 3, x_144); +lean_ctor_set(x_163, 4, x_145); +lean_ctor_set(x_163, 5, x_146); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_164 = l_Lean_Meta_isExprDefEq(x_13, x_137, x_163, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_164) == 0) +{ +lean_object* x_165; uint8_t x_166; +x_165 = lean_ctor_get(x_164, 0); +lean_inc(x_165); +x_166 = lean_unbox(x_165); +lean_dec(x_165); +if (x_166 == 0) +{ +lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_167 = lean_ctor_get(x_164, 1); +lean_inc(x_167); +if (lean_is_exclusive(x_164)) { + lean_ctor_release(x_164, 0); + lean_ctor_release(x_164, 1); + x_168 = x_164; +} else { + lean_dec_ref(x_164); + x_168 = lean_box(0); +} +x_169 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___closed__1; +x_170 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_170, 0, x_169); +lean_ctor_set(x_170, 1, x_140); +if (lean_is_scalar(x_168)) { + x_171 = lean_alloc_ctor(0, 2, 0); +} else { + x_171 = x_168; +} +lean_ctor_set(x_171, 0, x_170); +lean_ctor_set(x_171, 1, x_167); +return x_171; +} +else +{ +lean_object* x_172; lean_object* x_173; size_t x_174; size_t x_175; +x_172 = lean_ctor_get(x_164, 1); +lean_inc(x_172); +lean_dec(x_164); +lean_inc(x_1); +x_173 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_173, 0, x_1); +lean_ctor_set(x_173, 1, x_140); +x_174 = 1; +x_175 = lean_usize_add(x_4, x_174); +x_4 = x_175; +x_5 = x_173; +x_10 = x_172; +goto _start; +} +} +else +{ +lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; +lean_dec(x_140); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_177 = lean_ctor_get(x_164, 0); +lean_inc(x_177); +x_178 = lean_ctor_get(x_164, 1); +lean_inc(x_178); +if (lean_is_exclusive(x_164)) { + lean_ctor_release(x_164, 0); + lean_ctor_release(x_164, 1); + x_179 = x_164; +} else { + lean_dec_ref(x_164); + x_179 = lean_box(0); +} +if (lean_is_scalar(x_179)) { + x_180 = lean_alloc_ctor(1, 2, 0); +} else { + x_180 = x_179; +} +lean_ctor_set(x_180, 0, x_177); +lean_ctor_set(x_180, 1, x_178); +return x_180; +} +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___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) { +_start: +{ +uint8_t x_7; lean_object* x_8; lean_object* x_9; +x_7 = 0; +x_8 = lean_box(x_7); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_6); +return x_9; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__1___boxed), 6, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__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, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_11 = lean_array_get_size(x_1); +x_12 = lean_unsigned_to_nat(0u); +x_13 = lean_nat_dec_lt(x_12, x_11); +if (x_13 == 0) +{ +uint8_t x_14; lean_object* x_15; lean_object* x_16; +lean_dec(x_11); +lean_dec(x_9); +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_14 = 1; +x_15 = lean_box(x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_10); +return x_16; +} +else +{ +uint8_t x_17; +x_17 = lean_nat_dec_le(x_11, x_11); +if (x_17 == 0) +{ +uint8_t x_18; lean_object* x_19; lean_object* x_20; +lean_dec(x_11); +lean_dec(x_9); +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_18 = 1; +x_19 = lean_box(x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_10); +return x_20; +} +else +{ +size_t x_21; size_t x_22; uint8_t x_23; +x_21 = 0; +x_22 = lean_usize_of_nat(x_11); +lean_dec(x_11); +x_23 = l_Array_anyMUnsafe_any___at_Lean_Elab_getFixedPrefix___spec__1(x_5, x_1, x_21, x_22); +if (x_23 == 0) +{ +uint8_t x_24; lean_object* x_25; lean_object* x_26; +lean_dec(x_9); +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_24 = 1; +x_25 = lean_box(x_24); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_10); +return x_26; +} +else +{ +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_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; +x_27 = l_Lean_Expr_getAppNumArgsAux(x_5, x_12); +x_28 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___closed__1; +lean_inc(x_27); +x_29 = lean_mk_array(x_27, x_28); +x_30 = lean_unsigned_to_nat(1u); +x_31 = lean_nat_sub(x_27, x_30); +lean_dec(x_27); +x_32 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_5, x_29, x_31); +x_57 = lean_st_ref_get(x_9, x_10); +x_58 = lean_ctor_get(x_57, 1); +lean_inc(x_58); +lean_dec(x_57); +x_59 = lean_st_ref_take(x_4, x_58); +x_60 = lean_ctor_get(x_59, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_59, 1); +lean_inc(x_61); +lean_dec(x_59); +x_62 = lean_array_get_size(x_32); +x_63 = lean_nat_dec_le(x_62, x_60); +if (x_63 == 0) +{ +lean_object* x_64; lean_object* x_65; +lean_dec(x_62); +x_64 = lean_st_ref_set(x_4, x_60, x_61); +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +lean_dec(x_64); +x_33 = x_65; +goto block_56; +} +else +{ +lean_object* x_66; lean_object* x_67; +lean_dec(x_60); +x_66 = lean_st_ref_set(x_4, x_62, x_61); +x_67 = lean_ctor_get(x_66, 1); +lean_inc(x_67); +lean_dec(x_66); +x_33 = x_67; +goto block_56; +} +block_56: +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; size_t x_38; lean_object* x_39; +x_34 = l_Array_toSubarray___rarg(x_2, x_12, x_3); +x_35 = lean_box(0); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_34); +x_37 = lean_array_get_size(x_32); +x_38 = lean_usize_of_nat(x_37); +lean_dec(x_37); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_39 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2(x_35, x_32, x_38, x_21, x_36, x_6, x_7, x_8, x_9, x_33); +lean_dec(x_32); +if (lean_obj_tag(x_39) == 0) +{ +lean_object* x_40; lean_object* x_41; +x_40 = lean_ctor_get(x_39, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_40, 0); +lean_inc(x_41); +lean_dec(x_40); +if (lean_obj_tag(x_41) == 0) +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_42 = lean_ctor_get(x_39, 1); +lean_inc(x_42); +lean_dec(x_39); +x_43 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2___closed__1; +x_44 = lean_box(0); +x_45 = lean_apply_6(x_43, x_44, x_6, x_7, x_8, x_9, x_42); +return x_45; +} +else +{ +uint8_t x_46; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_46 = !lean_is_exclusive(x_39); +if (x_46 == 0) +{ +lean_object* x_47; lean_object* x_48; +x_47 = lean_ctor_get(x_39, 0); +lean_dec(x_47); +x_48 = lean_ctor_get(x_41, 0); +lean_inc(x_48); +lean_dec(x_41); +lean_ctor_set(x_39, 0, x_48); +return x_39; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_39, 1); +lean_inc(x_49); +lean_dec(x_39); +x_50 = lean_ctor_get(x_41, 0); +lean_inc(x_50); +lean_dec(x_41); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_49); +return x_51; +} +} +} +else +{ +uint8_t x_52; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_52 = !lean_is_exclusive(x_39); +if (x_52 == 0) +{ +return x_39; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_39, 0); +x_54 = lean_ctor_get(x_39, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_39); +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; +} +} +} +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___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, 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; lean_object* x_16; +x_15 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2___boxed), 10, 4); +lean_closure_set(x_15, 0, x_1); +lean_closure_set(x_15, 1, x_2); +lean_closure_set(x_15, 2, x_3); +lean_closure_set(x_15, 3, x_4); +x_16 = l_Lean_Meta_forEachExpr_x27(x_5, x_15, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_16) == 0) +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_16); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; +x_18 = lean_ctor_get(x_16, 0); +lean_dec(x_18); +x_19 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_19, 0, x_6); +lean_ctor_set(x_16, 0, x_19); +return x_16; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_16, 1); +lean_inc(x_20); +lean_dec(x_16); +x_21 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_21, 0, x_6); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_20); +return x_22; +} +} +else +{ +uint8_t x_23; +lean_dec(x_6); +x_23 = !lean_is_exclusive(x_16); +if (x_23 == 0) +{ +return x_16; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_16, 0); +x_25 = lean_ctor_get(x_16, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_16); +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___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; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___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, size_t x_7, size_t x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +_start: +{ +uint8_t x_17; +x_17 = lean_usize_dec_lt(x_8, x_7); +if (x_17 == 0) +{ +lean_object* x_18; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_9); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; +lean_dec(x_9); +x_19 = lean_array_uget(x_6, x_8); +x_20 = lean_st_ref_get(x_15, x_16); +x_21 = lean_ctor_get(x_20, 1); +lean_inc(x_21); +lean_dec(x_20); +x_22 = lean_st_ref_get(x_4, x_21); +x_23 = !lean_is_exclusive(x_22); +if (x_23 == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; +x_24 = lean_ctor_get(x_22, 0); +x_25 = lean_ctor_get(x_22, 1); +x_26 = lean_unsigned_to_nat(0u); +x_27 = lean_nat_dec_eq(x_24, x_26); +lean_dec(x_24); +if (x_27 == 0) +{ +lean_object* x_28; lean_object* x_29; +lean_free_object(x_22); +x_28 = lean_box(0); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_29 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__3(x_1, x_2, x_3, x_4, x_19, x_5, x_28, x_10, x_11, x_12, x_13, x_14, x_15, x_25); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +if (lean_obj_tag(x_30) == 0) +{ +uint8_t x_31; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_31 = !lean_is_exclusive(x_29); +if (x_31 == 0) +{ +lean_object* x_32; lean_object* x_33; +x_32 = lean_ctor_get(x_29, 0); +lean_dec(x_32); +x_33 = lean_ctor_get(x_30, 0); +lean_inc(x_33); +lean_dec(x_30); +lean_ctor_set(x_29, 0, x_33); +return x_29; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_29, 1); +lean_inc(x_34); +lean_dec(x_29); +x_35 = lean_ctor_get(x_30, 0); +lean_inc(x_35); +lean_dec(x_30); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_34); +return x_36; +} +} +else +{ +lean_object* x_37; lean_object* x_38; size_t x_39; size_t x_40; +x_37 = lean_ctor_get(x_29, 1); +lean_inc(x_37); +lean_dec(x_29); +x_38 = lean_ctor_get(x_30, 0); +lean_inc(x_38); +lean_dec(x_30); +x_39 = 1; +x_40 = lean_usize_add(x_8, x_39); +x_8 = x_40; +x_9 = x_38; +x_16 = x_37; +goto _start; +} +} +else +{ +uint8_t x_42; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_42 = !lean_is_exclusive(x_29); +if (x_42 == 0) +{ +return x_29; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_29, 0); +x_44 = lean_ctor_get(x_29, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_29); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +else +{ +lean_object* x_46; +lean_dec(x_19); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_46 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__2; +lean_ctor_set(x_22, 0, x_46); +return x_22; +} +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; +x_47 = lean_ctor_get(x_22, 0); +x_48 = lean_ctor_get(x_22, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_22); +x_49 = lean_unsigned_to_nat(0u); +x_50 = lean_nat_dec_eq(x_47, x_49); +lean_dec(x_47); +if (x_50 == 0) +{ +lean_object* x_51; lean_object* x_52; +x_51 = lean_box(0); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_52 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__3(x_1, x_2, x_3, x_4, x_19, x_5, x_51, x_10, x_11, x_12, x_13, x_14, x_15, x_48); +if (lean_obj_tag(x_52) == 0) +{ +lean_object* x_53; +x_53 = lean_ctor_get(x_52, 0); +lean_inc(x_53); +if (lean_obj_tag(x_53) == 0) +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_54 = lean_ctor_get(x_52, 1); +lean_inc(x_54); +if (lean_is_exclusive(x_52)) { + lean_ctor_release(x_52, 0); + lean_ctor_release(x_52, 1); + x_55 = x_52; +} else { + lean_dec_ref(x_52); + x_55 = lean_box(0); +} +x_56 = lean_ctor_get(x_53, 0); +lean_inc(x_56); +lean_dec(x_53); +if (lean_is_scalar(x_55)) { + x_57 = lean_alloc_ctor(0, 2, 0); +} else { + x_57 = x_55; +} +lean_ctor_set(x_57, 0, x_56); +lean_ctor_set(x_57, 1, x_54); +return x_57; +} +else +{ +lean_object* x_58; lean_object* x_59; size_t x_60; size_t x_61; +x_58 = lean_ctor_get(x_52, 1); +lean_inc(x_58); +lean_dec(x_52); +x_59 = lean_ctor_get(x_53, 0); +lean_inc(x_59); +lean_dec(x_53); +x_60 = 1; +x_61 = lean_usize_add(x_8, x_60); +x_8 = x_61; +x_9 = x_59; +x_16 = x_58; +goto _start; +} +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_63 = lean_ctor_get(x_52, 0); +lean_inc(x_63); +x_64 = lean_ctor_get(x_52, 1); +lean_inc(x_64); +if (lean_is_exclusive(x_52)) { + lean_ctor_release(x_52, 0); + lean_ctor_release(x_52, 1); + x_65 = x_52; +} else { + lean_dec_ref(x_52); + x_65 = lean_box(0); +} +if (lean_is_scalar(x_65)) { + x_66 = lean_alloc_ctor(1, 2, 0); +} else { + x_66 = x_65; +} +lean_ctor_set(x_66, 0, x_63); +lean_ctor_set(x_66, 1, x_64); +return x_66; +} +} +else +{ +lean_object* x_67; lean_object* x_68; +lean_dec(x_19); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_67 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__2; +x_68 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_48); +return x_68; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix___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_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_10 = lean_st_ref_get(x_8, x_9); +x_11 = lean_ctor_get(x_10, 1); +lean_inc(x_11); +lean_dec(x_10); +x_12 = lean_st_ref_get(x_1, x_11); +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; +} +} +} +static lean_object* _init_l_Lean_Elab_getFixedPrefix___lambda__2___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +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; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix___lambda__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, 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; lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; lean_object* x_21; +x_11 = lean_array_get_size(x_2); +x_12 = lean_st_ref_get(x_9, x_10); +x_13 = lean_ctor_get(x_12, 1); +lean_inc(x_13); +lean_dec(x_12); +lean_inc(x_11); +x_14 = lean_st_mk_ref(x_11, 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 = lean_array_get_size(x_3); +x_18 = lean_usize_of_nat(x_17); +lean_dec(x_17); +x_19 = 0; +x_20 = l_Lean_Elab_getFixedPrefix___lambda__2___closed__1; +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_15); +x_21 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3(x_1, x_2, x_11, x_15, x_20, x_3, x_18, x_19, x_20, x_4, x_5, x_6, x_7, x_8, x_9, x_16); +lean_dec(x_3); +if (lean_obj_tag(x_21) == 0) +{ +lean_object* x_22; lean_object* x_23; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +lean_dec(x_22); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_21, 1); +lean_inc(x_24); +lean_dec(x_21); +x_25 = lean_box(0); +x_26 = l_Lean_Elab_getFixedPrefix___lambda__1(x_15, x_25, x_4, x_5, x_6, x_7, x_8, x_9, x_24); +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_15); +return x_26; +} +else +{ +uint8_t x_27; +lean_dec(x_15); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_27 = !lean_is_exclusive(x_21); +if (x_27 == 0) +{ +lean_object* x_28; lean_object* x_29; +x_28 = lean_ctor_get(x_21, 0); +lean_dec(x_28); +x_29 = lean_ctor_get(x_23, 0); +lean_inc(x_29); +lean_dec(x_23); +lean_ctor_set(x_21, 0, x_29); +return x_21; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_21, 1); +lean_inc(x_30); +lean_dec(x_21); +x_31 = lean_ctor_get(x_23, 0); +lean_inc(x_31); +lean_dec(x_23); +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_15); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_33 = !lean_is_exclusive(x_21); +if (x_33 == 0) +{ +return x_21; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_21, 0); +x_35 = lean_ctor_get(x_21, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_21); +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_EXPORT lean_object* l_Lean_Elab_getFixedPrefix(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_inc(x_1); +x_9 = lean_alloc_closure((void*)(l_Lean_Elab_getFixedPrefix___lambda__2), 10, 1); +lean_closure_set(x_9, 0, x_1); +x_10 = l_Lean_Elab_withCommonTelescope___rarg(x_1, x_9, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +return x_10; +} +} +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_getFixedPrefix___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +size_t x_5; size_t x_6; uint8_t x_7; lean_object* x_8; +x_5 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_6 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_7 = l_Array_anyMUnsafe_any___at_Lean_Elab_getFixedPrefix___spec__1(x_1, x_2, x_5, x_6); +lean_dec(x_2); +lean_dec(x_1); +x_8 = lean_box(x_7); +return x_8; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___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, lean_object* x_9, lean_object* x_10) { +_start: +{ +size_t x_11; size_t x_12; lean_object* x_13; +x_11 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_12 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_13 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2(x_1, x_2, x_11, x_12, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_2); +return x_13; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___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) { +_start: +{ +lean_object* x_7; +x_7 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__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); +lean_dec(x_1); +return x_7; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__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, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_4); +lean_dec(x_1); +return x_11; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___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, 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; +x_15 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__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, x_13, x_14); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +return x_15; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___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, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +_start: +{ +size_t x_17; size_t x_18; lean_object* x_19; +x_17 = lean_unbox_usize(x_7); +lean_dec(x_7); +x_18 = lean_unbox_usize(x_8); +lean_dec(x_8); +x_19 = l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_17, x_18, 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); +return x_19; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_getFixedPrefix___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_10; +x_10 = l_Lean_Elab_getFixedPrefix___lambda__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); +lean_dec(x_2); +lean_dec(x_1); +return x_10; +} +} LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___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: { @@ -1672,196 +3990,959 @@ return x_27; } } } -LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__1(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +static lean_object* _init_l_Lean_Elab_wfRecursion___lambda__1___closed__1() { _start: { -lean_object* x_13; -lean_inc(x_11); -lean_inc(x_10); -x_13 = l_Array_mapMUnsafe_map___at_Lean_Elab_addAndCompileUnsafe___spec__1(x_1, x_2, x_3, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -if (lean_obj_tag(x_13) == 0) -{ -lean_object* x_14; lean_object* x_15; uint8_t x_16; uint8_t x_17; lean_object* x_18; -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 = 0; -x_17 = 1; -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_4); -x_18 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux(x_4, x_16, x_17, x_6, x_7, x_8, x_9, x_10, x_11, x_15); -if (lean_obj_tag(x_18) == 0) -{ -lean_object* x_19; lean_object* x_20; -x_19 = lean_ctor_get(x_18, 1); -lean_inc(x_19); -lean_dec(x_18); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_4); -lean_inc(x_14); -x_20 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs(x_14, x_4, x_6, x_7, x_8, x_9, x_10, x_11, 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; size_t x_26; lean_object* x_27; lean_object* x_28; -x_21 = lean_ctor_get(x_20, 1); -lean_inc(x_21); -lean_dec(x_20); -x_22 = lean_ctor_get(x_4, 3); -lean_inc(x_22); -lean_dec(x_4); -lean_inc(x_14); -x_23 = l_Lean_Elab_WF_registerEqnsInfo(x_14, x_22, x_10, x_11, x_21); -x_24 = lean_ctor_get(x_23, 1); -lean_inc(x_24); -lean_dec(x_23); -x_25 = lean_array_get_size(x_14); -x_26 = lean_usize_of_nat(x_25); -lean_dec(x_25); -x_27 = lean_box(0); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_6); -x_28 = l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__2(x_14, x_26, x_2, x_27, x_6, x_7, x_8, x_9, x_10, x_11, x_24); -if (lean_obj_tag(x_28) == 0) -{ -lean_object* x_29; lean_object* x_30; -x_29 = lean_ctor_get(x_28, 1); -lean_inc(x_29); -lean_dec(x_28); -x_30 = l_Lean_Elab_addAndCompilePartialRec(x_14, x_6, x_7, x_8, x_9, x_10, x_11, x_29); -return x_30; +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_eraseRecAppSyntaxExpr___lambda__1___boxed), 4, 0); +return x_1; } -else +} +static lean_object* _init_l_Lean_Elab_wfRecursion___lambda__1___closed__2() { +_start: { -uint8_t x_31; -lean_dec(x_14); +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_eraseRecAppSyntaxExpr___lambda__2___boxed), 4, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___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) { +_start: +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_15 = lean_st_ref_get(x_13, 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 = lean_ctor_get(x_16, 0); +lean_inc(x_18); +lean_dec(x_16); +lean_inc(x_12); +x_19 = l_Lean_Elab_addAsAxiom(x_1, x_10, x_11, x_12, x_13, x_17); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; +x_20 = lean_ctor_get(x_19, 1); +lean_inc(x_20); +lean_dec(x_19); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_1); +x_21 = l_Lean_Elab_WF_mkFix(x_1, x_2, x_3, x_4, x_8, x_9, x_10, x_11, x_12, x_13, x_20); +if (lean_obj_tag(x_21) == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +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 = l_Lean_Elab_wfRecursion___lambda__1___closed__1; +x_25 = l_Lean_Elab_wfRecursion___lambda__1___closed__2; +lean_inc(x_13); +lean_inc(x_12); +x_26 = l_Lean_Core_transform___at_Lean_Core_betaReduce___spec__1(x_22, x_24, x_25, x_12, x_13, x_23); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; +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_ctor_get(x_1, 0); +lean_inc(x_29); +x_30 = lean_ctor_get_uint8(x_1, sizeof(void*)*6); +x_31 = lean_ctor_get(x_1, 1); +lean_inc(x_31); +x_32 = lean_ctor_get(x_1, 2); +lean_inc(x_32); +lean_dec(x_1); +x_33 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_33, 0, x_29); +lean_ctor_set(x_33, 1, x_31); +lean_ctor_set(x_33, 2, x_32); +lean_ctor_set(x_33, 3, x_5); +lean_ctor_set(x_33, 4, x_6); +lean_ctor_set(x_33, 5, x_27); +lean_ctor_set_uint8(x_33, sizeof(void*)*6, x_30); +x_34 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_18, x_8, x_9, x_10, x_11, x_12, x_13, x_28); +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_6); -x_31 = !lean_is_exclusive(x_28); -if (x_31 == 0) +x_35 = !lean_is_exclusive(x_34); +if (x_35 == 0) { -return x_28; +lean_object* x_36; +x_36 = lean_ctor_get(x_34, 0); +lean_dec(x_36); +lean_ctor_set(x_34, 0, x_33); +return x_34; } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_28, 0); -x_33 = lean_ctor_get(x_28, 1); -lean_inc(x_33); +lean_object* x_37; lean_object* x_38; +x_37 = lean_ctor_get(x_34, 1); +lean_inc(x_37); +lean_dec(x_34); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_33); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_1); +x_39 = lean_ctor_get(x_26, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_26, 1); +lean_inc(x_40); +lean_dec(x_26); +x_41 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_18, x_8, x_9, x_10, x_11, x_12, x_13, x_40); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +x_42 = !lean_is_exclusive(x_41); +if (x_42 == 0) +{ +lean_object* x_43; +x_43 = lean_ctor_get(x_41, 0); +lean_dec(x_43); +lean_ctor_set_tag(x_41, 1); +lean_ctor_set(x_41, 0, x_39); +return x_41; +} +else +{ +lean_object* x_44; lean_object* x_45; +x_44 = lean_ctor_get(x_41, 1); +lean_inc(x_44); +lean_dec(x_41); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_39); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; uint8_t x_49; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_1); +x_46 = lean_ctor_get(x_21, 0); +lean_inc(x_46); +x_47 = lean_ctor_get(x_21, 1); +lean_inc(x_47); +lean_dec(x_21); +x_48 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_18, x_8, x_9, x_10, x_11, x_12, x_13, x_47); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +x_49 = !lean_is_exclusive(x_48); +if (x_49 == 0) +{ +lean_object* x_50; +x_50 = lean_ctor_get(x_48, 0); +lean_dec(x_50); +lean_ctor_set_tag(x_48, 1); +lean_ctor_set(x_48, 0, x_46); +return x_48; +} +else +{ +lean_object* x_51; lean_object* x_52; +x_51 = lean_ctor_get(x_48, 1); +lean_inc(x_51); +lean_dec(x_48); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_46); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; +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_53 = lean_ctor_get(x_19, 0); +lean_inc(x_53); +x_54 = lean_ctor_get(x_19, 1); +lean_inc(x_54); +lean_dec(x_19); +x_55 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_18, x_8, x_9, x_10, x_11, x_12, x_13, x_54); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +x_56 = !lean_is_exclusive(x_55); +if (x_56 == 0) +{ +lean_object* x_57; +x_57 = lean_ctor_get(x_55, 0); +lean_dec(x_57); +lean_ctor_set_tag(x_55, 1); +lean_ctor_set(x_55, 0, x_53); +return x_55; +} +else +{ +lean_object* x_58; lean_object* x_59; +x_58 = lean_ctor_get(x_55, 1); +lean_inc(x_58); +lean_dec(x_55); +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_53); +lean_ctor_set(x_59, 1, x_58); +return x_59; +} +} +} +} +static lean_object* _init_l_Lean_Elab_wfRecursion___lambda__2___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("wfRel: "); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_wfRecursion___lambda__2___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_wfRecursion___lambda__2___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__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, 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_Expr_bindingDomain_x21(x_9); +lean_dec(x_9); +x_18 = lean_ctor_get(x_1, 3); +lean_inc(x_18); +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_18); +x_19 = l_Lean_Elab_WF_elabWFRel(x_2, x_18, x_3, x_17, x_4, x_10, x_11, x_12, x_13, x_14, x_15, x_16); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; +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_36 = lean_st_ref_get(x_15, x_21); +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_22 = x_41; +x_23 = x_40; +goto block_35; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; +x_42 = lean_ctor_get(x_36, 1); +lean_inc(x_42); +lean_dec(x_36); +lean_inc(x_7); +x_43 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_7, x_10, x_11, x_12, x_13, x_14, x_15, x_42); +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_unbox(x_44); +lean_dec(x_44); +x_22 = x_46; +x_23 = x_45; +goto block_35; +} +block_35: +{ +if (x_22 == 0) +{ +lean_object* x_24; lean_object* x_25; +lean_dec(x_7); +x_24 = lean_box(0); +x_25 = l_Lean_Elab_wfRecursion___lambda__1(x_1, x_8, x_20, x_5, x_18, x_6, x_24, x_10, x_11, x_12, x_13, x_14, x_15, x_23); +return x_25; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +lean_inc(x_20); +x_26 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_26, 0, x_20); +x_27 = l_Lean_Elab_wfRecursion___lambda__2___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_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__8; +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_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_7, x_30, x_10, x_11, x_12, x_13, x_14, x_15, x_23); +x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); -lean_dec(x_28); -x_34 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_34, 0, x_32); -lean_ctor_set(x_34, 1, x_33); +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +lean_dec(x_31); +x_34 = l_Lean_Elab_wfRecursion___lambda__1(x_1, x_8, x_20, x_5, x_18, x_6, x_32, x_10, x_11, x_12, x_13, x_14, x_15, x_33); +lean_dec(x_32); return x_34; } } } else { -uint8_t x_35; -lean_dec(x_14); -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); -x_35 = !lean_is_exclusive(x_20); -if (x_35 == 0) -{ -return x_20; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_20, 0); -x_37 = lean_ctor_get(x_20, 1); -lean_inc(x_37); -lean_inc(x_36); -lean_dec(x_20); -x_38 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_38, 0, x_36); -lean_ctor_set(x_38, 1, x_37); -return x_38; -} -} -} -else -{ -uint8_t x_39; -lean_dec(x_14); -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); -x_39 = !lean_is_exclusive(x_18); -if (x_39 == 0) -{ -return x_18; -} -else -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_18, 0); -x_41 = lean_ctor_get(x_18, 1); -lean_inc(x_41); -lean_inc(x_40); +uint8_t x_47; lean_dec(x_18); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_40); -lean_ctor_set(x_42, 1, x_41); -return x_42; -} -} +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_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_1); +x_47 = !lean_is_exclusive(x_19); +if (x_47 == 0) +{ +return x_19; } else { -uint8_t x_43; +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_19, 0); +x_49 = lean_ctor_get(x_19, 1); +lean_inc(x_49); +lean_inc(x_48); +lean_dec(x_19); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_48); +lean_ctor_set(x_50, 1, x_49); +return x_50; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__3(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; +lean_inc(x_12); +lean_inc(x_11); +x_14 = l_Array_mapMUnsafe_map___at_Lean_Elab_addAndCompileUnsafe___spec__1(x_1, x_2, x_3, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; uint8_t x_17; uint8_t x_18; lean_object* x_19; +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 = 0; +x_18 = 1; +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); +x_19 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux(x_4, x_17, x_18, x_7, x_8, x_9, x_10, x_11, x_12, x_16); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; +x_20 = lean_ctor_get(x_19, 1); +lean_inc(x_20); +lean_dec(x_19); +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_15); +x_21 = l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs(x_15, x_4, x_5, x_7, x_8, x_9, x_10, x_11, x_12, x_20); +if (lean_obj_tag(x_21) == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; size_t x_27; lean_object* x_28; lean_object* x_29; +x_22 = lean_ctor_get(x_21, 1); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_ctor_get(x_4, 3); +lean_inc(x_23); +lean_dec(x_4); +lean_inc(x_15); +x_24 = l_Lean_Elab_WF_registerEqnsInfo(x_15, x_23, x_11, x_12, x_22); +x_25 = lean_ctor_get(x_24, 1); +lean_inc(x_25); +lean_dec(x_24); +x_26 = lean_array_get_size(x_15); +x_27 = lean_usize_of_nat(x_26); +lean_dec(x_26); +x_28 = lean_box(0); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_7); +x_29 = l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__2(x_15, x_27, x_2, x_28, x_7, x_8, x_9, x_10, x_11, x_12, x_25); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +lean_dec(x_29); +x_31 = l_Lean_Elab_addAndCompilePartialRec(x_15, x_7, x_8, x_9, x_10, x_11, x_12, x_30); +return x_31; +} +else +{ +uint8_t x_32; +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); -x_43 = !lean_is_exclusive(x_13); -if (x_43 == 0) +x_32 = !lean_is_exclusive(x_29); +if (x_32 == 0) { -return x_13; +return x_29; } else { -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_13, 0); -x_45 = lean_ctor_get(x_13, 1); +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_29, 0); +x_34 = lean_ctor_get(x_29, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_29); +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_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_4); +x_36 = !lean_is_exclusive(x_21); +if (x_36 == 0) +{ +return x_21; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_21, 0); +x_38 = lean_ctor_get(x_21, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_21); +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_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_5); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_19); +if (x_40 == 0) +{ +return x_19; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_19, 0); +x_42 = lean_ctor_get(x_19, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_19); +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_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); +x_44 = !lean_is_exclusive(x_14); +if (x_44 == 0) +{ +return x_14; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_14, 0); +x_46 = lean_ctor_get(x_14, 1); +lean_inc(x_46); lean_inc(x_45); -lean_inc(x_44); -lean_dec(x_13); -x_46 = lean_alloc_ctor(1, 2, 0); +lean_dec(x_14); +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; +} +} +} +} +static lean_object* _init_l_Lean_Elab_wfRecursion___lambda__4___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(">> "); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_wfRecursion___lambda__4___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_wfRecursion___lambda__4___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Elab_wfRecursion___lambda__4___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(" :=\n"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_wfRecursion___lambda__4___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_wfRecursion___lambda__4___closed__3; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__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, lean_object* x_13) { +_start: +{ +lean_object* x_14; size_t x_15; size_t 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_dec(x_6); +x_14 = lean_array_get_size(x_1); +x_15 = lean_usize_of_nat(x_14); +lean_dec(x_14); +x_16 = 0; +x_17 = lean_st_ref_get(x_12, x_13); +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); +x_20 = lean_ctor_get(x_18, 0); +lean_inc(x_20); +lean_dec(x_18); +x_21 = lean_box(0); +lean_inc(x_11); +x_22 = l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__1(x_1, x_15, x_16, x_21, x_7, x_8, x_9, x_10, x_11, x_12, x_19); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; +x_23 = lean_ctor_get(x_22, 1); +lean_inc(x_23); +lean_dec(x_22); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_1); +lean_inc(x_2); +x_24 = l_Lean_Elab_WF_packDomain(x_2, x_1, x_9, x_10, x_11, x_12, x_23); +if (lean_obj_tag(x_24) == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +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_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_2); +x_27 = l_Lean_Elab_WF_packMutual(x_2, x_25, x_9, x_10, x_11, x_12, 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; +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_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_20, x_7, x_8, x_9, x_10, x_11, x_12, x_29); +x_31 = lean_ctor_get(x_30, 1); +lean_inc(x_31); +lean_dec(x_30); +x_32 = lean_ctor_get(x_28, 4); +lean_inc(x_32); +lean_inc(x_2); +x_33 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_33, 0, x_2); +lean_inc(x_5); +lean_inc(x_32); +lean_inc(x_2); +lean_inc(x_1); +x_34 = lean_alloc_closure((void*)(l_Lean_Elab_wfRecursion___lambda__2), 16, 7); +lean_closure_set(x_34, 0, x_28); +lean_closure_set(x_34, 1, x_1); +lean_closure_set(x_34, 2, x_2); +lean_closure_set(x_34, 3, x_3); +lean_closure_set(x_34, 4, x_4); +lean_closure_set(x_34, 5, x_32); +lean_closure_set(x_34, 6, x_5); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_35 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(x_32, x_33, x_34, x_7, x_8, x_9, x_10, x_11, x_12, x_31); +if (lean_obj_tag(x_35) == 0) +{ +lean_object* x_36; lean_object* x_37; uint8_t x_38; lean_object* x_39; lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60; +x_36 = lean_ctor_get(x_35, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_35, 1); +lean_inc(x_37); +lean_dec(x_35); +x_57 = lean_st_ref_get(x_12, x_37); +x_58 = lean_ctor_get(x_57, 0); +lean_inc(x_58); +x_59 = lean_ctor_get(x_58, 3); +lean_inc(x_59); +lean_dec(x_58); +x_60 = lean_ctor_get_uint8(x_59, sizeof(void*)*1); +lean_dec(x_59); +if (x_60 == 0) +{ +lean_object* x_61; uint8_t x_62; +x_61 = lean_ctor_get(x_57, 1); +lean_inc(x_61); +lean_dec(x_57); +x_62 = 0; +x_38 = x_62; +x_39 = x_61; +goto block_56; +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; uint8_t x_67; +x_63 = lean_ctor_get(x_57, 1); +lean_inc(x_63); +lean_dec(x_57); +lean_inc(x_5); +x_64 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_5, x_7, x_8, x_9, x_10, x_11, x_12, x_63); +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_unbox(x_65); +lean_dec(x_65); +x_38 = x_67; +x_39 = x_66; +goto block_56; +} +block_56: +{ +if (x_38 == 0) +{ +lean_object* x_40; +lean_dec(x_5); +x_40 = l_Lean_Elab_wfRecursion___lambda__3(x_15, x_16, x_1, x_36, x_2, x_21, x_7, x_8, x_9, x_10, x_11, x_12, x_39); +return x_40; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_41 = lean_ctor_get(x_36, 3); +lean_inc(x_41); +x_42 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_42, 0, x_41); +x_43 = l_Lean_Elab_wfRecursion___lambda__4___closed__2; +x_44 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_44, 0, x_43); +lean_ctor_set(x_44, 1, x_42); +x_45 = l_Lean_Elab_wfRecursion___lambda__4___closed__4; +x_46 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_46, 0, x_44); lean_ctor_set(x_46, 1, x_45); -return x_46; +x_47 = lean_ctor_get(x_36, 5); +lean_inc(x_47); +x_48 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_48, 0, x_47); +x_49 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_49, 0, x_46); +lean_ctor_set(x_49, 1, x_48); +x_50 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__8; +x_51 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +x_52 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_5, x_51, x_7, x_8, x_9, x_10, x_11, x_12, x_39); +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 = l_Lean_Elab_wfRecursion___lambda__3(x_15, x_16, x_1, x_36, x_2, x_53, x_7, x_8, x_9, x_10, x_11, x_12, x_54); +lean_dec(x_53); +return x_55; +} +} +} +else +{ +uint8_t x_68; +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_2); +lean_dec(x_1); +x_68 = !lean_is_exclusive(x_35); +if (x_68 == 0) +{ +return x_35; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_69 = lean_ctor_get(x_35, 0); +x_70 = lean_ctor_get(x_35, 1); +lean_inc(x_70); +lean_inc(x_69); +lean_dec(x_35); +x_71 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_71, 0, x_69); +lean_ctor_set(x_71, 1, x_70); +return x_71; +} +} +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_72 = lean_ctor_get(x_27, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_27, 1); +lean_inc(x_73); +lean_dec(x_27); +x_74 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_20, x_7, x_8, x_9, x_10, x_11, x_12, x_73); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_75 = !lean_is_exclusive(x_74); +if (x_75 == 0) +{ +lean_object* x_76; +x_76 = lean_ctor_get(x_74, 0); +lean_dec(x_76); +lean_ctor_set_tag(x_74, 1); +lean_ctor_set(x_74, 0, x_72); +return x_74; +} +else +{ +lean_object* x_77; lean_object* x_78; +x_77 = lean_ctor_get(x_74, 1); +lean_inc(x_77); +lean_dec(x_74); +x_78 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_78, 0, x_72); +lean_ctor_set(x_78, 1, x_77); +return x_78; +} +} +} +else +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_79 = lean_ctor_get(x_24, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_24, 1); +lean_inc(x_80); +lean_dec(x_24); +x_81 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_20, x_7, x_8, x_9, x_10, x_11, x_12, x_80); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_82 = !lean_is_exclusive(x_81); +if (x_82 == 0) +{ +lean_object* x_83; +x_83 = lean_ctor_get(x_81, 0); +lean_dec(x_83); +lean_ctor_set_tag(x_81, 1); +lean_ctor_set(x_81, 0, x_79); +return x_81; +} +else +{ +lean_object* x_84; lean_object* x_85; +x_84 = lean_ctor_get(x_81, 1); +lean_inc(x_84); +lean_dec(x_81); +x_85 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_85, 0, x_79); +lean_ctor_set(x_85, 1, x_84); +return x_85; +} +} +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_86 = lean_ctor_get(x_22, 0); +lean_inc(x_86); +x_87 = lean_ctor_get(x_22, 1); +lean_inc(x_87); +lean_dec(x_22); +x_88 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_20, x_7, x_8, x_9, x_10, x_11, x_12, x_87); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_89 = !lean_is_exclusive(x_88); +if (x_89 == 0) +{ +lean_object* x_90; +x_90 = lean_ctor_get(x_88, 0); +lean_dec(x_90); +lean_ctor_set_tag(x_88, 1); +lean_ctor_set(x_88, 0, x_86); +return x_88; +} +else +{ +lean_object* x_91; lean_object* x_92; +x_91 = lean_ctor_get(x_88, 1); +lean_inc(x_91); +lean_dec(x_88); +x_92 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_92, 0, x_86); +lean_ctor_set(x_92, 1, x_91); +return x_92; } } } @@ -1870,7 +4951,7 @@ static lean_object* _init_l_Lean_Elab_wfRecursion___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string(">> "); +x_1 = lean_mk_string("fixed prefix: "); return x_1; } } @@ -1883,491 +4964,130 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Elab_wfRecursion___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string(" :=\n"); -return x_1; -} -} -static lean_object* _init_l_Lean_Elab_wfRecursion___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_wfRecursion___closed__3; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion(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; size_t x_12; size_t 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_11 = lean_array_get_size(x_1); -x_12 = lean_usize_of_nat(x_11); +lean_object* x_11; +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_1); +x_11 = l_Lean_Elab_getFixedPrefix(x_1, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; +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_13 = 0; -x_14 = lean_st_ref_get(x_9, x_10); -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 = lean_ctor_get(x_15, 0); -lean_inc(x_17); -lean_dec(x_15); -x_18 = lean_box(0); -lean_inc(x_8); -x_19 = l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__1(x_1, x_12, x_13, x_18, x_4, x_5, x_6, x_7, x_8, x_9, x_16); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; -x_20 = lean_ctor_get(x_19, 1); -lean_inc(x_20); -lean_dec(x_19); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_1); -x_21 = l_Lean_Elab_WF_packDomain(x_1, x_6, x_7, x_8, x_9, x_20); -if (lean_obj_tag(x_21) == 0) -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; -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); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -x_24 = l_Lean_Elab_WF_packMutual(x_22, x_6, x_7, x_8, x_9, x_23); -if (lean_obj_tag(x_24) == 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_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_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_17, x_4, x_5, x_6, x_7, x_8, x_9, x_26); -x_28 = lean_ctor_get(x_27, 1); -lean_inc(x_28); -lean_dec(x_27); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_25); -lean_inc(x_1); -x_29 = l_Lean_Elab_WF_elabWFRel(x_1, x_25, x_2, x_4, x_5, x_6, x_7, x_8, x_9, x_28); -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; -x_30 = lean_ctor_get(x_29, 0); -lean_inc(x_30); -x_31 = lean_ctor_get(x_29, 1); -lean_inc(x_31); -lean_dec(x_29); -x_32 = lean_st_ref_get(x_9, x_31); -x_33 = lean_ctor_get(x_32, 0); +x_14 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__6; +x_31 = lean_st_ref_get(x_9, x_13); +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_32, 3); lean_inc(x_33); -x_34 = lean_ctor_get(x_32, 1); -lean_inc(x_34); lean_dec(x_32); -x_35 = lean_ctor_get(x_33, 0); -lean_inc(x_35); +x_34 = lean_ctor_get_uint8(x_33, sizeof(void*)*1); lean_dec(x_33); -lean_inc(x_8); -x_36 = l_Lean_Elab_addAsAxiom(x_25, x_6, x_7, x_8, x_9, x_34); -if (lean_obj_tag(x_36) == 0) +if (x_34 == 0) { -lean_object* x_37; lean_object* x_38; -x_37 = lean_ctor_get(x_36, 1); +lean_object* x_35; uint8_t x_36; +x_35 = lean_ctor_get(x_31, 1); +lean_inc(x_35); +lean_dec(x_31); +x_36 = 0; +x_15 = x_36; +x_16 = x_35; +goto block_30; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; +x_37 = lean_ctor_get(x_31, 1); lean_inc(x_37); -lean_dec(x_36); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_38 = l_Lean_Elab_WF_mkFix(x_25, x_30, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_37); -if (lean_obj_tag(x_38) == 0) -{ -lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +lean_dec(x_31); +x_38 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_14, x_4, x_5, x_6, x_7, x_8, x_9, x_37); x_39 = lean_ctor_get(x_38, 0); lean_inc(x_39); x_40 = lean_ctor_get(x_38, 1); lean_inc(x_40); lean_dec(x_38); -x_41 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_35, x_4, x_5, x_6, x_7, x_8, x_9, x_40); -x_42 = lean_ctor_get(x_41, 1); -lean_inc(x_42); -lean_dec(x_41); -lean_inc(x_9); -lean_inc(x_8); -x_43 = l_Lean_Elab_eraseRecAppSyntax(x_39, x_8, x_9, x_42); -if (lean_obj_tag(x_43) == 0) +x_41 = lean_unbox(x_39); +lean_dec(x_39); +x_15 = x_41; +x_16 = x_40; +goto block_30; +} +block_30: { -lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; lean_object* x_48; lean_object* x_66; lean_object* x_67; lean_object* x_68; uint8_t x_69; -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 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__6; -x_66 = lean_st_ref_get(x_9, x_45); -x_67 = lean_ctor_get(x_66, 0); -lean_inc(x_67); -x_68 = lean_ctor_get(x_67, 3); -lean_inc(x_68); -lean_dec(x_67); -x_69 = lean_ctor_get_uint8(x_68, sizeof(void*)*1); -lean_dec(x_68); -if (x_69 == 0) +if (x_15 == 0) { -lean_object* x_70; uint8_t x_71; -x_70 = lean_ctor_get(x_66, 1); -lean_inc(x_70); -lean_dec(x_66); -x_71 = 0; -x_47 = x_71; -x_48 = x_70; -goto block_65; +lean_object* x_17; lean_object* x_18; +x_17 = lean_box(0); +x_18 = l_Lean_Elab_wfRecursion___lambda__4(x_1, x_12, x_2, x_3, x_14, x_17, x_4, x_5, x_6, x_7, x_8, x_9, x_16); +return x_18; } else { -lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; uint8_t x_76; -x_72 = lean_ctor_get(x_66, 1); -lean_inc(x_72); -lean_dec(x_66); -x_73 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_46, x_4, x_5, x_6, x_7, x_8, x_9, x_72); -x_74 = lean_ctor_get(x_73, 0); -lean_inc(x_74); -x_75 = lean_ctor_get(x_73, 1); -lean_inc(x_75); -lean_dec(x_73); -x_76 = lean_unbox(x_74); -lean_dec(x_74); -x_47 = x_76; -x_48 = x_75; -goto block_65; -} -block_65: -{ -if (x_47 == 0) -{ -lean_object* x_49; -x_49 = l_Lean_Elab_wfRecursion___lambda__1(x_12, x_13, x_1, x_44, x_18, x_4, x_5, x_6, x_7, x_8, x_9, x_48); -return x_49; -} -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; lean_object* x_63; lean_object* x_64; -x_50 = lean_ctor_get(x_44, 3); -lean_inc(x_50); -x_51 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_51, 0, x_50); -x_52 = l_Lean_Elab_wfRecursion___closed__2; -x_53 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_53, 0, x_52); -lean_ctor_set(x_53, 1, x_51); -x_54 = l_Lean_Elab_wfRecursion___closed__4; -x_55 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_55, 0, x_53); -lean_ctor_set(x_55, 1, x_54); -x_56 = lean_ctor_get(x_44, 5); -lean_inc(x_56); -x_57 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_57, 0, x_56); -x_58 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_58, 0, x_55); -lean_ctor_set(x_58, 1, x_57); -x_59 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__8; -x_60 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_60, 0, x_58); -lean_ctor_set(x_60, 1, x_59); -x_61 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_46, x_60, x_4, x_5, x_6, x_7, x_8, x_9, x_48); -x_62 = lean_ctor_get(x_61, 0); -lean_inc(x_62); -x_63 = lean_ctor_get(x_61, 1); -lean_inc(x_63); -lean_dec(x_61); -x_64 = l_Lean_Elab_wfRecursion___lambda__1(x_12, x_13, x_1, x_44, x_62, x_4, x_5, x_6, x_7, x_8, x_9, x_63); -lean_dec(x_62); -return x_64; -} -} -} -else -{ -uint8_t x_77; -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_1); -x_77 = !lean_is_exclusive(x_43); -if (x_77 == 0) -{ -return x_43; -} -else -{ -lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_78 = lean_ctor_get(x_43, 0); -x_79 = lean_ctor_get(x_43, 1); -lean_inc(x_79); -lean_inc(x_78); -lean_dec(x_43); -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; -} -} -} -else -{ -lean_object* x_81; lean_object* x_82; lean_object* x_83; uint8_t x_84; -lean_dec(x_1); -x_81 = lean_ctor_get(x_38, 0); -lean_inc(x_81); -x_82 = lean_ctor_get(x_38, 1); -lean_inc(x_82); -lean_dec(x_38); -x_83 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_35, x_4, x_5, x_6, x_7, x_8, x_9, x_82); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_84 = !lean_is_exclusive(x_83); -if (x_84 == 0) -{ -lean_object* x_85; -x_85 = lean_ctor_get(x_83, 0); -lean_dec(x_85); -lean_ctor_set_tag(x_83, 1); -lean_ctor_set(x_83, 0, x_81); -return x_83; -} -else -{ -lean_object* x_86; lean_object* x_87; -x_86 = lean_ctor_get(x_83, 1); -lean_inc(x_86); -lean_dec(x_83); -x_87 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_87, 0, x_81); -lean_ctor_set(x_87, 1, x_86); -return x_87; -} -} -} -else -{ -lean_object* x_88; lean_object* x_89; lean_object* x_90; uint8_t x_91; -lean_dec(x_30); -lean_dec(x_25); -lean_dec(x_3); -lean_dec(x_1); -x_88 = lean_ctor_get(x_36, 0); -lean_inc(x_88); -x_89 = lean_ctor_get(x_36, 1); -lean_inc(x_89); -lean_dec(x_36); -x_90 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_35, x_4, x_5, x_6, x_7, x_8, x_9, x_89); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_91 = !lean_is_exclusive(x_90); -if (x_91 == 0) -{ -lean_object* x_92; -x_92 = lean_ctor_get(x_90, 0); -lean_dec(x_92); -lean_ctor_set_tag(x_90, 1); -lean_ctor_set(x_90, 0, x_88); -return x_90; -} -else -{ -lean_object* x_93; lean_object* x_94; -x_93 = lean_ctor_get(x_90, 1); -lean_inc(x_93); -lean_dec(x_90); -x_94 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_94, 0, x_88); -lean_ctor_set(x_94, 1, x_93); -return x_94; -} -} -} -else -{ -uint8_t x_95; -lean_dec(x_25); -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); -lean_dec(x_1); -x_95 = !lean_is_exclusive(x_29); -if (x_95 == 0) -{ +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_inc(x_12); +x_19 = l_Nat_repr(x_12); +x_20 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_20, 0, x_19); +x_21 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_21, 0, x_20); +x_22 = l_Lean_Elab_wfRecursion___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_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__8; +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_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_14, x_25, x_4, x_5, x_6, x_7, x_8, x_9, x_16); +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 = l_Lean_Elab_wfRecursion___lambda__4(x_1, x_12, x_2, x_3, x_14, x_27, x_4, x_5, x_6, x_7, x_8, x_9, x_28); return x_29; } -else -{ -lean_object* x_96; lean_object* x_97; lean_object* x_98; -x_96 = lean_ctor_get(x_29, 0); -x_97 = lean_ctor_get(x_29, 1); -lean_inc(x_97); -lean_inc(x_96); -lean_dec(x_29); -x_98 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_98, 0, x_96); -lean_ctor_set(x_98, 1, x_97); -return x_98; -} } } else { -lean_object* x_99; lean_object* x_100; lean_object* x_101; uint8_t x_102; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_99 = lean_ctor_get(x_24, 0); -lean_inc(x_99); -x_100 = lean_ctor_get(x_24, 1); -lean_inc(x_100); -lean_dec(x_24); -x_101 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_17, x_4, x_5, x_6, x_7, x_8, x_9, x_100); +uint8_t x_42; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -x_102 = !lean_is_exclusive(x_101); -if (x_102 == 0) -{ -lean_object* x_103; -x_103 = lean_ctor_get(x_101, 0); -lean_dec(x_103); -lean_ctor_set_tag(x_101, 1); -lean_ctor_set(x_101, 0, x_99); -return x_101; -} -else -{ -lean_object* x_104; lean_object* x_105; -x_104 = lean_ctor_get(x_101, 1); -lean_inc(x_104); -lean_dec(x_101); -x_105 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_105, 0, x_99); -lean_ctor_set(x_105, 1, x_104); -return x_105; -} -} -} -else -{ -lean_object* x_106; lean_object* x_107; lean_object* x_108; uint8_t x_109; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_106 = lean_ctor_get(x_21, 0); -lean_inc(x_106); -x_107 = lean_ctor_get(x_21, 1); -lean_inc(x_107); -lean_dec(x_21); -x_108 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_17, x_4, x_5, x_6, x_7, x_8, x_9, x_107); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_109 = !lean_is_exclusive(x_108); -if (x_109 == 0) +x_42 = !lean_is_exclusive(x_11); +if (x_42 == 0) { -lean_object* x_110; -x_110 = lean_ctor_get(x_108, 0); -lean_dec(x_110); -lean_ctor_set_tag(x_108, 1); -lean_ctor_set(x_108, 0, x_106); -return x_108; +return x_11; } else { -lean_object* x_111; lean_object* x_112; -x_111 = lean_ctor_get(x_108, 1); -lean_inc(x_111); -lean_dec(x_108); -x_112 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_112, 0, x_106); -lean_ctor_set(x_112, 1, x_111); -return x_112; -} -} -} -else -{ -lean_object* x_113; lean_object* x_114; lean_object* x_115; uint8_t x_116; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_113 = lean_ctor_get(x_19, 0); -lean_inc(x_113); -x_114 = lean_ctor_get(x_19, 1); -lean_inc(x_114); -lean_dec(x_19); -x_115 = l_Lean_setEnv___at_Lean_Elab_Term_evalExpr___spec__1(x_17, x_4, x_5, x_6, x_7, x_8, x_9, x_114); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_116 = !lean_is_exclusive(x_115); -if (x_116 == 0) -{ -lean_object* x_117; -x_117 = lean_ctor_get(x_115, 0); -lean_dec(x_117); -lean_ctor_set_tag(x_115, 1); -lean_ctor_set(x_115, 0, x_113); -return x_115; -} -else -{ -lean_object* x_118; lean_object* x_119; -x_118 = lean_ctor_get(x_115, 1); -lean_inc(x_118); -lean_dec(x_115); -x_119 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_119, 0, x_113); -lean_ctor_set(x_119, 1, x_118); -return x_119; +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_11, 0); +x_44 = lean_ctor_get(x_11, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_11); +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; } } } @@ -2406,24 +5126,33 @@ lean_dec(x_1); return x_14; } } -LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { -size_t x_13; size_t x_14; lean_object* x_15; -x_13 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_14 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_15 = l_Lean_Elab_wfRecursion___lambda__1(x_13, x_14, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -lean_dec(x_5); +lean_object* x_15; +x_15 = l_Lean_Elab_wfRecursion___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); +lean_dec(x_7); return x_15; } } -LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_998_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Elab_wfRecursion___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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +size_t x_14; size_t x_15; lean_object* x_16; +x_14 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_15 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_16 = l_Lean_Elab_wfRecursion___lambda__3(x_14, x_15, 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_6); +return x_16; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_1950_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__6; +x_2 = l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__6; x_3 = l_Lean_registerTraceClass(x_2, x_1); return x_3; } @@ -2465,8 +5194,6 @@ lean_dec_ref(res); res = initialize_Lean_Elab_PreDefinition_WF_Eqns(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___closed__1 = _init_l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___closed__1(); -lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_isOnlyOneUnaryDef___closed__1); l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1 = _init_l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1(); lean_mark_persistent(l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__1); l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__2 = _init_l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__2(); @@ -2493,47 +5220,69 @@ l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_El lean_mark_persistent(l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___spec__1___closed__12); l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___closed__1 = _init_l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___closed__1(); lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs_mkSum___closed__1); -l_panic___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1 = _init_l_panic___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1(); -lean_mark_persistent(l_panic___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2___closed__1 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2___closed__1(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___lambda__2___closed__1); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__1 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__1(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__1); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__2 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__2(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__2); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__3 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__3(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__3); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__4 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__4(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__4); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__5 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__5(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__5); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__6 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__6(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__6); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__7 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__7(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__7); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__8 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__8(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__8); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__9 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__9(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__9); -l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__10 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__10(); -lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__2___closed__10); -l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__1 = _init_l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__1(); -lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__1); -l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__2 = _init_l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__2(); -lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__2); -l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__3 = _init_l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__3(); -lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___lambda__1___closed__3); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__1 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__1(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__1); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__2 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__2(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__2); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__3 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__3(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__1___closed__3); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2___closed__1 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2___closed__1(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___lambda__2___closed__1); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__1); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__2 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__2(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__2); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__3 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__3(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__3); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__4 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__4(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__4); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__5 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__5(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__5); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__6 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__6(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__6); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__7 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__7(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__7); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__8 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__8(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__8); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__9 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__9(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__9); +l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__10 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__10(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Main_0__Lean_Elab_addNonRecPreDefs___spec__1___closed__10); +l_Lean_Elab_withCommonTelescope___rarg___closed__1 = _init_l_Lean_Elab_withCommonTelescope___rarg___closed__1(); +lean_mark_persistent(l_Lean_Elab_withCommonTelescope___rarg___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___closed__1(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__2___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2___closed__1(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___lambda__2___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__1(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__2(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_getFixedPrefix___spec__3___closed__2); +l_Lean_Elab_getFixedPrefix___lambda__2___closed__1 = _init_l_Lean_Elab_getFixedPrefix___lambda__2___closed__1(); +lean_mark_persistent(l_Lean_Elab_getFixedPrefix___lambda__2___closed__1); l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__2___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__2___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_wfRecursion___spec__2___closed__1); +l_Lean_Elab_wfRecursion___lambda__1___closed__1 = _init_l_Lean_Elab_wfRecursion___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Elab_wfRecursion___lambda__1___closed__1); +l_Lean_Elab_wfRecursion___lambda__1___closed__2 = _init_l_Lean_Elab_wfRecursion___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_Elab_wfRecursion___lambda__1___closed__2); +l_Lean_Elab_wfRecursion___lambda__2___closed__1 = _init_l_Lean_Elab_wfRecursion___lambda__2___closed__1(); +lean_mark_persistent(l_Lean_Elab_wfRecursion___lambda__2___closed__1); +l_Lean_Elab_wfRecursion___lambda__2___closed__2 = _init_l_Lean_Elab_wfRecursion___lambda__2___closed__2(); +lean_mark_persistent(l_Lean_Elab_wfRecursion___lambda__2___closed__2); +l_Lean_Elab_wfRecursion___lambda__4___closed__1 = _init_l_Lean_Elab_wfRecursion___lambda__4___closed__1(); +lean_mark_persistent(l_Lean_Elab_wfRecursion___lambda__4___closed__1); +l_Lean_Elab_wfRecursion___lambda__4___closed__2 = _init_l_Lean_Elab_wfRecursion___lambda__4___closed__2(); +lean_mark_persistent(l_Lean_Elab_wfRecursion___lambda__4___closed__2); +l_Lean_Elab_wfRecursion___lambda__4___closed__3 = _init_l_Lean_Elab_wfRecursion___lambda__4___closed__3(); +lean_mark_persistent(l_Lean_Elab_wfRecursion___lambda__4___closed__3); +l_Lean_Elab_wfRecursion___lambda__4___closed__4 = _init_l_Lean_Elab_wfRecursion___lambda__4___closed__4(); +lean_mark_persistent(l_Lean_Elab_wfRecursion___lambda__4___closed__4); l_Lean_Elab_wfRecursion___closed__1 = _init_l_Lean_Elab_wfRecursion___closed__1(); lean_mark_persistent(l_Lean_Elab_wfRecursion___closed__1); l_Lean_Elab_wfRecursion___closed__2 = _init_l_Lean_Elab_wfRecursion___closed__2(); lean_mark_persistent(l_Lean_Elab_wfRecursion___closed__2); -l_Lean_Elab_wfRecursion___closed__3 = _init_l_Lean_Elab_wfRecursion___closed__3(); -lean_mark_persistent(l_Lean_Elab_wfRecursion___closed__3); -l_Lean_Elab_wfRecursion___closed__4 = _init_l_Lean_Elab_wfRecursion___closed__4(); -lean_mark_persistent(l_Lean_Elab_wfRecursion___closed__4); -res = l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_998_(lean_io_mk_world()); +res = l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_WF_Main___hyg_1950_(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/PreDefinition/WF/PackDomain.c b/stage0/stdlib/Lean/Elab/PreDefinition/WF/PackDomain.c index 4accb1df55..d8387c06e8 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/WF/PackDomain.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/WF/PackDomain.c @@ -15,7 +15,7 @@ extern "C" { #endif LEAN_EXPORT lean_object* l_Lean_Meta_withLetDecl___at_Lean_Elab_WF_packDomain_packApplications_visit___spec__6___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_add(size_t, size_t); lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAuxAux___rarg(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_mvarId_x21(lean_object*); @@ -28,19 +28,19 @@ lean_object* l_Lean_mkSort(lean_object*); lean_object* l_Lean_Meta_mkForallFVars(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_ReaderT_pure___at_Lean_Elab_WF_packDomain_packApplications_visit___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_userName(lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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_name_mk_string(lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); static lean_object* l_Lean_Elab_WF_mkUnaryArg_go___closed__9; static lean_object* l_Lean_Elab_WF_mkUnaryArg_go___closed__8; LEAN_EXPORT lean_object* l_ReaderT_pure___at_Lean_Elab_WF_packDomain_packApplications_visit___spec__1(lean_object*); static lean_object* l_Lean_Elab_WF_mkUnaryArg_go___closed__4; -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications(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_maxRecDepthErrorMessage; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_throwError___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT uint8_t l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT uint8_t l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3(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_EXPORT lean_object* l_Lean_Meta_withIncRecDepth___at_Lean_Elab_WF_packDomain_packApplications_visit___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -62,7 +62,7 @@ lean_object* l_Lean_Expr_appArg_x21(lean_object*); LEAN_EXPORT lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkPSigmaCasesOn_go___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__2___closed__1; lean_object* l_Lean_Expr_replaceFVars(lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___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_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___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_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at_Lean_Elab_WF_packDomain___spec__2(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications_visit___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Elab_WF_packDomain_packApplications_visit___spec__3(lean_object*); @@ -73,7 +73,7 @@ lean_object* lean_nat_add(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkUnaryArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Lean_Meta_forallTelescope___at_Lean_Elab_WF_packDomain_packApplications_visit___spec__5(lean_object*); lean_object* l_Lean_mkAppN(lean_object*, lean_object*); lean_object* l_Lean_mkMData(lean_object*, lean_object*); @@ -100,7 +100,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications_visit___lamb LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkUnaryArg_go___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications_visitApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_withIncRecDepth___at_Lean_Elab_WF_packDomain_packApplications_visit___spec__2(lean_object*); -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3(lean_object*, lean_object*, size_t, size_t, 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*); static lean_object* l_Lean_Elab_WF_mkUnaryArg_go___closed__11; @@ -117,10 +117,10 @@ lean_object* lean_st_mk_ref(lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkTupleElems___closed__1; lean_object* l_Array_back___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_instInhabitedPreDefinition; -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3___boxed(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_WF_packDomain_packApplications_visitApp___closed__1; -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkTupleElems(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at_Lean_Elab_WF_packDomain___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); @@ -129,7 +129,7 @@ lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_ lean_object* l_Array_reverse___rarg(lean_object*); uint8_t l_Lean_Expr_isConst(lean_object*); uint8_t l_Array_isEmpty___rarg(lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___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_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___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* l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at_Lean_Elab_WF_packDomain_packApplications_visit___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_packDomain_packApplications_visitApp___spec__1(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -138,7 +138,7 @@ size_t lean_usize_of_nat(lean_object*); uint8_t l_Lean_Expr_isLambda(lean_object*); static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__2; static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkPSigmaCasesOn_go___closed__3; -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_withLetDecl___at_Lean_Elab_WF_packDomain_packApplications_visit___spec__6(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_WF_mkUnaryArg_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkTupleElems___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -154,7 +154,7 @@ static lean_object* l_Lean_Elab_WF_packDomain_packApplications___closed__1; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_packDomain_packApplications_visitApp___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkPSigmaCasesOn_go(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(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3(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_Lean_mkApp(lean_object*, lean_object*); static lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__5; @@ -173,9 +173,8 @@ static lean_object* l_Lean_Elab_WF_mkUnaryArg_go___closed__2; lean_object* l_Array_ofSubarray___rarg(lean_object*); lean_object* l_Lean_mkApp4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at_Lean_Elab_WF_packDomain_packApplications_visit___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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_st_ref_set(lean_object*, lean_object*, lean_object*); -static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__3; static lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkPSigmaCasesOn_go___spec__1___closed__1; lean_object* lean_infer_type(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); @@ -196,14 +195,14 @@ LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_isAppOfPreDef_x3f___boxed(lea LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_isAppOfPreDef_x3f(lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn(lean_object*); static lean_object* l_Lean_Elab_WF_mkUnaryArg_go___closed__10; -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_findIdx_x3f_loop___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkPSigmaCasesOn_go___closed__2; lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__1; -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___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*); static lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__2; lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withLetDeclImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_WF_packDomain_packApplications___lambda__1___closed__1; @@ -229,10 +228,10 @@ lean_object* l_Lean_Meta_instInhabitedMetaM___boxed(lean_object*, lean_object*, LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkTupleElems___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3___closed__3; static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__1; -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_WF_packDomain_packApplications_visitApp___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkTupleElems___spec__1___closed__1() { _start: @@ -5061,144 +5060,109 @@ _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_WF_mkUnaryArg_go___closed__4; x_2 = l_Lean_Elab_WF_packDomain_packApplications___lambda__1___closed__1; -x_3 = lean_unsigned_to_nat(119u); +x_3 = lean_unsigned_to_nat(127u); x_4 = lean_unsigned_to_nat(49u); x_5 = l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkPSigmaCasesOn_go___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); return x_6; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications___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_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications___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_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_9 = l_Lean_Expr_getAppFn(x_2); -x_10 = l_Lean_Elab_instInhabitedPreDefinition; -x_11 = lean_array_get(x_10, x_1, x_3); -x_12 = lean_ctor_get(x_11, 3); +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; +x_10 = l_Lean_Expr_getAppFn(x_3); +x_11 = lean_unsigned_to_nat(0u); +x_12 = l_Lean_Expr_getAppNumArgsAux(x_3, x_11); +x_13 = l_Lean_Elab_WF_packDomain_packApplications_visitApp___closed__1; lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Expr_constLevels_x21(x_9); -x_14 = l_Lean_mkConst(x_12, x_13); +x_14 = lean_mk_array(x_12, x_13); +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_sub(x_12, x_15); +lean_dec(x_12); +x_17 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_3, x_14, x_16); +x_18 = l_Lean_Elab_instInhabitedPreDefinition; +x_19 = lean_array_get(x_18, x_1, x_4); +x_20 = lean_ctor_get(x_19, 3); +lean_inc(x_20); +lean_dec(x_19); +x_21 = l_Lean_Expr_constLevels_x21(x_10); +x_22 = l_Lean_mkConst(x_20, x_21); +lean_inc(x_2); +lean_inc(x_17); +x_23 = l_Array_toSubarray___rarg(x_17, x_11, x_2); +x_24 = l_Array_ofSubarray___rarg(x_23); +x_25 = l_Lean_mkAppN(x_22, 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_14); -x_15 = lean_infer_type(x_14, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_15) == 0) -{ -lean_object* x_16; -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); -if (lean_obj_tag(x_16) == 7) -{ -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; -x_17 = lean_ctor_get(x_15, 1); -lean_inc(x_17); -lean_dec(x_15); -x_18 = lean_ctor_get(x_16, 1); -lean_inc(x_18); -lean_dec(x_16); -x_19 = lean_unsigned_to_nat(0u); -x_20 = l_Lean_Expr_getAppNumArgsAux(x_2, x_19); -x_21 = l_Lean_Elab_WF_packDomain_packApplications_visitApp___closed__1; -lean_inc(x_20); -x_22 = lean_mk_array(x_20, x_21); -x_23 = lean_unsigned_to_nat(1u); -x_24 = lean_nat_sub(x_20, x_23); -lean_dec(x_20); -x_25 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_2, x_22, x_24); -x_26 = l_Lean_Elab_WF_mkUnaryArg_go(x_25, x_19, x_18, x_4, x_5, x_6, x_7, x_17); -lean_dec(x_18); -lean_dec(x_25); +lean_inc(x_25); +x_26 = lean_infer_type(x_25, x_5, x_6, x_7, x_8, x_9); if (lean_obj_tag(x_26) == 0) { -uint8_t x_27; -x_27 = !lean_is_exclusive(x_26); -if (x_27 == 0) +lean_object* x_27; +x_27 = lean_ctor_get(x_26, 0); +lean_inc(x_27); +if (lean_obj_tag(x_27) == 7) { -lean_object* x_28; lean_object* x_29; -x_28 = lean_ctor_get(x_26, 0); -x_29 = l_Lean_mkApp(x_14, x_28); -lean_ctor_set(x_26, 0, x_29); -return x_26; -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_26, 0); -x_31 = lean_ctor_get(x_26, 1); -lean_inc(x_31); -lean_inc(x_30); +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_28 = lean_ctor_get(x_26, 1); +lean_inc(x_28); lean_dec(x_26); -x_32 = l_Lean_mkApp(x_14, x_30); -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 +x_29 = lean_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +x_30 = lean_array_get_size(x_17); +x_31 = l_Array_toSubarray___rarg(x_17, x_2, x_30); +x_32 = l_Array_ofSubarray___rarg(x_31); +x_33 = l_Lean_Elab_WF_mkUnaryArg_go(x_32, x_11, x_29, x_5, x_6, x_7, x_8, x_28); +lean_dec(x_29); +lean_dec(x_32); +if (lean_obj_tag(x_33) == 0) { uint8_t x_34; -lean_dec(x_14); -x_34 = !lean_is_exclusive(x_26); +x_34 = !lean_is_exclusive(x_33); if (x_34 == 0) { -return x_26; +lean_object* x_35; lean_object* x_36; +x_35 = lean_ctor_get(x_33, 0); +x_36 = l_Lean_mkApp(x_25, x_35); +lean_ctor_set(x_33, 0, x_36); +return x_33; } else { -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_26, 0); -x_36 = lean_ctor_get(x_26, 1); -lean_inc(x_36); -lean_inc(x_35); -lean_dec(x_26); -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; -} -} -} -else -{ -lean_object* x_38; lean_object* x_39; lean_object* x_40; -lean_dec(x_16); -lean_dec(x_14); -lean_dec(x_2); -x_38 = lean_ctor_get(x_15, 1); +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_37 = lean_ctor_get(x_33, 0); +x_38 = lean_ctor_get(x_33, 1); lean_inc(x_38); -lean_dec(x_15); -x_39 = l_Lean_Elab_WF_packDomain_packApplications___lambda__1___closed__2; -x_40 = l_panic___at_Lean_Meta_whnfCore___spec__1(x_39, x_4, x_5, x_6, x_7, x_38); +lean_inc(x_37); +lean_dec(x_33); +x_39 = l_Lean_mkApp(x_25, x_37); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_38); return x_40; } } else { uint8_t x_41; -lean_dec(x_14); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_41 = !lean_is_exclusive(x_15); +lean_dec(x_25); +x_41 = !lean_is_exclusive(x_33); if (x_41 == 0) { -return x_15; +return x_33; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_15, 0); -x_43 = lean_ctor_get(x_15, 1); +x_42 = lean_ctor_get(x_33, 0); +x_43 = lean_ctor_get(x_33, 1); lean_inc(x_43); lean_inc(x_42); -lean_dec(x_15); +lean_dec(x_33); x_44 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_44, 0, x_42); lean_ctor_set(x_44, 1, x_43); @@ -5206,6 +5170,51 @@ return x_44; } } } +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +lean_dec(x_27); +lean_dec(x_25); +lean_dec(x_17); +lean_dec(x_2); +x_45 = lean_ctor_get(x_26, 1); +lean_inc(x_45); +lean_dec(x_26); +x_46 = l_Lean_Elab_WF_packDomain_packApplications___lambda__1___closed__2; +x_47 = l_panic___at_Lean_Meta_whnfCore___spec__1(x_46, x_5, x_6, x_7, x_8, x_45); +return x_47; +} +} +else +{ +uint8_t x_48; +lean_dec(x_25); +lean_dec(x_17); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +x_48 = !lean_is_exclusive(x_26); +if (x_48 == 0) +{ +return x_26; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_26, 0); +x_50 = lean_ctor_get(x_26, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(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; +} +} +} } static lean_object* _init_l_Lean_Elab_WF_packDomain_packApplications___closed__1() { _start: @@ -5216,96 +5225,97 @@ x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications(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_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications(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; 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_10 = lean_alloc_closure((void*)(l_Lean_Elab_WF_packDomain_packApplications___lambda__1___boxed), 8, 1); -lean_closure_set(x_10, 0, x_4); -x_11 = lean_st_ref_get(x_8, x_9); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Elab_WF_packDomain_packApplications___closed__1; -x_14 = lean_st_mk_ref(x_13, x_12); -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_11 = lean_alloc_closure((void*)(l_Lean_Elab_WF_packDomain_packApplications___lambda__1___boxed), 9, 2); +lean_closure_set(x_11, 0, x_5); +lean_closure_set(x_11, 1, x_1); +x_12 = lean_st_ref_get(x_9, x_10); +x_13 = lean_ctor_get(x_12, 1); +lean_inc(x_13); +lean_dec(x_12); +x_14 = l_Lean_Elab_WF_packDomain_packApplications___closed__1; +x_15 = lean_st_mk_ref(x_14, x_13); +x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); -lean_dec(x_14); -lean_inc(x_8); -lean_inc(x_15); -x_17 = l_Lean_Elab_WF_packDomain_packApplications_visit(x_1, x_3, x_10, x_2, x_15, x_5, x_6, x_7, x_8, x_16); -if (lean_obj_tag(x_17) == 0) +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +lean_inc(x_9); +lean_inc(x_16); +x_18 = l_Lean_Elab_WF_packDomain_packApplications_visit(x_2, x_4, x_11, x_3, x_16, x_6, x_7, x_8, x_9, x_17); +if (lean_obj_tag(x_18) == 0) { -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; -x_18 = lean_ctor_get(x_17, 0); -lean_inc(x_18); -x_19 = lean_ctor_get(x_17, 1); +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_19 = lean_ctor_get(x_18, 0); lean_inc(x_19); -lean_dec(x_17); -x_20 = lean_st_ref_get(x_8, x_19); -lean_dec(x_8); -x_21 = lean_ctor_get(x_20, 1); -lean_inc(x_21); -lean_dec(x_20); -x_22 = lean_st_ref_get(x_15, x_21); -lean_dec(x_15); -x_23 = !lean_is_exclusive(x_22); -if (x_23 == 0) +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +x_21 = lean_st_ref_get(x_9, x_20); +lean_dec(x_9); +x_22 = lean_ctor_get(x_21, 1); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_st_ref_get(x_16, x_22); +lean_dec(x_16); +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) { -lean_object* x_24; -x_24 = lean_ctor_get(x_22, 0); -lean_dec(x_24); -lean_ctor_set(x_22, 0, x_18); -return x_22; +lean_object* x_25; +x_25 = lean_ctor_get(x_23, 0); +lean_dec(x_25); +lean_ctor_set(x_23, 0, x_19); +return x_23; } else { -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_22, 1); -lean_inc(x_25); -lean_dec(x_22); -x_26 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_26, 0, x_18); -lean_ctor_set(x_26, 1, x_25); -return x_26; +lean_object* x_26; lean_object* x_27; +x_26 = lean_ctor_get(x_23, 1); +lean_inc(x_26); +lean_dec(x_23); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_19); +lean_ctor_set(x_27, 1, x_26); +return x_27; } } else { -uint8_t x_27; -lean_dec(x_15); -lean_dec(x_8); -x_27 = !lean_is_exclusive(x_17); -if (x_27 == 0) +uint8_t x_28; +lean_dec(x_16); +lean_dec(x_9); +x_28 = !lean_is_exclusive(x_18); +if (x_28 == 0) { -return x_17; +return x_18; } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_17, 0); -x_29 = lean_ctor_get(x_17, 1); +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_18, 0); +x_30 = lean_ctor_get(x_18, 1); +lean_inc(x_30); lean_inc(x_29); -lean_inc(x_28); -lean_dec(x_17); -x_30 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); -return x_30; +lean_dec(x_18); +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_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications___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_EXPORT lean_object* l_Lean_Elab_WF_packDomain_packApplications___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_9; -x_9 = l_Lean_Elab_WF_packDomain_packApplications___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_3); +lean_object* x_10; +x_10 = l_Lean_Elab_WF_packDomain_packApplications___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_4); lean_dec(x_1); -return x_9; +return x_10; } } static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__1___closed__1() { @@ -5558,293 +5568,105 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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) { _start: { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; uint8_t x_17; lean_object* x_18; -lean_inc(x_6); -x_12 = l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkTupleElems(x_6, x_1); -x_13 = l_Lean_Expr_replaceFVars(x_2, x_3, x_12); -lean_dec(x_12); -x_14 = l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkPSigmaCasesOn_go___closed__1; -x_15 = lean_array_push(x_14, x_6); -x_16 = 0; -x_17 = 1; +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; uint8_t x_18; lean_object* x_19; +x_13 = lean_array_get_size(x_1); lean_inc(x_7); -x_18 = l_Lean_Meta_mkForallFVars(x_15, x_13, x_16, x_17, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_18) == 0) +x_14 = l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkTupleElems(x_7, x_13); +lean_dec(x_13); +x_15 = l_Lean_Expr_replaceFVars(x_2, x_1, x_14); +lean_dec(x_14); +x_16 = lean_array_push(x_3, x_7); +x_17 = 0; +x_18 = 1; +lean_inc(x_8); +x_19 = l_Lean_Meta_mkForallFVars(x_16, x_15, x_17, x_18, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_19) == 0) { -lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t 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_19 = lean_ctor_get(x_18, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_18, 1); +lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t 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_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); -lean_dec(x_18); -x_21 = lean_ctor_get(x_4, 0); -x_22 = lean_ctor_get_uint8(x_4, sizeof(void*)*6); -x_23 = lean_ctor_get(x_4, 1); -x_24 = lean_ctor_get(x_4, 2); -x_25 = lean_ctor_get(x_4, 3); -x_26 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__1___closed__2; -x_27 = l_Lean_Name_append(x_25, x_26); -lean_inc(x_24); -lean_inc(x_23); +x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); -x_28 = lean_alloc_ctor(0, 6, 1); -lean_ctor_set(x_28, 0, x_21); -lean_ctor_set(x_28, 1, x_23); -lean_ctor_set(x_28, 2, x_24); -lean_ctor_set(x_28, 3, x_27); -lean_ctor_set(x_28, 4, x_19); -lean_ctor_set(x_28, 5, x_5); -lean_ctor_set_uint8(x_28, sizeof(void*)*6, x_22); -x_29 = l_Lean_Elab_addAsAxiom(x_28, x_7, x_8, x_9, x_10, x_20); -lean_dec(x_7); -if (lean_obj_tag(x_29) == 0) +lean_dec(x_19); +x_22 = lean_ctor_get(x_4, 0); +x_23 = lean_ctor_get_uint8(x_4, sizeof(void*)*6); +x_24 = lean_ctor_get(x_4, 1); +x_25 = lean_ctor_get(x_4, 2); +x_26 = lean_ctor_get(x_4, 3); +x_27 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__1___closed__2; +x_28 = l_Lean_Name_append(x_26, x_27); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_22); +x_29 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_29, 0, x_22); +lean_ctor_set(x_29, 1, x_24); +lean_ctor_set(x_29, 2, x_25); +lean_ctor_set(x_29, 3, x_28); +lean_ctor_set(x_29, 4, x_20); +lean_ctor_set(x_29, 5, x_5); +lean_ctor_set_uint8(x_29, sizeof(void*)*6, x_23); +x_30 = l_Lean_Elab_addAsAxiom(x_29, x_8, x_9, x_10, x_11, x_21); +lean_dec(x_8); +if (lean_obj_tag(x_30) == 0) { -uint8_t x_30; -x_30 = !lean_is_exclusive(x_29); -if (x_30 == 0) +uint8_t x_31; +x_31 = !lean_is_exclusive(x_30); +if (x_31 == 0) { -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_31 = lean_ctor_get(x_29, 0); -lean_dec(x_31); -x_32 = lean_box(x_17); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_1); -lean_ctor_set(x_33, 1, x_32); +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_32 = lean_ctor_get(x_30, 0); +lean_dec(x_32); +x_33 = lean_box(x_18); x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_28); +lean_ctor_set(x_34, 0, x_6); lean_ctor_set(x_34, 1, x_33); -lean_ctor_set(x_29, 0, x_34); -return x_29; +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_29); +lean_ctor_set(x_35, 1, x_34); +lean_ctor_set(x_30, 0, x_35); +return x_30; } else { -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_35 = lean_ctor_get(x_29, 1); -lean_inc(x_35); -lean_dec(x_29); -x_36 = lean_box(x_17); -x_37 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_37, 0, x_1); -lean_ctor_set(x_37, 1, x_36); +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_36 = lean_ctor_get(x_30, 1); +lean_inc(x_36); +lean_dec(x_30); +x_37 = lean_box(x_18); x_38 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_38, 0, x_28); +lean_ctor_set(x_38, 0, x_6); lean_ctor_set(x_38, 1, x_37); x_39 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_35); -return x_39; -} -} -else -{ -uint8_t x_40; -lean_dec(x_28); -lean_dec(x_1); -x_40 = !lean_is_exclusive(x_29); -if (x_40 == 0) -{ -return x_29; -} -else -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_41 = lean_ctor_get(x_29, 0); -x_42 = lean_ctor_get(x_29, 1); -lean_inc(x_42); -lean_inc(x_41); -lean_dec(x_29); -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_9); -lean_dec(x_7); -lean_dec(x_5); -lean_dec(x_1); -x_44 = !lean_is_exclusive(x_18); -if (x_44 == 0) -{ -return x_18; -} -else -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_18, 0); -x_46 = lean_ctor_get(x_18, 1); -lean_inc(x_46); -lean_inc(x_45); -lean_dec(x_18); -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; -} -} -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__1() { -_start: -{ -lean_object* x_1; uint8_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = lean_unsigned_to_nat(1u); -x_2 = 0; -x_3 = lean_box(x_2); -x_4 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_4, 0, x_1); -lean_ctor_set(x_4, 1, x_3); -return x_4; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("_x"); -return x_1; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__2; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__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, lean_object* x_9) { -_start: -{ -lean_object* x_10; lean_object* x_11; uint8_t x_12; -x_10 = lean_array_get_size(x_1); -x_11 = lean_unsigned_to_nat(1u); -x_12 = lean_nat_dec_lt(x_11, x_10); -if (x_12 == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_1); -x_13 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__1; -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_2); -lean_ctor_set(x_14, 1, x_13); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_9); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_2, 4); -lean_inc(x_16); -x_17 = lean_unsigned_to_nat(0u); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -x_18 = l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(x_1, x_17, x_16, x_5, x_6, x_7, x_8, x_9); -if (lean_obj_tag(x_18) == 0) -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_19 = lean_ctor_get(x_18, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_18, 1); -lean_inc(x_20); -lean_dec(x_18); -x_21 = l_Lean_instInhabitedExpr; -x_22 = l_Array_back___rarg(x_21, x_1); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -x_23 = lean_infer_type(x_22, x_5, x_6, x_7, x_8, x_20); -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; size_t x_29; size_t x_30; lean_object* x_31; -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_1); -x_26 = lean_array_pop(x_1); -x_27 = l_Array_reverse___rarg(x_26); -x_28 = lean_array_get_size(x_27); -x_29 = lean_usize_of_nat(x_28); -lean_dec(x_28); -x_30 = 0; -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -x_31 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__1(x_27, x_29, x_30, x_24, x_5, x_6, x_7, x_8, x_25); -lean_dec(x_27); -if (lean_obj_tag(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; uint8_t x_39; lean_object* x_40; -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_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__3; -x_35 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_34, x_7, x_8, x_33); -x_36 = lean_ctor_get(x_35, 0); -lean_inc(x_36); -x_37 = lean_ctor_get(x_35, 1); -lean_inc(x_37); -lean_dec(x_35); -x_38 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__1___boxed), 11, 5); -lean_closure_set(x_38, 0, x_10); -lean_closure_set(x_38, 1, x_19); -lean_closure_set(x_38, 2, x_1); -lean_closure_set(x_38, 3, x_2); -lean_closure_set(x_38, 4, x_3); -x_39 = 0; -x_40 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_forallTelescopeCompatibleAux___spec__15___rarg(x_36, x_39, x_32, x_38, x_5, x_6, x_7, x_8, x_37); +lean_ctor_set(x_39, 0, x_29); +lean_ctor_set(x_39, 1, 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_36); return x_40; } +} else { uint8_t x_41; -lean_dec(x_19); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_7); +lean_dec(x_29); lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_41 = !lean_is_exclusive(x_31); +x_41 = !lean_is_exclusive(x_30); if (x_41 == 0) { -return x_31; +return x_30; } else { lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_31, 0); -x_43 = lean_ctor_get(x_31, 1); +x_42 = lean_ctor_get(x_30, 0); +x_43 = lean_ctor_get(x_30, 1); lean_inc(x_43); lean_inc(x_42); -lean_dec(x_31); +lean_dec(x_30); x_44 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_44, 0, x_42); lean_ctor_set(x_44, 1, x_43); @@ -5855,28 +5677,23 @@ return x_44; else { uint8_t x_45; -lean_dec(x_19); lean_dec(x_10); lean_dec(x_8); -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_45 = !lean_is_exclusive(x_23); +x_45 = !lean_is_exclusive(x_19); if (x_45 == 0) { -return x_23; +return x_19; } else { lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_46 = lean_ctor_get(x_23, 0); -x_47 = lean_ctor_get(x_23, 1); +x_46 = lean_ctor_get(x_19, 0); +x_47 = lean_ctor_get(x_19, 1); lean_inc(x_47); lean_inc(x_46); -lean_dec(x_23); +lean_dec(x_19); x_48 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_48, 0, x_46); lean_ctor_set(x_48, 1, x_47); @@ -5884,34 +5701,232 @@ return x_48; } } } -else +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__1() { +_start: { -uint8_t x_49; -lean_dec(x_10); +lean_object* x_1; +x_1 = lean_mk_string("_x"); +return x_1; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__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, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_11 = lean_array_get_size(x_1); +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_add(x_2, x_12); +x_14 = lean_nat_dec_lt(x_13, x_11); +lean_dec(x_13); +if (x_14 == 0) +{ +uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); +lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_49 = !lean_is_exclusive(x_18); -if (x_49 == 0) -{ -return x_18; +x_15 = 0; +x_16 = lean_box(x_15); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_11); +lean_ctor_set(x_17, 1, x_16); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_3); +lean_ctor_set(x_18, 1, x_17); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_10); +return x_19; } else { -lean_object* x_50; lean_object* x_51; lean_object* x_52; -x_50 = lean_ctor_get(x_18, 0); -x_51 = lean_ctor_get(x_18, 1); +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_3, 4); +lean_inc(x_20); +x_21 = lean_unsigned_to_nat(0u); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_22 = l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(x_1, x_21, x_20, x_6, x_7, x_8, x_9, x_10); +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; +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 = l_Lean_instInhabitedExpr; +x_26 = l_Array_back___rarg(x_25, x_1); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_27 = lean_infer_type(x_26, x_6, x_7, x_8, x_9, x_24); +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; size_t x_38; size_t x_39; lean_object* x_40; +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); +lean_inc(x_2); +lean_inc(x_1); +x_30 = l_Array_toSubarray___rarg(x_1, x_21, x_2); +x_31 = l_Array_ofSubarray___rarg(x_30); +x_32 = lean_array_get_size(x_1); +x_33 = l_Array_toSubarray___rarg(x_1, x_2, x_32); +x_34 = l_Array_ofSubarray___rarg(x_33); +lean_inc(x_34); +x_35 = lean_array_pop(x_34); +x_36 = l_Array_reverse___rarg(x_35); +x_37 = lean_array_get_size(x_36); +x_38 = lean_usize_of_nat(x_37); +lean_dec(x_37); +x_39 = 0; +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_40 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__1(x_36, x_38, x_39, x_28, x_6, x_7, x_8, x_9, x_29); +lean_dec(x_36); +if (lean_obj_tag(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; uint8_t x_48; lean_object* x_49; +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); +x_43 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__2; +x_44 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_43, x_8, x_9, 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_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__1___boxed), 12, 6); +lean_closure_set(x_47, 0, x_34); +lean_closure_set(x_47, 1, x_23); +lean_closure_set(x_47, 2, x_31); +lean_closure_set(x_47, 3, x_3); +lean_closure_set(x_47, 4, x_4); +lean_closure_set(x_47, 5, x_11); +x_48 = 0; +x_49 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_forallTelescopeCompatibleAux___spec__15___rarg(x_45, x_48, x_41, x_47, x_6, x_7, x_8, x_9, x_46); +return x_49; +} +else +{ +uint8_t x_50; +lean_dec(x_34); +lean_dec(x_31); +lean_dec(x_23); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_50 = !lean_is_exclusive(x_40); +if (x_50 == 0) +{ +return x_40; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_51 = lean_ctor_get(x_40, 0); +x_52 = lean_ctor_get(x_40, 1); +lean_inc(x_52); lean_inc(x_51); -lean_inc(x_50); -lean_dec(x_18); -x_52 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_52, 0, x_50); -lean_ctor_set(x_52, 1, x_51); -return x_52; +lean_dec(x_40); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_51); +lean_ctor_set(x_53, 1, x_52); +return x_53; +} +} +} +else +{ +uint8_t x_54; +lean_dec(x_23); +lean_dec(x_11); +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_54 = !lean_is_exclusive(x_27); +if (x_54 == 0) +{ +return x_27; +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_27, 0); +x_56 = lean_ctor_get(x_27, 1); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_27); +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_55); +lean_ctor_set(x_57, 1, x_56); +return x_57; +} +} +} +else +{ +uint8_t x_58; +lean_dec(x_11); +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_58 = !lean_is_exclusive(x_22); +if (x_58 == 0) +{ +return x_22; +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_59 = lean_ctor_get(x_22, 0); +x_60 = lean_ctor_get(x_22, 1); +lean_inc(x_60); +lean_inc(x_59); +lean_dec(x_22); +x_61 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_61, 0, x_59); +lean_ctor_set(x_61, 1, x_60); +return x_61; } } } @@ -5938,7 +5953,7 @@ static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain_ _start: { lean_object* x_1; -x_1 = lean_mk_string("' does not take any arguments"); +x_1 = lean_mk_string("' does not take any (non-fixed) arguments"); return x_1; } } @@ -5951,30 +5966,30 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___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, lean_object* x_9) { +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___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, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_10; lean_object* x_11; uint8_t x_12; -lean_dec(x_4); -x_10 = lean_array_get_size(x_3); -x_11 = lean_unsigned_to_nat(0u); -x_12 = lean_nat_dec_eq(x_10, x_11); -lean_dec(x_10); +lean_object* x_11; uint8_t x_12; +lean_dec(x_5); +x_11 = lean_array_get_size(x_4); +x_12 = lean_nat_dec_eq(x_11, x_1); +lean_dec(x_11); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; x_13 = lean_box(0); -x_14 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2(x_3, x_1, x_2, x_13, x_5, x_6, x_7, x_8, x_9); +x_14 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2(x_4, x_1, x_2, x_3, x_13, x_6, x_7, x_8, x_9, x_10); 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; uint8_t x_22; +lean_dec(x_4); lean_dec(x_3); -lean_dec(x_2); -x_15 = lean_ctor_get(x_1, 3); -lean_inc(x_15); lean_dec(x_1); +x_15 = lean_ctor_get(x_2, 3); +lean_inc(x_15); +lean_dec(x_2); x_16 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_16, 0, x_15); x_17 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3___closed__2; @@ -5985,11 +6000,11 @@ x_19 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda_ 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___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__1(x_20, x_5, x_6, x_7, x_8, x_9); +x_21 = l_Lean_throwError___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__1(x_20, 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); x_22 = !lean_is_exclusive(x_21); if (x_22 == 0) { @@ -6011,133 +6026,137 @@ return x_25; } } } -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3(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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -uint8_t x_10; -x_10 = lean_usize_dec_lt(x_3, x_2); -if (x_10 == 0) +uint8_t x_11; +x_11 = lean_usize_dec_lt(x_4, x_3); +if (x_11 == 0) { -lean_object* x_11; +lean_object* x_12; +lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); -lean_dec(x_5); -x_11 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_11, 0, x_4); -lean_ctor_set(x_11, 1, x_9); -return x_11; +lean_dec(x_1); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_5); +lean_ctor_set(x_12, 1, x_10); +return x_12; } else { -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_12 = lean_array_uget(x_1, x_3); -x_13 = lean_ctor_get(x_4, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_4, 1); +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_13 = lean_array_uget(x_2, x_4); +x_14 = lean_ctor_get(x_5, 0); lean_inc(x_14); -lean_dec(x_4); -x_15 = lean_ctor_get(x_14, 0); +x_15 = lean_ctor_get(x_5, 1); lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); +lean_dec(x_5); +x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); -lean_dec(x_14); -x_17 = lean_ctor_get(x_12, 5); +x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); -lean_inc(x_17); -x_18 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3), 9, 2); -lean_closure_set(x_18, 0, x_12); -lean_closure_set(x_18, 1, x_17); +lean_dec(x_15); +x_18 = lean_ctor_get(x_13, 5); +lean_inc(x_18); +lean_inc(x_18); +lean_inc(x_1); +x_19 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3), 10, 3); +lean_closure_set(x_19, 0, x_1); +lean_closure_set(x_19, 1, x_13); +lean_closure_set(x_19, 2, x_18); +lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); -x_19 = l_Lean_Meta_lambdaTelescope___at_Lean_Elab_WF_packDomain___spec__2___rarg(x_17, x_18, x_5, x_6, x_7, x_8, x_9); -if (lean_obj_tag(x_19) == 0) +x_20 = l_Lean_Meta_lambdaTelescope___at_Lean_Elab_WF_packDomain___spec__2___rarg(x_18, x_19, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_20) == 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; uint8_t x_28; -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -x_21 = lean_ctor_get(x_20, 1); +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; +x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); -x_22 = lean_ctor_get(x_19, 1); +x_22 = lean_ctor_get(x_21, 1); lean_inc(x_22); -lean_dec(x_19); -x_23 = lean_ctor_get(x_20, 0); +x_23 = lean_ctor_get(x_20, 1); lean_inc(x_23); lean_dec(x_20); x_24 = lean_ctor_get(x_21, 0); lean_inc(x_24); -x_25 = lean_ctor_get(x_21, 1); -lean_inc(x_25); lean_dec(x_21); -x_26 = lean_array_push(x_13, x_24); -x_27 = lean_array_push(x_15, x_23); -x_28 = lean_unbox(x_16); -lean_dec(x_16); -if (x_28 == 0) +x_25 = lean_ctor_get(x_22, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_22, 1); +lean_inc(x_26); +lean_dec(x_22); +x_27 = lean_array_push(x_14, x_25); +x_28 = lean_array_push(x_16, x_24); +x_29 = lean_unbox(x_17); +lean_dec(x_17); +if (x_29 == 0) { -lean_object* x_29; lean_object* x_30; size_t x_31; size_t x_32; -x_29 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_25); +lean_object* x_30; lean_object* x_31; size_t x_32; size_t x_33; x_30 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_30, 0, x_26); -lean_ctor_set(x_30, 1, x_29); -x_31 = 1; -x_32 = lean_usize_add(x_3, x_31); -x_3 = x_32; -x_4 = x_30; -x_9 = x_22; +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_26); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_27); +lean_ctor_set(x_31, 1, x_30); +x_32 = 1; +x_33 = lean_usize_add(x_4, x_32); +x_4 = x_33; +x_5 = x_31; +x_10 = x_23; goto _start; } else { -uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; size_t x_38; size_t x_39; -lean_dec(x_25); -x_34 = 1; -x_35 = lean_box(x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_27); -lean_ctor_set(x_36, 1, x_35); +uint8_t x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; size_t x_39; size_t x_40; +lean_dec(x_26); +x_35 = 1; +x_36 = lean_box(x_35); x_37 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_37, 0, x_26); +lean_ctor_set(x_37, 0, x_28); lean_ctor_set(x_37, 1, x_36); -x_38 = 1; -x_39 = lean_usize_add(x_3, x_38); -x_3 = x_39; -x_4 = x_37; -x_9 = x_22; +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_27); +lean_ctor_set(x_38, 1, x_37); +x_39 = 1; +x_40 = lean_usize_add(x_4, x_39); +x_4 = x_40; +x_5 = x_38; +x_10 = x_23; goto _start; } } else { -uint8_t x_41; +uint8_t x_42; +lean_dec(x_17); lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_13); +lean_dec(x_14); +lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); -lean_dec(x_5); -x_41 = !lean_is_exclusive(x_19); -if (x_41 == 0) +lean_dec(x_1); +x_42 = !lean_is_exclusive(x_20); +if (x_42 == 0) { -return x_19; +return x_20; } else { -lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_19, 0); -x_43 = lean_ctor_get(x_19, 1); +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_20, 0); +x_44 = lean_ctor_get(x_20, 1); +lean_inc(x_44); lean_inc(x_43); -lean_inc(x_42); -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); -return x_44; +lean_dec(x_20); +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; } } } @@ -6196,106 +6215,108 @@ return x_22; } } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___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_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___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) { _start: { -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_13 = l_Lean_instInhabitedExpr; -x_14 = lean_unsigned_to_nat(0u); -x_15 = lean_array_get(x_13, x_6, x_14); +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = l_Lean_instInhabitedExpr; +x_16 = lean_unsigned_to_nat(0u); +x_17 = lean_array_get(x_15, x_8, x_16); +lean_inc(x_13); +lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_15); -x_16 = l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkPSigmaCasesOn(x_15, x_7, x_1, x_2, x_8, x_9, x_10, x_11, x_12); -if (lean_obj_tag(x_16) == 0) -{ -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_18 = l___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkPSigmaCasesOn(x_17, x_9, x_1, x_2, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +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_19 = l_Lean_Elab_WF_packDomain_packApplications(x_3, x_17, x_4, x_5, x_8, x_9, x_10, x_11, x_18); -if (lean_obj_tag(x_19) == 0) +x_21 = l_Lean_Elab_WF_packDomain_packApplications(x_3, x_4, x_19, x_5, x_6, x_10, x_11, x_12, x_13, x_20); +if (lean_obj_tag(x_21) == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; uint8_t x_25; lean_object* x_26; -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___private_Lean_Elab_PreDefinition_WF_PackDomain_0__Lean_Elab_WF_mkPSigmaCasesOn_go___closed__1; -x_23 = lean_array_push(x_22, x_15); -x_24 = 0; -x_25 = 1; -x_26 = l_Lean_Meta_mkLambdaFVars(x_23, x_20, x_24, x_25, x_8, x_9, x_10, x_11, x_21); +lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; uint8_t x_26; lean_object* x_27; +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_array_push(x_7, x_17); +x_25 = 0; +x_26 = 1; +x_27 = l_Lean_Meta_mkLambdaFVars(x_24, x_22, x_25, x_26, x_10, x_11, x_12, x_13, x_23); +lean_dec(x_13); +lean_dec(x_12); lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -return x_26; +return x_27; } else { -uint8_t x_27; -lean_dec(x_15); +uint8_t x_28; +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); -x_27 = !lean_is_exclusive(x_19); -if (x_27 == 0) +lean_dec(x_7); +x_28 = !lean_is_exclusive(x_21); +if (x_28 == 0) { -return x_19; +return x_21; } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_19, 0); -x_29 = lean_ctor_get(x_19, 1); +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_21, 0); +x_30 = lean_ctor_get(x_21, 1); +lean_inc(x_30); lean_inc(x_29); -lean_inc(x_28); -lean_dec(x_19); -x_30 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); -return x_30; +lean_dec(x_21); +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; } } } else { -uint8_t x_31; -lean_dec(x_15); +uint8_t x_32; +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_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -x_31 = !lean_is_exclusive(x_16); -if (x_31 == 0) +x_32 = !lean_is_exclusive(x_18); +if (x_32 == 0) { -return x_16; +return x_18; } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_16, 0); -x_33 = lean_ctor_get(x_16, 1); +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_18, 0); +x_34 = lean_ctor_get(x_18, 1); +lean_inc(x_34); lean_inc(x_33); -lean_inc(x_32); -lean_dec(x_16); -x_34 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_34, 0, x_32); -lean_ctor_set(x_34, 1, x_33); -return x_34; +lean_dec(x_18); +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; } } } @@ -6310,82 +6331,142 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_12 = lean_ctor_get(x_1, 4); -lean_inc(x_12); -lean_dec(x_1); -x_13 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__1___boxed), 12, 5); -lean_closure_set(x_13, 0, x_5); -lean_closure_set(x_13, 1, x_6); -lean_closure_set(x_13, 2, x_2); -lean_closure_set(x_13, 3, x_3); -lean_closure_set(x_13, 4, x_4); -x_14 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__2___closed__1; -x_15 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_reduceMatcher_x3f___spec__3___rarg(x_12, x_14, x_13, x_7, x_8, x_9, x_10, x_11); -return x_15; -} -} -LEAN_EXPORT uint8_t l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_13 = lean_unsigned_to_nat(0u); +lean_inc(x_1); +lean_inc(x_6); +x_14 = l_Array_toSubarray___rarg(x_6, x_13, x_1); +x_15 = l_Array_ofSubarray___rarg(x_14); +x_16 = lean_array_get_size(x_6); +lean_inc(x_1); +x_17 = l_Array_toSubarray___rarg(x_6, x_1, x_16); +x_18 = l_Array_ofSubarray___rarg(x_17); +x_19 = lean_ctor_get(x_2, 4); +lean_inc(x_19); +lean_dec(x_2); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_20 = l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(x_15, x_13, x_19, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_20) == 0) { -lean_object* x_4; -x_4 = l_Lean_Elab_WF_packDomain_isAppOfPreDef_x3f(x_1, x_3); -if (lean_obj_tag(x_4) == 0) -{ -uint8_t x_5; -x_5 = 0; -return x_5; +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +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_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__1___boxed), 14, 7); +lean_closure_set(x_23, 0, x_18); +lean_closure_set(x_23, 1, x_7); +lean_closure_set(x_23, 2, x_1); +lean_closure_set(x_23, 3, x_3); +lean_closure_set(x_23, 4, x_4); +lean_closure_set(x_23, 5, x_5); +lean_closure_set(x_23, 6, x_15); +x_24 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__2___closed__1; +x_25 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_reduceMatcher_x3f___spec__3___rarg(x_21, x_24, x_23, x_8, x_9, x_10, x_11, x_22); +return x_25; } else { -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_6 = lean_ctor_get(x_4, 0); -lean_inc(x_6); -lean_dec(x_4); -x_7 = lean_unsigned_to_nat(0u); -x_8 = l_Lean_Expr_getAppNumArgsAux(x_3, x_7); -x_9 = lean_unsigned_to_nat(1u); -x_10 = lean_nat_dec_lt(x_9, x_8); +uint8_t x_26; +lean_dec(x_18); +lean_dec(x_15); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); lean_dec(x_8); -if (x_10 == 0) +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_26 = !lean_is_exclusive(x_20); +if (x_26 == 0) { -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_11 = l_Lean_Elab_instInhabitedPreDefinition; -x_12 = lean_array_get(x_11, x_2, x_6); -x_13 = lean_ctor_get(x_12, 3); -lean_inc(x_13); -lean_dec(x_12); -x_14 = lean_array_get(x_11, x_1, x_6); -lean_dec(x_6); +return x_20; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_20, 0); +x_28 = lean_ctor_get(x_20, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_20); +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_EXPORT uint8_t l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3(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_WF_packDomain_isAppOfPreDef_x3f(x_1, x_4); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = 0; +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_7 = lean_ctor_get(x_5, 0); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_unsigned_to_nat(1u); +x_9 = lean_nat_add(x_2, x_8); +x_10 = lean_unsigned_to_nat(0u); +x_11 = l_Lean_Expr_getAppNumArgsAux(x_4, x_10); +x_12 = lean_nat_dec_lt(x_9, x_11); +lean_dec(x_11); +lean_dec(x_9); +if (x_12 == 0) +{ +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_13 = l_Lean_Elab_instInhabitedPreDefinition; +x_14 = lean_array_get(x_13, x_3, x_7); x_15 = lean_ctor_get(x_14, 3); lean_inc(x_15); lean_dec(x_14); -x_16 = lean_name_eq(x_13, x_15); +x_16 = lean_array_get(x_13, x_1, x_7); +lean_dec(x_7); +x_17 = lean_ctor_get(x_16, 3); +lean_inc(x_17); +lean_dec(x_16); +x_18 = lean_name_eq(x_15, x_17); +lean_dec(x_17); lean_dec(x_15); -lean_dec(x_13); -if (x_16 == 0) -{ -uint8_t x_17; -x_17 = 1; -return x_17; -} -else -{ -uint8_t x_18; -x_18 = 0; -return x_18; -} -} -else +if (x_18 == 0) { uint8_t x_19; -lean_dec(x_6); x_19 = 1; return x_19; } +else +{ +uint8_t x_20; +x_20 = 0; +return x_20; +} +} +else +{ +uint8_t x_21; +lean_dec(x_7); +x_21 = 1; +return x_21; +} } } } @@ -6526,324 +6607,332 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___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) { _start: { -uint8_t x_13; -x_13 = lean_nat_dec_le(x_5, x_4); -if (x_13 == 0) +uint8_t x_14; +x_14 = lean_nat_dec_le(x_6, x_5); +if (x_14 == 0) { -lean_object* x_14; uint8_t x_15; -x_14 = lean_unsigned_to_nat(0u); -x_15 = lean_nat_dec_eq(x_3, x_14); -if (x_15 == 0) +lean_object* x_15; uint8_t x_16; +x_15 = lean_unsigned_to_nat(0u); +x_16 = lean_nat_dec_eq(x_4, x_15); +if (x_16 == 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; lean_object* x_22; lean_object* x_23; -x_16 = lean_unsigned_to_nat(1u); -x_17 = lean_nat_sub(x_3, x_16); -lean_dec(x_3); -x_18 = l_Lean_Elab_instInhabitedPreDefinition; -x_19 = lean_array_get(x_18, x_1, x_4); -x_20 = lean_array_get(x_18, x_7, x_4); -x_21 = lean_ctor_get(x_19, 5); -lean_inc(x_21); -lean_inc(x_7); +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_17 = lean_unsigned_to_nat(1u); +x_18 = lean_nat_sub(x_4, x_17); +lean_dec(x_4); +x_19 = l_Lean_Elab_instInhabitedPreDefinition; +x_20 = lean_array_get(x_19, x_2, x_5); +x_21 = lean_array_get(x_19, x_8, x_5); +x_22 = lean_ctor_get(x_20, 5); +lean_inc(x_22); +lean_inc(x_8); +lean_inc(x_3); lean_inc(x_2); +lean_inc(x_21); lean_inc(x_1); -lean_inc(x_20); -x_22 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__2), 11, 4); -lean_closure_set(x_22, 0, x_20); -lean_closure_set(x_22, 1, x_1); -lean_closure_set(x_22, 2, x_2); -lean_closure_set(x_22, 3, x_7); +x_23 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__2), 12, 5); +lean_closure_set(x_23, 0, x_1); +lean_closure_set(x_23, 1, x_21); +lean_closure_set(x_23, 2, x_2); +lean_closure_set(x_23, 3, x_3); +lean_closure_set(x_23, 4, x_8); +lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); -lean_inc(x_8); -x_23 = l_Lean_Meta_lambdaTelescope___at_Lean_Elab_WF_packDomain___spec__2___rarg(x_21, x_22, x_8, x_9, x_10, x_11, x_12); -if (lean_obj_tag(x_23) == 0) +x_24 = l_Lean_Meta_lambdaTelescope___at_Lean_Elab_WF_packDomain___spec__2___rarg(x_22, x_23, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_24) == 0) { -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_24 = lean_ctor_get(x_23, 0); -lean_inc(x_24); -x_25 = lean_ctor_get(x_23, 1); +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); -lean_dec(x_23); -lean_inc(x_7); +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +lean_inc(x_8); lean_inc(x_1); -x_26 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3___boxed), 3, 2); -lean_closure_set(x_26, 0, x_1); -lean_closure_set(x_26, 1, x_7); -lean_inc(x_24); -x_27 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_26, x_24); -if (lean_obj_tag(x_27) == 0) +lean_inc(x_2); +x_27 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3___boxed), 4, 3); +lean_closure_set(x_27, 0, x_2); +lean_closure_set(x_27, 1, x_1); +lean_closure_set(x_27, 2, x_8); +lean_inc(x_25); +x_28 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_27, x_25); +if (lean_obj_tag(x_28) == 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_dec(x_19); -x_28 = lean_box(0); -x_29 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__4(x_20, x_24, x_4, x_7, x_28, x_8, x_9, x_10, x_11, x_25); -x_30 = lean_ctor_get(x_29, 0); -lean_inc(x_30); -x_31 = lean_ctor_get(x_29, 1); +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_dec(x_20); +x_29 = lean_box(0); +x_30 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__4(x_21, x_25, x_5, x_8, x_29, x_9, x_10, x_11, x_12, x_26); +x_31 = lean_ctor_get(x_30, 0); lean_inc(x_31); -lean_dec(x_29); -x_32 = lean_ctor_get(x_30, 0); +x_32 = lean_ctor_get(x_30, 1); lean_inc(x_32); lean_dec(x_30); -x_33 = lean_nat_add(x_4, x_6); -lean_dec(x_4); -x_3 = x_17; -x_4 = x_33; -x_7 = x_32; -x_12 = x_31; +x_33 = lean_ctor_get(x_31, 0); +lean_inc(x_33); +lean_dec(x_31); +x_34 = lean_nat_add(x_5, x_7); +lean_dec(x_5); +x_4 = x_18; +x_5 = x_34; +x_8 = x_33; +x_13 = x_32; goto _start; } else { -lean_object* x_35; lean_object* x_36; -x_35 = lean_ctor_get(x_27, 0); -lean_inc(x_35); -lean_dec(x_27); -x_36 = l_Lean_Elab_WF_packDomain_isAppOfPreDef_x3f(x_1, x_35); -if (lean_obj_tag(x_36) == 0) +lean_object* x_36; lean_object* x_37; +x_36 = lean_ctor_get(x_28, 0); +lean_inc(x_36); +lean_dec(x_28); +x_37 = l_Lean_Elab_WF_packDomain_isAppOfPreDef_x3f(x_2, x_36); +if (lean_obj_tag(x_37) == 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_dec(x_35); -lean_dec(x_19); -x_37 = lean_box(0); -x_38 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__4(x_20, x_24, x_4, x_7, x_37, x_8, x_9, x_10, x_11, x_25); -x_39 = lean_ctor_get(x_38, 0); -lean_inc(x_39); -x_40 = lean_ctor_get(x_38, 1); +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_dec(x_36); +lean_dec(x_20); +x_38 = lean_box(0); +x_39 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__4(x_21, x_25, x_5, x_8, x_38, x_9, x_10, x_11, x_12, x_26); +x_40 = lean_ctor_get(x_39, 0); lean_inc(x_40); -lean_dec(x_38); -x_41 = lean_ctor_get(x_39, 0); +x_41 = lean_ctor_get(x_39, 1); lean_inc(x_41); lean_dec(x_39); -x_42 = lean_nat_add(x_4, x_6); -lean_dec(x_4); -x_3 = x_17; -x_4 = x_42; -x_7 = x_41; -x_12 = x_40; +x_42 = lean_ctor_get(x_40, 0); +lean_inc(x_42); +lean_dec(x_40); +x_43 = lean_nat_add(x_5, x_7); +lean_dec(x_5); +x_4 = x_18; +x_5 = x_43; +x_8 = x_42; +x_13 = x_41; goto _start; } 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; 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; uint8_t x_74; -lean_dec(x_24); -lean_dec(x_20); -lean_dec(x_17); -lean_dec(x_7); -lean_dec(x_4); -x_44 = lean_ctor_get(x_36, 0); -lean_inc(x_44); -lean_dec(x_36); -x_45 = lean_ctor_get(x_19, 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; 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; uint8_t x_75; +lean_dec(x_25); +lean_dec(x_21); +lean_dec(x_18); +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_1); +x_45 = lean_ctor_get(x_37, 0); lean_inc(x_45); -x_46 = lean_ctor_get(x_19, 3); +lean_dec(x_37); +x_46 = lean_ctor_get(x_20, 0); lean_inc(x_46); -lean_dec(x_19); -x_47 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_47, 0, x_46); -x_48 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__2; -x_49 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_47); -x_50 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__4; -x_51 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_51, 0, x_49); -lean_ctor_set(x_51, 1, x_50); -x_52 = lean_array_get(x_18, x_1, x_44); -lean_dec(x_1); -x_53 = lean_ctor_get(x_52, 3); -lean_inc(x_53); -lean_dec(x_52); -x_54 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_54, 0, x_53); -x_55 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_55, 0, x_51); -lean_ctor_set(x_55, 1, x_54); -x_56 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__6; -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 = l_Lean_Expr_getAppNumArgsAux(x_35, x_14); -lean_dec(x_35); -x_59 = l_Nat_repr(x_58); -x_60 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_60, 0, x_59); -x_61 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_61, 0, x_60); -x_62 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_62, 0, x_57); -lean_ctor_set(x_62, 1, x_61); -x_63 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__8; -x_64 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_64, 0, x_62); -lean_ctor_set(x_64, 1, x_63); -x_65 = l_instInhabitedNat; -x_66 = lean_array_get(x_65, x_2, x_44); -lean_dec(x_44); -lean_dec(x_2); -x_67 = l_Nat_repr(x_66); -x_68 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_68, 0, x_67); -x_69 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_69, 0, x_68); -x_70 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_70, 0, x_64); -lean_ctor_set(x_70, 1, x_69); -x_71 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__10; -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_throwErrorAt___at_Lean_Elab_WF_packDomain___spec__4(x_45, x_72, x_8, x_9, x_10, x_11, x_25); -lean_dec(x_11); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_45); -x_74 = !lean_is_exclusive(x_73); -if (x_74 == 0) -{ -return x_73; -} -else -{ -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_73, 0); -x_76 = lean_ctor_get(x_73, 1); -lean_inc(x_76); -lean_inc(x_75); -lean_dec(x_73); -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; -} -} -} -} -else -{ -uint8_t x_78; +x_47 = lean_ctor_get(x_20, 3); +lean_inc(x_47); lean_dec(x_20); -lean_dec(x_19); -lean_dec(x_17); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_4); +x_48 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_48, 0, x_47); +x_49 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__2; +x_50 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_48); +x_51 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__4; +x_52 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +x_53 = lean_array_get(x_19, x_2, x_45); lean_dec(x_2); -lean_dec(x_1); -x_78 = !lean_is_exclusive(x_23); -if (x_78 == 0) +x_54 = lean_ctor_get(x_53, 3); +lean_inc(x_54); +lean_dec(x_53); +x_55 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_55, 0, x_54); +x_56 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_56, 0, x_52); +lean_ctor_set(x_56, 1, x_55); +x_57 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__6; +x_58 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_57); +x_59 = l_Lean_Expr_getAppNumArgsAux(x_36, x_15); +lean_dec(x_36); +x_60 = l_Nat_repr(x_59); +x_61 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_61, 0, x_60); +x_62 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_62, 0, x_61); +x_63 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_63, 0, x_58); +lean_ctor_set(x_63, 1, x_62); +x_64 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__8; +x_65 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_65, 0, x_63); +lean_ctor_set(x_65, 1, x_64); +x_66 = l_instInhabitedNat; +x_67 = lean_array_get(x_66, x_3, x_45); +lean_dec(x_45); +lean_dec(x_3); +x_68 = l_Nat_repr(x_67); +x_69 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_69, 0, x_68); +x_70 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_70, 0, x_69); +x_71 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_71, 0, x_65); +lean_ctor_set(x_71, 1, x_70); +x_72 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___closed__10; +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_throwErrorAt___at_Lean_Elab_WF_packDomain___spec__4(x_46, x_73, x_9, x_10, x_11, x_12, x_26); +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_46); +x_75 = !lean_is_exclusive(x_74); +if (x_75 == 0) { -return x_23; +return x_74; } else { -lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_79 = lean_ctor_get(x_23, 0); -x_80 = lean_ctor_get(x_23, 1); -lean_inc(x_80); -lean_inc(x_79); -lean_dec(x_23); -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_object* x_76; lean_object* x_77; lean_object* x_78; +x_76 = lean_ctor_get(x_74, 0); +x_77 = lean_ctor_get(x_74, 1); +lean_inc(x_77); +lean_inc(x_76); +lean_dec(x_74); +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 { -lean_object* x_82; +uint8_t x_79; +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_18); +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_3); lean_dec(x_2); lean_dec(x_1); -x_82 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_82, 0, x_7); -lean_ctor_set(x_82, 1, x_12); +x_79 = !lean_is_exclusive(x_24); +if (x_79 == 0) +{ +return x_24; +} +else +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_80 = lean_ctor_get(x_24, 0); +x_81 = lean_ctor_get(x_24, 1); +lean_inc(x_81); +lean_inc(x_80); +lean_dec(x_24); +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; } } +} else { lean_object* x_83; +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_83 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_83, 0, x_7); -lean_ctor_set(x_83, 1, x_12); +lean_ctor_set(x_83, 0, x_8); +lean_ctor_set(x_83, 1, x_13); return x_83; } } +else +{ +lean_object* x_84; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_84 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_84, 0, x_8); +lean_ctor_set(x_84, 1, x_13); +return x_84; } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Lean_Elab_WF_packDomain___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) { _start: { -lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = lean_unsigned_to_nat(0u); -x_12 = lean_unsigned_to_nat(1u); -lean_inc(x_3); -x_13 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5(x_1, x_2, x_3, x_11, x_3, x_12, x_4, x_6, x_7, x_8, x_9, x_10); -lean_dec(x_3); -if (lean_obj_tag(x_13) == 0) +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_unsigned_to_nat(0u); +x_13 = lean_unsigned_to_nat(1u); +lean_inc(x_4); +x_14 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5(x_1, x_2, x_3, x_4, x_12, x_4, x_13, x_5, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_4); +if (lean_obj_tag(x_14) == 0) { -uint8_t x_14; -x_14 = !lean_is_exclusive(x_13); -if (x_14 == 0) +uint8_t x_15; +x_15 = !lean_is_exclusive(x_14); +if (x_15 == 0) { -return x_13; +return x_14; } else { -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_ctor_get(x_13, 0); -x_16 = lean_ctor_get(x_13, 1); +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_14, 0); +x_17 = lean_ctor_get(x_14, 1); +lean_inc(x_17); lean_inc(x_16); -lean_inc(x_15); -lean_dec(x_13); -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_16); -return x_17; +lean_dec(x_14); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; } } else { -uint8_t x_18; -x_18 = !lean_is_exclusive(x_13); -if (x_18 == 0) +uint8_t x_19; +x_19 = !lean_is_exclusive(x_14); +if (x_19 == 0) { -return x_13; +return x_14; } else { -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_13, 0); -x_20 = lean_ctor_get(x_13, 1); +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_14, 0); +x_21 = lean_ctor_get(x_14, 1); +lean_inc(x_21); lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_13); -x_21 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; +lean_dec(x_14); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; } } } @@ -6873,104 +6962,107 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain(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_EXPORT lean_object* l_Lean_Elab_WF_packDomain(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_7; size_t x_8; size_t x_9; lean_object* x_10; lean_object* x_11; -x_7 = lean_array_get_size(x_1); -x_8 = lean_usize_of_nat(x_7); -x_9 = 0; -x_10 = l_Lean_Elab_WF_packDomain___closed__2; +lean_object* x_8; size_t x_9; size_t x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_array_get_size(x_2); +x_9 = lean_usize_of_nat(x_8); +x_10 = 0; +x_11 = l_Lean_Elab_WF_packDomain___closed__2; +lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); -lean_inc(x_2); -x_11 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3(x_1, x_8, x_9, x_10, x_2, x_3, x_4, x_5, x_6); -if (lean_obj_tag(x_11) == 0) +lean_inc(x_1); +x_12 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3(x_1, x_2, x_9, x_10, x_11, x_3, x_4, x_5, x_6, x_7); +if (lean_obj_tag(x_12) == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_12, 1); +lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_13, 1); lean_inc(x_14); -x_15 = lean_unbox(x_14); -lean_dec(x_14); -if (x_15 == 0) +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +x_16 = lean_unbox(x_15); +lean_dec(x_15); +if (x_16 == 0) { -uint8_t x_16; +uint8_t x_17; +lean_dec(x_14); lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_7); +lean_dec(x_8); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -lean_dec(x_2); -x_16 = !lean_is_exclusive(x_11); -if (x_16 == 0) +lean_dec(x_1); +x_17 = !lean_is_exclusive(x_12); +if (x_17 == 0) { -lean_object* x_17; -x_17 = lean_ctor_get(x_11, 0); -lean_dec(x_17); -lean_ctor_set(x_11, 0, x_1); -return x_11; +lean_object* x_18; +x_18 = lean_ctor_get(x_12, 0); +lean_dec(x_18); +lean_ctor_set(x_12, 0, x_2); +return x_12; } else { -lean_object* x_18; lean_object* x_19; -x_18 = lean_ctor_get(x_11, 1); -lean_inc(x_18); -lean_dec(x_11); -x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_1); -lean_ctor_set(x_19, 1, x_18); -return x_19; +lean_object* x_19; lean_object* x_20; +x_19 = lean_ctor_get(x_12, 1); +lean_inc(x_19); +lean_dec(x_12); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_2); +lean_ctor_set(x_20, 1, x_19); +return x_20; } } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_20 = lean_ctor_get(x_11, 1); -lean_inc(x_20); -lean_dec(x_11); -x_21 = lean_ctor_get(x_12, 0); +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_21 = lean_ctor_get(x_12, 1); lean_inc(x_21); lean_dec(x_12); x_22 = lean_ctor_get(x_13, 0); lean_inc(x_22); lean_dec(x_13); -x_23 = lean_box(0); -x_24 = l_Lean_Elab_WF_packDomain___lambda__1(x_1, x_21, x_7, x_22, x_23, x_2, x_3, x_4, x_5, x_20); -return x_24; +x_23 = lean_ctor_get(x_14, 0); +lean_inc(x_23); +lean_dec(x_14); +x_24 = lean_box(0); +x_25 = l_Lean_Elab_WF_packDomain___lambda__1(x_1, x_2, x_22, x_8, x_23, x_24, x_3, x_4, x_5, x_6, x_21); +return x_25; } } else { -uint8_t x_25; -lean_dec(x_7); +uint8_t x_26; +lean_dec(x_8); +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_25 = !lean_is_exclusive(x_11); -if (x_25 == 0) +x_26 = !lean_is_exclusive(x_12); +if (x_26 == 0) { -return x_11; +return x_12; } else { -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_11, 0); -x_27 = lean_ctor_get(x_11, 1); +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_12, 0); +x_28 = lean_ctor_get(x_12, 1); +lean_inc(x_28); lean_inc(x_27); -lean_inc(x_26); -lean_dec(x_11); -x_28 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_28, 0, x_26); -lean_ctor_set(x_28, 1, x_27); -return x_28; +lean_dec(x_12); +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; } } } @@ -6988,39 +7080,39 @@ lean_dec(x_1); return x_12; } } -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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) { _start: { -lean_object* x_12; -x_12 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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); -lean_dec(x_10); -lean_dec(x_8); +lean_object* x_13; +x_13 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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); +lean_dec(x_11); +lean_dec(x_9); lean_dec(x_4); -lean_dec(x_3); lean_dec(x_2); -return x_12; +lean_dec(x_1); +return x_13; } } -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__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, lean_object* x_9) { +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__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, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_10; -x_10 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2(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* x_11; +x_11 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2(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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -size_t x_10; size_t x_11; lean_object* x_12; -x_10 = lean_unbox_usize(x_2); -lean_dec(x_2); +size_t x_11; size_t x_12; lean_object* x_13; x_11 = lean_unbox_usize(x_3); lean_dec(x_3); -x_12 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3(x_1, x_10, x_11, x_4, x_5, x_6, x_7, x_8, x_9); -lean_dec(x_1); -return x_12; +x_12 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_13 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3(x_1, x_2, x_11, x_12, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_2); +return x_13; } } LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at_Lean_Elab_WF_packDomain___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) { @@ -7035,25 +7127,26 @@ lean_dec(x_1); return x_8; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___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_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { -lean_object* x_13; -x_13 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___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); -lean_dec(x_6); -return x_13; +lean_object* x_15; +x_15 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___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); +lean_dec(x_8); +return x_15; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -uint8_t x_4; lean_object* x_5; -x_4 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3(x_1, x_2, x_3); +uint8_t x_5; lean_object* x_6; +x_5 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__3(x_1, x_2, x_3, x_4); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_5 = lean_box(x_4); -return x_5; +x_6 = lean_box(x_5); +return x_6; } } LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___spec__5___lambda__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) { @@ -7070,23 +7163,23 @@ lean_dec(x_3); return x_11; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___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) { _start: { -lean_object* x_13; -x_13 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___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); +lean_object* x_14; +x_14 = l_Std_Range_forIn_loop___at_Lean_Elab_WF_packDomain___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); +lean_dec(x_7); lean_dec(x_6); -lean_dec(x_5); -return x_13; +return x_14; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packDomain___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_EXPORT lean_object* l_Lean_Elab_WF_packDomain___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) { _start: { -lean_object* x_11; -x_11 = l_Lean_Elab_WF_packDomain___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_12; +x_12 = l_Lean_Elab_WF_packDomain___lambda__1(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); +return x_12; } } lean_object* initialize_Init(uint8_t builtin, lean_object*); @@ -7166,8 +7259,6 @@ l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___cl lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__1); l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__2(); lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__2); -l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__3 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__3(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__2___closed__3); l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3___closed__1); l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Elab_WF_packDomain___spec__3___lambda__3___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/WF/PackMutual.c b/stage0/stdlib/Lean/Elab/PreDefinition/WF/PackMutual.c index 86d58d2500..99a6c5591c 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/WF/PackMutual.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/WF/PackMutual.c @@ -17,8 +17,9 @@ static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinitio LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_WF_packMutual___lambda__2___closed__3; lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix_go___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_add(size_t, size_t); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post(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_mvarId_x21(lean_object*); lean_object* l_Lean_stringToMessageData(lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__9; @@ -27,18 +28,22 @@ lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* l_Lean_mkSort(lean_object*); lean_object* l_Lean_Meta_mkForallFVars(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__4; +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix(lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__8; lean_object* l_Lean_Expr_bindingDomain_x21(lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix___spec__1(size_t, size_t, lean_object*); LEAN_EXPORT uint8_t l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__2(lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain___spec__1___closed__3; lean_object* l_Lean_Meta_mkAppM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_packMutual___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__2; uint8_t lean_name_eq(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix_go(lean_object*); lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_forallTelescopeCompatibleAux___spec__15___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues_go___closed__3; lean_object* lean_expr_instantiate1(lean_object*, lean_object*); @@ -47,7 +52,7 @@ 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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues_go___closed__2; static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__1; uint8_t lean_usize_dec_lt(size_t, size_t); @@ -56,6 +61,7 @@ extern lean_object* l_Lean_levelZero; lean_object* lean_nat_add(lean_object*, lean_object*); static lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues_go___spec__1___closed__1; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain___spec__1___closed__1; lean_object* l_Lean_mkAppN(lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__6; @@ -67,13 +73,17 @@ static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinitio lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_WF_withFixedPrefix___rarg___closed__1; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues___spec__1___closed__1; +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel___lambda__1___boxed(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_Expr_constLevels_x21(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues_go___closed__1; +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_packMutual___spec__1(size_t, size_t, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__3; lean_object* l_Lean_Expr_headBeta(lean_object*); @@ -85,22 +95,30 @@ static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_El static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__1; LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix___spec__1___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_WF_packMutual___lambda__2___closed__2; +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix_go___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_WF_packMutual___lambda__2___closed__1; lean_object* l_Array_back___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_instInhabitedPreDefinition; static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__5; +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___spec__2(lean_object*, size_t, size_t, lean_object*); uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedExpr; lean_object* l_panic___at___private_Init_Prelude_0__Lean_assembleParts___spec__1(lean_object*); lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_reverse___rarg(lean_object*); +uint8_t l_Lean_Expr_isConst(lean_object*); static lean_object* l_Subarray_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainsLevel___spec__1___closed__1; static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__7; LEAN_EXPORT lean_object* l_Subarray_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainsLevel___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__7; +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkFVar(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); uint8_t l_Lean_Expr_isLambda(lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__3; @@ -111,6 +129,7 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefi lean_object* l_Lean_Meta_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Cases_cases(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix_go___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_Expr_getAppNumArgsAux(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Subarray_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainsLevel___spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -123,12 +142,15 @@ lean_object* l_Lean_Name_append(lean_object*, lean_object*); static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues___spec__1___closed__2; LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isLevelDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__10; LEAN_EXPORT lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues_go___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_ofSubarray___rarg(lean_object*); lean_object* l_Lean_Meta_getLevel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainsLevel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__6; extern lean_object* l_Lean_instInhabitedName; @@ -138,16 +160,15 @@ lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_reduceMatcher_x3f lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_pop(lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Expr_binderInfo(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___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_whnfD(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getDomains___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn(lean_object*); lean_object* l_Array_findIdx_x3f_loop___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Subarray_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainsLevel___spec__1___closed__2; -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getDomains___spec__1(size_t, size_t, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__11; lean_object* l_Lean_mkAppB(lean_object*, lean_object*, lean_object*); lean_object* l_panic___at_Lean_Meta_whnfCore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -155,71 +176,18 @@ lean_object* l_Lean_Expr_bindingBody_x21(lean_object*); static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues___spec__1___closed__3; LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkConst(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getDomains(lean_object*); +lean_object* l_Lean_Expr_constName_x21(lean_object*); extern lean_object* l_Lean_casesOnSuffix; lean_object* l_Lean_Meta_instInhabitedMetaM___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkApp3(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel___closed__1; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel___closed__2; -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getDomains___spec__1(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = lean_usize_dec_lt(x_2, x_1); -if (x_4 == 0) -{ -return x_3; -} -else -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; size_t x_10; size_t x_11; lean_object* x_12; -x_5 = lean_array_uget(x_3, x_2); -x_6 = lean_unsigned_to_nat(0u); -x_7 = lean_array_uset(x_3, x_2, x_6); -x_8 = lean_ctor_get(x_5, 4); -lean_inc(x_8); -lean_dec(x_5); -x_9 = l_Lean_Expr_bindingDomain_x21(x_8); -lean_dec(x_8); -x_10 = 1; -x_11 = lean_usize_add(x_2, x_10); -x_12 = lean_array_uset(x_7, x_2, x_9); -x_2 = x_11; -x_3 = x_12; -goto _start; -} -} -} -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getDomains(lean_object* x_1) { -_start: -{ -lean_object* x_2; size_t x_3; size_t x_4; lean_object* x_5; -x_2 = lean_array_get_size(x_1); -x_3 = lean_usize_of_nat(x_2); -lean_dec(x_2); -x_4 = 0; -x_5 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getDomains___spec__1(x_3, x_4, x_1); -return x_5; -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getDomains___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getDomains___spec__1(x_4, x_5, x_3); -return x_6; -} -} static lean_object* _init_l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain___spec__1___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string("Sum"); +x_1 = lean_mk_string("PSum"); return x_1; } } @@ -418,14 +386,11 @@ return x_1; LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel(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; lean_object* x_9; lean_object* x_10; -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel___closed__1; -x_9 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel___closed__2; -x_10 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_reduceMatcher_x3f___spec__3___rarg(x_7, x_8, x_9, x_2, x_3, x_4, x_5, x_6); -return x_10; +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel___closed__1; +x_8 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel___closed__2; +x_9 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_reduceMatcher_x3f___spec__3___rarg(x_1, x_7, x_8, x_2, x_3, x_4, x_5, x_6); +return x_9; } } LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getCodomainLevel___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) { @@ -613,7 +578,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Le _start: { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_7 = l_Lean_Elab_instInhabitedPreDefinition; +x_7 = l_Lean_instInhabitedExpr; x_8 = lean_unsigned_to_nat(0u); x_9 = lean_array_get(x_7, x_1, x_8); lean_inc(x_5); @@ -737,23 +702,20 @@ return x_13; LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___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_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; uint8_t x_17; lean_object* x_18; +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; uint8_t x_16; lean_object* x_17; lean_inc(x_4); x_10 = lean_array_push(x_1, x_4); -x_11 = l_Lean_Elab_instInhabitedPreDefinition; +x_11 = l_Lean_instInhabitedExpr; x_12 = lean_array_get(x_11, x_2, x_3); -x_13 = lean_ctor_get(x_12, 4); -lean_inc(x_13); +x_13 = l_Lean_Expr_bindingBody_x21(x_12); lean_dec(x_12); -x_14 = l_Lean_Expr_bindingBody_x21(x_13); -lean_dec(x_13); -x_15 = lean_expr_instantiate1(x_14, x_4); +x_14 = lean_expr_instantiate1(x_13, x_4); lean_dec(x_4); -lean_dec(x_14); -x_16 = 0; -x_17 = 1; -x_18 = l_Lean_Meta_mkLambdaFVars(x_10, x_15, x_16, x_17, x_5, x_6, x_7, x_8, x_9); -return x_18; +lean_dec(x_13); +x_15 = 0; +x_16 = 1; +x_17 = l_Lean_Meta_mkLambdaFVars(x_10, x_14, x_15, x_16, x_5, x_6, x_7, x_8, x_9); +return x_17; } } LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___lambda__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, lean_object* x_9, lean_object* x_10) { @@ -827,7 +789,7 @@ static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__L _start: { lean_object* x_1; -x_1 = lean_mk_string("xType.isAppOfArity ``Sum 2\n "); +x_1 = lean_mk_string("xType.isAppOfArity ``PSum 2\n "); return x_1; } } @@ -863,7 +825,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___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__4; x_2 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__5; -x_3 = lean_unsigned_to_nat(44u); +x_3 = lean_unsigned_to_nat(41u); x_4 = lean_unsigned_to_nat(6u); x_5 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -928,337 +890,334 @@ x_13 = lean_nat_dec_lt(x_4, x_12); lean_dec(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_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_2); -x_14 = l_Lean_Elab_instInhabitedPreDefinition; +x_14 = l_Lean_instInhabitedExpr; x_15 = lean_array_get(x_14, x_1, x_4); lean_dec(x_4); lean_dec(x_1); -x_16 = lean_ctor_get(x_15, 4); -lean_inc(x_16); +x_16 = l_Lean_Expr_bindingBody_x21(x_15); lean_dec(x_15); -x_17 = l_Lean_Expr_bindingBody_x21(x_16); -lean_dec(x_16); -x_18 = lean_expr_instantiate1(x_17, x_3); +x_17 = lean_expr_instantiate1(x_16, x_3); lean_dec(x_3); -lean_dec(x_17); -x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_18); -lean_ctor_set(x_19, 1, x_9); +lean_dec(x_16); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_9); +return x_18; +} +else +{ +lean_object* x_19; +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_3); +x_19 = lean_infer_type(x_3, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_22 = l_Lean_Meta_whnfD(x_20, x_5, x_6, x_7, x_8, x_21); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; +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 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain___spec__1___closed__2; +x_26 = lean_unsigned_to_nat(2u); +x_27 = l_Lean_Expr_isAppOfArity(x_23, x_25, x_26); +if (x_27 == 0) +{ +lean_object* x_28; lean_object* x_29; +lean_dec(x_23); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_28 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__6; +x_29 = l_panic___at_Lean_Meta_whnfCore___spec__1(x_28, x_5, x_6, x_7, x_8, x_24); +return x_29; +} +else +{ +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; uint8_t x_46; uint8_t x_47; lean_object* x_48; +x_30 = lean_unsigned_to_nat(0u); +x_31 = l_Lean_Expr_getAppNumArgsAux(x_23, x_30); +x_32 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__7; +lean_inc(x_31); +x_33 = lean_mk_array(x_31, x_32); +x_34 = lean_nat_sub(x_31, x_11); +lean_dec(x_31); +lean_inc(x_23); +x_35 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_23, x_33, x_34); +lean_inc(x_2); +x_36 = l_Lean_mkLevelSucc(x_2); +x_37 = l_Lean_Expr_getAppFn(x_23); +lean_dec(x_23); +x_38 = l_Lean_Expr_constLevels_x21(x_37); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_36); +lean_ctor_set(x_39, 1, x_38); +x_40 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__8; +x_41 = l_Lean_mkConst(x_40, x_39); +lean_inc(x_35); +x_42 = l_Lean_mkAppN(x_41, x_35); +x_43 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__9; +lean_inc(x_3); +x_44 = lean_array_push(x_43, x_3); +lean_inc(x_2); +x_45 = l_Lean_mkSort(x_2); +x_46 = 0; +x_47 = 1; +lean_inc(x_5); +x_48 = l_Lean_Meta_mkLambdaFVars(x_44, x_45, x_46, x_47, x_5, x_6, x_7, x_8, x_24); +if (lean_obj_tag(x_48) == 0) +{ +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; uint8_t x_60; lean_object* x_61; +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 = l_Lean_mkApp(x_42, x_49); +x_52 = l_Lean_mkApp(x_51, x_3); +x_53 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__11; +x_54 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_53, x_7, x_8, x_50); +x_55 = lean_ctor_get(x_54, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_54, 1); +lean_inc(x_56); +lean_dec(x_54); +x_57 = l_Lean_instInhabitedExpr; +x_58 = lean_array_get(x_57, x_35, x_30); +lean_inc(x_4); +lean_inc(x_1); +x_59 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___lambda__1___boxed), 9, 3); +lean_closure_set(x_59, 0, x_43); +lean_closure_set(x_59, 1, x_1); +lean_closure_set(x_59, 2, x_4); +x_60 = 0; +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_61 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_forallTelescopeCompatibleAux___spec__15___rarg(x_55, x_60, x_58, x_59, x_5, x_6, x_7, x_8, x_56); +if (lean_obj_tag(x_61) == 0) +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_62 = lean_ctor_get(x_61, 0); +lean_inc(x_62); +x_63 = lean_ctor_get(x_61, 1); +lean_inc(x_63); +lean_dec(x_61); +x_64 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_53, x_7, x_8, x_63); +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_array_get(x_57, x_35, x_11); +lean_dec(x_35); +x_68 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___lambda__2___boxed), 10, 4); +lean_closure_set(x_68, 0, x_4); +lean_closure_set(x_68, 1, x_1); +lean_closure_set(x_68, 2, x_2); +lean_closure_set(x_68, 3, x_43); +x_69 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_forallTelescopeCompatibleAux___spec__15___rarg(x_65, x_60, x_67, x_68, x_5, x_6, x_7, x_8, x_66); +if (lean_obj_tag(x_69) == 0) +{ +uint8_t x_70; +x_70 = !lean_is_exclusive(x_69); +if (x_70 == 0) +{ +lean_object* x_71; lean_object* x_72; +x_71 = lean_ctor_get(x_69, 0); +x_72 = l_Lean_mkAppB(x_52, x_62, x_71); +lean_ctor_set(x_69, 0, x_72); +return x_69; +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_73 = lean_ctor_get(x_69, 0); +x_74 = lean_ctor_get(x_69, 1); +lean_inc(x_74); +lean_inc(x_73); +lean_dec(x_69); +x_75 = l_Lean_mkAppB(x_52, x_62, 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_74); +return x_76; +} +} +else +{ +uint8_t x_77; +lean_dec(x_62); +lean_dec(x_52); +x_77 = !lean_is_exclusive(x_69); +if (x_77 == 0) +{ +return x_69; +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = lean_ctor_get(x_69, 0); +x_79 = lean_ctor_get(x_69, 1); +lean_inc(x_79); +lean_inc(x_78); +lean_dec(x_69); +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; +} +} +} +else +{ +uint8_t x_81; +lean_dec(x_52); +lean_dec(x_35); +lean_dec(x_8); +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_81 = !lean_is_exclusive(x_61); +if (x_81 == 0) +{ +return x_61; +} +else +{ +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_61, 0); +x_83 = lean_ctor_get(x_61, 1); +lean_inc(x_83); +lean_inc(x_82); +lean_dec(x_61); +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +return x_84; +} +} +} +else +{ +uint8_t x_85; +lean_dec(x_42); +lean_dec(x_35); +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_85 = !lean_is_exclusive(x_48); +if (x_85 == 0) +{ +return x_48; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_48, 0); +x_87 = lean_ctor_get(x_48, 1); +lean_inc(x_87); +lean_inc(x_86); +lean_dec(x_48); +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_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_22); +if (x_89 == 0) +{ +return x_22; +} +else +{ +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_22, 0); +x_91 = lean_ctor_get(x_22, 1); +lean_inc(x_91); +lean_inc(x_90); +lean_dec(x_22); +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_19); +if (x_93 == 0) +{ return x_19; } else { -lean_object* x_20; -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_3); -x_20 = lean_infer_type(x_3, x_5, x_6, x_7, x_8, x_9); -if (lean_obj_tag(x_20) == 0) -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; -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); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -x_23 = l_Lean_Meta_whnfD(x_21, x_5, x_6, x_7, x_8, x_22); -if (lean_obj_tag(x_23) == 0) -{ -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; -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_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain___spec__1___closed__2; -x_27 = lean_unsigned_to_nat(2u); -x_28 = l_Lean_Expr_isAppOfArity(x_24, x_26, x_27); -if (x_28 == 0) -{ -lean_object* x_29; lean_object* x_30; -lean_dec(x_24); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_29 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__6; -x_30 = l_panic___at_Lean_Meta_whnfCore___spec__1(x_29, x_5, x_6, x_7, x_8, x_25); -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; 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; uint8_t x_48; lean_object* x_49; -x_31 = lean_unsigned_to_nat(0u); -x_32 = l_Lean_Expr_getAppNumArgsAux(x_24, x_31); -x_33 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__7; -lean_inc(x_32); -x_34 = lean_mk_array(x_32, x_33); -x_35 = lean_nat_sub(x_32, x_11); -lean_dec(x_32); -lean_inc(x_24); -x_36 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_24, x_34, x_35); -lean_inc(x_2); -x_37 = l_Lean_mkLevelSucc(x_2); -x_38 = l_Lean_Expr_getAppFn(x_24); -lean_dec(x_24); -x_39 = l_Lean_Expr_constLevels_x21(x_38); -x_40 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_40, 0, x_37); -lean_ctor_set(x_40, 1, x_39); -x_41 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__8; -x_42 = l_Lean_mkConst(x_41, x_40); -lean_inc(x_36); -x_43 = l_Lean_mkAppN(x_42, x_36); -x_44 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__9; -lean_inc(x_3); -x_45 = lean_array_push(x_44, x_3); -lean_inc(x_2); -x_46 = l_Lean_mkSort(x_2); -x_47 = 0; -x_48 = 1; -lean_inc(x_5); -x_49 = l_Lean_Meta_mkLambdaFVars(x_45, x_46, x_47, x_48, x_5, x_6, x_7, x_8, x_25); -if (lean_obj_tag(x_49) == 0) -{ -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_61; lean_object* x_62; -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_mkApp(x_43, x_50); -x_53 = l_Lean_mkApp(x_52, x_3); -x_54 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__11; -x_55 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_54, x_7, x_8, x_51); -x_56 = lean_ctor_get(x_55, 0); -lean_inc(x_56); -x_57 = lean_ctor_get(x_55, 1); -lean_inc(x_57); -lean_dec(x_55); -x_58 = l_Lean_instInhabitedExpr; -x_59 = lean_array_get(x_58, x_36, x_31); -lean_inc(x_4); -lean_inc(x_1); -x_60 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___lambda__1___boxed), 9, 3); -lean_closure_set(x_60, 0, x_44); -lean_closure_set(x_60, 1, x_1); -lean_closure_set(x_60, 2, x_4); -x_61 = 0; -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -x_62 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_forallTelescopeCompatibleAux___spec__15___rarg(x_56, x_61, x_59, x_60, x_5, x_6, x_7, x_8, x_57); -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; lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_63 = lean_ctor_get(x_62, 0); -lean_inc(x_63); -x_64 = lean_ctor_get(x_62, 1); -lean_inc(x_64); -lean_dec(x_62); -x_65 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_54, x_7, x_8, x_64); -x_66 = lean_ctor_get(x_65, 0); -lean_inc(x_66); -x_67 = lean_ctor_get(x_65, 1); -lean_inc(x_67); -lean_dec(x_65); -x_68 = lean_array_get(x_58, x_36, x_11); -lean_dec(x_36); -x_69 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___lambda__2___boxed), 10, 4); -lean_closure_set(x_69, 0, x_4); -lean_closure_set(x_69, 1, x_1); -lean_closure_set(x_69, 2, x_2); -lean_closure_set(x_69, 3, x_44); -x_70 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_forallTelescopeCompatibleAux___spec__15___rarg(x_66, x_61, x_68, x_69, x_5, x_6, x_7, x_8, x_67); -if (lean_obj_tag(x_70) == 0) -{ -uint8_t x_71; -x_71 = !lean_is_exclusive(x_70); -if (x_71 == 0) -{ -lean_object* x_72; lean_object* x_73; -x_72 = lean_ctor_get(x_70, 0); -x_73 = l_Lean_mkAppB(x_53, x_63, x_72); -lean_ctor_set(x_70, 0, x_73); -return x_70; -} -else -{ -lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_74 = lean_ctor_get(x_70, 0); -x_75 = lean_ctor_get(x_70, 1); -lean_inc(x_75); -lean_inc(x_74); -lean_dec(x_70); -x_76 = l_Lean_mkAppB(x_53, x_63, x_74); -x_77 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_77, 0, x_76); -lean_ctor_set(x_77, 1, x_75); -return x_77; -} -} -else -{ -uint8_t x_78; -lean_dec(x_63); -lean_dec(x_53); -x_78 = !lean_is_exclusive(x_70); -if (x_78 == 0) -{ -return x_70; -} -else -{ -lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_79 = lean_ctor_get(x_70, 0); -x_80 = lean_ctor_get(x_70, 1); -lean_inc(x_80); -lean_inc(x_79); -lean_dec(x_70); -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; -} -} -} -else -{ -uint8_t x_82; -lean_dec(x_53); -lean_dec(x_36); -lean_dec(x_8); -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_82 = !lean_is_exclusive(x_62); -if (x_82 == 0) -{ -return x_62; -} -else -{ -lean_object* x_83; lean_object* x_84; lean_object* x_85; -x_83 = lean_ctor_get(x_62, 0); -x_84 = lean_ctor_get(x_62, 1); -lean_inc(x_84); -lean_inc(x_83); -lean_dec(x_62); -x_85 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_85, 0, x_83); -lean_ctor_set(x_85, 1, x_84); -return x_85; -} -} -} -else -{ -uint8_t x_86; -lean_dec(x_43); -lean_dec(x_36); -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_86 = !lean_is_exclusive(x_49); -if (x_86 == 0) -{ -return x_49; -} -else -{ -lean_object* x_87; lean_object* x_88; lean_object* x_89; -x_87 = lean_ctor_get(x_49, 0); -x_88 = lean_ctor_get(x_49, 1); -lean_inc(x_88); -lean_inc(x_87); -lean_dec(x_49); -x_89 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_89, 0, x_87); -lean_ctor_set(x_89, 1, x_88); -return x_89; -} -} -} -} -else -{ -uint8_t x_90; -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_90 = !lean_is_exclusive(x_23); -if (x_90 == 0) -{ -return x_23; -} -else -{ -lean_object* x_91; lean_object* x_92; lean_object* x_93; -x_91 = lean_ctor_get(x_23, 0); -x_92 = lean_ctor_get(x_23, 1); -lean_inc(x_92); -lean_inc(x_91); -lean_dec(x_23); -x_93 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_93, 0, x_91); -lean_ctor_set(x_93, 1, x_92); -return x_93; -} -} -} -else -{ -uint8_t x_94; -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_94 = !lean_is_exclusive(x_20); -if (x_94 == 0) -{ -return x_20; -} -else -{ -lean_object* x_95; lean_object* x_96; lean_object* x_97; -x_95 = lean_ctor_get(x_20, 0); -x_96 = lean_ctor_get(x_20, 1); -lean_inc(x_96); +lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_94 = lean_ctor_get(x_19, 0); +x_95 = lean_ctor_get(x_19, 1); lean_inc(x_95); -lean_dec(x_20); -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; +lean_inc(x_94); +lean_dec(x_19); +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; } } } @@ -1379,7 +1338,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___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__4; x_2 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues_go___closed__1; -x_3 = lean_unsigned_to_nat(81u); +x_3 = lean_unsigned_to_nat(78u); x_4 = lean_unsigned_to_nat(67u); x_5 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues_go___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -1389,90 +1348,87 @@ return x_6; LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues_go(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_48; lean_object* x_49; lean_object* x_50; uint8_t x_51; -x_48 = lean_array_get_size(x_1); -x_49 = lean_unsigned_to_nat(1u); -x_50 = lean_nat_sub(x_48, x_49); -x_51 = lean_nat_dec_lt(x_5, x_50); -lean_dec(x_50); -if (x_51 == 0) -{ -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_11; lean_object* x_46; lean_object* x_47; lean_object* x_48; uint8_t x_49; +x_46 = lean_array_get_size(x_1); +x_47 = lean_unsigned_to_nat(1u); +x_48 = lean_nat_sub(x_46, x_47); +x_49 = lean_nat_dec_lt(x_5, x_48); lean_dec(x_48); +if (x_49 == 0) +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; +lean_dec(x_46); lean_dec(x_2); -x_52 = l_Lean_Elab_instInhabitedPreDefinition; -x_53 = lean_array_get(x_52, x_1, x_5); +x_50 = l_Lean_instInhabitedExpr; +x_51 = lean_array_get(x_50, x_1, x_5); lean_dec(x_5); lean_dec(x_1); -x_54 = lean_ctor_get(x_53, 5); -lean_inc(x_54); -lean_dec(x_53); -x_55 = l_Lean_mkFVar(x_4); -x_56 = l_Lean_mkApp(x_54, x_55); -x_57 = l_Lean_Expr_headBeta(x_56); -x_58 = l_Lean_Meta_assignExprMVar(x_3, x_57, x_6, x_7, x_8, x_9, x_10); +x_52 = l_Lean_mkFVar(x_4); +x_53 = l_Lean_mkApp(x_51, x_52); +x_54 = l_Lean_Expr_headBeta(x_53); +x_55 = l_Lean_Meta_assignExprMVar(x_3, x_54, 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); -return x_58; +return x_55; } else { -lean_object* x_59; lean_object* x_60; uint8_t x_61; -x_59 = lean_unsigned_to_nat(2u); -x_60 = lean_nat_sub(x_48, x_59); -lean_dec(x_48); -x_61 = lean_nat_dec_eq(x_5, x_60); -lean_dec(x_60); -if (x_61 == 0) +lean_object* x_56; lean_object* x_57; uint8_t x_58; +x_56 = lean_unsigned_to_nat(2u); +x_57 = lean_nat_sub(x_46, x_56); +lean_dec(x_46); +x_58 = lean_nat_dec_eq(x_5, x_57); +lean_dec(x_57); +if (x_58 == 0) { -lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; uint8_t x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; -x_62 = l_Lean_instInhabitedName; -x_63 = lean_array_get(x_62, x_2, x_5); -x_64 = lean_box(0); -x_65 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_65, 0, x_63); -lean_ctor_set(x_65, 1, x_64); -x_66 = 0; -x_67 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_67, 0, x_65); -lean_ctor_set_uint8(x_67, sizeof(void*)*1, x_66); -x_68 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__9; -x_69 = lean_array_push(x_68, x_67); -x_11 = x_69; -goto block_47; +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_59 = l_Lean_instInhabitedName; +x_60 = lean_array_get(x_59, x_2, x_5); +x_61 = lean_box(0); +x_62 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_62, 0, x_60); +lean_ctor_set(x_62, 1, x_61); +x_63 = 0; +x_64 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_64, 0, x_62); +lean_ctor_set_uint8(x_64, sizeof(void*)*1, x_63); +x_65 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__9; +x_66 = lean_array_push(x_65, x_64); +x_11 = x_66; +goto block_45; } else { -lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; uint8_t 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; -x_70 = l_Lean_instInhabitedName; -x_71 = lean_array_get(x_70, x_2, x_5); -x_72 = lean_box(0); -x_73 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_73, 0, x_71); -lean_ctor_set(x_73, 1, x_72); -x_74 = 0; -x_75 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_75, 0, x_73); -lean_ctor_set_uint8(x_75, sizeof(void*)*1, x_74); -x_76 = lean_nat_add(x_5, x_49); -x_77 = lean_array_get(x_70, x_2, x_76); -lean_dec(x_76); -x_78 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_78, 0, x_77); -lean_ctor_set(x_78, 1, x_72); -x_79 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_79, 0, x_78); -lean_ctor_set_uint8(x_79, sizeof(void*)*1, x_74); -x_80 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain___spec__1___closed__3; -x_81 = lean_array_push(x_80, x_75); -x_82 = lean_array_push(x_81, x_79); -x_11 = x_82; -goto block_47; +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; uint8_t x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_67 = l_Lean_instInhabitedName; +x_68 = lean_array_get(x_67, x_2, x_5); +x_69 = lean_box(0); +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 1, x_69); +x_71 = 0; +x_72 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_72, 0, x_70); +lean_ctor_set_uint8(x_72, sizeof(void*)*1, x_71); +x_73 = lean_nat_add(x_5, x_47); +x_74 = lean_array_get(x_67, x_2, x_73); +lean_dec(x_73); +x_75 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_75, 1, x_69); +x_76 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set_uint8(x_76, sizeof(void*)*1, x_71); +x_77 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain___spec__1___closed__3; +x_78 = lean_array_push(x_77, x_72); +x_79 = lean_array_push(x_78, x_76); +x_11 = x_79; +goto block_45; } } -block_47: +block_45: { lean_object* x_12; lean_inc(x_9); @@ -1505,7 +1461,7 @@ return x_19; } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; 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_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; x_20 = lean_unsigned_to_nat(0u); x_21 = lean_array_fget(x_13, x_20); x_22 = lean_unsigned_to_nat(1u); @@ -1516,46 +1472,42 @@ lean_inc(x_24); lean_dec(x_21); x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); -x_26 = l_Lean_Elab_instInhabitedPreDefinition; +x_26 = l_Lean_instInhabitedExpr; x_27 = lean_array_get(x_26, x_1, x_5); -x_28 = lean_ctor_get(x_27, 5); +x_28 = lean_ctor_get(x_24, 1); lean_inc(x_28); -lean_dec(x_27); -x_29 = lean_ctor_get(x_24, 1); -lean_inc(x_29); lean_dec(x_24); -x_30 = l_Lean_instInhabitedExpr; -x_31 = lean_array_get(x_30, x_29, x_20); -lean_dec(x_29); -x_32 = l_Lean_mkApp(x_28, x_31); -x_33 = l_Lean_Expr_headBeta(x_32); -x_34 = l_Lean_Meta_assignExprMVar(x_25, x_33, x_6, x_7, x_8, x_9, x_14); -x_35 = lean_ctor_get(x_34, 1); -lean_inc(x_35); -lean_dec(x_34); -x_36 = lean_ctor_get(x_23, 0); -lean_inc(x_36); +x_29 = lean_array_get(x_26, x_28, x_20); +lean_dec(x_28); +x_30 = l_Lean_mkApp(x_27, x_29); +x_31 = l_Lean_Expr_headBeta(x_30); +x_32 = l_Lean_Meta_assignExprMVar(x_25, x_31, x_6, x_7, x_8, x_9, x_14); +x_33 = lean_ctor_get(x_32, 1); +lean_inc(x_33); +lean_dec(x_32); +x_34 = lean_ctor_get(x_23, 0); +lean_inc(x_34); lean_dec(x_23); -x_37 = lean_ctor_get(x_36, 0); -lean_inc(x_37); -x_38 = lean_ctor_get(x_36, 1); -lean_inc(x_38); +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_34, 1); +lean_inc(x_36); +lean_dec(x_34); +x_37 = lean_array_get(x_26, x_36, x_20); lean_dec(x_36); -x_39 = lean_array_get(x_30, x_38, x_20); -lean_dec(x_38); -x_40 = l_Lean_Expr_fvarId_x21(x_39); -x_41 = lean_nat_add(x_5, x_22); +x_38 = l_Lean_Expr_fvarId_x21(x_37); +x_39 = lean_nat_add(x_5, x_22); lean_dec(x_5); -x_3 = x_37; -x_4 = x_40; -x_5 = x_41; -x_10 = x_35; +x_3 = x_35; +x_4 = x_38; +x_5 = x_39; +x_10 = x_33; goto _start; } } else { -uint8_t x_43; +uint8_t x_41; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -1563,23 +1515,23 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); -x_43 = !lean_is_exclusive(x_12); -if (x_43 == 0) +x_41 = !lean_is_exclusive(x_12); +if (x_41 == 0) { return x_12; } else { -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_12, 0); -x_45 = lean_ctor_get(x_12, 1); -lean_inc(x_45); -lean_inc(x_44); +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_12, 0); +x_43 = lean_ctor_get(x_12, 1); +lean_inc(x_43); +lean_inc(x_42); lean_dec(x_12); -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; +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +return x_44; } } } @@ -1589,7 +1541,7 @@ static lean_object* _init_l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDef _start: { lean_object* x_1; -x_1 = lean_mk_string("preDef.value.isLambda\n "); +x_1 = lean_mk_string("val.isLambda\n "); return x_1; } } @@ -1617,7 +1569,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___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__4; x_2 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues___spec__1___closed__3; -x_3 = lean_unsigned_to_nat(68u); +x_3 = lean_unsigned_to_nat(65u); x_4 = lean_unsigned_to_nat(4u); x_5 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues___spec__1___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -1635,35 +1587,32 @@ return x_3; } else { -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; size_t x_10; size_t x_11; +lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; size_t x_9; size_t x_10; x_5 = lean_array_uget(x_3, x_2); x_6 = lean_unsigned_to_nat(0u); x_7 = lean_array_uset(x_3, x_2, x_6); -x_8 = lean_ctor_get(x_5, 5); -lean_inc(x_8); -lean_dec(x_5); -x_9 = l_Lean_Expr_isLambda(x_8); -x_10 = 1; -x_11 = lean_usize_add(x_2, x_10); -if (x_9 == 0) +x_8 = l_Lean_Expr_isLambda(x_5); +x_9 = 1; +x_10 = lean_usize_add(x_2, x_9); +if (x_8 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_8); -x_12 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues___spec__1___closed__4; -x_13 = l_panic___at___private_Init_Prelude_0__Lean_assembleParts___spec__1(x_12); -x_14 = lean_array_uset(x_7, x_2, x_13); -x_2 = x_11; -x_3 = x_14; +lean_object* x_11; lean_object* x_12; lean_object* x_13; +lean_dec(x_5); +x_11 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues___spec__1___closed__4; +x_12 = l_panic___at___private_Init_Prelude_0__Lean_assembleParts___spec__1(x_11); +x_13 = lean_array_uset(x_7, x_2, x_12); +x_2 = x_10; +x_3 = x_13; goto _start; } else { -lean_object* x_16; lean_object* x_17; -x_16 = l_Lean_Expr_bindingName_x21(x_8); -lean_dec(x_8); -x_17 = lean_array_uset(x_7, x_2, x_16); -x_2 = x_11; -x_3 = x_17; +lean_object* x_15; lean_object* x_16; +x_15 = l_Lean_Expr_bindingName_x21(x_5); +lean_dec(x_5); +x_16 = lean_array_uset(x_7, x_2, x_15); +x_2 = x_10; +x_3 = x_16; goto _start; } } @@ -1752,7 +1701,7 @@ static lean_object* _init_l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDef _start: { lean_object* x_1; -x_1 = lean_mk_string("args.size == 2\n "); +x_1 = lean_mk_string("args.size == 2\n "); return x_1; } } @@ -1780,8 +1729,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___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__4; x_2 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__3; -x_3 = lean_unsigned_to_nat(101u); -x_4 = lean_unsigned_to_nat(12u); +x_3 = lean_unsigned_to_nat(107u); +x_4 = lean_unsigned_to_nat(10u); x_5 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); return x_6; @@ -1856,7 +1805,7 @@ if (x_21 == 0) lean_object* x_22; lean_object* x_23; lean_dec(x_6); lean_dec(x_5); -lean_dec(x_2); +lean_dec(x_3); x_22 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__4; x_23 = l_panic___at_Lean_Meta_whnfCore___spec__1(x_22, x_8, x_9, x_10, x_11, x_12); return x_23; @@ -1864,7 +1813,7 @@ return x_23; else { uint8_t x_24; -x_24 = lean_nat_dec_eq(x_4, x_3); +x_24 = lean_nat_dec_eq(x_4, x_2); if (x_24 == 0) { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; @@ -1956,7 +1905,7 @@ x_56 = lean_array_get(x_54, x_6, x_55); x_57 = lean_unsigned_to_nat(1u); x_58 = lean_array_get(x_54, x_6, x_57); lean_dec(x_6); -x_59 = l_Lean_mkApp3(x_53, x_56, x_58, x_2); +x_59 = l_Lean_mkApp3(x_53, x_56, x_58, x_3); x_60 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_60, 0, x_59); lean_ctor_set(x_60, 1, x_12); @@ -2009,7 +1958,7 @@ lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); -lean_dec(x_2); +lean_dec(x_3); x_24 = !lean_is_exclusive(x_15); if (x_24 == 0) { @@ -2039,7 +1988,7 @@ lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); x_28 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_28, 0, x_2); +lean_ctor_set(x_28, 0, x_3); lean_ctor_set(x_28, 1, x_10); return x_28; } @@ -2051,7 +2000,7 @@ _start: lean_object* x_13; x_13 = l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___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); lean_dec(x_4); -lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); return x_13; } @@ -2062,7 +2011,7 @@ _start: lean_object* x_11; x_11 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_4); -lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); return x_11; } @@ -2088,144 +2037,192 @@ x_4 = lean_name_eq(x_3, x_1); return x_4; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post(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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { -if (lean_obj_tag(x_4) == 5) +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_dec(x_7); +x_13 = l_Lean_Expr_constName_x21(x_1); +x_14 = l_Lean_Expr_constLevels_x21(x_1); +x_15 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__2___boxed), 2, 1); +lean_closure_set(x_15, 0, x_13); +x_16 = lean_array_get_size(x_3); +x_17 = lean_unsigned_to_nat(0u); +x_18 = l_Array_findIdx_x3f_loop___rarg(x_3, x_15, x_16, x_17, lean_box(0)); +if (lean_obj_tag(x_18) == 0) { -lean_object* x_10; -x_10 = lean_ctor_get(x_4, 0); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 4) -{ -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_4, 1); -lean_inc(x_11); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_10, 1); -lean_inc(x_13); +lean_object* x_19; lean_object* x_20; +lean_dec(x_14); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_19 = lean_box(0); +x_20 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__1(x_2, x_19, x_8, x_9, x_10, x_11, x_12); +lean_dec(x_11); lean_dec(x_10); -x_14 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__2___boxed), 2, 1); -lean_closure_set(x_14, 0, x_12); -x_15 = lean_array_get_size(x_1); -x_16 = lean_unsigned_to_nat(0u); -x_17 = l_Array_findIdx_x3f_loop___rarg(x_1, x_14, x_15, x_16, lean_box(0)); -if (lean_obj_tag(x_17) == 0) +lean_dec(x_9); +lean_dec(x_8); +return x_20; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_21 = lean_ctor_get(x_18, 0); +lean_inc(x_21); +lean_dec(x_18); +x_22 = l_Lean_Expr_getAppNumArgsAux(x_2, x_17); +x_23 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__7; +lean_inc(x_22); +x_24 = lean_mk_array(x_22, x_23); +x_25 = lean_unsigned_to_nat(1u); +x_26 = lean_nat_sub(x_22, x_25); +lean_dec(x_22); +x_27 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_2, x_24, x_26); +lean_inc(x_27); +x_28 = l_Array_toSubarray___rarg(x_27, x_17, x_4); +x_29 = l_Lean_instInhabitedExpr; +x_30 = l_Array_back___rarg(x_29, x_27); +lean_dec(x_27); +x_31 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg(x_3, x_21, x_30, x_17, x_5, x_8, x_9, x_10, x_11, x_12); +lean_dec(x_21); +lean_dec(x_3); +if (lean_obj_tag(x_31) == 0) +{ +uint8_t x_32; +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; +x_33 = lean_ctor_get(x_31, 0); +x_34 = l_Lean_mkConst(x_6, x_14); +x_35 = l_Array_ofSubarray___rarg(x_28); +x_36 = l_Lean_mkAppN(x_34, x_35); +x_37 = l_Lean_mkApp(x_36, x_33); +x_38 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_31, 0, x_38); +return x_31; +} +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; +x_39 = lean_ctor_get(x_31, 0); +x_40 = lean_ctor_get(x_31, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_31); +x_41 = l_Lean_mkConst(x_6, x_14); +x_42 = l_Array_ofSubarray___rarg(x_28); +x_43 = l_Lean_mkAppN(x_41, x_42); +x_44 = l_Lean_mkApp(x_43, x_39); +x_45 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_45, 0, x_44); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_46, 1, x_40); +return x_46; +} +} +else +{ +uint8_t x_47; +lean_dec(x_28); +lean_dec(x_14); +lean_dec(x_6); +x_47 = !lean_is_exclusive(x_31); +if (x_47 == 0) +{ +return x_31; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_31, 0); +x_49 = lean_ctor_get(x_31, 1); +lean_inc(x_49); +lean_inc(x_48); +lean_dec(x_31); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_48); +lean_ctor_set(x_50, 1, x_49); +return x_50; +} +} +} +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__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) { +_start: +{ +lean_object* x_12; uint8_t x_13; +lean_dec(x_6); +x_12 = l_Lean_Expr_getAppFn(x_1); +x_13 = l_Lean_Expr_isConst(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +lean_dec(x_12); +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); +x_14 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_14, 0, x_1); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_11); +return x_15; +} +else +{ +lean_object* x_16; lean_object* x_17; +x_16 = lean_box(0); +x_17 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__3(x_12, x_1, x_2, x_3, x_4, x_5, x_16, x_7, x_8, x_9, x_10, x_11); +return x_17; +} +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post(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; uint8_t x_15; +x_11 = lean_unsigned_to_nat(0u); +x_12 = l_Lean_Expr_getAppNumArgsAux(x_5, x_11); +x_13 = lean_unsigned_to_nat(1u); +x_14 = lean_nat_add(x_1, x_13); +x_15 = lean_nat_dec_eq(x_12, x_14); +lean_dec(x_14); +lean_dec(x_12); +if (x_15 == 0) +{ +lean_object* x_16; lean_object* x_17; +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_16 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_16, 0, x_5); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_10); +return x_17; +} +else { lean_object* x_18; lean_object* x_19; -lean_dec(x_13); -lean_dec(x_11); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); x_18 = lean_box(0); -x_19 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__1(x_4, x_18, 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); +x_19 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__4(x_5, x_2, x_1, x_3, x_4, x_18, x_6, x_7, x_8, x_9, x_10); return x_19; } -else -{ -lean_object* x_20; lean_object* x_21; -lean_dec(x_4); -x_20 = lean_ctor_get(x_17, 0); -lean_inc(x_20); -lean_dec(x_17); -x_21 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg(x_1, x_11, x_20, x_16, x_2, x_5, x_6, x_7, x_8, x_9); -lean_dec(x_20); -lean_dec(x_1); -if (lean_obj_tag(x_21) == 0) -{ -uint8_t x_22; -x_22 = !lean_is_exclusive(x_21); -if (x_22 == 0) -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_23 = lean_ctor_get(x_21, 0); -x_24 = l_Lean_mkConst(x_3, x_13); -x_25 = l_Lean_mkApp(x_24, x_23); -x_26 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_26, 0, x_25); -lean_ctor_set(x_21, 0, x_26); -return x_21; -} -else -{ -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_27 = lean_ctor_get(x_21, 0); -x_28 = lean_ctor_get(x_21, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_21); -x_29 = l_Lean_mkConst(x_3, x_13); -x_30 = l_Lean_mkApp(x_29, x_27); -x_31 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_31, 0, x_30); -x_32 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_28); -return x_32; -} -} -else -{ -uint8_t x_33; -lean_dec(x_13); -lean_dec(x_3); -x_33 = !lean_is_exclusive(x_21); -if (x_33 == 0) -{ -return x_21; -} -else -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_34 = lean_ctor_get(x_21, 0); -x_35 = lean_ctor_get(x_21, 1); -lean_inc(x_35); -lean_inc(x_34); -lean_dec(x_21); -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_37; lean_object* x_38; -lean_dec(x_10); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_37 = lean_box(0); -x_38 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__1(x_4, x_37, 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); -return x_38; -} -} -else -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_39 = lean_box(0); -x_40 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___lambda__1(x_4, x_39, 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); -return x_40; -} } } LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post___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) { @@ -2252,6 +2249,358 @@ x_4 = lean_box(x_3); return x_4; } } +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___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) { +_start: +{ +uint8_t x_10; +x_10 = lean_usize_dec_lt(x_3, x_2); +if (x_10 == 0) +{ +lean_object* x_11; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_4); +lean_ctor_set(x_11, 1, x_9); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_12 = lean_array_uget(x_4, x_3); +x_13 = lean_unsigned_to_nat(0u); +x_14 = lean_array_uset(x_4, x_3, x_13); +x_15 = lean_ctor_get(x_12, 4); +lean_inc(x_15); +lean_dec(x_12); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_16 = l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(x_1, x_13, x_15, 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; size_t x_19; size_t x_20; lean_object* x_21; +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 = 1; +x_20 = lean_usize_add(x_3, x_19); +x_21 = lean_array_uset(x_14, x_3, x_17); +x_3 = x_20; +x_4 = x_21; +x_9 = x_18; +goto _start; +} +else +{ +uint8_t x_23; +lean_dec(x_14); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_23 = !lean_is_exclusive(x_16); +if (x_23 == 0) +{ +return x_16; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_16, 0); +x_25 = lean_ctor_get(x_16, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_16); +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___spec__2(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = lean_usize_dec_lt(x_3, x_2); +if (x_5 == 0) +{ +return x_4; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; size_t x_11; size_t x_12; lean_object* x_13; +x_6 = lean_array_uget(x_4, x_3); +x_7 = lean_unsigned_to_nat(0u); +x_8 = lean_array_uset(x_4, x_3, x_7); +x_9 = l_Lean_Expr_bindingBody_x21(x_6); +lean_dec(x_6); +x_10 = lean_expr_instantiate1(x_9, x_1); +lean_dec(x_9); +x_11 = 1; +x_12 = lean_usize_add(x_3, x_11); +x_13 = lean_array_uset(x_8, x_3, x_10); +x_3 = x_12; +x_4 = x_13; +goto _start; +} +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix_go___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* x_11) { +_start: +{ +lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; +lean_inc(x_6); +x_12 = lean_array_push(x_1, x_6); +x_13 = lean_array_get_size(x_2); +x_14 = lean_usize_of_nat(x_13); +lean_dec(x_13); +x_15 = 0; +x_16 = l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___spec__2(x_6, x_14, x_15, x_2); +lean_dec(x_6); +x_17 = l_Lean_Elab_WF_withFixedPrefix_go___rarg(x_3, x_4, x_5, x_12, x_16, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_5); +return x_17; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix_go___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_11; uint8_t x_12; +x_11 = lean_unsigned_to_nat(0u); +x_12 = lean_nat_dec_eq(x_3, 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; uint8_t x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_13 = lean_unsigned_to_nat(1u); +x_14 = lean_nat_sub(x_3, x_13); +x_15 = l_Lean_instInhabitedExpr; +x_16 = lean_array_get(x_15, x_5, x_11); +x_17 = l_Lean_Expr_bindingName_x21(x_16); +x_18 = l_Lean_Expr_binderInfo(x_16); +x_19 = l_Lean_Expr_bindingDomain_x21(x_16); +lean_dec(x_16); +x_20 = lean_alloc_closure((void*)(l_Lean_Elab_WF_withFixedPrefix_go___rarg___lambda__1), 11, 5); +lean_closure_set(x_20, 0, x_4); +lean_closure_set(x_20, 1, x_5); +lean_closure_set(x_20, 2, x_1); +lean_closure_set(x_20, 3, x_2); +lean_closure_set(x_20, 4, x_14); +x_21 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_forallTelescopeCompatibleAux___spec__15___rarg(x_17, x_18, x_19, x_20, x_6, x_7, x_8, x_9, x_10); +return x_21; +} +else +{ +lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; +x_22 = lean_array_get_size(x_1); +x_23 = lean_usize_of_nat(x_22); +lean_dec(x_22); +x_24 = 0; +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_25 = l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___spec__1(x_4, x_23, x_24, x_1, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +x_28 = lean_apply_8(x_2, x_4, x_26, x_5, x_6, x_7, x_8, x_9, x_27); +return x_28; +} +else +{ +uint8_t x_29; +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_2); +x_29 = !lean_is_exclusive(x_25); +if (x_29 == 0) +{ +return x_25; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_25, 0); +x_31 = lean_ctor_get(x_25, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_25); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_30); +lean_ctor_set(x_32, 1, x_31); +return x_32; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix_go(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_WF_withFixedPrefix_go___rarg___boxed), 10, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___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: +{ +size_t x_10; size_t x_11; lean_object* x_12; +x_10 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_11 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_12 = l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___spec__1(x_1, x_10, x_11, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_1); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +size_t x_5; size_t x_6; lean_object* x_7; +x_5 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_6 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_7 = l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix_go___spec__2(x_1, x_5, x_6, x_4); +lean_dec(x_1); +return x_7; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix_go___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) { +_start: +{ +lean_object* x_11; +x_11 = l_Lean_Elab_WF_withFixedPrefix_go___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_3); +return x_11; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix___spec__1(size_t x_1, size_t x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = lean_usize_dec_lt(x_2, x_1); +if (x_4 == 0) +{ +return x_3; +} +else +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; lean_object* x_11; +x_5 = lean_array_uget(x_3, x_2); +x_6 = lean_unsigned_to_nat(0u); +x_7 = lean_array_uset(x_3, x_2, x_6); +x_8 = lean_ctor_get(x_5, 5); +lean_inc(x_8); +lean_dec(x_5); +x_9 = 1; +x_10 = lean_usize_add(x_2, x_9); +x_11 = lean_array_uset(x_7, x_2, x_8); +x_2 = x_10; +x_3 = x_11; +goto _start; +} +} +} +static lean_object* _init_l_Lean_Elab_WF_withFixedPrefix___rarg___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix___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; size_t x_10; size_t x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_9 = lean_array_get_size(x_2); +x_10 = lean_usize_of_nat(x_9); +lean_dec(x_9); +x_11 = 0; +lean_inc(x_2); +x_12 = l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix___spec__1(x_10, x_11, x_2); +x_13 = l_Lean_Elab_WF_withFixedPrefix___rarg___closed__1; +x_14 = l_Lean_Elab_WF_withFixedPrefix_go___rarg(x_2, x_3, x_1, x_13, x_12, x_4, x_5, x_6, x_7, x_8); +return x_14; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_WF_withFixedPrefix___rarg___boxed), 8, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +size_t x_4; size_t x_5; lean_object* x_6; +x_4 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_5 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_6 = l_Array_mapMUnsafe_map___at_Lean_Elab_WF_withFixedPrefix___spec__1(x_4, x_5, x_3); +return x_6; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_withFixedPrefix___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_Elab_WF_withFixedPrefix___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_1); +return x_9; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_packMutual___spec__1(size_t x_1, size_t x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = lean_usize_dec_lt(x_2, x_1); +if (x_4 == 0) +{ +return x_3; +} +else +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; lean_object* x_11; +x_5 = lean_array_uget(x_3, x_2); +x_6 = lean_unsigned_to_nat(0u); +x_7 = lean_array_uset(x_3, x_2, x_6); +x_8 = l_Lean_Expr_bindingDomain_x21(x_5); +lean_dec(x_5); +x_9 = 1; +x_10 = lean_usize_add(x_2, x_9); +x_11 = lean_array_uset(x_7, x_2, x_8); +x_2 = x_10; +x_3 = x_11; +goto _start; +} +} +} LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___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) { _start: { @@ -2290,638 +2639,684 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Elab_WF_packMutual___lambda__1___boxed), return x_1; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__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) { +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { -lean_object* x_9; -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_1); -lean_inc(x_3); -x_9 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain(x_3, x_1, 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; lean_object* x_13; uint8_t x_14; uint8_t x_15; lean_object* x_16; -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_9, 1); +lean_object* x_13; lean_inc(x_11); -lean_dec(x_9); -x_12 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__9; -lean_inc(x_3); -x_13 = lean_array_push(x_12, x_3); -x_14 = 0; -x_15 = 1; -lean_inc(x_4); lean_inc(x_10); -lean_inc(x_13); -x_16 = l_Lean_Meta_mkForallFVars(x_13, x_10, x_14, x_15, x_4, x_5, x_6, x_7, x_11); -if (lean_obj_tag(x_16) == 0) -{ -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); +lean_inc(x_9); +lean_inc(x_8); lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_1); -x_19 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues(x_3, x_10, x_1, x_4, x_5, x_6, x_7, x_18); -if (lean_obj_tag(x_19) == 0) +x_13 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain(x_7, x_1, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_13) == 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; uint8_t x_28; -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_Elab_instInhabitedPreDefinition; -x_23 = lean_unsigned_to_nat(0u); -x_24 = lean_array_get(x_22, x_1, x_23); -x_25 = lean_ctor_get(x_24, 3); -lean_inc(x_25); -x_26 = l_Lean_Elab_WF_packMutual___lambda__2___closed__2; -x_27 = l_Lean_Name_append(x_25, x_26); -lean_dec(x_25); -x_28 = !lean_is_exclusive(x_24); -if (x_28 == 0) -{ -lean_object* x_29; uint8_t 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_29 = lean_ctor_get(x_24, 0); -x_30 = lean_ctor_get_uint8(x_24, sizeof(void*)*6); -x_31 = lean_ctor_get(x_24, 1); -x_32 = lean_ctor_get(x_24, 2); -x_33 = lean_ctor_get(x_24, 5); -lean_dec(x_33); -x_34 = lean_ctor_get(x_24, 4); -lean_dec(x_34); -x_35 = lean_ctor_get(x_24, 3); -lean_dec(x_35); -lean_inc(x_20); -lean_inc(x_17); -lean_inc(x_27); -lean_inc(x_32); -lean_inc(x_31); -lean_inc(x_29); -lean_ctor_set(x_24, 5, x_20); -lean_ctor_set(x_24, 4, x_17); -lean_ctor_set(x_24, 3, x_27); -lean_inc(x_6); -x_36 = l_Lean_Elab_addAsAxiom(x_24, x_4, x_5, x_6, x_7, x_21); -lean_dec(x_24); -if (lean_obj_tag(x_36) == 0) -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_37 = lean_ctor_get(x_36, 1); -lean_inc(x_37); -lean_dec(x_36); -lean_inc(x_27); -x_38 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post), 9, 3); -lean_closure_set(x_38, 0, x_1); -lean_closure_set(x_38, 1, x_2); -lean_closure_set(x_38, 2, x_27); -x_39 = l_Lean_Elab_WF_packMutual___lambda__2___closed__3; -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_40 = l_Lean_Meta_transform___at_Lean_Meta_expandCoe___spec__1(x_20, x_39, x_38, x_4, x_5, x_6, x_7, x_37); -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); -x_43 = l_Lean_Meta_mkLambdaFVars(x_13, x_41, x_14, x_15, x_4, x_5, x_6, x_7, x_42); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -if (lean_obj_tag(x_43) == 0) -{ -uint8_t x_44; -x_44 = !lean_is_exclusive(x_43); -if (x_44 == 0) -{ -lean_object* x_45; lean_object* x_46; -x_45 = lean_ctor_get(x_43, 0); -x_46 = lean_alloc_ctor(0, 6, 1); -lean_ctor_set(x_46, 0, x_29); -lean_ctor_set(x_46, 1, x_31); -lean_ctor_set(x_46, 2, x_32); -lean_ctor_set(x_46, 3, x_27); -lean_ctor_set(x_46, 4, x_17); -lean_ctor_set(x_46, 5, x_45); -lean_ctor_set_uint8(x_46, sizeof(void*)*6, x_30); -lean_ctor_set(x_43, 0, x_46); -return x_43; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_47 = lean_ctor_get(x_43, 0); -x_48 = lean_ctor_get(x_43, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_43); -x_49 = lean_alloc_ctor(0, 6, 1); -lean_ctor_set(x_49, 0, x_29); -lean_ctor_set(x_49, 1, x_31); -lean_ctor_set(x_49, 2, x_32); -lean_ctor_set(x_49, 3, x_27); -lean_ctor_set(x_49, 4, x_17); -lean_ctor_set(x_49, 5, x_47); -lean_ctor_set_uint8(x_49, sizeof(void*)*6, x_30); -x_50 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_50, 0, x_49); -lean_ctor_set(x_50, 1, x_48); -return x_50; -} -} -else -{ -uint8_t x_51; -lean_dec(x_32); -lean_dec(x_31); -lean_dec(x_29); -lean_dec(x_27); -lean_dec(x_17); -x_51 = !lean_is_exclusive(x_43); -if (x_51 == 0) -{ -return x_43; -} -else -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_52 = lean_ctor_get(x_43, 0); -x_53 = lean_ctor_get(x_43, 1); -lean_inc(x_53); -lean_inc(x_52); -lean_dec(x_43); -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_32); -lean_dec(x_31); -lean_dec(x_29); -lean_dec(x_27); -lean_dec(x_17); -lean_dec(x_13); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_55 = !lean_is_exclusive(x_40); -if (x_55 == 0) -{ -return x_40; -} -else -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_56 = lean_ctor_get(x_40, 0); -x_57 = lean_ctor_get(x_40, 1); -lean_inc(x_57); -lean_inc(x_56); -lean_dec(x_40); -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_32); -lean_dec(x_31); -lean_dec(x_29); -lean_dec(x_27); -lean_dec(x_20); -lean_dec(x_17); -lean_dec(x_13); -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_59 = !lean_is_exclusive(x_36); -if (x_59 == 0) -{ -return x_36; -} -else -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_60 = lean_ctor_get(x_36, 0); -x_61 = lean_ctor_get(x_36, 1); -lean_inc(x_61); -lean_inc(x_60); -lean_dec(x_36); -x_62 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_62, 0, x_60); -lean_ctor_set(x_62, 1, x_61); -return x_62; -} -} -} -else -{ -lean_object* x_63; uint8_t x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_63 = lean_ctor_get(x_24, 0); -x_64 = lean_ctor_get_uint8(x_24, sizeof(void*)*6); -x_65 = lean_ctor_get(x_24, 1); -x_66 = lean_ctor_get(x_24, 2); -lean_inc(x_66); -lean_inc(x_65); -lean_inc(x_63); -lean_dec(x_24); -lean_inc(x_20); -lean_inc(x_17); -lean_inc(x_27); -lean_inc(x_66); -lean_inc(x_65); -lean_inc(x_63); -x_67 = lean_alloc_ctor(0, 6, 1); -lean_ctor_set(x_67, 0, x_63); -lean_ctor_set(x_67, 1, x_65); -lean_ctor_set(x_67, 2, x_66); -lean_ctor_set(x_67, 3, x_27); -lean_ctor_set(x_67, 4, x_17); -lean_ctor_set(x_67, 5, x_20); -lean_ctor_set_uint8(x_67, sizeof(void*)*6, x_64); -lean_inc(x_6); -x_68 = l_Lean_Elab_addAsAxiom(x_67, x_4, x_5, x_6, x_7, x_21); -lean_dec(x_67); -if (lean_obj_tag(x_68) == 0) -{ -lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_69 = lean_ctor_get(x_68, 1); -lean_inc(x_69); -lean_dec(x_68); -lean_inc(x_27); -x_70 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post), 9, 3); -lean_closure_set(x_70, 0, x_1); -lean_closure_set(x_70, 1, x_2); -lean_closure_set(x_70, 2, x_27); -x_71 = l_Lean_Elab_WF_packMutual___lambda__2___closed__3; -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -x_72 = l_Lean_Meta_transform___at_Lean_Meta_expandCoe___spec__1(x_20, x_71, x_70, x_4, x_5, x_6, x_7, x_69); -if (lean_obj_tag(x_72) == 0) -{ -lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_73 = lean_ctor_get(x_72, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_72, 1); -lean_inc(x_74); -lean_dec(x_72); -x_75 = l_Lean_Meta_mkLambdaFVars(x_13, x_73, x_14, x_15, x_4, x_5, x_6, x_7, x_74); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -if (lean_obj_tag(x_75) == 0) -{ -lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_76 = lean_ctor_get(x_75, 0); -lean_inc(x_76); -x_77 = lean_ctor_get(x_75, 1); -lean_inc(x_77); -if (lean_is_exclusive(x_75)) { - lean_ctor_release(x_75, 0); - lean_ctor_release(x_75, 1); - x_78 = x_75; -} else { - lean_dec_ref(x_75); - x_78 = lean_box(0); -} -x_79 = lean_alloc_ctor(0, 6, 1); -lean_ctor_set(x_79, 0, x_63); -lean_ctor_set(x_79, 1, x_65); -lean_ctor_set(x_79, 2, x_66); -lean_ctor_set(x_79, 3, x_27); -lean_ctor_set(x_79, 4, x_17); -lean_ctor_set(x_79, 5, x_76); -lean_ctor_set_uint8(x_79, sizeof(void*)*6, x_64); -if (lean_is_scalar(x_78)) { - x_80 = lean_alloc_ctor(0, 2, 0); -} else { - x_80 = x_78; -} -lean_ctor_set(x_80, 0, x_79); -lean_ctor_set(x_80, 1, x_77); -return x_80; -} -else -{ -lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; -lean_dec(x_66); -lean_dec(x_65); -lean_dec(x_63); -lean_dec(x_27); -lean_dec(x_17); -x_81 = lean_ctor_get(x_75, 0); -lean_inc(x_81); -x_82 = lean_ctor_get(x_75, 1); -lean_inc(x_82); -if (lean_is_exclusive(x_75)) { - lean_ctor_release(x_75, 0); - lean_ctor_release(x_75, 1); - x_83 = x_75; -} else { - lean_dec_ref(x_75); - x_83 = lean_box(0); -} -if (lean_is_scalar(x_83)) { - x_84 = lean_alloc_ctor(1, 2, 0); -} else { - x_84 = x_83; -} -lean_ctor_set(x_84, 0, x_81); -lean_ctor_set(x_84, 1, x_82); -return x_84; -} -} -else -{ -lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; -lean_dec(x_66); -lean_dec(x_65); -lean_dec(x_63); -lean_dec(x_27); -lean_dec(x_17); -lean_dec(x_13); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_85 = lean_ctor_get(x_72, 0); -lean_inc(x_85); -x_86 = lean_ctor_get(x_72, 1); -lean_inc(x_86); -if (lean_is_exclusive(x_72)) { - lean_ctor_release(x_72, 0); - lean_ctor_release(x_72, 1); - x_87 = x_72; -} else { - lean_dec_ref(x_72); - x_87 = lean_box(0); -} -if (lean_is_scalar(x_87)) { - x_88 = lean_alloc_ctor(1, 2, 0); -} else { - x_88 = x_87; -} -lean_ctor_set(x_88, 0, x_85); -lean_ctor_set(x_88, 1, x_86); -return x_88; -} -} -else -{ -lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; -lean_dec(x_66); -lean_dec(x_65); -lean_dec(x_63); -lean_dec(x_27); -lean_dec(x_20); -lean_dec(x_17); -lean_dec(x_13); -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_89 = lean_ctor_get(x_68, 0); -lean_inc(x_89); -x_90 = lean_ctor_get(x_68, 1); -lean_inc(x_90); -if (lean_is_exclusive(x_68)) { - lean_ctor_release(x_68, 0); - lean_ctor_release(x_68, 1); - x_91 = x_68; -} else { - lean_dec_ref(x_68); - x_91 = lean_box(0); -} -if (lean_is_scalar(x_91)) { - x_92 = lean_alloc_ctor(1, 2, 0); -} else { - x_92 = x_91; -} -lean_ctor_set(x_92, 0, x_89); -lean_ctor_set(x_92, 1, x_90); -return x_92; -} -} -} -else -{ -uint8_t x_93; -lean_dec(x_17); -lean_dec(x_13); -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_93 = !lean_is_exclusive(x_19); -if (x_93 == 0) -{ -return x_19; -} -else -{ -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_19, 0); -x_95 = lean_ctor_get(x_19, 1); -lean_inc(x_95); -lean_inc(x_94); -lean_dec(x_19); -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; -} -} -} -else -{ -uint8_t x_97; -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); -lean_dec(x_1); -x_97 = !lean_is_exclusive(x_16); -if (x_97 == 0) -{ -return x_16; -} -else -{ -lean_object* x_98; lean_object* x_99; lean_object* x_100; -x_98 = lean_ctor_get(x_16, 0); -x_99 = lean_ctor_get(x_16, 1); -lean_inc(x_99); -lean_inc(x_98); -lean_dec(x_16); -x_100 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_100, 0, x_98); -lean_ctor_set(x_100, 1, x_99); -return x_100; -} -} -} -else -{ -uint8_t x_101; -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_101 = !lean_is_exclusive(x_9); -if (x_101 == 0) -{ -return x_9; -} -else -{ -lean_object* x_102; lean_object* x_103; lean_object* x_104; -x_102 = lean_ctor_get(x_9, 0); -x_103 = lean_ctor_get(x_9, 1); -lean_inc(x_103); -lean_inc(x_102); -lean_dec(x_9); -x_104 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_104, 0, x_102); -lean_ctor_set(x_104, 1, x_103); -return x_104; -} -} -} -} -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___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) { -_start: -{ -lean_object* x_8; lean_object* x_9; -lean_inc(x_1); -x_8 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_getDomains(x_1); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -x_9 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain(x_8, x_3, x_4, x_5, x_6, x_7); -if (lean_obj_tag(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; uint8_t x_17; lean_object* x_18; -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 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__11; -x_13 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_12, x_5, x_6, x_11); +lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; uint8_t x_18; lean_object* x_19; 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_10); -x_16 = lean_alloc_closure((void*)(l_Lean_Elab_WF_packMutual___lambda__2), 8, 2); -lean_closure_set(x_16, 0, x_1); -lean_closure_set(x_16, 1, x_10); +lean_inc(x_7); +x_16 = lean_array_push(x_2, x_7); x_17 = 0; -x_18 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_forallTelescopeCompatibleAux___spec__15___rarg(x_14, x_17, x_10, x_16, x_3, x_4, x_5, x_6, x_15); -return x_18; +x_18 = 1; +lean_inc(x_8); +lean_inc(x_14); +lean_inc(x_16); +x_19 = l_Lean_Meta_mkForallFVars(x_16, x_14, x_17, x_18, x_8, x_9, x_10, x_11, x_15); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_22 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_packValues(x_7, x_14, x_3, x_8, x_9, x_10, x_11, x_21); +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; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +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 = l_Lean_Elab_instInhabitedPreDefinition; +x_26 = lean_unsigned_to_nat(0u); +x_27 = lean_array_get(x_25, x_4, x_26); +x_28 = lean_ctor_get(x_27, 3); +lean_inc(x_28); +x_29 = l_Lean_Elab_WF_packMutual___lambda__2___closed__2; +x_30 = l_Lean_Name_append(x_28, x_29); +lean_dec(x_28); +x_31 = !lean_is_exclusive(x_27); +if (x_31 == 0) +{ +lean_object* x_32; uint8_t 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_27, 0); +x_33 = lean_ctor_get_uint8(x_27, sizeof(void*)*6); +x_34 = lean_ctor_get(x_27, 1); +x_35 = lean_ctor_get(x_27, 2); +x_36 = lean_ctor_get(x_27, 5); +lean_dec(x_36); +x_37 = lean_ctor_get(x_27, 4); +lean_dec(x_37); +x_38 = lean_ctor_get(x_27, 3); +lean_dec(x_38); +lean_inc(x_23); +lean_inc(x_20); +lean_inc(x_30); +lean_inc(x_35); +lean_inc(x_34); +lean_inc(x_32); +lean_ctor_set(x_27, 5, x_23); +lean_ctor_set(x_27, 4, x_20); +lean_ctor_set(x_27, 3, x_30); +lean_inc(x_10); +x_39 = l_Lean_Elab_addAsAxiom(x_27, x_8, x_9, x_10, x_11, x_24); +lean_dec(x_27); +if (lean_obj_tag(x_39) == 0) +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_40 = lean_ctor_get(x_39, 1); +lean_inc(x_40); +lean_dec(x_39); +lean_inc(x_30); +x_41 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post), 10, 4); +lean_closure_set(x_41, 0, x_5); +lean_closure_set(x_41, 1, x_4); +lean_closure_set(x_41, 2, x_6); +lean_closure_set(x_41, 3, x_30); +x_42 = l_Lean_Elab_WF_packMutual___lambda__2___closed__3; +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_43 = l_Lean_Meta_transform___at_Lean_Meta_expandCoe___spec__1(x_23, x_42, x_41, x_8, x_9, x_10, x_11, x_40); +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); +x_46 = l_Lean_Meta_mkLambdaFVars(x_16, x_44, x_17, x_18, x_8, x_9, x_10, x_11, x_45); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +x_49 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_49, 0, x_32); +lean_ctor_set(x_49, 1, x_34); +lean_ctor_set(x_49, 2, x_35); +lean_ctor_set(x_49, 3, x_30); +lean_ctor_set(x_49, 4, x_20); +lean_ctor_set(x_49, 5, x_48); +lean_ctor_set_uint8(x_49, sizeof(void*)*6, x_33); +lean_ctor_set(x_46, 0, x_49); +return x_46; } else { -uint8_t x_19; +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_50 = lean_ctor_get(x_46, 0); +x_51 = lean_ctor_get(x_46, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_46); +x_52 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_52, 0, x_32); +lean_ctor_set(x_52, 1, x_34); +lean_ctor_set(x_52, 2, x_35); +lean_ctor_set(x_52, 3, x_30); +lean_ctor_set(x_52, 4, x_20); +lean_ctor_set(x_52, 5, x_50); +lean_ctor_set_uint8(x_52, sizeof(void*)*6, x_33); +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_35); +lean_dec(x_34); +lean_dec(x_32); +lean_dec(x_30); +lean_dec(x_20); +x_54 = !lean_is_exclusive(x_46); +if (x_54 == 0) +{ +return x_46; +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_46, 0); +x_56 = lean_ctor_get(x_46, 1); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_46); +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_55); +lean_ctor_set(x_57, 1, x_56); +return x_57; +} +} +} +else +{ +uint8_t x_58; +lean_dec(x_35); +lean_dec(x_34); +lean_dec(x_32); +lean_dec(x_30); +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +x_58 = !lean_is_exclusive(x_43); +if (x_58 == 0) +{ +return x_43; +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_59 = lean_ctor_get(x_43, 0); +x_60 = lean_ctor_get(x_43, 1); +lean_inc(x_60); +lean_inc(x_59); +lean_dec(x_43); +x_61 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_61, 0, x_59); +lean_ctor_set(x_61, 1, x_60); +return x_61; +} +} +} +else +{ +uint8_t x_62; +lean_dec(x_35); +lean_dec(x_34); +lean_dec(x_32); +lean_dec(x_30); +lean_dec(x_23); +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_62 = !lean_is_exclusive(x_39); +if (x_62 == 0) +{ +return x_39; +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_63 = lean_ctor_get(x_39, 0); +x_64 = lean_ctor_get(x_39, 1); +lean_inc(x_64); +lean_inc(x_63); +lean_dec(x_39); +x_65 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_65, 0, x_63); +lean_ctor_set(x_65, 1, x_64); +return x_65; +} +} +} +else +{ +lean_object* x_66; uint8_t x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_66 = lean_ctor_get(x_27, 0); +x_67 = lean_ctor_get_uint8(x_27, sizeof(void*)*6); +x_68 = lean_ctor_get(x_27, 1); +x_69 = lean_ctor_get(x_27, 2); +lean_inc(x_69); +lean_inc(x_68); +lean_inc(x_66); +lean_dec(x_27); +lean_inc(x_23); +lean_inc(x_20); +lean_inc(x_30); +lean_inc(x_69); +lean_inc(x_68); +lean_inc(x_66); +x_70 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_70, 0, x_66); +lean_ctor_set(x_70, 1, x_68); +lean_ctor_set(x_70, 2, x_69); +lean_ctor_set(x_70, 3, x_30); +lean_ctor_set(x_70, 4, x_20); +lean_ctor_set(x_70, 5, x_23); +lean_ctor_set_uint8(x_70, sizeof(void*)*6, x_67); +lean_inc(x_10); +x_71 = l_Lean_Elab_addAsAxiom(x_70, x_8, x_9, x_10, x_11, x_24); +lean_dec(x_70); +if (lean_obj_tag(x_71) == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_72 = lean_ctor_get(x_71, 1); +lean_inc(x_72); +lean_dec(x_71); +lean_inc(x_30); +x_73 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post), 10, 4); +lean_closure_set(x_73, 0, x_5); +lean_closure_set(x_73, 1, x_4); +lean_closure_set(x_73, 2, x_6); +lean_closure_set(x_73, 3, x_30); +x_74 = l_Lean_Elab_WF_packMutual___lambda__2___closed__3; +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_75 = l_Lean_Meta_transform___at_Lean_Meta_expandCoe___spec__1(x_23, x_74, x_73, x_8, x_9, x_10, x_11, x_72); +if (lean_obj_tag(x_75) == 0) +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; +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_Meta_mkLambdaFVars(x_16, x_76, x_17, x_18, x_8, x_9, x_10, x_11, x_77); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_79 = lean_ctor_get(x_78, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_78, 1); +lean_inc(x_80); +if (lean_is_exclusive(x_78)) { + lean_ctor_release(x_78, 0); + lean_ctor_release(x_78, 1); + x_81 = x_78; +} else { + lean_dec_ref(x_78); + x_81 = lean_box(0); +} +x_82 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_82, 0, x_66); +lean_ctor_set(x_82, 1, x_68); +lean_ctor_set(x_82, 2, x_69); +lean_ctor_set(x_82, 3, x_30); +lean_ctor_set(x_82, 4, x_20); +lean_ctor_set(x_82, 5, x_79); +lean_ctor_set_uint8(x_82, sizeof(void*)*6, x_67); +if (lean_is_scalar(x_81)) { + x_83 = lean_alloc_ctor(0, 2, 0); +} else { + x_83 = x_81; +} +lean_ctor_set(x_83, 0, x_82); +lean_ctor_set(x_83, 1, x_80); +return x_83; +} +else +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +lean_dec(x_69); +lean_dec(x_68); +lean_dec(x_66); +lean_dec(x_30); +lean_dec(x_20); +x_84 = lean_ctor_get(x_78, 0); +lean_inc(x_84); +x_85 = lean_ctor_get(x_78, 1); +lean_inc(x_85); +if (lean_is_exclusive(x_78)) { + lean_ctor_release(x_78, 0); + lean_ctor_release(x_78, 1); + x_86 = x_78; +} else { + lean_dec_ref(x_78); + x_86 = lean_box(0); +} +if (lean_is_scalar(x_86)) { + x_87 = lean_alloc_ctor(1, 2, 0); +} else { + x_87 = x_86; +} +lean_ctor_set(x_87, 0, x_84); +lean_ctor_set(x_87, 1, x_85); +return x_87; +} +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +lean_dec(x_69); +lean_dec(x_68); +lean_dec(x_66); +lean_dec(x_30); +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +x_88 = lean_ctor_get(x_75, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_75, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_75)) { + lean_ctor_release(x_75, 0); + lean_ctor_release(x_75, 1); + x_90 = x_75; +} else { + lean_dec_ref(x_75); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; +lean_dec(x_69); +lean_dec(x_68); +lean_dec(x_66); +lean_dec(x_30); +lean_dec(x_23); +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_92 = lean_ctor_get(x_71, 0); +lean_inc(x_92); +x_93 = lean_ctor_get(x_71, 1); +lean_inc(x_93); +if (lean_is_exclusive(x_71)) { + lean_ctor_release(x_71, 0); + lean_ctor_release(x_71, 1); + x_94 = x_71; +} else { + lean_dec_ref(x_71); + x_94 = lean_box(0); +} +if (lean_is_scalar(x_94)) { + x_95 = lean_alloc_ctor(1, 2, 0); +} else { + x_95 = x_94; +} +lean_ctor_set(x_95, 0, x_92); +lean_ctor_set(x_95, 1, x_93); +return x_95; +} +} +} +else +{ +uint8_t x_96; +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_96 = !lean_is_exclusive(x_22); +if (x_96 == 0) +{ +return x_22; +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_97 = lean_ctor_get(x_22, 0); +x_98 = lean_ctor_get(x_22, 1); +lean_inc(x_98); +lean_inc(x_97); +lean_dec(x_22); +x_99 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_99, 0, x_97); +lean_ctor_set(x_99, 1, x_98); +return x_99; +} +} +} +else +{ +uint8_t x_100; +lean_dec(x_16); +lean_dec(x_14); +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_5); +lean_dec(x_4); +lean_dec(x_3); +x_100 = !lean_is_exclusive(x_19); +if (x_100 == 0) +{ +return x_19; +} +else +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_101 = lean_ctor_get(x_19, 0); +x_102 = lean_ctor_get(x_19, 1); +lean_inc(x_102); +lean_inc(x_101); +lean_dec(x_19); +x_103 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_103, 0, x_101); +lean_ctor_set(x_103, 1, x_102); +return x_103; +} +} +} +else +{ +uint8_t x_104; +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_104 = !lean_is_exclusive(x_13); +if (x_104 == 0) +{ +return x_13; +} +else +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_105 = lean_ctor_get(x_13, 0); +x_106 = lean_ctor_get(x_13, 1); +lean_inc(x_106); +lean_inc(x_105); +lean_dec(x_13); +x_107 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_107, 0, x_105); +lean_ctor_set(x_107, 1, x_106); +return x_107; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___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, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; size_t x_12; size_t x_13; lean_object* x_14; lean_object* x_15; +x_11 = lean_array_get_size(x_4); +x_12 = lean_usize_of_nat(x_11); +lean_dec(x_11); +x_13 = 0; +lean_inc(x_4); +x_14 = l_Array_mapMUnsafe_map___at_Lean_Elab_WF_packMutual___spec__1(x_12, x_13, x_4); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_15 = l___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewDomain(x_14, x_6, x_7, x_8, x_9, x_10); +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; lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_object* x_24; +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___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_mkNewCoDomain_go___closed__11; +x_19 = l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(x_18, x_8, x_9, 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); +lean_inc(x_16); +x_22 = lean_alloc_closure((void*)(l_Lean_Elab_WF_packMutual___lambda__2), 12, 6); +lean_closure_set(x_22, 0, x_4); +lean_closure_set(x_22, 1, x_3); +lean_closure_set(x_22, 2, x_5); +lean_closure_set(x_22, 3, x_1); +lean_closure_set(x_22, 4, x_2); +lean_closure_set(x_22, 5, x_16); +x_23 = 0; +x_24 = l_Lean_Meta_withLocalDecl___at_Lean_Meta_forallTelescopeCompatibleAux___spec__15___rarg(x_20, x_23, x_16, x_22, x_6, x_7, x_8, x_9, x_21); +return x_24; +} +else +{ +uint8_t x_25; +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); +lean_dec(x_2); +lean_dec(x_1); +x_25 = !lean_is_exclusive(x_15); +if (x_25 == 0) +{ +return x_15; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_15, 0); +x_27 = lean_ctor_get(x_15, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_15); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__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) { +_start: +{ +lean_object* x_9; lean_object* x_10; +lean_inc(x_2); +lean_inc(x_1); +x_9 = lean_alloc_closure((void*)(l_Lean_Elab_WF_packMutual___lambda__3), 10, 2); +lean_closure_set(x_9, 0, x_1); +lean_closure_set(x_9, 1, x_2); +x_10 = l_Lean_Elab_WF_withFixedPrefix___rarg(x_2, x_1, x_9, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_2); +return x_10; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual(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; +x_8 = lean_array_get_size(x_2); +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_nat_dec_eq(x_8, x_9); +lean_dec(x_8); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_box(0); +x_12 = l_Lean_Elab_WF_packMutual___lambda__4(x_2, x_1, x_11, x_3, x_4, x_5, x_6, x_7); +return x_12; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); -x_19 = !lean_is_exclusive(x_9); -if (x_19 == 0) -{ -return x_9; -} -else -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_20 = lean_ctor_get(x_9, 0); -x_21 = lean_ctor_get(x_9, 1); -lean_inc(x_21); -lean_inc(x_20); -lean_dec(x_9); -x_22 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_22, 0, x_20); -lean_ctor_set(x_22, 1, x_21); -return x_22; +x_13 = l_Lean_Elab_instInhabitedPreDefinition; +x_14 = lean_unsigned_to_nat(0u); +x_15 = lean_array_get(x_13, x_2, x_14); +lean_dec(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; } } } -} -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual(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_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_WF_packMutual___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_7; lean_object* x_8; uint8_t x_9; -x_7 = lean_array_get_size(x_1); -x_8 = lean_unsigned_to_nat(1u); -x_9 = lean_nat_dec_eq(x_7, x_8); -lean_dec(x_7); -if (x_9 == 0) -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Elab_WF_packMutual___lambda__3(x_1, x_10, x_2, x_3, x_4, x_5, x_6); -return x_11; -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_12 = l_Lean_Elab_instInhabitedPreDefinition; -x_13 = lean_unsigned_to_nat(0u); -x_14 = lean_array_get(x_12, x_1, x_13); +size_t x_4; size_t x_5; lean_object* x_6; +x_4 = lean_unbox_usize(x_1); lean_dec(x_1); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_6); -return x_15; -} +x_5 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_6 = l_Array_mapMUnsafe_map___at_Lean_Elab_WF_packMutual___spec__1(x_4, x_5, x_3); +return x_6; } } LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___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) { @@ -2936,13 +3331,13 @@ lean_dec(x_2); return x_7; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_packMutual___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_EXPORT lean_object* l_Lean_Elab_WF_packMutual___lambda__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) { _start: { -lean_object* x_8; -x_8 = l_Lean_Elab_WF_packMutual___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_2); -return x_8; +lean_object* x_9; +x_9 = l_Lean_Elab_WF_packMutual___lambda__4(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* initialize_Init(uint8_t builtin, lean_object*); @@ -3026,6 +3421,8 @@ l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__L lean_mark_persistent(l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__7); l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__8 = _init_l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__8(); lean_mark_persistent(l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_WF_PackMutual_0__Lean_Elab_WF_post_mkNewArg___spec__1___closed__8); +l_Lean_Elab_WF_withFixedPrefix___rarg___closed__1 = _init_l_Lean_Elab_WF_withFixedPrefix___rarg___closed__1(); +lean_mark_persistent(l_Lean_Elab_WF_withFixedPrefix___rarg___closed__1); l_Lean_Elab_WF_packMutual___lambda__2___closed__1 = _init_l_Lean_Elab_WF_packMutual___lambda__2___closed__1(); lean_mark_persistent(l_Lean_Elab_WF_packMutual___lambda__2___closed__1); l_Lean_Elab_WF_packMutual___lambda__2___closed__2 = _init_l_Lean_Elab_WF_packMutual___lambda__2___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/WF/Rel.c b/stage0/stdlib/Lean/Elab/PreDefinition/WF/Rel.c index addf15d301..1306c488fb 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/WF/Rel.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/WF/Rel.c @@ -26,18 +26,26 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___closed__5; lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); -lean_object* l_Lean_Expr_bindingDomain_x21(lean_object*); lean_object* l_Lean_Meta_mkConstWithFreshMVarLevels(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__5; +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__14; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__6(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_mkMVar(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go(lean_object*, 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_get(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_WF_elabWFRel___lambda__2___closed__1; +uint8_t lean_name_eq(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_WF_instInhabitedTerminationByElement; +lean_object* l_Lean_Elab_Term_getMVarDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, 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_EXPORT lean_object* l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5___lambda__1(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*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__7; LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instInhabitedTermElabM(lean_object*); uint8_t lean_usize_dec_lt(size_t, size_t); @@ -47,49 +55,73 @@ LEAN_EXPORT lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Rel_0 LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__3___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_intro1Core(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_PersistentArray_forIn___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__4(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_rename(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_WF_elabWFRel___lambda__2___closed__3; lean_object* lean_nat_sub(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_getRefFromElems(lean_object*); -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(lean_object*, 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_replaceRef(lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__4; LEAN_EXPORT lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__12; +lean_object* l_Nat_repr(lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getId(lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__1; lean_object* l_Array_back___rarg(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1(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* lean_array_to_list(lean_object*, lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__10; extern lean_object* l_Lean_instInhabitedExpr; +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_getRefFromElems___lambda__1(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_PersistentArray_forIn___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__4___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___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_instInhabitedSyntax; LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___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_List_mapTRAux___at_Lean_Meta_substCore___spec__6(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___closed__4; lean_object* l_Lean_Elab_Term_elabTermEnsuringType___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*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__8; static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_getRefFromElems___closed__1; -LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___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_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___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_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__11; LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_getRefFromElems___boxed(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_LocalDecl_fvarId(lean_object*); static lean_object* l_Lean_Elab_WF_elabWFRel___closed__4; static lean_object* l_panic___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___spec__1___closed__1; +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__2; 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_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_synthInstance(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Cases_cases(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__3(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*); lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_PersistentArray_forIn___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__4___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__13; uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_mkApp(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__7(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__9; lean_object* l_Lean_Elab_Term_withDeclName___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___closed__2; lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -98,6 +130,7 @@ lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Term_Quotation_getAntiquotationI lean_object* l_Lean_Meta_getLevel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__3; +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_WF_elabWFRel___closed__2; extern lean_object* l_Lean_instInhabitedName; static lean_object* l_Lean_Elab_WF_elabWFRel___closed__1; @@ -106,17 +139,25 @@ static lean_object* l_Lean_Elab_WF_elabWFRel___closed__3; lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_logUnassignedUsingErrorInfos(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__3; +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___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* l_Lean_Meta_mkFreshTypeMVar(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2___closed__1; static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__2; lean_object* l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___closed__3; +LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_getRefFromElems___lambda__1___boxed(lean_object*, lean_object*); static lean_object* l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__8(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2___closed__2; lean_object* l_Lean_mkConst(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_getRefFromElems___spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__6; +static lean_object* l_Lean_Elab_WF_elabWFRel___lambda__3___closed__2; +static lean_object* l_Lean_Elab_WF_elabWFRel___lambda__3___closed__1; lean_object* l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__1; LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -481,7 +522,7 @@ x_11 = lean_apply_7(x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_8); return x_11; } } -static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__1() { +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -490,7 +531,7 @@ x_2 = lean_mk_empty_array_with_capacity(x_1); return x_2; } } -static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__2() { +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__2() { _start: { lean_object* x_1; @@ -498,138 +539,367 @@ x_1 = lean_mk_string("_private.Lean.Elab.PreDefinition.WF.Rel.0.Lean.Elab.WF.unp return x_1; } } -static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__3() { +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__3() { _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___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___closed__2; -x_2 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__2; -x_3 = lean_unsigned_to_nat(44u); -x_4 = lean_unsigned_to_nat(72u); +x_2 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__2; +x_3 = lean_unsigned_to_nat(50u); +x_4 = lean_unsigned_to_nat(85u); x_5 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___closed__4; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); return x_6; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go(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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___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) { _start: { -lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; -x_12 = lean_array_get_size(x_1); -x_13 = lean_unsigned_to_nat(1u); -x_14 = lean_nat_sub(x_12, x_13); +lean_object* x_15; lean_object* x_16; uint8_t x_17; +lean_dec(x_7); +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_sub(x_1, x_15); +x_17 = lean_nat_dec_lt(x_2, x_16); +lean_dec(x_16); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_2); +lean_dec(x_1); +x_18 = l_Lean_instInhabitedName; +x_19 = l_Array_back___rarg(x_18, x_3); +lean_dec(x_3); +x_20 = l_Lean_Meta_rename(x_4, x_5, x_19, x_10, x_11, x_12, x_13, x_14); +return x_20; +} +else +{ +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_28; lean_object* x_29; lean_object* x_30; +x_21 = lean_nat_add(x_6, x_2); +x_22 = l_Lean_instInhabitedName; +x_23 = lean_array_get(x_22, x_3, x_21); +lean_dec(x_21); +x_24 = lean_box(0); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +x_26 = 0; +x_27 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set_uint8(x_27, sizeof(void*)*1, x_26); +x_28 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__1; +x_29 = lean_array_push(x_28, x_27); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +x_30 = l_Lean_Meta_Cases_cases(x_4, x_5, x_29, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_30, 1); +lean_inc(x_32); +lean_dec(x_30); +x_33 = lean_array_get_size(x_31); +x_34 = lean_nat_dec_eq(x_33, x_15); +lean_dec(x_33); +if (x_34 == 0) +{ +lean_object* x_35; lean_object* x_36; +lean_dec(x_31); +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_35 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__3; +x_36 = l_panic___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___spec__1(x_35, x_8, x_9, x_10, x_11, x_12, x_13, x_32); +return x_36; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_37 = lean_unsigned_to_nat(0u); +x_38 = lean_array_fget(x_31, x_37); +lean_dec(x_31); +x_39 = lean_nat_add(x_2, x_15); +lean_dec(x_2); +x_40 = lean_ctor_get(x_38, 0); +lean_inc(x_40); +lean_dec(x_38); +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); +x_43 = l_Lean_instInhabitedExpr; +x_44 = lean_array_get(x_43, x_42, x_15); +lean_dec(x_42); +x_45 = l_Lean_Expr_fvarId_x21(x_44); +x_46 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go(x_6, x_3, x_1, x_39, x_41, x_45, x_8, x_9, x_10, x_11, x_12, x_13, x_32); +return x_46; +} +} +else +{ +uint8_t x_47; +lean_dec(x_13); lean_dec(x_12); -x_15 = lean_nat_dec_lt(x_2, x_14); -lean_dec(x_14); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_47 = !lean_is_exclusive(x_30); +if (x_47 == 0) +{ +return x_30; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_30, 0); +x_49 = lean_ctor_get(x_30, 1); +lean_inc(x_49); +lean_inc(x_48); +lean_dec(x_30); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_48); +lean_ctor_set(x_50, 1, x_49); +return x_50; +} +} +} +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Elab"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("definition"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__2; +x_2 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("wf"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__4; +x_2 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__5; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("i: "); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__7; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__9() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(", varNames: "); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__9; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__11() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(", goal: "); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__12() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__11; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__13() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(""); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__14() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__13; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go(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; lean_object* x_16; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; +x_14 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__6; +x_42 = lean_st_ref_get(x_12, x_13); +x_43 = lean_ctor_get(x_42, 0); +lean_inc(x_43); +x_44 = lean_ctor_get(x_43, 3); +lean_inc(x_44); +lean_dec(x_43); +x_45 = lean_ctor_get_uint8(x_44, sizeof(void*)*1); +lean_dec(x_44); +if (x_45 == 0) +{ +lean_object* x_46; uint8_t x_47; +x_46 = lean_ctor_get(x_42, 1); +lean_inc(x_46); +lean_dec(x_42); +x_47 = 0; +x_15 = x_47; +x_16 = x_46; +goto block_41; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52; +x_48 = lean_ctor_get(x_42, 1); +lean_inc(x_48); +lean_dec(x_42); +x_49 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_14, x_7, x_8, x_9, x_10, x_11, x_12, x_48); +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 = lean_unbox(x_50); +lean_dec(x_50); +x_15 = x_52; +x_16 = x_51; +goto block_41; +} +block_41: +{ if (x_15 == 0) { -lean_object* x_16; lean_object* x_17; lean_object* x_18; -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_2); -x_16 = l_Lean_instInhabitedName; -x_17 = l_Array_back___rarg(x_16, x_1); -lean_dec(x_1); -x_18 = l_Lean_Meta_rename(x_3, x_4, x_17, x_7, x_8, x_9, x_10, x_11); +lean_object* x_17; lean_object* x_18; +x_17 = lean_box(0); +x_18 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1(x_3, x_4, x_2, x_5, x_6, x_1, x_17, x_7, x_8, x_9, x_10, x_11, x_12, x_16); return x_18; } else { -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_19 = l_Lean_instInhabitedName; -x_20 = lean_array_get(x_19, x_1, x_2); -x_21 = lean_box(0); -x_22 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_22, 0, x_20); -lean_ctor_set(x_22, 1, x_21); -x_23 = 0; -x_24 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_24, 0, x_22); -lean_ctor_set_uint8(x_24, sizeof(void*)*1, x_23); -x_25 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__1; -x_26 = lean_array_push(x_25, x_24); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -x_27 = l_Lean_Meta_Cases_cases(x_3, x_4, x_26, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_27) == 0) -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -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 = lean_array_get_size(x_28); -x_31 = lean_nat_dec_eq(x_30, x_13); -lean_dec(x_30); -if (x_31 == 0) -{ -lean_object* x_32; lean_object* x_33; +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_inc(x_4); +x_19 = l_Nat_repr(x_4); +x_20 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_20, 0, x_19); +x_21 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_21, 0, x_20); +x_22 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__8; +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___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__10; +x_25 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +lean_inc(x_2); +x_26 = lean_array_to_list(lean_box(0), x_2); +x_27 = lean_box(0); +x_28 = l_List_mapTRAux___at_Lean_Meta_substCore___spec__6(x_26, x_27); +x_29 = l_Lean_MessageData_ofList(x_28); lean_dec(x_28); -lean_dec(x_2); -lean_dec(x_1); -x_32 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__3; -x_33 = l_panic___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___spec__1(x_32, x_5, x_6, x_7, x_8, x_9, x_10, x_29); -return x_33; -} -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; lean_object* x_41; lean_object* x_42; -x_34 = lean_unsigned_to_nat(0u); -x_35 = lean_array_fget(x_28, x_34); -lean_dec(x_28); -x_36 = lean_nat_add(x_2, x_13); -lean_dec(x_2); -x_37 = lean_ctor_get(x_35, 0); -lean_inc(x_37); -lean_dec(x_35); +x_30 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_30, 0, x_25); +lean_ctor_set(x_30, 1, x_29); +x_31 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__12; +x_32 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_32, 0, x_30); +lean_ctor_set(x_32, 1, x_31); +lean_inc(x_5); +x_33 = lean_alloc_ctor(5, 1, 0); +lean_ctor_set(x_33, 0, x_5); +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 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__14; +x_36 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +x_37 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_14, x_36, x_7, x_8, x_9, x_10, x_11, x_12, x_16); 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 = l_Lean_instInhabitedExpr; -x_41 = lean_array_get(x_40, x_39, x_13); -lean_dec(x_39); -x_42 = l_Lean_Expr_fvarId_x21(x_41); -x_2 = x_36; -x_3 = x_38; -x_4 = x_42; -x_11 = x_29; -goto _start; -} -} -else -{ -uint8_t x_44; -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_2); -lean_dec(x_1); -x_44 = !lean_is_exclusive(x_27); -if (x_44 == 0) -{ -return x_27; -} -else -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_27, 0); -x_46 = lean_ctor_get(x_27, 1); -lean_inc(x_46); -lean_inc(x_45); -lean_dec(x_27); -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; -} +x_40 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1(x_3, x_4, x_2, x_5, x_6, x_1, x_38, x_7, x_8, x_9, x_10, x_11, x_12, x_39); +return x_40; } } } @@ -846,6 +1116,1342 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaTelescope___at___private_Lean return x_2; } } +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_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* x_12, lean_object* x_13) { +_start: +{ +uint8_t x_14; +x_14 = lean_usize_dec_lt(x_5, x_4); +if (x_14 == 0) +{ +lean_object* 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_2); +lean_dec(x_1); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_6); +lean_ctor_set(x_15, 1, x_13); +return x_15; +} +else +{ +lean_object* x_16; uint8_t x_17; +x_16 = lean_array_uget(x_3, x_5); +x_17 = !lean_is_exclusive(x_6); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_6, 1); +x_19 = lean_ctor_get(x_6, 0); +lean_dec(x_19); +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_18); +lean_inc(x_1); +x_20 = l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5(x_1, x_16, x_18, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +if (lean_obj_tag(x_21) == 0) +{ +uint8_t x_22; +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_2); +lean_dec(x_1); +x_22 = !lean_is_exclusive(x_20); +if (x_22 == 0) +{ +lean_object* x_23; lean_object* x_24; +x_23 = lean_ctor_get(x_20, 0); +lean_dec(x_23); +x_24 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_24, 0, x_21); +lean_ctor_set(x_6, 0, x_24); +lean_ctor_set(x_20, 0, x_6); +return x_20; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_20, 1); +lean_inc(x_25); +lean_dec(x_20); +x_26 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_26, 0, x_21); +lean_ctor_set(x_6, 0, x_26); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_6); +lean_ctor_set(x_27, 1, x_25); +return x_27; +} +} +else +{ +lean_object* x_28; lean_object* x_29; size_t x_30; size_t x_31; +lean_dec(x_18); +x_28 = lean_ctor_get(x_20, 1); +lean_inc(x_28); +lean_dec(x_20); +x_29 = lean_ctor_get(x_21, 0); +lean_inc(x_29); +lean_dec(x_21); +lean_inc(x_2); +lean_ctor_set(x_6, 1, x_29); +lean_ctor_set(x_6, 0, x_2); +x_30 = 1; +x_31 = lean_usize_add(x_5, x_30); +x_5 = x_31; +x_13 = x_28; +goto _start; +} +} +else +{ +uint8_t x_33; +lean_free_object(x_6); +lean_dec(x_18); +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_2); +lean_dec(x_1); +x_33 = !lean_is_exclusive(x_20); +if (x_33 == 0) +{ +return x_20; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_20, 0); +x_35 = lean_ctor_get(x_20, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_20); +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_37; lean_object* x_38; +x_37 = lean_ctor_get(x_6, 1); +lean_inc(x_37); +lean_dec(x_6); +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_37); +lean_inc(x_1); +x_38 = l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5(x_1, x_16, x_37, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_38) == 0) +{ +lean_object* x_39; +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +if (lean_obj_tag(x_39) == 0) +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +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_2); +lean_dec(x_1); +x_40 = lean_ctor_get(x_38, 1); +lean_inc(x_40); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + x_41 = x_38; +} else { + lean_dec_ref(x_38); + x_41 = lean_box(0); +} +x_42 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_42, 0, 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_37); +if (lean_is_scalar(x_41)) { + x_44 = lean_alloc_ctor(0, 2, 0); +} else { + x_44 = x_41; +} +lean_ctor_set(x_44, 0, x_43); +lean_ctor_set(x_44, 1, x_40); +return x_44; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; size_t x_48; size_t x_49; +lean_dec(x_37); +x_45 = lean_ctor_get(x_38, 1); +lean_inc(x_45); +lean_dec(x_38); +x_46 = lean_ctor_get(x_39, 0); +lean_inc(x_46); +lean_dec(x_39); +lean_inc(x_2); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_2); +lean_ctor_set(x_47, 1, x_46); +x_48 = 1; +x_49 = lean_usize_add(x_5, x_48); +x_5 = x_49; +x_6 = x_47; +x_13 = x_45; +goto _start; +} +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +lean_dec(x_37); +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_2); +lean_dec(x_1); +x_51 = lean_ctor_get(x_38, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_38, 1); +lean_inc(x_52); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + x_53 = x_38; +} else { + lean_dec_ref(x_38); + x_53 = lean_box(0); +} +if (lean_is_scalar(x_53)) { + x_54 = lean_alloc_ctor(1, 2, 0); +} else { + x_54 = x_53; +} +lean_ctor_set(x_54, 0, x_51); +lean_ctor_set(x_54, 1, x_52); +return x_54; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__7(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +_start: +{ +uint8_t x_13; +x_13 = lean_usize_dec_lt(x_4, x_3); +if (x_13 == 0) +{ +lean_object* x_14; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_5); +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; +x_15 = lean_array_uget(x_2, x_4); +x_16 = lean_ctor_get(x_5, 1); +lean_inc(x_16); +if (lean_is_exclusive(x_5)) { + lean_ctor_release(x_5, 0); + lean_ctor_release(x_5, 1); + x_17 = x_5; +} else { + lean_dec_ref(x_5); + x_17 = lean_box(0); +} +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_29; +lean_inc(x_16); +x_29 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_29, 0, x_16); +x_18 = x_29; +x_19 = x_12; +goto block_28; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; +x_30 = lean_ctor_get(x_16, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_15, 0); +lean_inc(x_31); +lean_dec(x_15); +x_32 = lean_ctor_get(x_16, 1); +lean_inc(x_32); +x_33 = lean_ctor_get(x_30, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_30, 1); +lean_inc(x_34); +x_35 = lean_ctor_get(x_30, 2); +lean_inc(x_35); +x_36 = lean_nat_dec_lt(x_34, x_35); +if (x_36 == 0) +{ +lean_object* x_37; lean_object* x_38; +lean_dec(x_35); +lean_dec(x_34); +lean_dec(x_33); +lean_dec(x_31); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_30); +lean_ctor_set(x_37, 1, x_32); +x_38 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_38, 0, x_37); +x_18 = x_38; +x_19 = x_12; +goto block_28; +} +else +{ +uint8_t x_39; +x_39 = !lean_is_exclusive(x_30); +if (x_39 == 0) +{ +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; +x_40 = lean_ctor_get(x_30, 2); +lean_dec(x_40); +x_41 = lean_ctor_get(x_30, 1); +lean_dec(x_41); +x_42 = lean_ctor_get(x_30, 0); +lean_dec(x_42); +x_43 = lean_array_fget(x_33, x_34); +x_44 = lean_unsigned_to_nat(1u); +x_45 = lean_nat_add(x_34, x_44); +lean_dec(x_34); +lean_ctor_set(x_30, 1, x_45); +x_46 = l_Lean_LocalDecl_userName(x_31); +x_47 = lean_name_eq(x_46, x_43); +lean_dec(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = l_Lean_LocalDecl_fvarId(x_31); +lean_dec(x_31); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_49 = l_Lean_Meta_rename(x_32, x_48, x_43, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_49) == 0) +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +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 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_30); +lean_ctor_set(x_52, 1, x_50); +x_53 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_53, 0, x_52); +x_18 = x_53; +x_19 = x_51; +goto block_28; +} +else +{ +uint8_t x_54; +lean_dec(x_30); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +x_54 = !lean_is_exclusive(x_49); +if (x_54 == 0) +{ +return x_49; +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_49, 0); +x_56 = lean_ctor_get(x_49, 1); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_49); +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_55); +lean_ctor_set(x_57, 1, x_56); +return x_57; +} +} +} +else +{ +lean_object* x_58; lean_object* x_59; +lean_dec(x_43); +lean_dec(x_31); +x_58 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_58, 0, x_30); +lean_ctor_set(x_58, 1, x_32); +x_59 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_59, 0, x_58); +x_18 = x_59; +x_19 = x_12; +goto block_28; +} +} +else +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; uint8_t x_65; +lean_dec(x_30); +x_60 = lean_array_fget(x_33, x_34); +x_61 = lean_unsigned_to_nat(1u); +x_62 = lean_nat_add(x_34, x_61); +lean_dec(x_34); +x_63 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_63, 0, x_33); +lean_ctor_set(x_63, 1, x_62); +lean_ctor_set(x_63, 2, x_35); +x_64 = l_Lean_LocalDecl_userName(x_31); +x_65 = lean_name_eq(x_64, x_60); +lean_dec(x_64); +if (x_65 == 0) +{ +lean_object* x_66; lean_object* x_67; +x_66 = l_Lean_LocalDecl_fvarId(x_31); +lean_dec(x_31); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_67 = l_Lean_Meta_rename(x_32, x_66, x_60, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_67) == 0) +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +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_alloc_ctor(0, 2, 0); +lean_ctor_set(x_70, 0, x_63); +lean_ctor_set(x_70, 1, x_68); +x_71 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_71, 0, x_70); +x_18 = x_71; +x_19 = x_69; +goto block_28; +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +lean_dec(x_63); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +x_72 = lean_ctor_get(x_67, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_67, 1); +lean_inc(x_73); +if (lean_is_exclusive(x_67)) { + lean_ctor_release(x_67, 0); + lean_ctor_release(x_67, 1); + x_74 = x_67; +} else { + lean_dec_ref(x_67); + 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 +{ +lean_object* x_76; lean_object* x_77; +lean_dec(x_60); +lean_dec(x_31); +x_76 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_76, 0, x_63); +lean_ctor_set(x_76, 1, x_32); +x_77 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_77, 0, x_76); +x_18 = x_77; +x_19 = x_12; +goto block_28; +} +} +} +} +block_28: +{ +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +x_20 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_20, 0, x_18); +if (lean_is_scalar(x_17)) { + x_21 = lean_alloc_ctor(0, 2, 0); +} else { + x_21 = x_17; +} +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_16); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_19); +return x_22; +} +else +{ +lean_object* x_23; lean_object* x_24; size_t x_25; size_t x_26; +lean_dec(x_16); +x_23 = lean_ctor_get(x_18, 0); +lean_inc(x_23); +lean_dec(x_18); +lean_inc(x_1); +if (lean_is_scalar(x_17)) { + x_24 = lean_alloc_ctor(0, 2, 0); +} else { + x_24 = x_17; +} +lean_ctor_set(x_24, 0, x_1); +lean_ctor_set(x_24, 1, x_23); +x_25 = 1; +x_26 = lean_usize_add(x_4, x_25); +x_4 = x_26; +x_5 = x_24; +x_12 = x_19; +goto _start; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5___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_10; lean_object* x_11; +x_10 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_10, 0, x_1); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_9); +return x_11; +} +} +LEAN_EXPORT lean_object* l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___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) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; +x_11 = lean_ctor_get(x_2, 0); +lean_inc(x_11); +lean_dec(x_2); +x_12 = lean_box(0); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_3); +x_14 = lean_array_get_size(x_11); +x_15 = lean_usize_of_nat(x_14); +lean_dec(x_14); +x_16 = 0; +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_17 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__6(x_1, x_12, x_11, x_15, x_16, x_13, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_11); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_dec(x_17); +x_21 = lean_ctor_get(x_18, 1); +lean_inc(x_21); +lean_dec(x_18); +x_22 = lean_box(0); +x_23 = l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5___lambda__1(x_21, x_22, x_4, x_5, x_6, x_7, x_8, x_9, x_20); +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_23; +} +else +{ +uint8_t x_24; +lean_dec(x_18); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_24 = !lean_is_exclusive(x_17); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_17, 0); +lean_dec(x_25); +x_26 = lean_ctor_get(x_19, 0); +lean_inc(x_26); +lean_dec(x_19); +lean_ctor_set(x_17, 0, x_26); +return x_17; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_17, 1); +lean_inc(x_27); +lean_dec(x_17); +x_28 = lean_ctor_get(x_19, 0); +lean_inc(x_28); +lean_dec(x_19); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_27); +return x_29; +} +} +} +else +{ +uint8_t x_30; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_30 = !lean_is_exclusive(x_17); +if (x_30 == 0) +{ +return x_17; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_17, 0); +x_32 = lean_ctor_get(x_17, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_17); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; +} +} +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; size_t x_38; size_t x_39; lean_object* x_40; +lean_dec(x_1); +x_34 = lean_ctor_get(x_2, 0); +lean_inc(x_34); +lean_dec(x_2); +x_35 = lean_box(0); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_3); +x_37 = lean_array_get_size(x_34); +x_38 = lean_usize_of_nat(x_37); +lean_dec(x_37); +x_39 = 0; +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_40 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__7(x_35, x_34, x_38, x_39, x_36, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_34); +if (lean_obj_tag(x_40) == 0) +{ +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_40, 0); +lean_inc(x_41); +x_42 = lean_ctor_get(x_41, 0); +lean_inc(x_42); +if (lean_obj_tag(x_42) == 0) +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_43); +lean_dec(x_40); +x_44 = lean_ctor_get(x_41, 1); +lean_inc(x_44); +lean_dec(x_41); +x_45 = lean_box(0); +x_46 = l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5___lambda__1(x_44, x_45, x_4, x_5, x_6, x_7, x_8, x_9, x_43); +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_46; +} +else +{ +uint8_t x_47; +lean_dec(x_41); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_47 = !lean_is_exclusive(x_40); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_40, 0); +lean_dec(x_48); +x_49 = lean_ctor_get(x_42, 0); +lean_inc(x_49); +lean_dec(x_42); +lean_ctor_set(x_40, 0, x_49); +return x_40; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_40, 1); +lean_inc(x_50); +lean_dec(x_40); +x_51 = lean_ctor_get(x_42, 0); +lean_inc(x_51); +lean_dec(x_42); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +} +else +{ +uint8_t x_53; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_53 = !lean_is_exclusive(x_40); +if (x_53 == 0) +{ +return x_40; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_40, 0); +x_55 = lean_ctor_get(x_40, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_40); +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; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__8(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +_start: +{ +uint8_t x_13; +x_13 = lean_usize_dec_lt(x_4, x_3); +if (x_13 == 0) +{ +lean_object* x_14; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_5); +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; +x_15 = lean_array_uget(x_2, x_4); +x_16 = lean_ctor_get(x_5, 1); +lean_inc(x_16); +if (lean_is_exclusive(x_5)) { + lean_ctor_release(x_5, 0); + lean_ctor_release(x_5, 1); + x_17 = x_5; +} else { + lean_dec_ref(x_5); + x_17 = lean_box(0); +} +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_30; +lean_inc(x_16); +x_30 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_30, 0, x_16); +x_18 = x_30; +x_19 = x_12; +goto block_29; +} +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; uint8_t x_37; +x_31 = lean_ctor_get(x_16, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_15, 0); +lean_inc(x_32); +lean_dec(x_15); +x_33 = lean_ctor_get(x_16, 1); +lean_inc(x_33); +x_34 = lean_ctor_get(x_31, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_31, 1); +lean_inc(x_35); +x_36 = lean_ctor_get(x_31, 2); +lean_inc(x_36); +x_37 = lean_nat_dec_lt(x_35, x_36); +if (x_37 == 0) +{ +lean_object* x_38; lean_object* x_39; +lean_dec(x_36); +lean_dec(x_35); +lean_dec(x_34); +lean_dec(x_32); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_31); +lean_ctor_set(x_38, 1, x_33); +x_39 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_39, 0, x_38); +x_18 = x_39; +x_19 = x_12; +goto block_29; +} +else +{ +uint8_t x_40; +x_40 = !lean_is_exclusive(x_31); +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; uint8_t x_48; +x_41 = lean_ctor_get(x_31, 2); +lean_dec(x_41); +x_42 = lean_ctor_get(x_31, 1); +lean_dec(x_42); +x_43 = lean_ctor_get(x_31, 0); +lean_dec(x_43); +x_44 = lean_array_fget(x_34, x_35); +x_45 = lean_unsigned_to_nat(1u); +x_46 = lean_nat_add(x_35, x_45); +lean_dec(x_35); +lean_ctor_set(x_31, 1, x_46); +x_47 = l_Lean_LocalDecl_userName(x_32); +x_48 = lean_name_eq(x_47, x_44); +lean_dec(x_47); +if (x_48 == 0) +{ +lean_object* x_49; lean_object* x_50; +x_49 = l_Lean_LocalDecl_fvarId(x_32); +lean_dec(x_32); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_50 = l_Lean_Meta_rename(x_33, x_49, x_44, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_50) == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +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 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_53, 0, x_31); +lean_ctor_set(x_53, 1, x_51); +x_54 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_54, 0, x_53); +x_18 = x_54; +x_19 = x_52; +goto block_29; +} +else +{ +uint8_t x_55; +lean_dec(x_31); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +x_55 = !lean_is_exclusive(x_50); +if (x_55 == 0) +{ +return x_50; +} +else +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_50, 0); +x_57 = lean_ctor_get(x_50, 1); +lean_inc(x_57); +lean_inc(x_56); +lean_dec(x_50); +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 +{ +lean_object* x_59; lean_object* x_60; +lean_dec(x_44); +lean_dec(x_32); +x_59 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_59, 0, x_31); +lean_ctor_set(x_59, 1, x_33); +x_60 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_60, 0, x_59); +x_18 = x_60; +x_19 = x_12; +goto block_29; +} +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; uint8_t x_66; +lean_dec(x_31); +x_61 = lean_array_fget(x_34, x_35); +x_62 = lean_unsigned_to_nat(1u); +x_63 = lean_nat_add(x_35, x_62); +lean_dec(x_35); +x_64 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_64, 0, x_34); +lean_ctor_set(x_64, 1, x_63); +lean_ctor_set(x_64, 2, x_36); +x_65 = l_Lean_LocalDecl_userName(x_32); +x_66 = lean_name_eq(x_65, x_61); +lean_dec(x_65); +if (x_66 == 0) +{ +lean_object* x_67; lean_object* x_68; +x_67 = l_Lean_LocalDecl_fvarId(x_32); +lean_dec(x_32); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_68 = l_Lean_Meta_rename(x_33, x_67, x_61, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_68) == 0) +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +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_71 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_71, 0, x_64); +lean_ctor_set(x_71, 1, x_69); +x_72 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_72, 0, x_71); +x_18 = x_72; +x_19 = x_70; +goto block_29; +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +lean_dec(x_64); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +x_73 = lean_ctor_get(x_68, 0); +lean_inc(x_73); +x_74 = lean_ctor_get(x_68, 1); +lean_inc(x_74); +if (lean_is_exclusive(x_68)) { + lean_ctor_release(x_68, 0); + lean_ctor_release(x_68, 1); + x_75 = x_68; +} else { + lean_dec_ref(x_68); + x_75 = lean_box(0); +} +if (lean_is_scalar(x_75)) { + x_76 = lean_alloc_ctor(1, 2, 0); +} else { + x_76 = x_75; +} +lean_ctor_set(x_76, 0, x_73); +lean_ctor_set(x_76, 1, x_74); +return x_76; +} +} +else +{ +lean_object* x_77; lean_object* x_78; +lean_dec(x_61); +lean_dec(x_32); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_64); +lean_ctor_set(x_77, 1, x_33); +x_78 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_78, 0, x_77); +x_18 = x_78; +x_19 = x_12; +goto block_29; +} +} +} +} +block_29: +{ +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +x_20 = lean_ctor_get(x_18, 0); +lean_inc(x_20); +lean_dec(x_18); +x_21 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_21, 0, x_20); +if (lean_is_scalar(x_17)) { + x_22 = lean_alloc_ctor(0, 2, 0); +} else { + x_22 = x_17; +} +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_16); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_19); +return x_23; +} +else +{ +lean_object* x_24; lean_object* x_25; size_t x_26; size_t x_27; +lean_dec(x_16); +x_24 = lean_ctor_get(x_18, 0); +lean_inc(x_24); +lean_dec(x_18); +lean_inc(x_1); +if (lean_is_scalar(x_17)) { + x_25 = lean_alloc_ctor(0, 2, 0); +} else { + x_25 = x_17; +} +lean_ctor_set(x_25, 0, x_1); +lean_ctor_set(x_25, 1, x_24); +x_26 = 1; +x_27 = lean_usize_add(x_4, x_26); +x_4 = x_27; +x_5 = x_25; +x_12 = x_19; +goto _start; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Std_PersistentArray_forIn___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__4___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_10; +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_1); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +} +LEAN_EXPORT lean_object* l_Std_PersistentArray_forIn___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___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) { +_start: +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_ctor_get(x_1, 0); +lean_inc(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_11 = l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5(x_2, x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +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_1); +x_13 = !lean_is_exclusive(x_11); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_11, 0); +lean_dec(x_14); +x_15 = lean_ctor_get(x_12, 0); +lean_inc(x_15); +lean_dec(x_12); +lean_ctor_set(x_11, 0, x_15); +return x_11; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_11, 1); +lean_inc(x_16); +lean_dec(x_11); +x_17 = lean_ctor_get(x_12, 0); +lean_inc(x_17); +lean_dec(x_12); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; size_t x_25; size_t x_26; lean_object* x_27; +x_19 = lean_ctor_get(x_11, 1); +lean_inc(x_19); +lean_dec(x_11); +x_20 = lean_ctor_get(x_12, 0); +lean_inc(x_20); +lean_dec(x_12); +x_21 = lean_ctor_get(x_1, 1); +lean_inc(x_21); +lean_dec(x_1); +x_22 = lean_box(0); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_20); +x_24 = lean_array_get_size(x_21); +x_25 = lean_usize_of_nat(x_24); +lean_dec(x_24); +x_26 = 0; +x_27 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__8(x_22, x_21, x_25, x_26, x_23, x_3, x_4, x_5, x_6, x_7, x_8, x_19); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_21); +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_28; lean_object* x_29; +x_28 = lean_ctor_get(x_27, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_28, 0); +lean_inc(x_29); +if (lean_obj_tag(x_29) == 0) +{ +uint8_t x_30; +x_30 = !lean_is_exclusive(x_27); +if (x_30 == 0) +{ +lean_object* x_31; lean_object* x_32; +x_31 = lean_ctor_get(x_27, 0); +lean_dec(x_31); +x_32 = lean_ctor_get(x_28, 1); +lean_inc(x_32); +lean_dec(x_28); +lean_ctor_set(x_27, 0, x_32); +return x_27; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_27, 1); +lean_inc(x_33); +lean_dec(x_27); +x_34 = lean_ctor_get(x_28, 1); +lean_inc(x_34); +lean_dec(x_28); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +return x_35; +} +} +else +{ +uint8_t x_36; +lean_dec(x_28); +x_36 = !lean_is_exclusive(x_27); +if (x_36 == 0) +{ +lean_object* x_37; lean_object* x_38; +x_37 = lean_ctor_get(x_27, 0); +lean_dec(x_37); +x_38 = lean_ctor_get(x_29, 0); +lean_inc(x_38); +lean_dec(x_29); +lean_ctor_set(x_27, 0, x_38); +return x_27; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_27, 1); +lean_inc(x_39); +lean_dec(x_27); +x_40 = lean_ctor_get(x_29, 0); +lean_inc(x_40); +lean_dec(x_29); +x_41 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_41, 1, x_39); +return x_41; +} +} +} +else +{ +uint8_t x_42; +x_42 = !lean_is_exclusive(x_27); +if (x_42 == 0) +{ +return x_27; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_27, 0); +x_44 = lean_ctor_get(x_27, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_27); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +} +else +{ +uint8_t x_46; +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_1); +x_46 = !lean_is_exclusive(x_11); +if (x_46 == 0) +{ +return x_11; +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_11, 0); +x_48 = lean_ctor_get(x_11, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_11); +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +return x_49; +} +} +} +} LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___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: { @@ -987,62 +2593,135 @@ return x_34; } } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(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_12; lean_object* x_13; lean_object* x_14; -x_12 = lean_ctor_get(x_1, 5); -lean_inc(x_12); +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_1, 5); +lean_inc(x_13); lean_dec(x_1); -x_13 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2___boxed), 10, 1); -lean_closure_set(x_13, 0, x_4); +x_14 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2___boxed), 10, 1); +lean_closure_set(x_14, 0, x_5); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); -x_14 = l_Lean_Meta_lambdaTelescope___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__3___rarg(x_12, x_13, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_14) == 0) +x_15 = l_Lean_Meta_lambdaTelescope___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__3___rarg(x_13, x_14, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_15) == 0) { -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); +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; +x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); -lean_dec(x_14); -x_17 = lean_unsigned_to_nat(0u); -x_18 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go(x_15, x_17, x_2, x_3, x_5, x_6, x_7, x_8, x_9, x_10, x_16); -return x_18; +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +lean_inc(x_3); +x_18 = l_Lean_Elab_Term_getMVarDecl(x_3, x_6, x_7, x_8, x_9, x_10, x_11, 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); +lean_dec(x_18); +x_21 = lean_unsigned_to_nat(0u); +lean_inc(x_2); +lean_inc(x_16); +x_22 = l_Array_toSubarray___rarg(x_16, x_21, x_2); +x_23 = lean_ctor_get(x_19, 1); +lean_inc(x_23); +lean_dec(x_19); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_3); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_26 = l_Std_PersistentArray_forIn___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__4(x_25, x_24, x_6, x_7, x_8, x_9, x_10, x_11, x_20); +if (lean_obj_tag(x_26) == 0) +{ +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_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_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +x_30 = lean_array_get_size(x_16); +x_31 = lean_nat_sub(x_30, x_2); +lean_dec(x_30); +x_32 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go(x_2, x_16, x_31, x_21, x_29, x_4, x_6, x_7, x_8, x_9, x_10, x_11, x_28); +return x_32; } else { -uint8_t x_19; +uint8_t x_33; +lean_dec(x_16); +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_5); -lean_dec(x_3); +lean_dec(x_4); lean_dec(x_2); -x_19 = !lean_is_exclusive(x_14); -if (x_19 == 0) +x_33 = !lean_is_exclusive(x_26); +if (x_33 == 0) { -return x_14; +return x_26; } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_20 = lean_ctor_get(x_14, 0); -x_21 = lean_ctor_get(x_14, 1); -lean_inc(x_21); -lean_inc(x_20); -lean_dec(x_14); -x_22 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_22, 0, x_20); -lean_ctor_set(x_22, 1, x_21); -return x_22; +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_26, 0); +x_35 = lean_ctor_get(x_26, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_26); +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 +{ +uint8_t x_37; +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); +x_37 = !lean_is_exclusive(x_15); +if (x_37 == 0) +{ +return x_15; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_15, 0); +x_39 = lean_ctor_get(x_15, 1); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_15); +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +return x_40; } } } @@ -1082,6 +2761,79 @@ lean_dec(x_1); return x_15; } } +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__6___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: +{ +size_t x_14; size_t x_15; lean_object* x_16; +x_14 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_15 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_16 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__6(x_1, x_2, x_3, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_3); +return x_16; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__7___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: +{ +size_t x_13; size_t x_14; lean_object* x_15; +x_13 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_14 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_15 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__7(x_1, x_2, x_13, x_14, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_2); +return x_15; +} +} +LEAN_EXPORT lean_object* l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5___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_10; +x_10 = l_Std_PersistentArray_forInAux___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__5___lambda__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); +lean_dec(x_2); +return x_10; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__8___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: +{ +size_t x_13; size_t x_14; lean_object* x_15; +x_13 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_14 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_15 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__8(x_1, x_2, x_13, x_14, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_2); +return x_15; +} +} +LEAN_EXPORT lean_object* l_Std_PersistentArray_forIn___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__4___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_10; +x_10 = l_Std_PersistentArray_forIn___at___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___spec__4___lambda__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); +lean_dec(x_2); +return x_10; +} +} LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___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: { @@ -1220,528 +2972,541 @@ return x_32; } } } -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___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) { +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { -uint8_t x_12; -x_12 = lean_usize_dec_lt(x_3, x_2); -if (x_12 == 0) +uint8_t x_13; +x_13 = lean_usize_dec_lt(x_4, x_3); +if (x_13 == 0) { -lean_object* x_13; +lean_object* x_14; +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_5); -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; +lean_dec(x_1); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_5); +lean_ctor_set(x_14, 1, x_12); +return x_14; } else { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; -x_14 = lean_array_uget(x_1, x_3); -x_15 = lean_ctor_get(x_4, 1); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 0); +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_15 = lean_array_uget(x_2, x_4); +x_16 = lean_ctor_get(x_5, 0); lean_inc(x_16); -x_17 = lean_ctor_get(x_14, 1); +x_17 = lean_ctor_get(x_15, 0); lean_inc(x_17); -lean_dec(x_14); -x_18 = !lean_is_exclusive(x_4); -if (x_18 == 0) +x_18 = lean_ctor_get(x_15, 1); +lean_inc(x_18); +lean_dec(x_15); +x_19 = !lean_is_exclusive(x_5); +if (x_19 == 0) { -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_19 = lean_ctor_get(x_4, 0); -x_20 = lean_ctor_get(x_4, 1); -lean_dec(x_20); -x_21 = lean_ctor_get(x_15, 0); -lean_inc(x_21); -x_22 = lean_ctor_get(x_15, 1); +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; +x_20 = lean_ctor_get(x_5, 1); +x_21 = lean_ctor_get(x_5, 0); +lean_dec(x_21); +x_22 = lean_ctor_get(x_16, 0); lean_inc(x_22); -x_23 = lean_ctor_get(x_15, 2); +x_23 = lean_ctor_get(x_16, 1); lean_inc(x_23); -x_24 = lean_nat_dec_lt(x_22, x_23); -if (x_24 == 0) +x_24 = lean_ctor_get(x_16, 2); +lean_inc(x_24); +x_25 = lean_nat_dec_lt(x_23, x_24); +if (x_25 == 0) { -lean_object* x_25; +lean_object* x_26; +lean_dec(x_24); lean_dec(x_23); lean_dec(x_22); -lean_dec(x_21); +lean_dec(x_18); lean_dec(x_17); -lean_dec(x_16); +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_5); -x_25 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_25, 0, x_4); -lean_ctor_set(x_25, 1, x_11); -return x_25; +lean_dec(x_1); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_5); +lean_ctor_set(x_26, 1, x_12); +return x_26; } else { -uint8_t x_26; -x_26 = !lean_is_exclusive(x_15); -if (x_26 == 0) +uint8_t x_27; +x_27 = !lean_is_exclusive(x_16); +if (x_27 == 0) { -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; uint8_t x_36; -x_27 = lean_ctor_get(x_15, 2); -lean_dec(x_27); -x_28 = lean_ctor_get(x_15, 1); +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; uint8_t x_37; +x_28 = lean_ctor_get(x_16, 2); lean_dec(x_28); -x_29 = lean_ctor_get(x_15, 0); +x_29 = lean_ctor_get(x_16, 1); lean_dec(x_29); -x_30 = lean_array_fget(x_21, x_22); -x_31 = lean_unsigned_to_nat(1u); -x_32 = lean_nat_add(x_22, x_31); -lean_dec(x_22); -lean_ctor_set(x_15, 1, x_32); -x_33 = lean_ctor_get(x_19, 0); -lean_inc(x_33); -x_34 = lean_ctor_get(x_19, 1); +x_30 = lean_ctor_get(x_16, 0); +lean_dec(x_30); +x_31 = lean_array_fget(x_22, x_23); +x_32 = lean_unsigned_to_nat(1u); +x_33 = lean_nat_add(x_23, x_32); +lean_dec(x_23); +lean_ctor_set(x_16, 1, x_33); +x_34 = lean_ctor_get(x_20, 0); lean_inc(x_34); -x_35 = lean_ctor_get(x_19, 2); +x_35 = lean_ctor_get(x_20, 1); lean_inc(x_35); -x_36 = lean_nat_dec_lt(x_34, x_35); -if (x_36 == 0) +x_36 = lean_ctor_get(x_20, 2); +lean_inc(x_36); +x_37 = lean_nat_dec_lt(x_35, x_36); +if (x_37 == 0) { -lean_object* x_37; +lean_object* x_38; +lean_dec(x_36); lean_dec(x_35); lean_dec(x_34); -lean_dec(x_33); -lean_dec(x_30); +lean_dec(x_31); +lean_dec(x_18); lean_dec(x_17); -lean_dec(x_16); +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_5); -x_37 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_37, 0, x_4); -lean_ctor_set(x_37, 1, x_11); -return x_37; +lean_dec(x_1); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_5); +lean_ctor_set(x_38, 1, x_12); +return x_38; } else { -uint8_t x_38; -x_38 = !lean_is_exclusive(x_19); -if (x_38 == 0) +uint8_t x_39; +x_39 = !lean_is_exclusive(x_20); +if (x_39 == 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; -x_39 = lean_ctor_get(x_19, 2); -lean_dec(x_39); -x_40 = lean_ctor_get(x_19, 1); +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_40 = lean_ctor_get(x_20, 2); lean_dec(x_40); -x_41 = lean_ctor_get(x_19, 0); +x_41 = lean_ctor_get(x_20, 1); lean_dec(x_41); -x_42 = lean_array_fget(x_33, x_34); -x_43 = lean_nat_add(x_34, x_31); -lean_dec(x_34); -lean_ctor_set(x_19, 1, x_43); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_42); -x_44 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(x_30, x_17, x_16, x_42, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_44) == 0) -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -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); -lean_inc(x_45); -x_47 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1___lambda__1), 9, 2); -lean_closure_set(x_47, 0, x_45); -lean_closure_set(x_47, 1, x_42); -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_48 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_45, x_47, x_5, x_6, x_7, x_8, x_9, x_10, x_46); -if (lean_obj_tag(x_48) == 0) -{ -lean_object* x_49; size_t x_50; size_t x_51; -x_49 = lean_ctor_get(x_48, 1); -lean_inc(x_49); -lean_dec(x_48); -x_50 = 1; -x_51 = lean_usize_add(x_3, x_50); -x_3 = x_51; -x_11 = x_49; -goto _start; -} -else -{ -uint8_t x_53; -lean_dec(x_19); -lean_dec(x_15); -lean_free_object(x_4); -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_53 = !lean_is_exclusive(x_48); -if (x_53 == 0) -{ -return x_48; -} -else -{ -lean_object* x_54; lean_object* x_55; lean_object* x_56; -x_54 = lean_ctor_get(x_48, 0); -x_55 = lean_ctor_get(x_48, 1); -lean_inc(x_55); -lean_inc(x_54); -lean_dec(x_48); -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; -} -} -} -else -{ -uint8_t x_57; -lean_dec(x_19); +x_42 = lean_ctor_get(x_20, 0); lean_dec(x_42); -lean_dec(x_15); -lean_free_object(x_4); -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_57 = !lean_is_exclusive(x_44); -if (x_57 == 0) -{ -return x_44; -} -else -{ -lean_object* x_58; lean_object* x_59; lean_object* x_60; -x_58 = lean_ctor_get(x_44, 0); -x_59 = lean_ctor_get(x_44, 1); -lean_inc(x_59); -lean_inc(x_58); -lean_dec(x_44); -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 -{ -lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; -lean_dec(x_19); -x_61 = lean_array_fget(x_33, x_34); -x_62 = lean_nat_add(x_34, x_31); -lean_dec(x_34); -x_63 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_63, 0, x_33); -lean_ctor_set(x_63, 1, x_62); -lean_ctor_set(x_63, 2, x_35); +x_43 = lean_array_fget(x_34, x_35); +x_44 = lean_nat_add(x_35, x_32); +lean_dec(x_35); +lean_ctor_set(x_20, 1, x_44); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_61); -x_64 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(x_30, x_17, x_16, x_61, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_64) == 0) +lean_inc(x_43); +lean_inc(x_1); +x_45 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(x_31, x_1, x_18, x_17, x_43, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_45) == 0) { -lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; -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); -lean_inc(x_65); -x_67 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1___lambda__1), 9, 2); -lean_closure_set(x_67, 0, x_65); -lean_closure_set(x_67, 1, x_61); +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +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); +lean_inc(x_46); +x_48 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1___lambda__1), 9, 2); +lean_closure_set(x_48, 0, x_46); +lean_closure_set(x_48, 1, x_43); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); -x_68 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_65, x_67, x_5, x_6, x_7, x_8, x_9, x_10, x_66); -if (lean_obj_tag(x_68) == 0) +x_49 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_46, x_48, x_6, x_7, x_8, x_9, x_10, x_11, x_47); +if (lean_obj_tag(x_49) == 0) { -lean_object* x_69; size_t x_70; size_t x_71; -x_69 = lean_ctor_get(x_68, 1); -lean_inc(x_69); -lean_dec(x_68); -lean_ctor_set(x_4, 0, x_63); -x_70 = 1; -x_71 = lean_usize_add(x_3, x_70); -x_3 = x_71; -x_11 = x_69; +lean_object* x_50; size_t x_51; size_t x_52; +x_50 = lean_ctor_get(x_49, 1); +lean_inc(x_50); +lean_dec(x_49); +x_51 = 1; +x_52 = lean_usize_add(x_4, x_51); +x_4 = x_52; +x_12 = x_50; goto _start; } else { -lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; -lean_dec(x_63); -lean_dec(x_15); -lean_free_object(x_4); +uint8_t x_54; +lean_dec(x_20); +lean_dec(x_16); +lean_free_object(x_5); +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_5); -x_73 = lean_ctor_get(x_68, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_68, 1); +lean_dec(x_1); +x_54 = !lean_is_exclusive(x_49); +if (x_54 == 0) +{ +return x_49; +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_49, 0); +x_56 = lean_ctor_get(x_49, 1); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_49); +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_55); +lean_ctor_set(x_57, 1, x_56); +return x_57; +} +} +} +else +{ +uint8_t x_58; +lean_dec(x_20); +lean_dec(x_43); +lean_dec(x_16); +lean_free_object(x_5); +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_1); +x_58 = !lean_is_exclusive(x_45); +if (x_58 == 0) +{ +return x_45; +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_59 = lean_ctor_get(x_45, 0); +x_60 = lean_ctor_get(x_45, 1); +lean_inc(x_60); +lean_inc(x_59); +lean_dec(x_45); +x_61 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_61, 0, x_59); +lean_ctor_set(x_61, 1, x_60); +return x_61; +} +} +} +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +lean_dec(x_20); +x_62 = lean_array_fget(x_34, x_35); +x_63 = lean_nat_add(x_35, x_32); +lean_dec(x_35); +x_64 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_64, 0, x_34); +lean_ctor_set(x_64, 1, x_63); +lean_ctor_set(x_64, 2, x_36); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_62); +lean_inc(x_1); +x_65 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(x_31, x_1, x_18, x_17, x_62, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_65) == 0) +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_66 = lean_ctor_get(x_65, 0); +lean_inc(x_66); +x_67 = lean_ctor_get(x_65, 1); +lean_inc(x_67); +lean_dec(x_65); +lean_inc(x_66); +x_68 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1___lambda__1), 9, 2); +lean_closure_set(x_68, 0, x_66); +lean_closure_set(x_68, 1, x_62); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_69 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_66, x_68, x_6, x_7, x_8, x_9, x_10, x_11, x_67); +if (lean_obj_tag(x_69) == 0) +{ +lean_object* x_70; size_t x_71; size_t x_72; +x_70 = lean_ctor_get(x_69, 1); +lean_inc(x_70); +lean_dec(x_69); +lean_ctor_set(x_5, 1, x_64); +x_71 = 1; +x_72 = lean_usize_add(x_4, x_71); +x_4 = x_72; +x_12 = x_70; +goto _start; +} +else +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; +lean_dec(x_64); +lean_dec(x_16); +lean_free_object(x_5); +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_1); +x_74 = lean_ctor_get(x_69, 0); lean_inc(x_74); -if (lean_is_exclusive(x_68)) { - lean_ctor_release(x_68, 0); - lean_ctor_release(x_68, 1); - x_75 = x_68; +x_75 = lean_ctor_get(x_69, 1); +lean_inc(x_75); +if (lean_is_exclusive(x_69)) { + lean_ctor_release(x_69, 0); + lean_ctor_release(x_69, 1); + x_76 = x_69; } else { - lean_dec_ref(x_68); - x_75 = lean_box(0); + lean_dec_ref(x_69); + x_76 = lean_box(0); } -if (lean_is_scalar(x_75)) { - x_76 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_76)) { + x_77 = lean_alloc_ctor(1, 2, 0); } else { - x_76 = x_75; + x_77 = x_76; } -lean_ctor_set(x_76, 0, x_73); -lean_ctor_set(x_76, 1, x_74); -return x_76; +lean_ctor_set(x_77, 0, x_74); +lean_ctor_set(x_77, 1, x_75); +return x_77; } } else { -lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; -lean_dec(x_63); -lean_dec(x_61); -lean_dec(x_15); -lean_free_object(x_4); +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; +lean_dec(x_64); +lean_dec(x_62); +lean_dec(x_16); +lean_free_object(x_5); +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_5); -x_77 = lean_ctor_get(x_64, 0); -lean_inc(x_77); -x_78 = lean_ctor_get(x_64, 1); +lean_dec(x_1); +x_78 = lean_ctor_get(x_65, 0); lean_inc(x_78); -if (lean_is_exclusive(x_64)) { - lean_ctor_release(x_64, 0); - lean_ctor_release(x_64, 1); - x_79 = x_64; +x_79 = lean_ctor_get(x_65, 1); +lean_inc(x_79); +if (lean_is_exclusive(x_65)) { + lean_ctor_release(x_65, 0); + lean_ctor_release(x_65, 1); + x_80 = x_65; } else { - lean_dec_ref(x_64); - x_79 = lean_box(0); + lean_dec_ref(x_65); + x_80 = lean_box(0); } -if (lean_is_scalar(x_79)) { - x_80 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(1, 2, 0); } else { - x_80 = x_79; + x_81 = x_80; } -lean_ctor_set(x_80, 0, x_77); -lean_ctor_set(x_80, 1, x_78); -return x_80; +lean_ctor_set(x_81, 0, x_78); +lean_ctor_set(x_81, 1, x_79); +return x_81; } } } } else { -lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; uint8_t x_88; -lean_dec(x_15); -x_81 = lean_array_fget(x_21, x_22); -x_82 = lean_unsigned_to_nat(1u); -x_83 = lean_nat_add(x_22, x_82); -lean_dec(x_22); -x_84 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_84, 0, x_21); -lean_ctor_set(x_84, 1, x_83); -lean_ctor_set(x_84, 2, x_23); -x_85 = lean_ctor_get(x_19, 0); -lean_inc(x_85); -x_86 = lean_ctor_get(x_19, 1); +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; uint8_t x_89; +lean_dec(x_16); +x_82 = lean_array_fget(x_22, x_23); +x_83 = lean_unsigned_to_nat(1u); +x_84 = lean_nat_add(x_23, x_83); +lean_dec(x_23); +x_85 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_85, 0, x_22); +lean_ctor_set(x_85, 1, x_84); +lean_ctor_set(x_85, 2, x_24); +x_86 = lean_ctor_get(x_20, 0); lean_inc(x_86); -x_87 = lean_ctor_get(x_19, 2); +x_87 = lean_ctor_get(x_20, 1); lean_inc(x_87); -x_88 = lean_nat_dec_lt(x_86, x_87); -if (x_88 == 0) +x_88 = lean_ctor_get(x_20, 2); +lean_inc(x_88); +x_89 = lean_nat_dec_lt(x_87, x_88); +if (x_89 == 0) { -lean_object* x_89; +lean_object* x_90; +lean_dec(x_88); lean_dec(x_87); lean_dec(x_86); -lean_dec(x_85); -lean_dec(x_81); +lean_dec(x_82); +lean_dec(x_18); lean_dec(x_17); -lean_dec(x_16); +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_5); -lean_ctor_set(x_4, 1, x_84); -x_89 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_89, 0, x_4); -lean_ctor_set(x_89, 1, x_11); -return x_89; +lean_dec(x_1); +lean_ctor_set(x_5, 0, x_85); +x_90 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_90, 0, x_5); +lean_ctor_set(x_90, 1, x_12); +return x_90; } else { -lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; -if (lean_is_exclusive(x_19)) { - lean_ctor_release(x_19, 0); - lean_ctor_release(x_19, 1); - lean_ctor_release(x_19, 2); - x_90 = x_19; +lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; +if (lean_is_exclusive(x_20)) { + lean_ctor_release(x_20, 0); + lean_ctor_release(x_20, 1); + lean_ctor_release(x_20, 2); + x_91 = x_20; } else { - lean_dec_ref(x_19); - x_90 = lean_box(0); + lean_dec_ref(x_20); + x_91 = lean_box(0); } -x_91 = lean_array_fget(x_85, x_86); -x_92 = lean_nat_add(x_86, x_82); -lean_dec(x_86); -if (lean_is_scalar(x_90)) { - x_93 = lean_alloc_ctor(0, 3, 0); +x_92 = lean_array_fget(x_86, x_87); +x_93 = lean_nat_add(x_87, x_83); +lean_dec(x_87); +if (lean_is_scalar(x_91)) { + x_94 = lean_alloc_ctor(0, 3, 0); } else { - x_93 = x_90; + x_94 = x_91; } -lean_ctor_set(x_93, 0, x_85); -lean_ctor_set(x_93, 1, x_92); -lean_ctor_set(x_93, 2, x_87); +lean_ctor_set(x_94, 0, x_86); +lean_ctor_set(x_94, 1, x_93); +lean_ctor_set(x_94, 2, x_88); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_91); -x_94 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(x_81, x_17, x_16, x_91, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_94) == 0) +lean_inc(x_92); +lean_inc(x_1); +x_95 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(x_82, x_1, x_18, x_17, x_92, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_95) == 0) { -lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; -x_95 = lean_ctor_get(x_94, 0); -lean_inc(x_95); -x_96 = lean_ctor_get(x_94, 1); +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_96 = lean_ctor_get(x_95, 0); lean_inc(x_96); -lean_dec(x_94); -lean_inc(x_95); -x_97 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1___lambda__1), 9, 2); -lean_closure_set(x_97, 0, x_95); -lean_closure_set(x_97, 1, x_91); +x_97 = lean_ctor_get(x_95, 1); +lean_inc(x_97); +lean_dec(x_95); +lean_inc(x_96); +x_98 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1___lambda__1), 9, 2); +lean_closure_set(x_98, 0, x_96); +lean_closure_set(x_98, 1, x_92); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); -x_98 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_95, x_97, x_5, x_6, x_7, x_8, x_9, x_10, x_96); -if (lean_obj_tag(x_98) == 0) +x_99 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_96, x_98, x_6, x_7, x_8, x_9, x_10, x_11, x_97); +if (lean_obj_tag(x_99) == 0) { -lean_object* x_99; size_t x_100; size_t x_101; -x_99 = lean_ctor_get(x_98, 1); -lean_inc(x_99); -lean_dec(x_98); -lean_ctor_set(x_4, 1, x_84); -lean_ctor_set(x_4, 0, x_93); -x_100 = 1; -x_101 = lean_usize_add(x_3, x_100); -x_3 = x_101; -x_11 = x_99; +lean_object* x_100; size_t x_101; size_t x_102; +x_100 = lean_ctor_get(x_99, 1); +lean_inc(x_100); +lean_dec(x_99); +lean_ctor_set(x_5, 1, x_94); +lean_ctor_set(x_5, 0, x_85); +x_101 = 1; +x_102 = lean_usize_add(x_4, x_101); +x_4 = x_102; +x_12 = x_100; goto _start; } else { -lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; -lean_dec(x_93); -lean_dec(x_84); -lean_free_object(x_4); +lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +lean_dec(x_94); +lean_dec(x_85); +lean_free_object(x_5); +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_5); -x_103 = lean_ctor_get(x_98, 0); -lean_inc(x_103); -x_104 = lean_ctor_get(x_98, 1); +lean_dec(x_1); +x_104 = lean_ctor_get(x_99, 0); lean_inc(x_104); -if (lean_is_exclusive(x_98)) { - lean_ctor_release(x_98, 0); - lean_ctor_release(x_98, 1); - x_105 = x_98; +x_105 = lean_ctor_get(x_99, 1); +lean_inc(x_105); +if (lean_is_exclusive(x_99)) { + lean_ctor_release(x_99, 0); + lean_ctor_release(x_99, 1); + x_106 = x_99; } else { - lean_dec_ref(x_98); - x_105 = lean_box(0); + lean_dec_ref(x_99); + x_106 = lean_box(0); } -if (lean_is_scalar(x_105)) { - x_106 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_106)) { + x_107 = lean_alloc_ctor(1, 2, 0); } else { - x_106 = x_105; + x_107 = x_106; } -lean_ctor_set(x_106, 0, x_103); -lean_ctor_set(x_106, 1, x_104); -return x_106; +lean_ctor_set(x_107, 0, x_104); +lean_ctor_set(x_107, 1, x_105); +return x_107; } } else { -lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; -lean_dec(x_93); -lean_dec(x_91); -lean_dec(x_84); -lean_free_object(x_4); +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +lean_dec(x_94); +lean_dec(x_92); +lean_dec(x_85); +lean_free_object(x_5); +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_5); -x_107 = lean_ctor_get(x_94, 0); -lean_inc(x_107); -x_108 = lean_ctor_get(x_94, 1); +lean_dec(x_1); +x_108 = lean_ctor_get(x_95, 0); lean_inc(x_108); -if (lean_is_exclusive(x_94)) { - lean_ctor_release(x_94, 0); - lean_ctor_release(x_94, 1); - x_109 = x_94; +x_109 = lean_ctor_get(x_95, 1); +lean_inc(x_109); +if (lean_is_exclusive(x_95)) { + lean_ctor_release(x_95, 0); + lean_ctor_release(x_95, 1); + x_110 = x_95; } else { - lean_dec_ref(x_94); - x_109 = lean_box(0); + lean_dec_ref(x_95); + x_110 = lean_box(0); } -if (lean_is_scalar(x_109)) { - x_110 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_110)) { + x_111 = lean_alloc_ctor(1, 2, 0); } else { - x_110 = x_109; + x_111 = x_110; } -lean_ctor_set(x_110, 0, x_107); -lean_ctor_set(x_110, 1, x_108); -return x_110; +lean_ctor_set(x_111, 0, x_108); +lean_ctor_set(x_111, 1, x_109); +return x_111; } } } @@ -1749,224 +3514,229 @@ return x_110; } else { -lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; uint8_t x_115; -x_111 = lean_ctor_get(x_4, 0); -lean_inc(x_111); -lean_dec(x_4); -x_112 = lean_ctor_get(x_15, 0); +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; uint8_t x_116; +x_112 = lean_ctor_get(x_5, 1); lean_inc(x_112); -x_113 = lean_ctor_get(x_15, 1); +lean_dec(x_5); +x_113 = lean_ctor_get(x_16, 0); lean_inc(x_113); -x_114 = lean_ctor_get(x_15, 2); +x_114 = lean_ctor_get(x_16, 1); lean_inc(x_114); -x_115 = lean_nat_dec_lt(x_113, x_114); -if (x_115 == 0) +x_115 = lean_ctor_get(x_16, 2); +lean_inc(x_115); +x_116 = lean_nat_dec_lt(x_114, x_115); +if (x_116 == 0) { -lean_object* x_116; lean_object* x_117; +lean_object* x_117; lean_object* x_118; +lean_dec(x_115); lean_dec(x_114); lean_dec(x_113); -lean_dec(x_112); +lean_dec(x_18); lean_dec(x_17); -lean_dec(x_16); +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_5); -x_116 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_116, 0, x_111); -lean_ctor_set(x_116, 1, x_15); +lean_dec(x_1); x_117 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_117, 0, x_116); -lean_ctor_set(x_117, 1, x_11); -return x_117; +lean_ctor_set(x_117, 0, x_16); +lean_ctor_set(x_117, 1, x_112); +x_118 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_118, 0, x_117); +lean_ctor_set(x_118, 1, x_12); +return x_118; } else { -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; uint8_t x_126; -if (lean_is_exclusive(x_15)) { - lean_ctor_release(x_15, 0); - lean_ctor_release(x_15, 1); - lean_ctor_release(x_15, 2); - x_118 = x_15; +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; uint8_t x_127; +if (lean_is_exclusive(x_16)) { + lean_ctor_release(x_16, 0); + lean_ctor_release(x_16, 1); + lean_ctor_release(x_16, 2); + x_119 = x_16; } else { - lean_dec_ref(x_15); - x_118 = lean_box(0); + lean_dec_ref(x_16); + x_119 = lean_box(0); } -x_119 = lean_array_fget(x_112, x_113); -x_120 = lean_unsigned_to_nat(1u); -x_121 = lean_nat_add(x_113, x_120); -lean_dec(x_113); -if (lean_is_scalar(x_118)) { - x_122 = lean_alloc_ctor(0, 3, 0); +x_120 = lean_array_fget(x_113, x_114); +x_121 = lean_unsigned_to_nat(1u); +x_122 = lean_nat_add(x_114, x_121); +lean_dec(x_114); +if (lean_is_scalar(x_119)) { + x_123 = lean_alloc_ctor(0, 3, 0); } else { - x_122 = x_118; + x_123 = x_119; } -lean_ctor_set(x_122, 0, x_112); -lean_ctor_set(x_122, 1, x_121); -lean_ctor_set(x_122, 2, x_114); -x_123 = lean_ctor_get(x_111, 0); -lean_inc(x_123); -x_124 = lean_ctor_get(x_111, 1); +lean_ctor_set(x_123, 0, x_113); +lean_ctor_set(x_123, 1, x_122); +lean_ctor_set(x_123, 2, x_115); +x_124 = lean_ctor_get(x_112, 0); lean_inc(x_124); -x_125 = lean_ctor_get(x_111, 2); +x_125 = lean_ctor_get(x_112, 1); lean_inc(x_125); -x_126 = lean_nat_dec_lt(x_124, x_125); -if (x_126 == 0) +x_126 = lean_ctor_get(x_112, 2); +lean_inc(x_126); +x_127 = lean_nat_dec_lt(x_125, x_126); +if (x_127 == 0) { -lean_object* x_127; lean_object* x_128; +lean_object* x_128; lean_object* x_129; +lean_dec(x_126); lean_dec(x_125); lean_dec(x_124); -lean_dec(x_123); -lean_dec(x_119); +lean_dec(x_120); +lean_dec(x_18); lean_dec(x_17); -lean_dec(x_16); +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_5); -x_127 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_127, 0, x_111); -lean_ctor_set(x_127, 1, x_122); +lean_dec(x_1); x_128 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_128, 0, x_127); -lean_ctor_set(x_128, 1, x_11); -return x_128; +lean_ctor_set(x_128, 0, x_123); +lean_ctor_set(x_128, 1, x_112); +x_129 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_129, 0, x_128); +lean_ctor_set(x_129, 1, x_12); +return x_129; } else { -lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; -if (lean_is_exclusive(x_111)) { - lean_ctor_release(x_111, 0); - lean_ctor_release(x_111, 1); - lean_ctor_release(x_111, 2); - x_129 = x_111; +lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; +if (lean_is_exclusive(x_112)) { + lean_ctor_release(x_112, 0); + lean_ctor_release(x_112, 1); + lean_ctor_release(x_112, 2); + x_130 = x_112; } else { - lean_dec_ref(x_111); - x_129 = lean_box(0); + lean_dec_ref(x_112); + x_130 = lean_box(0); } -x_130 = lean_array_fget(x_123, x_124); -x_131 = lean_nat_add(x_124, x_120); -lean_dec(x_124); -if (lean_is_scalar(x_129)) { - x_132 = lean_alloc_ctor(0, 3, 0); +x_131 = lean_array_fget(x_124, x_125); +x_132 = lean_nat_add(x_125, x_121); +lean_dec(x_125); +if (lean_is_scalar(x_130)) { + x_133 = lean_alloc_ctor(0, 3, 0); } else { - x_132 = x_129; + x_133 = x_130; } -lean_ctor_set(x_132, 0, x_123); -lean_ctor_set(x_132, 1, x_131); -lean_ctor_set(x_132, 2, x_125); +lean_ctor_set(x_133, 0, x_124); +lean_ctor_set(x_133, 1, x_132); +lean_ctor_set(x_133, 2, x_126); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_130); -x_133 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(x_119, x_17, x_16, x_130, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_133) == 0) +lean_inc(x_131); +lean_inc(x_1); +x_134 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary(x_120, x_1, x_18, x_17, x_131, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_134) == 0) { -lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; -x_134 = lean_ctor_get(x_133, 0); -lean_inc(x_134); -x_135 = lean_ctor_get(x_133, 1); +lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; +x_135 = lean_ctor_get(x_134, 0); lean_inc(x_135); -lean_dec(x_133); -lean_inc(x_134); -x_136 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1___lambda__1), 9, 2); -lean_closure_set(x_136, 0, x_134); -lean_closure_set(x_136, 1, x_130); +x_136 = lean_ctor_get(x_134, 1); +lean_inc(x_136); +lean_dec(x_134); +lean_inc(x_135); +x_137 = lean_alloc_closure((void*)(l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1___lambda__1), 9, 2); +lean_closure_set(x_137, 0, x_135); +lean_closure_set(x_137, 1, x_131); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); -x_137 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_134, x_136, x_5, x_6, x_7, x_8, x_9, x_10, x_135); -if (lean_obj_tag(x_137) == 0) +x_138 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_135, x_137, x_6, x_7, x_8, x_9, x_10, x_11, x_136); +if (lean_obj_tag(x_138) == 0) { -lean_object* x_138; lean_object* x_139; size_t x_140; size_t x_141; -x_138 = lean_ctor_get(x_137, 1); -lean_inc(x_138); -lean_dec(x_137); -x_139 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_139, 0, x_132); -lean_ctor_set(x_139, 1, x_122); -x_140 = 1; -x_141 = lean_usize_add(x_3, x_140); -x_3 = x_141; -x_4 = x_139; -x_11 = x_138; +lean_object* x_139; lean_object* x_140; size_t x_141; size_t x_142; +x_139 = lean_ctor_get(x_138, 1); +lean_inc(x_139); +lean_dec(x_138); +x_140 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_140, 0, x_123); +lean_ctor_set(x_140, 1, x_133); +x_141 = 1; +x_142 = lean_usize_add(x_4, x_141); +x_4 = x_142; +x_5 = x_140; +x_12 = x_139; goto _start; } else { -lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; -lean_dec(x_132); -lean_dec(x_122); +lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; +lean_dec(x_133); +lean_dec(x_123); +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_5); -x_143 = lean_ctor_get(x_137, 0); -lean_inc(x_143); -x_144 = lean_ctor_get(x_137, 1); +lean_dec(x_1); +x_144 = lean_ctor_get(x_138, 0); lean_inc(x_144); -if (lean_is_exclusive(x_137)) { - lean_ctor_release(x_137, 0); - lean_ctor_release(x_137, 1); - x_145 = x_137; +x_145 = lean_ctor_get(x_138, 1); +lean_inc(x_145); +if (lean_is_exclusive(x_138)) { + lean_ctor_release(x_138, 0); + lean_ctor_release(x_138, 1); + x_146 = x_138; } else { - lean_dec_ref(x_137); - x_145 = lean_box(0); + lean_dec_ref(x_138); + x_146 = lean_box(0); } -if (lean_is_scalar(x_145)) { - x_146 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_146)) { + x_147 = lean_alloc_ctor(1, 2, 0); } else { - x_146 = x_145; + x_147 = x_146; } -lean_ctor_set(x_146, 0, x_143); -lean_ctor_set(x_146, 1, x_144); -return x_146; +lean_ctor_set(x_147, 0, x_144); +lean_ctor_set(x_147, 1, x_145); +return x_147; } } else { -lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; -lean_dec(x_132); -lean_dec(x_130); -lean_dec(x_122); +lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; +lean_dec(x_133); +lean_dec(x_131); +lean_dec(x_123); +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_5); -x_147 = lean_ctor_get(x_133, 0); -lean_inc(x_147); -x_148 = lean_ctor_get(x_133, 1); +lean_dec(x_1); +x_148 = lean_ctor_get(x_134, 0); lean_inc(x_148); -if (lean_is_exclusive(x_133)) { - lean_ctor_release(x_133, 0); - lean_ctor_release(x_133, 1); - x_149 = x_133; +x_149 = lean_ctor_get(x_134, 1); +lean_inc(x_149); +if (lean_is_exclusive(x_134)) { + lean_ctor_release(x_134, 0); + lean_ctor_release(x_134, 1); + x_150 = x_134; } else { - lean_dec_ref(x_133); - x_149 = lean_box(0); + lean_dec_ref(x_134); + x_150 = lean_box(0); } -if (lean_is_scalar(x_149)) { - x_150 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_150)) { + x_151 = lean_alloc_ctor(1, 2, 0); } else { - x_150 = x_149; + x_151 = x_150; } -lean_ctor_set(x_150, 0, x_147); -lean_ctor_set(x_150, 1, x_148); -return x_150; +lean_ctor_set(x_151, 0, x_148); +lean_ctor_set(x_151, 1, x_149); +return x_151; } } } @@ -2126,410 +3896,416 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { -uint8_t x_12; -x_12 = !lean_is_exclusive(x_9); -if (x_12 == 0) +uint8_t x_13; +x_13 = !lean_is_exclusive(x_10); +if (x_13 == 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; -x_13 = lean_ctor_get(x_9, 3); -x_14 = l_Lean_replaceRef(x_1, x_13); -lean_dec(x_13); -lean_ctor_set(x_9, 3, x_14); -x_15 = lean_box(0); -lean_inc(x_7); -x_16 = l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(x_2, x_15, 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_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_10, 3); +x_15 = l_Lean_replaceRef(x_1, x_14); +lean_dec(x_14); +lean_ctor_set(x_10, 3, x_15); +x_16 = lean_box(0); +lean_inc(x_8); +x_17 = l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(x_2, x_16, x_8, x_9, x_10, x_11, x_12); +x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); -lean_dec(x_16); -x_19 = l_Lean_Expr_mvarId_x21(x_17); -lean_dec(x_17); -x_20 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__2; -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -x_21 = l_Lean_Meta_mkConstWithFreshMVarLevels(x_20, x_7, x_8, x_9, x_10, x_18); -if (lean_obj_tag(x_21) == 0) -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; -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); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); +x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); -x_24 = l_Lean_Meta_apply(x_19, x_22, x_7, x_8, x_9, x_10, x_23); -if (lean_obj_tag(x_24) == 0) +lean_dec(x_17); +x_20 = l_Lean_Expr_mvarId_x21(x_18); +lean_dec(x_18); +x_21 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__2; +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_22 = l_Lean_Meta_mkConstWithFreshMVarLevels(x_21, x_8, x_9, x_10, x_11, x_19); +if (lean_obj_tag(x_22) == 0) { -lean_object* x_25; -x_25 = lean_ctor_get(x_24, 0); -lean_inc(x_25); +lean_object* x_23; lean_object* x_24; lean_object* x_25; +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); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_20); +x_25 = l_Lean_Meta_apply(x_20, x_23, x_8, x_9, x_10, x_11, x_24); if (lean_obj_tag(x_25) == 0) { -lean_object* x_26; lean_object* x_27; lean_object* x_28; -lean_dec(x_19); -lean_dec(x_4); -lean_dec(x_3); -x_26 = lean_ctor_get(x_24, 1); +lean_object* x_26; +x_26 = lean_ctor_get(x_25, 0); lean_inc(x_26); -lean_dec(x_24); -x_27 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; -x_28 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_27, x_5, x_6, x_7, x_8, x_9, x_10, x_26); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +lean_dec(x_20); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +x_28 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; +x_29 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_28, x_6, x_7, x_8, x_9, x_10, x_11, x_27); +lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); -lean_dec(x_6); -return x_28; +return x_29; } else { -lean_object* x_29; -x_29 = lean_ctor_get(x_25, 1); -lean_inc(x_29); -if (lean_obj_tag(x_29) == 0) -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; -lean_dec(x_25); -lean_dec(x_19); -lean_dec(x_4); -lean_dec(x_3); -x_30 = lean_ctor_get(x_24, 1); +lean_object* x_30; +x_30 = lean_ctor_get(x_26, 1); lean_inc(x_30); -lean_dec(x_24); -x_31 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; -x_32 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_31, x_5, x_6, x_7, x_8, x_9, x_10, x_30); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -return x_32; -} -else +if (lean_obj_tag(x_30) == 0) { -lean_object* x_33; -x_33 = lean_ctor_get(x_29, 1); -lean_inc(x_33); -if (lean_obj_tag(x_33) == 0) -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_29); -lean_dec(x_25); -lean_dec(x_19); +lean_object* x_31; lean_object* x_32; lean_object* x_33; +lean_dec(x_26); +lean_dec(x_20); +lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -x_34 = lean_ctor_get(x_24, 1); -lean_inc(x_34); -lean_dec(x_24); -x_35 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; -x_36 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_35, x_5, x_6, x_7, x_8, x_9, x_10, x_34); +x_31 = lean_ctor_get(x_25, 1); +lean_inc(x_31); +lean_dec(x_25); +x_32 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; +x_33 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_32, x_6, x_7, x_8, x_9, x_10, x_11, x_31); +lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); -lean_dec(x_6); -return x_36; +return x_33; } else { -lean_object* x_37; -x_37 = lean_ctor_get(x_33, 1); -lean_inc(x_37); -lean_dec(x_33); -if (lean_obj_tag(x_37) == 0) +lean_object* x_34; +x_34 = lean_ctor_get(x_30, 1); +lean_inc(x_34); +if (lean_obj_tag(x_34) == 0) { -lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; lean_object* x_42; -x_38 = lean_ctor_get(x_24, 1); +lean_object* x_35; lean_object* x_36; lean_object* x_37; +lean_dec(x_30); +lean_dec(x_26); +lean_dec(x_20); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_35 = lean_ctor_get(x_25, 1); +lean_inc(x_35); +lean_dec(x_25); +x_36 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; +x_37 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_36, x_6, x_7, x_8, x_9, x_10, x_11, x_35); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +return x_37; +} +else +{ +lean_object* x_38; +x_38 = lean_ctor_get(x_34, 1); lean_inc(x_38); -lean_dec(x_24); -x_39 = lean_ctor_get(x_25, 0); +lean_dec(x_34); +if (lean_obj_tag(x_38) == 0) +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; lean_object* x_43; +x_39 = lean_ctor_get(x_25, 1); lean_inc(x_39); lean_dec(x_25); -x_40 = lean_ctor_get(x_29, 0); +x_40 = lean_ctor_get(x_26, 0); lean_inc(x_40); -lean_dec(x_29); -x_41 = 0; +lean_dec(x_26); +x_41 = lean_ctor_get(x_30, 0); +lean_inc(x_41); +lean_dec(x_30); +x_42 = 0; +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); -lean_inc(x_7); -x_42 = l_Lean_Meta_intro1Core(x_39, x_41, x_7, x_8, x_9, x_10, x_38); -if (lean_obj_tag(x_42) == 0) +x_43 = l_Lean_Meta_intro1Core(x_40, x_42, x_8, x_9, x_10, x_11, x_39); +if (lean_obj_tag(x_43) == 0) { -lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_43 = lean_ctor_get(x_42, 0); -lean_inc(x_43); -x_44 = lean_ctor_get(x_42, 1); +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_44 = lean_ctor_get(x_43, 0); lean_inc(x_44); -lean_dec(x_42); -x_45 = lean_ctor_get(x_43, 0); +x_45 = lean_ctor_get(x_43, 1); lean_inc(x_45); -x_46 = lean_ctor_get(x_43, 1); -lean_inc(x_46); lean_dec(x_43); +x_46 = lean_ctor_get(x_44, 0); +lean_inc(x_46); +x_47 = lean_ctor_get(x_44, 1); +lean_inc(x_47); +lean_dec(x_44); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); lean_inc(x_3); -x_47 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual(x_3, x_46, x_45, x_5, x_6, x_7, x_8, x_9, x_10, x_44); -if (lean_obj_tag(x_47) == 0) +x_48 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual(x_3, x_47, x_46, x_6, x_7, x_8, x_9, x_10, x_11, x_45); +if (lean_obj_tag(x_48) == 0) { -lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; size_t x_57; size_t x_58; lean_object* x_59; -x_48 = lean_ctor_get(x_47, 0); -lean_inc(x_48); -x_49 = lean_ctor_get(x_47, 1); +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; size_t x_58; size_t x_59; lean_object* x_60; +x_49 = lean_ctor_get(x_48, 0); lean_inc(x_49); -lean_dec(x_47); -x_50 = lean_array_get_size(x_4); -x_51 = lean_unsigned_to_nat(0u); -x_52 = l_Array_toSubarray___rarg(x_4, x_51, x_50); -x_53 = lean_array_get_size(x_3); -x_54 = l_Array_toSubarray___rarg(x_3, x_51, x_53); -x_55 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_55, 0, x_52); -lean_ctor_set(x_55, 1, x_54); -x_56 = lean_array_get_size(x_48); -x_57 = lean_usize_of_nat(x_56); -lean_dec(x_56); -x_58 = 0; -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -x_59 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1(x_48, x_57, x_58, x_55, x_5, x_6, x_7, x_8, x_9, x_10, x_49); +x_50 = lean_ctor_get(x_48, 1); +lean_inc(x_50); lean_dec(x_48); -if (lean_obj_tag(x_59) == 0) -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_60 = lean_ctor_get(x_59, 1); -lean_inc(x_60); -lean_dec(x_59); -lean_inc(x_40); -x_61 = l_Lean_mkMVar(x_40); +x_51 = lean_array_get_size(x_4); +x_52 = lean_unsigned_to_nat(0u); +x_53 = l_Array_toSubarray___rarg(x_4, x_52, x_51); +x_54 = lean_array_get_size(x_3); +x_55 = l_Array_toSubarray___rarg(x_3, x_52, x_54); +x_56 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_56, 0, x_55); +lean_ctor_set(x_56, 1, x_53); +x_57 = lean_array_get_size(x_49); +x_58 = lean_usize_of_nat(x_57); +lean_dec(x_57); +x_59 = 0; +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); -lean_inc(x_7); -x_62 = lean_infer_type(x_61, x_7, x_8, x_9, x_10, x_60); -if (lean_obj_tag(x_62) == 0) +x_60 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1(x_5, x_49, x_58, x_59, x_56, x_6, x_7, x_8, x_9, x_10, x_11, x_50); +lean_dec(x_49); +if (lean_obj_tag(x_60) == 0) { -lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_63 = lean_ctor_get(x_62, 0); -lean_inc(x_63); -x_64 = lean_ctor_get(x_62, 1); +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_60, 1); +lean_inc(x_61); +lean_dec(x_60); +lean_inc(x_41); +x_62 = l_Lean_mkMVar(x_41); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_63 = lean_infer_type(x_62, x_8, x_9, x_10, x_11, x_61); +if (lean_obj_tag(x_63) == 0) +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_64 = lean_ctor_get(x_63, 0); lean_inc(x_64); -lean_dec(x_62); -x_65 = lean_box(0); +x_65 = lean_ctor_get(x_63, 1); +lean_inc(x_65); +lean_dec(x_63); +x_66 = lean_box(0); +lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); -lean_inc(x_7); -x_66 = l_Lean_Meta_synthInstance(x_63, x_65, x_7, x_8, x_9, x_10, x_64); -if (lean_obj_tag(x_66) == 0) +x_67 = l_Lean_Meta_synthInstance(x_64, x_66, x_8, x_9, x_10, x_11, x_65); +if (lean_obj_tag(x_67) == 0) { -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_67 = lean_ctor_get(x_66, 0); -lean_inc(x_67); -x_68 = lean_ctor_get(x_66, 1); +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_68 = lean_ctor_get(x_67, 0); lean_inc(x_68); -lean_dec(x_66); -x_69 = l_Lean_Meta_assignExprMVar(x_40, x_67, x_7, x_8, x_9, x_10, x_68); -x_70 = lean_ctor_get(x_69, 1); -lean_inc(x_70); -lean_dec(x_69); -x_71 = l_Lean_mkMVar(x_19); -x_72 = l_Lean_Meta_instantiateMVars(x_71, x_7, x_8, x_9, x_10, x_70); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_7); -return x_72; -} -else -{ -uint8_t x_73; -lean_dec(x_40); -lean_dec(x_19); -lean_dec(x_9); +x_69 = lean_ctor_get(x_67, 1); +lean_inc(x_69); +lean_dec(x_67); +x_70 = l_Lean_Meta_assignExprMVar(x_41, x_68, x_8, x_9, x_10, x_11, x_69); +x_71 = lean_ctor_get(x_70, 1); +lean_inc(x_71); +lean_dec(x_70); +x_72 = l_Lean_mkMVar(x_20); +x_73 = l_Lean_Meta_instantiateMVars(x_72, x_8, x_9, x_10, x_11, x_71); +lean_dec(x_11); lean_dec(x_10); lean_dec(x_8); -lean_dec(x_7); -x_73 = !lean_is_exclusive(x_66); -if (x_73 == 0) -{ -return x_66; +return x_73; } else { -lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_74 = lean_ctor_get(x_66, 0); -x_75 = lean_ctor_get(x_66, 1); +uint8_t x_74; +lean_dec(x_41); +lean_dec(x_20); +lean_dec(x_10); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +x_74 = !lean_is_exclusive(x_67); +if (x_74 == 0) +{ +return x_67; +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_75 = lean_ctor_get(x_67, 0); +x_76 = lean_ctor_get(x_67, 1); +lean_inc(x_76); lean_inc(x_75); -lean_inc(x_74); -lean_dec(x_66); -x_76 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_76, 0, x_74); -lean_ctor_set(x_76, 1, x_75); -return x_76; +lean_dec(x_67); +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; } } } else { -uint8_t x_77; -lean_dec(x_40); -lean_dec(x_19); -lean_dec(x_9); +uint8_t x_78; +lean_dec(x_41); +lean_dec(x_20); lean_dec(x_10); +lean_dec(x_11); +lean_dec(x_9); lean_dec(x_8); -lean_dec(x_7); -x_77 = !lean_is_exclusive(x_62); -if (x_77 == 0) +x_78 = !lean_is_exclusive(x_63); +if (x_78 == 0) { -return x_62; +return x_63; } else { -lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_78 = lean_ctor_get(x_62, 0); -x_79 = lean_ctor_get(x_62, 1); +lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_79 = lean_ctor_get(x_63, 0); +x_80 = lean_ctor_get(x_63, 1); +lean_inc(x_80); lean_inc(x_79); -lean_inc(x_78); -lean_dec(x_62); -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_dec(x_63); +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; } } } else { -uint8_t x_81; -lean_dec(x_40); -lean_dec(x_19); -lean_dec(x_9); +uint8_t x_82; +lean_dec(x_41); +lean_dec(x_20); lean_dec(x_10); +lean_dec(x_11); +lean_dec(x_9); lean_dec(x_8); -lean_dec(x_7); -x_81 = !lean_is_exclusive(x_59); -if (x_81 == 0) +x_82 = !lean_is_exclusive(x_60); +if (x_82 == 0) { -return x_59; +return x_60; } else { -lean_object* x_82; lean_object* x_83; lean_object* x_84; -x_82 = lean_ctor_get(x_59, 0); -x_83 = lean_ctor_get(x_59, 1); +lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_83 = lean_ctor_get(x_60, 0); +x_84 = lean_ctor_get(x_60, 1); +lean_inc(x_84); lean_inc(x_83); -lean_inc(x_82); -lean_dec(x_59); -x_84 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_84, 0, x_82); -lean_ctor_set(x_84, 1, x_83); -return x_84; +lean_dec(x_60); +x_85 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_85, 0, x_83); +lean_ctor_set(x_85, 1, x_84); +return x_85; } } } else { -uint8_t x_85; -lean_dec(x_40); -lean_dec(x_19); -lean_dec(x_9); +uint8_t x_86; +lean_dec(x_41); +lean_dec(x_20); lean_dec(x_10); +lean_dec(x_11); +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); -x_85 = !lean_is_exclusive(x_47); -if (x_85 == 0) +x_86 = !lean_is_exclusive(x_48); +if (x_86 == 0) { -return x_47; +return x_48; } else { -lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_86 = lean_ctor_get(x_47, 0); -x_87 = lean_ctor_get(x_47, 1); +lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_87 = lean_ctor_get(x_48, 0); +x_88 = lean_ctor_get(x_48, 1); +lean_inc(x_88); lean_inc(x_87); -lean_inc(x_86); -lean_dec(x_47); -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; +lean_dec(x_48); +x_89 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_89, 0, x_87); +lean_ctor_set(x_89, 1, x_88); +return x_89; } } } else { -uint8_t x_89; -lean_dec(x_40); -lean_dec(x_19); -lean_dec(x_9); +uint8_t x_90; +lean_dec(x_41); +lean_dec(x_20); lean_dec(x_10); +lean_dec(x_11); +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); -x_89 = !lean_is_exclusive(x_42); -if (x_89 == 0) +x_90 = !lean_is_exclusive(x_43); +if (x_90 == 0) { -return x_42; +return x_43; } else { -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_42, 0); -x_91 = lean_ctor_get(x_42, 1); +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_43, 0); +x_92 = lean_ctor_get(x_43, 1); +lean_inc(x_92); lean_inc(x_91); -lean_inc(x_90); -lean_dec(x_42); -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; +lean_dec(x_43); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; } } } else { -lean_object* x_93; lean_object* x_94; lean_object* x_95; -lean_dec(x_37); -lean_dec(x_29); +lean_object* x_94; lean_object* x_95; lean_object* x_96; +lean_dec(x_38); +lean_dec(x_30); +lean_dec(x_26); +lean_dec(x_20); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_94 = lean_ctor_get(x_25, 1); +lean_inc(x_94); lean_dec(x_25); -lean_dec(x_19); -lean_dec(x_4); -lean_dec(x_3); -x_93 = lean_ctor_get(x_24, 1); -lean_inc(x_93); -lean_dec(x_24); -x_94 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; -x_95 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_94, x_5, x_6, x_7, x_8, x_9, x_10, x_93); +x_95 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; +x_96 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_95, x_6, x_7, x_8, x_9, x_10, x_11, x_94); +lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); -lean_dec(x_6); -return x_95; +return x_96; } } } @@ -2537,79 +4313,82 @@ return x_95; } else { -uint8_t x_96; -lean_dec(x_19); -lean_dec(x_9); +uint8_t x_97; +lean_dec(x_20); lean_dec(x_10); +lean_dec(x_11); +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); -x_96 = !lean_is_exclusive(x_24); -if (x_96 == 0) +x_97 = !lean_is_exclusive(x_25); +if (x_97 == 0) { -return x_24; +return x_25; } else { -lean_object* x_97; lean_object* x_98; lean_object* x_99; -x_97 = lean_ctor_get(x_24, 0); -x_98 = lean_ctor_get(x_24, 1); +lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_98 = lean_ctor_get(x_25, 0); +x_99 = lean_ctor_get(x_25, 1); +lean_inc(x_99); lean_inc(x_98); -lean_inc(x_97); -lean_dec(x_24); -x_99 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_99, 0, x_97); -lean_ctor_set(x_99, 1, x_98); -return x_99; +lean_dec(x_25); +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_98); +lean_ctor_set(x_100, 1, x_99); +return x_100; } } } else { -uint8_t x_100; -lean_dec(x_19); -lean_dec(x_9); +uint8_t x_101; +lean_dec(x_20); lean_dec(x_10); +lean_dec(x_11); +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); -x_100 = !lean_is_exclusive(x_21); -if (x_100 == 0) +x_101 = !lean_is_exclusive(x_22); +if (x_101 == 0) { -return x_21; +return x_22; } else { -lean_object* x_101; lean_object* x_102; lean_object* x_103; -x_101 = lean_ctor_get(x_21, 0); -x_102 = lean_ctor_get(x_21, 1); +lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_102 = lean_ctor_get(x_22, 0); +x_103 = lean_ctor_get(x_22, 1); +lean_inc(x_103); lean_inc(x_102); -lean_inc(x_101); -lean_dec(x_21); -x_103 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_103, 0, x_101); -lean_ctor_set(x_103, 1, x_102); -return x_103; +lean_dec(x_22); +x_104 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_104, 0, x_102); +lean_ctor_set(x_104, 1, x_103); +return x_104; } } } else { -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; -x_104 = lean_ctor_get(x_9, 0); -x_105 = lean_ctor_get(x_9, 1); -x_106 = lean_ctor_get(x_9, 2); -x_107 = lean_ctor_get(x_9, 3); -x_108 = lean_ctor_get(x_9, 4); -x_109 = lean_ctor_get(x_9, 5); -x_110 = lean_ctor_get(x_9, 6); -x_111 = lean_ctor_get(x_9, 7); +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; +x_105 = lean_ctor_get(x_10, 0); +x_106 = lean_ctor_get(x_10, 1); +x_107 = lean_ctor_get(x_10, 2); +x_108 = lean_ctor_get(x_10, 3); +x_109 = lean_ctor_get(x_10, 4); +x_110 = lean_ctor_get(x_10, 5); +x_111 = lean_ctor_get(x_10, 6); +x_112 = lean_ctor_get(x_10, 7); +lean_inc(x_112); lean_inc(x_111); lean_inc(x_110); lean_inc(x_109); @@ -2617,421 +4396,426 @@ lean_inc(x_108); lean_inc(x_107); lean_inc(x_106); lean_inc(x_105); -lean_inc(x_104); -lean_dec(x_9); -x_112 = l_Lean_replaceRef(x_1, x_107); -lean_dec(x_107); -x_113 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_113, 0, x_104); -lean_ctor_set(x_113, 1, x_105); -lean_ctor_set(x_113, 2, x_106); -lean_ctor_set(x_113, 3, x_112); -lean_ctor_set(x_113, 4, x_108); -lean_ctor_set(x_113, 5, x_109); -lean_ctor_set(x_113, 6, x_110); -lean_ctor_set(x_113, 7, x_111); -x_114 = lean_box(0); -lean_inc(x_7); -x_115 = l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(x_2, x_114, x_7, x_8, x_113, x_10, x_11); -x_116 = lean_ctor_get(x_115, 0); -lean_inc(x_116); -x_117 = lean_ctor_get(x_115, 1); +lean_dec(x_10); +x_113 = l_Lean_replaceRef(x_1, x_108); +lean_dec(x_108); +x_114 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_114, 0, x_105); +lean_ctor_set(x_114, 1, x_106); +lean_ctor_set(x_114, 2, x_107); +lean_ctor_set(x_114, 3, x_113); +lean_ctor_set(x_114, 4, x_109); +lean_ctor_set(x_114, 5, x_110); +lean_ctor_set(x_114, 6, x_111); +lean_ctor_set(x_114, 7, x_112); +x_115 = lean_box(0); +lean_inc(x_8); +x_116 = l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(x_2, x_115, x_8, x_9, x_114, x_11, x_12); +x_117 = lean_ctor_get(x_116, 0); lean_inc(x_117); -lean_dec(x_115); -x_118 = l_Lean_Expr_mvarId_x21(x_116); -lean_dec(x_116); -x_119 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__2; -lean_inc(x_10); -lean_inc(x_113); -lean_inc(x_8); -lean_inc(x_7); -x_120 = l_Lean_Meta_mkConstWithFreshMVarLevels(x_119, x_7, x_8, x_113, x_10, x_117); -if (lean_obj_tag(x_120) == 0) -{ -lean_object* x_121; lean_object* x_122; lean_object* x_123; -x_121 = lean_ctor_get(x_120, 0); -lean_inc(x_121); -x_122 = lean_ctor_get(x_120, 1); -lean_inc(x_122); -lean_dec(x_120); -lean_inc(x_10); -lean_inc(x_113); -lean_inc(x_8); -lean_inc(x_7); +x_118 = lean_ctor_get(x_116, 1); lean_inc(x_118); -x_123 = l_Lean_Meta_apply(x_118, x_121, x_7, x_8, x_113, x_10, x_122); -if (lean_obj_tag(x_123) == 0) +lean_dec(x_116); +x_119 = l_Lean_Expr_mvarId_x21(x_117); +lean_dec(x_117); +x_120 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__2; +lean_inc(x_11); +lean_inc(x_114); +lean_inc(x_9); +lean_inc(x_8); +x_121 = l_Lean_Meta_mkConstWithFreshMVarLevels(x_120, x_8, x_9, x_114, x_11, x_118); +if (lean_obj_tag(x_121) == 0) { -lean_object* x_124; -x_124 = lean_ctor_get(x_123, 0); -lean_inc(x_124); +lean_object* x_122; lean_object* x_123; lean_object* x_124; +x_122 = lean_ctor_get(x_121, 0); +lean_inc(x_122); +x_123 = lean_ctor_get(x_121, 1); +lean_inc(x_123); +lean_dec(x_121); +lean_inc(x_11); +lean_inc(x_114); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_119); +x_124 = l_Lean_Meta_apply(x_119, x_122, x_8, x_9, x_114, x_11, x_123); if (lean_obj_tag(x_124) == 0) { -lean_object* x_125; lean_object* x_126; lean_object* x_127; -lean_dec(x_118); -lean_dec(x_4); -lean_dec(x_3); -x_125 = lean_ctor_get(x_123, 1); +lean_object* x_125; +x_125 = lean_ctor_get(x_124, 0); lean_inc(x_125); -lean_dec(x_123); -x_126 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; -x_127 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_126, x_5, x_6, x_7, x_8, x_113, x_10, x_125); -lean_dec(x_10); -lean_dec(x_113); +if (lean_obj_tag(x_125) == 0) +{ +lean_object* x_126; lean_object* x_127; lean_object* x_128; +lean_dec(x_119); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_126 = lean_ctor_get(x_124, 1); +lean_inc(x_126); +lean_dec(x_124); +x_127 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; +x_128 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_127, x_6, x_7, x_8, x_9, x_114, x_11, x_126); +lean_dec(x_11); +lean_dec(x_114); +lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); -lean_dec(x_6); -return x_127; +return x_128; } else { -lean_object* x_128; -x_128 = lean_ctor_get(x_124, 1); -lean_inc(x_128); -if (lean_obj_tag(x_128) == 0) -{ -lean_object* x_129; lean_object* x_130; lean_object* x_131; -lean_dec(x_124); -lean_dec(x_118); -lean_dec(x_4); -lean_dec(x_3); -x_129 = lean_ctor_get(x_123, 1); +lean_object* x_129; +x_129 = lean_ctor_get(x_125, 1); lean_inc(x_129); -lean_dec(x_123); -x_130 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; -x_131 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_130, x_5, x_6, x_7, x_8, x_113, x_10, x_129); -lean_dec(x_10); -lean_dec(x_113); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -return x_131; -} -else +if (lean_obj_tag(x_129) == 0) { -lean_object* x_132; -x_132 = lean_ctor_get(x_128, 1); -lean_inc(x_132); -if (lean_obj_tag(x_132) == 0) -{ -lean_object* x_133; lean_object* x_134; lean_object* x_135; -lean_dec(x_128); -lean_dec(x_124); -lean_dec(x_118); +lean_object* x_130; lean_object* x_131; lean_object* x_132; +lean_dec(x_125); +lean_dec(x_119); +lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -x_133 = lean_ctor_get(x_123, 1); -lean_inc(x_133); -lean_dec(x_123); -x_134 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; -x_135 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_134, x_5, x_6, x_7, x_8, x_113, x_10, x_133); -lean_dec(x_10); -lean_dec(x_113); +x_130 = lean_ctor_get(x_124, 1); +lean_inc(x_130); +lean_dec(x_124); +x_131 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; +x_132 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_131, x_6, x_7, x_8, x_9, x_114, x_11, x_130); +lean_dec(x_11); +lean_dec(x_114); +lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); -lean_dec(x_6); -return x_135; +return x_132; } else { -lean_object* x_136; -x_136 = lean_ctor_get(x_132, 1); -lean_inc(x_136); -lean_dec(x_132); -if (lean_obj_tag(x_136) == 0) +lean_object* x_133; +x_133 = lean_ctor_get(x_129, 1); +lean_inc(x_133); +if (lean_obj_tag(x_133) == 0) { -lean_object* x_137; lean_object* x_138; lean_object* x_139; uint8_t x_140; lean_object* x_141; -x_137 = lean_ctor_get(x_123, 1); +lean_object* x_134; lean_object* x_135; lean_object* x_136; +lean_dec(x_129); +lean_dec(x_125); +lean_dec(x_119); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_134 = lean_ctor_get(x_124, 1); +lean_inc(x_134); +lean_dec(x_124); +x_135 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; +x_136 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_135, x_6, x_7, x_8, x_9, x_114, x_11, x_134); +lean_dec(x_11); +lean_dec(x_114); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +return x_136; +} +else +{ +lean_object* x_137; +x_137 = lean_ctor_get(x_133, 1); lean_inc(x_137); -lean_dec(x_123); -x_138 = lean_ctor_get(x_124, 0); +lean_dec(x_133); +if (lean_obj_tag(x_137) == 0) +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; uint8_t x_141; lean_object* x_142; +x_138 = lean_ctor_get(x_124, 1); lean_inc(x_138); lean_dec(x_124); -x_139 = lean_ctor_get(x_128, 0); +x_139 = lean_ctor_get(x_125, 0); lean_inc(x_139); -lean_dec(x_128); -x_140 = 0; -lean_inc(x_10); -lean_inc(x_113); +lean_dec(x_125); +x_140 = lean_ctor_get(x_129, 0); +lean_inc(x_140); +lean_dec(x_129); +x_141 = 0; +lean_inc(x_11); +lean_inc(x_114); +lean_inc(x_9); lean_inc(x_8); -lean_inc(x_7); -x_141 = l_Lean_Meta_intro1Core(x_138, x_140, x_7, x_8, x_113, x_10, x_137); -if (lean_obj_tag(x_141) == 0) +x_142 = l_Lean_Meta_intro1Core(x_139, x_141, x_8, x_9, x_114, x_11, x_138); +if (lean_obj_tag(x_142) == 0) { -lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; -x_142 = lean_ctor_get(x_141, 0); -lean_inc(x_142); -x_143 = lean_ctor_get(x_141, 1); +lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; +x_143 = lean_ctor_get(x_142, 0); lean_inc(x_143); -lean_dec(x_141); -x_144 = lean_ctor_get(x_142, 0); +x_144 = lean_ctor_get(x_142, 1); lean_inc(x_144); -x_145 = lean_ctor_get(x_142, 1); -lean_inc(x_145); lean_dec(x_142); -lean_inc(x_10); -lean_inc(x_113); +x_145 = lean_ctor_get(x_143, 0); +lean_inc(x_145); +x_146 = lean_ctor_get(x_143, 1); +lean_inc(x_146); +lean_dec(x_143); +lean_inc(x_11); +lean_inc(x_114); +lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); -lean_inc(x_5); lean_inc(x_3); -x_146 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual(x_3, x_145, x_144, x_5, x_6, x_7, x_8, x_113, x_10, x_143); -if (lean_obj_tag(x_146) == 0) +x_147 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual(x_3, x_146, x_145, x_6, x_7, x_8, x_9, x_114, x_11, x_144); +if (lean_obj_tag(x_147) == 0) { -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; size_t x_156; size_t x_157; lean_object* x_158; -x_147 = lean_ctor_get(x_146, 0); -lean_inc(x_147); -x_148 = lean_ctor_get(x_146, 1); +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; size_t x_157; size_t x_158; lean_object* x_159; +x_148 = lean_ctor_get(x_147, 0); lean_inc(x_148); -lean_dec(x_146); -x_149 = lean_array_get_size(x_4); -x_150 = lean_unsigned_to_nat(0u); -x_151 = l_Array_toSubarray___rarg(x_4, x_150, x_149); -x_152 = lean_array_get_size(x_3); -x_153 = l_Array_toSubarray___rarg(x_3, x_150, x_152); -x_154 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_154, 0, x_151); -lean_ctor_set(x_154, 1, x_153); -x_155 = lean_array_get_size(x_147); -x_156 = lean_usize_of_nat(x_155); -lean_dec(x_155); -x_157 = 0; -lean_inc(x_10); -lean_inc(x_113); -lean_inc(x_8); -lean_inc(x_7); -x_158 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1(x_147, x_156, x_157, x_154, x_5, x_6, x_7, x_8, x_113, x_10, x_148); +x_149 = lean_ctor_get(x_147, 1); +lean_inc(x_149); lean_dec(x_147); -if (lean_obj_tag(x_158) == 0) -{ -lean_object* x_159; lean_object* x_160; lean_object* x_161; -x_159 = lean_ctor_get(x_158, 1); -lean_inc(x_159); -lean_dec(x_158); -lean_inc(x_139); -x_160 = l_Lean_mkMVar(x_139); -lean_inc(x_10); -lean_inc(x_113); +x_150 = lean_array_get_size(x_4); +x_151 = lean_unsigned_to_nat(0u); +x_152 = l_Array_toSubarray___rarg(x_4, x_151, x_150); +x_153 = lean_array_get_size(x_3); +x_154 = l_Array_toSubarray___rarg(x_3, x_151, x_153); +x_155 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_155, 0, x_154); +lean_ctor_set(x_155, 1, x_152); +x_156 = lean_array_get_size(x_148); +x_157 = lean_usize_of_nat(x_156); +lean_dec(x_156); +x_158 = 0; +lean_inc(x_11); +lean_inc(x_114); +lean_inc(x_9); lean_inc(x_8); -lean_inc(x_7); -x_161 = lean_infer_type(x_160, x_7, x_8, x_113, x_10, x_159); -if (lean_obj_tag(x_161) == 0) +x_159 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1(x_5, x_148, x_157, x_158, x_155, x_6, x_7, x_8, x_9, x_114, x_11, x_149); +lean_dec(x_148); +if (lean_obj_tag(x_159) == 0) { -lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; -x_162 = lean_ctor_get(x_161, 0); -lean_inc(x_162); -x_163 = lean_ctor_get(x_161, 1); +lean_object* x_160; lean_object* x_161; lean_object* x_162; +x_160 = lean_ctor_get(x_159, 1); +lean_inc(x_160); +lean_dec(x_159); +lean_inc(x_140); +x_161 = l_Lean_mkMVar(x_140); +lean_inc(x_11); +lean_inc(x_114); +lean_inc(x_9); +lean_inc(x_8); +x_162 = lean_infer_type(x_161, x_8, x_9, x_114, x_11, x_160); +if (lean_obj_tag(x_162) == 0) +{ +lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; +x_163 = lean_ctor_get(x_162, 0); lean_inc(x_163); -lean_dec(x_161); -x_164 = lean_box(0); -lean_inc(x_10); -lean_inc(x_113); +x_164 = lean_ctor_get(x_162, 1); +lean_inc(x_164); +lean_dec(x_162); +x_165 = lean_box(0); +lean_inc(x_11); +lean_inc(x_114); +lean_inc(x_9); lean_inc(x_8); -lean_inc(x_7); -x_165 = l_Lean_Meta_synthInstance(x_162, x_164, x_7, x_8, x_113, x_10, x_163); -if (lean_obj_tag(x_165) == 0) +x_166 = l_Lean_Meta_synthInstance(x_163, x_165, x_8, x_9, x_114, x_11, x_164); +if (lean_obj_tag(x_166) == 0) { -lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; -x_166 = lean_ctor_get(x_165, 0); -lean_inc(x_166); -x_167 = lean_ctor_get(x_165, 1); +lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; +x_167 = lean_ctor_get(x_166, 0); lean_inc(x_167); -lean_dec(x_165); -x_168 = l_Lean_Meta_assignExprMVar(x_139, x_166, x_7, x_8, x_113, x_10, x_167); -x_169 = lean_ctor_get(x_168, 1); -lean_inc(x_169); -lean_dec(x_168); -x_170 = l_Lean_mkMVar(x_118); -x_171 = l_Lean_Meta_instantiateMVars(x_170, x_7, x_8, x_113, x_10, x_169); -lean_dec(x_10); -lean_dec(x_113); -lean_dec(x_7); -return x_171; +x_168 = lean_ctor_get(x_166, 1); +lean_inc(x_168); +lean_dec(x_166); +x_169 = l_Lean_Meta_assignExprMVar(x_140, x_167, x_8, x_9, x_114, x_11, x_168); +x_170 = lean_ctor_get(x_169, 1); +lean_inc(x_170); +lean_dec(x_169); +x_171 = l_Lean_mkMVar(x_119); +x_172 = l_Lean_Meta_instantiateMVars(x_171, x_8, x_9, x_114, x_11, x_170); +lean_dec(x_11); +lean_dec(x_114); +lean_dec(x_8); +return x_172; } else { -lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; -lean_dec(x_139); -lean_dec(x_118); -lean_dec(x_113); -lean_dec(x_10); +lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; +lean_dec(x_140); +lean_dec(x_119); +lean_dec(x_114); +lean_dec(x_11); +lean_dec(x_9); lean_dec(x_8); -lean_dec(x_7); -x_172 = lean_ctor_get(x_165, 0); -lean_inc(x_172); -x_173 = lean_ctor_get(x_165, 1); +x_173 = lean_ctor_get(x_166, 0); lean_inc(x_173); -if (lean_is_exclusive(x_165)) { - lean_ctor_release(x_165, 0); - lean_ctor_release(x_165, 1); - x_174 = x_165; +x_174 = lean_ctor_get(x_166, 1); +lean_inc(x_174); +if (lean_is_exclusive(x_166)) { + lean_ctor_release(x_166, 0); + lean_ctor_release(x_166, 1); + x_175 = x_166; } else { - lean_dec_ref(x_165); - x_174 = lean_box(0); + lean_dec_ref(x_166); + x_175 = lean_box(0); } -if (lean_is_scalar(x_174)) { - x_175 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_175)) { + x_176 = lean_alloc_ctor(1, 2, 0); } else { - x_175 = x_174; + x_176 = x_175; } -lean_ctor_set(x_175, 0, x_172); -lean_ctor_set(x_175, 1, x_173); -return x_175; +lean_ctor_set(x_176, 0, x_173); +lean_ctor_set(x_176, 1, x_174); +return x_176; } } else { -lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; -lean_dec(x_139); -lean_dec(x_118); -lean_dec(x_113); -lean_dec(x_10); +lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; +lean_dec(x_140); +lean_dec(x_119); +lean_dec(x_114); +lean_dec(x_11); +lean_dec(x_9); lean_dec(x_8); -lean_dec(x_7); -x_176 = lean_ctor_get(x_161, 0); -lean_inc(x_176); -x_177 = lean_ctor_get(x_161, 1); +x_177 = lean_ctor_get(x_162, 0); lean_inc(x_177); -if (lean_is_exclusive(x_161)) { - lean_ctor_release(x_161, 0); - lean_ctor_release(x_161, 1); - x_178 = x_161; +x_178 = lean_ctor_get(x_162, 1); +lean_inc(x_178); +if (lean_is_exclusive(x_162)) { + lean_ctor_release(x_162, 0); + lean_ctor_release(x_162, 1); + x_179 = x_162; } else { - lean_dec_ref(x_161); - x_178 = lean_box(0); + lean_dec_ref(x_162); + x_179 = lean_box(0); } -if (lean_is_scalar(x_178)) { - x_179 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_179)) { + x_180 = lean_alloc_ctor(1, 2, 0); } else { - x_179 = x_178; + x_180 = x_179; } -lean_ctor_set(x_179, 0, x_176); -lean_ctor_set(x_179, 1, x_177); -return x_179; +lean_ctor_set(x_180, 0, x_177); +lean_ctor_set(x_180, 1, x_178); +return x_180; } } else { -lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; -lean_dec(x_139); -lean_dec(x_118); -lean_dec(x_113); -lean_dec(x_10); +lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; +lean_dec(x_140); +lean_dec(x_119); +lean_dec(x_114); +lean_dec(x_11); +lean_dec(x_9); lean_dec(x_8); -lean_dec(x_7); -x_180 = lean_ctor_get(x_158, 0); -lean_inc(x_180); -x_181 = lean_ctor_get(x_158, 1); +x_181 = lean_ctor_get(x_159, 0); lean_inc(x_181); -if (lean_is_exclusive(x_158)) { - lean_ctor_release(x_158, 0); - lean_ctor_release(x_158, 1); - x_182 = x_158; +x_182 = lean_ctor_get(x_159, 1); +lean_inc(x_182); +if (lean_is_exclusive(x_159)) { + lean_ctor_release(x_159, 0); + lean_ctor_release(x_159, 1); + x_183 = x_159; } else { - lean_dec_ref(x_158); - x_182 = lean_box(0); + lean_dec_ref(x_159); + x_183 = lean_box(0); } -if (lean_is_scalar(x_182)) { - x_183 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_183)) { + x_184 = lean_alloc_ctor(1, 2, 0); } else { - x_183 = x_182; + x_184 = x_183; } -lean_ctor_set(x_183, 0, x_180); -lean_ctor_set(x_183, 1, x_181); -return x_183; +lean_ctor_set(x_184, 0, x_181); +lean_ctor_set(x_184, 1, x_182); +return x_184; } } else { -lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; -lean_dec(x_139); -lean_dec(x_118); -lean_dec(x_113); -lean_dec(x_10); +lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; +lean_dec(x_140); +lean_dec(x_119); +lean_dec(x_114); +lean_dec(x_11); +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); -x_184 = lean_ctor_get(x_146, 0); -lean_inc(x_184); -x_185 = lean_ctor_get(x_146, 1); +x_185 = lean_ctor_get(x_147, 0); lean_inc(x_185); -if (lean_is_exclusive(x_146)) { - lean_ctor_release(x_146, 0); - lean_ctor_release(x_146, 1); - x_186 = x_146; +x_186 = lean_ctor_get(x_147, 1); +lean_inc(x_186); +if (lean_is_exclusive(x_147)) { + lean_ctor_release(x_147, 0); + lean_ctor_release(x_147, 1); + x_187 = x_147; } else { - lean_dec_ref(x_146); - x_186 = lean_box(0); + lean_dec_ref(x_147); + x_187 = lean_box(0); } -if (lean_is_scalar(x_186)) { - x_187 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_187)) { + x_188 = lean_alloc_ctor(1, 2, 0); } else { - x_187 = x_186; + x_188 = x_187; } -lean_ctor_set(x_187, 0, x_184); -lean_ctor_set(x_187, 1, x_185); -return x_187; +lean_ctor_set(x_188, 0, x_185); +lean_ctor_set(x_188, 1, x_186); +return x_188; } } else { -lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; -lean_dec(x_139); -lean_dec(x_118); -lean_dec(x_113); -lean_dec(x_10); +lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; +lean_dec(x_140); +lean_dec(x_119); +lean_dec(x_114); +lean_dec(x_11); +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); -x_188 = lean_ctor_get(x_141, 0); -lean_inc(x_188); -x_189 = lean_ctor_get(x_141, 1); +x_189 = lean_ctor_get(x_142, 0); lean_inc(x_189); -if (lean_is_exclusive(x_141)) { - lean_ctor_release(x_141, 0); - lean_ctor_release(x_141, 1); - x_190 = x_141; +x_190 = lean_ctor_get(x_142, 1); +lean_inc(x_190); +if (lean_is_exclusive(x_142)) { + lean_ctor_release(x_142, 0); + lean_ctor_release(x_142, 1); + x_191 = x_142; } else { - lean_dec_ref(x_141); - x_190 = lean_box(0); + lean_dec_ref(x_142); + x_191 = lean_box(0); } -if (lean_is_scalar(x_190)) { - x_191 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_191)) { + x_192 = lean_alloc_ctor(1, 2, 0); } else { - x_191 = x_190; + x_192 = x_191; } -lean_ctor_set(x_191, 0, x_188); -lean_ctor_set(x_191, 1, x_189); -return x_191; +lean_ctor_set(x_192, 0, x_189); +lean_ctor_set(x_192, 1, x_190); +return x_192; } } else { -lean_object* x_192; lean_object* x_193; lean_object* x_194; -lean_dec(x_136); -lean_dec(x_128); +lean_object* x_193; lean_object* x_194; lean_object* x_195; +lean_dec(x_137); +lean_dec(x_129); +lean_dec(x_125); +lean_dec(x_119); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_193 = lean_ctor_get(x_124, 1); +lean_inc(x_193); lean_dec(x_124); -lean_dec(x_118); -lean_dec(x_4); -lean_dec(x_3); -x_192 = lean_ctor_get(x_123, 1); -lean_inc(x_192); -lean_dec(x_123); -x_193 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; -x_194 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_193, x_5, x_6, x_7, x_8, x_113, x_10, x_192); -lean_dec(x_10); -lean_dec(x_113); +x_194 = l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4; +x_195 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_194, x_6, x_7, x_8, x_9, x_114, x_11, x_193); +lean_dec(x_11); +lean_dec(x_114); +lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); -lean_dec(x_6); -return x_194; +return x_195; } } } @@ -3039,70 +4823,211 @@ return x_194; } else { -lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; -lean_dec(x_118); -lean_dec(x_113); -lean_dec(x_10); +lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; +lean_dec(x_119); +lean_dec(x_114); +lean_dec(x_11); +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); -x_195 = lean_ctor_get(x_123, 0); -lean_inc(x_195); -x_196 = lean_ctor_get(x_123, 1); +x_196 = lean_ctor_get(x_124, 0); lean_inc(x_196); -if (lean_is_exclusive(x_123)) { - lean_ctor_release(x_123, 0); - lean_ctor_release(x_123, 1); - x_197 = x_123; +x_197 = lean_ctor_get(x_124, 1); +lean_inc(x_197); +if (lean_is_exclusive(x_124)) { + lean_ctor_release(x_124, 0); + lean_ctor_release(x_124, 1); + x_198 = x_124; } else { - lean_dec_ref(x_123); - x_197 = lean_box(0); + lean_dec_ref(x_124); + x_198 = lean_box(0); } -if (lean_is_scalar(x_197)) { - x_198 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_198)) { + x_199 = lean_alloc_ctor(1, 2, 0); } else { - x_198 = x_197; + x_199 = x_198; } -lean_ctor_set(x_198, 0, x_195); -lean_ctor_set(x_198, 1, x_196); -return x_198; +lean_ctor_set(x_199, 0, x_196); +lean_ctor_set(x_199, 1, x_197); +return x_199; } } else { -lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; -lean_dec(x_118); -lean_dec(x_113); -lean_dec(x_10); +lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; +lean_dec(x_119); +lean_dec(x_114); +lean_dec(x_11); +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); -x_199 = lean_ctor_get(x_120, 0); -lean_inc(x_199); -x_200 = lean_ctor_get(x_120, 1); +x_200 = lean_ctor_get(x_121, 0); lean_inc(x_200); -if (lean_is_exclusive(x_120)) { - lean_ctor_release(x_120, 0); - lean_ctor_release(x_120, 1); - x_201 = x_120; +x_201 = lean_ctor_get(x_121, 1); +lean_inc(x_201); +if (lean_is_exclusive(x_121)) { + lean_ctor_release(x_121, 0); + lean_ctor_release(x_121, 1); + x_202 = x_121; } else { - lean_dec_ref(x_120); - x_201 = lean_box(0); + lean_dec_ref(x_121); + x_202 = lean_box(0); } -if (lean_is_scalar(x_201)) { - x_202 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_202)) { + x_203 = lean_alloc_ctor(1, 2, 0); } else { - x_202 = x_201; + x_203 = x_202; +} +lean_ctor_set(x_203, 0, x_200); +lean_ctor_set(x_203, 1, x_201); +return x_203; +} +} +} +} +static lean_object* _init_l_Lean_Elab_WF_elabWFRel___lambda__3___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("'termination_by' modifier missing"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_WF_elabWFRel___lambda__3___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_WF_elabWFRel___lambda__3___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___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, 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_1) == 0) +{ +lean_object* x_14; lean_object* x_15; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_14 = l_Lean_Elab_WF_elabWFRel___lambda__3___closed__2; +x_15 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_14, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +return x_15; +} +else +{ +uint8_t x_16; +x_16 = !lean_is_exclusive(x_1); +if (x_16 == 0) +{ +lean_object* x_17; +x_17 = lean_ctor_get(x_1, 0); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; uint8_t 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_5); +lean_dec(x_4); +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +lean_dec(x_17); +lean_ctor_set(x_1, 0, x_2); +x_19 = lean_box(0); +x_20 = 1; +x_21 = lean_box(x_20); +x_22 = lean_box(x_20); +x_23 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTermEnsuringType___boxed), 12, 5); +lean_closure_set(x_23, 0, x_18); +lean_closure_set(x_23, 1, x_1); +lean_closure_set(x_23, 2, x_21); +lean_closure_set(x_23, 3, x_22); +lean_closure_set(x_23, 4, x_19); +x_24 = lean_alloc_closure((void*)(l_Lean_Elab_WF_elabWFRel___lambda__1), 9, 2); +lean_closure_set(x_24, 0, x_23); +lean_closure_set(x_24, 1, x_19); +x_25 = l_Lean_Elab_Term_withDeclName___rarg(x_3, x_24, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +return x_25; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +lean_free_object(x_1); +x_26 = lean_ctor_get(x_17, 0); +lean_inc(x_26); +lean_dec(x_17); +x_27 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_getRefFromElems(x_26); +x_28 = lean_alloc_closure((void*)(l_Lean_Elab_WF_elabWFRel___lambda__2___boxed), 12, 5); +lean_closure_set(x_28, 0, x_27); +lean_closure_set(x_28, 1, x_2); +lean_closure_set(x_28, 2, x_4); +lean_closure_set(x_28, 3, x_26); +lean_closure_set(x_28, 4, x_5); +x_29 = l_Lean_Elab_Term_withDeclName___rarg(x_3, x_28, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +return x_29; +} +} +else +{ +lean_object* x_30; +x_30 = lean_ctor_get(x_1, 0); +lean_inc(x_30); +lean_dec(x_1); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +lean_dec(x_5); +lean_dec(x_4); +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +lean_dec(x_30); +x_32 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_32, 0, x_2); +x_33 = lean_box(0); +x_34 = 1; +x_35 = lean_box(x_34); +x_36 = lean_box(x_34); +x_37 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTermEnsuringType___boxed), 12, 5); +lean_closure_set(x_37, 0, x_31); +lean_closure_set(x_37, 1, x_32); +lean_closure_set(x_37, 2, x_35); +lean_closure_set(x_37, 3, x_36); +lean_closure_set(x_37, 4, x_33); +x_38 = lean_alloc_closure((void*)(l_Lean_Elab_WF_elabWFRel___lambda__1), 9, 2); +lean_closure_set(x_38, 0, x_37); +lean_closure_set(x_38, 1, x_33); +x_39 = l_Lean_Elab_Term_withDeclName___rarg(x_3, x_38, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +return x_39; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_40 = lean_ctor_get(x_30, 0); +lean_inc(x_40); +lean_dec(x_30); +x_41 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_getRefFromElems(x_40); +x_42 = lean_alloc_closure((void*)(l_Lean_Elab_WF_elabWFRel___lambda__2___boxed), 12, 5); +lean_closure_set(x_42, 0, x_41); +lean_closure_set(x_42, 1, x_2); +lean_closure_set(x_42, 2, x_4); +lean_closure_set(x_42, 3, x_40); +lean_closure_set(x_42, 4, x_5); +x_43 = l_Lean_Elab_Term_withDeclName___rarg(x_3, x_42, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +return x_43; } -lean_ctor_set(x_202, 0, x_199); -lean_ctor_set(x_202, 1, x_200); -return x_202; } } } @@ -3111,204 +5036,150 @@ static lean_object* _init_l_Lean_Elab_WF_elabWFRel___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string("'termination_by' modifier missing"); +x_1 = lean_mk_string("WellFoundedRelation"); return x_1; } } static lean_object* _init_l_Lean_Elab_WF_elabWFRel___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_WF_elabWFRel___closed__1; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_WF_elabWFRel___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; } } static lean_object* _init_l_Lean_Elab_WF_elabWFRel___closed__3() { _start: { lean_object* x_1; -x_1 = lean_mk_string("WellFoundedRelation"); +x_1 = lean_mk_string("elabWFRel start: "); return x_1; } } static lean_object* _init_l_Lean_Elab_WF_elabWFRel___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_WF_elabWFRel___closed__3; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_WF_elabWFRel___closed__3; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { -lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = lean_ctor_get(x_2, 4); +lean_object* x_13; lean_inc(x_11); -x_12 = l_Lean_Expr_bindingDomain_x21(x_11); -lean_dec(x_11); +lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_12); -x_13 = l_Lean_Meta_getLevel(x_12, x_6, x_7, x_8, x_9, x_10); +lean_inc(x_4); +x_13 = l_Lean_Meta_getLevel(x_4, x_8, x_9, x_10, x_11, x_12); if (lean_obj_tag(x_13) == 0) { -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; -lean_dec(x_12); -lean_dec(x_2); -lean_dec(x_1); -x_14 = lean_ctor_get(x_13, 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; uint8_t x_22; lean_object* x_23; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; +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_15 = l_Lean_Elab_WF_elabWFRel___closed__2; -x_16 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_15, x_4, x_5, x_6, x_7, x_8, x_9, x_14); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -return x_16; -} -else +x_16 = lean_box(0); +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_14); +lean_ctor_set(x_17, 1, x_16); +x_18 = l_Lean_Elab_WF_elabWFRel___closed__2; +x_19 = l_Lean_mkConst(x_18, x_17); +x_20 = l_Lean_mkApp(x_19, x_4); +x_21 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__6; +x_42 = lean_st_ref_get(x_11, x_15); +x_43 = lean_ctor_get(x_42, 0); +lean_inc(x_43); +x_44 = lean_ctor_get(x_43, 3); +lean_inc(x_44); +lean_dec(x_43); +x_45 = lean_ctor_get_uint8(x_44, sizeof(void*)*1); +lean_dec(x_44); +if (x_45 == 0) { -lean_object* x_17; lean_object* x_18; uint8_t x_19; -x_17 = lean_ctor_get(x_13, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_13, 1); -lean_inc(x_18); -lean_dec(x_13); -x_19 = !lean_is_exclusive(x_3); -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; -x_20 = lean_ctor_get(x_3, 0); -x_21 = lean_box(0); -x_22 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_22, 0, x_17); -lean_ctor_set(x_22, 1, x_21); -x_23 = l_Lean_Elab_WF_elabWFRel___closed__4; -x_24 = l_Lean_mkConst(x_23, x_22); -x_25 = l_Lean_mkApp(x_24, x_12); -if (lean_obj_tag(x_20) == 0) -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -lean_dec(x_1); -x_26 = lean_ctor_get(x_20, 0); -lean_inc(x_26); -lean_dec(x_20); -x_27 = lean_ctor_get(x_2, 3); -lean_inc(x_27); -lean_dec(x_2); -lean_ctor_set(x_3, 0, x_25); -x_28 = lean_box(0); -x_29 = 1; -x_30 = lean_box(x_29); -x_31 = lean_box(x_29); -x_32 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTermEnsuringType___boxed), 12, 5); -lean_closure_set(x_32, 0, x_26); -lean_closure_set(x_32, 1, x_3); -lean_closure_set(x_32, 2, x_30); -lean_closure_set(x_32, 3, x_31); -lean_closure_set(x_32, 4, x_28); -x_33 = lean_alloc_closure((void*)(l_Lean_Elab_WF_elabWFRel___lambda__1), 9, 2); -lean_closure_set(x_33, 0, x_32); -lean_closure_set(x_33, 1, x_28); -x_34 = l_Lean_Elab_Term_withDeclName___rarg(x_27, x_33, x_4, x_5, x_6, x_7, x_8, x_9, x_18); -return x_34; -} -else -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -lean_free_object(x_3); -x_35 = lean_ctor_get(x_20, 0); -lean_inc(x_35); -lean_dec(x_20); -x_36 = lean_ctor_get(x_2, 3); -lean_inc(x_36); -lean_dec(x_2); -x_37 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_getRefFromElems(x_35); -x_38 = lean_alloc_closure((void*)(l_Lean_Elab_WF_elabWFRel___lambda__2___boxed), 11, 4); -lean_closure_set(x_38, 0, x_37); -lean_closure_set(x_38, 1, x_25); -lean_closure_set(x_38, 2, x_1); -lean_closure_set(x_38, 3, x_35); -x_39 = l_Lean_Elab_Term_withDeclName___rarg(x_36, x_38, x_4, x_5, x_6, x_7, x_8, x_9, x_18); -return x_39; -} -} -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; -x_40 = lean_ctor_get(x_3, 0); -lean_inc(x_40); -lean_dec(x_3); -x_41 = lean_box(0); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_17); -lean_ctor_set(x_42, 1, x_41); -x_43 = l_Lean_Elab_WF_elabWFRel___closed__4; -x_44 = l_Lean_mkConst(x_43, x_42); -x_45 = l_Lean_mkApp(x_44, x_12); -if (lean_obj_tag(x_40) == 0) -{ -lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -lean_dec(x_1); -x_46 = lean_ctor_get(x_40, 0); +lean_object* x_46; uint8_t x_47; +x_46 = lean_ctor_get(x_42, 1); lean_inc(x_46); -lean_dec(x_40); -x_47 = lean_ctor_get(x_2, 3); -lean_inc(x_47); -lean_dec(x_2); -x_48 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_48, 0, x_45); -x_49 = lean_box(0); -x_50 = 1; -x_51 = lean_box(x_50); -x_52 = lean_box(x_50); -x_53 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTermEnsuringType___boxed), 12, 5); -lean_closure_set(x_53, 0, x_46); -lean_closure_set(x_53, 1, x_48); -lean_closure_set(x_53, 2, x_51); -lean_closure_set(x_53, 3, x_52); -lean_closure_set(x_53, 4, x_49); -x_54 = lean_alloc_closure((void*)(l_Lean_Elab_WF_elabWFRel___lambda__1), 9, 2); -lean_closure_set(x_54, 0, x_53); -lean_closure_set(x_54, 1, x_49); -x_55 = l_Lean_Elab_Term_withDeclName___rarg(x_47, x_54, x_4, x_5, x_6, x_7, x_8, x_9, x_18); -return x_55; +lean_dec(x_42); +x_47 = 0; +x_22 = x_47; +x_23 = x_46; +goto block_41; } else { -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; -x_56 = lean_ctor_get(x_40, 0); -lean_inc(x_56); -lean_dec(x_40); -x_57 = lean_ctor_get(x_2, 3); -lean_inc(x_57); -lean_dec(x_2); -x_58 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_getRefFromElems(x_56); -x_59 = lean_alloc_closure((void*)(l_Lean_Elab_WF_elabWFRel___lambda__2___boxed), 11, 4); -lean_closure_set(x_59, 0, x_58); -lean_closure_set(x_59, 1, x_45); -lean_closure_set(x_59, 2, x_1); -lean_closure_set(x_59, 3, x_56); -x_60 = l_Lean_Elab_Term_withDeclName___rarg(x_57, x_59, x_4, x_5, x_6, x_7, x_8, x_9, x_18); -return x_60; +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52; +x_48 = lean_ctor_get(x_42, 1); +lean_inc(x_48); +lean_dec(x_42); +x_49 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_21, x_6, x_7, x_8, x_9, x_10, x_11, x_48); +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 = lean_unbox(x_50); +lean_dec(x_50); +x_22 = x_52; +x_23 = x_51; +goto block_41; } +block_41: +{ +if (x_22 == 0) +{ +lean_object* x_24; lean_object* x_25; +x_24 = lean_box(0); +x_25 = l_Lean_Elab_WF_elabWFRel___lambda__3(x_5, x_20, x_2, x_1, x_3, x_24, x_6, x_7, x_8, x_9, x_10, x_11, x_23); +return x_25; +} +else +{ +uint8_t 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; +x_26 = 0; +x_27 = lean_box(0); +lean_inc(x_8); +x_28 = l_Lean_Meta_mkFreshTypeMVar(x_26, x_27, x_8, x_9, x_10, x_11, x_23); +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 = l_Lean_Expr_mvarId_x21(x_29); +lean_dec(x_29); +x_32 = lean_alloc_ctor(5, 1, 0); +lean_ctor_set(x_32, 0, x_31); +x_33 = l_Lean_Elab_WF_elabWFRel___closed__4; +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 = l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__14; +x_36 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +x_37 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_21, x_36, x_6, x_7, x_8, x_9, x_10, x_11, x_30); +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 = l_Lean_Elab_WF_elabWFRel___lambda__3(x_5, x_20, x_2, x_1, x_3, x_38, x_6, x_7, x_8, x_9, x_10, x_11, x_39); +lean_dec(x_38); +return x_40; } } } else { -uint8_t x_61; -lean_dec(x_12); +uint8_t x_53; +lean_dec(x_11); +lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -3318,47 +5189,56 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_61 = !lean_is_exclusive(x_13); -if (x_61 == 0) +x_53 = !lean_is_exclusive(x_13); +if (x_53 == 0) { return x_13; } else { -lean_object* x_62; lean_object* x_63; lean_object* x_64; -x_62 = lean_ctor_get(x_13, 0); -x_63 = lean_ctor_get(x_13, 1); -lean_inc(x_63); -lean_inc(x_62); +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_13, 0); +x_55 = lean_ctor_get(x_13, 1); +lean_inc(x_55); +lean_inc(x_54); lean_dec(x_13); -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_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; } } } } -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___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_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___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) { _start: { -size_t x_12; size_t x_13; lean_object* x_14; -x_12 = lean_unbox_usize(x_2); -lean_dec(x_2); +size_t x_13; size_t x_14; lean_object* x_15; x_13 = lean_unbox_usize(x_3); lean_dec(x_3); -x_14 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___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_1); -return x_14; +x_14 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_15 = l_Array_forInUnsafe_loop___at_Lean_Elab_WF_elabWFRel___spec__1(x_1, x_2, x_13, x_14, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); +lean_dec(x_2); +return x_15; } } -LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___lambda__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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { -lean_object* x_12; -x_12 = l_Lean_Elab_WF_elabWFRel___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +lean_object* x_13; +x_13 = l_Lean_Elab_WF_elabWFRel___lambda__2(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_1); -return x_12; +return x_13; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_WF_elabWFRel___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, 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_Elab_WF_elabWFRel___lambda__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, x_13); +lean_dec(x_6); +return x_14; } } lean_object* initialize_Init(uint8_t builtin, lean_object*); @@ -3408,12 +5288,40 @@ l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___clo lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___closed__4); l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___closed__5 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___closed__5(); lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackMutual_go___closed__5); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__1 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__1); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__2 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__2(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__2); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__3 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__3(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___lambda__1___closed__3); l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__1 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__1(); lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__1); l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__2 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__2(); lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__2); l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__3 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__3(); lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__3); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__4 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__4(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__4); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__5 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__5(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__5); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__6 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__6(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__6); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__7 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__7(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__7); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__8 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__8(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__8); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__9 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__9(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__9); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__10 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__10(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__10); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__11 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__11(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__11); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__12 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__12(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__12); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__13 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__13(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__13); +l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__14 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__14(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary_go___closed__14); l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2___closed__1 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2___closed__1(); lean_mark_persistent(l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2___closed__1); l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2___closed__2 = _init_l___private_Lean_Elab_PreDefinition_WF_Rel_0__Lean_Elab_WF_unpackUnary___lambda__2___closed__2(); @@ -3426,6 +5334,10 @@ l_Lean_Elab_WF_elabWFRel___lambda__2___closed__3 = _init_l_Lean_Elab_WF_elabWFRe lean_mark_persistent(l_Lean_Elab_WF_elabWFRel___lambda__2___closed__3); l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4 = _init_l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4(); lean_mark_persistent(l_Lean_Elab_WF_elabWFRel___lambda__2___closed__4); +l_Lean_Elab_WF_elabWFRel___lambda__3___closed__1 = _init_l_Lean_Elab_WF_elabWFRel___lambda__3___closed__1(); +lean_mark_persistent(l_Lean_Elab_WF_elabWFRel___lambda__3___closed__1); +l_Lean_Elab_WF_elabWFRel___lambda__3___closed__2 = _init_l_Lean_Elab_WF_elabWFRel___lambda__3___closed__2(); +lean_mark_persistent(l_Lean_Elab_WF_elabWFRel___lambda__3___closed__2); l_Lean_Elab_WF_elabWFRel___closed__1 = _init_l_Lean_Elab_WF_elabWFRel___closed__1(); lean_mark_persistent(l_Lean_Elab_WF_elabWFRel___closed__1); l_Lean_Elab_WF_elabWFRel___closed__2 = _init_l_Lean_Elab_WF_elabWFRel___closed__2(); diff --git a/stage0/stdlib/Lean/Meta/ExprDefEq.c b/stage0/stdlib/Lean/Meta/ExprDefEq.c index 7df8f94911..853ffd4ca3 100644 --- a/stage0/stdlib/Lean/Meta/ExprDefEq.c +++ b/stage0/stdlib/Lean/Meta/ExprDefEq.c @@ -86,6 +86,7 @@ LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_checkM static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__12; static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqRight___closed__1; static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___spec__1___lambda__2___closed__4; +static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__2; LEAN_EXPORT lean_object* l_Lean_LocalContext_foldlM___at_Lean_Meta_CheckAssignment_checkMVar___spec__50(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_addTrace___at_Lean_Meta_CheckAssignment_checkFVar___spec__4___closed__6; LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visit___at_Lean_Meta_CheckAssignment_checkMVar___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); @@ -108,7 +109,7 @@ lean_object* l_Lean_MetavarContext_getExprAssignment_x3f(lean_object*, lean_obje LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitMain___at_Lean_Meta_CheckAssignment_checkMVar___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_checkpointDefEq___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___spec__2(lean_object*, 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_EXPORT lean_object* l_Std_PersistentArray_anyM___at_Lean_Meta_CheckAssignment_checkMVar___spec__37___boxed(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___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_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___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* l_Lean_Meta_saveState___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_local_ctx_erase(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqProofIrrel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -123,6 +124,7 @@ lean_object* lean_is_expr_def_eq(lean_object*, lean_object*, lean_object*, lean_ lean_object* l_Lean_addTrace_addTraceOptions(lean_object*); lean_object* l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps_collectLetDeps(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___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*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps_hasLetDeclsInBetween___closed__1; uint8_t l_Lean_checkTraceOption(lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqQuickOther___closed__2; @@ -147,6 +149,7 @@ LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_checkM uint8_t l_Lean_Expr_isApp(lean_object*); uint8_t l_Lean_LocalContext_containsFVar(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unfoldComparingHeadsDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___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_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_checkMVar___spec__39___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Std_PersistentArray_anyMAux___at_Lean_Meta_CheckAssignment_checkMVar___spec__6(lean_object*, lean_object*); @@ -185,6 +188,7 @@ lean_object* l_Lean_Meta_unfoldDefinition_x3f(lean_object*, lean_object*, lean_o static lean_object* l_Lean_addTrace___at_Lean_Meta_CheckAssignment_checkFVar___spec__4___closed__5; LEAN_EXPORT lean_object* l_Lean_Meta_isDefEqNative(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitMain___at_Lean_Meta_CheckAssignment_checkMVar___spec__19(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_List_replace___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps_collectLetDeclsFrom_visit___spec__6(lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___closed__1; static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___spec__1___closed__8; @@ -195,8 +199,10 @@ LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFV size_t lean_usize_shift_right(size_t, size_t); LEAN_EXPORT lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_cacheResult___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_etaEq___boxed(lean_object*, lean_object*); +static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__1; LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_checkMVar___spec__32___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___closed__2; static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___spec__1___closed__1; LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqArgsFirstPass(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -232,7 +238,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unfold___r LEAN_EXPORT uint8_t l_Std_PersistentArray_anyM___at_Lean_Meta_CheckAssignment_checkMVar___spec__37(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Meta_CheckAssignment_checkMVar___spec__62___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_CheckAssignment_check___closed__7; -LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___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_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___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*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__2; lean_object* lean_is_level_def_eq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitApp___at_Lean_Meta_CheckAssignment_checkMVar___spec__36(lean_object*, lean_object*, lean_object*, lean_object*); @@ -301,12 +307,13 @@ extern lean_object* l_Lean_Core_instMonadRefCoreM; LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqLeft(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_PersistentHashMap_containsAux___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isCached___spec__2___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqOnFailure___closed__1; -LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___spec__1___lambda__2___closed__7; static size_t l_Std_PersistentHashMap_containsAux___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isCached___spec__2___closed__1; LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_cacheResult___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___closed__7; LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_checkMVar___spec__15(lean_object*, lean_object*, size_t, size_t); +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___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_EXPORT lean_object* l_Lean_Meta_CheckAssignment_assignToConstFun___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_isExprDefEqAuxImpl___closed__1; lean_object* l_Lean_Expr_headBeta(lean_object*); @@ -379,6 +386,7 @@ LEAN_EXPORT uint8_t l_Std_PersistentArray_anyMAux___at_Lean_Meta_CheckAssignment uint8_t lean_is_matcher(lean_object*, lean_object*); static lean_object* l_Lean_Meta_CheckAssignment_run___closed__1; extern lean_object* l_Lean_Expr_instHashableExpr; +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unfoldReducibeDefEq___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint64_t l_Lean_Expr_hash(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitApp___at_Lean_Meta_CheckAssignment_checkMVar___spec__36___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -495,6 +503,7 @@ LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_checkM static lean_object* l_Lean_Meta_CheckAssignment_check___closed__8; lean_object* l_EStateM_instMonadEStateM(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqBindingAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go(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 l_Lean_Meta_ParamInfo_isExplicit(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitMain___at_Lean_Meta_CheckAssignment_checkMVar___spec__43(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitMain___at_Lean_Meta_CheckAssignment_checkMVar___spec__35(lean_object*, lean_object*, lean_object*, lean_object*); @@ -572,6 +581,7 @@ LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_ LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Meta_CheckAssignment_checkMVar___spec__63___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_isProjectionFn___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unfoldNonProjFnDefEq___spec__1___closed__1; lean_object* l_Lean_mkApp(lean_object*, lean_object*); +static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont___closed__1; LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignmentQuick_check_visit___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_hasMVar(lean_object*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__2; @@ -584,6 +594,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unfoldNonP LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Std_PersistentArray_anyMAux___at_Lean_Meta_CheckAssignment_checkMVar___spec__30(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_checkpointDefEq___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqApp___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Std_PersistentHashMap_contains___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isCached___spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqArgs_processOtherArgs___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Lean_Meta_CheckAssignmentQuick_check(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -619,6 +630,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFV LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_checkMVar___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_contains___at___private_Lean_Class_0__Lean_checkOutParam___spec__1(lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqQuickOther___closed__4; +lean_object* l_Array_ofSubarray___rarg(lean_object*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___closed__1; LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitApp___at_Lean_Meta_CheckAssignment_checkMVar___spec__28(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_CheckAssignment_throwCheckAssignmentFailure___rarg___closed__2; @@ -643,7 +655,7 @@ LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_checkM static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps___closed__5; LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitApp___at_Lean_Meta_CheckAssignment_checkMVar___spec__12___boxed(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_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_14089_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_14581_(lean_object*); lean_object* lean_expr_update_lambda(lean_object*, uint8_t, lean_object*, lean_object*); static lean_object* l_Lean_Meta_CheckAssignment_throwCheckAssignmentFailure___rarg___closed__1; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_checkAssignment___spec__1(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -671,6 +683,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFV static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps___closed__3; LEAN_EXPORT lean_object* l_Std_PersistentHashMap_insert___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_cacheResult___spec__1(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_hasLooseBVars(lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_isReducible___at___private_Lean_Meta_Basic_0__Lean_Meta_getDefInfoTemp___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Std_HashSetImp_contains___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps_collectLetDepsAux___spec__1(lean_object*, lean_object*); lean_object* l_Lean_mkFreshFVarId___at___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAuxAux_process___spec__1___rarg(lean_object*, lean_object*); @@ -684,6 +697,7 @@ LEAN_EXPORT lean_object* l_List_replace___at___private_Lean_Meta_ExprDefEq_0__Le uint8_t l_Lean_Expr_isStringLit(lean_object*); static lean_object* l_Lean_Meta_CheckAssignment_check___closed__4; lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_pop(lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); lean_object* l___private_Lean_Expr_0__Lean_mkAppRangeAux(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps_addLetDeps___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*); @@ -722,6 +736,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqArg LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Meta_CheckAssignment_checkMVar___spec__55___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqArgs___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_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitMain___at_Lean_Meta_CheckAssignment_checkMVar___spec__27___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqArgsFirstPass___closed__1; LEAN_EXPORT lean_object* l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_cacheResult___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_isDefEqNat(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -754,6 +769,7 @@ lean_object* lean_usize_to_nat(size_t); LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_checkMVar___spec__31(lean_object*, lean_object*, size_t, size_t); LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_CheckAssignment_addAssignmentInfo___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_instInhabitedPersistentArrayNode(lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_isStructureLike(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_checkApp___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isProp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -807,6 +823,7 @@ static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar___c static lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqLeft___closed__4; LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitApp___at_Lean_Meta_CheckAssignment_checkMVar___spec__20___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_instMonadRef___rarg(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___spec__1(lean_object*, lean_object*, size_t, size_t); LEAN_EXPORT uint8_t l_Std_PersistentArray_anyMAux___at_Lean_Meta_CheckAssignment_checkMVar___spec__22(lean_object*, lean_object*); static lean_object* l_Lean_addTrace___at_Lean_Meta_CheckAssignment_checkFVar___spec__4___closed__2; LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps_collectLetDeclsFrom___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -40807,124 +40824,162 @@ lean_dec(x_1); return x_12; } } -LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(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_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(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; -x_9 = l_Lean_Meta_getConfig(x_4, x_5, x_6, x_7, x_8); -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 = l_Lean_Expr_mvarId_x21(x_1); -x_13 = l_Lean_Meta_getMVarDecl(x_12, x_4, x_5, x_6, x_7, x_11); -if (lean_obj_tag(x_13) == 0) +lean_object* x_9; lean_object* x_10; +x_9 = lean_array_get_size(x_2); +x_10 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8); +return x_10; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase___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: { -uint8_t x_14; -x_14 = !lean_is_exclusive(x_13); -if (x_14 == 0) -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; -x_15 = lean_ctor_get(x_13, 0); -x_16 = lean_ctor_get(x_13, 1); -x_17 = lean_ctor_get(x_15, 5); -lean_inc(x_17); -lean_dec(x_15); -x_18 = lean_nat_dec_eq(x_17, x_2); -lean_dec(x_17); -if (x_18 == 0) -{ -uint8_t x_19; -x_19 = lean_ctor_get_uint8(x_10, 3); -lean_dec(x_10); -if (x_19 == 0) -{ -uint8_t x_20; lean_object* x_21; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); +lean_object* x_9; +x_9 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean_dec(x_2); +return x_9; +} +} +LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4) { +_start: +{ +uint8_t x_5; +x_5 = lean_usize_dec_eq(x_3, x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_6 = lean_array_uget(x_2, x_3); +x_7 = lean_ctor_get(x_1, 1); +lean_inc(x_7); +x_8 = l_Lean_LocalContext_containsFVar(x_7, x_6); +if (x_8 == 0) +{ +size_t x_9; size_t x_10; +x_9 = 1; +x_10 = lean_usize_add(x_3, x_9); +x_3 = x_10; +goto _start; +} +else +{ +uint8_t x_12; lean_dec(x_1); -x_20 = 0; -x_21 = lean_box(x_20); -lean_ctor_set(x_13, 0, x_21); +x_12 = 1; +return x_12; +} +} +else +{ +uint8_t x_13; +lean_dec(x_1); +x_13 = 0; return x_13; } -else -{ -lean_object* x_22; -lean_free_object(x_13); -x_22 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_16); -return x_22; } } +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___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_dec(x_8); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_14 = l_Lean_Meta_checkAssignment(x_1, x_2, x_3, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; lean_object* x_17; +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +x_17 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont(x_4, x_5, x_6, x_1, x_7, x_2, x_3, x_9, x_10, x_11, x_12, x_16); +return x_17; +} else { -lean_object* x_23; -lean_free_object(x_13); -lean_dec(x_10); -x_23 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_16); +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_14, 1); +lean_inc(x_18); +lean_dec(x_14); +x_19 = lean_ctor_get(x_15, 0); +lean_inc(x_19); +lean_dec(x_15); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_2); +x_20 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps(x_2, x_19, x_9, x_10, x_11, x_12, x_18); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +if (lean_obj_tag(x_21) == 0) +{ +lean_object* x_22; lean_object* x_23; +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +x_23 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont(x_4, x_5, x_6, x_1, x_7, x_2, x_3, x_9, x_10, x_11, x_12, x_22); 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_13, 0); -x_25 = lean_ctor_get(x_13, 1); -lean_inc(x_25); +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_24 = lean_ctor_get(x_20, 1); lean_inc(x_24); -lean_dec(x_13); -x_26 = lean_ctor_get(x_24, 5); -lean_inc(x_26); -lean_dec(x_24); -x_27 = lean_nat_dec_eq(x_26, x_2); -lean_dec(x_26); -if (x_27 == 0) -{ -uint8_t x_28; -x_28 = lean_ctor_get_uint8(x_10, 3); -lean_dec(x_10); +lean_dec(x_20); +x_25 = lean_ctor_get(x_21, 0); +lean_inc(x_25); +lean_dec(x_21); +x_26 = lean_array_get_size(x_2); +x_27 = lean_unsigned_to_nat(0u); +x_28 = lean_nat_dec_lt(x_27, x_26); if (x_28 == 0) { -uint8_t x_29; lean_object* x_30; lean_object* x_31; -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_29 = 0; -x_30 = lean_box(x_29); -x_31 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_31, 0, x_30); -lean_ctor_set(x_31, 1, x_25); -return x_31; -} -else +lean_object* x_29; +lean_dec(x_26); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_4); +x_29 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_25, x_9, x_10, x_11, x_12, x_24); +if (lean_obj_tag(x_29) == 0) { -lean_object* x_32; -x_32 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_25); -return x_32; -} -} -else +lean_object* x_30; uint8_t x_31; +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +x_31 = lean_unbox(x_30); +if (x_31 == 0) { -lean_object* x_33; -lean_dec(x_10); -x_33 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_25); +lean_object* x_32; lean_object* x_33; +lean_dec(x_30); +x_32 = lean_ctor_get(x_29, 1); +lean_inc(x_32); +lean_dec(x_29); +x_33 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont(x_4, x_5, x_6, x_1, x_7, x_2, x_3, x_9, x_10, x_11, x_12, x_32); return x_33; } -} -} else { uint8_t x_34; +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_5); @@ -40932,26 +40987,1322 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_34 = !lean_is_exclusive(x_13); +x_34 = !lean_is_exclusive(x_29); if (x_34 == 0) { -return x_13; +lean_object* x_35; +x_35 = lean_ctor_get(x_29, 0); +lean_dec(x_35); +return x_29; } else { -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_13, 0); -x_36 = lean_ctor_get(x_13, 1); +lean_object* x_36; lean_object* x_37; +x_36 = lean_ctor_get(x_29, 1); lean_inc(x_36); -lean_inc(x_35); -lean_dec(x_13); -x_37 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_37, 0, x_35); +lean_dec(x_29); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_30); lean_ctor_set(x_37, 1, x_36); return x_37; } } } +else +{ +uint8_t x_38; +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_38 = !lean_is_exclusive(x_29); +if (x_38 == 0) +{ +return x_29; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_29, 0); +x_40 = lean_ctor_get(x_29, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_29); +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_42; +x_42 = lean_nat_dec_le(x_26, x_26); +if (x_42 == 0) +{ +lean_object* x_43; +lean_dec(x_26); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_4); +x_43 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_25, x_9, x_10, x_11, x_12, x_24); +if (lean_obj_tag(x_43) == 0) +{ +lean_object* x_44; uint8_t x_45; +x_44 = lean_ctor_get(x_43, 0); +lean_inc(x_44); +x_45 = lean_unbox(x_44); +if (x_45 == 0) +{ +lean_object* x_46; lean_object* x_47; +lean_dec(x_44); +x_46 = lean_ctor_get(x_43, 1); +lean_inc(x_46); +lean_dec(x_43); +x_47 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont(x_4, x_5, x_6, x_1, x_7, x_2, x_3, x_9, x_10, x_11, x_12, x_46); +return x_47; +} +else +{ +uint8_t x_48; +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_48 = !lean_is_exclusive(x_43); +if (x_48 == 0) +{ +lean_object* x_49; +x_49 = lean_ctor_get(x_43, 0); +lean_dec(x_49); +return x_43; +} +else +{ +lean_object* x_50; lean_object* x_51; +x_50 = lean_ctor_get(x_43, 1); +lean_inc(x_50); +lean_dec(x_43); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_44); +lean_ctor_set(x_51, 1, x_50); +return x_51; +} +} +} +else +{ +uint8_t x_52; +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_52 = !lean_is_exclusive(x_43); +if (x_52 == 0) +{ +return x_43; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_43, 0); +x_54 = lean_ctor_get(x_43, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_43); +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; +} +} +} +else +{ +size_t x_56; size_t x_57; uint8_t x_58; +x_56 = 0; +x_57 = lean_usize_of_nat(x_26); +lean_dec(x_26); +lean_inc(x_7); +x_58 = l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___spec__1(x_7, x_2, x_56, x_57); +if (x_58 == 0) +{ +lean_object* x_59; +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_4); +x_59 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_25, x_9, x_10, x_11, x_12, x_24); +if (lean_obj_tag(x_59) == 0) +{ +lean_object* x_60; uint8_t x_61; +x_60 = lean_ctor_get(x_59, 0); +lean_inc(x_60); +x_61 = lean_unbox(x_60); +if (x_61 == 0) +{ +lean_object* x_62; lean_object* x_63; +lean_dec(x_60); +x_62 = lean_ctor_get(x_59, 1); +lean_inc(x_62); +lean_dec(x_59); +x_63 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont(x_4, x_5, x_6, x_1, x_7, x_2, x_3, x_9, x_10, x_11, x_12, x_62); +return x_63; +} +else +{ +uint8_t x_64; +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_64 = !lean_is_exclusive(x_59); +if (x_64 == 0) +{ +lean_object* x_65; +x_65 = lean_ctor_get(x_59, 0); +lean_dec(x_65); +return x_59; +} +else +{ +lean_object* x_66; lean_object* x_67; +x_66 = lean_ctor_get(x_59, 1); +lean_inc(x_66); +lean_dec(x_59); +x_67 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_67, 0, x_60); +lean_ctor_set(x_67, 1, x_66); +return x_67; +} +} +} +else +{ +uint8_t x_68; +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_68 = !lean_is_exclusive(x_59); +if (x_68 == 0) +{ +return x_59; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_69 = lean_ctor_get(x_59, 0); +x_70 = lean_ctor_get(x_59, 1); +lean_inc(x_70); +lean_inc(x_69); +lean_dec(x_59); +x_71 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_71, 0, x_69); +lean_ctor_set(x_71, 1, x_70); +return x_71; +} +} +} +else +{ +lean_object* x_72; +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_25); +x_72 = l_Lean_Meta_isTypeCorrect(x_25, x_9, x_10, x_11, x_12, x_24); +if (lean_obj_tag(x_72) == 0) +{ +lean_object* x_73; uint8_t x_74; +x_73 = lean_ctor_get(x_72, 0); +lean_inc(x_73); +x_74 = lean_unbox(x_73); +lean_dec(x_73); +if (x_74 == 0) +{ +lean_object* x_75; lean_object* x_76; +lean_dec(x_25); +x_75 = lean_ctor_get(x_72, 1); +lean_inc(x_75); +lean_dec(x_72); +x_76 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont(x_4, x_5, x_6, x_1, x_7, x_2, x_3, x_9, x_10, x_11, x_12, x_75); +return x_76; +} +else +{ +lean_object* x_77; lean_object* x_78; +x_77 = lean_ctor_get(x_72, 1); +lean_inc(x_77); +lean_dec(x_72); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_4); +x_78 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_25, x_9, x_10, x_11, x_12, x_77); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; uint8_t x_80; +x_79 = lean_ctor_get(x_78, 0); +lean_inc(x_79); +x_80 = lean_unbox(x_79); +if (x_80 == 0) +{ +lean_object* x_81; lean_object* x_82; +lean_dec(x_79); +x_81 = lean_ctor_get(x_78, 1); +lean_inc(x_81); +lean_dec(x_78); +x_82 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont(x_4, x_5, x_6, x_1, x_7, x_2, x_3, x_9, x_10, x_11, x_12, x_81); +return x_82; +} +else +{ +uint8_t x_83; +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_83 = !lean_is_exclusive(x_78); +if (x_83 == 0) +{ +lean_object* x_84; +x_84 = lean_ctor_get(x_78, 0); +lean_dec(x_84); +return x_78; +} +else +{ +lean_object* x_85; lean_object* x_86; +x_85 = lean_ctor_get(x_78, 1); +lean_inc(x_85); +lean_dec(x_78); +x_86 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_86, 0, x_79); +lean_ctor_set(x_86, 1, x_85); +return x_86; +} +} +} +else +{ +uint8_t x_87; +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_87 = !lean_is_exclusive(x_78); +if (x_87 == 0) +{ +return x_78; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_88 = lean_ctor_get(x_78, 0); +x_89 = lean_ctor_get(x_78, 1); +lean_inc(x_89); +lean_inc(x_88); +lean_dec(x_78); +x_90 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_90, 0, x_88); +lean_ctor_set(x_90, 1, x_89); +return x_90; +} +} +} +} +else +{ +uint8_t x_91; +lean_dec(x_25); +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_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_91 = !lean_is_exclusive(x_72); +if (x_91 == 0) +{ +return x_72; +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; +x_92 = lean_ctor_get(x_72, 0); +x_93 = lean_ctor_get(x_72, 1); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_72); +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_12); +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_2); +lean_dec(x_1); +x_95 = !lean_is_exclusive(x_20); +if (x_95 == 0) +{ +return x_20; +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_96 = lean_ctor_get(x_20, 0); +x_97 = lean_ctor_get(x_20, 1); +lean_inc(x_97); +lean_inc(x_96); +lean_dec(x_20); +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_12); +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_2); +lean_dec(x_1); +x_99 = !lean_is_exclusive(x_14); +if (x_99 == 0) +{ +return x_14; +} +else +{ +lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_100 = lean_ctor_get(x_14, 0); +x_101 = lean_ctor_get(x_14, 1); +lean_inc(x_101); +lean_inc(x_100); +lean_dec(x_14); +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___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("processConstApprox.go "); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go(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; lean_object* x_15; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; +x_13 = l_Std_Range_forIn_loop___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___spec__1___closed__4; +x_39 = lean_st_ref_get(x_11, x_12); +x_40 = lean_ctor_get(x_39, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_40, 3); +lean_inc(x_41); +lean_dec(x_40); +x_42 = lean_ctor_get_uint8(x_41, sizeof(void*)*1); +lean_dec(x_41); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_39, 1); +lean_inc(x_43); +lean_dec(x_39); +x_44 = 0; +x_14 = x_44; +x_15 = x_43; +goto block_38; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; uint8_t x_49; +x_45 = lean_ctor_get(x_39, 1); +lean_inc(x_45); +lean_dec(x_39); +x_46 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__14(x_13, x_8, x_9, x_10, x_11, x_45); +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 = lean_unbox(x_47); +lean_dec(x_47); +x_14 = x_49; +x_15 = x_48; +goto block_38; +} +block_38: +{ +if (x_14 == 0) +{ +lean_object* x_16; lean_object* x_17; +x_16 = lean_box(0); +x_17 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___lambda__1(x_4, x_6, x_7, x_1, x_2, x_3, x_5, x_16, x_8, x_9, x_10, x_11, x_15); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_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_inc(x_1); +x_18 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_18, 0, x_1); +x_19 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__2; +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___private_Lean_Meta_ExprDefEq_0__Lean_Meta_CheckAssignment_addAssignmentInfo___closed__4; +x_22 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +lean_inc(x_6); +x_23 = lean_array_to_list(lean_box(0), x_6); +x_24 = lean_box(0); +x_25 = l_List_mapTRAux___at_Lean_MessageData_instCoeListExprMessageData___spec__1(x_23, x_24); +x_26 = l_Lean_MessageData_ofList(x_25); +lean_dec(x_25); +x_27 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_27, 0, x_22); +lean_ctor_set(x_27, 1, x_26); +x_28 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__10; +x_29 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +lean_inc(x_7); +x_30 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_30, 0, x_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_Std_Range_forIn_loop___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___spec__1___lambda__2___closed__9; +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_addTrace___at_Lean_Meta_processPostponed_loop___spec__1(x_13, x_33, x_8, x_9, x_10, x_11, x_15); +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_34, 1); +lean_inc(x_36); +lean_dec(x_34); +x_37 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___lambda__1(x_4, x_6, x_7, x_1, x_2, x_3, x_5, x_35, x_8, x_9, x_10, x_11, x_36); +return x_37; +} +} +} +} +static lean_object* _init_l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(1u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont(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: +{ +uint8_t x_13; +x_13 = l_Array_isEmpty___rarg(x_6); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_14 = l_Lean_instInhabitedExpr; +x_15 = l_Array_back___rarg(x_14, x_6); +x_16 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont___closed__1; +x_17 = lean_array_push(x_16, x_15); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_18 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps(x_17, x_7, x_8, x_9, x_10, x_11, x_12); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +x_21 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(x_1, x_2, x_3, x_8, x_9, x_10, x_11, x_20); +lean_dec(x_2); +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_18, 1); +lean_inc(x_22); +lean_dec(x_18); +x_23 = lean_ctor_get(x_19, 0); +lean_inc(x_23); +lean_dec(x_19); +x_24 = lean_array_pop(x_6); +x_25 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go(x_1, x_2, x_3, x_4, x_5, x_24, x_23, x_8, x_9, x_10, x_11, x_22); +return x_25; +} +} +else +{ +uint8_t x_26; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +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_26 = !lean_is_exclusive(x_18); +if (x_26 == 0) +{ +return x_18; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_18, 0); +x_28 = lean_ctor_get(x_18, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_18); +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; +} +} +} +else +{ +lean_object* x_30; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_30 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(x_1, x_2, x_3, x_8, x_9, x_10, x_11, x_12); +lean_dec(x_2); +return x_30; +} +} +} +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +size_t x_5; size_t x_6; uint8_t x_7; lean_object* x_8; +x_5 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_6 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_7 = l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___spec__1(x_1, x_2, x_5, x_6); +lean_dec(x_2); +x_8 = lean_box(x_7); +return x_8; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___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) { +_start: +{ +lean_object* x_15; uint8_t x_16; +x_15 = lean_array_get_size(x_8); +x_16 = lean_nat_dec_eq(x_15, x_1); +lean_dec(x_15); +if (x_16 == 0) +{ +lean_object* x_17; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_17 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(x_2, x_3, x_4, x_10, x_11, x_12, x_13, x_14); +lean_dec(x_3); +return x_17; +} +else +{ +lean_object* x_18; +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_4); +x_18 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps(x_8, x_4, x_10, x_11, x_12, x_13, x_14); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +x_21 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(x_2, x_3, x_4, x_10, x_11, x_12, x_13, x_20); +lean_dec(x_3); +return x_21; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_18, 1); +lean_inc(x_22); +lean_dec(x_18); +x_23 = lean_ctor_get(x_19, 0); +lean_inc(x_23); +lean_dec(x_19); +x_24 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go(x_2, x_3, x_4, x_5, x_6, x_7, x_23, x_10, x_11, x_12, x_13, x_22); +return x_24; +} +} +else +{ +uint8_t x_25; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +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_25 = !lean_is_exclusive(x_18); +if (x_25 == 0) +{ +return x_18; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_18, 0); +x_27 = lean_ctor_get(x_18, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_18); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; +} +} +} +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___lambda__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, 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; lean_object* x_15; +x_11 = l_Lean_Meta_getConfig(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); +lean_dec(x_11); +x_14 = l_Lean_Expr_mvarId_x21(x_1); +lean_inc(x_14); +x_15 = l_Lean_Meta_getMVarDecl(x_14, x_6, x_7, x_8, x_9, x_13); +if (lean_obj_tag(x_15) == 0) +{ +uint8_t x_16; +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_38; uint8_t x_39; +x_17 = lean_ctor_get(x_15, 0); +x_18 = lean_ctor_get(x_15, 1); +x_19 = lean_array_get_size(x_2); +x_38 = lean_ctor_get(x_17, 5); +lean_inc(x_38); +x_39 = lean_nat_dec_eq(x_38, x_19); +lean_dec(x_38); +if (x_39 == 0) +{ +uint8_t x_40; +x_40 = lean_ctor_get_uint8(x_12, 3); +lean_dec(x_12); +if (x_40 == 0) +{ +uint8_t x_41; lean_object* x_42; +lean_dec(x_19); +lean_dec(x_17); +lean_dec(x_14); +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_41 = 0; +x_42 = lean_box(x_41); +lean_ctor_set(x_15, 0, x_42); +return x_15; +} +else +{ +lean_object* x_43; uint8_t x_44; +lean_free_object(x_15); +x_43 = lean_unsigned_to_nat(0u); +x_44 = lean_nat_dec_eq(x_3, x_43); +if (x_44 == 0) +{ +lean_object* x_45; +x_45 = lean_box(0); +x_20 = x_45; +goto block_37; +} +else +{ +lean_object* x_46; +lean_dec(x_19); +lean_dec(x_17); +lean_dec(x_14); +lean_dec(x_3); +x_46 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(x_1, x_2, x_4, x_6, x_7, x_8, x_9, x_18); +lean_dec(x_2); +return x_46; +} +} +} +else +{ +lean_object* x_47; uint8_t x_48; +lean_free_object(x_15); +lean_dec(x_12); +x_47 = lean_unsigned_to_nat(0u); +x_48 = lean_nat_dec_eq(x_3, x_47); +if (x_48 == 0) +{ +lean_object* x_49; +x_49 = lean_box(0); +x_20 = x_49; +goto block_37; +} +else +{ +lean_object* x_50; +lean_dec(x_19); +lean_dec(x_17); +lean_dec(x_14); +lean_dec(x_3); +x_50 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(x_1, x_2, x_4, x_6, x_7, x_8, x_9, x_18); +lean_dec(x_2); +return x_50; +} +} +block_37: +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +lean_dec(x_20); +x_21 = lean_unsigned_to_nat(0u); +lean_inc(x_2); +x_22 = l_Array_toSubarray___rarg(x_2, x_21, x_3); +x_23 = l_Array_ofSubarray___rarg(x_22); +x_24 = lean_ctor_get(x_17, 2); +lean_inc(x_24); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_25 = l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(x_23, x_21, x_24, x_6, x_7, x_8, x_9, x_18); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +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_get_size(x_23); +x_29 = lean_nat_sub(x_19, x_28); +lean_dec(x_28); +lean_dec(x_19); +lean_inc(x_29); +x_30 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_30, 0, x_29); +x_31 = lean_alloc_closure((void*)(l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___lambda__1___boxed), 14, 7); +lean_closure_set(x_31, 0, x_29); +lean_closure_set(x_31, 1, x_1); +lean_closure_set(x_31, 2, x_2); +lean_closure_set(x_31, 3, x_4); +lean_closure_set(x_31, 4, x_14); +lean_closure_set(x_31, 5, x_17); +lean_closure_set(x_31, 6, x_23); +x_32 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(x_26, x_30, x_31, x_6, x_7, x_8, x_9, x_27); +return x_32; +} +else +{ +uint8_t x_33; +lean_dec(x_23); +lean_dec(x_19); +lean_dec(x_17); +lean_dec(x_14); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_33 = !lean_is_exclusive(x_25); +if (x_33 == 0) +{ +return x_25; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_25, 0); +x_35 = lean_ctor_get(x_25, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_25); +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_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_72; uint8_t x_73; +x_51 = lean_ctor_get(x_15, 0); +x_52 = lean_ctor_get(x_15, 1); +lean_inc(x_52); +lean_inc(x_51); +lean_dec(x_15); +x_53 = lean_array_get_size(x_2); +x_72 = lean_ctor_get(x_51, 5); +lean_inc(x_72); +x_73 = lean_nat_dec_eq(x_72, x_53); +lean_dec(x_72); +if (x_73 == 0) +{ +uint8_t x_74; +x_74 = lean_ctor_get_uint8(x_12, 3); +lean_dec(x_12); +if (x_74 == 0) +{ +uint8_t x_75; lean_object* x_76; lean_object* x_77; +lean_dec(x_53); +lean_dec(x_51); +lean_dec(x_14); +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_75 = 0; +x_76 = lean_box(x_75); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_52); +return x_77; +} +else +{ +lean_object* x_78; uint8_t x_79; +x_78 = lean_unsigned_to_nat(0u); +x_79 = lean_nat_dec_eq(x_3, x_78); +if (x_79 == 0) +{ +lean_object* x_80; +x_80 = lean_box(0); +x_54 = x_80; +goto block_71; +} +else +{ +lean_object* x_81; +lean_dec(x_53); +lean_dec(x_51); +lean_dec(x_14); +lean_dec(x_3); +x_81 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(x_1, x_2, x_4, x_6, x_7, x_8, x_9, x_52); +lean_dec(x_2); +return x_81; +} +} +} +else +{ +lean_object* x_82; uint8_t x_83; +lean_dec(x_12); +x_82 = lean_unsigned_to_nat(0u); +x_83 = lean_nat_dec_eq(x_3, x_82); +if (x_83 == 0) +{ +lean_object* x_84; +x_84 = lean_box(0); +x_54 = x_84; +goto block_71; +} +else +{ +lean_object* x_85; +lean_dec(x_53); +lean_dec(x_51); +lean_dec(x_14); +lean_dec(x_3); +x_85 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_defaultCase(x_1, x_2, x_4, x_6, x_7, x_8, x_9, x_52); +lean_dec(x_2); +return x_85; +} +} +block_71: +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; +lean_dec(x_54); +x_55 = lean_unsigned_to_nat(0u); +lean_inc(x_2); +x_56 = l_Array_toSubarray___rarg(x_2, x_55, x_3); +x_57 = l_Array_ofSubarray___rarg(x_56); +x_58 = lean_ctor_get(x_51, 2); +lean_inc(x_58); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_59 = l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(x_57, x_55, x_58, x_6, x_7, x_8, x_9, x_52); +if (lean_obj_tag(x_59) == 0) +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_60 = lean_ctor_get(x_59, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_59, 1); +lean_inc(x_61); +lean_dec(x_59); +x_62 = lean_array_get_size(x_57); +x_63 = lean_nat_sub(x_53, x_62); +lean_dec(x_62); +lean_dec(x_53); +lean_inc(x_63); +x_64 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_64, 0, x_63); +x_65 = lean_alloc_closure((void*)(l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___lambda__1___boxed), 14, 7); +lean_closure_set(x_65, 0, x_63); +lean_closure_set(x_65, 1, x_1); +lean_closure_set(x_65, 2, x_2); +lean_closure_set(x_65, 3, x_4); +lean_closure_set(x_65, 4, x_14); +lean_closure_set(x_65, 5, x_51); +lean_closure_set(x_65, 6, x_57); +x_66 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(x_60, x_64, x_65, x_6, x_7, x_8, x_9, x_61); +return x_66; +} +else +{ +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +lean_dec(x_57); +lean_dec(x_53); +lean_dec(x_51); +lean_dec(x_14); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_67 = lean_ctor_get(x_59, 0); +lean_inc(x_67); +x_68 = lean_ctor_get(x_59, 1); +lean_inc(x_68); +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + lean_ctor_release(x_59, 1); + x_69 = x_59; +} else { + lean_dec_ref(x_59); + 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_86; +lean_dec(x_14); +lean_dec(x_12); +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_86 = !lean_is_exclusive(x_15); +if (x_86 == 0) +{ +return x_15; +} +else +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_87 = lean_ctor_get(x_15, 0); +x_88 = lean_ctor_get(x_15, 1); +lean_inc(x_88); +lean_inc(x_87); +lean_dec(x_15); +x_89 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_89, 0, x_87); +lean_ctor_set(x_89, 1, x_88); +return x_89; +} +} +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(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; lean_object* x_12; lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; +x_10 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst___lambda__2___closed__2; +x_35 = lean_st_ref_get(x_8, x_9); +x_36 = lean_ctor_get(x_35, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_36, 3); +lean_inc(x_37); +lean_dec(x_36); +x_38 = lean_ctor_get_uint8(x_37, sizeof(void*)*1); +lean_dec(x_37); +if (x_38 == 0) +{ +lean_object* x_39; uint8_t x_40; +x_39 = lean_ctor_get(x_35, 1); +lean_inc(x_39); +lean_dec(x_35); +x_40 = 0; +x_11 = x_40; +x_12 = x_39; +goto block_34; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; +x_41 = lean_ctor_get(x_35, 1); +lean_inc(x_41); +lean_dec(x_35); +x_42 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__14(x_10, x_5, x_6, x_7, x_8, x_41); +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_unbox(x_43); +lean_dec(x_43); +x_11 = x_45; +x_12 = x_44; +goto block_34; +} +block_34: +{ +if (x_11 == 0) +{ +lean_object* x_13; lean_object* x_14; +x_13 = lean_box(0); +x_14 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___lambda__2(x_1, x_2, x_3, x_4, x_13, x_5, x_6, x_7, x_8, 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_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_inc(x_1); +x_15 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_15, 0, x_1); +x_16 = l_Std_Range_forIn_loop___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___spec__1___lambda__2___closed__9; +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___private_Lean_Meta_ExprDefEq_0__Lean_Meta_CheckAssignment_addAssignmentInfo___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); +lean_inc(x_2); +x_20 = lean_array_to_list(lean_box(0), x_2); +x_21 = lean_box(0); +x_22 = l_List_mapTRAux___at_Lean_MessageData_instCoeListExprMessageData___spec__1(x_20, x_21); +x_23 = l_Lean_MessageData_ofList(x_22); +lean_dec(x_22); +x_24 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_24, 0, x_19); +lean_ctor_set(x_24, 1, x_23); +x_25 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___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); +lean_inc(x_4); +x_27 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_27, 0, x_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_28); +lean_ctor_set(x_29, 1, x_16); +x_30 = l_Lean_addTrace___at_Lean_Meta_processPostponed_loop___spec__1(x_10, x_29, x_5, x_6, x_7, x_8, x_12); +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_30, 1); +lean_inc(x_32); +lean_dec(x_30); +x_33 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___lambda__2(x_1, x_2, x_3, x_4, x_31, x_5, x_6, x_7, x_8, x_32); +lean_dec(x_31); +return x_33; +} +} +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +_start: +{ +lean_object* x_15; +x_15 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___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); +lean_dec(x_9); +lean_dec(x_1); +return x_15; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___lambda__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, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox___lambda__2(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_EXPORT uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4) { _start: @@ -41032,421 +42383,427 @@ x_1 = lean_mk_string("typeError"); return x_1; } } -LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___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_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___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) { _start: { -lean_object* x_14; +lean_object* x_15; +lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); -lean_inc(x_9); lean_inc(x_1); -x_14 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps(x_1, x_2, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_14) == 0) -{ -lean_object* x_15; -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); +x_15 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_mkLambdaFVarsWithLetDeps(x_1, x_2, x_10, x_11, x_12, x_13, x_14); if (lean_obj_tag(x_15) == 0) { -uint8_t x_16; +lean_object* x_16; +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +if (lean_obj_tag(x_16) == 0) +{ +uint8_t 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_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); lean_dec(x_1); -x_16 = !lean_is_exclusive(x_14); -if (x_16 == 0) +x_17 = !lean_is_exclusive(x_15); +if (x_17 == 0) { -lean_object* x_17; uint8_t x_18; lean_object* x_19; -x_17 = lean_ctor_get(x_14, 0); -lean_dec(x_17); -x_18 = 0; -x_19 = lean_box(x_18); -lean_ctor_set(x_14, 0, x_19); -return x_14; +lean_object* x_18; uint8_t x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_15, 0); +lean_dec(x_18); +x_19 = 0; +x_20 = lean_box(x_19); +lean_ctor_set(x_15, 0, x_20); +return x_15; } else { -lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; -x_20 = lean_ctor_get(x_14, 1); -lean_inc(x_20); -lean_dec(x_14); -x_21 = 0; -x_22 = lean_box(x_21); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_20); -return x_23; +lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_24; +x_21 = lean_ctor_get(x_15, 1); +lean_inc(x_21); +lean_dec(x_15); +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 { -lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; -x_24 = lean_ctor_get(x_14, 1); -lean_inc(x_24); -lean_dec(x_14); -x_25 = lean_ctor_get(x_15, 0); +lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_25 = lean_ctor_get(x_15, 1); lean_inc(x_25); lean_dec(x_15); -x_26 = lean_unsigned_to_nat(0u); -x_27 = lean_nat_dec_lt(x_26, x_3); -if (x_27 == 0) +x_26 = lean_ctor_get(x_16, 0); +lean_inc(x_26); +lean_dec(x_16); +x_27 = lean_unsigned_to_nat(0u); +x_28 = lean_nat_dec_lt(x_27, x_3); +if (x_28 == 0) { -lean_object* x_28; +lean_object* x_29; +lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -lean_dec(x_3); lean_dec(x_1); -x_28 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_25, x_9, x_10, x_11, x_12, x_24); -return x_28; +x_29 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_26, x_10, x_11, x_12, x_13, x_25); +return x_29; } else { -uint8_t x_29; -x_29 = lean_nat_dec_le(x_3, x_3); -if (x_29 == 0) +uint8_t x_30; +x_30 = lean_nat_dec_le(x_3, x_3); +if (x_30 == 0) { -lean_object* x_30; +lean_object* x_31; +lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -lean_dec(x_3); lean_dec(x_1); -x_30 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_25, x_9, x_10, x_11, x_12, x_24); -return x_30; +x_31 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_26, x_10, x_11, x_12, x_13, x_25); +return x_31; } else { -size_t x_31; size_t x_32; uint8_t x_33; -x_31 = 0; -x_32 = lean_usize_of_nat(x_3); -x_33 = l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___spec__1(x_5, x_1, x_31, x_32); -if (x_33 == 0) -{ -lean_object* x_34; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_1); -x_34 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_25, x_9, x_10, x_11, x_12, x_24); -return x_34; -} -else +size_t x_32; size_t x_33; uint8_t x_34; +x_32 = 0; +x_33 = lean_usize_of_nat(x_3); +x_34 = l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___spec__1(x_5, x_1, x_32, x_33); +if (x_34 == 0) { lean_object* x_35; -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_25); -x_35 = l_Lean_Meta_isTypeCorrect(x_25, x_9, x_10, x_11, x_12, x_24); -if (lean_obj_tag(x_35) == 0) -{ -lean_object* x_36; uint8_t x_37; -x_36 = lean_ctor_get(x_35, 0); -lean_inc(x_36); -x_37 = lean_unbox(x_36); -lean_dec(x_36); -if (x_37 == 0) -{ -lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; lean_object* x_42; lean_object* x_80; lean_object* x_81; lean_object* x_82; uint8_t x_83; -x_38 = lean_ctor_get(x_35, 1); -lean_inc(x_38); -lean_dec(x_35); -x_39 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___lambda__1___closed__1; -x_40 = lean_name_mk_string(x_6, x_39); -x_80 = lean_st_ref_get(x_12, x_38); -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_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_41 = x_85; -x_42 = x_84; -goto block_79; -} -else -{ -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_40); -x_87 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__14(x_40, x_9, x_10, x_11, x_12, 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_41 = x_90; -x_42 = x_89; -goto block_79; -} -block_79: -{ -if (x_41 == 0) -{ -lean_object* x_43; -lean_dec(x_40); -lean_dec(x_25); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_7); -lean_inc(x_4); -x_43 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop(x_4, x_1, x_7, x_9, x_10, x_11, x_12, x_42); -if (lean_obj_tag(x_43) == 0) -{ -lean_object* x_44; uint8_t x_45; -x_44 = lean_ctor_get(x_43, 0); -lean_inc(x_44); -x_45 = lean_unbox(x_44); -if (x_45 == 0) -{ -lean_object* x_46; lean_object* x_47; -lean_dec(x_44); -x_46 = lean_ctor_get(x_43, 1); -lean_inc(x_46); -lean_dec(x_43); -x_47 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_4, x_3, x_7, x_9, x_10, x_11, x_12, x_46); -return x_47; -} -else -{ -uint8_t x_48; -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); -x_48 = !lean_is_exclusive(x_43); -if (x_48 == 0) -{ -lean_object* x_49; -x_49 = lean_ctor_get(x_43, 0); -lean_dec(x_49); -return x_43; -} -else -{ -lean_object* x_50; lean_object* x_51; -x_50 = lean_ctor_get(x_43, 1); -lean_inc(x_50); -lean_dec(x_43); -x_51 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_51, 0, x_44); -lean_ctor_set(x_51, 1, x_50); -return x_51; -} -} -} -else -{ -uint8_t x_52; -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); -x_52 = !lean_is_exclusive(x_43); -if (x_52 == 0) -{ -return x_43; -} -else -{ -lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_53 = lean_ctor_get(x_43, 0); -x_54 = lean_ctor_get(x_43, 1); -lean_inc(x_54); -lean_inc(x_53); -lean_dec(x_43); -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; -} -} -} -else -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; -lean_inc(x_4); -x_56 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_56, 0, x_4); -x_57 = l_Std_Range_forIn_loop___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___spec__1___lambda__2___closed__9; -x_58 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_58, 0, x_57); -lean_ctor_set(x_58, 1, x_56); -x_59 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__10; -x_60 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_60, 0, x_58); -lean_ctor_set(x_60, 1, x_59); -x_61 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_61, 0, x_25); -x_62 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_62, 0, x_60); -lean_ctor_set(x_62, 1, x_61); -x_63 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_63, 0, x_62); -lean_ctor_set(x_63, 1, x_57); -x_64 = l_Lean_addTrace___at_Lean_Meta_processPostponed_loop___spec__1(x_40, x_63, x_9, x_10, x_11, x_12, x_42); -x_65 = lean_ctor_get(x_64, 1); -lean_inc(x_65); -lean_dec(x_64); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_inc(x_7); -lean_inc(x_4); -x_66 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop(x_4, x_1, x_7, x_9, x_10, x_11, x_12, x_65); -if (lean_obj_tag(x_66) == 0) -{ -lean_object* x_67; uint8_t x_68; -x_67 = lean_ctor_get(x_66, 0); -lean_inc(x_67); -x_68 = lean_unbox(x_67); -if (x_68 == 0) -{ -lean_object* x_69; lean_object* x_70; -lean_dec(x_67); -x_69 = lean_ctor_get(x_66, 1); -lean_inc(x_69); -lean_dec(x_66); -x_70 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_4, x_3, x_7, x_9, x_10, x_11, x_12, x_69); -return x_70; -} -else -{ -uint8_t x_71; -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); -x_71 = !lean_is_exclusive(x_66); -if (x_71 == 0) -{ -lean_object* x_72; -x_72 = lean_ctor_get(x_66, 0); -lean_dec(x_72); -return x_66; -} -else -{ -lean_object* x_73; lean_object* x_74; -x_73 = lean_ctor_get(x_66, 1); -lean_inc(x_73); -lean_dec(x_66); -x_74 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_74, 0, x_67); -lean_ctor_set(x_74, 1, x_73); -return x_74; -} -} -} -else -{ -uint8_t x_75; -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); -x_75 = !lean_is_exclusive(x_66); -if (x_75 == 0) -{ -return x_66; -} -else -{ -lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_76 = lean_ctor_get(x_66, 0); -x_77 = lean_ctor_get(x_66, 1); -lean_inc(x_77); -lean_inc(x_76); -lean_dec(x_66); -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 -{ -lean_object* x_91; lean_object* x_92; +lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); -lean_dec(x_3); lean_dec(x_1); -x_91 = lean_ctor_get(x_35, 1); -lean_inc(x_91); -lean_dec(x_35); -x_92 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_25, x_9, x_10, x_11, x_12, x_91); -return x_92; -} -} -else -{ -uint8_t x_93; -lean_dec(x_25); -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_1); -x_93 = !lean_is_exclusive(x_35); -if (x_93 == 0) -{ +x_35 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_26, x_10, x_11, x_12, x_13, x_25); return x_35; } else { -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_35, 0); -x_95 = lean_ctor_get(x_35, 1); +lean_object* x_36; +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_26); +x_36 = l_Lean_Meta_isTypeCorrect(x_26, x_10, x_11, x_12, x_13, x_25); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; uint8_t x_38; +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +x_38 = lean_unbox(x_37); +lean_dec(x_37); +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; lean_object* x_43; lean_object* x_81; lean_object* x_82; lean_object* x_83; uint8_t x_84; +x_39 = lean_ctor_get(x_36, 1); +lean_inc(x_39); +lean_dec(x_36); +x_40 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___lambda__1___closed__1; +x_41 = lean_name_mk_string(x_6, x_40); +x_81 = lean_st_ref_get(x_13, x_39); +x_82 = lean_ctor_get(x_81, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_82, 3); +lean_inc(x_83); +lean_dec(x_82); +x_84 = lean_ctor_get_uint8(x_83, sizeof(void*)*1); +lean_dec(x_83); +if (x_84 == 0) +{ +lean_object* x_85; uint8_t x_86; +x_85 = lean_ctor_get(x_81, 1); +lean_inc(x_85); +lean_dec(x_81); +x_86 = 0; +x_42 = x_86; +x_43 = x_85; +goto block_80; +} +else +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; uint8_t x_91; +x_87 = lean_ctor_get(x_81, 1); +lean_inc(x_87); +lean_dec(x_81); +lean_inc(x_41); +x_88 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__14(x_41, x_10, x_11, x_12, x_13, x_87); +x_89 = lean_ctor_get(x_88, 0); +lean_inc(x_89); +x_90 = lean_ctor_get(x_88, 1); +lean_inc(x_90); +lean_dec(x_88); +x_91 = lean_unbox(x_89); +lean_dec(x_89); +x_42 = x_91; +x_43 = x_90; +goto block_80; +} +block_80: +{ +if (x_42 == 0) +{ +lean_object* x_44; +lean_dec(x_41); +lean_dec(x_26); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_7); +lean_inc(x_1); +lean_inc(x_4); +x_44 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop(x_4, x_1, x_7, x_10, x_11, x_12, x_13, x_43); +if (lean_obj_tag(x_44) == 0) +{ +lean_object* x_45; uint8_t x_46; +x_45 = lean_ctor_get(x_44, 0); +lean_inc(x_45); +x_46 = lean_unbox(x_45); +if (x_46 == 0) +{ +lean_object* x_47; lean_object* x_48; +lean_dec(x_45); +x_47 = lean_ctor_get(x_44, 1); +lean_inc(x_47); +lean_dec(x_44); +x_48 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_4, x_1, x_8, x_7, x_10, x_11, x_12, x_13, x_47); +return x_48; +} +else +{ +uint8_t x_49; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_1); +x_49 = !lean_is_exclusive(x_44); +if (x_49 == 0) +{ +lean_object* x_50; +x_50 = lean_ctor_get(x_44, 0); +lean_dec(x_50); +return x_44; +} +else +{ +lean_object* x_51; lean_object* x_52; +x_51 = lean_ctor_get(x_44, 1); +lean_inc(x_51); +lean_dec(x_44); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_45); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +else +{ +uint8_t x_53; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_1); +x_53 = !lean_is_exclusive(x_44); +if (x_53 == 0) +{ +return x_44; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_44, 0); +x_55 = lean_ctor_get(x_44, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_44); +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; +} +} +} +else +{ +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_inc(x_4); +x_57 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_57, 0, x_4); +x_58 = l_Std_Range_forIn_loop___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_isDefEqEtaStruct_go___spec__1___lambda__2___closed__9; +x_59 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_59, 0, x_58); +lean_ctor_set(x_59, 1, x_57); +x_60 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__10; +x_61 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_61, 0, x_59); +lean_ctor_set(x_61, 1, x_60); +x_62 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_62, 0, x_26); +x_63 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_63, 0, x_61); +lean_ctor_set(x_63, 1, x_62); +x_64 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_64, 0, x_63); +lean_ctor_set(x_64, 1, x_58); +x_65 = l_Lean_addTrace___at_Lean_Meta_processPostponed_loop___spec__1(x_41, x_64, x_10, x_11, x_12, x_13, x_43); +x_66 = lean_ctor_get(x_65, 1); +lean_inc(x_66); +lean_dec(x_65); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_7); +lean_inc(x_1); +lean_inc(x_4); +x_67 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop(x_4, x_1, x_7, x_10, x_11, x_12, x_13, x_66); +if (lean_obj_tag(x_67) == 0) +{ +lean_object* x_68; uint8_t x_69; +x_68 = lean_ctor_get(x_67, 0); +lean_inc(x_68); +x_69 = lean_unbox(x_68); +if (x_69 == 0) +{ +lean_object* x_70; lean_object* x_71; +lean_dec(x_68); +x_70 = lean_ctor_get(x_67, 1); +lean_inc(x_70); +lean_dec(x_67); +x_71 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_4, x_1, x_8, x_7, x_10, x_11, x_12, x_13, x_70); +return x_71; +} +else +{ +uint8_t x_72; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_1); +x_72 = !lean_is_exclusive(x_67); +if (x_72 == 0) +{ +lean_object* x_73; +x_73 = lean_ctor_get(x_67, 0); +lean_dec(x_73); +return x_67; +} +else +{ +lean_object* x_74; lean_object* x_75; +x_74 = lean_ctor_get(x_67, 1); +lean_inc(x_74); +lean_dec(x_67); +x_75 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_75, 0, x_68); +lean_ctor_set(x_75, 1, x_74); +return x_75; +} +} +} +else +{ +uint8_t x_76; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_4); +lean_dec(x_1); +x_76 = !lean_is_exclusive(x_67); +if (x_76 == 0) +{ +return x_67; +} +else +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_67, 0); +x_78 = lean_ctor_get(x_67, 1); +lean_inc(x_78); +lean_inc(x_77); +lean_dec(x_67); +x_79 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +return x_79; +} +} +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_92 = lean_ctor_get(x_36, 1); +lean_inc(x_92); +lean_dec(x_36); +x_93 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign(x_4, x_26, x_10, x_11, x_12, x_13, x_92); +return x_93; +} +} +else +{ +uint8_t x_94; +lean_dec(x_26); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_1); +x_94 = !lean_is_exclusive(x_36); +if (x_94 == 0) +{ +return x_36; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_95 = lean_ctor_get(x_36, 0); +x_96 = lean_ctor_get(x_36, 1); +lean_inc(x_96); lean_inc(x_95); -lean_inc(x_94); -lean_dec(x_35); -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_dec(x_36); +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; } } } @@ -41456,34 +42813,34 @@ return x_96; } else { -uint8_t x_97; +uint8_t x_98; +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_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); lean_dec(x_1); -x_97 = !lean_is_exclusive(x_14); -if (x_97 == 0) +x_98 = !lean_is_exclusive(x_15); +if (x_98 == 0) { -return x_14; +return x_15; } else { -lean_object* x_98; lean_object* x_99; lean_object* x_100; -x_98 = lean_ctor_get(x_14, 0); -x_99 = lean_ctor_get(x_14, 1); +lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_99 = lean_ctor_get(x_15, 0); +x_100 = lean_ctor_get(x_15, 1); +lean_inc(x_100); lean_inc(x_99); -lean_inc(x_98); -lean_dec(x_14); -x_100 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_100, 0, x_98); -lean_ctor_set(x_100, 1, x_99); -return x_100; +lean_dec(x_15); +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; } } } @@ -41522,7 +42879,6 @@ if (x_15 == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_dec(x_12); -lean_dec(x_3); lean_inc(x_7); lean_inc(x_5); x_16 = l_Lean_Meta_instantiateMVars(x_5, x_6, x_7, x_8, x_9, x_13); @@ -41552,6 +42908,7 @@ lean_inc(x_23); if (lean_obj_tag(x_23) == 0) { lean_object* x_24; lean_object* x_25; +lean_dec(x_14); lean_dec(x_2); x_24 = lean_ctor_get(x_22, 1); lean_inc(x_24); @@ -41561,6 +42918,7 @@ lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); +lean_inc(x_4); lean_inc(x_1); x_25 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop(x_1, x_4, x_5, x_6, x_7, x_8, x_9, x_24); if (lean_obj_tag(x_25) == 0) @@ -41576,18 +42934,19 @@ lean_dec(x_26); x_28 = lean_ctor_get(x_25, 1); lean_inc(x_28); lean_dec(x_25); -x_29 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_1, x_14, x_5, x_6, x_7, x_8, x_9, x_28); +x_29 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_1, x_4, x_3, x_5, x_6, x_7, x_8, x_9, x_28); return x_29; } else { uint8_t x_30; -lean_dec(x_14); 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); lean_dec(x_1); x_30 = !lean_is_exclusive(x_25); if (x_30 == 0) @@ -41613,12 +42972,13 @@ return x_33; else { uint8_t x_34; -lean_dec(x_14); 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); lean_dec(x_1); x_34 = !lean_is_exclusive(x_25); if (x_34 == 0) @@ -41694,7 +43054,8 @@ if (x_41 == 0) lean_object* x_43; lean_object* x_44; lean_object* x_45; x_43 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__2; x_44 = lean_box(0); -x_45 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___lambda__1(x_4, x_39, x_14, x_1, x_2, x_43, x_5, x_44, x_6, x_7, x_8, x_9, x_42); +x_45 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___lambda__1(x_4, x_39, x_14, x_1, x_2, x_43, x_5, x_3, x_44, x_6, x_7, x_8, x_9, x_42); +lean_dec(x_14); return x_45; } else @@ -41740,8 +43101,9 @@ x_63 = lean_ctor_get(x_61, 1); lean_inc(x_63); lean_dec(x_61); x_64 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__2; -x_65 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___lambda__1(x_4, x_39, x_14, x_1, x_2, x_64, x_5, x_62, x_6, x_7, x_8, x_9, x_63); +x_65 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___lambda__1(x_4, x_39, x_14, x_1, x_2, x_64, x_5, x_3, x_62, x_6, x_7, x_8, x_9, x_63); lean_dec(x_62); +lean_dec(x_14); return x_65; } } @@ -41757,6 +43119,7 @@ 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_78 = !lean_is_exclusive(x_22); @@ -41783,12 +43146,14 @@ else { lean_object* x_82; lean_dec(x_17); +lean_dec(x_14); lean_dec(x_2); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); +lean_inc(x_4); lean_inc(x_1); x_82 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop(x_1, x_4, x_5, x_6, x_7, x_8, x_9, x_18); if (lean_obj_tag(x_82) == 0) @@ -41804,18 +43169,19 @@ lean_dec(x_83); x_85 = lean_ctor_get(x_82, 1); lean_inc(x_85); lean_dec(x_82); -x_86 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_1, x_14, x_5, x_6, x_7, x_8, x_9, x_85); +x_86 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_1, x_4, x_3, x_5, x_6, x_7, x_8, x_9, x_85); return x_86; } else { uint8_t x_87; -lean_dec(x_14); 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); lean_dec(x_1); x_87 = !lean_is_exclusive(x_82); if (x_87 == 0) @@ -41841,12 +43207,13 @@ return x_90; else { uint8_t x_91; -lean_dec(x_14); 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); lean_dec(x_1); x_91 = !lean_is_exclusive(x_82); if (x_91 == 0) @@ -41891,72 +43258,71 @@ lean_inc(x_97); x_99 = lean_array_fset(x_4, x_3, x_97); if (lean_obj_tag(x_97) == 1) { -lean_object* x_100; lean_object* x_101; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; uint8_t x_131; +lean_object* x_100; lean_object* x_101; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; uint8_t x_130; x_100 = lean_ctor_get(x_97, 0); lean_inc(x_100); -x_126 = lean_unsigned_to_nat(0u); +x_125 = lean_unsigned_to_nat(0u); lean_inc(x_3); lean_inc(x_99); -x_127 = l_Array_toSubarray___rarg(x_99, x_126, x_3); -x_128 = lean_ctor_get(x_127, 0); +x_126 = l_Array_toSubarray___rarg(x_99, x_125, x_3); +x_127 = lean_ctor_get(x_126, 0); +lean_inc(x_127); +x_128 = lean_ctor_get(x_126, 1); lean_inc(x_128); -x_129 = lean_ctor_get(x_127, 1); +x_129 = lean_ctor_get(x_126, 2); lean_inc(x_129); -x_130 = lean_ctor_get(x_127, 2); -lean_inc(x_130); +lean_dec(x_126); +x_130 = lean_nat_dec_lt(x_128, x_129); +if (x_130 == 0) +{ +lean_object* x_131; +lean_dec(x_129); +lean_dec(x_128); lean_dec(x_127); -x_131 = lean_nat_dec_lt(x_129, x_130); -if (x_131 == 0) -{ -lean_object* x_132; -lean_dec(x_130); -lean_dec(x_129); -lean_dec(x_128); lean_dec(x_97); -x_132 = lean_box(0); -x_101 = x_132; -goto block_125; +x_131 = lean_box(0); +x_101 = x_131; +goto block_124; } else { -lean_object* x_133; uint8_t x_134; -x_133 = lean_array_get_size(x_128); -x_134 = lean_nat_dec_le(x_130, x_133); -lean_dec(x_133); -if (x_134 == 0) +lean_object* x_132; uint8_t x_133; +x_132 = lean_array_get_size(x_127); +x_133 = lean_nat_dec_le(x_129, x_132); +lean_dec(x_132); +if (x_133 == 0) { -lean_object* x_135; -lean_dec(x_130); +lean_object* x_134; lean_dec(x_129); lean_dec(x_128); +lean_dec(x_127); lean_dec(x_97); -x_135 = lean_box(0); -x_101 = x_135; -goto block_125; +x_134 = lean_box(0); +x_101 = x_134; +goto block_124; } else { -size_t x_136; size_t x_137; uint8_t x_138; +size_t x_135; size_t x_136; uint8_t x_137; +x_135 = lean_usize_of_nat(x_128); +lean_dec(x_128); x_136 = lean_usize_of_nat(x_129); lean_dec(x_129); -x_137 = lean_usize_of_nat(x_130); -lean_dec(x_130); -x_138 = l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___spec__2(x_97, x_128, x_136, x_137); -lean_dec(x_128); +x_137 = l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___spec__2(x_97, x_127, x_135, x_136); +lean_dec(x_127); lean_dec(x_97); -if (x_138 == 0) +if (x_137 == 0) { -lean_object* x_139; -x_139 = lean_box(0); -x_101 = x_139; -goto block_125; +lean_object* x_138; +x_138 = lean_box(0); +x_101 = x_138; +goto block_124; } else { -lean_object* x_140; +lean_object* x_139; lean_dec(x_100); lean_dec(x_12); -lean_dec(x_3); lean_dec(x_2); lean_inc(x_9); lean_inc(x_8); @@ -41965,89 +43331,89 @@ lean_inc(x_6); lean_inc(x_5); lean_inc(x_99); lean_inc(x_1); -x_140 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop(x_1, x_99, x_5, x_6, x_7, x_8, x_9, x_98); -if (lean_obj_tag(x_140) == 0) +x_139 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop(x_1, x_99, x_5, x_6, x_7, x_8, x_9, x_98); +if (lean_obj_tag(x_139) == 0) { -lean_object* x_141; uint8_t x_142; -x_141 = lean_ctor_get(x_140, 0); -lean_inc(x_141); -x_142 = lean_unbox(x_141); -if (x_142 == 0) +lean_object* x_140; uint8_t x_141; +x_140 = lean_ctor_get(x_139, 0); +lean_inc(x_140); +x_141 = lean_unbox(x_140); +if (x_141 == 0) { -lean_object* x_143; lean_object* x_144; lean_object* x_145; -lean_dec(x_141); -x_143 = lean_ctor_get(x_140, 1); -lean_inc(x_143); +lean_object* x_142; lean_object* x_143; lean_dec(x_140); -x_144 = lean_array_get_size(x_99); -lean_dec(x_99); -x_145 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_1, x_144, x_5, x_6, x_7, x_8, x_9, x_143); -return x_145; +x_142 = lean_ctor_get(x_139, 1); +lean_inc(x_142); +lean_dec(x_139); +x_143 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_1, x_99, x_3, x_5, x_6, x_7, x_8, x_9, x_142); +return x_143; } else { -uint8_t x_146; +uint8_t x_144; lean_dec(x_99); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); +lean_dec(x_3); lean_dec(x_1); -x_146 = !lean_is_exclusive(x_140); -if (x_146 == 0) +x_144 = !lean_is_exclusive(x_139); +if (x_144 == 0) { -lean_object* x_147; -x_147 = lean_ctor_get(x_140, 0); -lean_dec(x_147); -return x_140; +lean_object* x_145; +x_145 = lean_ctor_get(x_139, 0); +lean_dec(x_145); +return x_139; } else { -lean_object* x_148; lean_object* x_149; -x_148 = lean_ctor_get(x_140, 1); -lean_inc(x_148); -lean_dec(x_140); -x_149 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_149, 0, x_141); -lean_ctor_set(x_149, 1, x_148); -return x_149; +lean_object* x_146; lean_object* x_147; +x_146 = lean_ctor_get(x_139, 1); +lean_inc(x_146); +lean_dec(x_139); +x_147 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_147, 0, x_140); +lean_ctor_set(x_147, 1, x_146); +return x_147; } } } else { -uint8_t x_150; +uint8_t x_148; lean_dec(x_99); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); +lean_dec(x_3); lean_dec(x_1); -x_150 = !lean_is_exclusive(x_140); -if (x_150 == 0) +x_148 = !lean_is_exclusive(x_139); +if (x_148 == 0) { -return x_140; +return x_139; } else { -lean_object* x_151; lean_object* x_152; lean_object* x_153; -x_151 = lean_ctor_get(x_140, 0); -x_152 = lean_ctor_get(x_140, 1); -lean_inc(x_152); -lean_inc(x_151); -lean_dec(x_140); -x_153 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_153, 0, x_151); -lean_ctor_set(x_153, 1, x_152); -return x_153; +lean_object* x_149; lean_object* x_150; lean_object* x_151; +x_149 = lean_ctor_get(x_139, 0); +x_150 = lean_ctor_get(x_139, 1); +lean_inc(x_150); +lean_inc(x_149); +lean_dec(x_139); +x_151 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_151, 0, x_149); +lean_ctor_set(x_151, 1, x_150); +return x_151; } } } } } -block_125: +block_124: { lean_object* x_102; uint8_t x_103; lean_dec(x_101); @@ -42074,7 +43440,6 @@ lean_dec(x_12); if (x_107 == 0) { lean_object* x_108; -lean_dec(x_3); lean_dec(x_2); lean_inc(x_9); lean_inc(x_8); @@ -42092,84 +43457,84 @@ lean_inc(x_109); x_110 = lean_unbox(x_109); if (x_110 == 0) { -lean_object* x_111; lean_object* x_112; lean_object* x_113; +lean_object* x_111; lean_object* x_112; lean_dec(x_109); x_111 = lean_ctor_get(x_108, 1); lean_inc(x_111); lean_dec(x_108); -x_112 = lean_array_get_size(x_99); -lean_dec(x_99); -x_113 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_1, x_112, x_5, x_6, x_7, x_8, x_9, x_111); -return x_113; +x_112 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_1, x_99, x_3, x_5, x_6, x_7, x_8, x_9, x_111); +return x_112; } else { -uint8_t x_114; +uint8_t x_113; lean_dec(x_99); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -lean_dec(x_1); -x_114 = !lean_is_exclusive(x_108); -if (x_114 == 0) -{ -lean_object* x_115; -x_115 = lean_ctor_get(x_108, 0); -lean_dec(x_115); -return x_108; -} -else -{ -lean_object* x_116; lean_object* x_117; -x_116 = lean_ctor_get(x_108, 1); -lean_inc(x_116); -lean_dec(x_108); -x_117 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_117, 0, x_109); -lean_ctor_set(x_117, 1, x_116); -return x_117; -} -} -} -else -{ -uint8_t x_118; -lean_dec(x_99); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_1); -x_118 = !lean_is_exclusive(x_108); -if (x_118 == 0) -{ -return x_108; -} -else -{ -lean_object* x_119; lean_object* x_120; lean_object* x_121; -x_119 = lean_ctor_get(x_108, 0); -x_120 = lean_ctor_get(x_108, 1); -lean_inc(x_120); -lean_inc(x_119); -lean_dec(x_108); -x_121 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_121, 0, x_119); -lean_ctor_set(x_121, 1, x_120); -return x_121; -} -} -} -else -{ -lean_object* x_122; lean_object* x_123; -x_122 = lean_unsigned_to_nat(1u); -x_123 = lean_nat_add(x_3, x_122); lean_dec(x_3); -x_3 = x_123; +lean_dec(x_1); +x_113 = !lean_is_exclusive(x_108); +if (x_113 == 0) +{ +lean_object* x_114; +x_114 = lean_ctor_get(x_108, 0); +lean_dec(x_114); +return x_108; +} +else +{ +lean_object* x_115; lean_object* x_116; +x_115 = lean_ctor_get(x_108, 1); +lean_inc(x_115); +lean_dec(x_108); +x_116 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_116, 0, x_109); +lean_ctor_set(x_116, 1, x_115); +return x_116; +} +} +} +else +{ +uint8_t x_117; +lean_dec(x_99); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_1); +x_117 = !lean_is_exclusive(x_108); +if (x_117 == 0) +{ +return x_108; +} +else +{ +lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_118 = lean_ctor_get(x_108, 0); +x_119 = lean_ctor_get(x_108, 1); +lean_inc(x_119); +lean_inc(x_118); +lean_dec(x_108); +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; +x_121 = lean_unsigned_to_nat(1u); +x_122 = lean_nat_add(x_3, x_121); +lean_dec(x_3); +x_3 = x_122; x_4 = x_99; x_10 = x_98; goto _start; @@ -42179,10 +43544,9 @@ goto _start; } else { -lean_object* x_154; +lean_object* x_152; lean_dec(x_97); lean_dec(x_12); -lean_dec(x_3); lean_dec(x_2); lean_inc(x_9); lean_inc(x_8); @@ -42191,90 +43555,90 @@ lean_inc(x_6); lean_inc(x_5); lean_inc(x_99); lean_inc(x_1); -x_154 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop(x_1, x_99, x_5, x_6, x_7, x_8, x_9, x_98); -if (lean_obj_tag(x_154) == 0) +x_152 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignmentFOApprox_loop(x_1, x_99, x_5, x_6, x_7, x_8, x_9, x_98); +if (lean_obj_tag(x_152) == 0) { -lean_object* x_155; uint8_t x_156; -x_155 = lean_ctor_get(x_154, 0); +lean_object* x_153; uint8_t x_154; +x_153 = lean_ctor_get(x_152, 0); +lean_inc(x_153); +x_154 = lean_unbox(x_153); +if (x_154 == 0) +{ +lean_object* x_155; lean_object* x_156; +lean_dec(x_153); +x_155 = lean_ctor_get(x_152, 1); lean_inc(x_155); -x_156 = lean_unbox(x_155); -if (x_156 == 0) -{ -lean_object* x_157; lean_object* x_158; lean_object* x_159; -lean_dec(x_155); -x_157 = lean_ctor_get(x_154, 1); -lean_inc(x_157); -lean_dec(x_154); -x_158 = lean_array_get_size(x_99); -lean_dec(x_99); -x_159 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_1, x_158, x_5, x_6, x_7, x_8, x_9, x_157); -return x_159; +lean_dec(x_152); +x_156 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox(x_1, x_99, x_3, x_5, x_6, x_7, x_8, x_9, x_155); +return x_156; } else { -uint8_t x_160; +uint8_t x_157; lean_dec(x_99); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); +lean_dec(x_3); lean_dec(x_1); -x_160 = !lean_is_exclusive(x_154); -if (x_160 == 0) +x_157 = !lean_is_exclusive(x_152); +if (x_157 == 0) { -lean_object* x_161; -x_161 = lean_ctor_get(x_154, 0); -lean_dec(x_161); -return x_154; +lean_object* x_158; +x_158 = lean_ctor_get(x_152, 0); +lean_dec(x_158); +return x_152; } else { -lean_object* x_162; lean_object* x_163; -x_162 = lean_ctor_get(x_154, 1); +lean_object* x_159; lean_object* x_160; +x_159 = lean_ctor_get(x_152, 1); +lean_inc(x_159); +lean_dec(x_152); +x_160 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_160, 0, x_153); +lean_ctor_set(x_160, 1, x_159); +return x_160; +} +} +} +else +{ +uint8_t x_161; +lean_dec(x_99); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_1); +x_161 = !lean_is_exclusive(x_152); +if (x_161 == 0) +{ +return x_152; +} +else +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; +x_162 = lean_ctor_get(x_152, 0); +x_163 = lean_ctor_get(x_152, 1); +lean_inc(x_163); lean_inc(x_162); -lean_dec(x_154); -x_163 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_163, 0, x_155); -lean_ctor_set(x_163, 1, x_162); -return x_163; -} -} -} -else -{ -uint8_t x_164; -lean_dec(x_99); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_1); -x_164 = !lean_is_exclusive(x_154); -if (x_164 == 0) -{ -return x_154; -} -else -{ -lean_object* x_165; lean_object* x_166; lean_object* x_167; -x_165 = lean_ctor_get(x_154, 0); -x_166 = lean_ctor_get(x_154, 1); -lean_inc(x_166); -lean_inc(x_165); -lean_dec(x_154); -x_167 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_167, 0, x_165); -lean_ctor_set(x_167, 1, x_166); -return x_167; +lean_dec(x_152); +x_164 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_164, 0, x_162); +lean_ctor_set(x_164, 1, x_163); +return x_164; } } } } else { -uint8_t x_168; +uint8_t x_165; lean_dec(x_12); lean_dec(x_9); lean_dec(x_8); @@ -42285,23 +43649,23 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_168 = !lean_is_exclusive(x_96); -if (x_168 == 0) +x_165 = !lean_is_exclusive(x_96); +if (x_165 == 0) { return x_96; } else { -lean_object* x_169; lean_object* x_170; lean_object* x_171; -x_169 = lean_ctor_get(x_96, 0); -x_170 = lean_ctor_get(x_96, 1); -lean_inc(x_170); -lean_inc(x_169); +lean_object* x_166; lean_object* x_167; lean_object* x_168; +x_166 = lean_ctor_get(x_96, 0); +x_167 = lean_ctor_get(x_96, 1); +lean_inc(x_167); +lean_inc(x_166); lean_dec(x_96); -x_171 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_171, 0, x_169); -lean_ctor_set(x_171, 1, x_170); -return x_171; +x_168 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_168, 0, x_166); +lean_ctor_set(x_168, 1, x_167); +return x_168; } } } @@ -42336,13 +43700,14 @@ x_8 = lean_box(x_7); return x_8; } } -LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___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_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { -lean_object* x_14; -x_14 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___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); -return x_14; +lean_object* x_15; +x_15 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___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); +lean_dec(x_9); +lean_dec(x_3); +return x_15; } } LEAN_EXPORT lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment___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) { @@ -65122,7 +66487,7 @@ lean_dec(x_3); return x_9; } } -LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_14089_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_14581_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -65622,6 +66987,12 @@ l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst___lambda__2___closed__1 lean_mark_persistent(l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst___lambda__2___closed__1); l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst___lambda__2___closed__2 = _init_l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst___lambda__2___closed__2(); lean_mark_persistent(l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_assignConst___lambda__2___closed__2); +l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__1 = _init_l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__1(); +lean_mark_persistent(l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__1); +l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__2 = _init_l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__2(); +lean_mark_persistent(l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go___closed__2); +l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont___closed__1 = _init_l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont___closed__1(); +lean_mark_persistent(l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processConstApprox_go_cont___closed__1); l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___lambda__1___closed__1 = _init_l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___lambda__1___closed__1(); lean_mark_persistent(l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___lambda__1___closed__1); l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___closed__1 = _init_l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___closed__1(); @@ -65722,7 +67093,7 @@ l_Lean_Meta_isExprDefEqAuxImpl___closed__1 = _init_l_Lean_Meta_isExprDefEqAuxImp lean_mark_persistent(l_Lean_Meta_isExprDefEqAuxImpl___closed__1); l_Lean_Meta_isExprDefEqAuxImpl___closed__2 = _init_l_Lean_Meta_isExprDefEqAuxImpl___closed__2(); lean_mark_persistent(l_Lean_Meta_isExprDefEqAuxImpl___closed__2); -res = l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_14089_(lean_io_mk_world()); +res = l_Lean_Meta_initFn____x40_Lean_Meta_ExprDefEq___hyg_14581_(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));