From 7f0060b2144ffe2527db686e665b734c2ecf0f67 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Fri, 4 Feb 2022 18:25:35 -0800 Subject: [PATCH] chore: update stage0 --- stage0/src/CMakeLists.txt | 6 - .../Structural/SmartUnfolding.lean | 6 +- stage0/src/Lean/Elab/Tactic/Match.lean | 2 +- stage0/src/Lean/Meta/Basic.lean | 2 + stage0/src/Lean/Meta/CongrTheorems.lean | 173 + stage0/src/Lean/Meta/FunInfo.lean | 2 + stage0/src/Lean/Meta/WHNF.lean | 6 +- stage0/src/Lean/Server/FileWorker.lean | 11 +- stage0/src/Leanpkg/.gitignore | 1 - stage0/src/Leanpkg/Build.lean | 104 - stage0/src/Leanpkg/Git.lean | 40 - stage0/src/Leanpkg/LeanVersion.lean | 29 - stage0/src/Leanpkg/Manifest.lean | 87 - stage0/src/Leanpkg/Proc.lean | 20 - stage0/src/Leanpkg/Resolve.lean | 84 - stage0/src/Leanpkg/Toml.lean | 72 - stage0/src/shell/CMakeLists.txt | 76 +- stage0/src/stdlib.make.in | 5 +- stage0/stdlib/Lean/Compiler/ExternAttr.c | 4 +- stage0/stdlib/Lean/Elab/PreDefinition/Main.c | 6 +- .../PreDefinition/Structural/SmartUnfolding.c | 4 +- stage0/stdlib/Lean/Elab/Quotation.c | 4 +- stage0/stdlib/Lean/Elab/Tactic/Match.c | 143 +- stage0/stdlib/Lean/Meta/Basic.c | 106 +- stage0/stdlib/Lean/Meta/CongrTheorems.c | 4337 +++++++++++++++-- stage0/stdlib/Lean/Meta/FunInfo.c | 367 +- stage0/stdlib/Lean/Meta/WHNF.c | 26 +- .../Delaborator/TopDownAnalyze.c | 4 +- stage0/stdlib/Lean/Server/FileWorker.c | 1123 ++--- 29 files changed, 5142 insertions(+), 1708 deletions(-) delete mode 100644 stage0/src/Leanpkg/.gitignore delete mode 100644 stage0/src/Leanpkg/Build.lean delete mode 100644 stage0/src/Leanpkg/Git.lean delete mode 100644 stage0/src/Leanpkg/LeanVersion.lean delete mode 100644 stage0/src/Leanpkg/Manifest.lean delete mode 100644 stage0/src/Leanpkg/Proc.lean delete mode 100644 stage0/src/Leanpkg/Resolve.lean delete mode 100644 stage0/src/Leanpkg/Toml.lean diff --git a/stage0/src/CMakeLists.txt b/stage0/src/CMakeLists.txt index 0852b9f1c5..ba3bbf1b30 100644 --- a/stage0/src/CMakeLists.txt +++ b/stage0/src/CMakeLists.txt @@ -470,12 +470,6 @@ add_custom_target(leanshared ALL VERBATIM) if(${STAGE} GREATER 0) - add_custom_target(leanpkg ALL - WORKING_DIRECTORY ${LEAN_SOURCE_DIR} - DEPENDS leanshared - COMMAND $(MAKE) -f ${CMAKE_BINARY_DIR}/stdlib.make Leanpkg - VERBATIM) - if(NOT EXISTS ${LEAN_SOURCE_DIR}/lake/Lake.lean) message(FATAL_ERROR "src/lake does not exist. Please check out the Lake submodule using `git submodule update --init src/lake`.") endif() diff --git a/stage0/src/Lean/Elab/PreDefinition/Structural/SmartUnfolding.lean b/stage0/src/Lean/Elab/PreDefinition/Structural/SmartUnfolding.lean index 32d7c098e1..aab5ba1195 100644 --- a/stage0/src/Lean/Elab/PreDefinition/Structural/SmartUnfolding.lean +++ b/stage0/src/Lean/Elab/PreDefinition/Structural/SmartUnfolding.lean @@ -17,12 +17,12 @@ partial def addSmartUnfoldingDefAux (preDef : PreDefinition) (recArgPos : Nat) : } where /-- - Auxiliary method for annotating `match`-alternatives with `markSmartUnfoldingMatch` and `markSmartUnfoldigMatchAlt`. + Auxiliary method for annotating `match`-alternatives with `markSmartUnfoldingMatch` and `markSmartUnfoldingMatchAlt`. It uses the following approach: - Whenever it finds a `match` application `e` s.t. `recArgHasLooseBVarsAt preDef.declName recArgPos e`, it marks the `match` with `markSmartUnfoldingMatch`, and each alternative that does not contain a nested marked `match` - is marked with `markSmartUnfoldigMatchAlt`. + is marked with `markSmartUnfoldingMatchAlt`. Recall that the condition `recArgHasLooseBVarsAt preDef.declName recArgPos e` is the one used at `mkBRecOn`. -/ @@ -52,7 +52,7 @@ where let containsSUnfoldMatch := Option.isSome <| altBody.find? fun e => smartUnfoldingMatch? e |>.isSome if !containsSUnfoldMatch then let altBody ← mkLambdaFVars xs[numParams:xs.size] altBody - let altBody := markSmartUnfoldigMatchAlt altBody + let altBody := markSmartUnfoldingMatchAlt altBody mkLambdaFVars xs[0:numParams] altBody else mkLambdaFVars xs altBody diff --git a/stage0/src/Lean/Elab/Tactic/Match.lean b/stage0/src/Lean/Elab/Tactic/Match.lean index 1444254784..8eddc607d2 100644 --- a/stage0/src/Lean/Elab/Tactic/Match.lean +++ b/stage0/src/Lean/Elab/Tactic/Match.lean @@ -63,7 +63,7 @@ private def mkAuxiliaryMatchTerm (parentTag : Name) (matchTac : Syntax) : MacroM def evalMatch : Tactic := fun stx => do let tag ← getMainTag let (matchTerm, cases) ← liftMacroM <| mkAuxiliaryMatchTerm tag stx - let refineMatchTerm ← `(tactic| refine $matchTerm) + let refineMatchTerm ← `(tactic| refine no_implicit_lambda% $matchTerm) let stxNew := mkNullNode (#[refineMatchTerm] ++ cases) withMacroExpansion stx stxNew <| evalTactic stxNew diff --git a/stage0/src/Lean/Meta/Basic.lean b/stage0/src/Lean/Meta/Basic.lean index ae1aa68542..5bd016337d 100644 --- a/stage0/src/Lean/Meta/Basic.lean +++ b/stage0/src/Lean/Meta/Basic.lean @@ -85,6 +85,8 @@ structure ParamInfo where binderInfo : BinderInfo := BinderInfo.default hasFwdDeps : Bool := false backDeps : Array Nat := #[] + isProp : Bool := false + isDecInst : Bool := false deriving Inhabited def ParamInfo.isImplicit (p : ParamInfo) : Bool := diff --git a/stage0/src/Lean/Meta/CongrTheorems.lean b/stage0/src/Lean/Meta/CongrTheorems.lean index e93593ebf8..727ec3d469 100644 --- a/stage0/src/Lean/Meta/CongrTheorems.lean +++ b/stage0/src/Lean/Meta/CongrTheorems.lean @@ -26,6 +26,11 @@ inductive CongrArgKind where The lemma contains three parameters for this kind of argument `a_i`, `b_i` and `eq_i : HEq a_i b_i`. `a_i` and `b_i` represent the left and right hand sides, and `eq_i` is a proof for their heterogeneous equality. -/ heq + | /-- + For congr-simp theorems only. Indicates a decidable instance argument. + The lemma contains two arguments [a_i : Decidable ...] [b_i : Decidable ...] -/ + subsingletonInst + deriving Inhabited structure CongrTheorem where type : Expr @@ -110,4 +115,172 @@ where def mkHCongr (f : Expr) : MetaM CongrTheorem := do mkHCongrWithArity f (← getFunInfo f).getArity +/-- + Ensure that all dependencies for `congr_arg_kind::Eq` are `congr_arg_kind::Fixed`. +-/ +private def fixKindsForDependencies (info : FunInfo) (kinds : Array CongrArgKind) : Array CongrArgKind := Id.run do + let mut kinds := kinds + for i in [:info.paramInfo.size] do + for j in [i+1:info.paramInfo.size] do + if info.paramInfo[j].backDeps.contains i then + if kinds[j] matches CongrArgKind.eq || kinds[j] matches CongrArgKind.fixed then + -- We must fix `i` because there is a `j` that depends on `i` and `j` is not cast-fixed. + kinds := kinds.set! i CongrArgKind.fixed + break + return kinds + +/-- + (Try to) cast expression `e` to the given type using the equations `eqs`. + `deps` contains the indices of the relevant equalities. + Remark: deps is sorted. -/ +private partial def mkCast (e : Expr) (type : Expr) (deps : Array Nat) (eqs : Array (Option Expr)) : MetaM Expr := do + let rec go (i : Nat) (type : Expr) : MetaM Expr := do + if i < deps.size then + match eqs[deps[i]] with + | none => go (i+1) type + | some major => + let some (_, lhs, rhs) := (← inferType major).eq? | unreachable! + if (← dependsOn type major.fvarId!) then + let motive ← mkLambdaFVars #[rhs, major] type + let typeNew := type.replaceFVar rhs lhs |>.replaceFVar major (← mkEqRefl lhs) + let minor ← go (i+1) typeNew + mkEqRec motive minor major + else + let motive ← mkLambdaFVars #[rhs] type + let typeNew := type.replaceFVar rhs lhs + let minor ← go (i+1) typeNew + mkEqNDRec motive minor major + else + return e + go 0 type + +private def hasCastLike (kinds : Array CongrArgKind) : Bool := + kinds.any fun kind => kind matches CongrArgKind.cast || kind matches CongrArgKind.subsingletonInst + +private def withNext (type : Expr) (k : Expr → Expr → MetaM α) : MetaM α := do + forallBoundedTelescope type (some 1) fun xs type => k xs[0] type + +/-- + Create a congruence theorem that is useful for the simplifier. +-/ +partial def mkCongrSimpWithArity? (f : Expr) (numArgs : Nat) : MetaM (Option CongrTheorem) := do + let info ← getFunInfo f + let kinds := getKinds info + if let some result ← mk? f info kinds then + return some result + else if hasCastLike kinds then + -- Simplify kinds and try again + let kinds := kinds.map fun kind => + if kind matches CongrArgKind.cast || kind matches CongrArgKind.subsingletonInst then CongrArgKind.fixed else kind + mk? f info kinds + else + return none +where + /-- + Create a congruence theorem that is useful for the simplifier. + In this kind of theorem, if the i-th argument is a `cast` argument, then the theorem + contains an input `a_i` representing the i-th argument in the left-hand-side, and + it appears with a cast (e.g., `Eq.drec ... a_i ...`) in the right-hand-side. + The idea is that the right-hand-side of this lemma "tells" the simplifier + how the resulting term looks like. -/ + mk? (f : Expr) (info : FunInfo) (kinds : Array CongrArgKind) : MetaM (Option CongrTheorem) := do + try + let fType ← inferType f + forallBoundedTelescope fType kinds.size fun lhss xType => do + if lhss.size != kinds.size then return none + let rec go (i : Nat) (rhss : Array Expr) (eqs : Array (Option Expr)) (hyps : Array Expr) : MetaM CongrTheorem := do + if i == kinds.size then + let lhs := mkAppN f lhss + let rhs := mkAppN f rhss + let type ← mkForallFVars hyps (← mkEq lhs rhs) + let proof ← mkProof type kinds + return { type, proof, argKinds := kinds } + else + let hyps := hyps.push lhss[i] + match kinds[i] with + | CongrArgKind.heq => unreachable! + | CongrArgKind.fixedNoParam => unreachable! + | CongrArgKind.eq => + let localDecl ← getLocalDecl lhss[i].fvarId! + withLocalDecl localDecl.userName localDecl.binderInfo localDecl.type fun rhs => do + withLocalDeclD ((`e).appendIndexAfter (eqs.size+1)) (← mkEq lhss[i] rhs) fun eq => do + go (i+1) (rhss.push rhs) (eqs.push eq) (hyps.push rhs |>.push eq) + | CongrArgKind.fixed => go (i+1) (rhss.push lhss[i]) (eqs.push none) hyps + | CongrArgKind.cast => + let rhsType := (← inferType lhss[i]).replaceFVars (lhss[:rhss.size]) rhss + let rhs ← mkCast lhss[i] rhsType info.paramInfo[i].backDeps eqs + go (i+1) (rhss.push rhs) (eqs.push none) hyps + | CongrArgKind.subsingletonInst => + let rhsType := (← inferType lhss[i]).replaceFVars (lhss[:rhss.size]) rhss + withLocalDecl (← getLocalDecl lhss[i].fvarId!).userName BinderInfo.instImplicit rhsType fun rhs => + go (i+1) (rhss.push rhs) (eqs.push none) (hyps.push rhs) + return some (← go 0 #[] #[] #[]) + catch _ => + return none + + mkProof (type : Expr) (kinds : Array CongrArgKind) : MetaM Expr := do + let rec go (i : Nat) (type : Expr) : MetaM Expr := do + if i == kinds.size then + let some (_, lhs, _) := type.eq? | unreachable! + mkEqRefl lhs + else + withNext type fun lhs type => do + match kinds[i] with + | CongrArgKind.heq => unreachable! + | CongrArgKind.fixedNoParam => unreachable! + | CongrArgKind.fixed => mkLambdaFVars #[lhs] (← go (i+1) type) + | CongrArgKind.cast => mkLambdaFVars #[lhs] (← go (i+1) type) + | CongrArgKind.eq => + let typeSub := type.bindingBody!.bindingBody!.instantiate #[(← mkEqRefl lhs), lhs] + withNext type fun rhs type => + withNext type fun heq type => do + let motive ← mkLambdaFVars #[rhs, heq] type + let proofSub ← go (i+1) typeSub + mkLambdaFVars #[lhs, rhs, heq] (← mkEqRec motive proofSub heq) + | CongrArgKind.subsingletonInst => + let typeSub := type.bindingBody!.instantiate #[lhs] + withNext type fun rhs type => do + let motive ← mkLambdaFVars #[rhs] type + let proofSub ← go (i+1) typeSub + let heq ← mkAppM ``Subsingleton.elim #[lhs, rhs] + mkLambdaFVars #[lhs, rhs] (← mkEqNDRec motive proofSub heq) + go 0 type + + getKinds (info : FunInfo) : Array CongrArgKind := Id.run do + /- The default `CongrArgKind` is `eq`, which allows `simp` to rewrite this + argument. However, if there are references from `i` to `j`, we cannot + rewrite both `i` and `j`. So we must change the `CongrArgKind` at + either `i` or `j`. In principle, if there is a dependency with `i` + appearing after `j`, then we set `j` to `fixed` (or `cast`). But there is + an optimization: if `i` is a subsingleton, we can fix it instead of + `j`, since all subsingletons are equal anyway. The fixing happens in + two loops: one for the special cases, and one for the general case. -/ + let mut result := #[] + for i in [:info.paramInfo.size] do + if info.resultDeps.contains i then + result := result.push CongrArgKind.fixed + else if info.paramInfo[i].isProp then + result := result.push CongrArgKind.cast + else if info.paramInfo[i].isInstImplicit then + if shouldUseSubsingletonInst info result i then + result := result.push CongrArgKind.subsingletonInst + else + result := result.push CongrArgKind.fixed + else + result := result.push CongrArgKind.eq + return fixKindsForDependencies info result + + /-- + Test whether we should use `subsingletonInst` kind for instances which depend on `eq`. + (Otherwise `fixKindsForDependencies`will downgrade them to Fixed -/ + shouldUseSubsingletonInst (info : FunInfo) (kinds : Array CongrArgKind) (i : Nat) : Bool := Id.run do + if info.paramInfo[i].isDecInst then + for j in info.paramInfo[i].backDeps do + if kinds[j] matches CongrArgKind.eq then + return true + return false + +def mkCongrSimp? (f : Expr) : MetaM (Option CongrTheorem) := do + mkCongrSimpWithArity? f (← getFunInfo f).getArity + end Lean.Meta diff --git a/stage0/src/Lean/Meta/FunInfo.lean b/stage0/src/Lean/Meta/FunInfo.lean index c77d86bad6..3ba872c87f 100644 --- a/stage0/src/Lean/Meta/FunInfo.lean +++ b/stage0/src/Lean/Meta/FunInfo.lean @@ -64,6 +64,8 @@ private def getFunInfoAux (fn : Expr) (maxArgs? : Option Nat) : MetaM FunInfo := pinfo := pinfo.push { backDeps := backDeps binderInfo := decl.binderInfo + isProp := (← isProp decl.type) + isDecInst := (← forallTelescopeReducing decl.type fun _ type => return type.isAppOf ``Decidable) } let resultDeps := collectDeps fvars type pinfo := updateHasFwdDeps pinfo resultDeps diff --git a/stage0/src/Lean/Meta/WHNF.lean b/stage0/src/Lean/Meta/WHNF.lean index 35ab03baa8..966ca2c47a 100644 --- a/stage0/src/Lean/Meta/WHNF.lean +++ b/stage0/src/Lean/Meta/WHNF.lean @@ -39,7 +39,7 @@ def smartUnfoldingMatch? (e : Expr) : Option Expr := annotation? `sunfoldMatch e /-- Add auxiliary annotation to indicate expression `e` (a `match` alternative rhs) was successfully reduced by smart unfolding. -/ -def markSmartUnfoldigMatchAlt (e : Expr) : Expr := +def markSmartUnfoldingMatchAlt (e : Expr) : Expr := mkAnnotation `sunfoldMatchAlt e def smartUnfoldingMatchAlt? (e : Expr) : Option Expr := @@ -472,7 +472,7 @@ partial def whnfCore (e : Expr) : MetaM Expr := | _ => unreachable! /-- - Recall that `_sunfold` auxiliary definitions contains the markers: `markSmartUnfoldigMatch` (*) and `markSmartUnfoldigMatchAlt` (**). + Recall that `_sunfold` auxiliary definitions contains the markers: `markSmartUnfoldingMatch` (*) and `markSmartUnfoldingMatchAlt` (**). For example, consider the following definition ``` def r (i j : Nat) : Nat := @@ -496,7 +496,7 @@ partial def whnfCore (e : Expr) : MetaM Expr := | Nat.succ j => (**) r i j ``` - `match` expressions marked with `markSmartUnfoldigMatch` (*) must be reduced, otherwise the resulting term is not definitionally + `match` expressions marked with `markSmartUnfoldingMatch` (*) must be reduced, otherwise the resulting term is not definitionally equal to the given expression. The recursion may be interrupted as soon as the annotation `markSmartUnfoldingAlt` (**) is reached. For example, the term `r i j.succ.succ` reduces to the definitionally equal term `i + i * r i j` diff --git a/stage0/src/Lean/Server/FileWorker.lean b/stage0/src/Lean/Server/FileWorker.lean index 31acbe4d3c..b33e0bd4d2 100644 --- a/stage0/src/Lean/Server/FileWorker.lean +++ b/stage0/src/Lean/Server/FileWorker.lean @@ -182,9 +182,6 @@ section Initialization let stderr ← IO.ofExcept stderr.get match (← lakeProc.wait) with | 0 => - -- ignore any output up to the last line - -- TODO: leanpkg should instead redirect nested stdout output to stderr - let stdout := stdout.split (· == '\n') |>.getLast! let Except.ok (paths : LeanPaths) ← pure (Json.parse stdout >>= fromJson?) | throwServerError s!"invalid output from `{cmdStr}`:\n{stdout}\nstderr:\n{stderr}" initSearchPath (← getBuildDir) paths.oleanPath @@ -201,13 +198,9 @@ section Initialization let lakePath ← match (← IO.getEnv "LAKE") with | some path => pure <| System.FilePath.mk path | none => - let lakePath := - -- backward compatibility, kill when `leanpkg` is removed - if (← System.FilePath.pathExists "leanpkg.toml") && !(← System.FilePath.pathExists "lakefile.lean") then "leanpkg" - else "lake" let lakePath ← match (← IO.getEnv "LEAN_SYSROOT") with - | some path => pure <| System.FilePath.mk path / "bin" / lakePath - | _ => pure <| (← appDir) / lakePath + | some path => pure <| System.FilePath.mk path / "bin" / "lake" + | _ => pure <| (← appDir) / "lake" pure <| lakePath.withExtension System.FilePath.exeExtension let (headerEnv, msgLog) ← try if let some path := m.uri.toPath? then diff --git a/stage0/src/Leanpkg/.gitignore b/stage0/src/Leanpkg/.gitignore deleted file mode 100644 index b62f4dcf77..0000000000 --- a/stage0/src/Leanpkg/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/leanpkg/config_vars.lean diff --git a/stage0/src/Leanpkg/Build.lean b/stage0/src/Leanpkg/Build.lean deleted file mode 100644 index 49580f5645..0000000000 --- a/stage0/src/Leanpkg/Build.lean +++ /dev/null @@ -1,104 +0,0 @@ -/- -Copyright (c) 2021 Sebastian Ullrich. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Sebastian Ullrich --/ -import Lean.Data.Name -import Lean.Elab.Import -import Leanpkg.Proc - -open Lean -open System - -namespace Leanpkg.Build - -def buildPath : FilePath := "build" -def tempBuildPath := buildPath / "temp" - -structure Config where - pkg : Name - leanArgs : List String - leanPath : String - -- things like `leanpkg.toml` and olean roots of dependencies that should also trigger rebuilds - moreDeps : List FilePath - -structure Context extends Config where - parents : List Name := [] - moreDepsMTime : IO.FS.SystemTime - -structure Result where - maxMTime : IO.FS.SystemTime - task : Task (Except IO.Error Unit) - deriving Inhabited - -structure State where - modTasks : NameMap Result := ∅ - -abbrev BuildM := ReaderT Context <| StateT State IO - -partial def buildModule (mod : Name) : BuildM Result := do - let ctx ← read - if ctx.parents.contains mod then - -- cyclic import - let cycle := mod :: (ctx.parents.partition (· != mod)).1 ++ [mod] - let cycle := cycle.map (s!" {·}") - throw <| IO.userError s!"import cycle detected:\n{"\n".intercalate cycle}" - - if let some r := (← get).modTasks.find? mod then - -- already visited - return r - - let leanFile := modToFilePath "." mod "lean" - let leanMData ← leanFile.metadata - - -- recursively build dependencies and calculate transitive `maxMTime` - let (imports, _, _) ← Elab.parseImports (← IO.FS.readFile leanFile) leanFile.toString - let localImports := imports.filter (·.module.getRoot == ctx.pkg) - let deps ← localImports.mapM fun i => - withReader (fun ctx => { ctx with parents := mod :: ctx.parents }) <| - buildModule i.module - let depMTimes := deps.map (·.maxMTime) - let maxMTime := List.maximum? (leanMData.modified :: ctx.moreDepsMTime :: depMTimes) |>.get! - - -- check whether we have an up-to-date .olean - let oleanFile := modToFilePath buildPath mod "olean" - try - if (← oleanFile.metadata).modified >= maxMTime then - let r := { maxMTime, task := Task.pure (Except.ok ()) } - modify fun st => { st with modTasks := st.modTasks.insert mod r } - return r - catch - | IO.Error.noFileOrDirectory .. => pure () - | e => throw e - - let task ← IO.mapTasks (tasks := deps.map (·.task)) fun rs => do - if let some e := rs.findSome? (fun | Except.error e => some e | Except.ok _ => none) then - -- propagate failure - throw e - try - let cFile := modToFilePath tempBuildPath mod "c" - IO.FS.createDirAll oleanFile.parent.get! - IO.FS.createDirAll cFile.parent.get! - execCmd { - cmd := (← IO.appDir) / "lean" |>.withExtension FilePath.exeExtension |>.toString - args := ctx.leanArgs.toArray ++ #["-o", oleanFile.toString, "-c", cFile.toString, leanFile.toString] - env := #[("LEAN_PATH", ctx.leanPath)] - } - catch e => - -- print errors early - IO.eprintln e - throw e - - let r := { maxMTime, task := task } - modify fun st => { st with modTasks := st.modTasks.insert mod r } - return r - -def buildModules (cfg : Config) (mods : List Name) : IO Unit := do - let moreDepsMTime := (← cfg.moreDeps.mapM (·.metadata)).map (·.modified) |>.maximum? |>.getD ⟨0, 0⟩ - let rs ← mods.mapM buildModule |>.run { toConfig := cfg, moreDepsMTime } |>.run' {} - for r in rs do - if let Except.error _ ← IO.wait r.task then - -- actual error has already been printed above - throw <| IO.userError "Build failed." - -end Leanpkg.Build diff --git a/stage0/src/Leanpkg/Git.lean b/stage0/src/Leanpkg/Git.lean deleted file mode 100644 index a323e6cbb8..0000000000 --- a/stage0/src/Leanpkg/Git.lean +++ /dev/null @@ -1,40 +0,0 @@ -/- -Copyright (c) 2017 Microsoft Corporation. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Gabriel Ebner, Sebastian Ullrich --/ -import Leanpkg.LeanVersion - -open System - -namespace Leanpkg - -def upstreamGitBranch := - "master" - -def gitdefaultRevision : Option String → String - | none => upstreamGitBranch - | some branch => branch - -def gitParseRevision (gitRepo : FilePath) (rev : String) : IO String := do - let rev ← IO.Process.run {cmd := "git", args := #["rev-parse", "-q", "--verify", rev], cwd := gitRepo} - pure rev.trim -- remove newline at end - -def gitHeadRevision (gitRepo : FilePath) : IO String := - gitParseRevision gitRepo "HEAD" - -def gitParseOriginRevision (gitRepo : FilePath) (rev : String) : IO String := - (gitParseRevision gitRepo $ "origin/" ++ rev) <|> gitParseRevision gitRepo rev - <|> throw (IO.userError s!"cannot find revision {rev} in repository {gitRepo}") - -def gitLatestOriginRevision (gitRepo : FilePath) (branch : Option String) : IO String := do - discard <| IO.Process.run {cmd := "git", args := #["fetch"], cwd := gitRepo} - gitParseOriginRevision gitRepo (gitdefaultRevision branch) - -def gitRevisionExists (gitRepo : FilePath) (rev : String) : IO Bool := do - try - discard <| gitParseRevision gitRepo (rev ++ "^{commit}") - pure true - catch _ => pure false - -end Leanpkg diff --git a/stage0/src/Leanpkg/LeanVersion.lean b/stage0/src/Leanpkg/LeanVersion.lean deleted file mode 100644 index b1cfeb7208..0000000000 --- a/stage0/src/Leanpkg/LeanVersion.lean +++ /dev/null @@ -1,29 +0,0 @@ -/- -Copyright (c) 2017 Microsoft Corporation. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Gabriel Ebner, Sebastian Ullrich --/ -namespace Leanpkg - -def leanVersionStringCore := - s!"{Lean.version.major}.{Lean.version.minor}.{Lean.version.patch}" - -def origin := "leanprover/lean4" - -def leanVersionString := - if Lean.version.isRelease then - s!"{origin}:{leanVersionStringCore}" - else if Lean.version.specialDesc ≠ "" then - s!"{origin}:{Lean.version.specialDesc}" - else - s!"{origin}:master" - -def uiLeanVersionString := -if Lean.version.isRelease then - leanVersionStringCore -else if Lean.version.specialDesc ≠ "" then - Lean.version.specialDesc -else - s!"master ({leanVersionStringCore})" - -end Leanpkg diff --git a/stage0/src/Leanpkg/Manifest.lean b/stage0/src/Leanpkg/Manifest.lean deleted file mode 100644 index 15e8613160..0000000000 --- a/stage0/src/Leanpkg/Manifest.lean +++ /dev/null @@ -1,87 +0,0 @@ -/- -Copyright (c) 2017 Microsoft Corporation. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Gabriel Ebner, Sebastian Ullrich --/ -import Leanpkg.Toml -import Leanpkg.LeanVersion - -open System - -namespace Leanpkg - -inductive Source where - | path (dir : System.FilePath) : Source - | git (url rev : String) (branch : Option String) : Source - -namespace Source - -def fromToml (v : Toml.Value) : OptionM Source := - (do let Toml.Value.str dir ← v.lookup "path" | none - pure <| path ⟨dir⟩) <|> - (do let Toml.Value.str url ← v.lookup "git" | none - let Toml.Value.str rev ← v.lookup "rev" | none - match v.lookup "branch" with - | none => pure <| git url rev none - | some (Toml.Value.str branch) => pure <| git url rev (some branch) - | _ => none) - -def toToml : Source → Toml.Value - | path dir => Toml.Value.table [("path", Toml.Value.str dir.toString)] - | git url rev none => - Toml.Value.table [("git", Toml.Value.str url), ("rev", Toml.Value.str rev)] - | git url rev (some branch) => - Toml.Value.table [("git", Toml.Value.str url), ("branch", Toml.Value.str branch), ("rev", Toml.Value.str rev)] - -end Source - -structure Dependency where - name : String - src : Source - -structure Manifest where - name : String - version : String - leanVersion : String := leanVersionString - timeout : Option Nat := none - path : Option FilePath := none - dependencies : List Dependency := [] - -namespace Manifest - -def effectivePath (m : Manifest) : FilePath := - m.path.getD ⟨"."⟩ - -def fromToml (t : Toml.Value) : Option Manifest := OptionM.run do - let pkg ← t.lookup "package" - let Toml.Value.str n ← pkg.lookup "name" | none - let Toml.Value.str ver ← pkg.lookup "version" | none - let leanVer ← match pkg.lookup "lean_version" with - | some (Toml.Value.str leanVer) => some leanVer - | none => some leanVersionString - | _ => none - let tm ← match pkg.lookup "timeout" with - | some (Toml.Value.nat timeout) => some (some timeout) - | none => some none - | _ => none - let path ← match pkg.lookup "path" with - | some (Toml.Value.str path) => some (some ⟨path⟩) - | none => some none - | _ => none - let Toml.Value.table deps ← t.lookup "dependencies" <|> some (Toml.Value.table []) | none - let deps ← deps.mapM fun ⟨n, src⟩ => return Dependency.mk n (← Source.fromToml src) - return { name := n, version := ver, leanVersion := leanVer, - path := path, dependencies := deps, timeout := tm } - -def fromFile (fn : System.FilePath) : IO Manifest := do - let cnts ← IO.FS.readFile fn - let toml ← Toml.parse cnts - let some manifest ← pure (fromToml toml) - | throw <| IO.userError s!"cannot read manifest from {fn}" - return manifest - -end Manifest - -def leanpkgTomlFn : System.FilePath := ⟨"leanpkg.toml"⟩ - -end Leanpkg diff --git a/stage0/src/Leanpkg/Proc.lean b/stage0/src/Leanpkg/Proc.lean deleted file mode 100644 index cd4db43195..0000000000 --- a/stage0/src/Leanpkg/Proc.lean +++ /dev/null @@ -1,20 +0,0 @@ -/- -Copyright (c) 2017 Microsoft Corporation. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Gabriel Ebner, Sebastian Ullrich --/ -namespace Leanpkg - -def execCmd (args : IO.Process.SpawnArgs) : IO Unit := do - let envstr := String.join <| args.env.toList.map fun (k, v) => s!"{k}={v.getD ""} " - let cmdstr := " ".intercalate (args.cmd :: args.args.toList) - IO.eprintln <| "> " ++ envstr ++ - match args.cwd with - | some cwd => s!"{cmdstr} # in directory {cwd}" - | none => cmdstr - let child ← IO.Process.spawn args - let exitCode ← child.wait - if exitCode != 0 then - throw <| IO.userError <| s!"external command exited with status {exitCode}" - -end Leanpkg diff --git a/stage0/src/Leanpkg/Resolve.lean b/stage0/src/Leanpkg/Resolve.lean deleted file mode 100644 index f81712cc9c..0000000000 --- a/stage0/src/Leanpkg/Resolve.lean +++ /dev/null @@ -1,84 +0,0 @@ -/- -Copyright (c) 2017 Microsoft Corporation. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Gabriel Ebner, Sebastian Ullrich --/ -import Leanpkg.Manifest -import Leanpkg.Proc -import Leanpkg.Git - -open System - -namespace Leanpkg - -def Assignment := List (String × FilePath) - -namespace Assignment -def empty : Assignment := [] - -def contains (a : Assignment) (s : String) : Bool := - (a.lookup s).isSome - -def insert (a : Assignment) (k : String) (v : FilePath) : Assignment := - if a.contains k then a else (k, v) :: a - -def fold {α} (i : α) (f : α → String → FilePath → α) : Assignment → α := - List.foldl (fun a ⟨k, v⟩ => f a k v) i - -end Assignment - -abbrev Solver := StateT Assignment IO - -def notYetAssigned (d : String) : Solver Bool := - return ! (← get).contains d - -def resolvedPath (d : String) : Solver FilePath := do - let some path ← pure ((← get).lookup d) | unreachable! - return path - -def materialize (relpath : FilePath) (dep : Dependency) : Solver Unit := - match dep.src with - | Source.path dir => do - let depdir := dir / relpath - IO.eprintln s!"{dep.name}: using local path {depdir}" - modify (·.insert dep.name depdir) - | Source.git url rev branch => do - let depdir := FilePath.mk "build" / "deps" / dep.name - if ← depdir.isDir then - IO.eprint s!"{dep.name}: trying to update {depdir} to revision {rev}" - IO.eprintln (match branch with | none => "" | some branch => "@" ++ branch) - let hash ← gitParseOriginRevision depdir rev - let revEx ← gitRevisionExists depdir hash - unless revEx do - execCmd {cmd := "git", args := #["fetch"], cwd := depdir} - else - IO.eprintln s!"{dep.name}: cloning {url} to {depdir}" - execCmd {cmd := "git", args := #["clone", url, depdir.toString]} - let hash ← gitParseOriginRevision depdir rev - execCmd {cmd := "git", args := #["checkout", "--detach", hash], cwd := depdir} - modify (·.insert dep.name depdir) - -def solveDepsCore (relPath : FilePath) (d : Manifest) : (maxDepth : Nat) → Solver Unit - | 0 => throw <| IO.userError "maximum dependency resolution depth reached" - | maxDepth + 1 => do - let deps ← d.dependencies.filterM (notYetAssigned ·.name) - deps.forM (materialize relPath) - for dep in deps do - let p ← resolvedPath dep.name - let d' ← Manifest.fromFile $ p / "leanpkg.toml" - unless d'.name = dep.name do - throw <| IO.userError s!"{d.name} (in {relPath}) depends on {d'.name}, but resolved dependency has name {dep.name} (in {p})" - solveDepsCore p d' maxDepth - -def solveDeps (d : Manifest) : IO Assignment := do - let (_, assg) ← (solveDepsCore ⟨"."⟩ d 1024).run <| Assignment.empty.insert d.name ⟨"."⟩ - return assg - -def constructPathCore (depname : String) (dirname : FilePath) : IO FilePath := do - let path := Manifest.effectivePath (← Manifest.fromFile <| dirname / leanpkgTomlFn) - return dirname / path - -def constructPath (assg : Assignment) : IO (List FilePath) := do - assg.reverse.mapM fun ⟨depname, dirname⟩ => constructPathCore depname dirname - -end Leanpkg diff --git a/stage0/src/Leanpkg/Toml.lean b/stage0/src/Leanpkg/Toml.lean deleted file mode 100644 index 4a3f7173e2..0000000000 --- a/stage0/src/Leanpkg/Toml.lean +++ /dev/null @@ -1,72 +0,0 @@ -/- -Copyright (c) 2017 Microsoft Corporation. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Gabriel Ebner, Sebastian Ullrich --/ -import Lean.Parser - -namespace Toml - -inductive Value : Type where - | str : String → Value - | nat : Nat → Value - | bool : Bool → Value - | table : List (String × Value) → Value - deriving Inhabited - -def Value.lookup : Value → String → Option Value - | Value.table cs, k => cs.lookup k - | _, _ => none - --- TODO: custom whitespace and other inaccuracies -declare_syntax_cat val -syntax "True" : val -syntax "False" : val -syntax str : val -syntax num : val -syntax bareKey := ident -- TODO -syntax key := bareKey <|> str -declare_syntax_cat keyCat @[keyCatParser] def key' := key -- HACK: for the antiquotation -syntax keyVal := key " = " val -syntax table := "[" key "]" keyVal* -syntax inlineTable := "{" keyVal,* "}" -syntax inlineTable : val -syntax file := table* -declare_syntax_cat fileCat @[fileCatParser] def file' := file -- HACK: for the antiquotation - -open Lean - -partial def ofSyntax : Syntax → Value - | `(val|True) => Value.bool true - | `(val|False) => Value.bool false - | `(val|$s:strLit) => Value.str <| s.isStrLit?.get! - | `(val|$n:numLit) => Value.nat <| n.isNatLit?.get! - | `(val|{$[$keys:key = $values],*}) => toTable keys (values.map ofSyntax) - | `(fileCat|$[[$keys] $kvss*]*) => toTable keys <| kvss.map fun kvs => ofSyntax <| Lean.Unhygienic.run `(val|{$kvs,*}) - | stx => unreachable! - where - toKey : Syntax → String - | `(keyCat|$key:ident) => key.getId.toString - | `(keyCat|$key:strLit) => key.isStrLit?.get! - | _ => unreachable! - toTable (keys : Array Syntax) (vals : Array Value) : Value := - Value.table <| Array.toList <| keys.zipWith vals fun k v => (toKey k, v) - -open Lean.Parser - -def parse (input : String) : IO Value := do - -- HACKHACKHACK - let env ← importModules [{ module := `Leanpkg.Toml }] {} - let fileParser ← compileParserDescr (parserExtension.getState env).categories file { env := env, opts := {} } - let c := mkParserContext (mkInputContext input "") { env := env, options := {} } - let s := mkParserState input - let s := whitespace c s - let s := fileParser.fn c s - if s.hasError then - throw <| IO.userError (s.toErrorMsg c) - else if input.atEnd s.pos then - return ofSyntax s.stxStack.back - else - throw <| IO.userError ((s.mkError "end of input").toErrorMsg c) - -end Toml diff --git a/stage0/src/shell/CMakeLists.txt b/stage0/src/shell/CMakeLists.txt index e61d47f927..d8c9a40ec3 100644 --- a/stage0/src/shell/CMakeLists.txt +++ b/stage0/src/shell/CMakeLists.txt @@ -148,82 +148,8 @@ FOREACH(T ${LEANTESTS}) endif() ENDFOREACH(T) -add_test(NAME leanpkgtest - WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/leanpkg/b" - COMMAND bash -c " - set -eu - export ${TEST_VARS} - leanpkg build - # linking requires some manual steps - (cd ../a; leanpkg build lib) - leanpkg build bin LINK_OPTS=../a/build/lib/libA.a - ./build/bin/B") - -add_test(NAME leanpkgtest_cyclic - WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/leanpkg/cyclic" - COMMAND bash -c " - set -eu - export ${TEST_VARS} - leanpkg build 2>&1 | grep 'import cycle'") - -add_test(NAME leanpkgtest_user_ext - WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/leanpkg/user_ext" - COMMAND bash -c " - set -eu - export ${TEST_VARS} - find . -name '*.olean' -delete - leanmake | grep 'world, hello, test'") - -add_test(NAME leanpkgtest_user_attr - WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/leanpkg/user_attr" - COMMAND bash -c " - set -eu - export ${TEST_VARS} - find . -name '*.olean' -delete - leanmake") - -add_test(NAME leanpkgtest_user_deriving - WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/leanpkg/deriving" - COMMAND bash -c " - set -eu - export ${TEST_VARS} - find . -name '*.olean' -delete - leanmake") - -add_test(NAME leanpkgtest_user_opt - WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/leanpkg/user_opt" - COMMAND bash -c " - set -eu - export ${TEST_VARS} - find . -name '*.olean' -delete - leanmake") - -add_test(NAME leanpkgtest_prv - WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/leanpkg/prv" - COMMAND bash -c " - set -eu - export ${TEST_VARS} - find . -name '*.olean' -delete - leanmake 2>&1 | grep 'error: field.*private'") - -add_test(NAME leanpkgtest_user_attr_app - WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/leanpkg/user_attr_app" - COMMAND bash -c " - set -eu - export ${TEST_VARS} - find . -name '*.olean' -delete - leanmake bin LINK_OPTS='${LEAN_DYN_EXE_LINKER_FLAGS}' && build/bin/UserAttr") - -add_test(NAME leanpkgtest_builtin_attr - WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/leanpkg/builtin_attr" - COMMAND bash -c " - set -eu - export PATH=${LEAN_BIN}:$PATH - find . -name '*.olean' -delete - leanmake") - # Create a lake test for each subdirectory of `lake/examples` which contains a `test.sh` file. -# We skip the subdirectories `lean_packages` and `bootstrap` since `lake/examples/Makefile` do no consider them. +# We skip the subdirectories `lean_packages` and `bootstrap` since `lake/examples/Makefile` does not consider them either. file(GLOB_RECURSE LEANLAKETESTS "${LEAN_SOURCE_DIR}/lake/examples/test.sh") FOREACH(T ${LEANLAKETESTS}) if(NOT T MATCHES ".*lean_packages.*") diff --git a/stage0/src/stdlib.make.in b/stage0/src/stdlib.make.in index 0bc4c1fee3..72f0278e7a 100644 --- a/stage0/src/stdlib.make.in +++ b/stage0/src/stdlib.make.in @@ -24,7 +24,7 @@ ifeq "${STAGE}" "0" LEANMAKE_OPTS+=C_ONLY=1 C_OUT=../stdlib/ endif -.PHONY: Init Std Lean leanshared Leanpkg Lake lean +.PHONY: Init Std Lean leanshared Lake lean # These can be phony since the inner Makefile will have the correct dependencies and avoid rebuilds Init: @@ -46,9 +46,6 @@ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libleanshared${CMAKE_SHARED_LIBRARY_SUFFIX}: $ leanshared: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libleanshared${CMAKE_SHARED_LIBRARY_SUFFIX} -Leanpkg: - +"${LEAN_BIN}/leanmake" bin PKG=Leanpkg BIN_NAME=leanpkg${CMAKE_EXECUTABLE_SUFFIX} $(LEANMAKE_OPTS) LINK_OPTS='-lleanshared ${CMAKE_EXE_LINKER_FLAGS_MAKE_MAKE}' - Lake: # must put lake in its own directory because of submodule, so must adjust relative paths... +"${LEAN_BIN}/leanmake" -C lake bin PKG=Lake BIN_NAME=lake${CMAKE_EXECUTABLE_SUFFIX} $(LEANMAKE_OPTS) LINK_OPTS='-lleanshared ${CMAKE_EXE_LINKER_FLAGS_MAKE_MAKE}' OUT="../${LIB}" LIB_OUT="../${LIB}/lean" OLEAN_OUT="../${LIB}/lean" diff --git a/stage0/stdlib/Lean/Compiler/ExternAttr.c b/stage0/stdlib/Lean/Compiler/ExternAttr.c index 85b6679166..59ea8f97f0 100644 --- a/stage0/stdlib/Lean/Compiler/ExternAttr.c +++ b/stage0/stdlib/Lean/Compiler/ExternAttr.c @@ -83,6 +83,7 @@ static lean_object* l_Lean_getExternConstArityExport___closed__5; extern lean_object* l_Lean_numLitKind; lean_object* lean_nat_sub(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_ExternAttrData_arity_x3f___default; LEAN_EXPORT lean_object* l_Lean_expandExternPatternAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_getExternConstArityExport___closed__3; @@ -141,7 +142,6 @@ LEAN_EXPORT lean_object* l_Lean_addExtern___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_getExternEntryFor(lean_object*, lean_object*); static lean_object* l_Lean_getExternConstArityExport___closed__6; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_mul(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); @@ -674,7 +674,7 @@ else { lean_object* x_17; uint8_t x_18; x_17 = lean_box(0); -x_18 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(x_14, x_17); +x_18 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(x_14, x_17); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/Main.c b/stage0/stdlib/Lean/Elab/PreDefinition/Main.c index 75e546e78c..c552330932 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/Main.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/Main.c @@ -140,6 +140,7 @@ static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinit LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_partitionPreDefs___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_addPreDefinitions___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_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial___spec__2___lambda__2___closed__4; LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_partitionPreDefs___spec__7(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_partitionPreDefs___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -248,7 +249,6 @@ lean_object* l_Lean_Elab_WF_TerminationBy_ensureAllUsed(lean_object*, lean_objec LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_addPreDefinitions___spec__4___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_addPreDefinitions___closed__1; LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_addPreDefinitions___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(lean_object*, lean_object*); lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Term_Quotation_getAntiquotationIds___spec__1(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___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial___spec__2___lambda__2___closed__3; lean_object* lean_nat_mul(lean_object*, lean_object*); @@ -2597,7 +2597,7 @@ lean_inc(x_13); x_14 = lean_ctor_get(x_11, 0); lean_inc(x_14); lean_dec(x_11); -x_15 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(x_13, x_14); +x_15 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(x_13, x_14); lean_dec(x_14); lean_dec(x_13); if (x_15 == 0) @@ -2630,7 +2630,7 @@ lean_inc(x_20); x_21 = lean_ctor_get(x_18, 0); lean_inc(x_21); lean_dec(x_18); -x_22 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(x_20, x_21); +x_22 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(x_20, x_21); lean_dec(x_21); lean_dec(x_20); if (x_22 == 0) diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/Structural/SmartUnfolding.c b/stage0/stdlib/Lean/Elab/PreDefinition/Structural/SmartUnfolding.c index ab183edcce..af7d33ac58 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/Structural/SmartUnfolding.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/Structural/SmartUnfolding.c @@ -37,7 +37,6 @@ 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_object* l_Lean_Meta_markSmartUnfoldigMatchAlt(lean_object*); lean_object* l_Lean_Meta_smartUnfoldingMatch_x3f(lean_object*); uint8_t lean_usize_dec_lt(size_t, size_t); extern lean_object* l_Lean_levelZero; @@ -85,6 +84,7 @@ lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Structural_addSmartUnfoldingDefAux_visit___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Match_MatcherInfo_arity(lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); +lean_object* l_Lean_Meta_markSmartUnfoldingMatchAlt(lean_object*); static lean_object* l_Lean_Meta_matchMatcherApp_x3f___at_Lean_Elab_Structural_addSmartUnfoldingDefAux_visit___spec__1___closed__1; lean_object* l_Lean_Meta_getMatcherInfo_x3f___at_Lean_Meta_reduceMatcher_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Structural_addSmartUnfoldingDef(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -995,7 +995,7 @@ lean_inc(x_23); x_24 = lean_ctor_get(x_22, 1); lean_inc(x_24); lean_dec(x_22); -x_25 = l_Lean_Meta_markSmartUnfoldigMatchAlt(x_23); +x_25 = l_Lean_Meta_markSmartUnfoldingMatchAlt(x_23); x_26 = lean_unsigned_to_nat(0u); x_27 = l_Array_toSubarray___rarg(x_4, x_26, x_5); x_28 = l_Array_ofSubarray___rarg(x_27); diff --git a/stage0/stdlib/Lean/Elab/Quotation.c b/stage0/stdlib/Lean/Elab/Quotation.c index 7f105b3b9c..9ce58c2f13 100644 --- a/stage0/stdlib/Lean/Elab/Quotation.c +++ b/stage0/stdlib/Lean/Elab/Quotation.c @@ -390,6 +390,7 @@ lean_object* lean_nat_sub(lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_Quotation_0__Lean_Elab_Term_Quotation_floatOutAntiquotTerms___lambda__2___closed__4; static lean_object* l___private_Lean_Elab_Quotation_0__Lean_Elab_Term_Quotation_getHeadInfo___lambda__8___closed__2; static lean_object* l___regBuiltin_Lean_Elab_Term_Quotation_elabQuot____x40_Lean_Elab_Quotation___hyg_3813____closed__5; +uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_Quotation_0__Lean_Elab_Term_Quotation_floatOutAntiquotTerms___lambda__2___closed__17; LEAN_EXPORT lean_object* l_Lean_Elab_Term_Quotation___aux__Lean__Elab__Quotation______macroRules__Lean__Elab__Term__Quotation__commandElab__stx__quot______1(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_Quotation_match__syntax_expand___spec__3___boxed(lean_object*, lean_object*, lean_object*); @@ -867,7 +868,6 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_Quotation_elabQuot____x40_Lean static lean_object* l___private_Lean_Elab_Quotation_0__Lean_Elab_Term_Quotation_quoteSyntax___closed__14; static lean_object* l___private_Lean_Elab_Quotation_0__Lean_Elab_Term_Quotation_getHeadInfo___lambda__14___closed__19; static lean_object* l___private_Lean_Elab_Quotation_0__Lean_Elab_Term_Quotation_quoteSyntax___lambda__1___closed__1; -uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(lean_object*, lean_object*); static lean_object* l___private_Lean_Elab_Quotation_0__Lean_Elab_Term_Quotation_floatOutAntiquotTerms___lambda__2___closed__3; static lean_object* l___regBuiltin_Lean_Elab_Term_Quotation_elabQuot____x40_Lean_Elab_Quotation___hyg_3813__declRange___closed__1; lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Term_Quotation_getAntiquotationIds___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -19044,7 +19044,7 @@ lean_object* x_10; lean_object* x_11; uint8_t x_12; x_10 = lean_array_get_size(x_2); x_11 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_11, 0, x_10); -x_12 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(x_7, x_11); +x_12 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(x_7, x_11); lean_dec(x_11); lean_dec(x_7); if (x_12 == 0) diff --git a/stage0/stdlib/Lean/Elab/Tactic/Match.c b/stage0/stdlib/Lean/Elab/Tactic/Match.c index 8fea83ef92..07da8e33ef 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Match.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Match.c @@ -48,6 +48,7 @@ lean_object* l_Lean_Elab_Tactic_evalTacticAux(lean_object*, lean_object*, lean_o LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_AuxMatchTermState_cases___default; size_t lean_usize_sub(size_t, size_t); static lean_object* l___regBuiltin_Lean_Elab_Tactic_evalEraseAuxDiscrs___closed__5; +static lean_object* l_Lean_Elab_Tactic_evalMatch___closed__4; lean_object* lean_st_ref_get(lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Tactic_evalEraseAuxDiscrs___closed__15; static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Tactic_Match_0__Lean_Elab_Tactic_mkAuxiliaryMatchTermAux___spec__2___closed__23; @@ -178,6 +179,7 @@ lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Tactic_evalMatch___spec__1___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Std_Data_PersistentArray_0__Std_PersistentArray_foldlFromMAux___at_Lean_Elab_Tactic_evalEraseAuxDiscrs___spec__3(lean_object*, size_t, size_t, 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*); +static lean_object* l_Lean_Elab_Tactic_evalMatch___closed__5; static lean_object* l_Lean_Elab_Tactic_evalEraseAuxDiscrs___rarg___closed__1; static lean_object* l___regBuiltin_Lean_Elab_Tactic_evalMatch___closed__4; static lean_object* l___regBuiltin_Lean_Elab_Tactic_evalEraseAuxDiscrs___closed__4; @@ -212,6 +214,7 @@ static lean_object* l___regBuiltin_Lean_Elab_Tactic_evalMatch_declRange___closed uint8_t lean_string_dec_eq(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); static lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Tactic_Match_0__Lean_Elab_Tactic_mkAuxiliaryMatchTermAux___spec__2___closed__36; +static lean_object* l_Lean_Elab_Tactic_evalMatch___closed__3; LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalEraseAuxDiscrs___spec__5(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { _start: { @@ -3537,6 +3540,32 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } +static lean_object* _init_l_Lean_Elab_Tactic_evalMatch___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("noImplicitLambda"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Tactic_evalMatch___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_Tactic_Match_0__Lean_Elab_Tactic_mkAuxiliaryMatchTermAux___spec__2___closed__2; +x_2 = l_Lean_Elab_Tactic_evalMatch___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Tactic_evalMatch___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("no_implicit_lambda%"); +return x_1; +} +} LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_evalMatch(lean_object* x_1, lean_object* x_2, lean_object* x_3, 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: { @@ -3573,7 +3602,7 @@ lean_inc(x_2); x_15 = l_Lean_Elab_liftMacroM___at_Lean_Elab_Tactic_evalMatch___spec__1(x_14, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, 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; 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_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); @@ -3600,37 +3629,49 @@ x_26 = lean_ctor_get(x_25, 1); lean_inc(x_26); lean_dec(x_25); x_27 = l_Lean_Elab_Tactic_evalMatch___closed__1; +lean_inc(x_21); x_28 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_28, 0, x_21); lean_ctor_set(x_28, 1, x_27); -x_29 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_Tactic_Match_0__Lean_Elab_Tactic_mkAuxiliaryMatchTermAux___spec__2___closed__14; -x_30 = lean_array_push(x_29, x_28); -x_31 = lean_array_push(x_30, x_18); -x_32 = lean_box(2); -x_33 = l_Lean_Elab_Tactic_evalMatch___closed__2; -x_34 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_34, 0, x_32); -lean_ctor_set(x_34, 1, x_33); -lean_ctor_set(x_34, 2, x_31); -x_35 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_Tactic_Match_0__Lean_Elab_Tactic_mkAuxiliaryMatchTermAux___spec__2___closed__27; -x_36 = lean_array_push(x_35, x_34); -x_37 = l_Array_append___rarg(x_36, x_19); -x_38 = l_Lean_nullKind; -x_39 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_39, 0, x_32); -lean_ctor_set(x_39, 1, x_38); -lean_ctor_set(x_39, 2, x_37); -lean_inc(x_39); +x_29 = l_Lean_Elab_Tactic_evalMatch___closed__5; +x_30 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_30, 0, x_21); +lean_ctor_set(x_30, 1, x_29); +x_31 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_Tactic_Match_0__Lean_Elab_Tactic_mkAuxiliaryMatchTermAux___spec__2___closed__14; +x_32 = lean_array_push(x_31, x_30); +x_33 = lean_array_push(x_32, x_18); +x_34 = lean_box(2); +x_35 = l_Lean_Elab_Tactic_evalMatch___closed__4; +x_36 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +lean_ctor_set(x_36, 2, x_33); +x_37 = lean_array_push(x_31, x_28); +x_38 = lean_array_push(x_37, x_36); +x_39 = l_Lean_Elab_Tactic_evalMatch___closed__2; +x_40 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_40, 0, x_34); +lean_ctor_set(x_40, 1, x_39); +lean_ctor_set(x_40, 2, x_38); +x_41 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_Tactic_Match_0__Lean_Elab_Tactic_mkAuxiliaryMatchTermAux___spec__2___closed__27; +x_42 = lean_array_push(x_41, x_40); +x_43 = l_Array_append___rarg(x_42, x_19); +x_44 = l_Lean_nullKind; +x_45 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_45, 0, x_34); +lean_ctor_set(x_45, 1, x_44); +lean_ctor_set(x_45, 2, x_43); +lean_inc(x_45); lean_inc(x_1); -x_40 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalMatch___lambda__1), 11, 2); -lean_closure_set(x_40, 0, x_1); -lean_closure_set(x_40, 1, x_39); -x_41 = l_Lean_Elab_withMacroExpansionInfo___at_Lean_Elab_Tactic_adaptExpander___spec__1(x_1, x_39, x_40, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_26); -return x_41; +x_46 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalMatch___lambda__1), 11, 2); +lean_closure_set(x_46, 0, x_1); +lean_closure_set(x_46, 1, x_45); +x_47 = l_Lean_Elab_withMacroExpansionInfo___at_Lean_Elab_Tactic_adaptExpander___spec__1(x_1, x_45, x_46, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_26); +return x_47; } else { -uint8_t x_42; +uint8_t x_48; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -3640,29 +3681,29 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_42 = !lean_is_exclusive(x_15); -if (x_42 == 0) +x_48 = !lean_is_exclusive(x_15); +if (x_48 == 0) { return x_15; } else { -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_15, 0); -x_44 = lean_ctor_get(x_15, 1); -lean_inc(x_44); -lean_inc(x_43); +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_15, 0); +x_50 = lean_ctor_get(x_15, 1); +lean_inc(x_50); +lean_inc(x_49); lean_dec(x_15); -x_45 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_45, 0, x_43); -lean_ctor_set(x_45, 1, x_44); -return x_45; +x_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_46; +uint8_t x_52; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -3672,23 +3713,23 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) +x_52 = !lean_is_exclusive(x_11); +if (x_52 == 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_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_11, 0); +x_54 = lean_ctor_get(x_11, 1); +lean_inc(x_54); +lean_inc(x_53); 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; +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; } } } @@ -4131,6 +4172,12 @@ l_Lean_Elab_Tactic_evalMatch___closed__1 = _init_l_Lean_Elab_Tactic_evalMatch___ lean_mark_persistent(l_Lean_Elab_Tactic_evalMatch___closed__1); l_Lean_Elab_Tactic_evalMatch___closed__2 = _init_l_Lean_Elab_Tactic_evalMatch___closed__2(); lean_mark_persistent(l_Lean_Elab_Tactic_evalMatch___closed__2); +l_Lean_Elab_Tactic_evalMatch___closed__3 = _init_l_Lean_Elab_Tactic_evalMatch___closed__3(); +lean_mark_persistent(l_Lean_Elab_Tactic_evalMatch___closed__3); +l_Lean_Elab_Tactic_evalMatch___closed__4 = _init_l_Lean_Elab_Tactic_evalMatch___closed__4(); +lean_mark_persistent(l_Lean_Elab_Tactic_evalMatch___closed__4); +l_Lean_Elab_Tactic_evalMatch___closed__5 = _init_l_Lean_Elab_Tactic_evalMatch___closed__5(); +lean_mark_persistent(l_Lean_Elab_Tactic_evalMatch___closed__5); l___regBuiltin_Lean_Elab_Tactic_evalMatch___closed__1 = _init_l___regBuiltin_Lean_Elab_Tactic_evalMatch___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Elab_Tactic_evalMatch___closed__1); l___regBuiltin_Lean_Elab_Tactic_evalMatch___closed__2 = _init_l___regBuiltin_Lean_Elab_Tactic_evalMatch___closed__2(); diff --git a/stage0/stdlib/Lean/Meta/Basic.c b/stage0/stdlib/Lean/Meta/Basic.c index 882f7c257a..054eaad504 100644 --- a/stage0/stdlib/Lean/Meta/Basic.c +++ b/stage0/stdlib/Lean/Meta/Basic.c @@ -40,7 +40,6 @@ LEAN_EXPORT lean_object* l_Lean_Meta_Cache_synthInstance___default; LEAN_EXPORT lean_object* l_Lean_Meta_mkFreshLevelMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*); lean_object* l_Lean_Level_collectMVars(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_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1___boxed(lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Lean_Meta_Config_transparency___default; LEAN_EXPORT lean_object* l_Lean_Meta_withLetDecl(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Meta_withLocalDecls_loop___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); @@ -102,7 +101,6 @@ LEAN_EXPORT lean_object* l_Lean_Meta_savingCache(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkConstWithFreshMVarLevels(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Name_quickLt(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkFreshExprMVarAt___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_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__4; static lean_object* l_Lean_addTrace___at_Lean_Meta_processPostponed_loop___spec__1___closed__1; static lean_object* l_Lean_Meta_mkFunUnit___closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_withMCtx___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -127,6 +125,7 @@ LEAN_EXPORT lean_object* l_Array_qsort_sort___at_Lean_Meta_sortFVarIds___spec__1 lean_object* l_Lean_Core_restore(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_instOrElseMetaM___closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_occursCheck(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__3; static lean_object* l_Lean_MetavarContext_instantiateExprMVars___at_Lean_Meta_instantiateMVars___spec__1___closed__1; lean_object* l_Lean_MetavarContext_getExprAssignment_x3f(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_resetZetaFVarIds___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -161,6 +160,7 @@ uint8_t l_Lean_Level_hasMVar(lean_object*); lean_object* l_Std_PersistentArray_append___rarg(lean_object*, lean_object*); static lean_object* l_Lean_Meta_instInhabitedState___closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_withNewBinderInfos___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__4; LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_dependsOn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); @@ -210,6 +210,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_hasAssignableMVar___boxed(lean_object*, lea LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_exposeRelevantUniverses___lambda__1(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Meta_getLevelMVarDepth___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); +LEAN_EXPORT uint8_t l_Lean_Meta_ParamInfo_isProp___default; LEAN_EXPORT lean_object* l_Lean_Meta_setMVarType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_isClass_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_withLCtx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -262,7 +263,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_withMVarContext(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_modifyInferTypeCache(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_getPostponed___boxed(lean_object*); LEAN_EXPORT lean_object* l_Array_qsort_sort___at_Lean_Meta_sortFVarIds___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349_(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_4_(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_getPostponed___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -296,11 +297,13 @@ LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_mkLeveErrorMes static lean_object* l_Lean_Meta_State_mctx___default___closed__3; LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDeclsD(lean_object*); static lean_object* l_Lean_Meta_localDeclDependsOnPred___closed__1; +LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____boxed(lean_object*, lean_object*); static lean_object* l_Lean_Meta_Context_lctx___default___closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_instantiateForall(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_instAlternativeMetaM___closed__1; LEAN_EXPORT lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_setBinderInfo(lean_object*, lean_object*, uint8_t); +LEAN_EXPORT uint8_t l_Lean_Meta_ParamInfo_isDecInst___default; static lean_object* l_Lean_Meta_throwUnknownFVar___rarg___closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_isInductivePredicate(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_getConfig___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -349,7 +352,6 @@ LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withMVarContex LEAN_EXPORT lean_object* l_Lean_Meta_map2MetaM(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_exposeRelevantUniverses(lean_object*, lean_object*); lean_object* l_Lean_Expr_setPPUniverses(lean_object*, uint8_t); -static lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__3; lean_object* l_Lean_MessageData_toString(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_Context_synthPendingDepth___default; LEAN_EXPORT lean_object* l_Lean_mkFreshId___at_Lean_Meta_mkFreshExprMVarAt___spec__2___rarg(lean_object*, lean_object*); @@ -378,6 +380,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecls_loop___rarg___lambda__1___bo LEAN_EXPORT lean_object* l_Lean_Meta_resetZetaFVarIds___boxed(lean_object*); LEAN_EXPORT lean_object* l_Std_PersistentArray_forIn___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l___private_Lean_Meta_Basic_0__Lean_Meta_fvarsSizeLtMaxFVars(lean_object*, lean_object*); +LEAN_EXPORT uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(lean_object*, lean_object*); lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_instMetaEvalMetaM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); LEAN_EXPORT uint8_t l___private_Lean_Meta_Basic_0__Lean_Meta_mkLeveErrorMessageCore___lambda__1(lean_object*, lean_object*); @@ -574,7 +577,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_getLevelMVarDepth(lean_object*, lean_object LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateLambdaAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_forallMetaTelescopeReducing___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_setEnv___at_Lean_Meta_setInlineAttribute___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT uint8_t l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321_(lean_object*, lean_object*); +LEAN_EXPORT uint8_t l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341_(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_PersistentArray_forInAux___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__3(uint8_t, 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*); LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withNewLocalInstancesImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -758,7 +761,6 @@ LEAN_EXPORT lean_object* l_Lean_Meta_assignLevelMVar___boxed(lean_object*, lean_ LEAN_EXPORT lean_object* l_Lean_Meta_withReducible___rarg(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_isExprMVarAssigned(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkFreshExprMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(lean_object*, lean_object*); static lean_object* l_Lean_Meta_processPostponed_loop___lambda__2___closed__2; uint8_t lean_get_reducibility_status(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_fvarsSizeLtMaxFVars___boxed(lean_object*, lean_object*); @@ -779,7 +781,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_throwIsDefEqStuck___boxed(lean_object*, lea static lean_object* l_Lean_Meta_processPostponed_loop___closed__4; LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_approxDefEqImp(lean_object*); lean_object* l_Lean_mkForall(lean_object*, uint8_t, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Meta_Basic___hyg_13187_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Meta_Basic___hyg_13207_(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_instMonadMCtxMetaM___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT 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_resettingSynthInstanceCacheWhen(lean_object*); @@ -796,6 +798,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_mkLambdaFVars___boxed(lean_object*, lean_ob lean_object* lean_level_update_succ(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_withMVarContext___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_infer_type(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_instantiateMVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_mkFreshExprMVarImpl(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -877,6 +880,7 @@ LEAN_EXPORT lean_object* l_List_mapM___at_Lean_Meta_instantiateMVars___spec__3__ LEAN_EXPORT lean_object* l_Lean_Meta_setInlineAttribute(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_withTrackingZeta(lean_object*); static lean_object* l_Lean_Meta_isLevelDefEq___closed__2; +static lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__2; LEAN_EXPORT lean_object* l_Lean_Meta_getLocalDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_Context_localInstances___default; LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__7(lean_object*, lean_object*, lean_object*); @@ -906,7 +910,6 @@ LEAN_EXPORT lean_object* l_Std_PersistentArray_forInAux___at___private_Lean_Meta LEAN_EXPORT lean_object* l_Lean_mkFreshMVarId___at_Lean_Meta_mkFreshExprMVarAt___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_mkFreshFVarId___at___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAuxAux_process___spec__1(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withLetDeclImp(lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____boxed(lean_object*, lean_object*); LEAN_EXPORT 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*); LEAN_EXPORT lean_object* l_Lean_Meta_withAtLeastTransparency___rarg___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_Meta_Context_defEqCtx_x3f___default; @@ -942,6 +945,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_withoutProofIrrelevance___rarg(lean_object* LEAN_EXPORT lean_object* l_Lean_Meta_orElse(lean_object*); LEAN_EXPORT uint8_t l_Array_qsort_sort___at_Lean_Meta_sortFVarIds___spec__1___lambda__1(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_forallBoundedTelescope___rarg___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_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1___boxed(lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___closed__5; lean_object* l_Lean_mkConst(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_getConfig(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -964,7 +968,6 @@ LEAN_EXPORT lean_object* l_Lean_mkFreshFVarId___at___private_Lean_Meta_Basic_0__ size_t lean_usize_of_nat(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_abstract___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_resettingSynthInstanceCache___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescopeReducing___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_mkFreshExprMVarCore___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_shouldReduceAll___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -987,7 +990,6 @@ LEAN_EXPORT uint8_t l_Lean_Meta_ParamInfo_isStrictImplicit(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_instMonadMetaM___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_isClassImp_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__2; LEAN_EXPORT lean_object* l_Lean_Meta_getFVarLocalDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp_process___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Meta_throwUnknownFVar___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1177,6 +1179,22 @@ x_1 = l_Lean_Meta_ParamInfo_backDeps___default___closed__1; return x_1; } } +static uint8_t _init_l_Lean_Meta_ParamInfo_isProp___default() { +_start: +{ +uint8_t x_1; +x_1 = 0; +return x_1; +} +} +static uint8_t _init_l_Lean_Meta_ParamInfo_isDecInst___default() { +_start: +{ +uint8_t x_1; +x_1 = 0; +return x_1; +} +} static lean_object* _init_l_Lean_Meta_instInhabitedParamInfo___closed__1() { _start: { @@ -1184,10 +1202,12 @@ uint8_t x_1; uint8_t x_2; lean_object* x_3; lean_object* x_4; x_1 = 0; x_2 = 0; x_3 = l_Lean_Meta_ParamInfo_backDeps___default___closed__1; -x_4 = lean_alloc_ctor(0, 1, 2); +x_4 = lean_alloc_ctor(0, 1, 4); lean_ctor_set(x_4, 0, x_3); lean_ctor_set_uint8(x_4, sizeof(void*)*1, x_1); lean_ctor_set_uint8(x_4, sizeof(void*)*1 + 1, x_2); +lean_ctor_set_uint8(x_4, sizeof(void*)*1 + 2, x_2); +lean_ctor_set_uint8(x_4, sizeof(void*)*1 + 3, x_2); return x_4; } } @@ -1350,7 +1370,7 @@ x_1 = l_Lean_Meta_instInhabitedInfoCacheKey___closed__3; return x_1; } } -LEAN_EXPORT uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_1) == 0) @@ -1387,7 +1407,7 @@ return x_8; } } } -LEAN_EXPORT uint8_t l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321_(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT uint8_t l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341_(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; @@ -1417,28 +1437,28 @@ return x_12; else { uint8_t x_13; -x_13 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(x_5, x_8); +x_13 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(x_5, x_8); return x_13; } } } } -LEAN_EXPORT lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1___boxed(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT lean_object* l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(x_1, x_2); +x_3 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } -LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____boxed(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321_(x_1, x_2); +x_3 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341_(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); @@ -1449,7 +1469,7 @@ static lean_object* _init_l_Lean_Meta_instBEqInfoCacheKey___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____boxed), 2, 0); +x_1 = lean_alloc_closure((void*)(l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____boxed), 2, 0); return x_1; } } @@ -4056,7 +4076,7 @@ lean_dec(x_2); return x_6; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__1() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__1() { _start: { lean_object* x_1; @@ -4064,17 +4084,17 @@ x_1 = lean_mk_string("Meta"); return x_1; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__2() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__1; +x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__3() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__3() { _start: { lean_object* x_1; @@ -4082,21 +4102,21 @@ x_1 = lean_mk_string("debug"); return x_1; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__4() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__2; -x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__3; +x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__2; +x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__3; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__2; +x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__2; x_3 = l_Lean_registerTraceClass(x_2, x_1); if (lean_obj_tag(x_3) == 0) { @@ -4104,7 +4124,7 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_dec(x_3); -x_5 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__4; +x_5 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__4; x_6 = l_Lean_registerTraceClass(x_5, x_4); return x_6; } @@ -31957,7 +31977,7 @@ static lean_object* _init_l___private_Lean_Meta_Basic_0__Lean_Meta_processPostpo _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__2; +x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__2; x_2 = l___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; @@ -38295,7 +38315,7 @@ static lean_object* _init_l_Lean_Meta_isExprDefEq___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__2; +x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__2; x_2 = l_Lean_Meta_isExprDefEq___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; @@ -40562,7 +40582,7 @@ return x_72; } } } -LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Meta_Basic___hyg_13187_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Meta_Basic___hyg_13207_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -40669,6 +40689,8 @@ l_Lean_Meta_ParamInfo_backDeps___default___closed__1 = _init_l_Lean_Meta_ParamIn lean_mark_persistent(l_Lean_Meta_ParamInfo_backDeps___default___closed__1); l_Lean_Meta_ParamInfo_backDeps___default = _init_l_Lean_Meta_ParamInfo_backDeps___default(); lean_mark_persistent(l_Lean_Meta_ParamInfo_backDeps___default); +l_Lean_Meta_ParamInfo_isProp___default = _init_l_Lean_Meta_ParamInfo_isProp___default(); +l_Lean_Meta_ParamInfo_isDecInst___default = _init_l_Lean_Meta_ParamInfo_isDecInst___default(); l_Lean_Meta_instInhabitedParamInfo___closed__1 = _init_l_Lean_Meta_instInhabitedParamInfo___closed__1(); lean_mark_persistent(l_Lean_Meta_instInhabitedParamInfo___closed__1); l_Lean_Meta_instInhabitedParamInfo = _init_l_Lean_Meta_instInhabitedParamInfo(); @@ -40860,15 +40882,15 @@ l_Lean_Meta_throwIsDefEqStuck___rarg___closed__1 = _init_l_Lean_Meta_throwIsDefE lean_mark_persistent(l_Lean_Meta_throwIsDefEqStuck___rarg___closed__1); l_Lean_Meta_throwIsDefEqStuck___rarg___closed__2 = _init_l_Lean_Meta_throwIsDefEqStuck___rarg___closed__2(); lean_mark_persistent(l_Lean_Meta_throwIsDefEqStuck___rarg___closed__2); -l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__1 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__1(); -lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__1); -l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__2 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__2(); -lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__2); -l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__3 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__3(); -lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__3); -l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__4 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__4(); -lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329____closed__4); -res = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1329_(lean_io_mk_world()); +l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__1 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__1(); +lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__1); +l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__2 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__2(); +lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__2); +l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__3 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__3(); +lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__3); +l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__4 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__4(); +lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349____closed__4); +res = l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1349_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_throwMaxRecDepthAt___at_Lean_Meta_withIncRecDepth___spec__1___rarg___closed__1 = _init_l_Lean_throwMaxRecDepthAt___at_Lean_Meta_withIncRecDepth___spec__1___rarg___closed__1(); @@ -41037,7 +41059,7 @@ l_Lean_Meta_isExprDefEq___closed__1 = _init_l_Lean_Meta_isExprDefEq___closed__1( lean_mark_persistent(l_Lean_Meta_isExprDefEq___closed__1); l_Lean_Meta_isExprDefEq___closed__2 = _init_l_Lean_Meta_isExprDefEq___closed__2(); lean_mark_persistent(l_Lean_Meta_isExprDefEq___closed__2); -res = l_Lean_initFn____x40_Lean_Meta_Basic___hyg_13187_(lean_io_mk_world()); +res = l_Lean_initFn____x40_Lean_Meta_Basic___hyg_13207_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Meta/CongrTheorems.c b/stage0/stdlib/Lean/Meta/CongrTheorems.c index ed61e239af..e4782af7c8 100644 --- a/stage0/stdlib/Lean/Meta/CongrTheorems.c +++ b/stage0/stdlib/Lean/Meta/CongrTheorems.c @@ -13,107 +13,203 @@ #ifdef __cplusplus extern "C" { #endif +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_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*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___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_Lean_Meta_mkHCongrWithArity_withNewEqs_loop___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_array_set(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_CongrArgKind_noConfusion___rarg(uint8_t, uint8_t, lean_object*); size_t lean_usize_add(size_t, size_t); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*); lean_object* l_Lean_stringToMessageData(lean_object*); lean_object* lean_mk_empty_array_with_capacity(lean_object*); +uint8_t l_Array_contains___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps_visit___spec__2(lean_object*, 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_object* l_Lean_LocalDecl_userName(lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg___lambda__1___boxed(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*); +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_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_forInUnsafe_loop___at_Lean_Meta_mkHCongrWithArity___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__2; +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_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_Expr_consumeAutoOptParam(lean_object*); +lean_object* l_Lean_Meta_dependsOn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___closed__1; +lean_object* l_Lean_Meta_mkEqRec(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_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* l_Lean_Expr_appFn_x21(lean_object*); +extern lean_object* l_instInhabitedNat; static lean_object* l_Lean_Meta_mkHCongrWithArity___lambda__3___closed__2; 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 uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike___spec__1(lean_object*, size_t, size_t); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getFunInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_withNewEqs_loop___rarg___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* l_Lean_Expr_appArg_x21(lean_object*); +lean_object* l_Lean_Expr_replaceFVars(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimp_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_usize_dec_lt(size_t, size_t); LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_setBinderInfosD(lean_object*, lean_object*); +lean_object* lean_expr_instantiate(lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_CongrArgKind_toCtorIdx___boxed(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_addPrimeToFVarUserNames___spec__1(lean_object*, size_t, size_t, lean_object*); lean_object* l_Lean_Meta_mkEqRefl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_panic___at_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Meta_mkHCongrWithArity___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkAppN(lean_object*, lean_object*); +LEAN_EXPORT uint8_t l_Lean_Meta_instInhabitedCongrArgKind; lean_object* l_Lean_LocalContext_setBinderInfo(lean_object*, lean_object*, uint8_t); LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_addPrimeToFVarUserNames___boxed(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_getKinds___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___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_Meta_mkHCongrWithArity_mkProof___closed__2; uint8_t l_Lean_Expr_isHEq(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_withNewEqs_loop___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast___boxed(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_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___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_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg___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_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4(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_mkHCongrWithArity___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_withNewEqs___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_addPrimeToFVarUserNames(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___lambda__1___boxed(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_replaceFVar(lean_object*, lean_object*, lean_object*); +static lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__2; LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_withNewEqs_loop(lean_object*); +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__1; static lean_object* l_Lean_Meta_mkHCongrWithArity___lambda__3___closed__1; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f___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_Meta_mkHCongrWithArity_withNewEqs___rarg___closed__1; 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_object* l_Lean_Expr_fvarId_x21(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_append_index_after(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1; +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go(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_Meta_CongrTheorems_0__Lean_Meta_setBinderInfosD___spec__1(lean_object*, size_t, size_t, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT uint8_t l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike(lean_object*); +uint8_t l_Lean_LocalDecl_binderInfo(lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_panic___at_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___spec__1___closed__1; lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Meta_Basic_0__Lean_Meta_mkLeveErrorMessageCore___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Meta_ParamInfo_isInstImplicit(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_getKinds(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_CongrArgKind_toCtorIdx(uint8_t); lean_object* l_Lean_LocalContext_getFVar_x21(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkEqNDRec(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__2; +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__3; LEAN_EXPORT lean_object* l_Lean_Meta_CongrArgKind_noConfusion___rarg___boxed(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___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*); extern lean_object* l_Lean_instInhabitedExpr; static lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___closed__4; LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___lambda__3___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*); +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__1; lean_object* l_Lean_Meta_getLocalInstances(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_setBinderInfosD___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_CongrArgKind_noConfusion___rarg___closed__1; lean_object* lean_whnf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___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*); +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__3; size_t lean_usize_of_nat(lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Meta_instInhabitedParamInfo; lean_object* l_Lean_LocalDecl_fvarId(lean_object*); +static lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__4; LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_mkHCongrWithArity___spec__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_Std_Range_forIn_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_getKinds___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT uint8_t l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___lambda__1(lean_object*); static lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___lambda__1___closed__1; +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f___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_Lean_LocalDecl_type(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_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*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_setBinderInfosD___boxed(lean_object*, lean_object*); lean_object* lean_name_append_after(lean_object*, lean_object*); +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__2; LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_bindingName_x21(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_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__1; +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___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*); +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__2; +uint8_t lean_nat_dec_le(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___lambda__4(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_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_CongrArgKind_noConfusion___rarg___lambda__1(lean_object*); static lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___closed__3; lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_removeUnusedArguments_x3f___spec__2___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_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__5; +static lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__3; lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___closed__5; +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_mkCongrSimpWithArity_x3f___spec__1(size_t, size_t, lean_object*); +lean_object* l_Array_ofSubarray___rarg(lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__3; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_addPrimeToFVarUserNames___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_addPrimeToFVarUserNames___spec__1___closed__1; lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_CongrArgKind_noConfusion___rarg___lambda__1___boxed(lean_object*); 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*); lean_object* l_Lean_Meta_FunInfo_getArity(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_mkCongrSimpWithArity_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___lambda__1___closed__2; LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Meta_mkHCongrWithArity___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_withNewEqs(lean_object*); lean_object* l_Lean_LocalContext_setUserName(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___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*); +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__3; lean_object* l_Lean_Meta_mkHEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity___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_mkCongrSimpWithArity_x3f_mkProof_go___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* l_Lean_Meta_mkHEqRefl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__1; +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__2; +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__4; lean_object* l_Lean_Meta_mkEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_mkHCongrWithArity_withNewEqs_loop___rarg___closed__2; +lean_object* l_panic___at_Lean_Meta_whnfCore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_mkHCongrWithArity_withNewEqs_loop___rarg___closed__1; lean_object* l_Lean_Expr_bindingBody_x21(lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike___boxed(lean_object*); +static lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__1; +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkEqOfHEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity___lambda__3(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_mkCongrSimpWithArity_x3f_mkProof_go___closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_mkProof___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* l_Lean_Meta_instInhabitedMetaM___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike___spec__1___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_CongrArgKind_noConfusion(lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_mkHCongrWithArity_withNewEqs_loop___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -145,12 +241,18 @@ lean_object* x_5; x_5 = lean_unsigned_to_nat(3u); return x_5; } -default: +case 4: { lean_object* x_6; x_6 = lean_unsigned_to_nat(4u); return x_6; } +default: +{ +lean_object* x_7; +x_7 = lean_unsigned_to_nat(5u); +return x_7; +} } } } @@ -216,6 +318,14 @@ x_6 = l_Lean_Meta_CongrArgKind_noConfusion___rarg(x_4, x_5, x_3); return x_6; } } +static uint8_t _init_l_Lean_Meta_instInhabitedCongrArgKind() { +_start: +{ +uint8_t x_1; +x_1 = 0; +return x_1; +} +} static lean_object* _init_l_Array_forInUnsafe_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_addPrimeToFVarUserNames___spec__1___closed__1() { _start: { @@ -1232,191 +1342,197 @@ return x_11; } else { -lean_object* x_12; uint8_t x_13; +lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; x_12 = lean_array_uget(x_1, x_3); -x_13 = !lean_is_exclusive(x_4); -if (x_13 == 0) -{ -lean_object* x_14; uint8_t x_15; -x_14 = lean_ctor_get(x_4, 1); -x_15 = !lean_is_exclusive(x_14); +x_13 = lean_ctor_get(x_4, 1); +lean_inc(x_13); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = !lean_is_exclusive(x_4); if (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; uint8_t x_22; +lean_object* x_16; lean_object* x_17; uint8_t x_18; x_16 = lean_ctor_get(x_4, 0); -x_17 = lean_ctor_get(x_14, 0); -x_18 = lean_ctor_get(x_14, 1); -x_19 = lean_ctor_get(x_16, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_16, 1); -lean_inc(x_20); -x_21 = lean_ctor_get(x_16, 2); -lean_inc(x_21); -x_22 = lean_nat_dec_lt(x_20, x_21); -if (x_22 == 0) +x_17 = lean_ctor_get(x_4, 1); +lean_dec(x_17); +x_18 = !lean_is_exclusive(x_13); +if (x_18 == 0) { -lean_object* x_23; -lean_dec(x_21); +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_13, 1); +x_20 = lean_ctor_get(x_13, 0); lean_dec(x_20); -lean_dec(x_19); -lean_dec(x_12); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_4); -lean_ctor_set(x_23, 1, x_9); -return x_23; -} -else -{ -uint8_t x_24; -x_24 = !lean_is_exclusive(x_16); +x_21 = lean_ctor_get(x_14, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_14, 1); +lean_inc(x_22); +x_23 = lean_ctor_get(x_14, 2); +lean_inc(x_23); +x_24 = lean_nat_dec_lt(x_22, x_23); if (x_24 == 0) { -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; -x_25 = lean_ctor_get(x_16, 2); -lean_dec(x_25); -x_26 = lean_ctor_get(x_16, 1); -lean_dec(x_26); -x_27 = lean_ctor_get(x_16, 0); -lean_dec(x_27); -x_28 = lean_array_fget(x_19, x_20); -x_29 = lean_unsigned_to_nat(1u); -x_30 = lean_nat_add(x_20, x_29); -lean_dec(x_20); -lean_ctor_set(x_16, 1, x_30); -x_31 = lean_ctor_get(x_17, 0); -lean_inc(x_31); -x_32 = lean_ctor_get(x_17, 1); -lean_inc(x_32); -x_33 = lean_ctor_get(x_17, 2); -lean_inc(x_33); -x_34 = lean_nat_dec_lt(x_32, x_33); -if (x_34 == 0) -{ -lean_object* x_35; -lean_dec(x_33); -lean_dec(x_32); -lean_dec(x_31); -lean_dec(x_28); +lean_object* x_25; +lean_dec(x_23); +lean_dec(x_22); +lean_dec(x_21); lean_dec(x_12); -x_35 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_35, 0, x_4); -lean_ctor_set(x_35, 1, x_9); -return x_35; +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_4); +lean_ctor_set(x_25, 1, x_9); +return x_25; } else { -uint8_t x_36; -x_36 = !lean_is_exclusive(x_17); +uint8_t x_26; +x_26 = !lean_is_exclusive(x_14); +if (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; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; +x_27 = lean_ctor_get(x_14, 2); +lean_dec(x_27); +x_28 = lean_ctor_get(x_14, 1); +lean_dec(x_28); +x_29 = lean_ctor_get(x_14, 0); +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_14, 1, x_32); +x_33 = lean_ctor_get(x_16, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_16, 1); +lean_inc(x_34); +x_35 = lean_ctor_get(x_16, 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_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; size_t x_45; size_t x_46; -x_37 = lean_ctor_get(x_17, 2); -lean_dec(x_37); -x_38 = lean_ctor_get(x_17, 1); -lean_dec(x_38); -x_39 = lean_ctor_get(x_17, 0); -lean_dec(x_39); -x_40 = lean_array_fget(x_31, x_32); -x_41 = lean_nat_add(x_32, x_29); -lean_dec(x_32); -lean_ctor_set(x_17, 1, x_41); -x_42 = lean_array_push(x_18, x_12); -x_43 = lean_array_push(x_42, x_40); -x_44 = lean_array_push(x_43, x_28); -lean_ctor_set(x_14, 1, x_44); -x_45 = 1; -x_46 = lean_usize_add(x_3, x_45); -x_3 = x_46; -goto _start; -} -else -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; size_t x_54; size_t x_55; -lean_dec(x_17); -x_48 = lean_array_fget(x_31, x_32); -x_49 = lean_nat_add(x_32, x_29); -lean_dec(x_32); -x_50 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_50, 0, x_31); -lean_ctor_set(x_50, 1, x_49); -lean_ctor_set(x_50, 2, x_33); -x_51 = lean_array_push(x_18, x_12); -x_52 = lean_array_push(x_51, x_48); -x_53 = lean_array_push(x_52, x_28); -lean_ctor_set(x_14, 1, x_53); -lean_ctor_set(x_14, 0, x_50); -x_54 = 1; -x_55 = lean_usize_add(x_3, x_54); -x_3 = x_55; -goto _start; -} -} -} -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; uint8_t x_64; -lean_dec(x_16); -x_57 = lean_array_fget(x_19, x_20); -x_58 = lean_unsigned_to_nat(1u); -x_59 = lean_nat_add(x_20, x_58); -lean_dec(x_20); -x_60 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_60, 0, x_19); -lean_ctor_set(x_60, 1, x_59); -lean_ctor_set(x_60, 2, x_21); -x_61 = lean_ctor_get(x_17, 0); -lean_inc(x_61); -x_62 = lean_ctor_get(x_17, 1); -lean_inc(x_62); -x_63 = lean_ctor_get(x_17, 2); -lean_inc(x_63); -x_64 = lean_nat_dec_lt(x_62, x_63); -if (x_64 == 0) -{ -lean_object* x_65; -lean_dec(x_63); -lean_dec(x_62); -lean_dec(x_61); -lean_dec(x_57); +lean_object* x_37; +lean_dec(x_35); +lean_dec(x_34); +lean_dec(x_33); +lean_dec(x_30); lean_dec(x_12); -lean_ctor_set(x_4, 0, x_60); -x_65 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_65, 0, x_4); -lean_ctor_set(x_65, 1, x_9); -return x_65; +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_4); +lean_ctor_set(x_37, 1, x_9); +return x_37; } else { -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; size_t x_73; size_t x_74; -if (lean_is_exclusive(x_17)) { - lean_ctor_release(x_17, 0); - lean_ctor_release(x_17, 1); - lean_ctor_release(x_17, 2); - x_66 = x_17; -} else { - lean_dec_ref(x_17); - x_66 = lean_box(0); +uint8_t x_38; +x_38 = !lean_is_exclusive(x_16); +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; size_t x_47; size_t x_48; +x_39 = lean_ctor_get(x_16, 2); +lean_dec(x_39); +x_40 = lean_ctor_get(x_16, 1); +lean_dec(x_40); +x_41 = lean_ctor_get(x_16, 0); +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_16, 1, x_43); +x_44 = lean_array_push(x_19, x_12); +x_45 = lean_array_push(x_44, x_42); +x_46 = lean_array_push(x_45, x_30); +lean_ctor_set(x_13, 1, x_46); +x_47 = 1; +x_48 = lean_usize_add(x_3, x_47); +x_3 = x_48; +goto _start; } -x_67 = lean_array_fget(x_61, x_62); -x_68 = lean_nat_add(x_62, x_58); -lean_dec(x_62); -if (lean_is_scalar(x_66)) { - x_69 = lean_alloc_ctor(0, 3, 0); -} else { - x_69 = x_66; +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; size_t x_56; size_t x_57; +lean_dec(x_16); +x_50 = lean_array_fget(x_33, x_34); +x_51 = lean_nat_add(x_34, x_31); +lean_dec(x_34); +x_52 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_52, 0, x_33); +lean_ctor_set(x_52, 1, x_51); +lean_ctor_set(x_52, 2, x_35); +x_53 = lean_array_push(x_19, x_12); +x_54 = lean_array_push(x_53, x_50); +x_55 = lean_array_push(x_54, x_30); +lean_ctor_set(x_13, 1, x_55); +lean_ctor_set(x_4, 0, x_52); +x_56 = 1; +x_57 = lean_usize_add(x_3, x_56); +x_3 = x_57; +goto _start; } -lean_ctor_set(x_69, 0, x_61); -lean_ctor_set(x_69, 1, x_68); -lean_ctor_set(x_69, 2, x_63); -x_70 = lean_array_push(x_18, x_12); -x_71 = lean_array_push(x_70, x_67); -x_72 = lean_array_push(x_71, x_57); -lean_ctor_set(x_14, 1, x_72); -lean_ctor_set(x_14, 0, x_69); -lean_ctor_set(x_4, 0, x_60); -x_73 = 1; -x_74 = lean_usize_add(x_3, x_73); -x_3 = x_74; +} +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; uint8_t x_66; +lean_dec(x_14); +x_59 = lean_array_fget(x_21, x_22); +x_60 = lean_unsigned_to_nat(1u); +x_61 = lean_nat_add(x_22, x_60); +lean_dec(x_22); +x_62 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_62, 0, x_21); +lean_ctor_set(x_62, 1, x_61); +lean_ctor_set(x_62, 2, x_23); +x_63 = lean_ctor_get(x_16, 0); +lean_inc(x_63); +x_64 = lean_ctor_get(x_16, 1); +lean_inc(x_64); +x_65 = lean_ctor_get(x_16, 2); +lean_inc(x_65); +x_66 = lean_nat_dec_lt(x_64, x_65); +if (x_66 == 0) +{ +lean_object* x_67; +lean_dec(x_65); +lean_dec(x_64); +lean_dec(x_63); +lean_dec(x_59); +lean_dec(x_12); +lean_ctor_set(x_13, 0, x_62); +x_67 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_67, 0, x_4); +lean_ctor_set(x_67, 1, x_9); +return x_67; +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; size_t x_75; size_t x_76; +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_68 = x_16; +} else { + lean_dec_ref(x_16); + x_68 = lean_box(0); +} +x_69 = lean_array_fget(x_63, x_64); +x_70 = lean_nat_add(x_64, x_60); +lean_dec(x_64); +if (lean_is_scalar(x_68)) { + x_71 = lean_alloc_ctor(0, 3, 0); +} else { + x_71 = x_68; +} +lean_ctor_set(x_71, 0, x_63); +lean_ctor_set(x_71, 1, x_70); +lean_ctor_set(x_71, 2, x_65); +x_72 = lean_array_push(x_19, x_12); +x_73 = lean_array_push(x_72, x_69); +x_74 = lean_array_push(x_73, x_59); +lean_ctor_set(x_13, 1, x_74); +lean_ctor_set(x_13, 0, x_62); +lean_ctor_set(x_4, 0, x_71); +x_75 = 1; +x_76 = lean_usize_add(x_3, x_75); +x_3 = x_76; goto _start; } } @@ -1424,18 +1540,15 @@ goto _start; } else { -lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; -x_76 = lean_ctor_get(x_4, 0); -x_77 = lean_ctor_get(x_14, 0); -x_78 = lean_ctor_get(x_14, 1); +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; +x_78 = lean_ctor_get(x_13, 1); lean_inc(x_78); -lean_inc(x_77); -lean_dec(x_14); -x_79 = lean_ctor_get(x_76, 0); +lean_dec(x_13); +x_79 = lean_ctor_get(x_14, 0); lean_inc(x_79); -x_80 = lean_ctor_get(x_76, 1); +x_80 = lean_ctor_get(x_14, 1); lean_inc(x_80); -x_81 = lean_ctor_get(x_76, 2); +x_81 = lean_ctor_get(x_14, 2); lean_inc(x_81); x_82 = lean_nat_dec_lt(x_80, x_81); if (x_82 == 0) @@ -1446,7 +1559,7 @@ lean_dec(x_80); lean_dec(x_79); lean_dec(x_12); x_83 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_83, 0, x_77); +lean_ctor_set(x_83, 0, x_14); lean_ctor_set(x_83, 1, x_78); lean_ctor_set(x_4, 1, x_83); x_84 = lean_alloc_ctor(0, 2, 0); @@ -1457,13 +1570,13 @@ return x_84; else { 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; uint8_t x_93; -if (lean_is_exclusive(x_76)) { - lean_ctor_release(x_76, 0); - lean_ctor_release(x_76, 1); - lean_ctor_release(x_76, 2); - x_85 = x_76; +if (lean_is_exclusive(x_14)) { + lean_ctor_release(x_14, 0); + lean_ctor_release(x_14, 1); + lean_ctor_release(x_14, 2); + x_85 = x_14; } else { - lean_dec_ref(x_76); + lean_dec_ref(x_14); x_85 = lean_box(0); } x_86 = lean_array_fget(x_79, x_80); @@ -1478,11 +1591,11 @@ if (lean_is_scalar(x_85)) { lean_ctor_set(x_89, 0, x_79); lean_ctor_set(x_89, 1, x_88); lean_ctor_set(x_89, 2, x_81); -x_90 = lean_ctor_get(x_77, 0); +x_90 = lean_ctor_get(x_16, 0); lean_inc(x_90); -x_91 = lean_ctor_get(x_77, 1); +x_91 = lean_ctor_get(x_16, 1); lean_inc(x_91); -x_92 = lean_ctor_get(x_77, 2); +x_92 = lean_ctor_get(x_16, 2); lean_inc(x_92); x_93 = lean_nat_dec_lt(x_91, x_92); if (x_93 == 0) @@ -1494,10 +1607,9 @@ lean_dec(x_90); lean_dec(x_86); lean_dec(x_12); x_94 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_94, 0, x_77); +lean_ctor_set(x_94, 0, x_89); lean_ctor_set(x_94, 1, x_78); lean_ctor_set(x_4, 1, x_94); -lean_ctor_set(x_4, 0, x_89); x_95 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_95, 0, x_4); lean_ctor_set(x_95, 1, x_9); @@ -1506,13 +1618,13 @@ return x_95; else { lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; size_t x_104; size_t x_105; -if (lean_is_exclusive(x_77)) { - lean_ctor_release(x_77, 0); - lean_ctor_release(x_77, 1); - lean_ctor_release(x_77, 2); - x_96 = x_77; +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_96 = x_16; } else { - lean_dec_ref(x_77); + lean_dec_ref(x_16); x_96 = lean_box(0); } x_97 = lean_array_fget(x_90, x_91); @@ -1530,10 +1642,10 @@ x_100 = lean_array_push(x_78, x_12); x_101 = lean_array_push(x_100, x_97); x_102 = lean_array_push(x_101, x_86); x_103 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_103, 0, x_99); +lean_ctor_set(x_103, 0, x_89); lean_ctor_set(x_103, 1, x_102); lean_ctor_set(x_4, 1, x_103); -lean_ctor_set(x_4, 0, x_89); +lean_ctor_set(x_4, 0, x_99); x_104 = 1; x_105 = lean_usize_add(x_3, x_104); x_3 = x_105; @@ -1544,147 +1656,143 @@ goto _start; } else { -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; uint8_t x_115; -x_107 = lean_ctor_get(x_4, 1); -x_108 = lean_ctor_get(x_4, 0); +lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; uint8_t x_113; +x_107 = lean_ctor_get(x_4, 0); lean_inc(x_107); -lean_inc(x_108); lean_dec(x_4); -x_109 = lean_ctor_get(x_107, 0); -lean_inc(x_109); -x_110 = lean_ctor_get(x_107, 1); +x_108 = lean_ctor_get(x_13, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_13)) { + lean_ctor_release(x_13, 0); + lean_ctor_release(x_13, 1); + x_109 = x_13; +} else { + lean_dec_ref(x_13); + x_109 = lean_box(0); +} +x_110 = lean_ctor_get(x_14, 0); lean_inc(x_110); +x_111 = lean_ctor_get(x_14, 1); +lean_inc(x_111); +x_112 = lean_ctor_get(x_14, 2); +lean_inc(x_112); +x_113 = lean_nat_dec_lt(x_111, x_112); +if (x_113 == 0) +{ +lean_object* x_114; lean_object* x_115; lean_object* x_116; +lean_dec(x_112); +lean_dec(x_111); +lean_dec(x_110); +lean_dec(x_12); +if (lean_is_scalar(x_109)) { + x_114 = lean_alloc_ctor(0, 2, 0); +} else { + x_114 = x_109; +} +lean_ctor_set(x_114, 0, x_14); +lean_ctor_set(x_114, 1, x_108); +x_115 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_115, 0, x_107); +lean_ctor_set(x_115, 1, x_114); +x_116 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_116, 0, x_115); +lean_ctor_set(x_116, 1, x_9); +return x_116; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; uint8_t x_125; +if (lean_is_exclusive(x_14)) { + lean_ctor_release(x_14, 0); + lean_ctor_release(x_14, 1); + lean_ctor_release(x_14, 2); + x_117 = x_14; +} else { + lean_dec_ref(x_14); + x_117 = lean_box(0); +} +x_118 = lean_array_fget(x_110, x_111); +x_119 = lean_unsigned_to_nat(1u); +x_120 = lean_nat_add(x_111, x_119); +lean_dec(x_111); +if (lean_is_scalar(x_117)) { + x_121 = lean_alloc_ctor(0, 3, 0); +} else { + x_121 = x_117; +} +lean_ctor_set(x_121, 0, x_110); +lean_ctor_set(x_121, 1, x_120); +lean_ctor_set(x_121, 2, x_112); +x_122 = lean_ctor_get(x_107, 0); +lean_inc(x_122); +x_123 = lean_ctor_get(x_107, 1); +lean_inc(x_123); +x_124 = lean_ctor_get(x_107, 2); +lean_inc(x_124); +x_125 = lean_nat_dec_lt(x_123, x_124); +if (x_125 == 0) +{ +lean_object* x_126; lean_object* x_127; lean_object* x_128; +lean_dec(x_124); +lean_dec(x_123); +lean_dec(x_122); +lean_dec(x_118); +lean_dec(x_12); +if (lean_is_scalar(x_109)) { + x_126 = lean_alloc_ctor(0, 2, 0); +} else { + x_126 = x_109; +} +lean_ctor_set(x_126, 0, x_121); +lean_ctor_set(x_126, 1, x_108); +x_127 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_127, 0, x_107); +lean_ctor_set(x_127, 1, x_126); +x_128 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_128, 0, x_127); +lean_ctor_set(x_128, 1, x_9); +return x_128; +} +else +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; size_t x_138; size_t x_139; if (lean_is_exclusive(x_107)) { lean_ctor_release(x_107, 0); lean_ctor_release(x_107, 1); - x_111 = x_107; + lean_ctor_release(x_107, 2); + x_129 = x_107; } else { lean_dec_ref(x_107); - x_111 = lean_box(0); + x_129 = lean_box(0); } -x_112 = lean_ctor_get(x_108, 0); -lean_inc(x_112); -x_113 = lean_ctor_get(x_108, 1); -lean_inc(x_113); -x_114 = lean_ctor_get(x_108, 2); -lean_inc(x_114); -x_115 = lean_nat_dec_lt(x_113, x_114); -if (x_115 == 0) -{ -lean_object* x_116; lean_object* x_117; lean_object* x_118; -lean_dec(x_114); -lean_dec(x_113); -lean_dec(x_112); -lean_dec(x_12); -if (lean_is_scalar(x_111)) { - x_116 = lean_alloc_ctor(0, 2, 0); +x_130 = lean_array_fget(x_122, x_123); +x_131 = lean_nat_add(x_123, x_119); +lean_dec(x_123); +if (lean_is_scalar(x_129)) { + x_132 = lean_alloc_ctor(0, 3, 0); } else { - x_116 = x_111; + x_132 = x_129; } -lean_ctor_set(x_116, 0, x_109); -lean_ctor_set(x_116, 1, x_110); -x_117 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_117, 0, x_108); -lean_ctor_set(x_117, 1, x_116); -x_118 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_118, 0, x_117); -lean_ctor_set(x_118, 1, x_9); -return x_118; -} -else -{ -lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; uint8_t x_127; -if (lean_is_exclusive(x_108)) { - lean_ctor_release(x_108, 0); - lean_ctor_release(x_108, 1); - lean_ctor_release(x_108, 2); - x_119 = x_108; +lean_ctor_set(x_132, 0, x_122); +lean_ctor_set(x_132, 1, x_131); +lean_ctor_set(x_132, 2, x_124); +x_133 = lean_array_push(x_108, x_12); +x_134 = lean_array_push(x_133, x_130); +x_135 = lean_array_push(x_134, x_118); +if (lean_is_scalar(x_109)) { + x_136 = lean_alloc_ctor(0, 2, 0); } else { - lean_dec_ref(x_108); - x_119 = lean_box(0); + x_136 = x_109; } -x_120 = lean_array_fget(x_112, x_113); -x_121 = lean_unsigned_to_nat(1u); -x_122 = lean_nat_add(x_113, x_121); -lean_dec(x_113); -if (lean_is_scalar(x_119)) { - x_123 = lean_alloc_ctor(0, 3, 0); -} else { - x_123 = x_119; -} -lean_ctor_set(x_123, 0, x_112); -lean_ctor_set(x_123, 1, x_122); -lean_ctor_set(x_123, 2, x_114); -x_124 = lean_ctor_get(x_109, 0); -lean_inc(x_124); -x_125 = lean_ctor_get(x_109, 1); -lean_inc(x_125); -x_126 = lean_ctor_get(x_109, 2); -lean_inc(x_126); -x_127 = lean_nat_dec_lt(x_125, x_126); -if (x_127 == 0) -{ -lean_object* x_128; lean_object* x_129; lean_object* x_130; -lean_dec(x_126); -lean_dec(x_125); -lean_dec(x_124); -lean_dec(x_120); -lean_dec(x_12); -if (lean_is_scalar(x_111)) { - x_128 = lean_alloc_ctor(0, 2, 0); -} else { - x_128 = x_111; -} -lean_ctor_set(x_128, 0, x_109); -lean_ctor_set(x_128, 1, x_110); -x_129 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_129, 0, x_123); -lean_ctor_set(x_129, 1, x_128); -x_130 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_130, 0, x_129); -lean_ctor_set(x_130, 1, x_9); -return x_130; -} -else -{ -lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; size_t x_140; size_t x_141; -if (lean_is_exclusive(x_109)) { - lean_ctor_release(x_109, 0); - lean_ctor_release(x_109, 1); - lean_ctor_release(x_109, 2); - x_131 = x_109; -} else { - lean_dec_ref(x_109); - x_131 = lean_box(0); -} -x_132 = lean_array_fget(x_124, x_125); -x_133 = lean_nat_add(x_125, x_121); -lean_dec(x_125); -if (lean_is_scalar(x_131)) { - x_134 = lean_alloc_ctor(0, 3, 0); -} else { - x_134 = x_131; -} -lean_ctor_set(x_134, 0, x_124); -lean_ctor_set(x_134, 1, x_133); -lean_ctor_set(x_134, 2, x_126); -x_135 = lean_array_push(x_110, x_12); -x_136 = lean_array_push(x_135, x_132); -x_137 = lean_array_push(x_136, x_120); -if (lean_is_scalar(x_111)) { - x_138 = lean_alloc_ctor(0, 2, 0); -} else { - x_138 = x_111; -} -lean_ctor_set(x_138, 0, x_134); -lean_ctor_set(x_138, 1, x_137); -x_139 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_139, 0, x_123); -lean_ctor_set(x_139, 1, x_138); -x_140 = 1; -x_141 = lean_usize_add(x_3, x_140); -x_3 = x_141; -x_4 = x_139; +lean_ctor_set(x_136, 0, x_121); +lean_ctor_set(x_136, 1, x_135); +x_137 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_137, 0, x_132); +lean_ctor_set(x_137, 1, x_136); +x_138 = 1; +x_139 = lean_usize_add(x_3, x_138); +x_3 = x_139; +x_4 = x_137; goto _start; } } @@ -1808,10 +1916,10 @@ x_16 = lean_array_get_size(x_6); x_17 = l_Array_toSubarray___rarg(x_6, x_14, x_16); x_18 = l_Lean_Meta_mkHCongrWithArity_withNewEqs___rarg___closed__1; x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_15); +lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); x_20 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_20, 0, x_17); +lean_ctor_set(x_20, 0, x_15); lean_ctor_set(x_20, 1, x_19); x_21 = lean_usize_of_nat(x_2); lean_dec(x_2); @@ -2152,6 +2260,3540 @@ return x_15; } } } +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; +x_8 = lean_nat_dec_le(x_5, x_4); +if (x_8 == 0) +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_unsigned_to_nat(0u); +x_10 = lean_nat_dec_eq(x_3, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_sub(x_3, x_11); +lean_dec(x_3); +x_13 = l_Lean_Meta_instInhabitedParamInfo; +x_14 = lean_array_get(x_13, x_1, x_4); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +lean_dec(x_14); +x_16 = l_Array_contains___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps_visit___spec__2(x_15, x_2); +lean_dec(x_15); +if (x_16 == 0) +{ +lean_object* x_17; +x_17 = lean_nat_add(x_4, x_6); +lean_dec(x_4); +x_3 = x_12; +x_4 = x_17; +goto _start; +} +else +{ +uint8_t x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_31; +x_19 = l_Lean_Meta_instInhabitedCongrArgKind; +x_20 = lean_box(x_19); +x_21 = lean_array_get(x_20, x_7, x_4); +x_22 = lean_unbox(x_21); +lean_dec(x_21); +x_31 = lean_box(x_22); +if (lean_obj_tag(x_31) == 2) +{ +uint8_t x_32; lean_object* x_33; lean_object* x_34; +lean_dec(x_12); +lean_dec(x_4); +x_32 = 0; +x_33 = lean_box(x_32); +x_34 = lean_array_set(x_7, x_2, x_33); +return x_34; +} +else +{ +lean_object* x_35; +lean_dec(x_31); +x_35 = lean_box(0); +x_23 = x_35; +goto block_30; +} +block_30: +{ +lean_object* x_24; +lean_dec(x_23); +x_24 = lean_box(x_22); +if (lean_obj_tag(x_24) == 0) +{ +uint8_t x_25; lean_object* x_26; lean_object* x_27; +lean_dec(x_12); +lean_dec(x_4); +x_25 = 0; +x_26 = lean_box(x_25); +x_27 = lean_array_set(x_7, x_2, x_26); +return x_27; +} +else +{ +lean_object* x_28; +lean_dec(x_24); +x_28 = lean_nat_add(x_4, x_6); +lean_dec(x_4); +x_3 = x_12; +x_4 = x_28; +goto _start; +} +} +} +} +else +{ +lean_dec(x_4); +lean_dec(x_3); +return x_7; +} +} +else +{ +lean_dec(x_4); +lean_dec(x_3); +return x_7; +} +} +} +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___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) { +_start: +{ +uint8_t x_8; +x_8 = lean_nat_dec_le(x_5, x_4); +if (x_8 == 0) +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_unsigned_to_nat(0u); +x_10 = lean_nat_dec_eq(x_3, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_sub(x_3, x_11); +lean_dec(x_3); +x_13 = lean_nat_add(x_4, x_11); +lean_inc(x_2); +x_14 = l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___spec__1(x_1, x_4, x_2, x_13, x_2, x_11, x_7); +x_15 = lean_nat_add(x_4, x_6); +lean_dec(x_4); +x_3 = x_12; +x_4 = x_15; +x_7 = x_14; +goto _start; +} +else +{ +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +else +{ +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_dec(x_1); +x_4 = lean_array_get_size(x_3); +x_5 = lean_unsigned_to_nat(0u); +x_6 = lean_unsigned_to_nat(1u); +lean_inc_n(x_4, 2); +x_7 = l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___spec__2(x_3, x_4, x_4, x_5, x_4, x_6, x_2); +lean_dec(x_4); +lean_dec(x_3); +return x_7; +} +} +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +return x_8; +} +} +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___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) { +_start: +{ +lean_object* x_8; +x_8 = l_Std_Range_forIn_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_1); +return x_8; +} +} +static lean_object* _init_l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Lean.Meta.CongrTheorems"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("_private.Lean.Meta.CongrTheorems.0.Lean.Meta.mkCast.go"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unreachable code has been reached"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__4() { +_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_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1; +x_2 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__2; +x_3 = lean_unsigned_to_nat(142u); +x_4 = lean_unsigned_to_nat(61u); +x_5 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__3; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +static lean_object* _init_l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(2u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_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; uint8_t x_12; +x_11 = lean_array_get_size(x_2); +x_12 = lean_nat_dec_lt(x_4, x_11); +lean_dec(x_11); +if (x_12 == 0) +{ +lean_object* x_13; +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_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_1); +lean_ctor_set(x_13, 1, x_10); +return x_13; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_14 = lean_box(0); +x_15 = l_instInhabitedNat; +x_16 = lean_array_get(x_15, x_2, x_4); +x_17 = lean_array_get(x_14, x_3, x_16); +lean_dec(x_16); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; +x_18 = lean_unsigned_to_nat(1u); +x_19 = lean_nat_add(x_4, x_18); +lean_dec(x_4); +x_4 = x_19; +goto _start; +} +else +{ +uint8_t x_21; +x_21 = !lean_is_exclusive(x_17); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; +x_22 = lean_ctor_get(x_17, 0); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_22); +x_23 = lean_infer_type(x_22, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_93; lean_object* x_94; uint8_t x_95; +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_93 = l_Lean_Meta_mkHCongrWithArity_mkProof___closed__2; +x_94 = lean_unsigned_to_nat(3u); +x_95 = l_Lean_Expr_isAppOfArity(x_24, x_93, x_94); +if (x_95 == 0) +{ +lean_dec(x_24); +lean_free_object(x_17); +x_26 = x_14; +goto block_92; +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_96 = l_Lean_Expr_appFn_x21(x_24); +x_97 = l_Lean_Expr_appFn_x21(x_96); +x_98 = l_Lean_Expr_appArg_x21(x_97); +lean_dec(x_97); +x_99 = l_Lean_Expr_appArg_x21(x_96); +lean_dec(x_96); +x_100 = l_Lean_Expr_appArg_x21(x_24); +lean_dec(x_24); +x_101 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_101, 0, x_99); +lean_ctor_set(x_101, 1, x_100); +x_102 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_102, 0, x_98); +lean_ctor_set(x_102, 1, x_101); +lean_ctor_set(x_17, 0, x_102); +x_26 = x_17; +goto block_92; +} +block_92: +{ +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; +lean_dec(x_22); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +x_27 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__4; +x_28 = l_panic___at_Lean_Meta_whnfCore___spec__1(x_27, x_6, x_7, x_8, x_9, x_25); +return x_28; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; +x_29 = lean_ctor_get(x_26, 0); +lean_inc(x_29); +lean_dec(x_26); +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +lean_dec(x_29); +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); +lean_inc(x_22); +x_33 = l_Lean_Expr_fvarId_x21(x_22); +lean_inc(x_5); +x_34 = l_Lean_Meta_dependsOn(x_5, x_33, x_6, x_7, x_8, x_9, x_25); +lean_dec(x_33); +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +x_36 = lean_unbox(x_35); +lean_dec(x_35); +if (x_36 == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; uint8_t x_41; lean_object* x_42; +x_37 = lean_ctor_get(x_34, 1); +lean_inc(x_37); +lean_dec(x_34); +x_38 = l_Lean_Meta_mkHCongrWithArity_mkProof___lambda__1___closed__1; +lean_inc(x_32); +x_39 = lean_array_push(x_38, x_32); +x_40 = 0; +x_41 = 1; +lean_inc(x_6); +lean_inc(x_5); +x_42 = l_Lean_Meta_mkLambdaFVars(x_39, x_5, x_40, x_41, x_6, x_7, x_8, x_9, x_37); +if (lean_obj_tag(x_42) == 0) +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +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 = l_Lean_Expr_replaceFVar(x_5, x_32, x_31); +lean_dec(x_31); +lean_dec(x_5); +x_46 = lean_unsigned_to_nat(1u); +x_47 = lean_nat_add(x_4, x_46); +lean_dec(x_4); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_48 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go(x_1, x_2, x_3, x_47, x_45, x_6, x_7, x_8, x_9, x_44); +if (lean_obj_tag(x_48) == 0) +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +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_Meta_mkEqNDRec(x_43, x_49, x_22, x_6, x_7, x_8, x_9, x_50); +return x_51; +} +else +{ +uint8_t x_52; +lean_dec(x_43); +lean_dec(x_22); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_52 = !lean_is_exclusive(x_48); +if (x_52 == 0) +{ +return x_48; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_48, 0); +x_54 = lean_ctor_get(x_48, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_48); +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; +lean_dec(x_32); +lean_dec(x_31); +lean_dec(x_22); +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_56 = !lean_is_exclusive(x_42); +if (x_56 == 0) +{ +return x_42; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_42, 0); +x_58 = lean_ctor_get(x_42, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_42); +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_57); +lean_ctor_set(x_59, 1, x_58); +return x_59; +} +} +} +else +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; uint8_t x_65; lean_object* x_66; +x_60 = lean_ctor_get(x_34, 1); +lean_inc(x_60); +lean_dec(x_34); +x_61 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__5; +lean_inc(x_32); +x_62 = lean_array_push(x_61, x_32); +lean_inc(x_22); +x_63 = lean_array_push(x_62, x_22); +x_64 = 0; +x_65 = 1; +lean_inc(x_6); +lean_inc(x_5); +x_66 = l_Lean_Meta_mkLambdaFVars(x_63, x_5, x_64, x_65, x_6, x_7, x_8, x_9, x_60); +if (lean_obj_tag(x_66) == 0) +{ +lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_67 = lean_ctor_get(x_66, 0); +lean_inc(x_67); +x_68 = lean_ctor_get(x_66, 1); +lean_inc(x_68); +lean_dec(x_66); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_31); +x_69 = l_Lean_Meta_mkEqRefl(x_31, x_6, x_7, x_8, x_9, x_68); +if (lean_obj_tag(x_69) == 0) +{ +lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_70 = lean_ctor_get(x_69, 0); +lean_inc(x_70); +x_71 = lean_ctor_get(x_69, 1); +lean_inc(x_71); +lean_dec(x_69); +x_72 = l_Lean_Expr_replaceFVar(x_5, x_32, x_31); +lean_dec(x_31); +lean_dec(x_5); +lean_inc(x_22); +x_73 = l_Lean_Expr_replaceFVar(x_72, x_22, x_70); +lean_dec(x_70); +lean_dec(x_72); +x_74 = lean_unsigned_to_nat(1u); +x_75 = lean_nat_add(x_4, x_74); +lean_dec(x_4); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_76 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go(x_1, x_2, x_3, x_75, x_73, x_6, x_7, x_8, x_9, x_71); +if (lean_obj_tag(x_76) == 0) +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_76, 0); +lean_inc(x_77); +x_78 = lean_ctor_get(x_76, 1); +lean_inc(x_78); +lean_dec(x_76); +x_79 = l_Lean_Meta_mkEqRec(x_67, x_77, x_22, x_6, x_7, x_8, x_9, x_78); +return x_79; +} +else +{ +uint8_t x_80; +lean_dec(x_67); +lean_dec(x_22); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_80 = !lean_is_exclusive(x_76); +if (x_80 == 0) +{ +return x_76; +} +else +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_81 = lean_ctor_get(x_76, 0); +x_82 = lean_ctor_get(x_76, 1); +lean_inc(x_82); +lean_inc(x_81); +lean_dec(x_76); +x_83 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_83, 0, x_81); +lean_ctor_set(x_83, 1, x_82); +return x_83; +} +} +} +else +{ +uint8_t x_84; +lean_dec(x_67); +lean_dec(x_32); +lean_dec(x_31); +lean_dec(x_22); +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_84 = !lean_is_exclusive(x_69); +if (x_84 == 0) +{ +return x_69; +} +else +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_69, 0); +x_86 = lean_ctor_get(x_69, 1); +lean_inc(x_86); +lean_inc(x_85); +lean_dec(x_69); +x_87 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_87, 0, x_85); +lean_ctor_set(x_87, 1, x_86); +return x_87; +} +} +} +else +{ +uint8_t x_88; +lean_dec(x_32); +lean_dec(x_31); +lean_dec(x_22); +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_88 = !lean_is_exclusive(x_66); +if (x_88 == 0) +{ +return x_66; +} +else +{ +lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_89 = lean_ctor_get(x_66, 0); +x_90 = lean_ctor_get(x_66, 1); +lean_inc(x_90); +lean_inc(x_89); +lean_dec(x_66); +x_91 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_91, 0, x_89); +lean_ctor_set(x_91, 1, x_90); +return x_91; +} +} +} +} +} +} +else +{ +uint8_t x_103; +lean_free_object(x_17); +lean_dec(x_22); +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_103 = !lean_is_exclusive(x_23); +if (x_103 == 0) +{ +return x_23; +} +else +{ +lean_object* x_104; lean_object* x_105; lean_object* x_106; +x_104 = lean_ctor_get(x_23, 0); +x_105 = lean_ctor_get(x_23, 1); +lean_inc(x_105); +lean_inc(x_104); +lean_dec(x_23); +x_106 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_106, 0, x_104); +lean_ctor_set(x_106, 1, x_105); +return x_106; +} +} +} +else +{ +lean_object* x_107; lean_object* x_108; +x_107 = lean_ctor_get(x_17, 0); +lean_inc(x_107); +lean_dec(x_17); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_107); +x_108 = lean_infer_type(x_107, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_108) == 0) +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_178; lean_object* x_179; uint8_t x_180; +x_109 = lean_ctor_get(x_108, 0); +lean_inc(x_109); +x_110 = lean_ctor_get(x_108, 1); +lean_inc(x_110); +lean_dec(x_108); +x_178 = l_Lean_Meta_mkHCongrWithArity_mkProof___closed__2; +x_179 = lean_unsigned_to_nat(3u); +x_180 = l_Lean_Expr_isAppOfArity(x_109, x_178, x_179); +if (x_180 == 0) +{ +lean_dec(x_109); +x_111 = x_14; +goto block_177; +} +else +{ +lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; +x_181 = l_Lean_Expr_appFn_x21(x_109); +x_182 = l_Lean_Expr_appFn_x21(x_181); +x_183 = l_Lean_Expr_appArg_x21(x_182); +lean_dec(x_182); +x_184 = l_Lean_Expr_appArg_x21(x_181); +lean_dec(x_181); +x_185 = l_Lean_Expr_appArg_x21(x_109); +lean_dec(x_109); +x_186 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_186, 0, x_184); +lean_ctor_set(x_186, 1, x_185); +x_187 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_187, 0, x_183); +lean_ctor_set(x_187, 1, x_186); +x_188 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_188, 0, x_187); +x_111 = x_188; +goto block_177; +} +block_177: +{ +if (lean_obj_tag(x_111) == 0) +{ +lean_object* x_112; lean_object* x_113; +lean_dec(x_107); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +x_112 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__4; +x_113 = l_panic___at_Lean_Meta_whnfCore___spec__1(x_112, x_6, x_7, x_8, x_9, x_110); +return x_113; +} +else +{ +lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; uint8_t x_121; +x_114 = lean_ctor_get(x_111, 0); +lean_inc(x_114); +lean_dec(x_111); +x_115 = lean_ctor_get(x_114, 1); +lean_inc(x_115); +lean_dec(x_114); +x_116 = lean_ctor_get(x_115, 0); +lean_inc(x_116); +x_117 = lean_ctor_get(x_115, 1); +lean_inc(x_117); +lean_dec(x_115); +lean_inc(x_107); +x_118 = l_Lean_Expr_fvarId_x21(x_107); +lean_inc(x_5); +x_119 = l_Lean_Meta_dependsOn(x_5, x_118, x_6, x_7, x_8, x_9, x_110); +lean_dec(x_118); +x_120 = lean_ctor_get(x_119, 0); +lean_inc(x_120); +x_121 = lean_unbox(x_120); +lean_dec(x_120); +if (x_121 == 0) +{ +lean_object* x_122; lean_object* x_123; lean_object* x_124; uint8_t x_125; uint8_t x_126; lean_object* x_127; +x_122 = lean_ctor_get(x_119, 1); +lean_inc(x_122); +lean_dec(x_119); +x_123 = l_Lean_Meta_mkHCongrWithArity_mkProof___lambda__1___closed__1; +lean_inc(x_117); +x_124 = lean_array_push(x_123, x_117); +x_125 = 0; +x_126 = 1; +lean_inc(x_6); +lean_inc(x_5); +x_127 = l_Lean_Meta_mkLambdaFVars(x_124, x_5, x_125, x_126, x_6, x_7, x_8, x_9, x_122); +if (lean_obj_tag(x_127) == 0) +{ +lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; +x_128 = lean_ctor_get(x_127, 0); +lean_inc(x_128); +x_129 = lean_ctor_get(x_127, 1); +lean_inc(x_129); +lean_dec(x_127); +x_130 = l_Lean_Expr_replaceFVar(x_5, x_117, x_116); +lean_dec(x_116); +lean_dec(x_5); +x_131 = lean_unsigned_to_nat(1u); +x_132 = lean_nat_add(x_4, x_131); +lean_dec(x_4); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_133 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go(x_1, x_2, x_3, x_132, x_130, x_6, x_7, x_8, x_9, x_129); +if (lean_obj_tag(x_133) == 0) +{ +lean_object* x_134; lean_object* x_135; lean_object* x_136; +x_134 = lean_ctor_get(x_133, 0); +lean_inc(x_134); +x_135 = lean_ctor_get(x_133, 1); +lean_inc(x_135); +lean_dec(x_133); +x_136 = l_Lean_Meta_mkEqNDRec(x_128, x_134, x_107, x_6, x_7, x_8, x_9, x_135); +return x_136; +} +else +{ +lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; +lean_dec(x_128); +lean_dec(x_107); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_137 = lean_ctor_get(x_133, 0); +lean_inc(x_137); +x_138 = lean_ctor_get(x_133, 1); +lean_inc(x_138); +if (lean_is_exclusive(x_133)) { + lean_ctor_release(x_133, 0); + lean_ctor_release(x_133, 1); + x_139 = x_133; +} else { + lean_dec_ref(x_133); + x_139 = lean_box(0); +} +if (lean_is_scalar(x_139)) { + x_140 = lean_alloc_ctor(1, 2, 0); +} else { + x_140 = x_139; +} +lean_ctor_set(x_140, 0, x_137); +lean_ctor_set(x_140, 1, x_138); +return x_140; +} +} +else +{ +lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; +lean_dec(x_117); +lean_dec(x_116); +lean_dec(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); +lean_dec(x_1); +x_141 = lean_ctor_get(x_127, 0); +lean_inc(x_141); +x_142 = lean_ctor_get(x_127, 1); +lean_inc(x_142); +if (lean_is_exclusive(x_127)) { + lean_ctor_release(x_127, 0); + lean_ctor_release(x_127, 1); + x_143 = x_127; +} else { + lean_dec_ref(x_127); + x_143 = lean_box(0); +} +if (lean_is_scalar(x_143)) { + x_144 = lean_alloc_ctor(1, 2, 0); +} else { + x_144 = x_143; +} +lean_ctor_set(x_144, 0, x_141); +lean_ctor_set(x_144, 1, x_142); +return x_144; +} +} +else +{ +lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; uint8_t x_149; uint8_t x_150; lean_object* x_151; +x_145 = lean_ctor_get(x_119, 1); +lean_inc(x_145); +lean_dec(x_119); +x_146 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__5; +lean_inc(x_117); +x_147 = lean_array_push(x_146, x_117); +lean_inc(x_107); +x_148 = lean_array_push(x_147, x_107); +x_149 = 0; +x_150 = 1; +lean_inc(x_6); +lean_inc(x_5); +x_151 = l_Lean_Meta_mkLambdaFVars(x_148, x_5, x_149, x_150, x_6, x_7, x_8, x_9, x_145); +if (lean_obj_tag(x_151) == 0) +{ +lean_object* x_152; lean_object* x_153; lean_object* x_154; +x_152 = lean_ctor_get(x_151, 0); +lean_inc(x_152); +x_153 = lean_ctor_get(x_151, 1); +lean_inc(x_153); +lean_dec(x_151); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_116); +x_154 = l_Lean_Meta_mkEqRefl(x_116, x_6, x_7, x_8, x_9, x_153); +if (lean_obj_tag(x_154) == 0) +{ +lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; +x_155 = lean_ctor_get(x_154, 0); +lean_inc(x_155); +x_156 = lean_ctor_get(x_154, 1); +lean_inc(x_156); +lean_dec(x_154); +x_157 = l_Lean_Expr_replaceFVar(x_5, x_117, x_116); +lean_dec(x_116); +lean_dec(x_5); +lean_inc(x_107); +x_158 = l_Lean_Expr_replaceFVar(x_157, x_107, x_155); +lean_dec(x_155); +lean_dec(x_157); +x_159 = lean_unsigned_to_nat(1u); +x_160 = lean_nat_add(x_4, x_159); +lean_dec(x_4); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_161 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go(x_1, x_2, x_3, x_160, x_158, x_6, x_7, x_8, x_9, x_156); +if (lean_obj_tag(x_161) == 0) +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; +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 = l_Lean_Meta_mkEqRec(x_152, x_162, x_107, x_6, x_7, x_8, x_9, x_163); +return x_164; +} +else +{ +lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; +lean_dec(x_152); +lean_dec(x_107); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +x_165 = lean_ctor_get(x_161, 0); +lean_inc(x_165); +x_166 = lean_ctor_get(x_161, 1); +lean_inc(x_166); +if (lean_is_exclusive(x_161)) { + lean_ctor_release(x_161, 0); + lean_ctor_release(x_161, 1); + x_167 = x_161; +} else { + lean_dec_ref(x_161); + x_167 = lean_box(0); +} +if (lean_is_scalar(x_167)) { + x_168 = lean_alloc_ctor(1, 2, 0); +} else { + x_168 = x_167; +} +lean_ctor_set(x_168, 0, x_165); +lean_ctor_set(x_168, 1, x_166); +return x_168; +} +} +else +{ +lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; +lean_dec(x_152); +lean_dec(x_117); +lean_dec(x_116); +lean_dec(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); +lean_dec(x_1); +x_169 = lean_ctor_get(x_154, 0); +lean_inc(x_169); +x_170 = lean_ctor_get(x_154, 1); +lean_inc(x_170); +if (lean_is_exclusive(x_154)) { + lean_ctor_release(x_154, 0); + lean_ctor_release(x_154, 1); + x_171 = x_154; +} else { + lean_dec_ref(x_154); + x_171 = lean_box(0); +} +if (lean_is_scalar(x_171)) { + x_172 = lean_alloc_ctor(1, 2, 0); +} else { + x_172 = x_171; +} +lean_ctor_set(x_172, 0, x_169); +lean_ctor_set(x_172, 1, x_170); +return x_172; +} +} +else +{ +lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; +lean_dec(x_117); +lean_dec(x_116); +lean_dec(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); +lean_dec(x_1); +x_173 = lean_ctor_get(x_151, 0); +lean_inc(x_173); +x_174 = lean_ctor_get(x_151, 1); +lean_inc(x_174); +if (lean_is_exclusive(x_151)) { + lean_ctor_release(x_151, 0); + lean_ctor_release(x_151, 1); + x_175 = x_151; +} else { + lean_dec_ref(x_151); + x_175 = lean_box(0); +} +if (lean_is_scalar(x_175)) { + x_176 = lean_alloc_ctor(1, 2, 0); +} else { + x_176 = 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_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; +lean_dec(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); +lean_dec(x_1); +x_189 = lean_ctor_get(x_108, 0); +lean_inc(x_189); +x_190 = lean_ctor_get(x_108, 1); +lean_inc(x_190); +if (lean_is_exclusive(x_108)) { + lean_ctor_release(x_108, 0); + lean_ctor_release(x_108, 1); + x_191 = x_108; +} else { + lean_dec_ref(x_108); + x_191 = lean_box(0); +} +if (lean_is_scalar(x_191)) { + x_192 = lean_alloc_ctor(1, 2, 0); +} else { + x_192 = x_191; +} +lean_ctor_set(x_192, 0, x_189); +lean_ctor_set(x_192, 1, x_190); +return x_192; +} +} +} +} +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___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_CongrTheorems_0__Lean_Meta_mkCast_go(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast(lean_object* x_1, lean_object* x_2, lean_object* x_3, 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_unsigned_to_nat(0u); +x_11 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go(x_1, x_3, x_4, x_10, x_2, x_5, x_6, x_7, x_8, x_9); +return x_11; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast___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___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast(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_3); +return x_10; +} +} +LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike___spec__1(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; lean_object* x_7; lean_object* x_14; +x_5 = lean_array_uget(x_1, x_2); +x_6 = lean_unbox(x_5); +lean_dec(x_5); +x_14 = lean_box(x_6); +if (lean_obj_tag(x_14) == 3) +{ +uint8_t x_15; +x_15 = 1; +return x_15; +} +else +{ +lean_object* x_16; +lean_dec(x_14); +x_16 = lean_box(0); +x_7 = x_16; +goto block_13; +} +block_13: +{ +lean_object* x_8; +lean_dec(x_7); +x_8 = lean_box(x_6); +if (lean_obj_tag(x_8) == 5) +{ +uint8_t x_9; +x_9 = 1; +return x_9; +} +else +{ +size_t x_10; size_t x_11; +lean_dec(x_8); +x_10 = 1; +x_11 = lean_usize_add(x_2, x_10); +x_2 = x_11; +goto _start; +} +} +} +else +{ +uint8_t x_17; +x_17 = 0; +return x_17; +} +} +} +LEAN_EXPORT uint8_t l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; uint8_t x_4; +x_2 = lean_array_get_size(x_1); +x_3 = lean_unsigned_to_nat(0u); +x_4 = lean_nat_dec_lt(x_3, x_2); +if (x_4 == 0) +{ +uint8_t x_5; +lean_dec(x_2); +x_5 = 0; +return x_5; +} +else +{ +uint8_t x_6; +x_6 = lean_nat_dec_le(x_2, x_2); +if (x_6 == 0) +{ +uint8_t x_7; +lean_dec(x_2); +x_7 = 0; +return x_7; +} +else +{ +size_t x_8; size_t x_9; uint8_t x_10; +x_8 = 0; +x_9 = lean_usize_of_nat(x_2); +lean_dec(x_2); +x_10 = l_Array_anyMUnsafe_any___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike___spec__1(x_1, x_8, x_9); +return x_10; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike___spec__1___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___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike___spec__1(x_1, x_4, x_5); +lean_dec(x_1); +x_7 = lean_box(x_6); +return x_7; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike(x_1); +lean_dec(x_1); +x_3 = lean_box(x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___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) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = l_Lean_instInhabitedExpr; +x_10 = lean_unsigned_to_nat(0u); +x_11 = lean_array_get(x_9, x_2, x_10); +x_12 = lean_apply_7(x_1, x_11, x_3, x_4, x_5, x_6, x_7, x_8); +return x_12; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_alloc_closure((void*)(l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg___lambda__1___boxed), 8, 1); +lean_closure_set(x_8, 0, x_2); +x_9 = l_Lean_Meta_mkHCongrWithArity_mkProof___closed__5; +x_10 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(x_1, x_9, x_8, x_3, x_4, x_5, x_6, x_7); +return x_10; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg), 7, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg___lambda__1(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 lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_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_object* x_15; uint8_t x_16; uint8_t x_17; lean_object* x_18; +lean_inc(x_2); +x_14 = lean_array_push(x_1, x_2); +lean_inc(x_7); +x_15 = lean_array_push(x_14, x_7); +x_16 = 0; +x_17 = 1; +lean_inc(x_9); +x_18 = l_Lean_Meta_mkLambdaFVars(x_15, x_8, x_16, x_17, x_9, x_10, x_11, x_12, x_13); +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 = lean_unsigned_to_nat(1u); +x_22 = lean_nat_add(x_3, x_21); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +x_23 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go(x_4, x_22, x_5, x_9, x_10, x_11, x_12, x_20); +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); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_7); +x_26 = l_Lean_Meta_mkEqRec(x_19, x_24, x_7, x_9, x_10, x_11, x_12, x_25); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +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_Meta_mkHCongrWithArity_mkProof___lambda__1___closed__2; +x_30 = lean_array_push(x_29, x_6); +x_31 = lean_array_push(x_30, x_2); +x_32 = lean_array_push(x_31, x_7); +x_33 = l_Lean_Meta_mkLambdaFVars(x_32, x_27, x_16, x_17, x_9, x_10, x_11, x_12, x_28); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +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_2); +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_19); +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_2); +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_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_2); +x_42 = !lean_is_exclusive(x_18); +if (x_42 == 0) +{ +return x_18; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_18, 0); +x_44 = lean_ctor_get(x_18, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_18); +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_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_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, lean_object* x_11, lean_object* x_12) { +_start: +{ +lean_object* x_13; lean_object* x_14; +x_13 = lean_alloc_closure((void*)(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__1___boxed), 13, 6); +lean_closure_set(x_13, 0, x_1); +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); +lean_closure_set(x_13, 5, x_5); +x_14 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg(x_7, x_13, x_8, x_9, x_10, x_11, x_12); +return x_14; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Subsingleton"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("elim"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__2; +x_2 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___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; uint8_t x_14; uint8_t x_15; lean_object* x_16; +lean_inc(x_6); +x_13 = lean_array_push(x_1, x_6); +x_14 = 0; +x_15 = 1; +lean_inc(x_8); +x_16 = l_Lean_Meta_mkLambdaFVars(x_13, x_7, x_14, x_15, 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; lean_object* 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 = lean_unsigned_to_nat(1u); +x_20 = lean_nat_add(x_2, x_19); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_21 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go(x_3, x_20, x_4, x_8, x_9, x_10, x_11, x_18); +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; lean_object* x_27; lean_object* x_28; +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___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__5; +x_25 = lean_array_push(x_24, x_5); +x_26 = lean_array_push(x_25, x_6); +x_27 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__4; +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_26); +x_28 = l_Lean_Meta_mkAppM(x_27, x_26, x_8, x_9, x_10, x_11, x_23); +if (lean_obj_tag(x_28) == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +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); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +x_31 = l_Lean_Meta_mkEqNDRec(x_17, x_22, x_29, x_8, x_9, x_10, x_11, x_30); +if (lean_obj_tag(x_31) == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +lean_dec(x_31); +x_34 = l_Lean_Meta_mkLambdaFVars(x_26, x_32, x_14, x_15, x_8, x_9, x_10, x_11, x_33); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +return x_34; +} +else +{ +uint8_t x_35; +lean_dec(x_26); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +x_35 = !lean_is_exclusive(x_31); +if (x_35 == 0) +{ +return x_31; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_31, 0); +x_37 = lean_ctor_get(x_31, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_31); +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_26); +lean_dec(x_22); +lean_dec(x_17); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +x_39 = !lean_is_exclusive(x_28); +if (x_39 == 0) +{ +return x_28; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_28, 0); +x_41 = lean_ctor_get(x_28, 1); +lean_inc(x_41); +lean_inc(x_40); +lean_dec(x_28); +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 +{ +uint8_t x_43; +lean_dec(x_17); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +x_43 = !lean_is_exclusive(x_21); +if (x_43 == 0) +{ +return x_21; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_21, 0); +x_45 = lean_ctor_get(x_21, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_21); +x_46 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_46, 0, x_44); +lean_ctor_set(x_46, 1, x_45); +return x_46; +} +} +} +else +{ +uint8_t x_47; +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); +x_47 = !lean_is_exclusive(x_16); +if (x_47 == 0) +{ +return x_16; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_16, 0); +x_49 = lean_ctor_get(x_16, 1); +lean_inc(x_49); +lean_inc(x_48); +lean_dec(x_16); +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_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Lean.Meta.mkCongrSimpWithArity?.mkProof.go"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1; +x_2 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__1; +x_3 = lean_unsigned_to_nat(230u); +x_4 = lean_unsigned_to_nat(39u); +x_5 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__3; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___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_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1; +x_2 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__1; +x_3 = lean_unsigned_to_nat(229u); +x_4 = lean_unsigned_to_nat(30u); +x_5 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_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_Meta_mkCongrSimpWithArity_x3f_mkProof_go___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) { +_start: +{ +uint8_t x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; +x_10 = l_Lean_Meta_instInhabitedCongrArgKind; +x_11 = lean_box(x_10); +x_12 = lean_array_get(x_11, x_1, x_2); +x_13 = lean_unbox(x_12); +lean_dec(x_12); +x_14 = lean_box(x_13); +switch (lean_obj_tag(x_14)) { +case 1: +{ +lean_object* x_15; lean_object* x_16; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_15 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__2; +x_16 = l_panic___at_Lean_Meta_whnfCore___spec__1(x_15, x_5, x_6, x_7, x_8, x_9); +return x_16; +} +case 2: +{ +lean_object* x_17; +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_3); +x_17 = l_Lean_Meta_mkEqRefl(x_3, x_5, x_6, x_7, x_8, x_9); +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; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +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 = l_Lean_Expr_bindingBody_x21(x_4); +x_21 = l_Lean_Expr_bindingBody_x21(x_20); +lean_dec(x_20); +x_22 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__5; +x_23 = lean_array_push(x_22, x_18); +lean_inc(x_3); +x_24 = lean_array_push(x_23, x_3); +x_25 = lean_expr_instantiate(x_21, x_24); +lean_dec(x_24); +lean_dec(x_21); +x_26 = lean_alloc_closure((void*)(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__2), 12, 5); +lean_closure_set(x_26, 0, x_22); +lean_closure_set(x_26, 1, x_2); +lean_closure_set(x_26, 2, x_1); +lean_closure_set(x_26, 3, x_25); +lean_closure_set(x_26, 4, x_3); +x_27 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg(x_4, x_26, x_5, x_6, x_7, x_8, x_19); +return x_27; +} +else +{ +uint8_t x_28; +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_28 = !lean_is_exclusive(x_17); +if (x_28 == 0) +{ +return x_17; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_17, 0); +x_30 = lean_ctor_get(x_17, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_17); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +case 4: +{ +lean_object* x_32; lean_object* x_33; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_32 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__3; +x_33 = l_panic___at_Lean_Meta_whnfCore___spec__1(x_32, x_5, x_6, x_7, x_8, x_9); +return x_33; +} +case 5: +{ +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_34 = l_Lean_Expr_bindingBody_x21(x_4); +x_35 = l_Lean_Meta_mkHCongrWithArity_mkProof___lambda__1___closed__1; +lean_inc(x_3); +x_36 = lean_array_push(x_35, x_3); +x_37 = lean_expr_instantiate(x_34, x_36); +lean_dec(x_36); +lean_dec(x_34); +x_38 = lean_alloc_closure((void*)(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___boxed), 12, 5); +lean_closure_set(x_38, 0, x_35); +lean_closure_set(x_38, 1, x_2); +lean_closure_set(x_38, 2, x_1); +lean_closure_set(x_38, 3, x_37); +lean_closure_set(x_38, 4, x_3); +x_39 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg(x_4, x_38, x_5, x_6, x_7, x_8, x_9); +return x_39; +} +default: +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; +lean_dec(x_14); +x_40 = lean_unsigned_to_nat(1u); +x_41 = lean_nat_add(x_2, x_40); +lean_dec(x_2); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_42 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go(x_1, x_41, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_42) == 0) +{ +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_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 = l_Lean_Meta_mkHCongrWithArity_mkProof___lambda__1___closed__1; +x_46 = lean_array_push(x_45, x_3); +x_47 = 0; +x_48 = 1; +x_49 = l_Lean_Meta_mkLambdaFVars(x_46, x_43, x_47, x_48, x_5, x_6, x_7, x_8, x_44); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +return x_49; +} +else +{ +uint8_t x_50; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_50 = !lean_is_exclusive(x_42); +if (x_50 == 0) +{ +return x_42; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_51 = lean_ctor_get(x_42, 0); +x_52 = lean_ctor_get(x_42, 1); +lean_inc(x_52); +lean_inc(x_51); +lean_dec(x_42); +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; +} +} +} +} +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1; +x_2 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__1; +x_3 = lean_unsigned_to_nat(224u); +x_4 = lean_unsigned_to_nat(43u); +x_5 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_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_Meta_mkCongrSimpWithArity_x3f_mkProof_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) { +_start: +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_array_get_size(x_1); +x_10 = lean_nat_dec_eq(x_2, x_9); +lean_dec(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_alloc_closure((void*)(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4), 9, 2); +lean_closure_set(x_11, 0, x_1); +lean_closure_set(x_11, 1, x_2); +x_12 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_withNext___rarg(x_3, x_11, x_4, x_5, x_6, x_7, x_8); +return x_12; +} +else +{ +lean_object* x_13; lean_object* x_14; uint8_t x_15; +lean_dec(x_2); +lean_dec(x_1); +x_13 = l_Lean_Meta_mkHCongrWithArity_mkProof___closed__2; +x_14 = lean_unsigned_to_nat(3u); +x_15 = l_Lean_Expr_isAppOfArity(x_3, x_13, x_14); +if (x_15 == 0) +{ +lean_object* x_16; lean_object* x_17; +lean_dec(x_3); +x_16 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___closed__1; +x_17 = l_panic___at_Lean_Meta_whnfCore___spec__1(x_16, x_4, x_5, x_6, x_7, x_8); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = l_Lean_Expr_appFn_x21(x_3); +lean_dec(x_3); +x_19 = l_Lean_Expr_appArg_x21(x_18); +lean_dec(x_18); +x_20 = l_Lean_Meta_mkEqRefl(x_19, x_4, x_5, x_6, x_7, x_8); +return x_20; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; +x_14 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___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_3); +return x_14; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___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_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___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_2); +return x_13; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof(lean_object* x_1, 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; +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go(x_2, x_8, x_1, x_3, x_4, x_5, x_6, x_7); +return x_9; +} +} +static lean_object* _init_l_panic___at_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___spec__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_instInhabitedMetaM___boxed), 5, 1); +lean_closure_set(x_1, 0, lean_box(0)); +return x_1; +} +} +LEAN_EXPORT lean_object* l_panic___at_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = l_panic___at_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___spec__1___closed__1; +x_8 = lean_panic_fn(x_7, x_1); +x_9 = lean_apply_5(x_8, x_2, x_3, x_4, x_5, x_6); +return x_9; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_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, lean_object* x_15) { +_start: +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_16 = lean_unsigned_to_nat(1u); +x_17 = lean_nat_add(x_1, x_16); +lean_dec(x_1); +lean_inc(x_3); +x_18 = lean_array_push(x_2, x_3); +lean_inc(x_10); +x_19 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_19, 0, x_10); +x_20 = lean_array_push(x_4, x_19); +x_21 = lean_array_push(x_5, x_3); +x_22 = lean_array_push(x_21, x_10); +x_23 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go(x_6, x_7, x_8, x_9, x_17, x_18, x_20, x_22, x_11, x_12, x_13, x_14, x_15); +return x_23; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_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, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { +_start: +{ +lean_object* x_16; +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +x_16 = l_Lean_Meta_mkEq(x_1, x_10, x_11, x_12, x_13, x_14, x_15); +if (lean_obj_tag(x_16) == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; lean_object* x_26; +x_17 = lean_ctor_get(x_16, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_16, 1); +lean_inc(x_18); +lean_dec(x_16); +x_19 = lean_array_get_size(x_2); +x_20 = lean_unsigned_to_nat(1u); +x_21 = lean_nat_add(x_19, x_20); +lean_dec(x_19); +x_22 = l_Lean_Meta_mkHCongrWithArity_withNewEqs_loop___rarg___closed__2; +x_23 = lean_name_append_index_after(x_22, x_21); +x_24 = lean_alloc_closure((void*)(l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___lambda__1), 15, 9); +lean_closure_set(x_24, 0, x_3); +lean_closure_set(x_24, 1, x_4); +lean_closure_set(x_24, 2, x_10); +lean_closure_set(x_24, 3, x_2); +lean_closure_set(x_24, 4, x_5); +lean_closure_set(x_24, 5, x_6); +lean_closure_set(x_24, 6, x_7); +lean_closure_set(x_24, 7, x_8); +lean_closure_set(x_24, 8, x_9); +x_25 = 0; +x_26 = l_Lean_Meta_withLocalDecl___at___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_removeUnusedArguments_x3f___spec__2___rarg(x_23, x_25, x_17, x_24, x_11, x_12, x_13, x_14, x_18); +return x_26; +} +else +{ +uint8_t x_27; +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_27 = !lean_is_exclusive(x_16); +if (x_27 == 0) +{ +return x_16; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_16, 0); +x_29 = lean_ctor_get(x_16, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_16); +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_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___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; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_add(x_1, x_15); +lean_dec(x_1); +lean_inc(x_9); +x_17 = lean_array_push(x_2, x_9); +x_18 = lean_box(0); +x_19 = lean_array_push(x_3, x_18); +x_20 = lean_array_push(x_4, x_9); +x_21 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go(x_5, x_6, x_7, x_8, x_16, x_17, x_19, x_20, x_10, x_11, x_12, x_13, x_14); +return x_21; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Lean.Meta.mkCongrSimpWithArity?.mk?.go"); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1; +x_2 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__1; +x_3 = lean_unsigned_to_nat(202u); +x_4 = lean_unsigned_to_nat(43u); +x_5 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__3; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___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_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1; +x_2 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__1; +x_3 = lean_unsigned_to_nat(201u); +x_4 = lean_unsigned_to_nat(34u); +x_5 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_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_Meta_mkCongrSimpWithArity_x3f_mk_x3f_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; +x_14 = lean_array_get_size(x_3); +x_15 = lean_nat_dec_eq(x_5, x_14); +lean_dec(x_14); +if (x_15 == 0) +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; +x_16 = l_Lean_instInhabitedExpr; +x_17 = lean_array_get(x_16, x_4, x_5); +lean_inc(x_17); +x_18 = lean_array_push(x_8, x_17); +x_19 = l_Lean_Meta_instInhabitedCongrArgKind; +x_20 = lean_box(x_19); +x_21 = lean_array_get(x_20, x_3, x_5); +x_22 = lean_unbox(x_21); +lean_dec(x_21); +switch (x_22) { +case 0: +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_23 = lean_unsigned_to_nat(1u); +x_24 = lean_nat_add(x_5, x_23); +lean_dec(x_5); +x_25 = lean_array_push(x_6, x_17); +x_26 = lean_box(0); +x_27 = lean_array_push(x_7, x_26); +x_5 = x_24; +x_6 = x_25; +x_7 = x_27; +x_8 = x_18; +goto _start; +} +case 1: +{ +lean_object* x_29; lean_object* x_30; +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_29 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__2; +x_30 = l_panic___at_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___spec__1(x_29, x_9, x_10, x_11, x_12, x_13); +return x_30; +} +case 2: +{ +lean_object* x_31; lean_object* x_32; +lean_inc(x_17); +x_31 = l_Lean_Expr_fvarId_x21(x_17); +lean_inc(x_9); +x_32 = l_Lean_Meta_getLocalDecl(x_31, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_32) == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_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_LocalDecl_userName(x_33); +x_36 = l_Lean_LocalDecl_binderInfo(x_33); +x_37 = l_Lean_LocalDecl_type(x_33); +lean_dec(x_33); +x_38 = lean_alloc_closure((void*)(l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___lambda__2), 15, 9); +lean_closure_set(x_38, 0, x_17); +lean_closure_set(x_38, 1, x_7); +lean_closure_set(x_38, 2, x_5); +lean_closure_set(x_38, 3, x_6); +lean_closure_set(x_38, 4, x_18); +lean_closure_set(x_38, 5, x_1); +lean_closure_set(x_38, 6, x_2); +lean_closure_set(x_38, 7, x_3); +lean_closure_set(x_38, 8, x_4); +x_39 = l_Lean_Meta_withLocalDecl___at___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_removeUnusedArguments_x3f___spec__2___rarg(x_35, x_36, x_37, x_38, x_9, x_10, x_11, x_12, x_34); +return x_39; +} +else +{ +uint8_t x_40; +lean_dec(x_18); +lean_dec(x_17); +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_40 = !lean_is_exclusive(x_32); +if (x_40 == 0) +{ +return x_32; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_32, 0); +x_42 = lean_ctor_get(x_32, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_32); +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; +} +} +} +case 3: +{ +lean_object* x_44; +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_17); +x_44 = lean_infer_type(x_17, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_44) == 0) +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +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_array_get_size(x_6); +x_48 = lean_unsigned_to_nat(0u); +lean_inc(x_4); +x_49 = l_Array_toSubarray___rarg(x_4, x_48, x_47); +x_50 = l_Array_ofSubarray___rarg(x_49); +x_51 = l_Lean_Expr_replaceFVars(x_45, x_50, x_6); +lean_dec(x_50); +lean_dec(x_45); +x_52 = lean_ctor_get(x_2, 0); +lean_inc(x_52); +x_53 = l_Lean_Meta_instInhabitedParamInfo; +x_54 = lean_array_get(x_53, x_52, x_5); +lean_dec(x_52); +x_55 = lean_ctor_get(x_54, 0); +lean_inc(x_55); +lean_dec(x_54); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +x_56 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go(x_17, x_55, x_7, x_48, x_51, x_9, x_10, x_11, x_12, x_46); +lean_dec(x_55); +if (lean_obj_tag(x_56) == 0) +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_57 = lean_ctor_get(x_56, 0); +lean_inc(x_57); +x_58 = lean_ctor_get(x_56, 1); +lean_inc(x_58); +lean_dec(x_56); +x_59 = lean_unsigned_to_nat(1u); +x_60 = lean_nat_add(x_5, x_59); +lean_dec(x_5); +x_61 = lean_array_push(x_6, x_57); +x_62 = lean_box(0); +x_63 = lean_array_push(x_7, x_62); +x_5 = x_60; +x_6 = x_61; +x_7 = x_63; +x_8 = x_18; +x_13 = x_58; +goto _start; +} +else +{ +uint8_t x_65; +lean_dec(x_18); +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_65 = !lean_is_exclusive(x_56); +if (x_65 == 0) +{ +return x_56; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_56, 0); +x_67 = lean_ctor_get(x_56, 1); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_56); +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 +{ +uint8_t x_69; +lean_dec(x_18); +lean_dec(x_17); +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_69 = !lean_is_exclusive(x_44); +if (x_69 == 0) +{ +return x_44; +} +else +{ +lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_70 = lean_ctor_get(x_44, 0); +x_71 = lean_ctor_get(x_44, 1); +lean_inc(x_71); +lean_inc(x_70); +lean_dec(x_44); +x_72 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_72, 0, x_70); +lean_ctor_set(x_72, 1, x_71); +return x_72; +} +} +} +case 4: +{ +lean_object* x_73; lean_object* x_74; +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_73 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__3; +x_74 = l_panic___at_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___spec__1(x_73, x_9, x_10, x_11, x_12, x_13); +return x_74; +} +default: +{ +lean_object* x_75; +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_17); +x_75 = lean_infer_type(x_17, x_9, x_10, x_11, x_12, x_13); +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; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; +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 = lean_array_get_size(x_6); +x_79 = lean_unsigned_to_nat(0u); +lean_inc(x_4); +x_80 = l_Array_toSubarray___rarg(x_4, x_79, x_78); +x_81 = l_Array_ofSubarray___rarg(x_80); +x_82 = l_Lean_Expr_replaceFVars(x_76, x_81, x_6); +lean_dec(x_81); +lean_dec(x_76); +x_83 = l_Lean_Expr_fvarId_x21(x_17); +lean_inc(x_9); +x_84 = l_Lean_Meta_getLocalDecl(x_83, x_9, x_10, x_11, x_12, x_77); +if (lean_obj_tag(x_84) == 0) +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; lean_object* x_90; +x_85 = lean_ctor_get(x_84, 0); +lean_inc(x_85); +x_86 = lean_ctor_get(x_84, 1); +lean_inc(x_86); +lean_dec(x_84); +x_87 = l_Lean_LocalDecl_userName(x_85); +lean_dec(x_85); +x_88 = lean_alloc_closure((void*)(l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___lambda__3), 14, 8); +lean_closure_set(x_88, 0, x_5); +lean_closure_set(x_88, 1, x_6); +lean_closure_set(x_88, 2, x_7); +lean_closure_set(x_88, 3, x_18); +lean_closure_set(x_88, 4, x_1); +lean_closure_set(x_88, 5, x_2); +lean_closure_set(x_88, 6, x_3); +lean_closure_set(x_88, 7, x_4); +x_89 = 3; +x_90 = l_Lean_Meta_withLocalDecl___at___private_Lean_Meta_SynthInstance_0__Lean_Meta_SynthInstance_removeUnusedArguments_x3f___spec__2___rarg(x_87, x_89, x_82, x_88, x_9, x_10, x_11, x_12, x_86); +return x_90; +} +else +{ +uint8_t x_91; +lean_dec(x_82); +lean_dec(x_18); +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_84); +if (x_91 == 0) +{ +return x_84; +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; +x_92 = lean_ctor_get(x_84, 0); +x_93 = lean_ctor_get(x_84, 1); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_84); +x_94 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_94, 0, x_92); +lean_ctor_set(x_94, 1, x_93); +return x_94; +} +} +} +else +{ +uint8_t x_95; +lean_dec(x_18); +lean_dec(x_17); +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_75); +if (x_95 == 0) +{ +return x_75; +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_96 = lean_ctor_get(x_75, 0); +x_97 = lean_ctor_get(x_75, 1); +lean_inc(x_97); +lean_inc(x_96); +lean_dec(x_75); +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; +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_2); +lean_inc(x_1); +x_99 = l_Lean_mkAppN(x_1, x_4); +x_100 = l_Lean_mkAppN(x_1, x_6); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +x_101 = l_Lean_Meta_mkEq(x_99, x_100, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_101) == 0) +{ +lean_object* x_102; lean_object* x_103; uint8_t x_104; uint8_t x_105; lean_object* x_106; +x_102 = lean_ctor_get(x_101, 0); +lean_inc(x_102); +x_103 = lean_ctor_get(x_101, 1); +lean_inc(x_103); +lean_dec(x_101); +x_104 = 0; +x_105 = 1; +lean_inc(x_9); +x_106 = l_Lean_Meta_mkForallFVars(x_8, x_102, x_104, x_105, x_9, x_10, x_11, x_12, x_103); +if (lean_obj_tag(x_106) == 0) +{ +lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; +x_107 = lean_ctor_get(x_106, 0); +lean_inc(x_107); +x_108 = lean_ctor_get(x_106, 1); +lean_inc(x_108); +lean_dec(x_106); +x_109 = lean_unsigned_to_nat(0u); +lean_inc(x_107); +lean_inc(x_3); +x_110 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go(x_3, x_109, x_107, x_9, x_10, x_11, x_12, x_108); +if (lean_obj_tag(x_110) == 0) +{ +uint8_t x_111; +x_111 = !lean_is_exclusive(x_110); +if (x_111 == 0) +{ +lean_object* x_112; lean_object* x_113; +x_112 = lean_ctor_get(x_110, 0); +x_113 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_113, 0, x_107); +lean_ctor_set(x_113, 1, x_112); +lean_ctor_set(x_113, 2, x_3); +lean_ctor_set(x_110, 0, x_113); +return x_110; +} +else +{ +lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; +x_114 = lean_ctor_get(x_110, 0); +x_115 = lean_ctor_get(x_110, 1); +lean_inc(x_115); +lean_inc(x_114); +lean_dec(x_110); +x_116 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_116, 0, x_107); +lean_ctor_set(x_116, 1, x_114); +lean_ctor_set(x_116, 2, x_3); +x_117 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_117, 0, x_116); +lean_ctor_set(x_117, 1, x_115); +return x_117; +} +} +else +{ +uint8_t x_118; +lean_dec(x_107); +lean_dec(x_3); +x_118 = !lean_is_exclusive(x_110); +if (x_118 == 0) +{ +return x_110; +} +else +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; +x_119 = lean_ctor_get(x_110, 0); +x_120 = lean_ctor_get(x_110, 1); +lean_inc(x_120); +lean_inc(x_119); +lean_dec(x_110); +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_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_3); +x_122 = !lean_is_exclusive(x_106); +if (x_122 == 0) +{ +return x_106; +} +else +{ +lean_object* x_123; lean_object* x_124; lean_object* x_125; +x_123 = lean_ctor_get(x_106, 0); +x_124 = lean_ctor_get(x_106, 1); +lean_inc(x_124); +lean_inc(x_123); +lean_dec(x_106); +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; +} +} +} +else +{ +uint8_t x_126; +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_126 = !lean_is_exclusive(x_101); +if (x_126 == 0) +{ +return x_101; +} +else +{ +lean_object* x_127; lean_object* x_128; lean_object* x_129; +x_127 = lean_ctor_get(x_101, 0); +x_128 = lean_ctor_get(x_101, 1); +lean_inc(x_128); +lean_inc(x_127); +lean_dec(x_101); +x_129 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_129, 0, x_127); +lean_ctor_set(x_129, 1, x_128); +return x_129; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f___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: +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_unsigned_to_nat(0u); +x_12 = l_Lean_Meta_mkHCongrWithArity_withNewEqs___rarg___closed__1; +x_13 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go(x_1, x_2, x_3, x_4, x_11, x_12, x_12, x_12, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_13) == 0) +{ +uint8_t x_14; +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_ctor_get(x_13, 0); +x_16 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_13, 0, x_16); +return x_13; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_ctor_get(x_13, 0); +x_18 = lean_ctor_get(x_13, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_13); +x_19 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_19, 0, x_17); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_18); +return x_20; +} +} +else +{ +uint8_t x_21; +x_21 = !lean_is_exclusive(x_13); +if (x_21 == 0) +{ +return x_13; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_13, 0); +x_23 = lean_ctor_get(x_13, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_13); +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; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f___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) { +_start: +{ +lean_object* x_12; uint8_t x_13; +lean_dec(x_6); +x_12 = lean_array_get_size(x_5); +x_13 = lean_nat_dec_eq(x_12, x_4); +lean_dec(x_4); +lean_dec(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +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_14 = lean_box(0); +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_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f___lambda__1(x_1, x_2, x_3, x_5, x_16, x_7, x_8, x_9, x_10, x_11); +return x_17; +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_1); +x_9 = lean_infer_type(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; lean_object* x_14; lean_object* x_15; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_array_get_size(x_3); +lean_inc(x_12); +x_13 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_13, 0, x_12); +x_14 = lean_alloc_closure((void*)(l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f___lambda__2), 11, 4); +lean_closure_set(x_14, 0, x_1); +lean_closure_set(x_14, 1, x_2); +lean_closure_set(x_14, 2, x_3); +lean_closure_set(x_14, 3, x_12); +x_15 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(x_10, x_13, x_14, x_4, x_5, x_6, x_7, x_11); +if (lean_obj_tag(x_15) == 0) +{ +uint8_t x_16; +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) +{ +return x_15; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_15, 0); +x_18 = lean_ctor_get(x_15, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_15); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +return x_19; +} +} +else +{ +uint8_t x_20; +x_20 = !lean_is_exclusive(x_15); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_15, 0); +lean_dec(x_21); +x_22 = lean_box(0); +lean_ctor_set_tag(x_15, 0); +lean_ctor_set(x_15, 0, x_22); +return x_15; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_15, 1); +lean_inc(x_23); +lean_dec(x_15); +x_24 = lean_box(0); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_23); +return x_25; +} +} +} +else +{ +uint8_t x_26; +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_26 = !lean_is_exclusive(x_9); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_9, 0); +lean_dec(x_27); +x_28 = lean_box(0); +lean_ctor_set_tag(x_9, 0); +lean_ctor_set(x_9, 0, x_28); +return x_9; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_9, 1); +lean_inc(x_29); +lean_dec(x_9); +x_30 = lean_box(0); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +return x_31; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f___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; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__1() { +_start: +{ +uint8_t x_1; lean_object* x_2; lean_object* x_3; +x_1 = 1; +x_2 = lean_box(x_1); +x_3 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_3, 0, x_2); +return x_3; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__1; +x_2 = lean_box(0); +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_t x_5, lean_object* x_6) { +_start: +{ +uint8_t x_7; +x_7 = lean_usize_dec_lt(x_5, x_4); +if (x_7 == 0) +{ +lean_inc(x_6); +return x_6; +} +else +{ +lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; lean_object* x_13; +x_8 = lean_array_uget(x_3, x_5); +x_9 = l_Lean_Meta_instInhabitedCongrArgKind; +x_10 = lean_box(x_9); +x_11 = lean_array_get(x_10, x_1, x_8); +lean_dec(x_8); +x_12 = lean_unbox(x_11); +lean_dec(x_11); +x_13 = lean_box(x_12); +if (lean_obj_tag(x_13) == 2) +{ +lean_object* x_14; +x_14 = l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__2; +return x_14; +} +else +{ +size_t x_15; size_t x_16; +lean_dec(x_13); +x_15 = 1; +x_16 = lean_usize_add(x_5, x_15); +{ +size_t _tmp_4 = x_16; +lean_object* _tmp_5 = x_2; +x_5 = _tmp_4; +x_6 = _tmp_5; +} +goto _start; +} +} +} +} +LEAN_EXPORT uint8_t l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___lambda__1(lean_object* x_1) { +_start: +{ +uint8_t x_2; +x_2 = 0; +return x_2; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___lambda__1___boxed), 1, 0); +return x_1; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__1; +x_2 = lean_box(0); +x_3 = lean_apply_1(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__3() { +_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_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_4 = lean_ctor_get(x_1, 0); +x_5 = l_Lean_Meta_instInhabitedParamInfo; +x_6 = lean_array_get(x_5, x_4, x_3); +x_7 = lean_ctor_get_uint8(x_6, sizeof(void*)*1 + 3); +if (x_7 == 0) +{ +lean_object* x_8; +lean_dec(x_6); +x_8 = l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__2; +return x_8; +} +else +{ +lean_object* x_9; 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_9 = lean_ctor_get(x_6, 0); +lean_inc(x_9); +lean_dec(x_6); +x_10 = lean_array_get_size(x_9); +x_11 = lean_usize_of_nat(x_10); +lean_dec(x_10); +x_12 = 0; +x_13 = l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__3; +x_14 = l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1(x_2, x_13, x_9, x_11, x_12, x_13); +lean_dec(x_9); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +lean_dec(x_14); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; +x_16 = l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__2; +return x_16; +} +else +{ +lean_object* x_17; +x_17 = lean_ctor_get(x_15, 0); +lean_inc(x_17); +lean_dec(x_15); +return x_17; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +size_t x_7; size_t x_8; lean_object* x_9; +x_7 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_8 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_9 = l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1(x_1, x_2, x_3, x_7, x_8, x_6); +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_9; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___lambda__1___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___lambda__1(x_1); +lean_dec(x_1); +x_3 = lean_box(x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_getKinds___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; +x_8 = lean_nat_dec_le(x_5, x_4); +if (x_8 == 0) +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_unsigned_to_nat(0u); +x_10 = lean_nat_dec_eq(x_3, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_sub(x_3, x_11); +lean_dec(x_3); +x_13 = lean_ctor_get(x_1, 1); +x_14 = l_Array_contains___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps_visit___spec__2(x_13, x_4); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_15 = l_Lean_Meta_instInhabitedParamInfo; +x_16 = lean_array_get(x_15, x_2, x_4); +x_17 = lean_ctor_get_uint8(x_16, sizeof(void*)*1 + 2); +if (x_17 == 0) +{ +uint8_t x_18; +x_18 = l_Lean_Meta_ParamInfo_isInstImplicit(x_16); +lean_dec(x_16); +if (x_18 == 0) +{ +uint8_t x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_19 = 2; +x_20 = lean_box(x_19); +x_21 = lean_array_push(x_7, x_20); +x_22 = lean_nat_add(x_4, x_6); +lean_dec(x_4); +x_3 = x_12; +x_4 = x_22; +x_7 = x_21; +goto _start; +} +else +{ +lean_object* x_24; uint8_t x_25; +x_24 = l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst(x_1, x_7, x_4); +x_25 = lean_unbox(x_24); +lean_dec(x_24); +if (x_25 == 0) +{ +uint8_t x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_26 = 0; +x_27 = lean_box(x_26); +x_28 = lean_array_push(x_7, x_27); +x_29 = lean_nat_add(x_4, x_6); +lean_dec(x_4); +x_3 = x_12; +x_4 = x_29; +x_7 = x_28; +goto _start; +} +else +{ +uint8_t x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_31 = 5; +x_32 = lean_box(x_31); +x_33 = lean_array_push(x_7, x_32); +x_34 = lean_nat_add(x_4, x_6); +lean_dec(x_4); +x_3 = x_12; +x_4 = x_34; +x_7 = x_33; +goto _start; +} +} +} +else +{ +uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +lean_dec(x_16); +x_36 = 3; +x_37 = lean_box(x_36); +x_38 = lean_array_push(x_7, x_37); +x_39 = lean_nat_add(x_4, x_6); +lean_dec(x_4); +x_3 = x_12; +x_4 = x_39; +x_7 = x_38; +goto _start; +} +} +else +{ +uint8_t x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_41 = 0; +x_42 = lean_box(x_41); +x_43 = lean_array_push(x_7, x_42); +x_44 = lean_nat_add(x_4, x_6); +lean_dec(x_4); +x_3 = x_12; +x_4 = x_44; +x_7 = x_43; +goto _start; +} +} +else +{ +lean_dec(x_4); +lean_dec(x_3); +return x_7; +} +} +else +{ +lean_dec(x_4); +lean_dec(x_3); +return x_7; +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f_getKinds(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = lean_array_get_size(x_2); +x_4 = lean_unsigned_to_nat(0u); +x_5 = lean_unsigned_to_nat(1u); +x_6 = l_Lean_Meta_mkHCongrWithArity_withNewEqs___rarg___closed__1; +lean_inc(x_3); +x_7 = l_Std_Range_forIn_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_getKinds___spec__1(x_1, x_2, x_3, x_4, x_3, x_5, x_6); +lean_dec(x_3); +lean_dec(x_2); +x_8 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_fixKindsForDependencies(x_1, x_7); +return x_8; +} +} +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_getKinds___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Std_Range_forIn_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_getKinds___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +return x_8; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_mkCongrSimpWithArity_x3f___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; size_t x_8; size_t x_9; lean_object* 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 = 1; +x_9 = lean_usize_add(x_2, x_8); +if (lean_obj_tag(x_5) == 3) +{ +uint8_t x_18; lean_object* x_19; lean_object* x_20; +x_18 = 0; +x_19 = lean_box(x_18); +x_20 = lean_array_uset(x_7, x_2, x_19); +x_2 = x_9; +x_3 = x_20; +goto _start; +} +else +{ +lean_object* x_22; +x_22 = lean_box(0); +x_10 = x_22; +goto block_17; +} +block_17: +{ +lean_dec(x_10); +if (lean_obj_tag(x_5) == 5) +{ +uint8_t x_11; lean_object* x_12; lean_object* x_13; +x_11 = 0; +x_12 = lean_box(x_11); +x_13 = lean_array_uset(x_7, x_2, x_12); +x_2 = x_9; +x_3 = x_13; +goto _start; +} +else +{ +lean_object* x_15; +x_15 = lean_array_uset(x_7, x_2, x_5); +x_2 = x_9; +x_3 = x_15; +goto _start; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f(lean_object* x_1, 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_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_1); +x_8 = l_Lean_Meta_getFunInfo(x_1, x_3, x_4, x_5, x_6, x_7); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +lean_inc(x_9); +x_11 = l_Lean_Meta_mkCongrSimpWithArity_x3f_getKinds(x_9); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_11); +lean_inc(x_9); +lean_inc(x_1); +x_12 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f(x_1, x_9, x_11, x_3, x_4, x_5, x_6, x_10); +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +if (lean_obj_tag(x_13) == 0) +{ +uint8_t x_14; +x_14 = !lean_is_exclusive(x_12); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_15 = lean_ctor_get(x_12, 1); +x_16 = lean_ctor_get(x_12, 0); +lean_dec(x_16); +x_17 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike(x_11); +if (x_17 == 0) +{ +lean_object* x_18; +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_18 = lean_box(0); +lean_ctor_set(x_12, 0, x_18); +return x_12; +} +else +{ +lean_object* x_19; size_t x_20; size_t x_21; lean_object* x_22; lean_object* x_23; +lean_free_object(x_12); +x_19 = lean_array_get_size(x_11); +x_20 = lean_usize_of_nat(x_19); +lean_dec(x_19); +x_21 = 0; +x_22 = l_Array_mapMUnsafe_map___at_Lean_Meta_mkCongrSimpWithArity_x3f___spec__1(x_20, x_21, x_11); +x_23 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f(x_1, x_9, x_22, x_3, x_4, x_5, x_6, x_15); +return x_23; +} +} +else +{ +lean_object* x_24; uint8_t x_25; +x_24 = lean_ctor_get(x_12, 1); +lean_inc(x_24); +lean_dec(x_12); +x_25 = l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_hasCastLike(x_11); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_26 = lean_box(0); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_24); +return x_27; +} +else +{ +lean_object* x_28; size_t x_29; size_t x_30; lean_object* x_31; lean_object* x_32; +x_28 = lean_array_get_size(x_11); +x_29 = lean_usize_of_nat(x_28); +lean_dec(x_28); +x_30 = 0; +x_31 = l_Array_mapMUnsafe_map___at_Lean_Meta_mkCongrSimpWithArity_x3f___spec__1(x_29, x_30, x_11); +x_32 = l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f(x_1, x_9, x_31, x_3, x_4, x_5, x_6, x_24); +return x_32; +} +} +} +else +{ +uint8_t x_33; +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_33 = !lean_is_exclusive(x_12); +if (x_33 == 0) +{ +lean_object* x_34; uint8_t x_35; +x_34 = lean_ctor_get(x_12, 0); +lean_dec(x_34); +x_35 = !lean_is_exclusive(x_13); +if (x_35 == 0) +{ +return x_12; +} +else +{ +lean_object* x_36; lean_object* x_37; +x_36 = lean_ctor_get(x_13, 0); +lean_inc(x_36); +lean_dec(x_13); +x_37 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_12, 0, x_37); +return x_12; +} +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_38 = lean_ctor_get(x_12, 1); +lean_inc(x_38); +lean_dec(x_12); +x_39 = lean_ctor_get(x_13, 0); +lean_inc(x_39); +if (lean_is_exclusive(x_13)) { + lean_ctor_release(x_13, 0); + x_40 = x_13; +} else { + lean_dec_ref(x_13); + x_40 = lean_box(0); +} +if (lean_is_scalar(x_40)) { + x_41 = lean_alloc_ctor(1, 1, 0); +} else { + x_41 = x_40; +} +lean_ctor_set(x_41, 0, x_39); +x_42 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_38); +return x_42; +} +} +} +else +{ +uint8_t x_43; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_43 = !lean_is_exclusive(x_8); +if (x_43 == 0) +{ +return x_8; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_8, 0); +x_45 = lean_ctor_get(x_8, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_8); +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; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_mkCongrSimpWithArity_x3f___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_Meta_mkCongrSimpWithArity_x3f___spec__1(x_4, x_5, x_3); +return x_6; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimpWithArity_x3f___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_Meta_mkCongrSimpWithArity_x3f(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_2); +return x_8; +} +} +LEAN_EXPORT lean_object* l_Lean_Meta_mkCongrSimp_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_7 = l_Lean_Meta_getFunInfo(x_1, x_2, x_3, x_4, x_5, x_6); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_7, 1); +lean_inc(x_9); +lean_dec(x_7); +x_10 = l_Lean_Meta_FunInfo_getArity(x_8); +lean_dec(x_8); +x_11 = l_Lean_Meta_mkCongrSimpWithArity_x3f(x_1, x_10, x_2, x_3, x_4, x_5, x_9); +lean_dec(x_10); +return x_11; +} +else +{ +uint8_t x_12; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_12 = !lean_is_exclusive(x_7); +if (x_12 == 0) +{ +return x_7; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_7, 0); +x_14 = lean_ctor_get(x_7, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_7); +x_15 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_15, 0, x_13); +lean_ctor_set(x_15, 1, x_14); +return x_15; +} +} +} +} lean_object* initialize_Init(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Meta_AppBuilder(uint8_t builtin, lean_object*); static bool _G_initialized = false; @@ -2167,6 +5809,7 @@ if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Meta_CongrArgKind_noConfusion___rarg___closed__1 = _init_l_Lean_Meta_CongrArgKind_noConfusion___rarg___closed__1(); lean_mark_persistent(l_Lean_Meta_CongrArgKind_noConfusion___rarg___closed__1); +l_Lean_Meta_instInhabitedCongrArgKind = _init_l_Lean_Meta_instInhabitedCongrArgKind(); l_Array_forInUnsafe_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_addPrimeToFVarUserNames___spec__1___closed__1 = _init_l_Array_forInUnsafe_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_addPrimeToFVarUserNames___spec__1___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at___private_Lean_Meta_CongrTheorems_0__Lean_Meta_addPrimeToFVarUserNames___spec__1___closed__1); l_Lean_Meta_mkHCongrWithArity_withNewEqs_loop___rarg___closed__1 = _init_l_Lean_Meta_mkHCongrWithArity_withNewEqs_loop___rarg___closed__1(); @@ -2193,6 +5836,50 @@ l_Lean_Meta_mkHCongrWithArity___lambda__3___closed__1 = _init_l_Lean_Meta_mkHCon lean_mark_persistent(l_Lean_Meta_mkHCongrWithArity___lambda__3___closed__1); l_Lean_Meta_mkHCongrWithArity___lambda__3___closed__2 = _init_l_Lean_Meta_mkHCongrWithArity___lambda__3___closed__2(); lean_mark_persistent(l_Lean_Meta_mkHCongrWithArity___lambda__3___closed__2); +l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1 = _init_l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1(); +lean_mark_persistent(l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__1); +l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__2 = _init_l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__2(); +lean_mark_persistent(l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__2); +l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__3 = _init_l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__3(); +lean_mark_persistent(l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__3); +l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__4 = _init_l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__4(); +lean_mark_persistent(l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__4); +l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__5 = _init_l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__5(); +lean_mark_persistent(l___private_Lean_Meta_CongrTheorems_0__Lean_Meta_mkCast_go___closed__5); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__1 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__1(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__1); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__2 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__2(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__2); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__3 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__3(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__3); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__4 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__4(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__3___closed__4); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__1 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__1(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__1); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__2 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__2(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__2); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__3 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__3(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___lambda__4___closed__3); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___closed__1 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___closed__1(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mkProof_go___closed__1); +l_panic___at_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___spec__1___closed__1 = _init_l_panic___at_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___spec__1___closed__1(); +lean_mark_persistent(l_panic___at_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___spec__1___closed__1); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__1 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__1(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__1); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__2 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__2(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__2); +l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__3 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__3(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_mk_x3f_go___closed__3); +l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__1(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__2(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___spec__1___closed__2); +l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__1 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__1(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__1); +l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__2 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__2(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__2); +l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__3 = _init_l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__3(); +lean_mark_persistent(l_Lean_Meta_mkCongrSimpWithArity_x3f_shouldUseSubsingletonInst___closed__3); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Meta/FunInfo.c b/stage0/stdlib/Lean/Meta/FunInfo.c index d9f567a10d..8d302a780a 100644 --- a/stage0/stdlib/Lean/Meta/FunInfo.c +++ b/stage0/stdlib/Lean/Meta/FunInfo.c @@ -21,13 +21,16 @@ lean_object* lean_mk_empty_array_with_capacity(lean_object*); LEAN_EXPORT lean_object* l_Array_qsort_sort___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Array_contains___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps_visit___spec__2(lean_object*, lean_object*); lean_object* lean_nat_div(lean_object*, lean_object*); +lean_object* lean_name_mk_string(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, 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_Meta_forallTelescopeReducing___at_Lean_Meta_getParamNames___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_sub(size_t, size_t); lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Nat_decLt___boxed(lean_object*, lean_object*); extern lean_object* l_instInhabitedNat; +uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___closed__1; LEAN_EXPORT lean_object* l_Array_contains___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps_visit___spec__2___boxed(lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); @@ -36,7 +39,6 @@ lean_object* l_Std_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_getFunInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_qpartition_loop___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_shift_right(size_t, size_t); -LEAN_EXPORT lean_object* l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); static size_t l_Std_PersistentHashMap_findAux___at___private_Lean_Meta_FunInfo_0__Lean_Meta_checkFunInfoCache___spec__2___closed__1; @@ -66,8 +68,12 @@ uint64_t lean_uint64_of_nat(lean_object*); extern lean_object* l_Lean_instInhabitedExpr; size_t lean_usize_mul(size_t, size_t); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps_visit___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321_(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___boxed(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_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__1; +static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__2; +uint8_t l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341_(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___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_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___closed__1; size_t lean_usize_of_nat(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_FunInfo_0__Lean_Meta_whenHasVar___rarg(lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps___closed__1; @@ -78,6 +84,7 @@ static lean_object* l_Array_qsort_sort___at___private_Lean_Meta_FunInfo_0__Lean_ LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps_visit___spec__3(lean_object*, lean_object*, size_t, size_t); LEAN_EXPORT lean_object* l___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps(lean_object*, lean_object*); static lean_object* l_Std_PersistentHashMap_insert___at___private_Lean_Meta_FunInfo_0__Lean_Meta_checkFunInfoCache___spec__4___closed__1; +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t lean_usize_dec_le(size_t, size_t); @@ -100,6 +107,7 @@ LEAN_EXPORT lean_object* l_Std_PersistentHashMap_findAux___at___private_Lean_Met LEAN_EXPORT lean_object* l_Array_mapIdxM_map___at___private_Lean_Meta_FunInfo_0__Lean_Meta_updateHasFwdDeps___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___at___private_Lean_Meta_FunInfo_0__Lean_Meta_checkFunInfoCache___spec__7(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_usize_to_nat(size_t); +lean_object* l_Lean_Meta_isProp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_hasFVar(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps_visit___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_forallBoundedTelescope___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -128,7 +136,7 @@ else { lean_object* x_9; uint8_t x_10; x_9 = lean_array_fget(x_1, x_4); -x_10 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321_(x_5, x_9); +x_10 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341_(x_5, x_9); lean_dec(x_9); if (x_10 == 0) { @@ -198,7 +206,7 @@ lean_inc(x_11); x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); -x_13 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321_(x_3, x_11); +x_13 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341_(x_3, x_11); lean_dec(x_11); if (x_13 == 0) { @@ -409,7 +417,7 @@ else { lean_object* x_17; uint8_t x_18; x_17 = lean_array_fget(x_5, x_2); -x_18 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321_(x_3, x_17); +x_18 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341_(x_3, x_17); lean_dec(x_17); if (x_18 == 0) { @@ -506,7 +514,7 @@ if (x_18 == 0) lean_object* x_19; lean_object* x_20; uint8_t x_21; x_19 = lean_ctor_get(x_15, 0); x_20 = lean_ctor_get(x_15, 1); -x_21 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321_(x_4, x_19); +x_21 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341_(x_4, x_19); if (x_21 == 0) { lean_object* x_22; lean_object* x_23; lean_object* x_24; @@ -540,7 +548,7 @@ x_27 = lean_ctor_get(x_15, 1); lean_inc(x_27); lean_inc(x_26); lean_dec(x_15); -x_28 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321_(x_4, x_26); +x_28 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341_(x_4, x_26); if (x_28 == 0) { lean_object* x_29; lean_object* x_30; lean_object* x_31; @@ -661,7 +669,7 @@ if (lean_is_exclusive(x_57)) { lean_dec_ref(x_57); x_62 = lean_box(0); } -x_63 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321_(x_4, x_60); +x_63 = l___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341_(x_4, x_60); if (x_63 == 0) { lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; @@ -1972,7 +1980,7 @@ x_8 = lean_unsigned_to_nat(0u); x_9 = lean_nat_dec_eq(x_4, x_8); if (x_9 == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; +lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; uint8_t x_14; lean_object* x_15; uint8_t x_16; uint8_t x_17; lean_object* x_18; x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_sub(x_4, x_10); lean_dec(x_4); @@ -1981,72 +1989,76 @@ x_13 = lean_ctor_get_uint8(x_12, sizeof(void*)*1); x_14 = lean_ctor_get_uint8(x_12, sizeof(void*)*1 + 1); x_15 = lean_ctor_get(x_12, 0); lean_inc(x_15); -x_16 = lean_nat_add(x_5, x_10); +x_16 = lean_ctor_get_uint8(x_12, sizeof(void*)*1 + 2); +x_17 = lean_ctor_get_uint8(x_12, sizeof(void*)*1 + 3); +x_18 = lean_nat_add(x_5, x_10); if (x_14 == 0) { -uint8_t x_17; -x_17 = l_Array_contains___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps_visit___spec__2(x_2, x_5); +uint8_t x_19; +x_19 = l_Array_contains___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps_visit___spec__2(x_2, x_5); lean_dec(x_5); -if (x_17 == 0) +if (x_19 == 0) { -lean_object* x_18; +lean_object* x_20; lean_dec(x_15); -x_18 = lean_array_push(x_7, x_12); +x_20 = lean_array_push(x_7, x_12); x_4 = x_11; -x_5 = x_16; +x_5 = x_18; x_6 = lean_box(0); -x_7 = x_18; +x_7 = x_20; goto _start; } else { -uint8_t x_20; -x_20 = !lean_is_exclusive(x_12); -if (x_20 == 0) +uint8_t x_22; +x_22 = !lean_is_exclusive(x_12); +if (x_22 == 0) { -lean_object* x_21; uint8_t x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_12, 0); -lean_dec(x_21); -x_22 = 1; -lean_ctor_set_uint8(x_12, sizeof(void*)*1 + 1, x_22); -x_23 = lean_array_push(x_7, x_12); +lean_object* x_23; uint8_t x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_12, 0); +lean_dec(x_23); +x_24 = 1; +lean_ctor_set_uint8(x_12, sizeof(void*)*1 + 1, x_24); +x_25 = lean_array_push(x_7, x_12); x_4 = x_11; -x_5 = x_16; +x_5 = x_18; x_6 = lean_box(0); -x_7 = x_23; +x_7 = x_25; goto _start; } else { -uint8_t x_25; lean_object* x_26; lean_object* x_27; +uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_dec(x_12); -x_25 = 1; -x_26 = lean_alloc_ctor(0, 1, 2); -lean_ctor_set(x_26, 0, x_15); -lean_ctor_set_uint8(x_26, sizeof(void*)*1, x_13); -lean_ctor_set_uint8(x_26, sizeof(void*)*1 + 1, x_25); -x_27 = lean_array_push(x_7, x_26); +x_27 = 1; +x_28 = lean_alloc_ctor(0, 1, 4); +lean_ctor_set(x_28, 0, x_15); +lean_ctor_set_uint8(x_28, sizeof(void*)*1, x_13); +lean_ctor_set_uint8(x_28, sizeof(void*)*1 + 1, x_27); +lean_ctor_set_uint8(x_28, sizeof(void*)*1 + 2, x_16); +lean_ctor_set_uint8(x_28, sizeof(void*)*1 + 3, x_17); +x_29 = lean_array_push(x_7, x_28); x_4 = x_11; -x_5 = x_16; -x_6 = lean_box(0); -x_7 = x_27; -goto _start; -} -} -} -else -{ -lean_object* x_29; -lean_dec(x_15); -lean_dec(x_5); -x_29 = lean_array_push(x_7, x_12); -x_4 = x_11; -x_5 = x_16; +x_5 = x_18; x_6 = lean_box(0); x_7 = x_29; goto _start; } } +} +else +{ +lean_object* x_31; +lean_dec(x_15); +lean_dec(x_5); +x_31 = lean_array_push(x_7, x_12); +x_4 = x_11; +x_5 = x_18; +x_6 = lean_box(0); +x_7 = x_31; +goto _start; +} +} else { lean_dec(x_5); @@ -2099,6 +2111,45 @@ lean_dec(x_1); return x_3; } } +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Decidable"); +return x_1; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__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_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___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) { +_start: +{ +lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; +x_8 = l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__2; +x_9 = l_Lean_Expr_isAppOf(x_2, x_8); +x_10 = lean_box(x_9); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_7); +return x_11; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___boxed), 7, 0); +return x_1; +} +} LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___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) { _start: { @@ -2121,85 +2172,197 @@ lean_inc(x_7); x_19 = l_Lean_Meta_getFVarLocalDecl(x_18, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_19) == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; uint8_t x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +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_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_LocalDecl_type(x_20); +lean_inc(x_22); lean_inc(x_1); x_23 = l___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps(x_1, x_22); x_24 = l___private_Lean_Meta_FunInfo_0__Lean_Meta_updateHasFwdDeps(x_6, x_23); lean_dec(x_6); -x_25 = l_Lean_LocalDecl_binderInfo(x_20); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_22); +x_25 = l_Lean_Meta_isProp(x_22, x_7, x_8, x_9, x_10, x_21); +if (lean_obj_tag(x_25) == 0) +{ +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_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___closed__1; +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_29 = l_Lean_Meta_forallTelescopeReducing___at_Lean_Meta_getParamNames___spec__2___rarg(x_22, x_28, x_7, x_8, x_9, x_10, x_27); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; uint8_t x_32; uint8_t x_33; lean_object* x_34; uint8_t x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; +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_Lean_LocalDecl_binderInfo(x_20); lean_dec(x_20); -x_26 = 0; -x_27 = lean_alloc_ctor(0, 1, 2); -lean_ctor_set(x_27, 0, x_23); -lean_ctor_set_uint8(x_27, sizeof(void*)*1, x_25); -lean_ctor_set_uint8(x_27, sizeof(void*)*1 + 1, x_26); -x_28 = lean_array_push(x_24, x_27); -x_29 = lean_nat_add(x_3, x_5); +x_33 = 0; +x_34 = lean_alloc_ctor(0, 1, 4); +lean_ctor_set(x_34, 0, x_23); +lean_ctor_set_uint8(x_34, sizeof(void*)*1, x_32); +lean_ctor_set_uint8(x_34, sizeof(void*)*1 + 1, x_33); +x_35 = lean_unbox(x_26); +lean_dec(x_26); +lean_ctor_set_uint8(x_34, sizeof(void*)*1 + 2, x_35); +x_36 = lean_unbox(x_30); +lean_dec(x_30); +lean_ctor_set_uint8(x_34, sizeof(void*)*1 + 3, x_36); +x_37 = lean_array_push(x_24, x_34); +x_38 = lean_nat_add(x_3, x_5); lean_dec(x_3); x_2 = x_16; -x_3 = x_29; -x_6 = x_28; -x_11 = x_21; +x_3 = x_38; +x_6 = x_37; +x_11 = x_31; goto _start; } else { -uint8_t x_31; +uint8_t x_40; +lean_dec(x_26); +lean_dec(x_24); +lean_dec(x_23); +lean_dec(x_20); lean_dec(x_16); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_3); +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_24); +lean_dec(x_23); +lean_dec(x_22); +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_3); +lean_dec(x_1); +x_44 = !lean_is_exclusive(x_25); +if (x_44 == 0) +{ +return x_25; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_25, 0); +x_46 = lean_ctor_get(x_25, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_25); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +return x_47; +} +} +} +else +{ +uint8_t x_48; +lean_dec(x_16); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); -x_31 = !lean_is_exclusive(x_19); -if (x_31 == 0) +x_48 = !lean_is_exclusive(x_19); +if (x_48 == 0) { return x_19; } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_19, 0); -x_33 = lean_ctor_get(x_19, 1); -lean_inc(x_33); -lean_inc(x_32); +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_19, 0); +x_50 = lean_ctor_get(x_19, 1); +lean_inc(x_50); +lean_inc(x_49); lean_dec(x_19); -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; +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 { -lean_object* x_35; +lean_object* x_52; +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_35 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_35, 0, x_6); -lean_ctor_set(x_35, 1, x_11); -return x_35; +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_6); +lean_ctor_set(x_52, 1, x_11); +return x_52; } } else { -lean_object* x_36; +lean_object* x_53; +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_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_6); -lean_ctor_set(x_36, 1, x_11); -return x_36; +x_53 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_53, 0, x_6); +lean_ctor_set(x_53, 1, x_11); +return x_53; } } } @@ -2341,7 +2504,7 @@ static lean_object* _init_l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoA _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___lambda__1___boxed), 7, 0); +x_1 = lean_alloc_closure((void*)(l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___lambda__1), 7, 0); return x_1; } } @@ -3358,30 +3521,30 @@ return x_265; } } } +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___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) { +_start: +{ +lean_object* x_8; +x_8 = l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, 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; +} +} LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; x_12 = l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__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_9); -lean_dec(x_8); lean_dec(x_5); lean_dec(x_4); return x_12; } } -LEAN_EXPORT lean_object* l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___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) { -_start: -{ -lean_object* x_8; -x_8 = l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -return x_8; -} -} LEAN_EXPORT lean_object* l_Lean_Meta_getFunInfo(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: { @@ -3446,6 +3609,12 @@ l_Array_qsort_sort___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps___s lean_mark_persistent(l_Array_qsort_sort___at___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps___spec__1___closed__1); l___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps___closed__1 = _init_l___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps___closed__1(); lean_mark_persistent(l___private_Lean_Meta_FunInfo_0__Lean_Meta_collectDeps___closed__1); +l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__1 = _init_l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__1(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__1); +l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__2 = _init_l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__2(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___lambda__1___closed__2); +l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___closed__1 = _init_l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___closed__1(); +lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__1___closed__1); l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___closed__1 = _init_l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___closed__1(); lean_mark_persistent(l___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___closed__1); return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Meta/WHNF.c b/stage0/stdlib/Lean/Meta/WHNF.c index dd546ec163..7196c428bb 100644 --- a/stage0/stdlib/Lean/Meta/WHNF.c +++ b/stage0/stdlib/Lean/Meta/WHNF.c @@ -90,6 +90,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_getStuckMVar_x3f(lean_object*, lean_object* static lean_object* l_Lean_Meta_toCtorIfLit___closed__5; lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Lean_Meta_getConstNoEx_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__2; LEAN_EXPORT lean_object* l_Lean_Meta_withNatValue___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_whnfEasyCases___closed__5; LEAN_EXPORT lean_object* l___private_Lean_Meta_WHNF_0__Lean_Meta_cached_x3f(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -106,6 +107,7 @@ static lean_object* l_Lean_Meta_toCtorIfLit___closed__10; LEAN_EXPORT uint8_t l___private_Lean_Meta_WHNF_0__Lean_Meta_getRecRuleFor___lambda__1(lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*); static lean_object* l_Lean_Meta_reduceNative_x3f___closed__5; +static lean_object* l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__1; lean_object* lean_expr_instantiate1(lean_object*, lean_object*); lean_object* l_Array_toSubarray___rarg(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_reduceNat_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -116,7 +118,6 @@ static lean_object* l_Lean_Meta_whnfEasyCases___closed__3; LEAN_EXPORT lean_object* l_Lean_List_toExprAux___at_Lean_Meta_toCtorIfLit___spec__1(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_reduceBinNatOp___closed__13; LEAN_EXPORT lean_object* l___private_Lean_Meta_WHNF_0__Lean_Meta_reduceQuotRec(lean_object*); -LEAN_EXPORT lean_object* l_Lean_Meta_markSmartUnfoldigMatchAlt(lean_object*); lean_object* l_Lean_Meta_getConst_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_unfoldDefinition_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_whnfEasyCases___at_Lean_Meta_whnfUntil___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -185,7 +186,6 @@ lean_object* lean_nat_sub(lean_object*, lean_object*); static lean_object* l_Lean_Meta_toCtorIfLit___closed__15; LEAN_EXPORT lean_object* l___private_Lean_Meta_WHNF_0__Lean_Meta_getRecRuleFor___boxed(lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_WHNF_0__Lean_Meta_canUnfoldAtMatcher___closed__27; -static lean_object* l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__1; LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Meta_reduceBoolNativeUnsafe___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_WHNF_0__Lean_Meta_useWHNFCache(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_markSmartUnfoldingMatch___closed__2; @@ -246,7 +246,6 @@ static lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_WHNF___hyg_24____closed_ lean_object* l_Lean_Meta_getDelayedAssignment_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_WHNF_0__Lean_Meta_toCtorWhenStructure___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Meta_WHNF_0__Lean_Meta_canUnfoldAtMatcher___closed__30; -static lean_object* l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__2; static lean_object* l_Lean_Meta_whnfEasyCases___at_Lean_Meta_whnfCore___spec__3___lambda__3___closed__1; static lean_object* l_Lean_Meta_whnfEasyCases___at_Lean_Meta_whnfCore___spec__3___lambda__3___closed__2; static lean_object* l_Lean_Meta_reduceNat_x3f___closed__19; @@ -413,6 +412,7 @@ lean_object* l___private_Lean_Expr_0__Lean_mkAppRangeAux(lean_object*, lean_obje lean_object* lean_expr_abstract(lean_object*, lean_object*); static lean_object* l_Lean_List_toExprAux___at_Lean_Meta_toCtorIfLit___spec__1___closed__5; LEAN_EXPORT lean_object* l_Lean_Meta_reduceNat_x3f___lambda__1___boxed(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Meta_markSmartUnfoldingMatchAlt(lean_object*); static lean_object* l_Lean_Meta_reduceBinNatOp___closed__8; LEAN_EXPORT lean_object* l_Lean_Meta_reduceBinNatOp___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_whnfEasyCases___at_Lean_Meta_whnfImp___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -659,7 +659,7 @@ lean_dec(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__1() { +static lean_object* _init_l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__1() { _start: { lean_object* x_1; @@ -667,21 +667,21 @@ x_1 = lean_mk_string("sunfoldMatchAlt"); return x_1; } } -static lean_object* _init_l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__2() { +static lean_object* _init_l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__1; +x_2 = l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -LEAN_EXPORT lean_object* l_Lean_Meta_markSmartUnfoldigMatchAlt(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Meta_markSmartUnfoldingMatchAlt(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__2; +x_2 = l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__2; x_3 = l_Lean_mkAnnotation(x_2, x_1); return x_3; } @@ -690,7 +690,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_smartUnfoldingMatchAlt_x3f(lean_object* x_1 _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__2; +x_2 = l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__2; x_3 = l_Lean_annotation_x3f(x_2, x_1); return x_3; } @@ -30246,10 +30246,10 @@ lean_dec_ref(res); lean_mark_persistent(l_Lean_Meta_markSmartUnfoldingMatch___closed__1); l_Lean_Meta_markSmartUnfoldingMatch___closed__2 = _init_l_Lean_Meta_markSmartUnfoldingMatch___closed__2(); lean_mark_persistent(l_Lean_Meta_markSmartUnfoldingMatch___closed__2); -l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__1 = _init_l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__1(); -lean_mark_persistent(l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__1); -l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__2 = _init_l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__2(); -lean_mark_persistent(l_Lean_Meta_markSmartUnfoldigMatchAlt___closed__2); +l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__1 = _init_l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__1(); +lean_mark_persistent(l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__1); +l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__2 = _init_l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__2(); +lean_mark_persistent(l_Lean_Meta_markSmartUnfoldingMatchAlt___closed__2); l_Lean_Meta_isAuxDef___closed__1 = _init_l_Lean_Meta_isAuxDef___closed__1(); lean_mark_persistent(l_Lean_Meta_isAuxDef___closed__1); l___private_Lean_Meta_WHNF_0__Lean_Meta_mkNullaryCtor___closed__1 = _init_l___private_Lean_Meta_WHNF_0__Lean_Meta_mkNullaryCtor___closed__1(); diff --git a/stage0/stdlib/Lean/PrettyPrinter/Delaborator/TopDownAnalyze.c b/stage0/stdlib/Lean/PrettyPrinter/Delaborator/TopDownAnalyze.c index f058dcb720..b4bc675869 100644 --- a/stage0/stdlib/Lean/PrettyPrinter/Delaborator/TopDownAnalyze.c +++ b/stage0/stdlib/Lean/PrettyPrinter/Delaborator/TopDownAnalyze.c @@ -298,6 +298,7 @@ lean_object* lean_nat_sub(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_PrettyPrinter_Delaborator_TopDownAnalyze_analyze_analyzeApp___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_Lean_PrettyPrinter_Delaborator_TopDownAnalyze_analyzeAppStagedCore_analyzeArg___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_panic___at_Lean_PrettyPrinter_Delaborator_TopDownAnalyze_analyze_analyzeMData___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(lean_object*, lean_object*); static lean_object* l_Lean_PrettyPrinter_Delaborator_initFn____x40_Lean_PrettyPrinter_Delaborator_TopDownAnalyze___hyg_9461____closed__1; static lean_object* l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_TopDownAnalyze___hyg_205____closed__4; static lean_object* l_panic___at_Lean_PrettyPrinter_Delaborator_TopDownAnalyze_analyze_analyzeConst___spec__1___closed__1; @@ -598,7 +599,6 @@ static lean_object* l_Lean_PrettyPrinter_Delaborator_TopDownAnalyze_isHBinOp___l static lean_object* l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_TopDownAnalyze___hyg_289____closed__3; static lean_object* l_Lean_PrettyPrinter_Delaborator_TopDownAnalyze_isTrivialBottomUp___closed__7; static lean_object* l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_TopDownAnalyze___hyg_261____closed__4; -uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_PrettyPrinter_Delaborator_TopDownAnalyze_canBottomUp___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_getPPProofs(lean_object*); LEAN_EXPORT lean_object* l_Lean_PrettyPrinter_Delaborator_TopDownAnalyze_analyzeAppStagedCore_analyzeArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -3546,7 +3546,7 @@ lean_inc(x_4); lean_dec(x_1); x_5 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_5, 0, x_4); -x_6 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_321____spec__1(x_3, x_5); +x_6 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_800____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(x_3, x_5); lean_dec(x_5); lean_dec(x_3); return x_6; diff --git a/stage0/stdlib/Lean/Server/FileWorker.c b/stage0/stdlib/Lean/Server/FileWorker.c index 69ba032ce1..86dfa9df49 100644 --- a/stage0/stdlib/Lean/Server/FileWorker.c +++ b/stage0/stdlib/Lean/Server/FileWorker.c @@ -34,7 +34,6 @@ static lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_ini static lean_object* l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__4; LEAN_EXPORT lean_object* l_Std_RBNode_foldM___at_Lean_Server_FileWorker_mainLoop___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(lean_object*, lean_object*); -extern lean_object* l_String_instInhabitedString; LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_AsyncElabState_lastSnap___boxed(lean_object*); lean_object* lean_mk_empty_array_with_capacity(lean_object*); @@ -60,7 +59,6 @@ lean_object* lean_array_uget(lean_object*, size_t); lean_object* lean_io_error_to_string(lean_object*); lean_object* l_Array_append___rarg(lean_object*, lean_object*); static lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2___closed__36; -lean_object* l_String_split___at_Lean_stringToMessageData___spec__1(lean_object*); static lean_object* l_Lean_Server_FileWorker_compileHeader___lambda__1___closed__8; LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updateDocument___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonRpcConnectParams____x40_Lean_Data_Lsp_Extra___hyg_1078_(lean_object*); @@ -117,7 +115,6 @@ static lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_ini lean_object* l_Array_toPersistentArray___rarg(lean_object*); static lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2___closed__27; lean_object* lean_io_process_spawn(lean_object*, lean_object*); -static lean_object* l_Lean_Server_FileWorker_compileHeader___closed__7; uint8_t lean_usize_dec_lt(size_t, size_t); static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__4; LEAN_EXPORT lean_object* l_Std_RBNode_insert___at_Lean_Server_FileWorker_handleRpcConnect___spec__1(lean_object*, uint64_t, lean_object*); @@ -235,7 +232,6 @@ lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializePar lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__3(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams(lean_object*); LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRequest(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Server_FileWorker_compileHeader___closed__6; LEAN_EXPORT lean_object* l_IO_FS_Stream_readLspNotificationAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__3(lean_object*, lean_object*, lean_object*); lean_object* lean_array_to_list(lean_object*, lean_object*); static lean_object* l_Lean_Server_FileWorker_handleDidChange___closed__1; @@ -2688,475 +2684,467 @@ return x_39; } else { -lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +lean_object* x_60; lean_free_object(x_39); lean_dec(x_41); -x_60 = l_String_split___at_Lean_stringToMessageData___spec__1(x_34); +lean_inc(x_34); +x_60 = l_Lean_Json_parse(x_34); +if (lean_obj_tag(x_60) == 0) +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +lean_dec(x_60); +x_61 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__9; +x_62 = lean_string_append(x_61, x_15); +lean_dec(x_15); +x_63 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__10; +x_64 = lean_string_append(x_62, x_63); +x_65 = lean_string_append(x_64, x_34); lean_dec(x_34); -x_61 = l_String_instInhabitedString; -x_62 = l_List_getLast_x21___rarg(x_61, x_60); -lean_inc(x_62); -x_63 = l_Lean_Json_parse(x_62); -if (lean_obj_tag(x_63) == 0) -{ -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_dec(x_63); -x_64 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__9; -x_65 = lean_string_append(x_64, x_15); -lean_dec(x_15); -x_66 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__10; +x_66 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__8; x_67 = lean_string_append(x_65, x_66); -x_68 = lean_string_append(x_67, x_62); -lean_dec(x_62); -x_69 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__8; -x_70 = lean_string_append(x_68, x_69); -x_71 = lean_string_append(x_70, x_37); +x_68 = lean_string_append(x_67, x_37); lean_dec(x_37); -x_72 = lean_string_append(x_71, x_23); -x_73 = l_IO_throwServerError___rarg(x_72, x_42); -return x_73; +x_69 = lean_string_append(x_68, x_23); +x_70 = l_IO_throwServerError___rarg(x_69, x_42); +return x_70; } else { -lean_object* x_74; lean_object* x_75; -x_74 = lean_ctor_get(x_63, 0); -lean_inc(x_74); -lean_dec(x_63); -x_75 = l___private_Lean_Util_Paths_0__Lean_fromJsonLeanPaths____x40_Lean_Util_Paths___hyg_90_(x_74); -if (lean_obj_tag(x_75) == 0) +lean_object* x_71; lean_object* x_72; +x_71 = lean_ctor_get(x_60, 0); +lean_inc(x_71); +lean_dec(x_60); +x_72 = l___private_Lean_Util_Paths_0__Lean_fromJsonLeanPaths____x40_Lean_Util_Paths___hyg_90_(x_71); +if (lean_obj_tag(x_72) == 0) { -lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; -lean_dec(x_75); -x_76 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__9; -x_77 = lean_string_append(x_76, x_15); +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +lean_dec(x_72); +x_73 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__9; +x_74 = lean_string_append(x_73, x_15); lean_dec(x_15); -x_78 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__10; +x_75 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__10; +x_76 = lean_string_append(x_74, x_75); +x_77 = lean_string_append(x_76, x_34); +lean_dec(x_34); +x_78 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__8; x_79 = lean_string_append(x_77, x_78); -x_80 = lean_string_append(x_79, x_62); -lean_dec(x_62); -x_81 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__8; -x_82 = lean_string_append(x_80, x_81); -x_83 = lean_string_append(x_82, x_37); +x_80 = lean_string_append(x_79, x_37); lean_dec(x_37); -x_84 = lean_string_append(x_83, x_23); -x_85 = l_IO_throwServerError___rarg(x_84, x_42); -return x_85; +x_81 = lean_string_append(x_80, x_23); +x_82 = l_IO_throwServerError___rarg(x_81, x_42); +return x_82; } else { -lean_object* x_86; lean_object* x_87; -lean_dec(x_62); +lean_object* x_83; lean_object* x_84; lean_dec(x_37); +lean_dec(x_34); lean_dec(x_15); -x_86 = lean_ctor_get(x_75, 0); +x_83 = lean_ctor_get(x_72, 0); +lean_inc(x_83); +lean_dec(x_72); +x_84 = lean_get_prefix(x_42); +if (lean_obj_tag(x_84) == 0) +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_85 = lean_ctor_get(x_84, 0); +lean_inc(x_85); +x_86 = lean_ctor_get(x_84, 1); lean_inc(x_86); -lean_dec(x_75); -x_87 = lean_get_prefix(x_42); -if (lean_obj_tag(x_87) == 0) +lean_dec(x_84); +x_87 = lean_ctor_get(x_83, 0); +lean_inc(x_87); +x_88 = l_Lean_initSearchPath(x_85, x_87, x_86); +if (lean_obj_tag(x_88) == 0) { -lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; -x_88 = lean_ctor_get(x_87, 0); -lean_inc(x_88); -x_89 = lean_ctor_get(x_87, 1); +lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; uint8_t x_93; +x_89 = lean_ctor_get(x_88, 1); lean_inc(x_89); -lean_dec(x_87); -x_90 = lean_ctor_get(x_86, 0); +lean_dec(x_88); +x_90 = lean_ctor_get(x_83, 2); lean_inc(x_90); -x_91 = l_Lean_initSearchPath(x_88, x_90, x_89); -if (lean_obj_tag(x_91) == 0) +x_91 = lean_array_get_size(x_90); +x_92 = lean_unsigned_to_nat(0u); +x_93 = lean_nat_dec_lt(x_92, x_91); +if (x_93 == 0) { -lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; uint8_t x_96; -x_92 = lean_ctor_get(x_91, 1); -lean_inc(x_92); +lean_object* x_94; lean_object* x_95; lean_dec(x_91); -x_93 = lean_ctor_get(x_86, 2); -lean_inc(x_93); -x_94 = lean_array_get_size(x_93); -x_95 = lean_unsigned_to_nat(0u); -x_96 = lean_nat_dec_lt(x_95, x_94); +lean_dec(x_90); +x_94 = lean_ctor_get(x_83, 1); +lean_inc(x_94); +lean_dec(x_83); +x_95 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_94, x_89); +return x_95; +} +else +{ +uint8_t x_96; +x_96 = lean_nat_dec_le(x_91, x_91); if (x_96 == 0) { lean_object* x_97; lean_object* x_98; -lean_dec(x_94); -lean_dec(x_93); -x_97 = lean_ctor_get(x_86, 1); +lean_dec(x_91); +lean_dec(x_90); +x_97 = lean_ctor_get(x_83, 1); lean_inc(x_97); -lean_dec(x_86); -x_98 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_97, x_92); +lean_dec(x_83); +x_98 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_97, x_89); return x_98; } else { -uint8_t x_99; -x_99 = lean_nat_dec_le(x_94, x_94); -if (x_99 == 0) -{ -lean_object* x_100; lean_object* x_101; -lean_dec(x_94); -lean_dec(x_93); -x_100 = lean_ctor_get(x_86, 1); -lean_inc(x_100); -lean_dec(x_86); -x_101 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_100, x_92); -return x_101; -} -else -{ -size_t x_102; lean_object* x_103; lean_object* x_104; -x_102 = lean_usize_of_nat(x_94); -lean_dec(x_94); -x_103 = lean_box(0); -x_104 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__3(x_93, x_8, x_102, x_103, x_92); -lean_dec(x_93); -if (lean_obj_tag(x_104) == 0) -{ -lean_object* x_105; lean_object* x_106; lean_object* x_107; -x_105 = lean_ctor_get(x_104, 1); -lean_inc(x_105); -lean_dec(x_104); -x_106 = lean_ctor_get(x_86, 1); -lean_inc(x_106); -lean_dec(x_86); -x_107 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_106, x_105); -return x_107; -} -else -{ -uint8_t x_108; -lean_dec(x_86); -x_108 = !lean_is_exclusive(x_104); -if (x_108 == 0) +size_t x_99; lean_object* x_100; lean_object* x_101; +x_99 = lean_usize_of_nat(x_91); +lean_dec(x_91); +x_100 = lean_box(0); +x_101 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__3(x_90, x_8, x_99, x_100, x_89); +lean_dec(x_90); +if (lean_obj_tag(x_101) == 0) { +lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_102 = lean_ctor_get(x_101, 1); +lean_inc(x_102); +lean_dec(x_101); +x_103 = lean_ctor_get(x_83, 1); +lean_inc(x_103); +lean_dec(x_83); +x_104 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_103, x_102); return x_104; } else { -lean_object* x_109; lean_object* x_110; lean_object* x_111; -x_109 = lean_ctor_get(x_104, 0); -x_110 = lean_ctor_get(x_104, 1); +uint8_t x_105; +lean_dec(x_83); +x_105 = !lean_is_exclusive(x_101); +if (x_105 == 0) +{ +return x_101; +} +else +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; +x_106 = lean_ctor_get(x_101, 0); +x_107 = lean_ctor_get(x_101, 1); +lean_inc(x_107); +lean_inc(x_106); +lean_dec(x_101); +x_108 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_108, 0, x_106); +lean_ctor_set(x_108, 1, x_107); +return x_108; +} +} +} +} +} +else +{ +uint8_t x_109; +lean_dec(x_83); +x_109 = !lean_is_exclusive(x_88); +if (x_109 == 0) +{ +return x_88; +} +else +{ +lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_110 = lean_ctor_get(x_88, 0); +x_111 = lean_ctor_get(x_88, 1); +lean_inc(x_111); lean_inc(x_110); -lean_inc(x_109); -lean_dec(x_104); -x_111 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_111, 0, x_109); -lean_ctor_set(x_111, 1, x_110); -return x_111; -} -} +lean_dec(x_88); +x_112 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_112, 0, x_110); +lean_ctor_set(x_112, 1, x_111); +return x_112; } } } else { -uint8_t x_112; -lean_dec(x_86); -x_112 = !lean_is_exclusive(x_91); -if (x_112 == 0) +uint8_t x_113; +lean_dec(x_83); +x_113 = !lean_is_exclusive(x_84); +if (x_113 == 0) { -return x_91; +return x_84; } else { -lean_object* x_113; lean_object* x_114; lean_object* x_115; -x_113 = lean_ctor_get(x_91, 0); -x_114 = lean_ctor_get(x_91, 1); +lean_object* x_114; lean_object* x_115; lean_object* x_116; +x_114 = lean_ctor_get(x_84, 0); +x_115 = lean_ctor_get(x_84, 1); +lean_inc(x_115); lean_inc(x_114); -lean_inc(x_113); -lean_dec(x_91); -x_115 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_115, 0, x_113); -lean_ctor_set(x_115, 1, x_114); -return x_115; +lean_dec(x_84); +x_116 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_116, 0, x_114); +lean_ctor_set(x_116, 1, x_115); +return x_116; +} +} +} } } } else { -uint8_t x_116; -lean_dec(x_86); -x_116 = !lean_is_exclusive(x_87); -if (x_116 == 0) -{ -return x_87; -} -else -{ -lean_object* x_117; lean_object* x_118; lean_object* x_119; -x_117 = lean_ctor_get(x_87, 0); -x_118 = lean_ctor_get(x_87, 1); +lean_object* x_117; lean_object* x_118; uint32_t x_119; uint32_t x_120; uint8_t x_121; +x_117 = lean_ctor_get(x_39, 0); +x_118 = lean_ctor_get(x_39, 1); lean_inc(x_118); lean_inc(x_117); -lean_dec(x_87); -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 -{ -lean_object* x_120; lean_object* x_121; uint32_t x_122; uint32_t x_123; uint8_t x_124; -x_120 = lean_ctor_get(x_39, 0); -x_121 = lean_ctor_get(x_39, 1); -lean_inc(x_121); -lean_inc(x_120); lean_dec(x_39); -x_122 = 0; -x_123 = lean_unbox_uint32(x_120); +x_119 = 0; +x_120 = lean_unbox_uint32(x_117); +x_121 = lean_uint32_dec_eq(x_120, x_119); +if (x_121 == 0) +{ +uint32_t x_122; uint32_t x_123; uint8_t x_124; +x_122 = 2; +x_123 = lean_unbox_uint32(x_117); +lean_dec(x_117); x_124 = lean_uint32_dec_eq(x_123, x_122); if (x_124 == 0) { -uint32_t x_125; uint32_t x_126; uint8_t x_127; -x_125 = 2; -x_126 = lean_unbox_uint32(x_120); -lean_dec(x_120); -x_127 = lean_uint32_dec_eq(x_126, x_125); -if (x_127 == 0) -{ -lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; -x_128 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__6; -x_129 = lean_string_append(x_128, x_15); +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; +x_125 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__6; +x_126 = lean_string_append(x_125, x_15); lean_dec(x_15); -x_130 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__7; +x_127 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__7; +x_128 = lean_string_append(x_126, x_127); +x_129 = lean_string_append(x_128, x_34); +lean_dec(x_34); +x_130 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__8; x_131 = lean_string_append(x_129, x_130); -x_132 = lean_string_append(x_131, x_34); -lean_dec(x_34); -x_133 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__8; -x_134 = lean_string_append(x_132, x_133); -x_135 = lean_string_append(x_134, x_37); +x_132 = lean_string_append(x_131, x_37); lean_dec(x_37); -x_136 = lean_string_append(x_135, x_23); -x_137 = l_IO_throwServerError___rarg(x_136, x_121); -return x_137; +x_133 = lean_string_append(x_132, x_23); +x_134 = l_IO_throwServerError___rarg(x_133, x_118); +return x_134; } else { -lean_object* x_138; lean_object* x_139; +lean_object* x_135; lean_object* x_136; lean_dec(x_37); lean_dec(x_34); lean_dec(x_15); -x_138 = lean_box(0); -x_139 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_139, 0, x_138); -lean_ctor_set(x_139, 1, x_121); -return x_139; +x_135 = lean_box(0); +x_136 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_136, 0, x_135); +lean_ctor_set(x_136, 1, x_118); +return x_136; } } else { -lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; -lean_dec(x_120); -x_140 = l_String_split___at_Lean_stringToMessageData___spec__1(x_34); +lean_object* x_137; +lean_dec(x_117); +lean_inc(x_34); +x_137 = l_Lean_Json_parse(x_34); +if (lean_obj_tag(x_137) == 0) +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; +lean_dec(x_137); +x_138 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__9; +x_139 = lean_string_append(x_138, x_15); +lean_dec(x_15); +x_140 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__10; +x_141 = lean_string_append(x_139, x_140); +x_142 = lean_string_append(x_141, x_34); lean_dec(x_34); -x_141 = l_String_instInhabitedString; -x_142 = l_List_getLast_x21___rarg(x_141, x_140); -lean_inc(x_142); -x_143 = l_Lean_Json_parse(x_142); -if (lean_obj_tag(x_143) == 0) -{ -lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; -lean_dec(x_143); -x_144 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__9; -x_145 = lean_string_append(x_144, x_15); -lean_dec(x_15); -x_146 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__10; -x_147 = lean_string_append(x_145, x_146); -x_148 = lean_string_append(x_147, x_142); -lean_dec(x_142); -x_149 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__8; -x_150 = lean_string_append(x_148, x_149); -x_151 = lean_string_append(x_150, x_37); +x_143 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__8; +x_144 = lean_string_append(x_142, x_143); +x_145 = lean_string_append(x_144, x_37); lean_dec(x_37); -x_152 = lean_string_append(x_151, x_23); -x_153 = l_IO_throwServerError___rarg(x_152, x_121); -return x_153; +x_146 = lean_string_append(x_145, x_23); +x_147 = l_IO_throwServerError___rarg(x_146, x_118); +return x_147; } else { -lean_object* x_154; lean_object* x_155; -x_154 = lean_ctor_get(x_143, 0); -lean_inc(x_154); -lean_dec(x_143); -x_155 = l___private_Lean_Util_Paths_0__Lean_fromJsonLeanPaths____x40_Lean_Util_Paths___hyg_90_(x_154); -if (lean_obj_tag(x_155) == 0) +lean_object* x_148; lean_object* x_149; +x_148 = lean_ctor_get(x_137, 0); +lean_inc(x_148); +lean_dec(x_137); +x_149 = l___private_Lean_Util_Paths_0__Lean_fromJsonLeanPaths____x40_Lean_Util_Paths___hyg_90_(x_148); +if (lean_obj_tag(x_149) == 0) { -lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; -lean_dec(x_155); -x_156 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__9; -x_157 = lean_string_append(x_156, x_15); +lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; +lean_dec(x_149); +x_150 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__9; +x_151 = lean_string_append(x_150, x_15); lean_dec(x_15); -x_158 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__10; -x_159 = lean_string_append(x_157, x_158); -x_160 = lean_string_append(x_159, x_142); -lean_dec(x_142); -x_161 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__8; -x_162 = lean_string_append(x_160, x_161); -x_163 = lean_string_append(x_162, x_37); +x_152 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__10; +x_153 = lean_string_append(x_151, x_152); +x_154 = lean_string_append(x_153, x_34); +lean_dec(x_34); +x_155 = l_Lean_Server_FileWorker_lakeSetupSearchPath___closed__8; +x_156 = lean_string_append(x_154, x_155); +x_157 = lean_string_append(x_156, x_37); lean_dec(x_37); -x_164 = lean_string_append(x_163, x_23); -x_165 = l_IO_throwServerError___rarg(x_164, x_121); -return x_165; +x_158 = lean_string_append(x_157, x_23); +x_159 = l_IO_throwServerError___rarg(x_158, x_118); +return x_159; } else { -lean_object* x_166; lean_object* x_167; -lean_dec(x_142); +lean_object* x_160; lean_object* x_161; lean_dec(x_37); +lean_dec(x_34); lean_dec(x_15); -x_166 = lean_ctor_get(x_155, 0); +x_160 = lean_ctor_get(x_149, 0); +lean_inc(x_160); +lean_dec(x_149); +x_161 = lean_get_prefix(x_118); +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_ctor_get(x_160, 0); +lean_inc(x_164); +x_165 = l_Lean_initSearchPath(x_162, x_164, x_163); +if (lean_obj_tag(x_165) == 0) +{ +lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; uint8_t x_170; +x_166 = lean_ctor_get(x_165, 1); lean_inc(x_166); -lean_dec(x_155); -x_167 = lean_get_prefix(x_121); -if (lean_obj_tag(x_167) == 0) +lean_dec(x_165); +x_167 = lean_ctor_get(x_160, 2); +lean_inc(x_167); +x_168 = lean_array_get_size(x_167); +x_169 = lean_unsigned_to_nat(0u); +x_170 = lean_nat_dec_lt(x_169, x_168); +if (x_170 == 0) { -lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; -x_168 = lean_ctor_get(x_167, 0); -lean_inc(x_168); -x_169 = lean_ctor_get(x_167, 1); -lean_inc(x_169); +lean_object* x_171; lean_object* x_172; +lean_dec(x_168); lean_dec(x_167); -x_170 = lean_ctor_get(x_166, 0); -lean_inc(x_170); -x_171 = l_Lean_initSearchPath(x_168, x_170, x_169); -if (lean_obj_tag(x_171) == 0) -{ -lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; uint8_t x_176; -x_172 = lean_ctor_get(x_171, 1); -lean_inc(x_172); -lean_dec(x_171); -x_173 = lean_ctor_get(x_166, 2); -lean_inc(x_173); -x_174 = lean_array_get_size(x_173); -x_175 = lean_unsigned_to_nat(0u); -x_176 = lean_nat_dec_lt(x_175, x_174); -if (x_176 == 0) -{ -lean_object* x_177; lean_object* x_178; -lean_dec(x_174); -lean_dec(x_173); -x_177 = lean_ctor_get(x_166, 1); -lean_inc(x_177); -lean_dec(x_166); -x_178 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_177, x_172); -return x_178; +x_171 = lean_ctor_get(x_160, 1); +lean_inc(x_171); +lean_dec(x_160); +x_172 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_171, x_166); +return x_172; } else { -uint8_t x_179; -x_179 = lean_nat_dec_le(x_174, x_174); -if (x_179 == 0) +uint8_t x_173; +x_173 = lean_nat_dec_le(x_168, x_168); +if (x_173 == 0) { -lean_object* x_180; lean_object* x_181; -lean_dec(x_174); -lean_dec(x_173); -x_180 = lean_ctor_get(x_166, 1); +lean_object* x_174; lean_object* x_175; +lean_dec(x_168); +lean_dec(x_167); +x_174 = lean_ctor_get(x_160, 1); +lean_inc(x_174); +lean_dec(x_160); +x_175 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_174, x_166); +return x_175; +} +else +{ +size_t x_176; lean_object* x_177; lean_object* x_178; +x_176 = lean_usize_of_nat(x_168); +lean_dec(x_168); +x_177 = lean_box(0); +x_178 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__3(x_167, x_8, x_176, x_177, x_166); +lean_dec(x_167); +if (lean_obj_tag(x_178) == 0) +{ +lean_object* x_179; lean_object* x_180; lean_object* x_181; +x_179 = lean_ctor_get(x_178, 1); +lean_inc(x_179); +lean_dec(x_178); +x_180 = lean_ctor_get(x_160, 1); lean_inc(x_180); -lean_dec(x_166); -x_181 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_180, x_172); +lean_dec(x_160); +x_181 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_180, x_179); return x_181; } else { -size_t x_182; lean_object* x_183; lean_object* x_184; -x_182 = lean_usize_of_nat(x_174); -lean_dec(x_174); -x_183 = lean_box(0); -x_184 = l_Array_foldlMUnsafe_fold___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__3(x_173, x_8, x_182, x_183, x_172); -lean_dec(x_173); -if (lean_obj_tag(x_184) == 0) +lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; +lean_dec(x_160); +x_182 = lean_ctor_get(x_178, 0); +lean_inc(x_182); +x_183 = lean_ctor_get(x_178, 1); +lean_inc(x_183); +if (lean_is_exclusive(x_178)) { + lean_ctor_release(x_178, 0); + lean_ctor_release(x_178, 1); + x_184 = x_178; +} else { + lean_dec_ref(x_178); + x_184 = lean_box(0); +} +if (lean_is_scalar(x_184)) { + x_185 = lean_alloc_ctor(1, 2, 0); +} else { + x_185 = x_184; +} +lean_ctor_set(x_185, 0, x_182); +lean_ctor_set(x_185, 1, x_183); +return x_185; +} +} +} +} +else { -lean_object* x_185; lean_object* x_186; lean_object* x_187; -x_185 = lean_ctor_get(x_184, 1); -lean_inc(x_185); -lean_dec(x_184); -x_186 = lean_ctor_get(x_166, 1); +lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; +lean_dec(x_160); +x_186 = lean_ctor_get(x_165, 0); lean_inc(x_186); -lean_dec(x_166); -x_187 = l_List_mapM___at_Lean_Server_FileWorker_lakeSetupSearchPath___spec__2(x_186, x_185); -return x_187; -} -else -{ -lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; -lean_dec(x_166); -x_188 = lean_ctor_get(x_184, 0); -lean_inc(x_188); -x_189 = lean_ctor_get(x_184, 1); -lean_inc(x_189); -if (lean_is_exclusive(x_184)) { - lean_ctor_release(x_184, 0); - lean_ctor_release(x_184, 1); - x_190 = x_184; +x_187 = lean_ctor_get(x_165, 1); +lean_inc(x_187); +if (lean_is_exclusive(x_165)) { + lean_ctor_release(x_165, 0); + lean_ctor_release(x_165, 1); + x_188 = x_165; } else { - lean_dec_ref(x_184); - x_190 = lean_box(0); + lean_dec_ref(x_165); + x_188 = lean_box(0); } -if (lean_is_scalar(x_190)) { - x_191 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_188)) { + x_189 = lean_alloc_ctor(1, 2, 0); } else { - x_191 = x_190; -} -lean_ctor_set(x_191, 0, x_188); -lean_ctor_set(x_191, 1, x_189); -return x_191; -} + x_189 = x_188; } +lean_ctor_set(x_189, 0, x_186); +lean_ctor_set(x_189, 1, x_187); +return x_189; } } else { -lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; -lean_dec(x_166); -x_192 = lean_ctor_get(x_171, 0); -lean_inc(x_192); -x_193 = lean_ctor_get(x_171, 1); -lean_inc(x_193); -if (lean_is_exclusive(x_171)) { - lean_ctor_release(x_171, 0); - lean_ctor_release(x_171, 1); - x_194 = x_171; +lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; +lean_dec(x_160); +x_190 = lean_ctor_get(x_161, 0); +lean_inc(x_190); +x_191 = lean_ctor_get(x_161, 1); +lean_inc(x_191); +if (lean_is_exclusive(x_161)) { + lean_ctor_release(x_161, 0); + lean_ctor_release(x_161, 1); + x_192 = x_161; } else { - lean_dec_ref(x_171); - x_194 = lean_box(0); + lean_dec_ref(x_161); + x_192 = lean_box(0); } -if (lean_is_scalar(x_194)) { - x_195 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_192)) { + x_193 = lean_alloc_ctor(1, 2, 0); } else { - x_195 = x_194; + x_193 = x_192; } -lean_ctor_set(x_195, 0, x_192); -lean_ctor_set(x_195, 1, x_193); -return x_195; -} -} -else -{ -lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; -lean_dec(x_166); -x_196 = lean_ctor_get(x_167, 0); -lean_inc(x_196); -x_197 = lean_ctor_get(x_167, 1); -lean_inc(x_197); -if (lean_is_exclusive(x_167)) { - lean_ctor_release(x_167, 0); - lean_ctor_release(x_167, 1); - x_198 = x_167; -} else { - lean_dec_ref(x_167); - x_198 = lean_box(0); -} -if (lean_is_scalar(x_198)) { - x_199 = lean_alloc_ctor(1, 2, 0); -} else { - x_199 = x_198; -} -lean_ctor_set(x_199, 0, x_196); -lean_ctor_set(x_199, 1, x_197); -return x_199; +lean_ctor_set(x_193, 0, x_190); +lean_ctor_set(x_193, 1, x_191); +return x_193; } } } @@ -3165,107 +3153,107 @@ return x_199; } else { -uint8_t x_200; +uint8_t x_194; lean_dec(x_37); lean_dec(x_34); lean_dec(x_15); -x_200 = !lean_is_exclusive(x_39); -if (x_200 == 0) +x_194 = !lean_is_exclusive(x_39); +if (x_194 == 0) { return x_39; } else { -lean_object* x_201; lean_object* x_202; lean_object* x_203; -x_201 = lean_ctor_get(x_39, 0); -x_202 = lean_ctor_get(x_39, 1); -lean_inc(x_202); -lean_inc(x_201); +lean_object* x_195; lean_object* x_196; lean_object* x_197; +x_195 = lean_ctor_get(x_39, 0); +x_196 = lean_ctor_get(x_39, 1); +lean_inc(x_196); +lean_inc(x_195); lean_dec(x_39); -x_203 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_203, 0, x_201); -lean_ctor_set(x_203, 1, x_202); -return x_203; +x_197 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_197, 0, x_195); +lean_ctor_set(x_197, 1, x_196); +return x_197; } } } else { -uint8_t x_204; +uint8_t x_198; lean_dec(x_34); lean_dec(x_21); lean_dec(x_15); -x_204 = !lean_is_exclusive(x_36); -if (x_204 == 0) +x_198 = !lean_is_exclusive(x_36); +if (x_198 == 0) { return x_36; } else { -lean_object* x_205; lean_object* x_206; lean_object* x_207; -x_205 = lean_ctor_get(x_36, 0); -x_206 = lean_ctor_get(x_36, 1); -lean_inc(x_206); -lean_inc(x_205); +lean_object* x_199; lean_object* x_200; lean_object* x_201; +x_199 = lean_ctor_get(x_36, 0); +x_200 = lean_ctor_get(x_36, 1); +lean_inc(x_200); +lean_inc(x_199); lean_dec(x_36); -x_207 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_207, 0, x_205); -lean_ctor_set(x_207, 1, x_206); -return x_207; +x_201 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_201, 0, x_199); +lean_ctor_set(x_201, 1, x_200); +return x_201; } } } else { -uint8_t x_208; +uint8_t x_202; lean_dec(x_28); lean_dec(x_21); lean_dec(x_15); -x_208 = !lean_is_exclusive(x_31); -if (x_208 == 0) +x_202 = !lean_is_exclusive(x_31); +if (x_202 == 0) { return x_31; } else { -lean_object* x_209; lean_object* x_210; lean_object* x_211; -x_209 = lean_ctor_get(x_31, 0); -x_210 = lean_ctor_get(x_31, 1); -lean_inc(x_210); -lean_inc(x_209); +lean_object* x_203; lean_object* x_204; lean_object* x_205; +x_203 = lean_ctor_get(x_31, 0); +x_204 = lean_ctor_get(x_31, 1); +lean_inc(x_204); +lean_inc(x_203); lean_dec(x_31); -x_211 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_211, 0, x_209); -lean_ctor_set(x_211, 1, x_210); -return x_211; +x_205 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_205, 0, x_203); +lean_ctor_set(x_205, 1, x_204); +return x_205; } } } else { -uint8_t x_212; +uint8_t x_206; lean_dec(x_15); lean_dec(x_11); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_212 = !lean_is_exclusive(x_20); -if (x_212 == 0) +x_206 = !lean_is_exclusive(x_20); +if (x_206 == 0) { return x_20; } else { -lean_object* x_213; lean_object* x_214; lean_object* x_215; -x_213 = lean_ctor_get(x_20, 0); -x_214 = lean_ctor_get(x_20, 1); -lean_inc(x_214); -lean_inc(x_213); +lean_object* x_207; lean_object* x_208; lean_object* x_209; +x_207 = lean_ctor_get(x_20, 0); +x_208 = lean_ctor_get(x_20, 1); +lean_inc(x_208); +lean_inc(x_207); lean_dec(x_20); -x_215 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_215, 0, x_213); -lean_ctor_set(x_215, 1, x_214); -return x_215; +x_209 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_209, 0, x_207); +lean_ctor_set(x_209, 1, x_208); +return x_209; } } } @@ -5279,7 +5267,7 @@ static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__3() { _start: { lean_object* x_1; -x_1 = lean_mk_string("leanpkg.toml"); +x_1 = lean_mk_string("LEAN_SYSROOT"); return x_1; } } @@ -5287,7 +5275,7 @@ static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__4() { _start: { lean_object* x_1; -x_1 = lean_mk_string("LEAN_SYSROOT"); +x_1 = lean_mk_string("lake"); return x_1; } } @@ -5295,26 +5283,10 @@ static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__5() { _start: { lean_object* x_1; -x_1 = lean_mk_string("lake"); -return x_1; -} -} -static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__6() { -_start: -{ -lean_object* x_1; x_1 = lean_mk_string("bin"); return x_1; } } -static lean_object* _init_l_Lean_Server_FileWorker_compileHeader___closed__7() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("leanpkg"); -return x_1; -} -} LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_compileHeader(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5) { _start: { @@ -5367,7 +5339,7 @@ x_24 = lean_ctor_get(x_23, 0); lean_inc(x_24); 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; 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; uint8_t x_59; +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_25 = lean_ctor_get(x_23, 1); lean_inc(x_25); lean_dec(x_23); @@ -5383,196 +5355,87 @@ lean_closure_set(x_27, 6, x_2); lean_closure_set(x_27, 7, x_16); lean_closure_set(x_27, 8, x_9); x_28 = l_Lean_Server_FileWorker_compileHeader___closed__3; -x_29 = l_System_FilePath_pathExists(x_28, x_25); +x_29 = lean_io_getenv(x_28, x_25); x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; lean_object* x_32; x_31 = lean_ctor_get(x_29, 1); lean_inc(x_31); lean_dec(x_29); -x_32 = l_Lean_Server_FileWorker_compileHeader___lambda__3___closed__3; -x_33 = l_System_FilePath_pathExists(x_32, x_31); -x_34 = lean_ctor_get(x_33, 0); +x_32 = l_IO_appDir(x_31); +if (lean_obj_tag(x_32) == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_32, 1); lean_inc(x_34); -x_35 = lean_ctor_get(x_33, 1); -lean_inc(x_35); -lean_dec(x_33); -x_36 = l_Lean_Server_FileWorker_compileHeader___closed__4; -x_37 = lean_io_getenv(x_36, x_35); -x_59 = lean_unbox(x_30); -lean_dec(x_30); -if (x_59 == 0) -{ -lean_object* x_60; -lean_dec(x_34); -x_60 = lean_box(0); -x_38 = x_60; -goto block_58; +lean_dec(x_32); +x_35 = l_Lean_Server_FileWorker_compileHeader___closed__4; +x_36 = l_System_FilePath_join(x_33, x_35); +x_37 = l_Lean_Server_FileWorker_compileHeader___lambda__4(x_27, x_20, x_36, x_34); +return x_37; } else { -uint8_t x_61; -x_61 = lean_unbox(x_34); -lean_dec(x_34); -if (x_61 == 0) -{ -lean_object* x_62; -x_62 = lean_ctor_get(x_37, 0); -lean_inc(x_62); -if (lean_obj_tag(x_62) == 0) -{ -lean_object* x_63; lean_object* x_64; -x_63 = lean_ctor_get(x_37, 1); -lean_inc(x_63); -lean_dec(x_37); -x_64 = l_IO_appDir(x_63); -if (lean_obj_tag(x_64) == 0) -{ -lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* 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 = l_Lean_Server_FileWorker_compileHeader___closed__7; -x_68 = l_System_FilePath_join(x_65, x_67); -x_69 = l_Lean_Server_FileWorker_compileHeader___lambda__4(x_27, x_20, x_68, x_66); -return x_69; -} -else -{ -uint8_t x_70; +uint8_t x_38; lean_dec(x_27); lean_dec(x_20); -x_70 = !lean_is_exclusive(x_64); -if (x_70 == 0) +x_38 = !lean_is_exclusive(x_32); +if (x_38 == 0) { -return x_64; +return x_32; } else { -lean_object* x_71; lean_object* x_72; lean_object* x_73; -x_71 = lean_ctor_get(x_64, 0); -x_72 = lean_ctor_get(x_64, 1); -lean_inc(x_72); -lean_inc(x_71); -lean_dec(x_64); -x_73 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_73, 0, x_71); -lean_ctor_set(x_73, 1, x_72); -return x_73; -} -} -} -else -{ -lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_74 = lean_ctor_get(x_37, 1); -lean_inc(x_74); -lean_dec(x_37); -x_75 = lean_ctor_get(x_62, 0); -lean_inc(x_75); -lean_dec(x_62); -x_76 = l_Lean_Server_FileWorker_compileHeader___closed__6; -x_77 = l_System_FilePath_join(x_75, x_76); -x_78 = l_Lean_Server_FileWorker_compileHeader___closed__7; -x_79 = l_System_FilePath_join(x_77, x_78); -x_80 = l_Lean_Server_FileWorker_compileHeader___lambda__4(x_27, x_20, x_79, x_74); -return x_80; -} -} -else -{ -lean_object* x_81; -x_81 = lean_box(0); -x_38 = x_81; -goto block_58; -} -} -block_58: -{ -lean_object* x_39; -lean_dec(x_38); -x_39 = lean_ctor_get(x_37, 0); -lean_inc(x_39); -if (lean_obj_tag(x_39) == 0) -{ -lean_object* x_40; lean_object* x_41; -x_40 = lean_ctor_get(x_37, 1); +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_32, 0); +x_40 = lean_ctor_get(x_32, 1); lean_inc(x_40); -lean_dec(x_37); -x_41 = l_IO_appDir(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; lean_object* x_46; -x_42 = lean_ctor_get(x_41, 0); -lean_inc(x_42); -x_43 = lean_ctor_get(x_41, 1); -lean_inc(x_43); -lean_dec(x_41); -x_44 = l_Lean_Server_FileWorker_compileHeader___closed__5; -x_45 = l_System_FilePath_join(x_42, x_44); -x_46 = l_Lean_Server_FileWorker_compileHeader___lambda__4(x_27, x_20, x_45, x_43); -return x_46; -} -else -{ -uint8_t x_47; -lean_dec(x_27); -lean_dec(x_20); -x_47 = !lean_is_exclusive(x_41); -if (x_47 == 0) -{ +lean_inc(x_39); +lean_dec(x_32); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); return x_41; } +} +} else { -lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_48 = lean_ctor_get(x_41, 0); -x_49 = lean_ctor_get(x_41, 1); +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_42 = lean_ctor_get(x_29, 1); +lean_inc(x_42); +lean_dec(x_29); +x_43 = lean_ctor_get(x_30, 0); +lean_inc(x_43); +lean_dec(x_30); +x_44 = l_Lean_Server_FileWorker_compileHeader___closed__5; +x_45 = l_System_FilePath_join(x_43, x_44); +x_46 = l_Lean_Server_FileWorker_compileHeader___closed__4; +x_47 = l_System_FilePath_join(x_45, x_46); +x_48 = l_Lean_Server_FileWorker_compileHeader___lambda__4(x_27, x_20, x_47, x_42); +return x_48; +} +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_23, 1); lean_inc(x_49); -lean_inc(x_48); -lean_dec(x_41); -x_50 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_50, 0, x_48); -lean_ctor_set(x_50, 1, x_49); -return x_50; -} -} -} -else -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_51 = lean_ctor_get(x_37, 1); -lean_inc(x_51); -lean_dec(x_37); -x_52 = lean_ctor_get(x_39, 0); -lean_inc(x_52); -lean_dec(x_39); -x_53 = l_Lean_Server_FileWorker_compileHeader___closed__6; -x_54 = l_System_FilePath_join(x_52, x_53); -x_55 = l_Lean_Server_FileWorker_compileHeader___closed__5; -x_56 = l_System_FilePath_join(x_54, x_55); -x_57 = l_Lean_Server_FileWorker_compileHeader___lambda__4(x_27, x_20, x_56, x_51); -return x_57; -} -} -} -else -{ -lean_object* x_82; lean_object* x_83; lean_object* x_84; -x_82 = lean_ctor_get(x_23, 1); -lean_inc(x_82); lean_dec(x_23); -x_83 = lean_ctor_get(x_24, 0); -lean_inc(x_83); +x_50 = lean_ctor_get(x_24, 0); +lean_inc(x_50); lean_dec(x_24); -x_84 = l_Lean_Server_FileWorker_compileHeader___lambda__3(x_3, x_6, x_14, x_4, x_15, x_1, x_2, x_16, x_9, x_20, x_83, x_82); -return x_84; +x_51 = l_Lean_Server_FileWorker_compileHeader___lambda__3(x_3, x_6, x_14, x_4, x_15, x_1, x_2, x_16, x_9, x_20, x_50, x_49); +return x_51; } } else { -uint8_t x_85; +uint8_t x_52; lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); @@ -5581,29 +5444,29 @@ lean_dec(x_6); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_85 = !lean_is_exclusive(x_19); -if (x_85 == 0) +x_52 = !lean_is_exclusive(x_19); +if (x_52 == 0) { return x_19; } else { -lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_86 = lean_ctor_get(x_19, 0); -x_87 = lean_ctor_get(x_19, 1); -lean_inc(x_87); -lean_inc(x_86); +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_19, 0); +x_54 = lean_ctor_get(x_19, 1); +lean_inc(x_54); +lean_inc(x_53); lean_dec(x_19); -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; +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_89; +uint8_t x_56; lean_dec(x_16); lean_dec(x_15); lean_dec(x_14); @@ -5612,51 +5475,51 @@ lean_dec(x_6); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_89 = !lean_is_exclusive(x_17); -if (x_89 == 0) +x_56 = !lean_is_exclusive(x_17); +if (x_56 == 0) { return x_17; } else { -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_17, 0); -x_91 = lean_ctor_get(x_17, 1); -lean_inc(x_91); -lean_inc(x_90); +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_17, 0); +x_58 = lean_ctor_get(x_17, 1); +lean_inc(x_58); +lean_inc(x_57); lean_dec(x_17); -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; +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_57); +lean_ctor_set(x_59, 1, x_58); +return x_59; } } } else { -uint8_t x_93; +uint8_t x_60; lean_dec(x_9); lean_dec(x_6); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_93 = !lean_is_exclusive(x_10); -if (x_93 == 0) +x_60 = !lean_is_exclusive(x_10); +if (x_60 == 0) { return x_10; } else { -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_10, 0); -x_95 = lean_ctor_get(x_10, 1); -lean_inc(x_95); -lean_inc(x_94); +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_10, 0); +x_62 = lean_ctor_get(x_10, 1); +lean_inc(x_62); +lean_inc(x_61); lean_dec(x_10); -x_96 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_96, 0, x_94); -lean_ctor_set(x_96, 1, x_95); -return x_96; +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; } } } @@ -19824,10 +19687,6 @@ l_Lean_Server_FileWorker_compileHeader___closed__4 = _init_l_Lean_Server_FileWor lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___closed__4); l_Lean_Server_FileWorker_compileHeader___closed__5 = _init_l_Lean_Server_FileWorker_compileHeader___closed__5(); lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___closed__5); -l_Lean_Server_FileWorker_compileHeader___closed__6 = _init_l_Lean_Server_FileWorker_compileHeader___closed__6(); -lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___closed__6); -l_Lean_Server_FileWorker_compileHeader___closed__7 = _init_l_Lean_Server_FileWorker_compileHeader___closed__7(); -lean_mark_persistent(l_Lean_Server_FileWorker_compileHeader___closed__7); l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1 = _init_l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1(); lean_mark_persistent(l_Lean_Server_FileWorker_updateDocument___lambda__3___closed__1); l_Lean_Server_FileWorker_updateDocument___closed__1 = _init_l_Lean_Server_FileWorker_updateDocument___closed__1();